master.kernel.org:/home/torvalds/BK/linux-2.6 torvalds@ppc970.osdl.org|ChangeSet|20050330234651|20010 torvalds # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/30 15:41:44-08:00 torvalds@ppc970.osdl.org # Sound/USB merge # # sound/usb/usbmidi.c # 2005/03/30 15:41:35-08:00 torvalds@ppc970.osdl.org +0 -1 # Sound/USB merge # # sound/usb/usbaudio.c # 2005/03/30 15:38:26-08:00 torvalds@ppc970.osdl.org +0 -4 # Auto merged # # sound/pci/ac97/ac97_codec.c # 2005/03/30 15:38:25-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # sound/core/pcm_native.c # 2005/03/30 15:38:25-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/30 12:36:24-08:00 gregkh@suse.de # Merge suse.de:/home/greg/linux/BK/bleed-2.6 # into suse.de:/home/greg/linux/BK/usb-2.6 # # drivers/usb/media/pwc/pwc-if.c # 2005/03/30 12:36:20-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/usb/host/sl811-hcd.c # 2005/03/30 12:36:20-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/usb/gadget/ether.c # 2005/03/30 12:36:20-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/usb/core/hub.c # 2005/03/30 12:36:20-08:00 gregkh@suse.de +0 -0 # Auto merged # # arch/arm/mach-omap/usb.c # 2005/03/30 12:36:20-08:00 gregkh@suse.de +0 -0 # Auto merged # # MAINTAINERS # 2005/03/30 12:36:20-08:00 gregkh@suse.de +0 -0 # Auto merged # # ChangeSet # 2005/03/30 13:58:06-06:00 markh@osdl.org # [PATCH] aacraid: endian cleanup # # An update to the patch from Adaptec with byte order changes: # # - drop byte swapping on all 0's and all 1's content # - fix up missing swapping directives # - ensure swapping on 16 bit values does not use 32 bit swap # - Made hardware registers __le* types. # - hopefully caught the style issues. # # Signed-off-by: Mark Haverkamp # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/sa.c # 2005/03/30 11:48:15-06:00 markh@osdl.org +10 -18 # aacraid: endian cleanup # # drivers/scsi/aacraid/rx.c # 2005/03/30 11:47:39-06:00 markh@osdl.org +10 -8 # aacraid: endian cleanup # # drivers/scsi/aacraid/rkt.c # 2005/03/30 11:46:46-06:00 markh@osdl.org +11 -10 # aacraid: endian cleanup # # drivers/scsi/aacraid/commsup.c # 2005/03/30 11:45:07-06:00 markh@osdl.org +10 -15 # aacraid: endian cleanup # # drivers/scsi/aacraid/comminit.c # 2005/03/03 15:01:32-06:00 markh@osdl.org +1 -1 # aacraid: endian cleanup # # drivers/scsi/aacraid/commctrl.c # 2005/03/30 11:43:23-06:00 markh@osdl.org +8 -4 # aacraid: endian cleanup # # drivers/scsi/aacraid/aacraid.h # 2005/03/29 11:31:47-06:00 markh@osdl.org +96 -95 # aacraid: endian cleanup # # drivers/scsi/aacraid/aachba.c # 2005/03/30 11:40:26-06:00 markh@osdl.org +88 -61 # aacraid: endian cleanup # # ChangeSet # 2005/03/30 13:52:14-06:00 jejb@mulgrave.(none) # Fix SCSI internal requests hang # # When a device is being torn down (mostly in USB ejection) # we hit conditions where SCSI hangs in wait_for_completion(). # The reason is that the scsi request prep function does a # state check on the device and rejects it with BLKPREP_KILL if # we're in the DEL (going away, no more I/O) state. # # Unfortunately, I/O submitted by scsi_wait_req() doesn't have # its request->end_io initialised, so we're never notified of # this (the submit path expects everything to come back via # the scsi_request->sr_done() routine, which only happens # if the I/O actually gets submitted. # # Note: almost everything that uses scsi_do_request() is wrong # not only in this regard but also on other things, like ending # tags. # # Problem Diagnosed with help from: Tejun Heo # # Signed-off-by: James Bottomley # # drivers/scsi/scsi_lib.c # 2005/03/30 13:49:45-06:00 jejb@mulgrave.(none) +11 -0 # Fix SCSI internal requests hang # # ChangeSet # 2005/03/30 09:46:52-08:00 dhowells@redhat.com # [PATCH] FRV: Fix kernel configuration # # This fixes the FRV configuration to work with 2.6.12-rc1. It does this # by breaking out the kernel hacking menu into a separate file, in the # same way this is done in other archs. # # Signed-Off-By: David Howells # Signed-off-by: Linus Torvalds # # lib/Kconfig.debug # 2005/03/30 03:04:02-08:00 dhowells@redhat.com +2 -2 # FRV: Fix kernel configuration # # arch/frv/Kconfig # 2005/03/30 03:00:04-08:00 dhowells@redhat.com +1 -145 # FRV: Fix kernel configuration # # arch/frv/Kconfig.debug # 2005/03/30 03:05:27-08:00 dhowells@redhat.com +74 -0 # FRV: Fix kernel configuration # # arch/frv/Kconfig.debug # 2005/03/30 03:05:27-08:00 dhowells@redhat.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/frv/Kconfig.debug # # ChangeSet # 2005/03/30 09:46:33-08:00 dhowells@redhat.com # [PATCH] FRV: Cleanup unused variable # # This removes an unused variable from the FRV arch. # # Signed-Off-By: David Howells # Signed-off-by: Linus Torvalds # # arch/frv/kernel/signal.c # 2005/03/30 03:06:35-08:00 dhowells@redhat.com +0 -1 # FRV: Cleanup unused variable # # ChangeSet # 2005/03/30 09:46:17-08:00 dhowells@redhat.com # [PATCH] FRV: Fix TLB miss mapping cache flush # # This fixes the TLB miss mapping cache flush function. # # The flush was attempting to invalidate the coverage start virtual addresses # for the cached page table mappings held in registers SCR0 and SCR1 by writing # 0 into them. Unfortunately, 0x00000000-0x04000000 is itself a valid part of # the virtual address range. This patches places -1 in there instead, thus # specifying 0xfc000000-0xffffffff which is covered by a static I/O mapping, and # so shouldn't ever be seen by the TLB-miss handler. # # Signed-Off-By: David Howells # Signed-off-by: Linus Torvalds # # include/asm-frv/tlbflush.h # 2005/03/30 02:50:06-08:00 dhowells@redhat.com +2 -1 # FRV: Fix TLB miss mapping cache flush # # ChangeSet # 2005/03/30 09:45:58-08:00 pavel@ucw.cz # [PATCH] Remaining u32 vs. pm_message_t fixes # # This fixes three remaining places where we put u32 (or worse # suspend_state_t) into pm_message_t-sized box. As a bonus, PCI_D0 is used # instead of constant 0. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.c # 2005/03/29 22:15:06-08:00 pavel@ucw.cz +2 -2 # Remaining u32 vs. pm_message_t fixes # # drivers/usb/host/sl811-hcd.c # 2005/03/29 22:15:06-08:00 pavel@ucw.cz +1 -1 # Remaining u32 vs. pm_message_t fixes # # ChangeSet # 2005/03/30 09:45:42-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t confusion in AGP # # This should fix u32 vs. pm_message_t confusion in AGP. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/agp/via-agp.c # 2005/03/29 22:15:06-08:00 pavel@suse.cz +3 -3 # Fix u32 vs. pm_message_t confusion in AGP # # ChangeSet # 2005/03/30 09:45:26-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t in macintosh # # This fixes u32 vs. pm_message_t confusion in macintosh. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/via-pmu.c # 2005/03/29 22:15:06-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t in macintosh # # ChangeSet # 2005/03/30 09:45:09-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t confusion in serials # # This fixes u32 vs. pm_message_t confusion in serials. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/8250.c # 2005/03/29 22:15:06-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in serials # # ChangeSet # 2005/03/30 09:44:51-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t confusion in MMC # # This fixes u32 vs. pm_message_t confusion in MMC layer. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mmc/card.h # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in MMC # # drivers/mmc/mmc_sysfs.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in MMC # # drivers/mmc/mmc_block.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in MMC # # ChangeSet # 2005/03/30 09:44:34-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t confusion in framebuffers # # This should fix u32 vs pm_message_t confusion in framebuffers, and do no code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/i810/i810_main.h # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in framebuffers # # drivers/video/i810/i810_main.c # 2005/03/29 22:42:46-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in framebuffers # # drivers/video/cyber2000fb.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in framebuffers # # drivers/video/aty/radeonfb.h # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in framebuffers # # drivers/video/aty/radeon_pm.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in framebuffers # # drivers/video/aty/atyfb_base.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +2 -2 # Fix u32 vs. pm_message_t confusion in framebuffers # # drivers/video/aty/aty128fb.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +3 -3 # Fix u32 vs. pm_message_t confusion in framebuffers # # ChangeSet # 2005/03/30 09:44:16-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t confusion in PCMCIA # # This should fix part of u32 vs. pm_message_t confusion in pcmcia. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/pcmcia/ss.h # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # drivers/pcmcia/yenta_socket.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # drivers/pcmcia/tcic.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # drivers/pcmcia/pd6729.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # drivers/pcmcia/i82365.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # drivers/pcmcia/i82092.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # drivers/pcmcia/cs.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in PCMCIA # # ChangeSet # 2005/03/30 09:43:58-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t confusion in OSS # # This fixes (part of) u32 vs. pm_message_t confusion in OSS. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/ymfpci.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/trident.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +2 -2 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/maestro3.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +3 -3 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/i810_audio.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/esssolo1.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/cs46xxpm-24.h # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/cs46xx.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +2 -2 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/cs4281/cs4281_wrapper-24.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in OSS # # sound/oss/ali5455.c # 2005/03/29 22:15:05-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t confusion in OSS # # ChangeSet # 2005/03/30 09:43:40-08:00 pavel@ucw.cz # [PATCH] more pm_message_t fixes # # While fixing usb, I stomped on a few more fixes. Print error when some # device fails to power down, and 2 is no longer valid state to pass in # pm_message_t. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pci/pci.c # 2005/03/29 22:15:00-08:00 pavel@ucw.cz +7 -5 # more pm_message_t fixes # # drivers/ide/ide-disk.c # 2005/03/29 22:14:12-08:00 pavel@ucw.cz +1 -1 # more pm_message_t fixes # # drivers/base/power/suspend.c # 2005/03/29 22:14:12-08:00 pavel@ucw.cz +2 -0 # more pm_message_t fixes # # ChangeSet # 2005/03/30 09:43:23-08:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t in USB # # This fixes (part of) u32 vs. pm_message_t confusion in USB. It should cause # no code changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/aty/radeon_pm.c # 2005/03/29 22:42:47-08:00 pavel@suse.cz +1 -1 # Fix u32 vs. pm_message_t in USB # # drivers/usb/host/sl811-hcd.c # 2005/03/29 22:42:46-08:00 pavel@suse.cz +3 -3 # Fix u32 vs. pm_message_t in USB # # drivers/usb/core/hub.c # 2005/03/29 22:13:33-08:00 pavel@suse.cz +2 -2 # Fix u32 vs. pm_message_t in USB # # ChangeSet # 2005/03/30 09:43:06-08:00 pavel@ucw.cz # [PATCH] Fix pm_message_t in generic code # # This fixes u32 vs. pm_message_t in generic code. No code changes. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/device.h # 2005/03/29 22:13:29-08:00 pavel@ucw.cz +1 -1 # Fix pm_message_t in generic code # # Documentation/power/devices.txt # 2005/03/29 22:13:29-08:00 pavel@ucw.cz +1 -1 # Fix pm_message_t in generic code # # ChangeSet # 2005/03/30 18:34:03+01:00 vince@org.rmk.(none) # [ARM PATCH] 2636/1: Missing include breaking cats build # # Patch from Vincent Sanders # # Fixes missing include which breaks footbridge_defconfig build # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/mach-footbridge/cats-hw.c # 2005/03/29 15:45:20+01:00 vince@org.rmk.(none) +1 -0 # [PATCH] 2636/1: Missing include breaking cats build # # ChangeSet # 2005/03/30 14:42:01+01:00 sascha@de.rmk.(none) # [ARM PATCH] 2635/1: i.MX serial hardware handshaking support # # Patch from Sascha Hauer # # This patch adds support for hardwarehandshaking on i.MX soc # # Signed-off-by: Sascha Hauer # Signed-off-by: Mike Lee # Signed-off-by: Russell King # # drivers/serial/imx.c # 2005/03/30 08:32:31+01:00 sascha@de.rmk.(none) +7 -0 # [PATCH] 2635/1: i.MX serial hardware handshaking support # # ChangeSet # 2005/03/30 14:24:57+01:00 nico@org.rmk.(none) # [ARM PATCH] 2634/1: prevent the lack of any CPU and/or machine record at link time # # Patch from Nicolas Pitre # # Without this, someone could successfully link a kernel with, for # example, no machine description structure at all. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/kernel/vmlinux.lds.S # 2005/03/30 05:46:56+01:00 nico@org.rmk.(none) +4 -0 # [PATCH] 2634/1: prevent the lack of any CPU and/or machine record at link time # # ChangeSet # 2005/03/30 14:16:38+01:00 lucasvr@org.rmk.(none) # [ARM PATCH] 2630/1: Fixes definition of GPB10 on S3C2410 # # Patch from Lucas Correia Villa Real # # This patch fixes the definition of the GPB10 bits on the S3C2410 by using the # correct offset to access its functions. # # Signed-off-by: Lucas Correia Villa Real # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-gpio.h # 2005/03/28 05:50:18+01:00 lucasvr@org.rmk.(none) +4 -3 # [PATCH] 2630/1: Fixes definition of GPB10 on S3C2410 # # ChangeSet # 2005/03/29 23:43:56-08:00 david-b@pacbell.net # [PATCH] USB: ohci D3 resume fix # # This fixes a problem that cropped up resuming OHCI from PCI D3 on # NForce2. Evidently the register controlling frame timing gets # clobbered in D3, but not other registers ... a "by the book" reinit # seems to solve this particular problem. (And ought to help a few # startup glitches on other implementations. Linux never used that # toggle bit before, and has had to struggle with glitchy init...) # # It also updates some diagnostics to be bit more useful, and tries # to avoid a particular "wakeup while suspending" glitch that seems # particular to one particular type of Australian mouse. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci.h # 2005/03/20 21:42:40-08:00 david-b@pacbell.net +6 -2 # USB: ohci D3 resume fix # # drivers/usb/host/ohci-hub.c # 2005/03/20 23:39:09-08:00 david-b@pacbell.net +3 -2 # USB: ohci D3 resume fix # # drivers/usb/host/ohci-hcd.c # 2005/03/20 21:54:30-08:00 david-b@pacbell.net +2 -2 # USB: ohci D3 resume fix # # drivers/usb/host/ohci-dbg.c # 2005/03/20 21:42:40-08:00 david-b@pacbell.net +6 -0 # USB: ohci D3 resume fix # # ChangeSet # 2005/03/29 22:47:47-08:00 gregkh@suse.de # USB: fix up a lot of sparse warnings and bugs in the pwc driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc/pwc-if.c # 2005/03/29 22:47:32-08:00 gregkh@suse.de +20 -19 # USB: fix up a lot of sparse warnings and bugs in the pwc driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc/pwc-dec23.c # 2005/03/29 22:47:32-08:00 gregkh@suse.de +2 -2 # USB: fix up a lot of sparse warnings and bugs in the pwc driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc/pwc-ctrl.c # 2005/03/29 22:47:32-08:00 gregkh@suse.de +2 -2 # USB: fix up a lot of sparse warnings and bugs in the pwc driver. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2005/03/29 21:42:28-08:00 abbotti@mev.co.uk # [PATCH] ftdi_sio: fix sysfs attribute permissions # # This patch changes the permissions of the 'event_char' and # 'latency_timer' sysfs attributes for devices supported by the ftdi_sio # driver. They should only be set by root. # # Signed-off-by: Ian Abbott # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/ftdi_sio.c # 2005/03/29 03:34:38-08:00 abbotti@mev.co.uk +2 -2 # ftdi_sio: fix sysfs attribute permissions # # ChangeSet # 2005/03/29 21:42:13-08:00 abbotti@mev.co.uk # [PATCH] ftdi_sio: Support sysfs attributes for more chip # # A couple of sysfs attributes were added for the FT232BM (and FT245BM) # chip type in 2.6.11. This patch extends there use to the FT8U232AM (and # FT8U245AM) and FT2232C chip types, where applicable. # # Signed-off-by: Ian Abbott # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/ftdi_sio.c # 2005/03/29 03:00:37-08:00 abbotti@mev.co.uk +16 -5 # ftdi_sio: Support sysfs attributes for more chip # # ChangeSet # 2005/03/29 21:41:57-08:00 abbotti@mev.co.uk # [PATCH] ftdi_sio: add array to map chip type to a string # # This patch just adds an array to map the chip type to a string for use # in debug messages for the ftdi_sio driver. I use it in the # get_ftdi_divisor function and another patch. # # Signed-off-by: Ian Abbott # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/ftdi_sio.c # 2005/03/29 02:42:14-08:00 abbotti@mev.co.uk +9 -9 # ftdi_sio: add array to map chip type to a string # # ChangeSet # 2005/03/29 21:26:30-08:00 g.toth@e-biz.lu # [PATCH] USB: rewrite the usblcd driver # # The contribution was created in whole or in part by me and I have the right to # submit it under the open source license indicated in the file. # # Signed-off-by: Georges Toth # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/usblcd.c # 2005/03/29 21:24:22-08:00 g.toth@e-biz.lu +281 -253 # USB: rewrite the usblcd driver # # ChangeSet # 2005/03/29 21:16:08-08:00 gregkh@suse.de # [PATCH] USB: Put the Kconfig and Makefile back in proper order for the serial drivers # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/Makefile # 2005/03/29 21:15:07-08:00 gregkh@suse.de +1 -1 # USB: Put the Kconfig and Makefile back in proper order for the serial drivers # # drivers/usb/serial/Kconfig # 2005/03/29 21:15:07-08:00 gregkh@suse.de +10 -9 # USB: Put the Kconfig and Makefile back in proper order for the serial drivers # # ChangeSet # 2005/03/29 21:15:53-08:00 gregkh@suse.de # [PATCH] USB: mark functions static in the cp2101 driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/cp2101.c # 2005/03/29 21:15:02-08:00 gregkh@suse.de +11 -13 # USB: mark functions static in the cp2101 driver. # # ChangeSet # 2005/03/29 21:15:36-08:00 craig@microtron.org.uk # [PATCH] USB: add driver for CP2101/CP2102 RS232 adaptors # # This patch against 2.6.10 provides the driver for the CP2101 and CP2102 # USB to RS232 adaptor chips which are found in some serial converter # cables and usb mobile phone cables. # # It provides cp2101.c, and patches Kconfig and Makefile in # drivers/usb/serial Since there is no technical data sheet freely # available for these chips, much of the code in this driver has been # based on protocol analysis, assumptions and guesswork. # # The cp210x family of devices have OEM programmable device IDs so updates # will be required as and when new devices are found. # # The driver currently only supports configuration of baud rate, data # bits, stop bits and parity mode. While this is enough to enable the use # of a wide range of devices based on this chip, the driver is still # incomplete in many areas such as flow control. Unfortunately without # technical datasheets, implementing these features is made very difficult # indeed. # # Signed-off-by: Craig Shelley craig@microtron.org.uk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/Makefile # 2005/03/17 17:20:14-08:00 craig@microtron.org.uk +1 -0 # USB: add driver for CP2101/CP2102 RS232 adaptors # # drivers/usb/serial/Kconfig # 2005/03/19 17:12:07-08:00 craig@microtron.org.uk +9 -0 # USB: add driver for CP2101/CP2102 RS232 adaptors # # drivers/usb/serial/cp2101.c # 2005/03/24 03:26:43-08:00 craig@microtron.org.uk +593 -0 # USB: add driver for CP2101/CP2102 RS232 adaptors # # drivers/usb/serial/cp2101.c # 2005/03/24 03:26:43-08:00 craig@microtron.org.uk +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/serial/cp2101.c # # ChangeSet # 2005/03/29 17:20:00-06:00 michaelc@cs.wisc.edu # [PATCH] fix fc class work queue usage # # According to this article http://lwn.net/Articles/125930/, "When # cancel_delayed_work() returns zero, it means that the delayed # work request was fired off before the call; it might, in fact, # be running on another CPU when the cancel attempt is made". # If it is successful, it returns a nonzero value. Tracing # through cancel_delayed_work's timer usage would seem to confirm # this. The fc class today though performs a flush_scheduled_work, # when the return value is nonzero instead of zero. # # Also it appears the fc class will use flush_scheduled_work to # flush the work from the shost_work_q when it should be using # flush_workqueue(shost->work_q) (flush_scheduled_work() only # flushes the default, keventd_wq, work queue). # # The attached patch adds a scsi_flush_work function for # scsi_transport_fc to use and it fixes the cancel_delayed_work() # test to detect when to flush the work queues correctly (it # also only calls cancel_delayed_work when the work is queued # as delayed (scan_work is not delayed). # # Signed-off-by: Mike Chrisite # Signed-off-by: James Bottomley # # include/scsi/scsi_host.h # 2005/03/25 23:25:06-06:00 michaelc@cs.wisc.edu +1 -0 # fix fc class work queue usage # # drivers/scsi/scsi_transport_fc.c # 2005/03/25 23:53:36-06:00 michaelc@cs.wisc.edu +5 -3 # fix fc class work queue usage # # drivers/scsi/hosts.c # 2005/03/25 23:40:32-06:00 michaelc@cs.wisc.edu +17 -0 # fix fc class work queue usage # # ChangeSet # 2005/03/29 15:48:28-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/Kconfig # 2005/03/29 15:48:24-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # MAINTAINERS # 2005/03/29 15:48:24-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/29 15:42:20-05:00 jgarzik@pobox.com # [libata sata_sil] Don't presume PCI cache-line-size reg is > 0 # # Some BIOSen are known to screw up the PCI cache-line-size register, # so add a paranoia check. # # drivers/scsi/sata_sil.c # 2005/03/29 15:42:13-05:00 jgarzik@pobox.com +10 -6 # [libata sata_sil] Don't presume PCI cache-line-size reg is > 0 # # Some BIOSen are known to screw up the PCI cache-line-size register, # so add a paranoia check. # # ChangeSet # 2005/03/29 11:25:49-08:00 cifs.adm@bkbits.net # Merge bk://linux.bkbits.net/linux-2.5 # into bkbits.net:/repos/c/cifs/linux-2.5cifs # # fs/cifs/connect.c # 2005/03/29 11:25:42-08:00 cifs.adm@bkbits.net +0 -0 # Auto merged # # fs/cifs/cifsfs.c # 2005/03/29 11:25:42-08:00 cifs.adm@bkbits.net +0 -0 # Auto merged # # ChangeSet # 2005/03/29 11:06:06-06:00 jejb@mulgrave.(none) # 3ware 9000 driver update # # From: adam radford # # - Add support for PAE mode. # - Add lun support. # - Fix twa_remove() to free irq handler/unregister_chrdev() before # shutting down the card. # - Change to new 'change_queue_depth' api. (From James) # - Fix 'handled=1' ISR usage, remove bogus IRQ check (from Jeff Garzik) # - Remove un-needed eh_abort handler. # - Add support for embedded firmware error strings. # # Signed-off-by: Adam Radford # Signed-off-by: James Bottomley # # drivers/scsi/3w-9xxx.h # 2005/03/29 11:03:43-06:00 jejb@mulgrave.(none) +33 -55 # 3ware 9000 driver update # # drivers/scsi/3w-9xxx.c # 2005/03/29 11:03:43-06:00 jejb@mulgrave.(none) +264 -252 # 3ware 9000 driver update # # ChangeSet # 2005/03/29 10:55:43-06:00 rddunlap@osdl.org # [PATCH] scsi_sysfs: use NULL instead of 0 # # drivers/scsi/scsi_sysfs.c:814:66: warning: Using plain integer as NULL pointer # # Signed-off-by: Randy Dunlap # Signed-off-by: James Bottomley # # drivers/scsi/scsi_sysfs.c # 2005/03/27 23:03:53-06:00 rddunlap@osdl.org +1 -1 # scsi_sysfs: use NULL instead of 0 # # ChangeSet # 2005/03/29 10:49:22-06:00 michaelc@cs.wisc.edu # [PATCH] rm unused scan delay var # # Is FC_SCSI_SCAN_DELAY used by a FC driver that is # not yet in mainline? This patch just deletes it # if not since no one else is. # # Signed-off-by: Mike Chrisite # Signed-off-by: James Bottomley # # include/scsi/scsi_transport_fc.h # 2005/03/26 00:01:49-06:00 michaelc@cs.wisc.edu +0 -3 # rm unused scan delay var # # ChangeSet # 2005/03/29 07:43:57-08:00 christophe@saout.de # [PATCH] x86-64: Fix preemption off of irq context with PREEMPT_BKL # # Fixing the interrupt tst for CONFIG_PREEMPT on x86-64 exposes another # bug with CONFIG_PREEMPT_BKL. Calling schedule due to preemption # releases the BKL which it shouldn't do. # # Call preempt_schedule_irq instead (like for i386). This fixes the # easily reproducible filesystem errors I've seen (with reiserfs, which # heavily relies on the BKL). # # Signed-off-by: Christophe Saout # Signed-off-by: Andi Kleen # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/entry.S # 2005/03/26 14:40:30-08:00 christophe@saout.de +1 -6 # x86-64: Fix preemption off of irq context with PREEMPT_BKL # # ChangeSet # 2005/03/28 21:24:58-08:00 torvalds@ppc970.osdl.org # Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/asm-arm/tlb.h # 2005/03/28 21:24:53-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/28 22:50:11-06:00 stevef@smf-t23.(none) # [CIFS] Return inode numbers (from server) more consistently on lookup and readdir to both types of servers # (whether they support Unix extensions or not) when serverino mount parm specified. # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/readdir.c # 2005/03/28 22:49:53-06:00 stevef@smf-t23.(none) +6 -4 # Return inode numbers consistently for Samba server (either from server or generated on client) depending on value of serverino mount parm. # # fs/cifs/inode.c # 2005/03/28 22:49:53-06:00 stevef@smf-t23.(none) +25 -10 # Return inode numbers (from server) on lookup to Windows servers, not just Samba servers, when serverino mount parm specified # # fs/cifs/cifssmb.c # 2005/03/28 22:49:53-06:00 stevef@smf-t23.(none) +69 -6 # Return inode numbers (from server) on lookup to Windows servers, not just Samba servers, when serverino mount parm specified # # fs/cifs/CHANGES # 2005/03/28 22:49:53-06:00 stevef@smf-t23.(none) +7 -1 # Update change log for cifs # # ChangeSet # 2005/03/28 20:43:20-08:00 torvalds@evo.osdl.org # Merge whitespace and __nocast changes # # mm/slab.c # 2005/03/28 20:43:10-08:00 torvalds@evo.osdl.org +5 -10 # Merge whitespace and __nocast changes # # mm/mempolicy.c # 2005/03/28 20:39:25-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # mm/filemap.c # 2005/03/28 20:39:25-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # kernel/signal.c # 2005/03/28 20:39:24-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # include/linux/jbd.h # 2005/03/28 20:39:24-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # fs/mpage.c # 2005/03/28 20:39:24-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # drivers/s390/scsi/zfcp_aux.c # 2005/03/28 20:39:24-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # drivers/block/pktcdvd.c # 2005/03/28 20:39:24-08:00 torvalds@evo.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/28 20:24:26-08:00 sct@redhat.com # [PATCH] ext3: fix journal_unmap_buffer race # # There is a race condition in jbd between journal_unmap_buffer() and # journal_commit_transaction(). This is leading to corruption of buffers on the # transaction's t_locked_list, leading to a variety of symptoms usually # involving an oops in kjournald. # # The problem is that various special-case exit paths in journal_unmap_buffer() # call journal_put_journal_head without any locking. This is racing against a # refiling of the same journal_head in journal_commit_transaction(): # # __journal_unfile_buffer(jh); # __journal_file_buffer(jh, commit_transaction, # BJ_Locked); # # The way these functions work, this leaves the jh temporarily with # b_transaction==NULL; and if journal_unmap_buffer()'s call to # journal_put_journal_head() hits this window, it sees the NULL transaction and # frees the journal_head which is just about to get refiled on the locked list. # # The main exit path on journal_unmap_buffer() performs its # journal_put_journal_head() before dropping the j_list_lock, so is not # vulnerable to this race. The fix is to move the other similar calls on # special-case exit branches in that function so that they also release the # journal_head before dropping that lock. # # This is low-risk since the new order has already been tested as the normal # exit path from this function. The change has had extensive testing and has # been shown to fix the problem with no regressions found. # # Signed-off-by: Peter Keilty # Signed-off-by: Nicholas Dokos # Signed-off-by: Stephen Tweedie # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/jbd/transaction.c # 2005/03/28 14:21:54-08:00 sct@redhat.com +3 -3 # ext3: fix journal_unmap_buffer race # # ChangeSet # 2005/03/28 20:24:10-08:00 pbadari@us.ibm.com # [PATCH] ext3 writeback "nobh" option # # Add a `nobh' mount option to ext3 in writeback mode: avoid attaching # buffer_head to data pages, like ext2. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/ext3_fs.h # 2005/03/28 14:21:54-08:00 pbadari@us.ibm.com +1 -0 # ext3 writeback "nobh" option # # fs/ext3/super.c # 2005/03/28 14:21:54-08:00 pbadari@us.ibm.com +18 -1 # ext3 writeback "nobh" option # # fs/ext3/inode.c # 2005/03/28 14:21:54-08:00 pbadari@us.ibm.com +33 -4 # ext3 writeback "nobh" option # # ChangeSet # 2005/03/28 20:23:53-08:00 pbadari@us.ibm.com # [PATCH] ext3 writepages support for writeback mode # # Add writepages support for ext3 writeback mode. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mpage.h # 2005/03/28 14:21:54-08:00 pbadari@us.ibm.com +3 -0 # ext3 writepages support for writeback mode # # fs/mpage.c # 2005/03/28 14:21:54-08:00 pbadari@us.ibm.com +11 -1 # ext3 writepages support for writeback mode # # fs/ext3/inode.c # 2005/03/28 14:42:25-08:00 pbadari@us.ibm.com +46 -0 # ext3 writepages support for writeback mode # # ChangeSet # 2005/03/28 20:23:36-08:00 sct@redhat.com # [PATCH] ext3/jbd race: releasing in-use journal_heads # # Fix destruction of in-use journal_head # # journal_put_journal_head() can destroy a journal_head at any time as # long as the jh's b_jcount is zero and b_transaction is NULL. It has no # locking protection against the rest of the journaling code, as the lock # it uses to protect b_jcount and bh->b_private is not used elsewhere in # jbd. # # However, there are small windows where b_transaction is getting set # temporarily to NULL during normal operations; typically this is # happening in # # __journal_unfile_buffer(jh); # __journal_file_buffer(jh, ...); # # call pairs, as __journal_unfile_buffer() will set b_transaction to NULL # and __journal_file_buffer() re-sets it afterwards. A truncate running # in parallel can lead to journal_unmap_buffer() destroying the jh if it # occurs between these two calls. # # Fix this by adding a variant of __journal_unfile_buffer() which is only # used for these temporary jh unlinks, and which leaves the b_transaction # field intact so that we never leave a window open where b_transaction is # NULL. # # Additionally, trap this error if it does occur, by checking against # jh->b_jlist being non-null when we destroy a jh. # # Signed-off-by: Stephen Tweedie # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/jbd.h # 2005/03/28 14:21:54-08:00 sct@redhat.com +1 -0 # ext3/jbd race: releasing in-use journal_heads # # fs/jbd/transaction.c # 2005/03/28 14:42:25-08:00 sct@redhat.com +19 -8 # ext3/jbd race: releasing in-use journal_heads # # fs/jbd/journal.c # 2005/03/28 14:21:54-08:00 sct@redhat.com +1 -0 # ext3/jbd race: releasing in-use journal_heads # # fs/jbd/commit.c # 2005/03/28 14:21:54-08:00 sct@redhat.com +1 -1 # ext3/jbd race: releasing in-use journal_heads # # ChangeSet # 2005/03/28 20:23:19-08:00 js@linuxtv.org # [PATCH] dvb: mt352: cleanups # # o remove s* from state, they are only used in read_status # o remove casting of void* # o remove FIXME in set_parameters, should be handled by dvb-core state machine # o remove some unnecessary braces # o remove #if 1 in read_status, and add note from Zarlink design manual # o change read_signal_strength to read total AGC_GAIN in case # some adapter turns on the RF_AGC loop. # (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/mt352.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +39 -66 # dvb: mt352: cleanups # # ChangeSet # 2005/03/28 20:23:03-08:00 js@linuxtv.org # [PATCH] dvb: gcc 2.95 compile fixes # # Patch by Olaf Titz: gcc 2.95 compile fixes # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/budget-av.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +1 -1 # dvb: gcc 2.95 compile fixes # # drivers/media/dvb/ttpci/av7110_ir.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +2 -2 # dvb: gcc 2.95 compile fixes # # drivers/media/dvb/dibusb/dvb-fe-dtt200u.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +6 -1 # dvb: gcc 2.95 compile fixes # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +1 -1 # dvb: gcc 2.95 compile fixes # # ChangeSet # 2005/03/28 20:22:46-08:00 js@linuxtv.org # [PATCH] dvb: ttusb_dec: cleanup # # Cleanup patch from Peter Beutner: # # o unregister the input device on disconnect # and move cleanup stuff of the RC to own function # o keymap should be static not const # o set up keymap correctly and completly for input device # plus a more cosmetic one: # o usb endpoints are only 4bit numbers[0...15], the 8th bit # only specifies the direction and is set by the snd/rcvxxxpipe() macro # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-dec/ttusb_dec.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +29 -20 # dvb: ttusb_dec: cleanup # # ChangeSet # 2005/03/28 20:22:30-08:00 js@linuxtv.org # [PATCH] dvb: support Nova-S rev 2.2 # # Support for Nova-S rev 2.2 (Gregor Kroesen) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +94 -13 # dvb: support Nova-S rev 2.2 # # ChangeSet # 2005/03/28 20:22:13-08:00 js@linuxtv.org # [PATCH] dvb: sparse warnings on one-bit bitfields # # Remove some sparse warnings on one-bit bitfields. # # Signed-off-by: Peter Hagervall # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dvb-core/dvb_ca_en50221.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +3 -3 # dvb: sparse warnings on one-bit bitfields # # ChangeSet # 2005/03/28 20:21:57-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # o added native support for the dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # o URBs are now submitted, when the actual transfer began, not right from the # device plugin (solves a lot of problems) # o minor fixes in the dib3000-frontends # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/dib3000mc.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +1 -0 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/frontends/dib3000mb.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +1 -0 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-fe-dtt200u.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +258 -0 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2005/03/28 14:21:53-08:00 js@linuxtv.org +8 -1 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-dibusb-usb.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +55 -15 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +5 -22 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-dibusb-dvb.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +3 -2 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +17 -9 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/Makefile # 2005/03/28 14:21:53-08:00 js@linuxtv.org +2 -1 # dvb: dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device # # drivers/media/dvb/dibusb/dvb-fe-dtt200u.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/media/dvb/dibusb/dvb-fe-dtt200u.c # # ChangeSet # 2005/03/28 20:21:40-08:00 js@linuxtv.org # [PATCH] dvb: convert from pci_module_init to pci_register_driver # # From: http://kerneljanitors.org/TODO # o convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Domen Puncer # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/bt8xx/bt878.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +1 -1 # dvb: convert from pci_module_init to pci_register_driver # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/28 14:21:53-08:00 js@linuxtv.org +1 -1 # dvb: convert from pci_module_init to pci_register_driver # # ChangeSet # 2005/03/28 20:21:23-08:00 js@linuxtv.org # [PATCH] dvb: vfree() checking cleanups # # vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/budget-core.c # 2005/03/28 14:21:52-08:00 js@linuxtv.org +1 -2 # dvb: vfree() checking cleanups # # drivers/media/dvb/dvb-core/dvb_ca_en50221.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +1 -2 # dvb: vfree() checking cleanups # # drivers/media/dvb/dvb-core/dmxdev.c # 2005/03/28 14:21:52-08:00 js@linuxtv.org +5 -11 # dvb: vfree() checking cleanups # # ChangeSet # 2005/03/28 20:21:06-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: HanfTek UMT-010 fixes # # HanfTek UMT-010: adapted the pll-programming, the usb-ids and the firmware name # to the new firmware (thanks to Sunny Liu from HanfTek) # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb-usb.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -3 # dvb: dibusb: HanfTek UMT-010 fixes # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +23 -26 # dvb: dibusb: HanfTek UMT-010 fixes # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +4 -4 # dvb: dibusb: HanfTek UMT-010 fixes # # ChangeSet # 2005/03/28 20:20:50-08:00 js@linuxtv.org # [PATCH] dvb: support for Technotrend PCI DVB-T # # patch by Anssi Hannula: add support for Technotrend PCI DVB-T # (0x13c2,0x0008, Grundig 29504-401 (LSI L64781 Based) frontend) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/av7110.h # 2005/03/28 14:21:52-08:00 js@linuxtv.org +1 -0 # dvb: support for Technotrend PCI DVB-T # # drivers/media/dvb/ttpci/av7110.c # 2005/03/28 14:21:52-08:00 js@linuxtv.org +46 -1 # dvb: support for Technotrend PCI DVB-T # # drivers/media/dvb/ttpci/Kconfig # 2005/03/28 14:21:52-08:00 js@linuxtv.org +1 -0 # dvb: support for Technotrend PCI DVB-T # # ChangeSet # 2005/03/28 20:20:33-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: remove useless ifdef # # removed useless ifdef: dvb_register_adapter always takes 3 parameters in this tree # (Andreas Oberritter) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb-dvb.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -5 # dvb: dibusb: remove useless ifdef # # ChangeSet # 2005/03/28 20:20:17-08:00 js@linuxtv.org # [PATCH] dvb: clear up confusion between ids and adapters # # clear up confusion between ids and adapters (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dvb-core/dvbdev.c # 2005/03/28 14:21:52-08:00 js@linuxtv.org +5 -4 # dvb: clear up confusion between ids and adapters # # ChangeSet # 2005/03/28 20:19:59-08:00 js@linuxtv.org # [PATCH] dvb: frontends: kfree() cleanup # # kfree(NULL) is safe (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-dec/ttusbdecfe.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +2 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/ves1x93.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/ves1820.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/tda80xx.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/tda8083.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/tda1004x.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/tda10021.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/stv0299.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/stv0297.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/sp887x.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/sp8870.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/or51211.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/nxt6000.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/nxt2002.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/mt352.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/mt312.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/l64781.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/dvb_dummy_fe.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/dib3000mc.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/dib3000mb.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/cx24110.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/cx22702.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/cx22700.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/frontends/at76c651.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/dvb-core/dvbdev.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +1 -3 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/dvb-core/dvb_frontend.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/dvb-core/dvb_ca_en50221.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -2 # dvb: frontends: kfree() cleanup # # drivers/media/dvb/bt8xx/dst.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +1 -1 # dvb: frontends: kfree() cleanup # # ChangeSet # 2005/03/28 20:19:42-08:00 js@linuxtv.org # [PATCH] dvb: fix CAMs on Typhoon DVB-S # # Fix for CAMs on Typhoon DVB-S, where it would constantly reset itself. # (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/budget-av.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +12 -1 # dvb: fix CAMs on Typhoon DVB-S # # drivers/media/dvb/dvb-core/dvb_ca_en50221.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +1 -1 # dvb: fix CAMs on Typhoon DVB-S # # ChangeSet # 2005/03/28 20:19:26-08:00 js@linuxtv.org # [PATCH] dvb: saa7146: remove duplicate setgpio # # Remove duplicate setgpio (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/common/saa7146_core.c # 2005/03/28 14:21:51-08:00 js@linuxtv.org +5 -24 # dvb: saa7146: remove duplicate setgpio # # ChangeSet # 2005/03/28 20:19:10-08:00 js@linuxtv.org # [PATCH] dvb: tda10021: fix continuity errors # # Fix Continuity Errors with tda10021 (slickhenry, Robert Schlabbach) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/tda10021.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +1 -1 # dvb: tda10021: fix continuity errors # # ChangeSet # 2005/03/28 20:18:53-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: pll fix # # o fixed pll frequency calculation for channels > 700 MHz. (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +7 -7 # dvb: dibusb: pll fix # # ChangeSet # 2005/03/28 20:18:36-08:00 js@linuxtv.org # [PATCH] dvb: ttusb_dec: IR support # # Add IR support added by Peter Beutner # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-dec/ttusb_dec.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +150 -3 # dvb: ttusb_dec: IR support # # ChangeSet # 2005/03/28 20:18:20-08:00 js@linuxtv.org # [PATCH] dvb: OREN or51211, or51132_qam and or51132_vsb firmware download info # # o add OREN or51211, or51132_qam and or51132_vsb firmware # o correct some links # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/dvb/readme.txt # 2005/03/28 14:21:50-08:00 js@linuxtv.org +4 -3 # dvb: OREN or51211, or51132_qam and or51132_vsb firmware download info # # Documentation/dvb/get_dvb_firmware # 2005/03/28 14:21:50-08:00 js@linuxtv.org +45 -5 # dvb: OREN or51211, or51132_qam and or51132_vsb firmware download info # # Documentation/dvb/contributors.txt # 2005/03/28 14:21:50-08:00 js@linuxtv.org +3 -0 # dvb: OREN or51211, or51132_qam and or51132_vsb firmware download info # # ChangeSet # 2005/03/28 20:18:04-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: support nova-t usb ir # # o added native nova-t support, since only the nova-t firmware works with the # nova-t remote control # o added keys statically (maybe we should find something to sort this out... # cinergyt2 is doing the same) # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2005/03/28 14:42:27-08:00 js@linuxtv.org +11 -2 # dvb: dibusb: support nova-t usb ir # # drivers/media/dvb/dibusb/dvb-dibusb-usb.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +9 -3 # dvb: dibusb: support nova-t usb ir # # drivers/media/dvb/dibusb/dvb-dibusb-remote.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +148 -29 # dvb: dibusb: support nova-t usb ir # # drivers/media/dvb/dibusb/dvb-dibusb-firmware.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +3 -1 # dvb: dibusb: support nova-t usb ir # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +16 -3 # dvb: dibusb: support nova-t usb ir # # ChangeSet # 2005/03/28 20:17:47-08:00 js@linuxtv.org # [PATCH] dvb: support pcHDTV HD2000 # # o DVB support for the pcHDTV HD2000 card, submitted by Rusty Scott # o remove bttv dependency from frontend (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/or51211.h # 2005/03/28 14:21:50-08:00 js@linuxtv.org +44 -0 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/frontends/or51211.h # 2005/03/28 14:21:50-08:00 js@linuxtv.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/media/dvb/frontends/or51211.h # # drivers/media/dvb/frontends/or51211.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +631 -0 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/frontends/or51132.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +3 -3 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/frontends/Makefile # 2005/03/28 14:21:50-08:00 js@linuxtv.org +1 -0 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/frontends/Kconfig # 2005/03/28 14:21:50-08:00 js@linuxtv.org +7 -0 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/bt8xx/dvb-bt8xx.h # 2005/03/28 14:21:50-08:00 js@linuxtv.org +1 -0 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/bt8xx/dvb-bt8xx.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +71 -1 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/bt8xx/Kconfig # 2005/03/28 14:21:50-08:00 js@linuxtv.org +3 -1 # dvb: support pcHDTV HD2000 # # drivers/media/dvb/frontends/or51211.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/media/dvb/frontends/or51211.c # # ChangeSet # 2005/03/28 20:17:30-08:00 js@linuxtv.org # [PATCH] dvb: corrected links to firmware files # # corrected links to firmware files (reported by Stefan Frings) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/dvb/get_dvb_firmware # 2005/03/28 14:42:29-08:00 js@linuxtv.org +1 -1 # dvb: corrected links to firmware files # # Documentation/dvb/README.dibusb # 2005/03/28 14:21:50-08:00 js@linuxtv.org +13 -6 # dvb: corrected links to firmware files # # ChangeSet # 2005/03/28 20:17:14-08:00 js@linuxtv.org # [PATCH] dvb: av7110: error handling during attach # # Janitoring - error handling during attach # o av7110_arm_sync(): small helper to factor out some code; # o av7110_attach() does not check the status code returned by all the # functions is uses; # o balance the error path in av7110_attach and have it easy to check. # Please check it; # o if everything is correctly balanced, device_initialized is not needed # anymore in struct av7110; # o av7110_detach(): no need to cast a void * pointer; # o av7110_detach(): die #ifdef, die ! # o change the returned value of av7110_av_exit() as it can't fail; # o change the returned value of av7110_ca_init() as it can fail. Removed # extraneous casts while are it; # o check for failure of vmalloc() in ci_ll_init(). # o vfree(NULL) is safe. # # Signed-off-by: Francois Romieu # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/av7110_ipack.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +0 -1 # dvb: av7110: error handling during attach # # drivers/media/dvb/ttpci/av7110_ca.h # 2005/03/28 14:21:50-08:00 js@linuxtv.org +1 -1 # dvb: av7110: error handling during attach # # drivers/media/dvb/ttpci/av7110_ca.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +16 -4 # dvb: av7110: error handling during attach # # drivers/media/dvb/ttpci/av7110_av.h # 2005/03/28 14:21:50-08:00 js@linuxtv.org +1 -1 # dvb: av7110: error handling during attach # # drivers/media/dvb/ttpci/av7110_av.c # 2005/03/28 14:21:50-08:00 js@linuxtv.org +17 -8 # dvb: av7110: error handling during attach # # drivers/media/dvb/ttpci/av7110.h # 2005/03/28 14:42:27-08:00 js@linuxtv.org +0 -2 # dvb: av7110: error handling during attach # # drivers/media/dvb/ttpci/av7110.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +112 -82 # dvb: av7110: error handling during attach # # ChangeSet # 2005/03/28 20:16:57-08:00 js@linuxtv.org # [PATCH] dvb: saa7146: static initialization # # Static initialization. # # Signed-off-by: Francois Romieu # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/common/saa7146_core.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +2 -27 # dvb: saa7146: static initialization # # ChangeSet # 2005/03/28 20:16:41-08:00 js@linuxtv.org # [PATCH] dvb: av7110: fix Oops when av7110_ir_init() failed # # o don't call av7110_ir_init() if driver initialization failed already # due to previous errors (resulted in Oops in out-of-memory conditions) (me) # o don't do av7110_ir_exit if init was not done (Kenneth Aafloy) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/av7110_ir.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +8 -0 # dvb: av7110: fix Oops when av7110_ir_init() failed # # drivers/media/dvb/ttpci/av7110.c # 2005/03/28 14:42:30-08:00 js@linuxtv.org +3 -12 # dvb: av7110: fix Oops when av7110_ir_init() failed # # ChangeSet # 2005/03/28 20:16:24-08:00 js@linuxtv.org # [PATCH] dvb: ttusb-budget: s/usb_unlink_urb/usb_kill_urb/ # # patch by Colin Western: s/usb_unlink_urb/usb_kill_urb/ # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c # 2005/03/28 14:42:26-08:00 js@linuxtv.org +1 -1 # dvb: ttusb-budget: s/usb_unlink_urb/usb_kill_urb/ # # ChangeSet # 2005/03/28 20:16:07-08:00 js@linuxtv.org # [PATCH] dvb: nxt2002: fix max frequency # # Patch by Taylor Jacob and Tom Dombrosky: There was a typo in the BBTI/B2C2 # specs that stated the upper frequency of the air2pc/nxt2002 was 806Mhz, not # 860Mhz. # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/nxt2002.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +1 -1 # dvb: nxt2002: fix max frequency # # ChangeSet # 2005/03/28 20:15:50-08:00 js@linuxtv.org # [PATCH] dvb: refactor sw pid filter to drop redundant code # # o added index field to struct dvb_demux_feed for having a unique feed id, which # can be used for hardware pid filter tables # o dibusb: adding the index to struct dvb_demux_feed makes dibusb-pid-filtering redundant # o ttusb-budget: struct channel removed in favour of dvbdmxfeed->index # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +14 -72 # dvb: refactor sw pid filter to drop redundant code # # drivers/media/dvb/dvb-core/dvb_demux.h # 2005/03/28 14:21:49-08:00 js@linuxtv.org +1 -0 # dvb: refactor sw pid filter to drop redundant code # # drivers/media/dvb/dvb-core/dvb_demux.c # 2005/03/28 14:21:49-08:00 js@linuxtv.org +3 -1 # dvb: refactor sw pid filter to drop redundant code # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2005/03/28 14:42:29-08:00 js@linuxtv.org +0 -10 # dvb: refactor sw pid filter to drop redundant code # # drivers/media/dvb/dibusb/dvb-dibusb-dvb.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +5 -19 # dvb: refactor sw pid filter to drop redundant code # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:29-08:00 js@linuxtv.org +0 -2 # dvb: refactor sw pid filter to drop redundant code # # drivers/media/dvb/dibusb/Makefile # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -2 # dvb: refactor sw pid filter to drop redundant code # # BitKeeper/deleted/.del-dvb-dibusb-pid.c~122c8eb16cb78a54 # 2005/03/28 20:15:39-08:00 js@linuxtv.org +0 -0 # Delete: drivers/media/dvb/dibusb/dvb-dibusb-pid.c # # ChangeSet # 2005/03/28 20:15:33-08:00 js@linuxtv.org # [PATCH] dvb: cleanups, make stuff static # # This patch contains the following possible cleanups: # o make needlessly global code static # o remove the following EXPORT_SYMBOL'ed but unused function: # - bt8xx/bt878.c: bt878_find_by_i2c_adap # o remove the following unused global functions: # - dvb-core/dvb_demux.c: dmx_get_demuxes # - dvb-core/dvb_demux.c: dvb_set_crc32 # o remove the following unneeded EXPORT_SYMBOL's: # - dvb-core/dvb_demux.c: dvb_dmx_swfilter_packet # - dvb-core/dvb_demux.c: dvbdmx_connect_frontend # - dvb-core/dvb_demux.c: dvbdmx_disconnect_frontend # - dvb-core/dvbdev.c: dvb_class # # Signed-off-by: Adrian Bunk # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/budget-patch.c # 2005/03/28 14:21:49-08:00 js@linuxtv.org +1 -1 # dvb: cleanups, make stuff static # # drivers/media/dvb/ttpci/budget-av.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +2 -2 # dvb: cleanups, make stuff static # # drivers/media/dvb/frontends/tda10021.c # 2005/03/28 14:42:29-08:00 js@linuxtv.org +1 -1 # dvb: cleanups, make stuff static # # drivers/media/dvb/dvb-core/dvb_net.c # 2005/03/28 14:21:49-08:00 js@linuxtv.org +2 -2 # dvb: cleanups, make stuff static # # drivers/media/dvb/dvb-core/dvb_demux.h # 2005/03/28 14:42:31-08:00 js@linuxtv.org +0 -4 # dvb: cleanups, make stuff static # # drivers/media/dvb/dvb-core/dvb_demux.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +6 -30 # dvb: cleanups, make stuff static # # drivers/media/dvb/dvb-core/demux.h # 2005/03/28 14:21:49-08:00 js@linuxtv.org +0 -4 # dvb: cleanups, make stuff static # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2005/03/28 14:42:31-08:00 js@linuxtv.org +0 -2 # dvb: cleanups, make stuff static # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/28 14:42:29-08:00 js@linuxtv.org +1 -1 # dvb: cleanups, make stuff static # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +1 -1 # dvb: cleanups, make stuff static # # drivers/media/dvb/bt8xx/dst_priv.h # 2005/03/28 14:21:49-08:00 js@linuxtv.org +0 -1 # dvb: cleanups, make stuff static # # drivers/media/dvb/bt8xx/bt878.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +0 -15 # dvb: cleanups, make stuff static # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/28 14:42:27-08:00 js@linuxtv.org +1 -1 # dvb: cleanups, make stuff static # # drivers/media/dvb/b2c2/b2c2-common.c # 2005/03/28 14:21:49-08:00 js@linuxtv.org +1 -1 # dvb: cleanups, make stuff static # # ChangeSet # 2005/03/28 20:15:16-08:00 js@linuxtv.org # [PATCH] dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # o added support for KWorld/ADSTech Instant DVB-T USB2.0 (DiB3000M-B) # o added deactivation option of the pid parser for the DiB3000M-B (since there # are USB2.0 devices and which now have the ability to deliver the complete # Transport Stream) # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/dib3000mc.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +0 -2 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # drivers/media/dvb/frontends/dib3000mb.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +3 -2 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2005/03/28 14:42:31-08:00 js@linuxtv.org +1 -0 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # drivers/media/dvb/dibusb/dvb-dibusb-usb.c # 2005/03/28 14:42:29-08:00 js@linuxtv.org +3 -1 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +64 -14 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # drivers/media/dvb/dibusb/Kconfig # 2005/03/28 14:21:49-08:00 js@linuxtv.org +2 -1 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # Documentation/dvb/README.dibusb # 2005/03/28 14:42:30-08:00 js@linuxtv.org +10 -4 # dvb: support KWorld/ADSTech Instant DVB-T USB2.0 # # ChangeSet # 2005/03/28 20:14:58-08:00 js@linuxtv.org # [PATCH] dvb: skystar2: fix MAC address reading # # fixed MAC address reading (eeprom address to read, was not correctly set, # respectively overwritten) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +2 -2 # dvb: skystar2: fix MAC address reading # # ChangeSet # 2005/03/28 20:14:42-08:00 js@linuxtv.org # [PATCH] dvb: l64781: email address fix # # fix marko kohtala's mail address # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/l64781.h # 2005/03/28 14:21:48-08:00 js@linuxtv.org +2 -3 # dvb: l64781: email address fix # # drivers/media/dvb/frontends/l64781.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +2 -3 # dvb: l64781: email address fix # # ChangeSet # 2005/03/28 20:14:26-08:00 js@linuxtv.org # [PATCH] dvb: ttusb_dec: use alternative interface to save bandwidth # # Use alternative interface. Asks for less bandwidth and therefore works with # OHCI as well as UHCI (Alex Woods) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttusb-dec/ttusb_dec.c # 2005/03/28 14:42:29-08:00 js@linuxtv.org +2 -2 # dvb: ttusb_dec: use alternative interface to save bandwidth # # ChangeSet # 2005/03/28 20:14:09-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: increased the number of urbs for usb1.1 devices # # increased the number of urbs for usb1.1 devices (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +2 -3 # dvb: dibusb: increased the number of urbs for usb1.1 devices # # ChangeSet # 2005/03/28 20:13:53-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: debug changes # # o use own err,info,warn defines, driver description # o remove warning about firmware bug # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb.h # 2005/03/28 14:42:32-08:00 js@linuxtv.org +7 -4 # dvb: dibusb: debug changes # # drivers/media/dvb/dibusb/dvb-dibusb-usb.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +0 -6 # dvb: dibusb: debug changes # # drivers/media/dvb/dibusb/dvb-dibusb-pid.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +2 -2 # dvb: dibusb: debug changes # # drivers/media/dvb/dibusb/dvb-dibusb-dvb.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +5 -8 # dvb: dibusb: debug changes # # ChangeSet # 2005/03/28 20:13:37-08:00 js@linuxtv.org # [PATCH] dvb: dib3000: corrected device naming # # corrected device naming (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/dib3000mc_priv.h # 2005/03/28 14:21:48-08:00 js@linuxtv.org +1 -1 # dvb: dib3000: corrected device naming # # drivers/media/dvb/frontends/dib3000mc.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +5 -5 # dvb: dib3000: corrected device naming # # drivers/media/dvb/frontends/dib3000mb.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +3 -3 # dvb: dib3000: corrected device naming # # drivers/media/dvb/frontends/dib3000.h # 2005/03/28 14:21:48-08:00 js@linuxtv.org +1 -1 # dvb: dib3000: corrected device naming # # drivers/media/dvb/frontends/dib3000-common.h # 2005/03/28 14:21:48-08:00 js@linuxtv.org +4 -4 # dvb: dib3000: corrected device naming # # drivers/media/dvb/frontends/dib3000-common.c # 2005/03/28 14:21:48-08:00 js@linuxtv.org +1 -1 # dvb: dib3000: corrected device naming # # drivers/media/dvb/frontends/Kconfig # 2005/03/28 14:42:30-08:00 js@linuxtv.org +2 -2 # dvb: dib3000: corrected device naming # # ChangeSet # 2005/03/28 20:13:20-08:00 js@linuxtv.org # [PATCH] dvb: get_dvb_firmware: new unshield version # # patch by Mattias Holmlund: support new version of unshield for # sp887x firmware extraction (changed cmdline parameters) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/dvb/get_dvb_firmware # 2005/03/28 14:42:30-08:00 js@linuxtv.org +3 -3 # dvb: get_dvb_firmware: new unshield version # # ChangeSet # 2005/03/28 20:13:04-08:00 js@linuxtv.org # [PATCH] dvb: nxt2002: QAM64/256 support # # patch by Taylor Jacob: Add QAM64/256 Support # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/nxt2002.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +41 -2 # dvb: nxt2002: QAM64/256 support # # drivers/media/dvb/frontends/Kconfig # 2005/03/28 14:42:33-08:00 js@linuxtv.org +1 -0 # dvb: nxt2002: QAM64/256 support # # ChangeSet # 2005/03/28 20:12:46-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: support Hauppauge WinTV NOVA-T USB2 # # o added support for Hauppauge WinTV NOVA-T USB2 (clone of MOD3000P by DiBcom) # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb-core.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +19 -9 # dvb: dibusb: support Hauppauge WinTV NOVA-T USB2 # # Documentation/dvb/README.dibusb # 2005/03/28 14:42:32-08:00 js@linuxtv.org +6 -2 # dvb: dibusb: support Hauppauge WinTV NOVA-T USB2 # # ChangeSet # 2005/03/28 20:12:29-08:00 js@linuxtv.org # [PATCH] dvb: dibusb readme update # # dibusb readme update (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/dvb/README.dibusb # 2005/03/28 14:42:33-08:00 js@linuxtv.org +25 -32 # dvb: dibusb readme update # # ChangeSet # 2005/03/28 20:12:13-08:00 js@linuxtv.org # [PATCH] dvb: ves1x93: invert_pwm fix # # fix unhandled invert_pwm option (needed on dbox2 hardware) # submitted by Carsten Juttner # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/ves1x93.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +9 -3 # dvb: ves1x93: invert_pwm fix # # ChangeSet # 2005/03/28 20:11:56-08:00 js@linuxtv.org # [PATCH] dvb: skystar2: update email address # # Updated email address. # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +5 -5 # dvb: skystar2: update email address # # ChangeSet # 2005/03/28 20:11:40-08:00 js@linuxtv.org # [PATCH] dvb: support Activy Budget card # # support Activy Budget with ALPS BSRU6 tuner # submitted by Andreas 'randy' Weinberger. # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/budget.c # 2005/03/28 14:21:46-08:00 js@linuxtv.org +12 -4 # dvb: support Activy Budget card # # ChangeSet # 2005/03/28 20:11:24-08:00 js@linuxtv.org # [PATCH] dvb: mt352: Pinnacle 300i comments # # Comment preliminary Pinnacle 300i changes to the mt352 driver. # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/mt352.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +4 -0 # dvb: mt352: Pinnacle 300i comments # # ChangeSet # 2005/03/28 20:11:08-08:00 js@linuxtv.org # [PATCH] dvb: skystar2: remove duplicate pci_release_region() # # remove duplicated pci_release_region() etc. # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/28 14:42:34-08:00 js@linuxtv.org +0 -4 # dvb: skystar2: remove duplicate pci_release_region() # # ChangeSet # 2005/03/28 20:10:51-08:00 js@linuxtv.org # [PATCH] dvb: dibusb: misc. fixes # # o worked around hw_sleep handling for usb1.1 devices # o fixed oops when no frontend was attached (because of usb1.1 timeouts in my # debugging sessions) # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/dibusb/dvb-dibusb-usb.c # 2005/03/28 14:42:32-08:00 js@linuxtv.org +35 -35 # dvb: dibusb: misc. fixes # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/28 14:42:31-08:00 js@linuxtv.org +4 -0 # dvb: dibusb: misc. fixes # # ChangeSet # 2005/03/28 20:10:35-08:00 js@linuxtv.org # [PATCH] dvb: dibcom: frontend fixes # # o corrected the name in driver_desc # o removed debug messages and some comments (see dib3000-watch) # (Patrick Boettcher) # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/dib3000mc.c # 2005/03/28 14:42:33-08:00 js@linuxtv.org +1 -1 # dvb: dibcom: frontend fixes # # drivers/media/dvb/frontends/dib3000mb.c # 2005/03/28 14:42:33-08:00 js@linuxtv.org +8 -60 # dvb: dibcom: frontend fixes # # ChangeSet # 2005/03/28 20:10:18-08:00 js@linuxtv.org # [PATCH] dvb: clarify firmware upload messages # # clarify firmware upload messages # # Signed-off-by: Johannes Stezenbach # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/tda1004x.c # 2005/03/28 14:42:28-08:00 js@linuxtv.org +4 -2 # dvb: clarify firmware upload messages # # drivers/media/dvb/frontends/nxt2002.c # 2005/03/28 14:42:33-08:00 js@linuxtv.org +2 -1 # dvb: clarify firmware upload messages # # ChangeSet # 2005/03/28 20:10:02-08:00 zippel@linux-m68k.org # [PATCH] hfs: unicode decompose support # # HFS+ specificies that a number of unicode characters must be stored in its # decomposed form on disk. This adds the support for the composition and # decomposition of such HFS+ file names. There is also an option to turn it off # again, in case one managed to create invalid names, which otherwise become # inaccessible. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/unicode.c # 2005/03/28 14:21:46-08:00 zippel@linux-m68k.org +162 -20 # hfs: unicode decompose support # # fs/hfsplus/tables.c # 2005/03/28 14:21:46-08:00 zippel@linux-m68k.org +2838 -1 # hfs: unicode decompose support # # fs/hfsplus/options.c # 2005/03/28 14:21:46-08:00 zippel@linux-m68k.org +9 -0 # hfs: unicode decompose support # # fs/hfsplus/hfsplus_fs.h # 2005/03/28 14:21:46-08:00 zippel@linux-m68k.org +4 -1 # hfs: unicode decompose support # # ChangeSet # 2005/03/28 20:09:45-08:00 zippel@linux-m68k.org # [PATCH] hfs: add nls support # # Add full nls support for HFS+. The default is still utf8, but that can be # changed now via a mount option. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/unicode.c # 2005/03/28 14:42:35-08:00 zippel@linux-m68k.org +22 -33 # hfs: add nls support # # fs/hfsplus/super.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +23 -8 # hfs: add nls support # # fs/hfsplus/options.c # 2005/03/28 14:42:35-08:00 zippel@linux-m68k.org +28 -2 # hfs: add nls support # # fs/hfsplus/hfsplus_fs.h # 2005/03/28 14:42:35-08:00 zippel@linux-m68k.org +4 -3 # hfs: add nls support # # fs/hfsplus/dir.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +4 -4 # hfs: add nls support # # fs/hfsplus/catalog.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +20 -19 # hfs: add nls support # # fs/Kconfig # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +1 -0 # hfs: add nls support # # ChangeSet # 2005/03/28 20:09:28-08:00 zippel@linux-m68k.org # [PATCH] hfs: use parse library for mount options # # Make use of parser library to parse mount options. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/options.c # 2005/03/28 14:42:35-08:00 zippel@linux-m68k.org +57 -57 # hfs: use parse library for mount options # # fs/hfs/super.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +100 -64 # hfs: use parse library for mount options # # ChangeSet # 2005/03/28 20:09:12-08:00 zippel@linux-m68k.org # [PATCH] hfs: fix sign problem in hfs_ext_keycmp # # The key values are unsigned, so comparing them using the difference doesn't # always work. # # (Problem reported by k_guillaume@libertysurf.fr) # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/extent.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +14 -15 # hfs: fix sign problem in hfs_ext_keycmp # # ChangeSet # 2005/03/28 20:08:56-08:00 zippel@linux-m68k.org # [PATCH] hfs: more bnode error checks # # Check for errors during reading of bnode pages and report them. Also improve # error checks in case bnode validity checks failed. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/bnode.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +12 -0 # hfs: more bnode error checks # # fs/hfs/bnode.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +12 -0 # hfs: more bnode error checks # # ChangeSet # 2005/03/28 20:08:39-08:00 zippel@linux-m68k.org # [PATCH] hfs: fix umask behaviour # # This makes umask behaviour more consistent, so it's now also used for new # files and the mount options behave like other umask users. (Problem reported # by ) # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfs/super.c # 2005/03/28 14:42:36-08:00 zippel@linux-m68k.org +3 -3 # hfs: fix umask behaviour # # fs/hfs/inode.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +10 -4 # hfs: fix umask behaviour # # ChangeSet # 2005/03/28 20:08:23-08:00 zippel@linux-m68k.org # [PATCH] hfs: free page buffers in releasepage # # Call try_to_free_buffers() when a page can be released. This behaviour # changed during 2.5 and wasn't fixed in hfs while porting it to 2.6. Also # remove an unnecessary PageActive() check, only the node ref count is really # relevant. # # Signed-off-by: Roman Zippel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/inode.c # 2005/03/28 14:21:45-08:00 zippel@linux-m68k.org +1 -7 # hfs: free page buffers in releasepage # # fs/hfs/inode.c # 2005/03/28 14:42:36-08:00 zippel@linux-m68k.org +1 -7 # hfs: free page buffers in releasepage # # ChangeSet # 2005/03/28 20:08:06-08:00 patrick@bitwizard.nl # [PATCH] Specialix/IO8 cli() conversion # # This patch converts all save_flags/restore_flags to the new # spin_lock_irqsave/spin_unlock_irqrestore calls, as well as some other 2.6.X # cleanups. This allows the "io8+" driver to become SMP safe. # # The large size of this patch comes mostly from the added debug features. # # Signed-off-by: Patrick vd Lageweg # Signed-off-by: Rogier Wolff # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/specialix_io8.h # 2005/03/28 14:21:44-08:00 patrick@bitwizard.nl +4 -5 # Specialix/IO8 cli() conversion # # drivers/char/specialix.c # 2005/03/28 14:21:44-08:00 patrick@bitwizard.nl +677 -270 # Specialix/IO8 cli() conversion # # drivers/char/Kconfig # 2005/03/28 14:21:44-08:00 patrick@bitwizard.nl +1 -1 # Specialix/IO8 cli() conversion # # ChangeSet # 2005/03/28 20:07:50-08:00 stsp@aknet.ru # [PATCH] au1x00_uart deadlock fix # # This driver also needs to drop the lock when calling back into the tty layer. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/au1x00_uart.c # 2005/03/28 14:21:44-08:00 stsp@aknet.ru +2 -0 # au1x00_uart deadlock fix # # ChangeSet # 2005/03/28 20:07:34-08:00 bunk@stusta.de # [PATCH] fs/attr.c: fix check after use # # This patch fixes a check after use found by the Coverity checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/attr.c # 2005/03/28 14:21:44-08:00 bunk@stusta.de +5 -2 # fs/attr.c: fix check after use # # ChangeSet # 2005/03/28 20:07:17-08:00 bunk@stusta.de # [PATCH] drivers/telephony/ixj: fix a use after free # # This patch fixes a use after free found by the Coverity checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/telephony/ixj.c # 2005/03/28 14:21:44-08:00 bunk@stusta.de +1 -1 # drivers/telephony/ixj: fix a use after free # # ChangeSet # 2005/03/28 20:07:01-08:00 bunk@stusta.de # [PATCH] drivers/block/DAC960.c: fix a use after free # # This patch fixes a use after free found by the Coverity checker. # # Controller is used in the Failure path. # # In the Failure patch, Controller will be freed in the end, so this kfree # can simply be deleted. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/DAC960.c # 2005/03/28 14:21:44-08:00 bunk@stusta.de +1 -3 # drivers/block/DAC960.c: fix a use after free # # ChangeSet # 2005/03/28 20:06:44-08:00 gud@eth.net # [PATCH] unified spinlock initialization # # - remove the usage of {SPIN,RW}_LOCK_UNLOCKED as far as possible # # - add a note to Documentation/spinlocks.txt about the deprecation of the # macros {SPIN,RW}_LOCK_UNLOCKED # # Signed-off-by: Amit Gud # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/media/pwc/pwc-if.c # 2005/03/28 14:21:44-08:00 gud@eth.net +1 -1 # unified spinlock initialization # # drivers/serial/ioc4_serial.c # 2005/03/28 14:21:44-08:00 gud@eth.net +1 -1 # unified spinlock initialization # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/28 14:42:34-08:00 gud@eth.net +1 -1 # unified spinlock initialization # # drivers/input/serio/hp_sdc.c # 2005/03/28 14:21:44-08:00 gud@eth.net +4 -4 # unified spinlock initialization # # drivers/input/serio/hil_mlc.c # 2005/03/28 14:21:44-08:00 gud@eth.net +2 -2 # unified spinlock initialization # # drivers/char/tpm/tpm.c # 2005/03/28 14:21:44-08:00 gud@eth.net +1 -1 # unified spinlock initialization # # arch/um/drivers/net_kern.c # 2005/03/28 14:21:44-08:00 gud@eth.net +1 -1 # unified spinlock initialization # # arch/ppc/8xx_io/cs4218_tdm.c # 2005/03/28 14:21:44-08:00 gud@eth.net +1 -1 # unified spinlock initialization # # Documentation/spinlocks.txt # 2005/03/28 14:21:44-08:00 gud@eth.net +26 -0 # unified spinlock initialization # # ChangeSet # 2005/03/28 20:06:27-08:00 rbultje@ronald.bitfreak.net # [PATCH] bt819 array indexing fix # # Signed-off-by: Ronald S. Bultje # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/bt819.c # 2005/03/28 14:21:44-08:00 rbultje@ronald.bitfreak.net +2 -1 # bt819 array indexing fix # # ChangeSet # 2005/03/28 20:06:09-08:00 bjorn.helgaas@hp.com # [PATCH] Netmos parallel/serial/combo support # # There's a bugzilla entry for this here: # http://bugzilla.kernel.org/show_bug.cgi?id=4334 # # This should fix all the problems I know about with Netmos combo cards: # - 9735, 9835, and 9855 are not supported # - combo cards with parallel are erroneously claimed by serial driver # - serial and parport_serial blindly probe for ports # # parport_pc: # Sort Netmos device IDs, no functional change. # parport_serial: # Previously supported 9735 and 9835. Add 9745, 9845, 9855, and # add init hooks to discover how many serial/parallel ports are # actually present (the boards are available in various configs). # Add protection for overflow of static tables. # quirks: # Detect Netmos combo (parallel + serial) cards and change class from # SERIAL to OTHER to prevent serial driver from claiming them. # 8250: # Add init hook to discover the number of serial ports present. # This prevents us from poking at unused BARs. # pci_ids: # Add Netmos 9745, 9845, and sort. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/pci_ids.h # 2005/03/28 14:21:43-08:00 bjorn.helgaas@hp.com +4 -2 # Netmos parallel/serial/combo support # # drivers/serial/8250_pci.c # 2005/03/28 14:21:43-08:00 bjorn.helgaas@hp.com +21 -0 # Netmos parallel/serial/combo support # # drivers/pci/quirks.c # 2005/03/28 14:21:43-08:00 bjorn.helgaas@hp.com +34 -0 # Netmos parallel/serial/combo support # # drivers/pci/pci.ids # 2005/03/28 14:21:43-08:00 bjorn.helgaas@hp.com +14 -3 # Netmos parallel/serial/combo support # # drivers/parport/parport_serial.c # 2005/03/28 14:21:43-08:00 bjorn.helgaas@hp.com +70 -22 # Netmos parallel/serial/combo support # # drivers/parport/parport_pc.c # 2005/03/28 14:21:43-08:00 bjorn.helgaas@hp.com +8 -8 # Netmos parallel/serial/combo support # # ChangeSet # 2005/03/28 20:05:53-08:00 wendyx@us.ibm.com # [PATCH] serial: Digi Neo driver # # This device driver is for the Digi Neo serial adapter. We got several rounds # of detail comments from linux community and updated our earlier patches # according to comments including Jeff Garzik and Greg KH's. # # Signed-off-by: Wen Xiong # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/jsm/jsm_tty.c # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +1043 -0 # serial: Digi Neo driver # # drivers/serial/jsm/jsm_neo.c # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +1427 -0 # serial: Digi Neo driver # # drivers/serial/jsm/jsm.h # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +437 -0 # serial: Digi Neo driver # # drivers/serial/jsm/Makefile # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +8 -0 # serial: Digi Neo driver # # include/linux/serial_core.h # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +3 -0 # serial: Digi Neo driver # # include/linux/pci_ids.h # 2005/03/28 14:42:38-08:00 wendyx@us.ibm.com +4 -0 # serial: Digi Neo driver # # drivers/serial/jsm/jsm_tty.c # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/jsm/jsm_tty.c # # drivers/serial/jsm/jsm_neo.c # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/jsm/jsm_neo.c # # drivers/serial/jsm/jsm_driver.c # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +404 -0 # serial: Digi Neo driver # # drivers/serial/jsm/jsm.h # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/jsm/jsm.h # # drivers/serial/jsm/Makefile # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/jsm/Makefile # # drivers/serial/Makefile # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +1 -0 # serial: Digi Neo driver # # drivers/serial/Kconfig # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +15 -0 # serial: Digi Neo driver # # drivers/serial/jsm/jsm_driver.c # 2005/03/28 14:21:43-08:00 wendyx@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/serial/jsm/jsm_driver.c # # ChangeSet # 2005/03/28 20:05:36-08:00 patrick@bitwizard.nl # [PATCH] generic-serial cli() conversion # # This patch converts all save_flags/restore_flags to the new # spin_lock_irqsave/spin_unlock_irqrestore calls, as well as some other 2.6.X # cleanups. This prepares the way for the "io8+", "sx" and "rio" drivers to # become SMP safe. Patches for those drivers follow. # # Signed-off-by: Patrick vd Lageweg # Signed-off-by: Rogier Wolff # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/generic_serial.h # 2005/03/28 14:21:43-08:00 patrick@bitwizard.nl +3 -1 # generic-serial cli() conversion # # drivers/char/generic_serial.c # 2005/03/28 14:21:43-08:00 patrick@bitwizard.nl +65 -50 # generic-serial cli() conversion # # ChangeSet # 2005/03/28 20:05:21-08:00 rohit.seth@intel.com # [PATCH] arch hook for notifying changes in PTE protections bits # # Recently on IA-64, we have found an issue where old data could be used by # apps. The sequence of operations includes few mprotects from user space # (glibc) goes like this: # # 1- The text region of an executable is mmaped using # PROT_READ|PROT_EXEC. As a result, a shared page is allocated to user. # # 2- User then requests the text region to be mprotected with # PROT_READ|PROT_WRITE. Kernel removes the execute permission and leave # the read permission on the text region. # # 3- Subsequent write operation by user results in page fault and # eventually resulting in COW break. User gets a new private copy of the # page. At this point kernel marks the new page for defered flush. # # 4- User then request the text region to be mprotected back with # PROT_READ|PROT_EXEC. mprotect suppport code in kernel, flushes the # caches, updates the PTEs and then flushes the TLBs. Though after # updating the PTEs with new permissions, we don't let the arch specific # code know about the new mappings (through update_mmu_cache like # routine). IA-64 typically uses update_mmu_cache to check for the # defered flush flag (that got set in step 3) to maintain cache coherency # lazily (The local I and D caches on IA-64 are incoherent). # # DavidM suggeested that we would need to add a hook in the function # change_pte_range in mm/mprotect.c This would let the architecture specific # code to look at the new ptes to decide if it needs to update any other # architectual/kernel state based on the updated (new permissions) PTE # values. # # We have added a new hook lazy_mmu_prot_update(pte_t) that gets called # protection bits in PTEs change. This hook provides an opportunity to arch # specific code to do needful. On IA-64 this will be used for lazily making # the I and D caches coherent. # # Signed-off-by: David Mosberger # Signed-off-by: Rohit Seth # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mprotect.c # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +3 -2 # arch hook for notifying changes in PTE protections bits # # mm/memory.c # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +6 -0 # arch hook for notifying changes in PTE protections bits # # include/asm-ia64/pgtable.h # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +4 -1 # arch hook for notifying changes in PTE protections bits # # include/asm-generic/pgtable.h # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +4 -0 # arch hook for notifying changes in PTE protections bits # # arch/ia64/mm/init.c # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +1 -2 # arch hook for notifying changes in PTE protections bits # # arch/ia64/lib/swiotlb.c # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +1 -1 # arch hook for notifying changes in PTE protections bits # # arch/ia64/hp/common/sba_iommu.c # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +1 -1 # arch hook for notifying changes in PTE protections bits # # Documentation/cachetlb.txt # 2005/03/28 14:21:43-08:00 rohit.seth@intel.com +5 -0 # arch hook for notifying changes in PTE protections bits # # ChangeSet # 2005/03/28 20:05:04-08:00 relf@os2.ru # [PATCH] fs/hpfs/*: fix HPFS support under 64-bit kernel # # The provided patch fixes HPFS filesystem support under 64-bit Linux kernel # and closes the bugreport http://bugme.osdl.org/show_bug.cgi?id=4333 # # The problem is in 'time_t' size which is 8 bytes on 64-bit systems # (comparing to 4 bytes on 32-bit systems). The patch introduces local # 'time32_t' type of the fixed size 4 and uses it where required. # # Cc: Mikulas Patocka # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hpfs/hpfs_fn.h # 2005/03/28 14:21:43-08:00 relf@os2.ru +2 -2 # fs/hpfs/*: fix HPFS support under 64-bit kernel # # fs/hpfs/hpfs.h # 2005/03/28 14:21:43-08:00 relf@os2.ru +7 -5 # fs/hpfs/*: fix HPFS support under 64-bit kernel # # ChangeSet # 2005/03/28 20:04:48-08:00 damm@opensource.se # [PATCH] module parameter fixes # # Crystal clear MODULE_PARM_DESC typo fixes for: bt878, edgeport, g_ether, # budget, cifs, drm, eepro100 # # Signed-off-by: Magnus Damm # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/cifs/cifsfs.c # 2005/03/28 14:21:42-08:00 damm@opensource.se +1 -1 # module parameter fixes # # drivers/usb/serial/io_edgeport.c # 2005/03/28 14:21:42-08:00 damm@opensource.se +1 -1 # module parameter fixes # # drivers/usb/gadget/ether.c # 2005/03/28 14:21:42-08:00 damm@opensource.se +1 -1 # module parameter fixes # # drivers/net/eepro100.c # 2005/03/28 14:21:42-08:00 damm@opensource.se +2 -2 # module parameter fixes # # drivers/media/dvb/ttpci/budget-core.c # 2005/03/28 14:42:27-08:00 damm@opensource.se +1 -1 # module parameter fixes # # drivers/media/dvb/bt8xx/bt878.c # 2005/03/28 14:42:31-08:00 damm@opensource.se +2 -2 # module parameter fixes # # ChangeSet # 2005/03/28 20:04:30-08:00 neilb@cse.unsw.edu.au # [PATCH] nlm: fix f_count leak # # I can't see any reason for this file->f_count++. Removing it fixes a bug # which leaves an exported filesystem busy if a callback for a lock held on that # filesystem ever failed. # # Found by Terence Rokop. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/lockd/svclock.c # 2005/03/28 14:21:42-08:00 neilb@cse.unsw.edu.au +0 -1 # nlm: fix f_count leak # # ChangeSet # 2005/03/28 20:04:14-08:00 mikukkon@gmail.com # [PATCH] Fix compile warning in drivers/pnp/resource.c with !CONFIG_PCI # # drivers/pnp/resource.c:24: warning: `pnp_skip_pci_scan' defined but not used # # Signed-off-by: Mika Kukkonen (mikukkon@gmail.com) # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pnp/resource.c # 2005/03/28 14:21:42-08:00 mikukkon@gmail.com +3 -4 # Fix compile warning in drivers/pnp/resource.c with !CONFIG_PCI # # ChangeSet # 2005/03/28 20:03:58-08:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: Fix msdos ->[ac]{date,time} # # MSDOS doesn't have ->adate and ->c{date,time}, those should be filled # by zero. # # This fixes my recent changes. # # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/msdos/namei.c # 2005/03/28 14:21:42-08:00 hirofumi@mail.parknet.co.jp +4 -2 # FAT: Fix msdos ->[ac]{date,time} # # ChangeSet # 2005/03/28 20:03:42-08:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: set MS_NOATIME to msdos # # MSDOS doesn't have atime, so this sets MS_NOATIME to msdos in order that we # don't get unnecessary writes. # # Signed-off-by: Werner Almesberger # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/msdos/namei.c # 2005/03/28 14:42:41-08:00 hirofumi@mail.parknet.co.jp +1 -0 # FAT: set MS_NOATIME to msdos # # fs/fat/inode.c # 2005/03/28 14:21:42-08:00 hirofumi@mail.parknet.co.jp +2 -1 # FAT: set MS_NOATIME to msdos # # ChangeSet # 2005/03/28 20:03:25-08:00 rth@twiddle.net # [PATCH] alpha: elimitate two warnings from gcc4 # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/alpha/kernel/srmcons.c # 2005/03/28 14:21:42-08:00 rth@twiddle.net +10 -17 # alpha: elimitate two warnings from gcc4 # # arch/alpha/kernel/smp.c # 2005/03/28 14:21:42-08:00 rth@twiddle.net +0 -43 # alpha: elimitate two warnings from gcc4 # # ChangeSet # 2005/03/28 20:03:09-08:00 rth@twiddle.net # [PATCH] small warning fix for gcc4 # # Eliminates "warning: type qualifiers ignored on function return type". # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/cpuset.h # 2005/03/28 14:21:42-08:00 rth@twiddle.net +1 -1 # small warning fix for gcc4 # # ChangeSet # 2005/03/28 20:02:53-08:00 rmk+pcmcia@arm.linux.org.uk # [PATCH] pcmcia: clean up suspend # # Where suspend is implemented, all socket drivers set their socket state to # "dead_socket" as the first thing in their suspend ops method. Factor this # out to the core PCMCIA code. # # This allows us to kill some suspend methods, and reduce the references to # "dead_socket". Note that the suspend ops method is now optional. # # Signed-off-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/yenta_socket.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -2 # pcmcia: clean up suspend # # drivers/pcmcia/vrc4173_cardu.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -6 # pcmcia: clean up suspend # # drivers/pcmcia/vrc4171_card.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -6 # pcmcia: clean up suspend # # drivers/pcmcia/tcic.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -6 # pcmcia: clean up suspend # # drivers/pcmcia/soc_common.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +2 -5 # pcmcia: clean up suspend # # drivers/pcmcia/pd6729.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -6 # pcmcia: clean up suspend # # drivers/pcmcia/m32r_pcc.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -6 # pcmcia: clean up suspend # # drivers/pcmcia/m32r_cfc.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -7 # pcmcia: clean up suspend # # drivers/pcmcia/i82365.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -6 # pcmcia: clean up suspend # # drivers/pcmcia/i82092aa.h # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -1 # pcmcia: clean up suspend # # drivers/pcmcia/i82092.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -10 # pcmcia: clean up suspend # # drivers/pcmcia/hd64465_ss.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +0 -15 # pcmcia: clean up suspend # # drivers/pcmcia/cs.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +3 -1 # pcmcia: clean up suspend # # drivers/pcmcia/au1000_generic.c # 2005/03/28 14:21:41-08:00 rmk+pcmcia@arm.linux.org.uk +2 -5 # pcmcia: clean up suspend # # ChangeSet # 2005/03/28 20:02:36-08:00 rmk@arm.linux.org.uk # [PATCH] Fix PCMCIA resume with card inserted # # The following patch fixes a minor but annoying issue with PCMCIA resume. # When a machine is suspended with an empty socket, and then resumed with a # card in the socket, the card is ignored. The following patch adjusts the # resume paths such that we detect the card and properly initialise it. # # Signed-off-by: Russell King # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/cs.c # 2005/03/28 14:42:42-08:00 rmk@arm.linux.org.uk +5 -0 # Fix PCMCIA resume with card inserted # # ChangeSet # 2005/03/28 20:02:19-08:00 jgarzik@pobox.com # [PATCH] alpha build fixes # # Needed this to build Fedora rawhide kernel (2.6.12-rc1 + some patches) on # alpha. This is the upstream portion of the build fixes. # # Signed-off-by: Jeff Garzik # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/debugfs.h # 2005/03/28 14:21:41-08:00 jgarzik@pobox.com +2 -0 # alpha build fixes # # include/asm-alpha/pci.h # 2005/03/28 14:21:41-08:00 jgarzik@pobox.com +6 -0 # alpha build fixes # # drivers/char/tpm/tpm.h # 2005/03/28 14:21:41-08:00 jgarzik@pobox.com +1 -0 # alpha build fixes # # drivers/char/agp/generic.c # 2005/03/28 14:21:41-08:00 jgarzik@pobox.com +1 -0 # alpha build fixes # # ChangeSet # 2005/03/28 20:02:03-08:00 rddunlap@osdl.org # [PATCH] io_remap_pfn_range: convert last callers # # io_remap_pfn_range() remaining callers: # convert all remaining callers of io_remap_page_range() # to io_remap_pfn_range(); # add io_remap_page_range() to feature-removal-schedule.txt; # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/core/pcm_native.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +2 -2 # io_remap_pfn_range: convert last callers # # drivers/video/sa1100fb.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: convert last callers # # drivers/video/controlfb.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: convert last callers # # drivers/video/au1100fb.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: convert last callers # # drivers/video/acornfb.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: convert last callers # # arch/sh/kernel/cpu/sh4/sq.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: convert last callers # # Documentation/feature-removal-schedule.txt # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +9 -0 # io_remap_pfn_range: convert last callers # # ChangeSet # 2005/03/28 20:01:45-08:00 rddunlap@osdl.org # [PATCH] io_remap_pfn_range: fix some callers for XEN # # (from Keir:) # I have audited the drivers/ and sound/ directories. Most uses of # remap_pfn_range are okay, but there are a small handful that are # remapping device memory (mostly AGP and DRM drivers). # # Of particular driver is the HPET driver, whose mmap function is broken even # for native (non-Xen) builds. If nothing else, vmalloc_to_phys should be used # instead of __pa to convert an ioremapped virtual address to a valid physical # address. The fix in this patch is to remember the original bus address as # probed at boot time and to pass this to io_remap_pfn_range. # # Signed-off-by: Keir Fraser # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/sbus/char/flash.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: fix some callers for XEN # # drivers/char/hpet.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +4 -2 # io_remap_pfn_range: fix some callers for XEN # # drivers/char/drm/i830_dma.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: fix some callers for XEN # # drivers/char/drm/i810_dma.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: fix some callers for XEN # # drivers/char/drm/drm_vm.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +1 -1 # io_remap_pfn_range: fix some callers for XEN # # drivers/char/agp/frontend.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +2 -2 # io_remap_pfn_range: fix some callers for XEN # # ChangeSet # 2005/03/28 20:01:29-08:00 rddunlap@osdl.org # [PATCH] io_remap_pfn_range: convert sparc callers # # io_remap_pfn_range(): # convert sparc32/64 callers of io_remap_page_range(with 6 args) # to io_remap_pfn_range(with 5 args); # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/sbuslib.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +5 -3 # io_remap_pfn_range: convert sparc callers # # drivers/video/fbmem.c # 2005/03/28 14:21:41-08:00 rddunlap@osdl.org +3 -3 # io_remap_pfn_range: convert sparc callers # # drivers/sbus/char/vfc_dev.c # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +4 -2 # io_remap_pfn_range: convert sparc callers # # drivers/char/drm/drm_vm.c # 2005/03/28 14:42:43-08:00 rddunlap@osdl.org +3 -3 # io_remap_pfn_range: convert sparc callers # # ChangeSet # 2005/03/28 20:01:12-08:00 rddunlap@osdl.org # [PATCH] io_remap_pfn_range: add for all arch-es # # This patch introduces a new interface function for mapping bus/device memory: # io_remap_pfn_range. This accepts the same parameters as remap_pfn_range and # io_remap_page_range but should be used in any situation where the caller is # not simply remapping ordinary RAM. For example, when mapping device registers # the new function should be used. # # The distinction between remapping device memory and ordinary RAM is critical # for the Xen hypervisor. # # This patch series also cleans up the remaining users of io_remap_page_range # (in particular, the several sparc-specific sections in various drivers that # use a special form of io_remap_page_range: an extra argument for # SPARC arch.) by converting them to use io_remap_pfn_range(), where # io_remap_pfn_range() supports passing as part of the pfn argument. # # The sparc32 & sparc64 code needs live testing. # # # (from Keir:) # # I have audited the drivers/ and sound/ directories. Most uses of # remap_pfn_range are okay, but there are a small handful that are remapping # device memory (mostly AGP and DRM drivers). # # Of particular driver is the HPET driver, whose mmap function is broken even # for native (non-Xen) builds. If nothing else, vmalloc_to_phys should be used # instead of __pa to convert an ioremapped virtual address to a valid physical # address. The fix in this patch is to remember the original bus address as # probed at boot time and to pass this to io_remap_pfn_range. # # io_remap_pfn_range(): # add io_remap_pfn_range() for all arches; # add MK_IOSPACE_PFN(), GET_IOSPACE(), and GET_PFN() # for all arches but primarily for sparc32/64's extended IO space, # sparc: kill the hack of using low bit of to mean # write_combine or set side-effect (_PAGE_E) bit; # (DaveM suggested that I kill it;) # future: convert remaining callers of io_remap_page_range() to # io_remap_pfn_range() and deprecate io_remap_page_range(); # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-sparc64/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +12 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-sparc/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +13 -1 # io_remap_pfn_range: add for all arch-es # # include/asm-sh64/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +8 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-sh/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-ppc64/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-ppc/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +16 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-parisc/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-mips/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +17 -1 # io_remap_pfn_range: add for all arch-es # # include/asm-m68knommu/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-m68k/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-m32r/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-ia64/pgtable.h # 2005/03/28 14:42:39-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-i386/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-h8300/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-frv/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-arm26/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-arm/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # include/asm-alpha/pgtable.h # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -0 # io_remap_pfn_range: add for all arch-es # # arch/sparc64/mm/generic.c # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +40 -10 # io_remap_pfn_range: add for all arch-es # # arch/sparc64/kernel/sparc64_ksyms.c # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +5 -1 # io_remap_pfn_range: add for all arch-es # # arch/sparc64/kernel/pci.c # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +7 -8 # io_remap_pfn_range: add for all arch-es # # arch/sparc/mm/generic.c # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +34 -0 # io_remap_pfn_range: add for all arch-es # # arch/sparc/kernel/sparc_ksyms.c # 2005/03/28 14:21:40-08:00 rddunlap@osdl.org +1 -0 # io_remap_pfn_range: add for all arch-es # # ChangeSet # 2005/03/28 20:00:54-08:00 jakub@redhat.com # [PATCH] Futex: make futex_wait() atomic again # # Call get_futex_value_locked in futex_wait with futex hash bucket locked and # only enqueue the futex if futex has the expected value. Simplify # futex_requeue. # # Signed-off-by: Jakub Jelinek # Acked-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/futex.c # 2005/03/28 14:21:40-08:00 jakub@redhat.com +47 -42 # Futex: make futex_wait() atomic again # # ChangeSet # 2005/03/28 20:00:38-08:00 sct@redhat.com # [PATCH] ext2/3 file limits to avoid overflowing i_blocks # # As discussed before, we can overflow i_blocks in ext2/ext3 inodes by # growing a file up to 2TB. That gives us 2^32 sectors of data in the file; # but once you add on the indirect tree and possible EA/ACL metadata, # i_blocks will wrap beyond 2^32. Consensus seemed to be that the best way # to avoid this was simply to stop files getting so large that this was a # problem in the first place; anything else would lead to complications if a # sparse file tried to overflow that 2^32 sector limit while filling in # holes. # # I wrote a small program to calculate the total indirect tree overhead for # any given file size, and 0x1ff7fffe000 turned out to be the largest file we # can get without the total i_blocks overflowing 2^32. # # But in testing, that *just* wrapped --- we need to limit the file to be one # page smaller than that to deal with the possibility of an EA/ACL block # being accounted against i_blocks. # # So this patch has been tested, at least on ext3, by letting a file grow # densely to its maximum size permitted by the kernel; at 0x1ff7fffe000, stat # shows the file to have wrapped back exactly to 0 st_blocks, but with the # limit at 0x1ff7fffd000, du shows it occupying the expected 2TB-blocksize # bytes. # # Signed-off-by: Stephen Tweedie # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext3/super.c # 2005/03/28 14:42:25-08:00 sct@redhat.com +8 -2 # ext2/3 file limits to avoid overflowing i_blocks # # fs/ext2/super.c # 2005/03/28 14:21:40-08:00 sct@redhat.com +8 -2 # ext2/3 file limits to avoid overflowing i_blocks # # ChangeSet # 2005/03/28 20:00:22-08:00 schwidefsky@de.ibm.com # [PATCH] posix-cpu-timers and cputime_t divisons. # # The posix cpu timers introduced code that will not work with an arbitrary # type for cputime_t. In particular the division of two cputime_t values # broke the s390 build because cputime_t is define as an unsigned long long. # # The first problem is the division of a cputime_t value by a number of # threads. That is a cputime_t divided by an integer. The patch adds # another macro cputime_div to the cputime macro regime which implements this # type of division and replaces all occurences of a cputime / nthread in the # posix cpu timer code. # # Next problem is bump_cpu_timer. This function is severly broken: # # 1) In the body of the first if statement a timer->it.cpu.incr.sched is # used as the second argument of do_div. do_div expects an unsigned long # as "base" parameter but timer->it.cpu.incr.sched is an unsigned long # long. If the timer increment ever happens to be >= 2^32 the result is # wrong and if the lower 32 bits are zero this even crashes with a fixed # point divide exception. # # 2) The cputime_le(now.cpu, timer->it.cpu.expires.cpu) in the else if # condition is wrong. The cputime_le() reads as "now.cpu <= # timer->it.cpu.expires.cpu" and the subsequent cputime_ge() reads as # "now.cpu >= timer.it.cpu.expires.cpu". That means that the two values # needs to be equal to make the body of the second if to have any effect. # The first cputime_le should be a cputime_ge. # # 3) timer->it.cpu.expires.cpu and delta in the else part of the if are of # type cputime_t. A division of two cputime_t values is undefined (think # of cputime_t as e.g. a struct timespec, that just doesn't work). We # could add a primitive for this type of division but we'd end up with a # 64 bit division or something even more complicated. # # The solution for bump_cpu_timer is to use the "slow" division algorithm # that does shifts and subtracts. That adds yet another cputime macro, # cputime_halve to do the right shift of a cputime value. # # The next problem is in arm_timer. The UPDATE_CLOCK macro does the wrong # thing for it_prof_expires and it_virt_expires. Expanded the macro and # added the cputime magic to it_prof/it_virt. # # The remaining problems are rather simple, timespec_to_jiffies instead of # timespec_to_cputime and several cases where cputime_eq with cputime_zero # needs to be used instead of "== 0". # # What still worries me a bit is to use "timer->it.cpu.incr.sched == 0" as # check if the timer is armed at all. It should work but its not really # clean. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/posix-cpu-timers.c # 2005/03/28 14:21:40-08:00 schwidefsky@de.ibm.com +68 -40 # posix-cpu-timers and cputime_t divisons. # # include/asm-s390/cputime.h # 2005/03/28 14:21:40-08:00 schwidefsky@de.ibm.com +8 -0 # posix-cpu-timers and cputime_t divisons. # # include/asm-generic/cputime.h # 2005/03/28 14:21:40-08:00 schwidefsky@de.ibm.com +2 -0 # posix-cpu-timers and cputime_t divisons. # # ChangeSet # 2005/03/28 20:00:05-08:00 shaohua.li@intel.com # [PATCH] Fix oops when inserting ipmi_si module # # In one of machines in our lab, spmi->addr.register_bit_width is 0 (so the # returned address is invalid). Ignoring the check will cause inserting the # module oops. # # Signed-off-by: Li Shaohua # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/ipmi/ipmi_si_intf.c # 2005/03/28 14:21:40-08:00 shaohua.li@intel.com +5 -0 # Fix oops when inserting ipmi_si module # # ChangeSet # 2005/03/28 19:59:49-08:00 george@mvista.com # [PATCH] Fix POSIX timers expiring before their scheduled time # # This patch fixes the problem of POSIX timers returning too early due to not # accounting for the time starting mid jiffie. # # Signed-off-by: George Anzinger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/posix-timers.c # 2005/03/28 14:21:39-08:00 george@mvista.com +4 -1 # Fix POSIX timers expiring before their scheduled time # # ChangeSet # 2005/03/28 19:59:33-08:00 rddunlap@osdl.org # [PATCH] cciss: range chcking fix # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/cciss.c # 2005/03/28 14:21:39-08:00 rddunlap@osdl.org +1 -1 # cciss: range chcking fix # # ChangeSet # 2005/03/28 19:59:17-08:00 rddunlap@osdl.org # [PATCH] mtrr: uaccess range checking fix # # mtrr: prevent copy_from_user(to, from, -1) or (if that should # succeed somehow) write to line[-1] (on stack); # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/cpu/mtrr/if.c # 2005/03/28 14:21:39-08:00 rddunlap@osdl.org +6 -2 # mtrr: uaccess range checking fix # # ChangeSet # 2005/03/28 19:59:00-08:00 pj@sgi.com # [PATCH] cpusets: alloc GFP_WAIT sleep fix # # The cpuset mems_allowed update code in alloc_pages_current could (in # theory) put a task to sleep that didn't allow sleeping (did not have # __GFP_WAIT flag set). In the rare circumstance that the current tasks # mems_generation is outofdate compared to the tasks cpuset mems_generation, # this mems_allowed update code needs to grap cpuset_sem, which can sleep. # # We avoid this by not trying to update mems_allowed here if we can't sleep # (__GFP_WAIT not set). # # Thanks to Ray Bryant for noticing this. # # Signed-off-by: Paul Jackson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mempolicy.c # 2005/03/28 14:21:39-08:00 pj@sgi.com +5 -1 # cpusets: alloc GFP_WAIT sleep fix # # ChangeSet # 2005/03/28 19:58:44-08:00 pj@sgi.com # [PATCH] cpusets: mems generation deadlock fix # # The cpuset code to update mems_generation could (in theory) deadlock on # cpuset_sem if it needed to allocate some memory while creating (mkdir) or # removing (rmdir) a cpuset, so already held cpuset_sem. Some other process # would have to mess with this tasks cpuset memory placement at the same # time. # # We avoid this possible deadlock by always updating mems_generation after we # grab cpuset_sem on such operations, before we risk any operations that # might require memory allocation. # # Thanks to Jack Steiner for noticing this. # # Signed-off-by: Paul Jackson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/cpuset.c # 2005/03/28 14:21:39-08:00 pj@sgi.com +32 -2 # cpusets: mems generation deadlock fix # # ChangeSet # 2005/03/28 19:58:26-08:00 randolph@tausq.org # [PATCH] Missing set_fs() calls around kernel syscall # # Found by sparse... since we are passing kernel param to a syscall handler, # we need to do the set_fs() wrappers. # # Signed-off-by: Randolph Chung # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/stop_machine.c # 2005/03/28 14:21:39-08:00 randolph@tausq.org +6 -1 # Missing set_fs() calls around kernel syscall # # ChangeSet # 2005/03/28 19:58:10-08:00 prasanna@in.ibm.com # [PATCH] kprobes: incorrect spin_unlock_irqrestore() call in register_kprobe() # # register_kprobe() routine was calling spin_unlock_irqrestore() wrongly. # # This patch removes unwanted spin_unlock_irqrestore() call in # register_kprobe() routine. # # Signed-off-by: Prasanna S Panchamukhi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/kprobes.c # 2005/03/28 14:21:39-08:00 prasanna@in.ibm.com +3 -2 # kprobes: incorrect spin_unlock_irqrestore() call in register_kprobe() # # ChangeSet # 2005/03/28 19:57:54-08:00 pmeda@akamai.com # [PATCH] pipe: save one pipe page # # Save one page in pipe writev without incuring additional cost (just that # ampersand operator). # # Signed-off-by: Prasanna Meda # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/pipe.c # 2005/03/28 14:21:38-08:00 pmeda@akamai.com +10 -8 # pipe: save one pipe page # # ChangeSet # 2005/03/28 19:57:38-08:00 matthew@wil.cx # [PATCH] New console flag: CON_BOOT # # CON_BOOT is like early printk in that it allows for output really early on. # It's better than early printk because it unregisters automatically when a # real console is initialised. So if you don't get consoles registering in # console_init, there isn't a huge delay between the boot console # unregistering and the real console starting. This is the case on PA-RISC # where we have serial ports that aren't discovered until the PCI bus has # been walked. # # I think all the current early printk users could be converted to this # scheme with a minimal amount of effort. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/printk.c # 2005/03/28 14:21:38-08:00 matthew@wil.cx +5 -0 # New console flag: CON_BOOT # # include/linux/console.h # 2005/03/28 14:21:38-08:00 matthew@wil.cx +6 -2 # New console flag: CON_BOOT # # ChangeSet # 2005/03/28 19:57:22-08:00 roland@topspin.com # [PATCH] InfiniBand: remove unsafe use of in_atomic() # # Using in_atomic() to decide between GFP_KERNEL and GFP_ATOMIC is not safe # (it doesn't work if CONFIG_PREEMPT=n). Change to just always allocating # with GFP_ATOMIC, since we don't know if we can sleep or not. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/mad.c # 2005/03/28 14:21:38-08:00 roland@topspin.com +4 -10 # InfiniBand: remove unsafe use of in_atomic() # # ChangeSet # 2005/03/28 19:57:05-08:00 mikpe@user.it.uu.se # [PATCH] drivers/char/isicom.c gcc4 fix # # Fix two array-of-incomplete-type errors from gcc4 in isicom.c. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/isicom.c # 2005/03/28 14:21:38-08:00 mikpe@user.it.uu.se +3 -3 # drivers/char/isicom.c gcc4 fix # # ChangeSet # 2005/03/28 19:56:49-08:00 bunk@stusta.de # [PATCH] kill drivers/cdrom/mcd.c # # As described in my patch that marked this obsolete driver as BROKEN, this # patch completely removes it. # # Signed-off-by: Adrian Bunk # Acked-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/Makefile # 2005/03/28 14:21:38-08:00 bunk@stusta.de +0 -1 # kill drivers/cdrom/mcd.c # # drivers/cdrom/Kconfig # 2005/03/28 14:21:38-08:00 bunk@stusta.de +5 -51 # kill drivers/cdrom/mcd.c # # Documentation/cdrom/mcdx # 2005/03/28 14:21:38-08:00 bunk@stusta.de +1 -16 # kill drivers/cdrom/mcd.c # # BitKeeper/deleted/.del-mcd~e35e3965a2b5496d # 2005/03/28 19:56:39-08:00 bunk@stusta.de +0 -0 # Delete: Documentation/cdrom/mcd # # BitKeeper/deleted/.del-mcd.h~2777279988b7b4ae # 2005/03/28 19:56:39-08:00 bunk@stusta.de +0 -0 # Delete: drivers/cdrom/mcd.h # # BitKeeper/deleted/.del-mcd.c~2fe5f46df03dc52b # 2005/03/28 19:56:39-08:00 bunk@stusta.de +0 -0 # Delete: drivers/cdrom/mcd.c # # ChangeSet # 2005/03/28 19:56:31-08:00 christoph@lameter.com # [PATCH] Per cpu irq stat # # The definition of the irq_stat as an array means that the individual # elements of the irq_stat array are located on one NUMA node requiring # internode traffic to access irq_stat from other nodes. This patch makes # irq_stat a per_cpu variable which allows most accesses to be local. # # Signed-off-by: Christoph Lameter # Signed-off-by: Shai Fultheim # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/hardirq.h # 2005/03/28 14:21:38-08:00 christoph@lameter.com +6 -1 # Per cpu irq stat # # arch/i386/kernel/process.c # 2005/03/28 14:21:38-08:00 christoph@lameter.com +1 -1 # Per cpu irq stat # # arch/i386/kernel/nmi.c # 2005/03/28 14:21:37-08:00 christoph@lameter.com +2 -2 # Per cpu irq stat # # arch/i386/kernel/irq.c # 2005/03/28 14:21:37-08:00 christoph@lameter.com +4 -1 # Per cpu irq stat # # arch/i386/kernel/io_apic.c # 2005/03/28 14:21:37-08:00 christoph@lameter.com +1 -1 # Per cpu irq stat # # arch/i386/kernel/apic.c # 2005/03/28 14:21:37-08:00 christoph@lameter.com +1 -1 # Per cpu irq stat # # ChangeSet # 2005/03/28 19:56:15-08:00 clameter@sgi.com # [PATCH] Exports to enable clock driver modules # # The following exports are necessary to allow loadable modules to define new # clocks. Without these the mmtimer driver cannot be build correctly as a # module (there is another mmtimer specific fix necessary to get it to build # properly but that will be a separate patch): # # Signed-off-by: Christoph Lameter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/time.c # 2005/03/28 14:21:37-08:00 clameter@sgi.com +2 -0 # Exports to enable clock driver modules # # kernel/posix-timers.c # 2005/03/28 14:42:46-08:00 clameter@sgi.com +6 -1 # Exports to enable clock driver modules # # ChangeSet # 2005/03/28 19:55:59-08:00 hong.liu@intel.com # [PATCH] fix mmap() return value to conform to POSIX # # POSIX said: # mmap() should return [EOVERFLOW] if the file is a regular file and the # value of off + len exceeds the offset maximum established in the open # file description associated with fildes. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2005/03/28 14:21:37-08:00 hong.liu@intel.com +1 -1 # fix mmap() return value to conform to POSIX # # ChangeSet # 2005/03/28 19:55:43-08:00 gordon.jin@intel.com # [PATCH] fix mmap() return value to conform POSIX # # This patch fixes 2 return values in mmap() to conform POSIX spec: # # [EINVAL] # The value of len is zero. # # [ENOMEM] # MAP_FIXED was specified, and the range [addr,addr+len) exceeds # that allowed for the address space of a process; or, if # MAP_FIXED was not specified and there is insufficient room in # the address space to effect the mapping. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2005/03/28 14:42:48-08:00 gordon.jin@intel.com +2 -2 # fix mmap() return value to conform POSIX # # ChangeSet # 2005/03/28 19:55:27-08:00 ashok.raj@intel.com # [PATCH] Fix irq_affinity write from /proc for ia64 # # Made GENERIC_HARDIRQ mechanism work for ia64 and CPU hotplug. When write # to /proc/irq is handled it is not appropriate to perform set_rte # immediatly, since there is a race when the interrupt is asserted while the # re-program is happening. Hence such programming is only safe when we do # the re-program at the time of servicing an interrupt. This got broken when # GENERIC_HARDIRQ got introduced for ia64. # # - added CONFIG_PENDING_IRQ so default /proc/irq write handler can do the right # thing. # # TBD: We currently dont handle redirectable hint either in the display, or # when we handle writes to /proc/irq/XX/smp_affinity. We need an arch # specific way to account for the presence of "r" hint when we handle the # proc write. # # Signed-off-by: Ashok Raj # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/irq/proc.c # 2005/03/28 14:21:37-08:00 ashok.raj@intel.com +8 -2 # Fix irq_affinity write from /proc for ia64 # # arch/ia64/kernel/irq.c # 2005/03/28 14:21:37-08:00 ashok.raj@intel.com +10 -2 # Fix irq_affinity write from /proc for ia64 # # ChangeSet # 2005/03/28 19:55:10-08:00 joern@wohnheim.fh-wedel.de # [PATCH] checkstack: fix sort misbehavior for long function names # # Fix sort behavior when long names are encountered. The previour regular # expression depended on a tab to find the size in a string. For long names, # this tab no longer exists, so it is smarter to check for a colon instead. # # For the kernel, this change shouldn't make a difference. But people # started using the same script for c++ code in other projects. # # Signed-off-by: Jörn Engel # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/checkstack.pl # 2005/03/28 14:21:37-08:00 joern@wohnheim.fh-wedel.de +2 -2 # checkstack: fix sort misbehavior for long function names # # ChangeSet # 2005/03/28 19:54:54-08:00 gordon.jin@intel.com # [PATCH] fix mprotect() with len=(size_t)(-1) to return -ENOMEM # # This patch fixes a corner case in sys_mprotect(): # # Case: len is so large that will overflow to 0 after page alignment. E.g. # len=(size_t)(-1), i.e. 0xff...ff. # # Expected result: POSIX spec says it should return -ENOMEM. # # Current result: len is aligned to 0, then treated the same as len=0 and # return success. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mprotect.c # 2005/03/28 14:42:39-08:00 gordon.jin@intel.com +3 -3 # fix mprotect() with len=(size_t)(-1) to return -ENOMEM # # ChangeSet # 2005/03/28 19:54:38-08:00 janitor@sternwelten.at # [PATCH] sedlbauer: eliminate bad section references # # Fix sedlbauer section references: # convert __initdata to __devinitdata. # # Error: ./drivers/isdn/hisax/sedlbauer.o .text refers to 0000235f R_386_32 # .init.data # Error: ./drivers/isdn/hisax/sedlbauer.o .text refers to 0000236e R_386_32 # .init.data # Error: ./drivers/isdn/hisax/sedlbauer.o .text refers to 0000238d R_386_32 # .init.data # Error: ./drivers/isdn/hisax/sedlbauer.o .text refers to 000023b2 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/sedlbauer.o .text refers to 00002417 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/sedlbauer.o .text refers to 0000244c R_386_32 # .init.data # # Signed-off-by: maximilian attems # Acked-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/sedlbauer.c # 2005/03/28 14:21:37-08:00 janitor@sternwelten.at +2 -2 # sedlbauer: eliminate bad section references # # ChangeSet # 2005/03/28 19:54:21-08:00 janitor@sternwelten.at # [PATCH] hfc_sx: eliminate bad section references # # Fix hfc_sx section references: # convert __initdata to __devinitdata. # # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 0000204d R_386_32 # .init.data # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 0000205c R_386_32 # .init.data # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 00002082 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 0000209f R_386_32 # .init.data # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 00002114 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 0000211c R_386_32 # .init.data # Error: ./drivers/isdn/hisax/hfc_sx.o .text refers to 0000212e R_386_32 # .init.data # # Signed-off-by: maximilian attems # Acked-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/hfc_sx.c # 2005/03/28 14:21:36-08:00 janitor@sternwelten.at +2 -2 # hfc_sx: eliminate bad section references # # ChangeSet # 2005/03/28 19:54:05-08:00 janitor@sternwelten.at # [PATCH] elsa eliminate bad section references # # Fix elsa section references: # convert __initdata to __devinitdata. # # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003d28 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003d37 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003d56 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003d77 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003ddb R_386_32 # .init.data # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003e0e R_386_32 # .init.data # Error: ./drivers/isdn/hisax/elsa.o .text refers to 00003e20 R_386_32 # .init.data # # Signed-off-by: maximilian attems # Acked-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/elsa.c # 2005/03/28 14:21:36-08:00 janitor@sternwelten.at +2 -2 # elsa eliminate bad section references # # ChangeSet # 2005/03/28 19:53:49-08:00 janitor@sternwelten.at # [PATCH] teles3: eliminate bad section references # # Fix teles3 section references: # convert __initdata to __devinitdata. # # Error: ./drivers/isdn/hisax/teles3.o .text refers to 000011ab R_386_32 # .init.data # Error: ./drivers/isdn/hisax/teles3.o .text refers to 000011ba R_386_32 # .init.data # Error: ./drivers/isdn/hisax/teles3.o .text refers to 000011e0 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/teles3.o .text refers to 000011fd R_386_32 # .init.data # Error: ./drivers/isdn/hisax/teles3.o .text refers to 0000128c R_386_32 # .init.data # Error: ./drivers/isdn/hisax/teles3.o .text refers to 00001294 R_386_32 # .init.data # Error: ./drivers/isdn/hisax/teles3.o .text refers to 000012a6 R_386_32 # .init.data # # Signed-off-by: maximilian attems # Acked-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/teles3.c # 2005/03/28 14:21:36-08:00 janitor@sternwelten.at +2 -2 # teles3: eliminate bad section references # # ChangeSet # 2005/03/28 19:53:31-08:00 janitor@sternwelten.at # [PATCH] w6692: eliminate bad section references # # Fix w6692 section references: # added __init to W6692Version(). # # Error: ./drivers/isdn/hisax/w6692.o .text refers to 0000002f R_386_32 # .init.data # # Signed-off-by: maximilian attems # Acked-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/w6692.c # 2005/03/28 14:21:36-08:00 janitor@sternwelten.at +1 -1 # w6692: eliminate bad section references # # ChangeSet # 2005/03/28 19:53:15-08:00 solar@openwall.com # [PATCH] Enable gcc warnings for vsprintf/vsnprintf with "format" attribute # # Extend the gcc printk format-string checking. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/kernel.h # 2005/03/28 14:21:36-08:00 solar@openwall.com +11 -6 # Enable gcc warnings for vsprintf/vsnprintf with "format" attribute # # ChangeSet # 2005/03/28 19:52:59-08:00 akpm@osdl.org # [PATCH] revert recent gconfig changes # # Revert a 2.6.11 patch "make gconfig work with gtk-2.4". It causes the cute # little pixmap buttons to not appear any more. # # Hopefully this will motivate someone to have another attempt at fixing gconf # for gtk-2.4. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/kconfig/gconf.glade # 2005/03/28 14:21:36-08:00 akpm@osdl.org +19 -21 # revert recent gconfig changes # # scripts/kconfig/gconf.c # 2005/03/28 14:21:36-08:00 akpm@osdl.org +33 -36 # revert recent gconfig changes # # ChangeSet # 2005/03/28 19:52:42-08:00 domen@coderock.org # [PATCH] cdrom/cdu31a: use wait_event # # Use wait_event instead of sleep_on. # Also, remove two unused variables. # # Signed-off-by: Domen Puncer # Acked-by: Ondrej Zary # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdu31a.c # 2005/03/28 14:21:35-08:00 domen@coderock.org +26 -16 # cdrom/cdu31a: use wait_event # # ChangeSet # 2005/03/28 19:52:26-08:00 domen@coderock.org # [PATCH] cdrom/cdu31a: locking fixes # # Use semaphores instead of sleep_on*. # Stolen from patch: http://lkml.org/lkml/2004/12/18/107 from # Ondrej Zary # # Signed-off-by: Domen Puncer # Acked-by: Ondrej Zary # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdu31a.c # 2005/03/28 14:42:51-08:00 domen@coderock.org +140 -143 # cdrom/cdu31a: locking fixes # # ChangeSet # 2005/03/28 19:52:09-08:00 domen@coderock.org # [PATCH] cdrom/cdu31a: cleanups # # Pretty trivial cleanups: # - reordered #includes # - improved some printk's (note: this actually enabled some debug printk's) # - removed ()'s from returns # - removed SONY_POLL_EACH_BYTE, as grep doesn't find it anywhere else # - removed panic() as it can't happen. # # Signed-off-by: Domen Puncer # Acked-by: Ondrej Zary # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdu31a.c # 2005/03/28 14:42:51-08:00 domen@coderock.org +150 -239 # cdrom/cdu31a: cleanups # # ChangeSet # 2005/03/28 19:51:53-08:00 mingo@elte.hu # [PATCH] break_lock fix # # lock->break_lock is set when a lock is contended, but cleared only in # cond_resched_lock. Users of need_lockbreak (journal_commit_transaction, # copy_pte_range, unmap_vmas) don't necessarily use cond_resched_lock on it. # # So, if the lock has been contended at some time in the past, break_lock # remains set thereafter, and the fastpath keeps dropping lock unnecessarily. # Hanging the system if you make a change like I did, forever restarting a # loop before making any progress. And even users of cond_resched_lock may # well suffer an initial unnecessary lockbreak. # # There seems to be no point at which break_lock can be cleared when # unlocking, any point being either too early or too late; but that's okay, # it's only of interest while the lock is held. So clear it whenever the # lock is acquired - and any waiting contenders will quickly set it again. # Additional locking overhead? well, this is only when CONFIG_PREEMPT is on. # # Since cond_resched_lock's spin_lock clears break_lock, no need to clear it # itself; and use need_lockbreak there too, preferring optimizer to #ifdefs. # # Signed-off-by: Hugh Dickins # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/spinlock.c # 2005/03/28 14:21:35-08:00 mingo@elte.hu +2 -0 # break_lock fix # # kernel/sched.c # 2005/03/28 14:21:35-08:00 mingo@elte.hu +1 -4 # break_lock fix # # ChangeSet # 2005/03/28 19:51:36-08:00 petero2@telia.com # [PATCH] DVD-RAM support for pktcdvd # # This patch makes it possible to use the packet writing driver with # DVD-RAM discs. The pktcdvd driver is not needed for writing to DVD-RAM # discs but it can improve write performance. Polgár István reports: # # I wrote 178716Kb data to DVD-RAM without pktcdvd driver within # 4.54 minutes. With pktcdvd driver it took me 2.33 minutes. # # Signed-off-by: Peter Osterlund # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/pktcdvd.c # 2005/03/28 14:21:35-08:00 petero2@telia.com +7 -2 # DVD-RAM support for pktcdvd # # Documentation/cdrom/packet-writing.txt # 2005/03/28 14:21:35-08:00 petero2@telia.com +8 -0 # DVD-RAM support for pktcdvd # # ChangeSet # 2005/03/28 19:51:19-08:00 petero2@telia.com # [PATCH] Use __init and __exit in pktcdvd # # This patch adds __init and __exit annotations to the pktcdvd driver. # # Signed-off-by: Peter Osterlund # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/pktcdvd.c # 2005/03/28 14:42:51-08:00 petero2@telia.com +2 -2 # Use __init and __exit in pktcdvd # # ChangeSet # 2005/03/28 19:51:02-08:00 dsw@gelato.unsw.edu.au # [PATCH] Stallion driver module clean up # # These two patches continue the work that Wayne Meissner started and are # against the current bk tree. # # These patches allow the stallion driver to be built-in and loaded at boot # time, the current #ifdef MODULE only allows the init code to be included if # compiled as a module. # # Tested for compile, boot and running on our console server as module and # built-in. # # Signed-off-by Darren Williams # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/stallion.c # 2005/03/28 14:21:34-08:00 dsw@gelato.unsw.edu.au +7 -22 # Stallion driver module clean up # # ChangeSet # 2005/03/28 19:50:45-08:00 miklos@szeredi.hu # [PATCH] Can't unmount bad inode # # This patch fixes a problem when a inode which is the root of a mount # becomes bad (make_bad_inode()). In this case follow_link will return # -EIO, so the name resolution fails, and umount won't work. The # solution is just to remove the follow_link method from bad_inode_ops. # Any filesystem operation (other than unmount) will still fail, since # every other method returns -EIO. # # A test case for this is: # # 1) export an smbfs on host A and mount the share on host B # # 2) create directory X on A under the exported directory # # 3) bind mount X to Y on B (Y need not be under the share) # # 4) remove directory X, and create regular file X (same name) on A # # 5) stat X on B, this will make X a bad inode (file type changed) # # 6) umount Y # # Without the patch applied, umount won't succeed, and a reboot is # necessary to get rid of the mount. # # With the patch applied, umount will succeed. # # The same is true for any filesystem which uses make_bad_inode() to # mark an existing inode bad (NFS, SMBFS, FUSE, etc...). # # Signed-off-by: Miklos Szeredi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/bad_inode.c # 2005/03/28 14:21:34-08:00 miklos@szeredi.hu +2 -12 # Can't unmount bad inode # # ChangeSet # 2005/03/28 19:50:29-08:00 richtera@us.ibm.com # [PATCH] s390: claw network device driver # # Add support for claw network devices. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/claw.h # 2005/03/28 14:21:34-08:00 richtera@us.ibm.com +335 -0 # s390: claw network device driver # # drivers/s390/net/claw.c # 2005/03/28 14:21:34-08:00 richtera@us.ibm.com +4447 -0 # s390: claw network device driver # # drivers/s390/net/claw.h # 2005/03/28 14:21:34-08:00 richtera@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/net/claw.h # # drivers/s390/net/claw.c # 2005/03/28 14:21:34-08:00 richtera@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/net/claw.c # # drivers/s390/net/Kconfig # 2005/03/28 14:21:34-08:00 richtera@us.ibm.com +9 -0 # s390: claw network device driver # # ChangeSet # 2005/03/28 19:50:10-08:00 pavlic@de.ibm.com # [PATCH] s390: qeth tcp segmentation offload # # Add support for TCP Segmentation Offload to the qeth network driver. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/qeth_tso.h # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +58 -0 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_tso.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +285 -0 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_sys.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +56 -0 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_proc.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +9 -2 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_mpc.h # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +4 -1 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_main.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +418 -130 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_eddp.h # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +85 -0 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_eddp.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +643 -0 # s390: qeth tcp segmentation offload # # drivers/s390/net/qeth_tso.h # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/net/qeth_tso.h # # drivers/s390/net/qeth_tso.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/net/qeth_tso.c # # drivers/s390/net/qeth_eddp.h # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/net/qeth_eddp.h # # drivers/s390/net/qeth_eddp.c # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/s390/net/qeth_eddp.c # # drivers/s390/net/qeth.h # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +80 -14 # s390: qeth tcp segmentation offload # # drivers/s390/net/Makefile # 2005/03/28 14:21:34-08:00 pavlic@de.ibm.com +1 -1 # s390: qeth tcp segmentation offload # # ChangeSet # 2005/03/28 19:49:52-08:00 thoss@de.ibm.com # [PATCH] s390: qeth blkt tuning # # Add support for qeth BLKT tuning, the OSA inbound blocking or packing # algorithm. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/qeth_sys.c # 2005/03/28 14:42:53-08:00 thoss@de.ibm.com +116 -0 # s390: qeth blkt tuning # # drivers/s390/net/qeth_main.c # 2005/03/28 14:42:53-08:00 thoss@de.ibm.com +22 -13 # s390: qeth blkt tuning # # drivers/s390/net/qeth.h # 2005/03/28 14:42:53-08:00 thoss@de.ibm.com +9 -0 # s390: qeth blkt tuning # # ChangeSet # 2005/03/28 19:49:36-08:00 ptiedem@de.ibm.com # [PATCH] s390: qeth 1920 device suppor # # cio/qeth changes: # - Add new api to common i/o layer for qeth 1920 device support. # - Add 1920 device support to qeth. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/ccwdev.h # 2005/03/28 14:21:33-08:00 ptiedem@de.ibm.com +1 -0 # s390: qeth 1920 device suppor # # drivers/s390/net/qeth_sys.c # 2005/03/28 14:42:53-08:00 ptiedem@de.ibm.com +12 -2 # s390: qeth 1920 device suppor # # drivers/s390/net/qeth_main.c # 2005/03/28 14:42:53-08:00 ptiedem@de.ibm.com +43 -5 # s390: qeth 1920 device suppor # # drivers/s390/net/qeth.h # 2005/03/28 14:42:53-08:00 ptiedem@de.ibm.com +1 -1 # s390: qeth 1920 device suppor # # drivers/s390/cio/device_ops.c # 2005/03/28 14:21:33-08:00 ptiedem@de.ibm.com +11 -0 # s390: qeth 1920 device suppor # # drivers/s390/cio/chsc.h # 2005/03/28 14:21:33-08:00 ptiedem@de.ibm.com +14 -0 # s390: qeth 1920 device suppor # # drivers/s390/cio/chsc.c # 2005/03/28 14:21:33-08:00 ptiedem@de.ibm.com +107 -2 # s390: qeth 1920 device suppor # # ChangeSet # 2005/03/28 19:49:20-08:00 pavlic@de.ibm.com # [PATCH] s390: qeth layer2 fixes # # qeth network driver changes: # - Clear qeth header struct in qeth_fill_header. # - Drop broadcast packets in qeth_send_packet if the card # can't do broadcasts. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/qeth_main.c # 2005/03/28 14:42:53-08:00 pavlic@de.ibm.com +10 -3 # s390: qeth layer2 fixes # # ChangeSet # 2005/03/28 19:49:03-08:00 wein@de.ibm.com # [PATCH] s390: dasd preferred path support # # Add code to the dasd driver to select the I/O path based on the path # preferences of the device. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/ccwdev.h # 2005/03/28 14:42:53-08:00 wein@de.ibm.com +2 -0 # s390: dasd preferred path support # # drivers/s390/cio/device_ops.c # 2005/03/28 14:42:53-08:00 wein@de.ibm.com +16 -6 # s390: dasd preferred path support # # drivers/s390/block/dasd_erp.c # 2005/03/28 14:21:33-08:00 wein@de.ibm.com +2 -1 # s390: dasd preferred path support # # drivers/s390/block/dasd_eckd.h # 2005/03/28 14:21:33-08:00 wein@de.ibm.com +7 -1 # s390: dasd preferred path support # # drivers/s390/block/dasd_eckd.c # 2005/03/28 14:21:33-08:00 wein@de.ibm.com +69 -28 # s390: dasd preferred path support # # drivers/s390/block/dasd.c # 2005/03/28 14:21:33-08:00 wein@de.ibm.com +17 -4 # s390: dasd preferred path support # # ChangeSet # 2005/03/28 19:48:46-08:00 bstroesser@fijitsu-siemens.com # [PATCH] s390: signal stack bug # # If a signal handler is set to use the signal stack (SA_ONSTACK), but the # signal stack is disabled, the signal frame should be written to the current # stack without stack switching. # # The reason for the bug is get_sigframe() using on_sig_stack() instead of # sas_ss_flags(), which would be ok. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/signal.c # 2005/03/28 14:21:33-08:00 bstroesser@fijitsu-siemens.com +1 -1 # s390: signal stack bug # # ChangeSet # 2005/03/28 19:48:30-08:00 schwidefsky@de.ibm.com # [PATCH] s390: kernel faults # # Correct check for user space faults. If the failing address space is in the # secondary address space and uaccess has been switched to KERNEL_DS with # set_fs, check_user_space() erroneously returns 1. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/mm/fault.c # 2005/03/28 14:21:33-08:00 schwidefsky@de.ibm.com +5 -4 # s390: kernel faults # # ChangeSet # 2005/03/28 19:48:13-08:00 vda@port.imtp.ilyichevsk.odessa.ua # [PATCH] s390: swapped memset arguments. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_aux.c # 2005/03/28 14:21:33-08:00 vda@port.imtp.ilyichevsk.odessa.ua +1 -1 # s390: swapped memset arguments. # # ChangeSet # 2005/03/28 19:47:57-08:00 blaisorblade@yahoo.it # [PATCH] uml: fix "cond. expr. as lvalues" warning # # Gcc 3.4.3 (and probably any 3.4) emits some "deprecation" warnings currently # about usages of CHOOSE_MODE, since the below syntax has been deprecated: # # (a ? foo: bar) = foobar; # which often results from expansion of: # CHOOSE_MODE(foo, bar) = foobar; # # So add an additional __CHOOSE_MODE syntax for users which need to get a # lvalue, which uses (a ? &foo : &bar) inside a function, casts the result to # the correct type and dereference the pointer, and use it where needed (i.e. # in ) # # The patch builds and runs correctly (this has been tested on i386 only, not on # x86_64), and removes all the warnings. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/include/sysdep-x86_64/ptrace.h # 2005/03/28 14:21:33-08:00 blaisorblade@yahoo.it +29 -29 # uml: fix "cond. expr. as lvalues" warning # # arch/um/include/sysdep-i386/ptrace.h # 2005/03/28 14:21:33-08:00 blaisorblade@yahoo.it +18 -18 # uml: fix "cond. expr. as lvalues" warning # # arch/um/include/choose-mode.h # 2005/03/28 14:21:33-08:00 blaisorblade@yahoo.it +7 -0 # uml: fix "cond. expr. as lvalues" warning # # ChangeSet # 2005/03/28 19:47:41-08:00 blaisorblade@yahoo.it # [PATCH] uml: real fix for __gcov_init symbols # # Correctly export __gcov_init for cases where it's needed, by adding a weak # definition for the case when GCC does not define this symbol and letting it # being overriden by the real definition when GCC defines it (recent ones). # # Can't be implemented as a test on GCC version because SuSE has a crippled GCC, # declared as 3.3.4 but having a lot of backported features. # # Also, since gcc 3.4.3 requires profiling options even during linking, add # profiling options to final link stage. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # CC: Anton Altaparmakov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/gmon_syms.c # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +14 -6 # uml: real fix for __gcov_init symbols # # arch/um/Makefile-skas # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +6 -4 # uml: real fix for __gcov_init symbols # # ChangeSet # 2005/03/28 19:47:24-08:00 blaisorblade@yahoo.it # [PATCH] uml: add kconfig debug deps # # Add some needed dependencies for some debug options and hide the MAGIC_SYSRQ # option for UML, since it displays this option in another menu. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/Kconfig.debug # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +1 -1 # uml: add kconfig debug deps # # arch/um/Kconfig.debug # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +3 -3 # uml: add kconfig debug deps # # ChangeSet # 2005/03/28 19:47:08-08:00 blaisorblade@yahoo.it # [PATCH] uml - kbuild: link cmd # # Use the cmd_* syntax to define a command for symlink creations in UML (to # reuse files from other archs). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/sys-x86_64/Makefile # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +8 -8 # uml - kbuild: link cmd # # arch/um/sys-i386/Makefile # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +5 -8 # uml - kbuild: link cmd # # arch/um/scripts/Makefile.rules # 2005/03/28 14:21:32-08:00 blaisorblade@yahoo.it +3 -0 # uml - kbuild: link cmd # # ChangeSet # 2005/03/28 19:46:51-08:00 blaisorblade@yahoo.it # [PATCH] uml: factor out common code in user-obj handling # # With Vadim Abrossimov # # *) Handle USER_OBJS through the general Kbuild infrastructure; the trick we # use is to change c_flags only for USER_OBJS. # # This ain't at all worse than the previous kludgy solution, enables us to # use a better dependency handling and to support MODVERSIONS. # # And it is UML-specific, as a bonus. # # So, no "it ain't clean enough" reasoning is allowed to hold this patch # until you find a better solution. Leaving there the current broken code is # not accepted. # # *) Move similar definitions from Makefiles to the newly created # arch/um/scripts/Makefile.rules and include it everywhere needed. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hostfs/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -8 # uml: factor out common code in user-obj handling # # arch/um/sys-x86_64/Makefile # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +3 -5 # uml: factor out common code in user-obj handling # # arch/um/sys-i386/Makefile # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +2 -4 # uml: factor out common code in user-obj handling # # arch/um/scripts/Makefile.rules # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +10 -0 # uml: factor out common code in user-obj handling # # arch/um/os-Linux/sys-x86_64/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -3 # uml: factor out common code in user-obj handling # # arch/um/scripts/Makefile.rules # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/scripts/Makefile.rules # # arch/um/os-Linux/sys-i386/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -3 # uml: factor out common code in user-obj handling # # arch/um/os-Linux/drivers/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -7 # uml: factor out common code in user-obj handling # # arch/um/os-Linux/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -4 # uml: factor out common code in user-obj handling # # arch/um/kernel/tt/ptproxy/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -3 # uml: factor out common code in user-obj handling # # arch/um/kernel/tt/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +5 -7 # uml: factor out common code in user-obj handling # # arch/um/kernel/skas/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +3 -5 # uml: factor out common code in user-obj handling # # arch/um/kernel/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +7 -7 # uml: factor out common code in user-obj handling # # arch/um/drivers/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -7 # uml: factor out common code in user-obj handling # # ChangeSet # 2005/03/28 19:46:33-08:00 blaisorblade@yahoo.it # [PATCH] Uml: little build fixes # # From: Al Viro # # Easier parts from "cross-build" (or "UML-kbuild") patch from Al Viro: # # *) abuses of host cc/ld/objcopy/paths are gone # *) some #include path fixes # *) other little abuses fixed # *) remove LIBC_DIR var, ask gcc where libc.a is placed. # # This creates no problem so can be merged very likely. Note: only tested on # i386, give a run on x86-64. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: "Vadim Abrossimov" # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/archparam-i386.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -1 # Uml: little build fixes # # fs/hppfs/Makefile # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +0 -10 # Uml: little build fixes # # arch/um/sys-i386/Makefile # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +1 -1 # Uml: little build fixes # # arch/um/kernel/tt/Makefile # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +2 -4 # Uml: little build fixes # # arch/um/include/sysdep-x86_64/sigcontext.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -1 # Uml: little build fixes # # arch/um/include/sysdep-i386/sigcontext.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -1 # Uml: little build fixes # # arch/um/Makefile-x86_64 # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +0 -4 # Uml: little build fixes # # ChangeSet # 2005/03/28 19:46:15-08:00 blaisorblade@yahoo.it # [PATCH] uml: disable more hardware kconfig opt and rename USERMODE to UML # # Disable some hardware-only configuration options when configuring for ARCH=um. # # By the way, we rename CONFIG_USERMODE to CONFIG_UML, as requested some time # ago by the UML maintainer Jeff Dike. # # We also update defconfig as a consequence of all this. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/Kconfig # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -1 # uml: disable more hardware kconfig opt and rename USERMODE to UML # # drivers/net/Kconfig # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +5 -3 # uml: disable more hardware kconfig opt and rename USERMODE to UML # # drivers/char/Kconfig # 2005/03/28 14:42:37-08:00 blaisorblade@yahoo.it +1 -1 # uml: disable more hardware kconfig opt and rename USERMODE to UML # # drivers/block/Kconfig # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +5 -5 # uml: disable more hardware kconfig opt and rename USERMODE to UML # # arch/um/defconfig # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +7 -36 # uml: disable more hardware kconfig opt and rename USERMODE to UML # # arch/um/Kconfig # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -2 # uml: disable more hardware kconfig opt and rename USERMODE to UML # # ChangeSet # 2005/03/28 19:45:58-08:00 blaisorblade@yahoo.it # [PATCH] uml: extend cmd line limits # # From: "Catalin(ux aka Dino) BOIE" , Paolo 'Blaisorblade' # Giarrusso , Jeff Dike Increase UML # command line size. And fix a crash from passing an overly-long command line # to UML. # # XXX: check that init can handle 128 params and 128 env. var. The original # patch set this limit to 256, but it seems me too much. Think! # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/main.c # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +2 -2 # uml: extend cmd line limits # # init/Kconfig # 2005/03/28 14:42:56-08:00 blaisorblade@yahoo.it +8 -0 # uml: extend cmd line limits # # include/asm-um/setup.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +4 -1 # uml: extend cmd line limits # # arch/um/kernel/user_util.c # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +0 -15 # uml: extend cmd line limits # # arch/um/kernel/um_arch.c # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +20 -14 # uml: extend cmd line limits # # arch/um/include/user_util.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +1 -1 # uml: extend cmd line limits # # ChangeSet # 2005/03/28 19:45:42-08:00 blaisorblade@yahoo.it # [PATCH] uml: cpu_relax fix # # Use rep_nop instead of barrier for cpu_relax, following $(SUBARCH)'s doing # that (i.e. i386 and x86_64). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/processor-x86_64.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +8 -0 # uml: cpu_relax fix # # include/asm-um/processor-i386.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +8 -0 # uml: cpu_relax fix # # include/asm-um/processor-generic.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +0 -2 # uml: cpu_relax fix # # ChangeSet # 2005/03/28 19:45:26-08:00 blaisorblade@yahoo.it # [PATCH] uml: fix compile # # Quick compile fix for i386-only change (which interacts with UML since we # include headers from include/asm-$(SUBARCH)), which keeps the old behaviour # and hence should cause no problems. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/signal.h # 2005/03/28 14:21:31-08:00 blaisorblade@yahoo.it +3 -0 # uml: fix compile # # ChangeSet # 2005/03/28 19:45:09-08:00 blaisorblade@yahoo.it # [PATCH] uml: cope with uml_net security fix # # Pass the interface to close as an fd besides that by name... passing it by # name does not work with newer uml_net because that allows to ifconfig down # arbitrary interfaces, while if you have an open fd to the SLIP interface it # means you have full access to it (and thus can close it). Passing only by fd # does not work with older utilities, so we do both things (which does not # hurt). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/slip_user.c # 2005/03/28 14:21:30-08:00 blaisorblade@yahoo.it +5 -1 # uml: cope with uml_net security fix # # ChangeSet # 2005/03/28 19:44:51-08:00 takata@linux-m32r.org # [PATCH] m32r_sio driver update # # I made a patch to update m32r_sio driver. # # Compile checked and tested on a M32700UT eva board with SMP kernel. # It looks working... # # __register_m32r_sio, register_m32r_sio, unregister_m32r_sio are still # remained. I'm going to take a look them after. # # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/serial_core.h # 2005/03/28 14:42:39-08:00 takata@linux-m32r.org +3 -0 # m32r_sio driver update # # include/asm-m32r/serial.h # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +19 -123 # m32r_sio driver update # # drivers/serial/m32r_sio_reg.h # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +0 -190 # m32r_sio driver update # # drivers/serial/m32r_sio.h # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +0 -1 # m32r_sio driver update # # drivers/serial/m32r_sio.c # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +37 -119 # m32r_sio driver update # # ChangeSet # 2005/03/28 19:44:35-08:00 takata@linux-m32r.org # [PATCH] m32r: Fix M32102 I-cache invalidation # # This patch fixes I-cache invalidation operation for M32102 chip, which is # one of m32r MMU-less targets. # # Before this fix, the m32r kernel for M32102 chip missed I-cache # invalidation operation and switched off I-cache unintentionally. This bug # caused awful performance degradation. # # Signed-off-by: Mamoru Sakugawa # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/mm/cache.c # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +2 -5 # m32r: Fix M32102 I-cache invalidation # # ChangeSet # 2005/03/28 19:44:19-08:00 takata@linux-m32r.org # [PATCH] m32r: Update MMU-less support #3 # # This patch is for updating m32r's MMU-less support. # # * arch/m32r/boot/compressed/Makefile: # Use m32r-elf-gcc for MMU-less targets; change ELF object format # from elf32-m32r-linux to elf32-m32r for !CONFIG_MMU. # # * arch/m32r/boot/compressed/head.S: Set up cache for M32102 chip. # * arch/m32r/boot/setup.S: ditto. # # * arch/m32r/kernel/module.c: Module support for !CONFIG_MMU. # # Signed-off-by: Kazuhiro Inaoka # Signed-off-by: Hayato Fujiwara # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/mm/fault-nommu.c # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +1 -0 # m32r: Update MMU-less support #3 # # arch/m32r/kernel/module.c # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +6 -0 # m32r: Update MMU-less support #3 # # arch/m32r/boot/setup.S # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +5 -0 # m32r: Update MMU-less support #3 # # arch/m32r/boot/compressed/head.S # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +5 -0 # m32r: Update MMU-less support #3 # # arch/m32r/boot/compressed/Makefile # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +5 -0 # m32r: Update MMU-less support #3 # # ChangeSet # 2005/03/28 19:44:02-08:00 takata@linux-m32r.org # [PATCH] m32r: Update MMU-less support #2 # # This patch is for updating m32r's MMU-less support. # # * arch/m32r/boot/compressed/m32r_sio.c: # - Fix serial output routine # # * include/asm-m32r/mmu.h: # - Update mm_context_t definition # # Signed-off-by: Yoshinori Sato # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-m32r/mmu.h # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +2 -16 # m32r: Update MMU-less support #2 # # arch/m32r/boot/compressed/m32r_sio.c # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +6 -1 # m32r: Update MMU-less support #2 # # ChangeSet # 2005/03/28 19:43:45-08:00 takata@linux-m32r.org # [PATCH] m32r: Update MMU-less support #1 # # This patch is for updating m32r's MMU-less support. # # * arch/m32r/kernel/entry.s: # - Fix syscall table for !CONFIG_MMU # # * arch/m32r/kernel/traps.c: # - Fix EIT vector setup routine for !CONFIG_MMU # # Signed-off-by: Naoto Sugai # Signed-off-by: Hirokazu Takata # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/m32r/kernel/traps.c # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +2 -0 # m32r: Update MMU-less support #1 # # arch/m32r/kernel/entry.S # 2005/03/28 14:21:30-08:00 takata@linux-m32r.org +11 -10 # m32r: Update MMU-less support #1 # # ChangeSet # 2005/03/28 19:43:28-08:00 pavel@ucw.cz # [PATCH] swsusp: kill swsusp_restore # # This kills swsusp_resume; it should be arch-neutral but some i386 code # sneaked in. And arch-specific code is better done in assembly anyway. # Plus it fixes memory leaks in error paths. # # Signed-off-by: Rafael J. Wysocki # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/swsusp.c # 2005/03/28 14:21:30-08:00 pavel@ucw.cz +5 -11 # swsusp: kill swsusp_restore # # arch/x86_64/kernel/suspend_asm.S # 2005/03/28 14:21:30-08:00 pavel@ucw.cz +13 -2 # swsusp: kill swsusp_restore # # arch/i386/power/swsusp.S # 2005/03/28 14:21:30-08:00 pavel@ucw.cz +12 -1 # swsusp: kill swsusp_restore # # ChangeSet # 2005/03/28 19:43:12-08:00 pavel@ucw.cz # [PATCH] swsusp: small updates # # This kills unused macro and write-only variable, and adds messages where # something goes wrong with suspending devices. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/power/swsusp.c # 2005/03/28 14:42:58-08:00 pavel@ucw.cz +3 -4 # swsusp: small updates # # kernel/power/main.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +6 -2 # swsusp: small updates # # include/linux/suspend.h # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +0 -2 # swsusp: small updates # # ChangeSet # 2005/03/28 19:42:55-08:00 pavel@ucw.cz # [PATCH] pm: remove obsolete pm_* from vt.c # # Those functions are useless these days, and should be gone. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/vt.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +0 -27 # pm: remove obsolete pm_* from vt.c # # ChangeSet # 2005/03/28 19:42:39-08:00 pavel@ucw.cz # [PATCH] suspend-to-ram: update video.txt with more systems # # This updates video.txt documentation. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/power/video.txt # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +15 -16 # suspend-to-ram: update video.txt with more systems # # ChangeSet # 2005/03/28 19:42:22-08:00 pavel@ucw.cz # [PATCH] swsusp: Add missing refrigerator calls # # This adds few more places where it is possible freeze kernel threads. # # From: Nigel Cunningham # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcsock.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +1 -0 # swsusp: Add missing refrigerator calls # # net/rxrpc/krxtimod.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +2 -0 # swsusp: Add missing refrigerator calls # # net/rxrpc/krxsecd.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +2 -0 # swsusp: Add missing refrigerator calls # # net/rxrpc/krxiod.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +2 -0 # swsusp: Add missing refrigerator calls # # kernel/signal.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +2 -0 # swsusp: Add missing refrigerator calls # # fs/lockd/clntproc.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +1 -0 # swsusp: Add missing refrigerator calls # # fs/afs/kafstimod.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +2 -0 # swsusp: Add missing refrigerator calls # # fs/afs/kafsasyncd.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +2 -0 # swsusp: Add missing refrigerator calls # # drivers/pnp/pnpbios/core.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +5 -1 # swsusp: Add missing refrigerator calls # # drivers/media/video/tvaudio.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +1 -0 # swsusp: Add missing refrigerator calls # # drivers/media/video/msp3400.c # 2005/03/28 14:21:29-08:00 pavel@ucw.cz +6 -2 # swsusp: Add missing refrigerator calls # # ChangeSet # 2005/03/28 19:42:04-08:00 rth@twiddle.net # [PATCH] alpha spinlock.h update # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-alpha/spinlock.h # 2005/03/28 14:21:29-08:00 rth@twiddle.net +55 -44 # alpha spinlock.h update # # ChangeSet # 2005/03/28 19:41:48-08:00 rddunlap@osdl.org # [PATCH] kernel-parameters: IA-32/X86-64 cleanups # # Convert "kernel-parameters.txt" to use IA-32 in place of x86 # and X86-64 in place of x86_64, to be in line with other # architecture documentation conventions. # Add reference to Documentation/x86_64/boot-options.txt . # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/kernel-parameters.txt # 2005/03/28 14:21:29-08:00 rddunlap@osdl.org +5 -2 # kernel-parameters: IA-32/X86-64 cleanups # # ChangeSet # 2005/03/28 19:41:32-08:00 blaisorblade@yahoo.it # [PATCH] x86-64: forgot asmlinkage on sys_mmap # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/sys_x86_64.c # 2005/03/28 14:21:29-08:00 blaisorblade@yahoo.it +1 -1 # x86-64: forgot asmlinkage on sys_mmap # # ChangeSet # 2005/03/28 19:41:15-08:00 kenneth.w.chen@intel.com # [PATCH] x86_64: hugetlb fix # # x86-64 may have to allocate a bunch of upper levels of pagetables, and those # allocations may fail. When they do, unmap_hugepage_range() needs to be able # to clean up after them. # # Acked-by: William Lee Irwin III # Cc: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/hugetlbpage.c # 2005/03/28 14:21:28-08:00 kenneth.w.chen@intel.com +5 -2 # x86_64: hugetlb fix # # ChangeSet # 2005/03/28 19:40:59-08:00 blaisorblade@yahoo.it # [PATCH] x86_64: remove old decl (trivial) # # vm_force_exec32 and friends were still alive on 2.6.9 release, but now (and # in 2.6.10) they seem deleted. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/page.h # 2005/03/28 14:21:28-08:00 blaisorblade@yahoo.it +0 -4 # x86_64: remove old decl (trivial) # # ChangeSet # 2005/03/28 19:40:43-08:00 blaisorblade@yahoo.it # [PATCH] x86-64: kconfig typo # # Trivial typo: # default off # instead of # default n # in kbuild. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/Kconfig # 2005/03/28 14:21:28-08:00 blaisorblade@yahoo.it +1 -1 # x86-64: kconfig typo # # ChangeSet # 2005/03/28 19:40:26-08:00 ak@suse.de # [PATCH] x86_64: Clean up the IOMMU initialisation a bit # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/pci-gart.c # 2005/03/28 14:21:28-08:00 ak@suse.de +5 -15 # x86_64: Clean up the IOMMU initialisation a bit # # ChangeSet # 2005/03/28 19:40:09-08:00 ak@suse.de # [PATCH] x86_64: Fix missing delay when the TSC counter just overflowed # # Fix missing delay when the TSC counter just overflowed # # Noticed by Jan Beulich # # Signed-off-by: Andi Kleen # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/lib/delay.c # 2005/03/28 14:21:28-08:00 ak@suse.de +1 -1 # x86_64: Fix missing delay when the TSC counter just overflowed # # ChangeSet # 2005/03/28 19:39:53-08:00 ak@suse.de # [PATCH] x86_64: Fix gcc 3.4 warning in bitops.c # # Move include down to avoid: # # arch/x86_64/lib/bitops.c:18: warning: `find_first_zero_bit' declared inline after being called # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/lib/bitops.c # 2005/03/28 14:21:28-08:00 ak@suse.de +2 -1 # x86_64: Fix gcc 3.4 warning in bitops.c # # ChangeSet # 2005/03/28 19:39:37-08:00 ak@suse.de # [PATCH] x86_64: Fix exception stack detection during backtraces # # The test in in_exception_stack was done the wrong way round, which lead to # incorrect exception stack detection in the kernel backtracer. # # Also fix a off by one in the test. # # Noticed by Jan Beulich # # Signed-off-by: Andi Kleen # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/traps.c # 2005/03/28 14:21:28-08:00 ak@suse.de +3 -3 # x86_64: Fix exception stack detection during backtraces # # ChangeSet # 2005/03/28 19:39:20-08:00 ak@suse.de # [PATCH] x86_64: Fix CONFIG_PREEMPT # # Fix a pretty bad bug in the x86-64 preempt support. The test for interrupts # off was done the wrong way round, which would lead to kernel preemption only # when interrupts were off. # # Found by Jan Beulich. # # Signed-off-by: Andi Kleen # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/entry.S # 2005/03/28 14:21:28-08:00 ak@suse.de +1 -1 # x86_64: Fix CONFIG_PREEMPT # # ChangeSet # 2005/03/28 19:39:05-08:00 ak@suse.de # [PATCH] x86_64: Fix SMP fallback to UP # # When falling back to UP on a SMP kernel make sure cpu_sibling_map is always # initialized. Otherwise scheduler_tick eventually runs into incompletely # initialized sched domains and oopses. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/smpboot.c # 2005/03/28 14:21:27-08:00 ak@suse.de +3 -0 # x86_64: Fix SMP fallback to UP # # ChangeSet # 2005/03/28 19:38:48-08:00 ak@suse.de # [PATCH] x86_64: Don't enable interrupts in oopses unconditionally # # The original reason for it was to allow backwards scrolling on the console, # but that didn't work for other reasons anyways. And in some cases the early # interrupt enabling can lead to a nested oops. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/traps.c # 2005/03/28 14:43:01-08:00 ak@suse.de +0 -1 # x86_64: Don't enable interrupts in oopses unconditionally # # ChangeSet # 2005/03/28 19:38:32-08:00 ak@suse.de # [PATCH] x86_64: Only free PMDs and PUDs after other CPUs have been flushed # # This avoids a race on AMD systems where other CPUs could speculatively follow # an already freed page table. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/pgalloc.h # 2005/03/28 14:21:27-08:00 ak@suse.de +3 -2 # x86_64: Only free PMDs and PUDs after other CPUs have been flushed # # ChangeSet # 2005/03/28 19:38:15-08:00 ak@suse.de # [PATCH] x86_64: Change the y2069 bug in the RTC timer code to be a y2100 bug. # # That's ok since x86-64 systems only exist since 2001. More is unfortunately # not possible because the RTC CMOS only supports two decimal digits. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/time.c # 2005/03/28 14:21:27-08:00 ak@suse.de +3 -4 # x86_64: Change the y2069 bug in the RTC timer code to be a y2100 bug. # # ChangeSet # 2005/03/28 19:37:59-08:00 ak@suse.de # [PATCH] x86_64: Fix LDT descriptor # # Fix bug introduced with the TLS system calls in 2.5. The LDT descriptor needs # two entries, not one. It would overlap into the TLS range, which means # setting an LDT would corrupt the first TLS descriptor. # # Noticed by Jan Beulich # # Signed-off-by: Andi Kleen # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/segment.h # 2005/03/28 14:21:27-08:00 ak@suse.de +3 -4 # x86_64: Fix LDT descriptor # # arch/x86_64/kernel/head.S # 2005/03/28 14:21:27-08:00 ak@suse.de +1 -2 # x86_64: Fix LDT descriptor # # ChangeSet # 2005/03/28 19:37:42-08:00 ak@suse.de # [PATCH] x86_64: Always reload CR3 completely when a lazy MM thread drops a MM. # # Always reload CR3 completely when a lazy MM thread drops a MM. This avoids # keeping stale mappings around in the TLB that could be run into by the CPU by # itself (e.g. during prefetches). # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/mmu_context.h # 2005/03/28 14:21:27-08:00 ak@suse.de +8 -2 # x86_64: Always reload CR3 completely when a lazy MM thread drops a MM. # # arch/x86_64/kernel/smp.c # 2005/03/28 14:21:27-08:00 ak@suse.de +2 -1 # x86_64: Always reload CR3 completely when a lazy MM thread drops a MM. # # ChangeSet # 2005/03/28 19:37:27-08:00 ak@suse.de # [PATCH] x86_64: Minor fix to TLB flush IPI # # Minor fix to TLB flush IPI # # Fix minor harmless bug. When doing a flush IPI we used 0xffffffff as the # catch all wildcard, which is a valid address in a 64bit process. When this # page was flushed the IPI handler would do a full flush by mistake instead of # just flushing the page. Use -1ULL instead. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/smp.c # 2005/03/28 14:43:02-08:00 ak@suse.de +1 -1 # x86_64: Minor fix to TLB flush IPI # # ChangeSet # 2005/03/28 19:37:10-08:00 ak@suse.de # [PATCH] x86_64: Fix NMI RTC access race # # Fix NMI RTC access race # # This patch fixes a race between the CMOS clock setting and the NMI code. The # NMI code indiscriminatly sets index registers and values in the same place the # CMOS clock is set. If you are setting the CMOS clock and an NMI occurs, Bad # values could be written to or read from the CMOS RAM, or the NMI operation # might not occur correctly. # # Resetting the NMI is not required on x86_64 (in fact, it should not be done # according to the ICH5 documentation). This patch simply removes the useless # code. # # Signed-off-by: Corey Minyard # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/traps.c # 2005/03/28 14:43:01-08:00 ak@suse.de +0 -9 # x86_64: Fix NMI RTC access race # # ChangeSet # 2005/03/28 19:36:54-08:00 ak@suse.de # [PATCH] x86_64: resume PIT for x86_64 # # resume PIT for x86_64 # # Signed-off-by: Luming Yu # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/time.c # 2005/03/28 14:43:02-08:00 ak@suse.de +3 -1 # x86_64: resume PIT for x86_64 # # arch/x86_64/kernel/i8259.c # 2005/03/28 14:21:26-08:00 ak@suse.de +6 -0 # x86_64: resume PIT for x86_64 # # ChangeSet # 2005/03/28 19:36:37-08:00 ak@suse.de # [PATCH] x86_64: mem=XXX will now limit kernel memory to XXX instead of XXX+1MB # # mem=XXX will now limit kernel memory to XXX instead of XXX+1MB # # Signed-off-by: Suresh Siddha # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/e820.c # 2005/03/28 14:21:26-08:00 ak@suse.de +1 -15 # x86_64: mem=XXX will now limit kernel memory to XXX instead of XXX+1MB # # ChangeSet # 2005/03/28 19:36:20-08:00 ak@suse.de # [PATCH] x86_64: Fix formatting and white space in signal code # # Fix formatting and white space in signal code No functional changes. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/signal.c # 2005/03/28 14:21:26-08:00 ak@suse.de +16 -21 # x86_64: Fix formatting and white space in signal code # # arch/x86_64/ia32/ia32_signal.c # 2005/03/28 14:21:26-08:00 ak@suse.de +20 -18 # x86_64: Fix formatting and white space in signal code # # ChangeSet # 2005/03/28 19:36:04-08:00 ak@suse.de # [PATCH] x86_64: Fix special ISA case in iounmap() # # Fix special ISA case in iounmap(), from i386. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/mm/ioremap.c # 2005/03/28 14:21:26-08:00 ak@suse.de +7 -1 # x86_64: Fix special ISA case in iounmap() # # ChangeSet # 2005/03/28 19:35:48-08:00 ak@suse.de # [PATCH] x86_64: Cleanups in new backtrace code in oprofile # # Remove 4/4 support code. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/oprofile/backtrace.c # 2005/03/28 14:21:26-08:00 ak@suse.de +0 -13 # x86_64: Cleanups in new backtrace code in oprofile # # ChangeSet # 2005/03/28 19:35:31-08:00 ak@suse.de # [PATCH] x86_64: Include PCI-Express configuration # # Include PCI-Express configuration # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/Kconfig # 2005/03/28 14:43:00-08:00 ak@suse.de +2 -0 # x86_64: Include PCI-Express configuration # # ChangeSet # 2005/03/28 19:35:15-08:00 ak@suse.de # [PATCH] x86_64: Work around Tyan BIOS MTRR initialization bug. # # Work around Tyan BIOS MTRR initialization bug. # # Some Tyan AMD BIOS don't initialize the first fixed range MTRR, which causes # it to contain random bogus values. When the MTRR tries to duplicate the MTRR # state to other CPUs at startup it oopses because of this. # # This patch works around this by catching exception while setting MTRRs. # # It would be better to validate all fixed range MTRRs and fix them, but that # would be very complicated code. This simple hack seems to work too (except # that the first 64k of physical memory are likely uncached). A BIOS update # fixes that. # # Signed-off-by: Andi Kleen # Cc: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/msr.h # 2005/03/28 14:21:26-08:00 ak@suse.de +5 -3 # x86_64: Work around Tyan BIOS MTRR initialization bug. # # include/asm-i386/msr.h # 2005/03/28 14:21:26-08:00 ak@suse.de +15 -0 # x86_64: Work around Tyan BIOS MTRR initialization bug. # # arch/i386/kernel/cpu/mtrr/state.c # 2005/03/28 14:21:26-08:00 ak@suse.de +2 -2 # x86_64: Work around Tyan BIOS MTRR initialization bug. # # arch/i386/kernel/cpu/mtrr/mtrr.h # 2005/03/28 14:21:26-08:00 ak@suse.de +1 -0 # x86_64: Work around Tyan BIOS MTRR initialization bug. # # arch/i386/kernel/cpu/mtrr/generic.c # 2005/03/28 14:21:26-08:00 ak@suse.de +20 -10 # x86_64: Work around Tyan BIOS MTRR initialization bug. # # ChangeSet # 2005/03/28 19:34:59-08:00 ak@suse.de # [PATCH] x86_64: Give out of line get_user better calling conventions # # Give out of line get_user better calling conventions # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/uaccess.h # 2005/03/28 14:21:25-08:00 ak@suse.de +6 -7 # x86_64: Give out of line get_user better calling conventions # # arch/x86_64/lib/getuser.S # 2005/03/28 14:21:25-08:00 ak@suse.de +38 -27 # x86_64: Give out of line get_user better calling conventions # # ChangeSet # 2005/03/28 19:34:42-08:00 ak@suse.de # [PATCH] x86_64: Move put_user out of line # # Move put_user out of line. Generates smaller code. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/uaccess.h # 2005/03/28 14:43:03-08:00 ak@suse.de +10 -6 # x86_64: Move put_user out of line # # arch/x86_64/lib/putuser.S # 2005/03/28 14:21:25-08:00 ak@suse.de +89 -0 # x86_64: Move put_user out of line # # arch/x86_64/lib/putuser.S # 2005/03/28 14:21:25-08:00 ak@suse.de +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/lib/putuser.S # # ChangeSet # 2005/03/28 19:34:25-08:00 ak@suse.de # [PATCH] x86_64: Remove stale unused file # # Remove stale unused file # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-putuser.S~52158c2d482e5da # 2005/03/28 19:34:15-08:00 ak@suse.de +0 -0 # Delete: arch/x86_64/lib/putuser.S # # ChangeSet # 2005/03/28 19:34:09-08:00 ak@suse.de # [PATCH] x86_64: Remove unused and broken code in io.h # # Remove unused and broken code in io.h # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/io.h # 2005/03/28 14:21:25-08:00 ak@suse.de +0 -4 # x86_64: Remove unused and broken code in io.h # # ChangeSet # 2005/03/28 19:33:53-08:00 ak@suse.de # [PATCH] x86_64: Remove noisy printk in K8 bus detection code # # Remove noisy printk in K8 bus detection code # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/pci/k8-bus.c # 2005/03/28 14:21:25-08:00 ak@suse.de +7 -3 # x86_64: Remove noisy printk in K8 bus detection code # # ChangeSet # 2005/03/28 19:33:37-08:00 ak@suse.de # [PATCH] x86_64: Remove obsolete comments in vsyscall.c and fix some others. # # Remove obsolete comments in vsyscall.c and fix some others. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/vsyscall.c # 2005/03/28 14:21:25-08:00 ak@suse.de +4 -20 # x86_64: Remove obsolete comments in vsyscall.c and fix some others. # # ChangeSet # 2005/03/28 19:33:20-08:00 mikpe@csd.uu.se # [PATCH] x86_64: fix vsyscall.c syntax error # # arch/x86_64/kernel/vsyscall.c:193: error: syntax error before 'vsyscall_sysctl_change' # # Signed-off-by: Mikael Pettersson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/vsyscall.c # 2005/03/28 14:43:04-08:00 mikpe@csd.uu.se +1 -1 # x86_64: fix vsyscall.c syntax error # # ChangeSet # 2005/03/28 19:33:04-08:00 ak@suse.de # [PATCH] x86_64: Nop out system call instruction in vsyscall page when not needed # # Nop out system call instruction in vsyscall page when not needed. This may # make some attacks more difficult. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/vsyscall.c # 2005/03/28 14:43:04-08:00 ak@suse.de +69 -5 # x86_64: Nop out system call instruction in vsyscall page when not needed # # ChangeSet # 2005/03/28 19:32:48-08:00 ak@suse.de # [PATCH] x86_64: Fix indentation in vsyscall.c. No functional changes. # # Fix indentation in vsyscall.c. No functional changes. Needed for followup # patches. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/vsyscall.c # 2005/03/28 14:43:04-08:00 ak@suse.de +11 -13 # x86_64: Fix indentation in vsyscall.c. No functional changes. # # ChangeSet # 2005/03/28 19:32:32-08:00 ak@suse.de # [PATCH] x86_64: Remove never used obsolete file # # Remove never used obsolete file. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-vsyscall.S~df765d383bb62a2c # 2005/03/28 19:32:22-08:00 ak@suse.de +0 -0 # Delete: arch/x86_64/kernel/vsyscall.S # # ChangeSet # 2005/03/28 19:32:15-08:00 ak@suse.de # [PATCH] x86_64: Move HPET selection into processor specific options # # Move HPET selection into processor specific options. # # Pointed out by Pavel Roskin # Fix the help text up a bit. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/Kconfig # 2005/03/28 14:43:03-08:00 ak@suse.de +15 -17 # x86_64: Move HPET selection into processor specific options # # ChangeSet # 2005/03/28 19:31:58-08:00 ak@suse.de # [PATCH] x86_64: Fix compilation with CONFIG_PROC_FS=n # # Fix compilation with CONFIG_PROC_FS=n # # Pointed out by Randy Dunlap # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/quirks.c # 2005/03/28 14:21:24-08:00 ak@suse.de +2 -0 # x86_64: Fix compilation with CONFIG_PROC_FS=n # # ChangeSet # 2005/03/28 19:31:42-08:00 ak@suse.de # [PATCH] x86_64: Busses array is only indexed with a 8bit value, doesn't make sense # # Busses array is only indexed with a 8bit value, doesn't make sense to make it # bigger. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/mpspec.h # 2005/03/28 14:21:24-08:00 ak@suse.de +1 -1 # x86_64: Busses array is only indexed with a 8bit value, doesn't make sense # # ChangeSet # 2005/03/28 19:31:26-08:00 ak@suse.de # [PATCH] x86_64: Add an 64bit entry path for exec # # Add an 64bit entry path for exec. # # From: # # Also fix up the entry address in vmlinux. # # >> # # I have moved most of what was code duplication until after we are in 64bit # mode. And I have reduced the amount of code in the 32bit entry path a little # bit. # # And to keep things maintainable we now always execute the full 64bit entry # point. # # << # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/vmlinux.lds.S # 2005/03/28 14:21:24-08:00 ak@suse.de +2 -1 # x86_64: Add an 64bit entry path for exec # # arch/x86_64/kernel/trampoline.S # 2005/03/28 14:21:24-08:00 ak@suse.de +5 -17 # x86_64: Add an 64bit entry path for exec # # arch/x86_64/kernel/smpboot.c # 2005/03/28 14:43:01-08:00 ak@suse.de +0 -2 # x86_64: Add an 64bit entry path for exec # # arch/x86_64/kernel/head.S # 2005/03/28 14:43:02-08:00 ak@suse.de +63 -46 # x86_64: Add an 64bit entry path for exec # # ChangeSet # 2005/03/28 19:31:09-08:00 ak@suse.de # [PATCH] x86_64: Add new AMD cpuid flags to cpuinfo # # Add new AMD cpuid flags to cpuinfo # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/setup.c # 2005/03/28 14:21:24-08:00 ak@suse.de +2 -0 # x86_64: Add new AMD cpuid flags to cpuinfo # # ChangeSet # 2005/03/28 19:30:53-08:00 ak@suse.de # [PATCH] x86_64: Update defconfig # # Update defconfig # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/defconfig # 2005/03/28 14:21:23-08:00 ak@suse.de +59 -21 # x86_64: Update defconfig # # ChangeSet # 2005/03/28 19:30:36-08:00 juhl-lkml@dif.dk # [PATCH] rename FPU_*verify_area to FPU_*access_ok # # Since verify_area is going the way of the Dodo soon it seems resonable to # no longer refer to it in wrapper functions/macros. FPU_verify_area and # FPU_code_verify_area have already been converted to call access_ok so now # seems a good time to rename them. This patch makes no functional changes # at all. # # Signed-off-by: Jesper Juhl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/math-emu/reg_ld_str.c # 2005/03/28 14:21:23-08:00 juhl-lkml@dif.dk +24 -24 # rename FPU_*verify_area to FPU_*access_ok # # arch/i386/math-emu/load_store.c # 2005/03/28 14:21:23-08:00 juhl-lkml@dif.dk +3 -3 # rename FPU_*verify_area to FPU_*access_ok # # arch/i386/math-emu/get_address.c # 2005/03/28 14:21:23-08:00 juhl-lkml@dif.dk +9 -9 # rename FPU_*verify_area to FPU_*access_ok # # arch/i386/math-emu/fpu_system.h # 2005/03/28 14:21:23-08:00 juhl-lkml@dif.dk +4 -4 # rename FPU_*verify_area to FPU_*access_ok # # arch/i386/math-emu/fpu_entry.c # 2005/03/28 14:21:23-08:00 juhl-lkml@dif.dk +5 -5 # rename FPU_*verify_area to FPU_*access_ok # # ChangeSet # 2005/03/28 19:30:20-08:00 rddunlap@osdl.org # [PATCH] i386: add kstack=N option (from x86_64) # # Add "kstack=N" boot option for IA-32 (from x86_64). # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/traps.c # 2005/03/28 14:21:23-08:00 rddunlap@osdl.org +7 -0 # i386: add kstack=N option (from x86_64) # # Documentation/kernel-parameters.txt # 2005/03/28 14:42:59-08:00 rddunlap@osdl.org +3 -0 # i386: add kstack=N option (from x86_64) # # ChangeSet # 2005/03/28 19:30:04-08:00 pazke@donpac.ru # [PATCH] es7000 dmi cleanup # # This moves es7000_plat global variable out of DMI code. # # Signed-off-by: Andrey Panin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/mpparse.c # 2005/03/28 14:21:23-08:00 pazke@donpac.ru +1 -0 # es7000 dmi cleanup # # arch/i386/kernel/dmi_scan.c # 2005/03/28 14:21:23-08:00 pazke@donpac.ru +0 -2 # es7000 dmi cleanup # # ChangeSet # 2005/03/28 19:29:48-08:00 jason@rightthere.net # [PATCH] ES7000 Legacy Mappings Update # # This update only affects Unisys' ES7000 machines. # # The patch reflects a change needed to determine which generation of ES7000 # is currently running. The next generation of ES7000s will have # conventional legacy support so the patch accommodates for this. This patch # has been tested and verified on both an authentic 5xx ES7000 box and the # next generation ES7000 box. # # Signed-off-by: Natalie Protasevich # Signed-off-by: Jason Davis # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mach-es7000/es7000plat.c # 2005/03/28 14:21:23-08:00 jason@rightthere.net +13 -1 # ES7000 Legacy Mappings Update # # arch/i386/kernel/mpparse.c # 2005/03/28 14:43:06-08:00 jason@rightthere.net +2 -2 # ES7000 Legacy Mappings Update # # ChangeSet # 2005/03/28 19:29:31-08:00 manfred@colorfullife.com # [PATCH] fix put_user for 80386 # # Linus noticed that put_user doesn't to the manual page table lookup that is # required for cpus without a working WP flag. The solution is simple: if # CONFIG_X86_WP_WORKS_OK is not set, then the put_user macros must call # __copy_to_user_ll(). That function contains the required checks. # # This is already implemented for __put_user_size(), somehow I overlooked # __put_user_{1,2,4,8,X}. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/uaccess.h # 2005/03/28 14:21:23-08:00 manfred@colorfullife.com +17 -0 # fix put_user for 80386 # # ChangeSet # 2005/03/28 19:29:15-08:00 venkatesh.pallipadi@intel.com # [PATCH] rtc_lock is irq-safe # # rtc_lock is held during timer interrupts. So, we should block interrupts # while holding it. # # Signed-off-by: Venkatesh Pallipadi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/acpi/sleep/proc.c # 2005/03/28 14:21:23-08:00 venkatesh.pallipadi@intel.com +3 -2 # rtc_lock is irq-safe # # ChangeSet # 2005/03/28 19:28:58-08:00 zwane@arm.linux.org.uk # [PATCH] APM: fix interrupts enabled in device_power_up # # APM was calling device_power_down and device_power_up with interrupts # enabled, resulting in a few calls to get_cmos_time being done with # interrupts enabled (rtc_lock needs to be acquired with interrupts # disabled). # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apm.c # 2005/03/28 14:21:23-08:00 zwane@arm.linux.org.uk +15 -6 # APM: fix interrupts enabled in device_power_up # # ChangeSet # 2005/03/28 19:28:42-08:00 george@mvista.com # [PATCH] x86: CMOS time update optimisation # # This patch changes the update of the cmos clock to be timer driven rather # than poll driven by the timer interrupt function. If the clock is not # being synced to an outside source the timer is removed and thus system # overhead is nill in that case. The update frequency is still ~11 minutes # and missing the update window still causes a retry in 60 seconds. # # We want the calls to sync_cmos_clock() to be made in a consistent environment. # This was not true when calling it directly from the NTP call code. The # change means that sync_cmos_clock() is ALWAYS called from run_timers(), i.e. # as a timer call back function. # # Also, call the timer code only through the timer interface (set a short timer # to do it from the ntp call). # # Signed-off-by: George Anzinger # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/time.c # 2005/03/28 14:42:48-08:00 george@mvista.com +9 -0 # x86: CMOS time update optimisation # # arch/i386/kernel/time.c # 2005/03/28 14:21:22-08:00 george@mvista.com +53 -22 # x86: CMOS time update optimisation # # ChangeSet # 2005/03/28 19:28:26-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: update VR41xx RTC support # # This patch updates NEC VR4100 series RTC support. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/vr41xx_rtc.c # 2005/03/28 19:28:15-08:00 yuasa@hh.iij4u.or.jp +709 -0 # # drivers/char/Makefile # 2005/03/28 14:21:22-08:00 yuasa@hh.iij4u.or.jp +1 -0 # mips: update VR41xx RTC support # # drivers/char/Kconfig # 2005/03/28 14:42:56-08:00 yuasa@hh.iij4u.or.jp +4 -0 # mips: update VR41xx RTC support # # arch/mips/vr41xx/common/Makefile # 2005/03/28 14:21:22-08:00 yuasa@hh.iij4u.or.jp +1 -1 # mips: update VR41xx RTC support # # drivers/char/vr41xx_rtc.c # 2005/03/28 19:28:15-08:00 yuasa@hh.iij4u.or.jp +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/char/vr41xx_rtc.c # # BitKeeper/deleted/.del-rtc.c~12000209e1cf2be8 # 2005/03/28 19:28:15-08:00 yuasa@hh.iij4u.or.jp +0 -0 # Delete: arch/mips/vr41xx/common/rtc.c # # BitKeeper/deleted/.del-ksyms.c~964236550ac8aed # 2005/03/28 19:28:14-08:00 yuasa@hh.iij4u.or.jp +0 -0 # Delete: arch/mips/vr41xx/common/ksyms.c # # ChangeSet # 2005/03/28 19:27:38-08:00 akpm@osdl.org # [PATCH] mips linkage fix # # Jim Gifford # # The iomap.o functions aren't dragged into the kernel if the build is fully # modular. But modules need them. So link iomap.o into the kernel # unconditionally. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/lib/Makefile # 2005/03/28 14:21:22-08:00 akpm@osdl.org +3 -1 # mips linkage fix # # ChangeSet # 2005/03/28 19:27:21-08:00 michael@ellerman.id.au # [PATCH] ppc64: numa: Remove redundant and broken overlap check # # The numa code used to have to handle the fact that memory regions (as # reported by OF) had been coallesced in the lmb struct and so might overlap # node boundaries. # # Since Mike's patch went in this doesn't happen anymore, because we iterate # over the memory regions from OF directly. This patch simply removes a # check that catered for the overlapping case, which now "can't happen". # # The condition also happens to be broken in the current code, but in a # painless way, so it's as good as removed already. # # Signed-off-by: Michael Ellerman # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/numa.c # 2005/03/28 14:21:22-08:00 michael@ellerman.id.au +2 -7 # ppc64: numa: Remove redundant and broken overlap check # # ChangeSet # 2005/03/28 19:27:06-08:00 olof@austin.ibm.com # [PATCH] PPC64: Fix LPAR IOMMU setup code for p630 # # Here's a fix to deal with p630 systems in LPAR mode. They're to date the # only system that in some cases might lack a dma-window property for the # bus, but contain an overriding property in the device node for the specific # adapter/slot. This makes the device setup code a bit more complex since it # needs to do some of the things that the bus setup code has already done. # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_iommu.c # 2005/03/28 14:21:22-08:00 olof@austin.ibm.com +54 -1 # PPC64: Fix LPAR IOMMU setup code for p630 # # ChangeSet # 2005/03/28 19:26:49-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix ethernet PHY reset on iMac G5 # # On iMac G5, when netbooting (or causing any other ethernet activity from # within the Open Firmware environment), the PHY is put into a low power # state before booting the OS. The result is that Linux doesn't see it and # networking doesn't work. # # This patch adds the ethernet PHY reset platform hook to pmac_feature.c on # ppc64 (it already is commonly used on ppc32 as lots of macs have this same # problem, so the hook definition is already there and sungem is already # calling it). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_feature.c # 2005/03/28 14:21:22-08:00 benh@kernel.crashing.org +31 -0 # ppc64: Fix ethernet PHY reset on iMac G5 # # ChangeSet # 2005/03/28 19:26:33-08:00 michael@ellerman.id.au # [PATCH] ppc64: Make numa=off command line argument work again # # Mike's patch "ppc64: NUMA memory fixup (another try)" broke the # numa code when "numa=off" is specified on the kernel command line. # # The fix is to pretend everything is in node 0 when numa is disabled. # # Boot tested on pSeries LPAR with numa=off and numa=debug (ie. on). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/numa.c # 2005/03/28 14:43:08-08:00 michael@ellerman.id.au +1 -1 # ppc64: Make numa=off command line argument work again # # ChangeSet # 2005/03/28 19:26:17-08:00 anton@samba.org # [PATCH] ppc64: fix pseries hcall stubs # # Fix a number of bugs in our pseries hcall stubs: # # - store parameters in the area specified by the ABI, no need to create # stack frames. # - plpar_hcall_4out would corrupt r14 # - merge multiple HVSC definitions # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/hvcall.h # 2005/03/28 14:21:21-08:00 anton@samba.org +6 -8 # ppc64: fix pseries hcall stubs # # arch/ppc64/kernel/pSeries_hvCall.S # 2005/03/28 14:21:21-08:00 anton@samba.org +79 -99 # ppc64: fix pseries hcall stubs # # arch/ppc64/kernel/head.S # 2005/03/28 14:21:21-08:00 anton@samba.org +1 -1 # ppc64: fix pseries hcall stubs # # ChangeSet # 2005/03/28 19:26:01-08:00 anton@samba.org # [PATCH] ppc64: fix semtimedop compat syscall # # As with sparc64, the ppc64 version of semtimedop was incorrect - the # timeout is in the fifth argument. I got caught copying again :) # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/sys_ppc32.c # 2005/03/28 14:21:21-08:00 anton@samba.org +2 -2 # ppc64: fix semtimedop compat syscall # # ChangeSet # 2005/03/28 19:25:45-08:00 anton@samba.org # [PATCH] ppc64: fix linkage error on G5 # # Move the ppc64 specific cond_syscall(ppc_rtas) into sys_ni.c so that it # takes effect. With this fixed we can remove the #define hack. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sys_ni.c # 2005/03/28 14:21:21-08:00 anton@samba.org +1 -0 # ppc64: fix linkage error on G5 # # arch/ppc64/kernel/syscalls.c # 2005/03/28 14:21:21-08:00 anton@samba.org +0 -3 # ppc64: fix linkage error on G5 # # arch/ppc64/kernel/misc.S # 2005/03/28 14:21:21-08:00 anton@samba.org +0 -4 # ppc64: fix linkage error on G5 # # ChangeSet # 2005/03/28 19:25:28-08:00 mikpe@csd.uu.se # [PATCH] ppc64: fix compile error in prom.c # # arch/ppc64/kernel/prom.c:1691: error: syntax error before 'prom_reconfig_notifier' # arch/ppc64/kernel/prom.c:1692: error: field name not in record or union initializer # arch/ppc64/kernel/prom.c:1692: error: (near initialization for 'prom_reconfig_nb') # arch/ppc64/kernel/prom.c:1692: warning: initialization makes pointer from integer without a cast # # Signed-off-by: Mikael Pettersson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2005/03/28 14:21:21-08:00 mikpe@csd.uu.se +1 -1 # ppc64: fix compile error in prom.c # # ChangeSet # 2005/03/28 19:25:12-08:00 mikpe@csd.uu.se # [PATCH] ppc64: fix gcc4 compile error in paca.h # # In file included from include/asm/spinlock.h:20, # from include/linux/spinlock.h:43, # from include/linux/signal.h:5, # from arch/ppc64/kernel/asm-offsets.c:17: # include/asm/paca.h:25: error: array type has incomplete element type # # Signed-off-by: Mikael Pettersson # Acked-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/paca.h # 2005/03/28 14:21:21-08:00 mikpe@csd.uu.se +2 -1 # ppc64: fix gcc4 compile error in paca.h # # ChangeSet # 2005/03/28 19:24:56-08:00 paulus@samba.org # [PATCH] ppc64: pSeries_iommu.c: use pSeries reconfig notifier # # Use the pSeries_reconfig notifier chain for tearing down the iommu table when # a device node is removed. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_reconfig.c # 2005/03/28 14:21:21-08:00 paulus@samba.org +0 -12 # ppc64: pSeries_iommu.c: use pSeries reconfig notifier # # arch/ppc64/kernel/pSeries_iommu.c # 2005/03/28 14:43:08-08:00 paulus@samba.org +25 -0 # ppc64: pSeries_iommu.c: use pSeries reconfig notifier # # ChangeSet # 2005/03/28 19:24:40-08:00 paulus@samba.org # [PATCH] ppc64: pci_dn.c: use pSeries reconfig notifier # # Use the pSeries_reconfig notifier list to handle newly added pci device nodes. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2005/03/28 14:43:09-08:00 paulus@samba.org +0 -14 # ppc64: pci_dn.c: use pSeries reconfig notifier # # arch/ppc64/kernel/pci_dn.c # 2005/03/28 14:21:21-08:00 paulus@samba.org +22 -0 # ppc64: pci_dn.c: use pSeries reconfig notifier # # ChangeSet # 2005/03/28 19:24:23-08:00 trini@kernel.crashing.org # [PATCH] ppc32: 8xx typo fix # # The following patch fixes a typo which was introduced in the great SPRN_ # renaming. # # Signed-off-by: Pantelis Antoniou # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/head_8xx.S # 2005/03/28 14:21:20-08:00 trini@kernel.crashing.org +1 -1 # ppc32: 8xx typo fix # # ChangeSet # 2005/03/28 19:24:07-08:00 waite@skycomputers.com # [PATCH] ppc32: fix broken compile on Sky Computers HDPU platform # # This fixes some compile errors in Sky Computers HDPU platform that were # created by a bad patch. # # Signed-off-by: Brian Waite # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/hdpu.c # 2005/03/28 14:21:20-08:00 waite@skycomputers.com +40 -50 # ppc32: fix broken compile on Sky Computers HDPU platform # # ChangeSet # 2005/03/28 19:23:50-08:00 benh@kernel.crashing.org # [PATCH] ppc32/64: Map prefetchable PCI without guarded bit # # While experimenting with framebuffer access performances, we noticed a very # significant improvement in write access to it when not setting the # "guarded" bit on the MMU mappings. This bit basically says that reads and # writes won't have side effects (it allows speculation). It appears that it # also disables write combining. # # This patch implements a new phys_mem_access_prot() arch callback for use by # /dev/mem and fbdev when available, implements it for ppc32 and ppc64, and # modifies /dev/mem and fbdev to use it, respectively when available or on # ppc. I didn't change fbdev to use it on all archs when available because # there is already a whole lot of arch specific mess in there (more than in # /dev/mem !) that I didn't feel like messing with, but archs maintainers are # welcome to give it a go). # # The old mechanism in /dev/mem is still there, but arch maintainers should # probably switch to this once which is more consistent imho. # # Finally, the ppc32 and ppc64 implementation of this and of the PCI mmap # calls (used by /proc and /sys) are modified to check if the mapping happens # in a prefetchable PCI resource, in which case, the guarded bit is not set # for the pgprot. In fact, ppc32 implementation of this code is updated to # be identical to ppc64. # # This improves framebuffer write performance on a simple test paul wrote # from about 50Mb/sec to 200Mb/sec on my M9 based laptop and on a G5. The # new hook will automatically catch up Xfree mmap's from /dev/mem, so it will # work out of the box with existing X servers. Kernel fbdev accesses aren't # improved yet as ioremap doesn't use that mecanism. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pgtable.h # 2005/03/28 14:42:44-08:00 benh@kernel.crashing.org +5 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # include/asm-ppc64/pci.h # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +7 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # include/asm-ppc64/machdep.h # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +7 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # include/asm-ppc/pgtable.h # 2005/03/28 14:42:44-08:00 benh@kernel.crashing.org +5 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # include/asm-ppc/pci.h # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +6 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # include/asm-ppc/page.h # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +2 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # include/asm-ppc/machdep.h # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +8 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # drivers/video/fbmem.c # 2005/03/28 14:42:43-08:00 benh@kernel.crashing.org +3 -1 # ppc32/64: Map prefetchable PCI without guarded bit # # drivers/char/mem.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +7 -9 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc64/mm/init.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +13 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc64/kernel/pci.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +101 -36 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc/platforms/prep_setup.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +2 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc/platforms/pmac_setup.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +1 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc/platforms/chrp_setup.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +2 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc/mm/init.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +24 -0 # ppc32/64: Map prefetchable PCI without guarded bit # # arch/ppc/kernel/pci.c # 2005/03/28 14:21:20-08:00 benh@kernel.crashing.org +125 -72 # ppc32/64: Map prefetchable PCI without guarded bit # # ChangeSet # 2005/03/28 19:23:33-08:00 mgreer@mvista.com # [PATCH] ppc32: Fix Sandpoint Soft Reboot # # This patch allows the Freescale Sandpoint to perform soft reboots. A write # of 0x00 to the Winbond's Chip Select Control Register was clearing the # Upper BIOS Chip Select Enable bit which unmaps the boot flash. The comment # associated with the write noted that it was enabling the RTC and Keyboard # address locations, but the bits in question (1 and 0) are reserved when the # Winbond chip is in PowerPC mode. Also, the bits are 1 for enable, 0 for # disable, therefore the original code was actually disabling the address # locations. The patch also corrects errors in the definitions of 2 # configuration bits in the Tundra Tsi107 bridge's MAPB Options register. # # Signed-off-by Randy Vinson # Signed-off-by Mark A. Greer # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mpc10x.h # 2005/03/28 14:21:20-08:00 mgreer@mvista.com +2 -2 # ppc32: Fix Sandpoint Soft Reboot # # arch/ppc/platforms/sandpoint.c # 2005/03/28 14:21:20-08:00 mgreer@mvista.com +0 -7 # ppc32: Fix Sandpoint Soft Reboot # # ChangeSet # 2005/03/28 19:23:16-08:00 perchrh@pvv.org # [PATCH] ppc32: dmasound compilation fix # # sound/built-in.o(.init.text+0xb68): In function `dmasound_awacs_init': # : undefined reference to `pmac_xpram_read' # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/dmasound/dmasound_awacs.c # 2005/03/28 14:21:20-08:00 perchrh@pvv.org +6 -3 # ppc32: dmasound compilation fix # # ChangeSet # 2005/03/28 19:22:59-08:00 galak@freescale.com # [PATCH] ppc32: Report chipset version in common /proc/cpuinfo handling # # Moved reporting of chipset revision from board specific to common handing # of /proc/cpuinfo. In light of numerous PPC system-on-chip devices, we # report both the cpu version (reflects the core version) and the chipset # version (reflects the system-on-chip or bridge version). # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/85xx/stx_gp3.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +0 -1 # ppc32: Report chipset version in common /proc/cpuinfo handling # # arch/ppc/platforms/85xx/sbc85xx.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +0 -1 # ppc32: Report chipset version in common /proc/cpuinfo handling # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +0 -1 # ppc32: Report chipset version in common /proc/cpuinfo handling # # arch/ppc/platforms/85xx/mpc85xx_ads_common.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +0 -1 # ppc32: Report chipset version in common /proc/cpuinfo handling # # arch/ppc/platforms/83xx/mpc834x_sys.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +0 -1 # ppc32: Report chipset version in common /proc/cpuinfo handling # # arch/ppc/kernel/setup.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +10 -0 # ppc32: Report chipset version in common /proc/cpuinfo handling # # ChangeSet # 2005/03/28 19:22:43-08:00 galak@freescale.com # [PATCH] ppc32: typo fix in load/store string emulation # # Patch fixes a typo in the emulation of load/store string emulations pointed # out by Segher Boessenkool. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/traps.c # 2005/03/28 14:21:20-08:00 galak@freescale.com +1 -1 # ppc32: typo fix in load/store string emulation # # ChangeSet # 2005/03/28 19:22:27-08:00 galak@freescale.com # [PATCH] ppc32: Fix CONFIG_SERIAL_TEXT_DEBUG support on 83xx # # The uart initialization for CONFIG_SERIAL_TEXT_DEBUG on 83xx was passing in # physical addresses instead of effective. Additional, fix the Kconfig # support to be for all 83xx devices, not just the MPC834x SYS board. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/83xx/mpc834x_sys.c # 2005/03/28 14:43:11-08:00 galak@freescale.com +2 -2 # ppc32: Fix CONFIG_SERIAL_TEXT_DEBUG support on 83xx # # arch/ppc/Kconfig # 2005/03/28 14:21:19-08:00 galak@freescale.com +1 -1 # ppc32: Fix CONFIG_SERIAL_TEXT_DEBUG support on 83xx # # ChangeSet # 2005/03/28 19:22:11-08:00 galak@freescale.com # [PATCH] ppc32: Move 83xx & 85xx device and system description files # # This patch moves the 83xx & 85xx device and system description files out # of the platform directory (used for board code) and into the syslib # directory (used for common system code). # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/mpc85xx_sys.c # 2005/03/28 14:21:19-08:00 galak@freescale.com +0 -0 # ppc32: Move 83xx & 85xx device and system description files # # arch/ppc/syslib/mpc85xx_devices.c # 2005/03/28 14:21:19-08:00 galak@freescale.com +0 -0 # ppc32: Move 83xx & 85xx device and system description files # # arch/ppc/syslib/mpc83xx_sys.c # 2005/03/28 14:21:19-08:00 galak@freescale.com +0 -0 # ppc32: Move 83xx & 85xx device and system description files # # arch/ppc/syslib/mpc83xx_devices.c # 2005/03/28 14:21:19-08:00 galak@freescale.com +0 -0 # ppc32: Move 83xx & 85xx device and system description files # # arch/ppc/syslib/Makefile # 2005/03/28 14:21:19-08:00 galak@freescale.com +4 -2 # ppc32: Move 83xx & 85xx device and system description files # # arch/ppc/platforms/85xx/Makefile # 2005/03/28 14:21:19-08:00 galak@freescale.com +0 -2 # ppc32: Move 83xx & 85xx device and system description files # # arch/ppc/platforms/83xx/Makefile # 2005/03/28 14:21:19-08:00 galak@freescale.com +0 -2 # ppc32: Move 83xx & 85xx device and system description files # # ChangeSet # 2005/03/28 19:21:42-08:00 mgreer@mvista.com # [PATCH] ppc32: Fix mv64x60 internal SRAM size # # ppc32: Fix wrong size for mv64[34]60's internal SRAM. # # - Fix incorrect SRAM size # - Minor Kconfig cleanups for mv64x60 platforms # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/28 14:21:19-08:00 mgreer@mvista.com +1 -1 # ppc32: Fix mv64x60 internal SRAM size # # arch/ppc/platforms/katana.h # 2005/03/28 14:21:19-08:00 mgreer@mvista.com +1 -1 # ppc32: Fix mv64x60 internal SRAM size # # arch/ppc/platforms/chestnut.h # 2005/03/28 14:21:19-08:00 mgreer@mvista.com +2 -2 # ppc32: Fix mv64x60 internal SRAM size # # arch/ppc/Kconfig # 2005/03/28 14:43:12-08:00 mgreer@mvista.com +2 -8 # ppc32: Fix mv64x60 internal SRAM size # # ChangeSet # 2005/03/28 19:21:26-08:00 sds@tycho.nsa.gov # [PATCH] SELinux: add name_connect permission check # # This patch adds a name_connect permission check to SELinux to provide # control over outbound TCP connections to particular ports distinct from the # general controls over sending and receiving packets. # # Signed-off-by: Stephen Smalley # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/include/av_permissions.h # 2005/03/28 14:21:19-08:00 sds@tycho.nsa.gov +1 -0 # SELinux: add name_connect permission check # # security/selinux/include/av_perm_to_string.h # 2005/03/28 14:21:19-08:00 sds@tycho.nsa.gov +1 -0 # SELinux: add name_connect permission check # # security/selinux/hooks.c # 2005/03/28 14:21:19-08:00 sds@tycho.nsa.gov +47 -1 # SELinux: add name_connect permission check # # ChangeSet # 2005/03/28 19:21:10-08:00 sds@tycho.nsa.gov # [PATCH] SELinux: audit unrecognized netlink messages # # This patch changes SELinux to audit any unrecognized netlink messages in # controlled classes rather than silently rejecting them, and to allow them # if in permissive mode. Please apply. # # Signed-off-by: Stephen Smalley # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2005/03/28 14:43:12-08:00 sds@tycho.nsa.gov +10 -0 # SELinux: audit unrecognized netlink messages # # ChangeSet # 2005/03/28 19:20:54-08:00 sds@tycho.nsa.gov # [PATCH] SELinux: allow mounting of filesystems with invalid root inode context # # This patch alters the SELinux handling of inodes with invalid security # contexts so that a filesystem with a root inode that has an invalid # security context can still be mounted for administrative recovery without # disabling SELinux altogether. # # Signed-off-by: Stephen Smalley # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2005/03/28 14:43:13-08:00 sds@tycho.nsa.gov +3 -1 # SELinux: allow mounting of filesystems with invalid root inode context # # ChangeSet # 2005/03/28 19:20:37-08:00 sds@tycho.nsa.gov # [PATCH] SELinux: make code static and remove unused code # # This patch from Adrian Bunk makes needlessly global code static and removes # a number of unused global and static functions from SELinux. Please apply. # # Author: Adrian Bunk # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/ss/sidtab.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -36 # SELinux: make code static and remove unused code # # security/selinux/ss/services.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -6 # SELinux: make code static and remove unused code # # security/selinux/ss/services.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +9 -9 # SELinux: make code static and remove unused code # # security/selinux/ss/policydb.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -3 # SELinux: make code static and remove unused code # # security/selinux/ss/policydb.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +5 -5 # SELinux: make code static and remove unused code # # security/selinux/ss/hashtab.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -38 # SELinux: make code static and remove unused code # # security/selinux/ss/hashtab.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -113 # SELinux: make code static and remove unused code # # security/selinux/ss/ebitmap.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -1 # SELinux: make code static and remove unused code # # security/selinux/ss/ebitmap.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -43 # SELinux: make code static and remove unused code # # security/selinux/ss/conditional.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +1 -1 # SELinux: make code static and remove unused code # # security/selinux/ss/avtab.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -6 # SELinux: make code static and remove unused code # # security/selinux/ss/avtab.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +3 -26 # SELinux: make code static and remove unused code # # security/selinux/selinuxfs.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +2 -2 # SELinux: make code static and remove unused code # # security/selinux/include/objsec.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -2 # SELinux: make code static and remove unused code # # security/selinux/include/avc_ss.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -13 # SELinux: make code static and remove unused code # # security/selinux/include/avc.h # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +0 -7 # SELinux: make code static and remove unused code # # security/selinux/hooks.c # 2005/03/28 14:43:13-08:00 sds@tycho.nsa.gov +20 -20 # SELinux: make code static and remove unused code # # security/selinux/avc.c # 2005/03/28 14:21:18-08:00 sds@tycho.nsa.gov +2 -172 # SELinux: make code static and remove unused code # # ChangeSet # 2005/03/28 19:20:20-08:00 jmoyer@redhat.com # [PATCH] unused 'size' assignment in filemap_nopage # # filemap_nopage has the following code: # # retry_all: # size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; # if (pgoff >= size) # goto outside_data_content; # # /* If we don't want any read-ahead, don't bother */ # if (VM_RandomReadHint(area)) # goto no_cached_page; # # /* # * The "size" of the file, as far as mmap is concerned, isn't bigger # * than the mapping # */ # if (size > endoff) # size = endoff; # # After this, size is not referenced. So, either this potential reassignment # of size is superfluous, or we are missing some other code later on in the # function. If it is the former, I've attached a patch which will remove the # code. # # (akpm: and endoff can go away too. That was the unused variable which gcc has # been warning about for ages. Also, gratuitous whitespace fiddling). # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2005/03/28 14:21:18-08:00 jmoyer@redhat.com +4 -11 # unused 'size' assignment in filemap_nopage # # ChangeSet # 2005/03/28 19:20:04-08:00 ak@muc.de # [PATCH] Fix mmap of /dev/kmem # # Fix mmap of /dev/kmem. It cannot ever have worked before. # # vmalloc is still not supported because that would be more complicated. # # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/mem.c # 2005/03/28 14:43:11-08:00 ak@muc.de +17 -1 # Fix mmap of /dev/kmem # # ChangeSet # 2005/03/28 19:19:48-08:00 herbert@13thfloor.at # [PATCH] include cleanup in pgalloc.h # # This patch cleans up asm-*/pgalloc.h by removing the generous includes # which are obsoleted (duplicated) by including linux/mm.h (and friends) # # They are double checked and verified by the PLM cross compiling service # (the patched kernel gives the same warnings/errors as the unpatched) # # http://osdl.org/plm-cgi/plm?module=patch_info&patch_id=4313 # # Signed-off-by: Herbert Pötzl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/pgalloc.h # 2005/03/28 14:43:01-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-sparc64/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -2 # include cleanup in pgalloc.h # # include/asm-sh64/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-sh/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-s390/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-ppc64/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -3 # include cleanup in pgalloc.h # # include/asm-parisc/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-m32r/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-ia64/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-i386/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # include/asm-cris/pgalloc.h # 2005/03/28 14:21:18-08:00 herbert@13thfloor.at +0 -1 # include cleanup in pgalloc.h # # ChangeSet # 2005/03/28 19:19:32-08:00 akpm@osdl.org # [PATCH] slab shrinkers: use vfs_cache_pressure # # Fix some bugs spotted by Andrea Arcangeli # # - When we added /proc/sys/vm/vfs_cache_pressure we forgot to allow it to # tune the dquot and mbcache slabs as well. # # - Reduce lock contention in shrink_dqcache_memory(). # # - Use dqstats.free_dquots in shrink_dqcache_memory(): this is the count of # reclaimable objects. # # - Export sysctl_vfs_cache_pressure to GPL modules for mbcache.o # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/mbcache.c # 2005/03/28 14:21:18-08:00 akpm@osdl.org +1 -1 # slab shrinkers: use vfs_cache_pressure # # fs/dquot.c # 2005/03/28 14:21:18-08:00 akpm@osdl.org +5 -7 # slab shrinkers: use vfs_cache_pressure # # fs/dcache.c # 2005/03/28 14:21:18-08:00 akpm@osdl.org +1 -0 # slab shrinkers: use vfs_cache_pressure # # ChangeSet # 2005/03/28 19:19:14-08:00 clameter@sgi.com # [PATCH] mm counter operations through macros # # This patch extracts all the operations on counters protected by the page # table lock (currently rss and anon_rss) into definitions in # include/linux/sched.h. All rss operations are performed through the # following macros: # # get_mm_counter(mm, member) -> Obtain the value of a counter # set_mm_counter(mm, member, value) -> Set the value of a counter # update_mm_counter(mm, member, value) -> Add to a counter # inc_mm_counter(mm, member) -> Increment a counter # dec_mm_counter(mm, member) -> Decrement a counter # # With this patch it becomes easier to add new counters and it is possible to # redefine the method of counter handling. The counters are an issue for # scalability since they are used in frequently used code paths and may cause # cache line bouncing. # # F.e. One may not use counters at all and count the pages when needed, switch # to atomic operations if the mm_struct locking changes or split the rss # into counters that can be locally incremented. # # The relevant fields of the task_struct are renamed with a leading underscore # to catch out people who are not using the acceessor macros. # # Signed-off-by: Christoph Lameter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swapfile.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # mm/rmap.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +7 -7 # mm counter operations through macros # # mm/nommu.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +4 -2 # mm counter operations through macros # # mm/mmap.c # 2005/03/28 14:42:48-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # mm/memory.c # 2005/03/28 14:42:39-08:00 clameter@sgi.com +12 -10 # mm counter operations through macros # # mm/fremap.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +2 -2 # mm counter operations through macros # # kernel/fork.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # kernel/acct.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # include/linux/sched.h # 2005/03/28 14:21:17-08:00 clameter@sgi.com +12 -2 # mm counter operations through macros # # include/asm-sparc64/tlb.h # 2005/03/28 14:21:17-08:00 clameter@sgi.com +2 -2 # mm counter operations through macros # # include/asm-ia64/tlb.h # 2005/03/28 14:21:17-08:00 clameter@sgi.com +2 -2 # mm counter operations through macros # # include/asm-generic/tlb.h # 2005/03/28 14:21:17-08:00 clameter@sgi.com +2 -2 # mm counter operations through macros # # include/asm-arm26/tlb.h # 2005/03/28 14:21:17-08:00 clameter@sgi.com +2 -2 # mm counter operations through macros # # include/asm-arm/tlb.h # 2005/03/28 14:21:17-08:00 clameter@sgi.com +2 -2 # mm counter operations through macros # # fs/proc/task_mmu.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +5 -3 # mm counter operations through macros # # fs/proc/array.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # fs/exec.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # fs/binfmt_som.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # fs/binfmt_flat.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # fs/binfmt_elf_fdpic.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # fs/binfmt_elf.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # fs/binfmt_aout.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # arch/x86_64/ia32/ia32_aout.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # arch/sparc64/mm/hugetlbpage.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # arch/sparc64/kernel/binfmt_aout32.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # arch/sh64/mm/hugetlbpage.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # arch/sh/mm/hugetlbpage.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # arch/ppc64/mm/hugetlbpage.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # arch/mips/kernel/irixelf.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # arch/m68k/atari/stram.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +1 -1 # mm counter operations through macros # # arch/ia64/mm/hugetlbpage.c # 2005/03/28 14:21:17-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # arch/i386/mm/hugetlbpage.c # 2005/03/28 14:42:59-08:00 clameter@sgi.com +3 -3 # mm counter operations through macros # # ChangeSet # 2005/03/28 19:18:57-08:00 mort@sgi.com # [PATCH] vmscan: move code to isolate LRU pages into separate function # # I noticed that the loop to pull pages out of the LRU lists for processing # occurred twice. This just sticks that code into a separate function to # improve readability. # # Signed-Off-By: Martin Hicks # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2005/03/28 14:21:17-08:00 mort@sgi.com +56 -54 # vmscan: move code to isolate LRU pages into separate function # # ChangeSet # 2005/03/28 19:18:41-08:00 manfred@colorfullife.com # [PATCH] slab: 64-bit fix # # Use kmem_bufctl_t instead of int for the loop counters in check_slabp. # # Signed-of-by: Manfred Spraul # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/slab.c # 2005/03/28 14:21:16-08:00 manfred@colorfullife.com +2 -3 # slab: 64-bit fix # # ChangeSet # 2005/03/28 19:18:25-08:00 akpm@osdl.org # [PATCH] slab: kfree(null) is unlikely # # - mark kfree(NULL) as being unlikely # # - Coding-style consistency for function definitions # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/slab.c # 2005/03/28 14:43:16-08:00 akpm@osdl.org +27 -35 # slab: kfree(null) is unlikely # # ChangeSet # 2005/03/28 19:18:09-08:00 manfred@colorfullife.com # [PATCH] slab.[ch]: kmalloc() cleanups # # I found a new idea for optimizing the loop in kmalloc - now the cleanup # both reduces the size of the .text segment in mm/slab.o and speeds up largs # kmallocs a bit. I still loose 2 cycles for kmalloc(32,GFP_KERNEL) compared # to the current code, but I haven't figured out how I could optimize # further. # # - inline kmem_find_general_cachep() # # - optimize kmem_find_general_cachep() and document the optimization. # # - remove duplicate code from __kmalloc(): call kmem_find_general_cachep() # directly. # # Based on a patch from Renaud Lienhart # # Signed-off-by: Manfred Spraul # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/slab.c # 2005/03/28 14:43:16-08:00 manfred@colorfullife.com +25 -27 # slab.[ch]: kmalloc() cleanups # # ChangeSet # 2005/03/28 19:17:52-08:00 akpm@osdl.org # [PATCH] tty overrun time fix # # moreau francis points out that we need to # initialise overrun_time, else the overrun reporting screws up when jiffies is # "negative". # # So initialise tty->overrun_time apropriately, and handle the case where the # tty has been open for so long that the overrun time has become "greater than" # jiffies. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/tty_io.c # 2005/03/28 14:21:16-08:00 akpm@osdl.org +1 -0 # tty overrun time fix # # drivers/char/n_tty.c # 2005/03/28 14:21:16-08:00 akpm@osdl.org +5 -3 # tty overrun time fix # # ChangeSet # 2005/03/28 19:17:36-08:00 jonsmirl@gmail.com # [PATCH] handle multiple video cards on the same bus # # When detecting the boot video device, allow for the case of multiple # cards on the same bus. Check each candidate to make sure that the card # is active. # # Signed-off-by: Jon Smirl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/pci/fixup.c # 2005/03/28 14:21:16-08:00 jonsmirl@gmail.com +13 -7 # handle multiple video cards on the same bus # # ChangeSet # 2005/03/28 19:17:20-08:00 daniel@osdl.org # [PATCH] ppc64: fix AIO panic on PPC64 caused by is_hugepage_only_range() # # When testing AIO on PPC64 (a power5 machine) running 2.6.11 with # CONFIG_HUGETLB_PAGE=y, I ran into a kernel panic when a process exits that has # done AIO (io_queue_init()) but has not done the io_queue_release(). The # exit_aio() code is cleaning up and panicking when trying to free the aio ring # buffer. # # I tracked this down to is_hugepage_only_range() (include/asm-ppc64/page.h) # which is doing a touches_hugepage_low_range() which is checking # current->mm->context.htlb_segs. The problem is that exit_mm() cleared tsk->mm # before doing the mmput() which leads to the exit_aio() and then the panic. # Looks like is_hugepage_only_range() is only used in ia64 and ppc64. Fix is to # change is_hugepage_only_range() to take an 'mm' as a parameter as well as # 'addr' and 'len' and then the ppc64 code could change to use 'mm'. It looks # like it has been broken for quite a while. # # Signed-off-by: Daniel McNeil # Acked-by: David Gibson # Acked-by: "Luck, Tony" # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2005/03/28 14:43:15-08:00 daniel@osdl.org +2 -2 # ppc64: fix AIO panic on PPC64 caused by is_hugepage_only_range() # # include/linux/hugetlb.h # 2005/03/28 14:21:16-08:00 daniel@osdl.org +2 -2 # ppc64: fix AIO panic on PPC64 caused by is_hugepage_only_range() # # include/asm-ppc64/page.h # 2005/03/28 14:21:16-08:00 daniel@osdl.org +4 -4 # ppc64: fix AIO panic on PPC64 caused by is_hugepage_only_range() # # include/asm-ia64/page.h # 2005/03/28 14:21:16-08:00 daniel@osdl.org +1 -1 # ppc64: fix AIO panic on PPC64 caused by is_hugepage_only_range() # # arch/ppc64/mm/hugetlbpage.c # 2005/03/28 14:43:14-08:00 daniel@osdl.org +4 -4 # ppc64: fix AIO panic on PPC64 caused by is_hugepage_only_range() # # ChangeSet # 2005/03/28 19:17:04-08:00 linux@dominikbrodowski.net # [PATCH] pcmcia: don't send eject request events to userspace # # Here follow PCMCIA-related patches which allow for kernel-based matching # between 16-bit PCMCIA devices and their drivers. If you're using this (and # using a special startup script or small tool), you don't need to run "cardmgr" # any longer. cardmgr still works, though, allowing for a gradual transition. # # These patches apply on top of what's in 2.6.11-rc4-mm1; for proper operation # pcmcia-bridge-resource-management-fix.patch should be removed first, though. # Andrew, please apply them to your next -mm release. # # # 1. Theory of operation I: setting up the sockets # ================================================ # - the appropriate socket driver is initialized (modprobe or built-in) # - a hotplug event (CLASS=pcmcia_socket) is generated # - if it's a socket which doesn't map the resources statically, resources # available for use by PCMCIA cards need to be marked as "allowed". This is # done using either a small shell script[*] or pcmcia-socket-startup[**]. The # latter parses /etc/pcmcia/config.opts -- the same file cardmgr currently # uses for this purpose. # # [*] e.g. # #!/bin/sh # echo -n "+ 0x00000100 - 0x000004cf" > /sys/class/pcmcia_socket/pcmcia_socket1/available_resources_io # echo -n "+ 0x60000000 - 0x60ffffff" > /sys/class/pcmcia_socket/pcmcia_socket1/available_resources_mem # echo -n "1" > /sys/class/pcmcia_socket/pcmcia_socket1/available_resources_setup_done # # [**] note: for pcmcia-socket-startup to work properly you need a patch for # libsysfs (it is already accepted by the maintainer of the package). See # below for details. # # # 2. Theory of operation II: setting up a device # ============================================== # - a pcmcia device is discovered in the socket # - device information is determined and exported to sysfs # - a hotplug event is created, passing -- among others -- a complete MODNAME # string to userspace. Available match flags are the product ID strings [in # userspace, only the hashes are matched -- you can't use strings in # modules.alias], manufactor and card ID, the multifunction device number, # the pseudo-multifunction device number [this is what e.g. # bind "serial_cs", bind "serial_cs" # was before], whether it needs a CIS override, and the function ID [this match # is only used if it is allowed by userspace -- it should be avoided and will # be removed in future, after existing users have been converted to matches of # other types]. # - modprobe $MODNAME [*] # - the device is matched against drivers. function ID matches are ignored at # this stage. If the device needs a CIS override, it is requested from # userspace using the firmware helpers. It is recommended to have a symlink # either from /lib/firmware/cis/ to /etc/pcmcia/cis/ or the other way to let # both (old) cardmgr and (new) firmware.agent access the override CIS data. # - if no driver was found, an userspace helper checks whether the card is one of # two(!) which can only be detected using cardmgr's tuple directive. If this is # the case, a CIS override is done using # /sys/class/pcmcia_socket/pcmcia_socket%n/cis , loading a CIS with proper # identification values. # - if this doesn't lead to a driver being bound to the device, function ID-based # matches are allowed. # # [*] note: for this to work properly you need a patch to be written which loads # _all_ matching modules, not just one] # # # 3. patches # ========== # I'll not send the patches which add the proper device identification tables to # this list, but only (and a bit later) to Andrew and the appropriate # maintainers. You can find them already at # http://www.kernel.org/pub/linux/kernel/people/brodo/patches/2.6.11-rc5/ # -- they start with pcmcia-25- # # I used all identification information I could find in pcmcia-cs, the kernel, # and some web resources and, but probably missed some. If I did, please send # me either the appropriate device info from the cardmgr config file or the # output of "pcmcia-modalias" (see below) -- or a PCMCIA_MATCH patch. # # # 4. userspace tools # ================== # Several GPL[*] userspace tools are required or useful for this (new) method of # operation. I'll send them to this list for review, and they're also available # _temporarily_ at # http://www.kernel.org/pub/linux/kernel/people/brodo/temp-pcmcia-tools.tar.gz # # I'm still undecided on what to do with these userspace tools. IMO they could # either be merged into pcmcia-cs or distributed in addition to pcmcia-cs. Also, # I'd be very glad if somebody else could maintain and improve these tools. # # pcmcia-socket-startup # This tool is based on "cardmgr" by Dave Hinds, but most of it was removed. The # remains parse the /etc/pcmcia/config file for allowed ioport and iomem ranges # and for disallowed IRQs, and sets these using libsysfs. Due to a bug in # libsysfs, a patch is needed for this to work properly. It takes one parameter, # the socket number to be set up. # # # pcmcia-modalias # This tool reads device information and generates a MODALIAS string just like # the kernel exports using hotplug for this device. It takes one paramter, the # device's bus_id string (e.g. "pcmcia-modalias 1.0" for the first device on the # second PCMCIA socket) # # # pcmcia-check-broken-cis # This checks whether the CIS is so broken that only the "tuple"-based match is # possible. It takes one parameter, the socket the PCMCIA card to be tested is # inserted to, and returns nothing (if no CIS override is needed), or the CIS # file name. The CIS parsing is done using a much simplified version of what # is to be found in drivers/pcmcia/cistpl.c, so this is based on Dave Hinds # work as well. # # # hotplug/pcmcia* # The hotplug scripts are quite self-explanatory and also allow for "coldplug" # (i.e. they work around "missed" events during boot). # # # pccardctl # This previously announced tool uses sysfs instead of an ioctl for commands # like "eject", "insert", "info" and "ident". # # # [*] reason: they're partly based on other GPL-licensed tools. # # # This patch: # # # Don't inform cardmgr of ejection requests so that "cardctl eject" behaves # _exactly_ the same as a physical ejection from an userspace point of view. # # Removing this allows us to clean up some other code which is otherwise unused. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/ds.c # 2005/03/28 14:21:16-08:00 linux@dominikbrodowski.net +3 -42 # pcmcia: don't send eject request events to userspace # # ChangeSet # 2005/03/28 19:16:47-08:00 linux@dominikbrodowski.net # [PATCH] pcmcia: don't lock up in rsrc_nonstatic pcmcia_validate_mem # # struct socket_data wasn't zeroed, so pcmcia_validate_mem() didn't get called. # If it is called, though, one possible code-path already holds skt_sem, so # lockups occur. Therefore, change calling conventions to pcmcia_validate_mem(). # # Signed-off-by: Dominik Brodowski # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/rsrc_nonstatic.c # 2005/03/28 14:21:15-08:00 linux@dominikbrodowski.net +2 -6 # pcmcia: don't lock up in rsrc_nonstatic pcmcia_validate_mem # # drivers/pcmcia/ds.c # 2005/03/28 14:43:17-08:00 linux@dominikbrodowski.net +4 -0 # pcmcia: don't lock up in rsrc_nonstatic pcmcia_validate_mem # # ChangeSet # 2005/03/28 19:16:31-08:00 linux@dominikbrodowski.net # [PATCH] pcmcia: properly bail out on MTD-related ioctl invocation # # Properly set the return value for DS_BIND_MTD, DS_GET_FIRST_REGION and # DS_GET_NEXT_REGION. Else trying to bind MTD devices the old (deprecated) # way may cause an endless loop in cardmgr. This also happens if the # resources weren't made available properly in /etc/pcmcia/config.opts. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/pcmcia/ds.c # 2005/03/28 14:43:17-08:00 linux@dominikbrodowski.net +1 -1 # pcmcia: properly bail out on MTD-related ioctl invocation # # ChangeSet # 2005/03/28 19:58:58-06:00 stern@rowland.harvard.edu # [PATCH] Add a scsi_device flag for RETRY_HWERROR # # It turns out that a bunch of USB-IDE converters make the mistake of # returning SK = 04 (Hardware Error) whenever the IDE device signals any # sort of error, without bothering to distinguish recoverable from # non-recoverable errors. The best way to handle this is for usb-storage to # set a per-device flag indicating that these errors should always be # retried. The current scheme (blacklist flag but no per-device flag) isn't # well suited for this situation. # # This patch adds the per-device flag and sets it initially based on the # blacklist setting. Once this has been merged, a separate patch will be # submitted to Matt Dharm adding the corresponding support to usb-storage. # # Signed-off-by: Alan Stern # Signed-off-by: James Bottomley # # include/scsi/scsi_device.h # 2005/03/23 15:58:05-06:00 stern@rowland.harvard.edu +1 -0 # Add a scsi_device flag for RETRY_HWERROR # # drivers/scsi/scsi_scan.c # 2005/03/23 15:58:13-06:00 stern@rowland.harvard.edu +3 -0 # Add a scsi_device flag for RETRY_HWERROR # # drivers/scsi/scsi_error.c # 2005/03/24 10:41:29-06:00 stern@rowland.harvard.edu +1 -5 # Add a scsi_device flag for RETRY_HWERROR # # ChangeSet # 2005/03/28 17:42:49-08:00 torvalds@ppc970.osdl.org # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # This makes it hard(er) to mix argument orders by mistake for things like # kmalloc() and friends, since silent integer promotion is now caught by # sparse. # # mm/vmalloc.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/slab.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +11 -11 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/shmem.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/page_io.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/page_alloc.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +5 -5 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/oom_kill.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/mempool.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +3 -3 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/mempolicy.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +4 -4 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/highmem.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # mm/filemap.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # kernel/signal.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # kernel/kfifo.c # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/vmalloc.h # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/swap.h # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/slab.h # 2005/03/28 17:42:38-08:00 torvalds@ppc970.osdl.org +4 -4 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/posix_acl.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +3 -3 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/pagemap.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/mempool.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +4 -4 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/kfifo.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/jbd.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/gfp.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +18 -18 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/buffer_head.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/blkdev.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/linux/bio.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +3 -3 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/asm-ppc64/iommu.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/asm-ppc64/dma-mapping.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/asm-i386/dma-mapping.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # include/asm-generic/dma-mapping.h # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # fs/posix_acl.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +3 -3 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # fs/mpage.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # fs/cifs/connect.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # fs/buffer.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # fs/bio.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +5 -5 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/s390/scsi/zfcp_aux.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/md/raid10.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/md/raid1.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/md/multipath.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/md/dm-raid1.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/md/dm-io.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/md/dm-crypt.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/block/pktcdvd.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +2 -2 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # drivers/base/dmapool.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # arch/ppc64/kernel/vio.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # arch/ppc64/kernel/pci_iommu.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # arch/ppc64/kernel/pci_direct_iommu.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # arch/ppc64/kernel/iommu.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # arch/ppc64/kernel/dma.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # arch/i386/kernel/pci-dma.c # 2005/03/28 17:42:37-08:00 torvalds@ppc970.osdl.org +1 -1 # Mark "gfp" masks as "unsigned int" and use __nocast to find violations. # # ChangeSet # 2005/03/28 12:36:04-08:00 nacc@us.ibm.com # [PATCH] sound/usbmidi: change parameters of usb_bulk_msg() to msecs # # Use milliseconds at the timeout parameter in the call to # usb_bulk_msg() to match the converted interface. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Greg Kroah-Hartman # # sound/usb/usbmidi.c # 2005/03/28 11:53:07-08:00 nacc@us.ibm.com +1 -1 # sound/usbmidi: change parameters of usb_bulk_msg() to msecs # # ChangeSet # 2005/03/28 12:35:42-08:00 nacc@us.ibm.com # [PATCH] sound/usbaudio: change parameters of snd_usb_ctl_msg() to msecs # # Use milliseconds at the timeout parameter in the call to # snd_usb_ctl_msg(), a wrapper to usb_control_msg(), to match # the converted interface. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Greg Kroah-Hartman # # sound/usb/usbaudio.c # 2005/03/28 11:46:23-08:00 nacc@us.ibm.com +4 -4 # sound/usbaudio: change parameters of snd_usb_ctl_msg() to msecs # # ChangeSet # 2005/03/28 12:35:20-08:00 nacc@us.ibm.com # [PATCH] usb/kl5kusb105: change parameters of usb_control_msg() to msecs # # Use milliseconds at the timeout parameter in the call to # usb_control_msg() to match the converted interface. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/kl5kusb105.c # 2005/03/28 11:43:37-08:00 nacc@us.ibm.com +1 -1 # usb/kl5kusb105: change parameters of usb_control_msg() to msecs # # ChangeSet # 2005/03/28 12:34:56-08:00 nacc@us.ibm.com # [PATCH] usb/pwc-ctrl: change parameters of usb_control_msg() to msecs # # Use milliseconds at the timeout parameter in the call to # usb_control_msg() to match the converted interface. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc/pwc-ctrl.c # 2005/03/28 11:29:53-08:00 nacc@us.ibm.com +3 -3 # usb/pwc-ctrl: change parameters of usb_control_msg() to msecs # # ChangeSet # 2005/03/28 12:34:31-08:00 colin@colino.net # [PATCH] USB: fix shared key auth in zd1201 # # It's currently impossible to associate with a shared-key-only access # point using the zd1201 driver. The attached patch fixes it. The reason # was (probably) a typo in the definitions of the authentification types. # I found that they should be (1,2) instead of (0,1) by looking at the # old linux-wlan-ng driver by Zydas. # # Signed-off-by: Colin Leroy # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/zd1201.h # 2005/03/25 00:11:59-08:00 colin@colino.net +2 -2 # USB: fix shared key auth in zd1201 # # ChangeSet # 2005/03/28 12:34:11-08:00 bunk@stusta.de # [PATCH] MAINTAINERS: remove obsolete HPUSBSCSI entry # # It seems I forgot MAINTAINERS in my patch that removed this driver... # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # MAINTAINERS # 2005/03/27 13:18:07-08:00 bunk@stusta.de +0 -5 # MAINTAINERS: remove obsolete HPUSBSCSI entry # # ChangeSet # 2005/03/28 12:33:49-08:00 bunk@stusta.de # [PATCH] drivers/usb/media/usbvideo.c: fix a check after use # # This patch fixes a check after use found by the Coverity checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/usbvideo.c # 2005/03/22 19:59:46-08:00 bunk@stusta.de +3 -3 # drivers/usb/media/usbvideo.c: fix a check after use # # ChangeSet # 2005/03/28 12:33:26-08:00 zaitcev@redhat.com # [PATCH] USB: fix for ub for sleeping function called from invalid context at kernel/workqueue.c:264 # # From: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/block/ub.c # 2005/03/24 19:23:29-08:00 zaitcev@redhat.com +47 -21 # USB: fix for ub for sleeping function called from invalid context at kernel/workqueue.c:264 # # ChangeSet # 2005/03/28 12:33:04-08:00 bunk@stusta.de # [PATCH] drivers/usb/misc/usbtest.c: fix a NULL dereference # # This patch fixes a NULL dereference found by the Coverity checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/usbtest.c # 2005/03/23 19:33:59-08:00 bunk@stusta.de +1 -1 # drivers/usb/misc/usbtest.c: fix a NULL dereference # # ChangeSet # 2005/03/28 12:32:43-08:00 bunk@stusta.de # [PATCH] drivers/usb/class/usb-midi.c: remove dead code # # This patch removes some obviously dead code found by the Coverity # checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/class/usb-midi.c # 2005/03/23 19:51:50-08:00 bunk@stusta.de +0 -2 # drivers/usb/class/usb-midi.c: remove dead code # # ChangeSet # 2005/03/28 21:29:59+01:00 buytenh@org.rmk.(none) # [ARM PATCH] 2583/1: add several registers to arch-ixp2000/ixp2000-regs.h # # Patch from Lennert Buytenhek # # These registers ({RAW_STATUS,ENABLE_SET,ENABLE_CLEAR}_[AB]_[0123]) # are needed for checking the status of, acking, unmasking and masking # the 256 individual thread interrupt sources. This is used by the # microengine thread interrupt driver. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # ChangeSet # 2005/03/28 12:11:14-08:00 gregkh@suse.de # USB: add fossil watch ids to the visor driver. # # Thanks to Gunter Ohrner for the information. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/visor.h # 2005/03/28 12:10:56-08:00 gregkh@suse.de +3 -0 # USB: add fossil watch ids to the visor driver. # # Thanks to Gunter Ohrner for the information. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/visor.c # 2005/03/28 12:10:56-08:00 gregkh@suse.de +3 -0 # USB: add fossil watch ids to the visor driver. # # Thanks to Gunter Ohrner for the information. # # Signed-off-by: Greg Kroah-Hartman # # include/asm-arm/arch-ixp2000/ixp2000-regs.h # 2005/03/25 21:35:49+00:00 buytenh@org.rmk.(none) +24 -0 # [PATCH] 2583/1: add several registers to arch-ixp2000/ixp2000-regs.h # # ChangeSet # 2005/03/28 21:04:52+01:00 buytenh@org.rmk.(none) # [ARM PATCH] 2582/1: correct thread interrupt comments in arch-ixp2000/irqs.h # # Patch from Lennert Buytenhek # # Some comments in arch-ixp2000/irqs.h say that thread interrupts 64-127 # are IXP2800-only, but this is not true: IXP2400 has 0-31 and 64-95, and # 32-63 and 96-127 are IXP2800-only. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/irqs.h # 2005/03/26 10:18:11+00:00 buytenh@org.rmk.(none) +4 -4 # [PATCH] 2582/1: correct thread interrupt comments in arch-ixp2000/irqs.h # # ChangeSet # 2005/03/28 20:38:21+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix ARM TLB shootdown code # # We missed flushing the TLB when we're unmapping only reserved pages. # Since the kernel is now better at passing vmas which correspond # solely with the region to unmap, we can use tlb_*_vma() to do # "just enough" flushing, both for the TLB and cache. # # We can avoid all flushes in tlb_*_vma() for the full-MM case, and # just do a flush_tlb_mm(). We can omit the cache flushing because # this thread will die soon. # # Signed-off-by: Russell King # # include/asm-arm/tlb.h # 2005/03/28 20:30:40+01:00 rmk@flint.arm.linux.org.uk +20 -14 # We missed flushing the TLB when we're unmapping only reserved pages. # Since the kernel is now better at passing vmas which correspond # solely with the region to unmap, we can use tlb_*_vma() to do # "just enough" flushing, both for the TLB and cache. # # We can avoid all flushes in tlb_*_vma() for the full-MM case, and # just do a flush_tlb_mm(). We can omit the cache flushing because # this thread will die soon. # # ChangeSet # 2005/03/28 14:32:20+01:00 vince@org.rmk.(none) # [ARM PATCH] 2629/1: Update shark_defconfig default config # # Patch from Vincent Sanders # # Updates shark_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/shark_defconfig # 2005/03/27 23:59:15+01:00 vince@org.rmk.(none) +442 -382 # [PATCH] 2629/1: Update shark_defconfig default config # # ChangeSet # 2005/03/28 14:09:29+01:00 vince@org.rmk.(none) # [ARM PATCH] 2628/1: Update simpad_defconfig default config # # Patch from Vincent Sanders # # Updates simpad_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/simpad_defconfig # 2005/03/28 00:10:37+01:00 vince@org.rmk.(none) +219 -151 # [PATCH] 2628/1: Update simpad_defconfig default config # # ChangeSet # 2005/03/28 13:47:55+01:00 vince@org.rmk.(none) # [ARM PATCH] 2627/1: Update lusl7200_defconfig default config # # Patch from Vincent Sanders # # Updates lusl7200_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/lusl7200_defconfig # 2005/03/28 00:24:39+01:00 vince@org.rmk.(none) +247 -277 # [PATCH] 2627/1: Update lusl7200_defconfig default config # # ChangeSet # 2005/03/28 13:39:24+01:00 vince@org.rmk.(none) # [ARM PATCH] 2626/1: Update versatile_defconfig default config # # Patch from Vincent Sanders # # Updates versatile_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/versatile_defconfig # 2005/03/28 00:20:51+01:00 vince@org.rmk.(none) +267 -215 # [PATCH] 2626/1: Update versatile_defconfig default config # # ChangeSet # 2005/03/28 13:31:48+01:00 vince@org.rmk.(none) # [ARM PATCH] 2625/1: Update lubbock_defconfig default config # # Patch from Vincent Sanders # # Updates lubbock_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/lubbock_defconfig # 2005/03/28 00:18:14+01:00 vince@org.rmk.(none) +234 -166 # [PATCH] 2625/1: Update lubbock_defconfig default config # # ChangeSet # 2005/03/28 13:22:45+01:00 vince@org.rmk.(none) # [ARM PATCH] 2624/1: Update lpd7a404_defconfig default config # # Patch from Vincent Sanders # # Updates lpd7a404_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/lpd7a404_defconfig # 2005/03/28 00:14:08+01:00 vince@org.rmk.(none) +364 -312 # [PATCH] 2624/1: Update lpd7a404_defconfig default config # # ChangeSet # 2005/03/28 13:15:10+01:00 vince@org.rmk.(none) # [ARM PATCH] 2623/1: Update lpd7a400_defconfig default config # # Patch from Vincent Sanders # # Updates lpd7a400_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/lpd7a400_defconfig # 2005/03/28 00:06:34+01:00 vince@org.rmk.(none) +223 -181 # [PATCH] 2623/1: Update lpd7a400_defconfig default config # # ChangeSet # 2005/03/28 13:07:48+01:00 vince@org.rmk.(none) # [ARM PATCH] 2622/1: Update lart_defconfig default config # # Patch from Vincent Sanders # # Updates lart_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/lart_defconfig # 2005/03/27 23:53:24+01:00 vince@org.rmk.(none) +319 -253 # [PATCH] 2622/1: Update lart_defconfig default config # # ChangeSet # 2005/03/28 12:59:29+01:00 vince@org.rmk.(none) # [ARM PATCH] 2621/1: Update hackkit_defconfig default config # # Patch from Vincent Sanders # # Updates hackkit_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/hackkit_defconfig # 2005/03/28 00:22:34+01:00 vince@org.rmk.(none) +352 -236 # [PATCH] 2621/1: Update hackkit_defconfig default config # # ChangeSet # 2005/03/28 12:51:11+01:00 vince@org.rmk.(none) # [ARM PATCH] 2620/1: Update h7202_defconfig default config # # Patch from Vincent Sanders # # Updates h7202_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/h7202_defconfig # 2005/03/28 00:15:45+01:00 vince@org.rmk.(none) +198 -118 # [PATCH] 2620/1: Update h7202_defconfig default config # # ChangeSet # 2005/03/28 12:42:46+01:00 vince@org.rmk.(none) # [ARM PATCH] 2619/1: Update h7201_defconfig default config # # Patch from Vincent Sanders # # Updates h7201_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/h7201_defconfig # 2005/03/28 00:11:34+01:00 vince@org.rmk.(none) +153 -97 # [PATCH] 2619/1: Update h7201_defconfig default config # # ChangeSet # 2005/03/28 12:35:10+01:00 vince@org.rmk.(none) # [ARM PATCH] 2618/1: Update h3600_defconfig default config # # Patch from Vincent Sanders # # Updates h3600_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/h3600_defconfig # 2005/03/28 00:02:26+01:00 vince@org.rmk.(none) +512 -545 # [PATCH] 2618/1: Update h3600_defconfig default config # # ChangeSet # 2005/03/28 12:27:36+01:00 vince@org.rmk.(none) # [ARM PATCH] 2617/1: Update fortunet_defconfig default config # # Patch from Vincent Sanders # # Updates fortunet_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/fortunet_defconfig # 2005/03/27 23:51:11+01:00 vince@org.rmk.(none) +319 -350 # [PATCH] 2617/1: Update fortunet_defconfig default config # # ChangeSet # 2005/03/28 12:19:02+01:00 vince@org.rmk.(none) # [ARM PATCH] 2616/1: Update smdk2410_defconfig default config # # Patch from Vincent Sanders # # Updates smdk2410_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/smdk2410_defconfig # 2005/03/27 22:42:40+01:00 vince@org.rmk.(none) +234 -164 # [PATCH] 2616/1: Update smdk2410_defconfig default config # # ChangeSet # 2005/03/28 12:11:19+01:00 vince@org.rmk.(none) # [ARM PATCH] 2615/1: Update shannon_defconfig default config # # Patch from Vincent Sanders # # Updates shannon_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/shannon_defconfig # 2005/03/27 23:26:47+01:00 vince@org.rmk.(none) +467 -327 # [PATCH] 2615/1: Update shannon_defconfig default config # # ChangeSet # 2005/03/28 12:03:00+01:00 vince@org.rmk.(none) # [ARM PATCH] 2614/1: Update jornada720_defconfig default config # # Patch from Vincent Sanders # # Updates jornada720_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/jornada720_defconfig # 2005/03/27 23:10:36+01:00 vince@org.rmk.(none) +580 -553 # [PATCH] 2614/1: Update jornada720_defconfig default config # # ChangeSet # 2005/03/28 11:54:31+01:00 vince@org.rmk.(none) # [ARM PATCH] 2613/1: Update ixp4xx_defconfig default config # # Patch from Vincent Sanders # # Updates ixp4xx_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ixp4xx_defconfig # 2005/03/27 22:53:41+01:00 vince@org.rmk.(none) +309 -223 # [PATCH] 2613/1: Update ixp4xx_defconfig default config # # ChangeSet # 2005/03/28 11:47:29+01:00 vince@org.rmk.(none) # [ARM PATCH] 2612/1: Update ixdp2801_defconfig default config # # Patch from Vincent Sanders # # Updates ixdp2801_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ixdp2801_defconfig # 2005/03/27 22:39:19+01:00 vince@org.rmk.(none) +181 -89 # [PATCH] 2612/1: Update ixdp2801_defconfig default config # # ChangeSet # 2005/03/28 11:39:28+01:00 vince@org.rmk.(none) # [ARM PATCH] 2611/1: Update footbridge_defconfig default config # # Patch from Vincent Sanders # # Updates footbridge_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/footbridge_defconfig # 2005/03/27 23:02:24+01:00 vince@org.rmk.(none) +834 -454 # [PATCH] 2611/1: Update footbridge_defconfig default config # # ChangeSet # 2005/03/28 11:31:18+01:00 vince@org.rmk.(none) # [ARM PATCH] 2610/1: Update epxa10db_defconfig default config # # Patch from Vincent Sanders # # Updates epxa10db_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/epxa10db_defconfig # 2005/03/27 22:46:51+01:00 vince@org.rmk.(none) +197 -149 # [PATCH] 2610/1: Update epxa10db_defconfig default config # # ChangeSet # 2005/03/28 11:22:33+01:00 vince@org.rmk.(none) # [ARM PATCH] 2609/1: Update ep80219_defconfig default config # # Patch from Vincent Sanders # # Updates ep80219_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ep80219_defconfig # 2005/03/27 22:34:12+01:00 vince@org.rmk.(none) +207 -155 # [PATCH] 2609/1: Update ep80219_defconfig default config # # ChangeSet # 2005/03/28 11:14:40+01:00 vince@org.rmk.(none) # [ARM PATCH] 2608/1: Update pxa255-idp_defconfig default config # # Patch from Vincent Sanders # # Updates pxa255-idp_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/pxa255-idp_defconfig # 2005/03/27 22:20:18+01:00 vince@org.rmk.(none) +170 -136 # [PATCH] 2608/1: Update pxa255-idp_defconfig default config # # ChangeSet # 2005/03/28 11:07:06+01:00 vince@org.rmk.(none) # [ARM PATCH] 2607/1: Update pleb_defconfig default config # # Patch from Vincent Sanders # # Updates pleb_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/pleb_defconfig # 2005/03/27 22:03:02+01:00 vince@org.rmk.(none) +135 -85 # [PATCH] 2607/1: Update pleb_defconfig default config # # ChangeSet # 2005/03/28 10:58:14+01:00 vince@org.rmk.(none) # [ARM PATCH] 2606/1: Update omnimeter_defconfig default config # # Patch from Vincent Sanders # # Updates omnimeter_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/omnimeter_defconfig # 2005/03/27 21:31:45+01:00 vince@org.rmk.(none) +516 -283 # [PATCH] 2606/1: Update omnimeter_defconfig default config # # ChangeSet # 2005/03/28 10:49:23+01:00 vince@org.rmk.(none) # [ARM PATCH] 2605/1: Update ixdp2800_defconfig default config # # Patch from Vincent Sanders # # Updates ixdp2800_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ixdp2800_defconfig # 2005/03/27 22:15:23+01:00 vince@org.rmk.(none) +181 -89 # [PATCH] 2605/1: Update ixdp2800_defconfig default config # # ChangeSet # 2005/03/28 10:40:47+01:00 vince@org.rmk.(none) # [ARM PATCH] 2604/1: Update ixdp2401_defconfig default config # # Patch from Vincent Sanders # # Updates ixdp2401_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ixdp2401_defconfig # 2005/03/27 21:53:55+01:00 vince@org.rmk.(none) +181 -89 # [PATCH] 2604/1: Update ixdp2401_defconfig default config # # ChangeSet # 2005/03/28 10:09:55+01:00 vince@org.rmk.(none) # [ARM PATCH] 2603/1: Update ixdp2400_defconfig default config # # Patch from Vincent Sanders # # Updates ixdp2400_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ixdp2400_defconfig # 2005/03/27 21:13:39+01:00 vince@org.rmk.(none) +181 -89 # [PATCH] 2603/1: Update ixdp2400_defconfig default config # # ChangeSet # 2005/03/28 10:02:38+01:00 vince@org.rmk.(none) # [ARM PATCH] 2602/1: Update integrator_defconfig default config # # Patch from Vincent Sanders # # Updates integrator_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/integrator_defconfig # 2005/03/27 21:14:51+01:00 vince@org.rmk.(none) +192 -132 # [PATCH] 2602/1: Update integrator_defconfig default config # # ChangeSet # 2005/03/28 09:53:34+01:00 vince@org.rmk.(none) # [ARM PATCH] 2601/1: Update enp2611_defconfig default config # # Patch from Vincent Sanders # # Updates enp2611_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/enp2611_defconfig # 2005/03/27 22:08:24+01:00 vince@org.rmk.(none) +181 -89 # [PATCH] 2601/1: Update enp2611_defconfig default config # # ChangeSet # 2005/03/28 09:44:30+01:00 vince@org.rmk.(none) # [ARM PATCH] 2600/1: Update edb7211_defconfig default config # # Patch from Vincent Sanders # # Updates edb7211_defconfig to take account of the Kconfig changes this # change is slightly more invasive than otehrs in this series because this # configuration has not been updated in a *long* time. It appears to # build with this config now. # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/edb7211_defconfig # 2005/03/27 21:48:13+01:00 vince@org.rmk.(none) +354 -179 # [PATCH] 2600/1: Update edb7211_defconfig default config # # ChangeSet # 2005/03/27 22:24:51-06:00 stevef@smf-t23.(none) # [CIFS] various code formatting cleanup # # Signed-off-by: Jesper Juhl (juhl-lkml@dif.dk) # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/inode.c # 2005/03/27 22:24:27-06:00 stevef@smf-t23.(none) +336 -325 # various formatting cleanup # # ChangeSet # 2005/03/28 01:57:43+01:00 vince@org.rmk.(none) # [ARM PATCH] 2599/1: Update s3c2410_defconfig default config # # Patch from Vincent Sanders # # Updates s3c2410_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/s3c2410_defconfig # 2005/03/27 17:47:45+01:00 vince@org.rmk.(none) +172 -135 # [PATCH] 2599/1: Update s3c2410_defconfig default config # # ChangeSet # 2005/03/28 01:35:40+01:00 vince@org.rmk.(none) # [ARM PATCH] 2598/1: Update omap_h2_1610_defconfig default config # # Patch from Vincent Sanders # # Updates omap_h2_1610_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # ChangeSet # 2005/03/27 16:25:11-08:00 torvalds@ppc970.osdl.org # Add '__nocast' sparse annotation to allow people to mark places # where implicit casts are not appropriate. # # This can be used to mark unsigned integers as being uncastable # to signed, for example. Or enums as not degrading to integers # and vice versa. # # include/linux/compiler.h # 2005/03/27 16:25:02-08:00 torvalds@ppc970.osdl.org +2 -0 # Add '__nocast' sparse annotation to allow people to mark places # where implicit casts are not appropriate. # # This can be used to mark unsigned integers as being uncastable # to signed, for example. Or enums as not degrading to integers # and vice versa. # # arch/arm/configs/omap_h2_1610_defconfig # 2005/03/27 17:52:42+01:00 vince@org.rmk.(none) +215 -179 # [PATCH] 2598/1: Update omap_h2_1610_defconfig default config # # ChangeSet # 2005/03/28 01:13:42+01:00 vince@org.rmk.(none) # [ARM PATCH] 2597/1: Update netwinder_defconfig default config # # Patch from Vincent Sanders # # Updates netwinder_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/netwinder_defconfig # 2005/03/27 15:18:43+01:00 vince@org.rmk.(none) +454 -371 # [PATCH] 2597/1: Update netwinder_defconfig default config # # ChangeSet # 2005/03/28 00:56:04+01:00 vince@org.rmk.(none) # [ARM PATCH] 2596/1: Update mx1ads_defconfig default config # # Patch from Vincent Sanders # # Updates mx1ads_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/mx1ads_defconfig # 2005/03/27 02:15:47+01:00 vince@org.rmk.(none) +185 -92 # [PATCH] 2596/1: Update mx1ads_defconfig default config # # ChangeSet # 2005/03/28 00:31:05+01:00 vince@org.rmk.(none) # [ARM PATCH] 2595/1: Update mainstone_defconfig default config # # Patch from Vincent Sanders # # Updates mainstone_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/mainstone_defconfig # 2005/03/26 20:00:46+00:00 vince@org.rmk.(none) +241 -157 # [PATCH] 2595/1: Update mainstone_defconfig default config # # ChangeSet # 2005/03/28 00:08:19+01:00 vince@org.rmk.(none) # [ARM PATCH] 2594/1: Update iq80332_defconfig default config # # Patch from Vincent Sanders # # Updates iq80332_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/iq80332_defconfig # 2005/03/27 17:33:40+01:00 vince@org.rmk.(none) +206 -154 # [PATCH] 2594/1: Update iq80332_defconfig default config # # ChangeSet # 2005/03/27 23:47:51+01:00 vince@org.rmk.(none) # [ARM PATCH] 2593/1: Update iq80331_defconfig default config # # Patch from Vincent Sanders # # Updates iq80331_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/iq80331_defconfig # 2005/03/27 15:13:38+01:00 vince@org.rmk.(none) +206 -154 # [PATCH] 2593/1: Update iq80331_defconfig default config # # ChangeSet # 2005/03/27 23:23:01+01:00 vince@org.rmk.(none) # [ARM PATCH] 2592/1: Update iq80321_defconfig default config # # Patch from Vincent Sanders # # Updates iq80321_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/iq80321_defconfig # 2005/03/27 13:24:10+01:00 vince@org.rmk.(none) +144 -90 # [PATCH] 2592/1: Update iq80321_defconfig default config # # ChangeSet # 2005/03/27 23:01:32+01:00 vince@org.rmk.(none) # [ARM PATCH] 2591/1: Update iq31244_defconfig default config # # Patch from Vincent Sanders # # Updates iq31244_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/iq31244_defconfig # 2005/03/27 02:10:39+01:00 vince@org.rmk.(none) +207 -154 # [PATCH] 2591/1: Update iq31244_defconfig default config # # ChangeSet # 2005/03/27 22:39:04+01:00 vince@org.rmk.(none) # [ARM PATCH] 2590/1: Update ebsa110_defconfig default config # # Patch from Vincent Sanders # # Updates ebsa110_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/ebsa110_defconfig # 2005/03/27 18:29:49+01:00 vince@org.rmk.(none) +174 -92 # [PATCH] 2590/1: Update ebsa110_defconfig default config # # ChangeSet # 2005/03/27 22:14:50+01:00 vince@org.rmk.(none) # [ARM PATCH] 2589/1: Update cerfcube_defconfig default config # # Patch from Vincent Sanders # # Updates cerfcube_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/cerfcube_defconfig # 2005/03/27 14:19:40+01:00 vince@org.rmk.(none) +327 -264 # [PATCH] 2589/1: Update cerfcube_defconfig default config # # ChangeSet # 2005/03/27 22:07:05+01:00 vince@org.rmk.(none) # [ARM PATCH] 2588/1: Update bast_defconfig default config # # Patch from Vincent Sanders # # Updates bast_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/bast_defconfig # 2005/03/27 02:24:16+01:00 vince@org.rmk.(none) +199 -126 # [PATCH] 2588/1: Update bast_defconfig default config # # ChangeSet # 2005/03/27 21:59:21+01:00 vince@org.rmk.(none) # [ARM PATCH] 2587/1: Update badge4_defconfig default config # # Patch from Vincent Sanders # # Updates badge4_defconfig to take account of the Kconfig changes # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/badge4_defconfig # 2005/03/26 21:32:27+00:00 vince@org.rmk.(none) +735 -649 # [PATCH] 2587/1: Update badge4_defconfig default config # # ChangeSet # 2005/03/27 21:51:56+01:00 vince@org.rmk.(none) # [ARM PATCH] 2586/1: Update clps7500_defconfig default config # # Patch from Vincent Sanders # # Updates clps7500_defconfig to take account of the Kconfig changes this # depends on 2585/1 # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/configs/clps7500_defconfig # 2005/03/27 17:20:49+01:00 vince@org.rmk.(none) +517 -230 # [PATCH] 2586/1: Update clps7500_defconfig default config # # ChangeSet # 2005/03/27 20:09:22+01:00 vince@org.rmk.(none) # [ARM PATCH] 2585/1: missing ARCH_CLPS7500 depends in video Kconfig # # Patch from Vince Sanders # # While updating default configurations it was noted that the FB_ACORN # video config option was missing a dependancy on ARCH_CLPS7500 # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # drivers/video/Kconfig # 2005/03/27 16:54:20+01:00 vince@org.rmk.(none) +1 -1 # [PATCH] 2585/1: missing ARCH_CLPS7500 depends in video Kconfig # # ChangeSet # 2005/03/27 20:01:58+01:00 vince@org.rmk.(none) # [ARM PATCH] 2584/1: cpufreq Kconfig menu tidyup # # Patch from Vincent Sanders # # While updating default configurations it was noted that CONFIG_SA1100 # seems to enable the cpufreq entries however the sourced # drivers/cpufreq/Kconfig doesnt do a menu section so it looks awful, # this tiny patch fixes it. # # Signed-off-by: Vincent Sanders # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/27 19:39:50+01:00 vince@org.rmk.(none) +4 -0 # [PATCH] 2584/1: cpufreq Kconfig menu tidyup # # ChangeSet # 2005/03/27 18:48:13+01:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2576/1: Fix LDRD and LDRSB (Thumb) abort handling # # Patch from Deepak Saxena # # The ARM LDRD (v5+) and Thumb LDRSB instructions use bit 20/11 (ARM/Thumb) # differently than every other instruction, so it is set to 0 (write) even # though the instructions are read instructions. This means that during an # abort the instructions will be treated as a write and the handler will # raise a signal from unwriteable locations if they fault. We have to # specifically check for these instructions from the abort handlers to # treat them properly. EABI toolchains emit LDRD instructions and even # those not using EABI might have handcoded ASM that uses these instructions. # This patch creates an abort-macro.S file that is included by the # abort-ev* files that need the special cases and changes those # handlers to use the macros. ARMv6 does not need the special case # handling as the HW takes care of setting the FSR bit appropriately. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mm/abort-ev5tj.S # 2005/03/23 00:41:36+00:00 dsaxena@net.rmk.(none) +3 -3 # [PATCH] 2576/1: Fix LDRD and LDRSB (Thumb) abort handling # # arch/arm/mm/abort-ev5t.S # 2005/03/23 00:47:13+00:00 dsaxena@net.rmk.(none) +3 -3 # [PATCH] 2576/1: Fix LDRD and LDRSB (Thumb) abort handling # # arch/arm/mm/abort-ev4t.S # 2005/03/23 00:41:16+00:00 dsaxena@net.rmk.(none) +2 -3 # [PATCH] 2576/1: Fix LDRD and LDRSB (Thumb) abort handling # # arch/arm/mm/abort-macro.S # 2005/03/23 01:13:38+00:00 dsaxena@net.rmk.(none) +42 -0 # [PATCH] 2576/1: Fix LDRD and LDRSB (Thumb) abort handling # # arch/arm/mm/abort-macro.S # 2005/03/23 01:13:38+00:00 dsaxena@net.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mm/abort-macro.S # # ChangeSet # 2005/03/27 18:32:03+01:00 buytenh@org.rmk.(none) # [ARM PATCH] 2581/1: two more ixp2000 typo fixes # # Patch from Lennert Buytenhek # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/io.h # 2005/03/25 23:16:38+00:00 buytenh@org.rmk.(none) +2 -2 # [PATCH] 2581/1: two more ixp2000 typo fixes # # ChangeSet # 2005/03/27 18:24:18+01:00 buytenh@org.rmk.(none) # [ARM PATCH] 2580/1: remove nonsensical comment from arch-ixp2000/io.h # # Patch from Lennert Buytenhek # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/io.h # 2005/03/25 23:16:38+00:00 buytenh@org.rmk.(none) +0 -4 # [PATCH] 2580/1: remove nonsensical comment from arch-ixp2000/io.h # # ChangeSet # 2005/03/27 18:17:05+01:00 nico@org.rmk.(none) # [ARM PATCH] 2579/1: make early boot failure more verbose # # Patch from Nicolas Pitre # # It is pointless for cases where one tries to boot a kernel # on the wrong ARM subarchitecture, but for those cases where the # architecture is similar enough so the low level routines do work # then something a bit more informative than "Error: a" might be # handy, especially when the bootloader is the culprit. # All extra strings are compiled in only if CONFIG_DEBUG_LL # is selected of course. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # include/asm-arm/mach/arch.h # 2005/03/27 00:00:00+00:00 nico@org.rmk.(none) +1 -1 # [PATCH] 2579/1: make early boot failure more verbose # # arch/arm/kernel/head.S # 2005/03/27 00:00:00+00:00 nico@org.rmk.(none) +53 -22 # [PATCH] 2579/1: make early boot failure more verbose # # ChangeSet # 2005/03/27 18:09:23+01:00 nico@org.rmk.(none) # [ARM PATCH] 2578/1: unsigned compare in processor and machine list walking # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/kernel/head.S # 2005/03/27 00:00:00+00:00 nico@org.rmk.(none) +2 -2 # [PATCH] 2578/1: unsigned compare in processor and machine list walking # # ChangeSet # 2005/03/27 17:56:44+10:00 airlied@starflyer.(none) # drm: free kbuf if copy from user fails.. # # From: Eric Anholt # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2005/03/27 17:56:35+10:00 airlied@starflyer.(none) +3 -1 # drm: free kbuf if copy from user fails.. # # From: Eric Anholt # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/27 17:53:53+10:00 airlied@starflyer.(none) # drm: radeon idct defines # # Add some type 3 idct packets for reference. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_drv.h # 2005/03/27 17:53:43+10:00 airlied@starflyer.(none) +2 -0 # drm: radeon idct defines # # Add some type 3 idct packets for reference. # # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/27 17:52:15+10:00 airlied@starflyer.(none) # drm: radeon driver update 1.16 # # add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear filtering on r200 # fix a bug in the 1.15 merge also. # # From: Roland Scheidegger # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2005/03/27 17:52:07+10:00 airlied@starflyer.(none) +11 -0 # drm: radeon driver update 1.16 # # add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear filtering on r200 # fix a bug in the 1.15 merge also. # # From: Roland Scheidegger # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_drv.h # 2005/03/27 17:52:07+10:00 airlied@starflyer.(none) +6 -2 # drm: radeon driver update 1.16 # # add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear filtering on r200 # fix a bug in the 1.15 merge also. # # From: Roland Scheidegger # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_drm.h # 2005/03/27 17:52:06+10:00 airlied@starflyer.(none) +2 -1 # drm: radeon driver update 1.16 # # add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear filtering on r200 # fix a bug in the 1.15 merge also. # # From: Roland Scheidegger # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/27 17:17:28+10:00 airlied@starflyer.(none) # drm: change DRIVER_ to CORE_ # # Change some defines to better naming. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_sysfs.c # 2005/03/27 17:17:19+10:00 airlied@starflyer.(none) +2 -2 # drm: change DRIVER_ to CORE_ # # Change some defines to better naming. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_stub.c # 2005/03/27 17:17:19+10:00 airlied@starflyer.(none) +2 -2 # drm: change DRIVER_ to CORE_ # # Change some defines to better naming. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.c # 2005/03/27 17:17:19+10:00 airlied@starflyer.(none) +2 -10 # drm: change DRIVER_ to CORE_ # # Change some defines to better naming. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_core.h # 2005/03/27 17:17:19+10:00 airlied@starflyer.(none) +7 -7 # drm: change DRIVER_ to CORE_ # # Change some defines to better naming. # # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/27 16:49:13+10:00 airlied@starflyer.(none) # Fix sparse NULL/0 warning: # drivers/char/drm/radeon_state.c:1845:15: warning: Using plain integer as NULL # pointer # # Signed-off-by: Randy Dunlap # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2005/03/27 16:49:04+10:00 airlied@starflyer.(none) +1 -1 # Fix sparse NULL/0 warning: # drivers/char/drm/radeon_state.c:1845:15: warning: Using plain integer as NULL # pointer # # Signed-off-by: Randy Dunlap # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/27 16:47:24+10:00 airlied@starflyer.(none) # drm: Remove incorrect "drm_"-prefix from parameter description. # # Signed-off-by: Magnus Damm # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_stub.c # 2005/03/27 16:47:15+10:00 airlied@starflyer.(none) +2 -2 # drm: Remove incorrect "drm_"-prefix from parameter description. # # Signed-off-by: Magnus Damm # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/26 13:47:42-08:00 davem@sunset.davemloft.net # Merge sunset.davemloft.net:/home/davem/src/BK/network-2.6 # into sunset.davemloft.net:/home/davem/src/BK/net-2.6 # # net/netrom/nr_in.c # 2005/03/26 13:47:35-08:00 davem@sunset.davemloft.net +0 -0 # Auto merged # # net/bluetooth/af_bluetooth.c # 2005/03/26 13:47:35-08:00 davem@sunset.davemloft.net +0 -3 # Auto merged # # ChangeSet # 2005/03/26 13:45:09-08:00 geert@linux-m68k.org # [PATCH] 3dfx DRM depends on PCI # # 3dfx DRM depends on PCI # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/char/drm/Kconfig # 2005/01/17 13:51:02-08:00 geert@linux-m68k.org +1 -1 # 3dfx DRM depends on PCI # # ChangeSet # 2005/03/26 13:44:52-08:00 geert@linux-m68k.org # [PATCH] TPM depends on PCI # # TPM depends on PCI. # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/char/tpm/Kconfig # 2005/03/21 12:29:37-08:00 geert@linux-m68k.org +1 -1 # TPM depends on PCI # # ChangeSet # 2005/03/26 13:44:35-08:00 geert@linux-m68k.org # [PATCH] M68k: Add missing pieces of thread info TIF_MEMDIE support # # M68k: Add missing pieces of thread info TIF_MEMDIE support (introduced in # 2.6.11-rc3) # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/thread_info.h # 2005/02/04 04:20:27-08:00 geert@linux-m68k.org +6 -0 # M68k: Add missing pieces of thread info TIF_MEMDIE support # # include/asm-m68k/processor.h # 2005/03/20 02:57:33-08:00 geert@linux-m68k.org +2 -1 # M68k: Add missing pieces of thread info TIF_MEMDIE support # # ChangeSet # 2005/03/26 13:44:17-08:00 geert@linux-m68k.org # [PATCH] Mac NCR5380 SCSI: Fix bus error # # Mac NCR5380 SCSI: Fix bus error by passing the correct instance pointer to # request_irq() # # Signed-off-by: Finn Thain # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/scsi/mac_scsi.c # 2005/03/09 03:02:13-08:00 geert@linux-m68k.org +1 -1 # Mac NCR5380 SCSI: Fix bus error # # ChangeSet # 2005/03/26 13:44:00-08:00 geert@linux-m68k.org # [PATCH] M68k: IP checksum updates # # M68k: IP checksum updates: # - ip_fast_csum() needs a "memory" constraint with new gcc versions # - Do not always use d0 in ip_fast_csum(), leave register allocation to gcc # - Fixed constraints of csum_fold() # - Fixed constraints of csum_tcpudp_nofold() # - Moved comment for csum_tcpudp_magic() to the right place # # Signed-off-by: Kars de Jong # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/checksum.h # 2005/03/09 13:02:17-08:00 geert@linux-m68k.org +21 -20 # M68k: IP checksum updates # # ChangeSet # 2005/03/26 13:43:42-08:00 geert@linux-m68k.org # [PATCH] Sun-3/3x: Enable Sun partition tables support by default # # Sun-3/3x: Enable Sun partition tables support by default # # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # fs/partitions/Kconfig # 2005/03/20 02:51:42-08:00 geert@linux-m68k.org +1 -1 # Sun-3/3x: Enable Sun partition tables support by default # # arch/m68k/configs/sun3x_defconfig # 2005/03/20 03:51:36-08:00 geert@linux-m68k.org +1 -0 # Sun-3/3x: Enable Sun partition tables support by default # # arch/m68k/configs/sun3_defconfig # 2005/03/20 03:51:35-08:00 geert@linux-m68k.org +1 -0 # Sun-3/3x: Enable Sun partition tables support by default # # ChangeSet # 2005/03/26 13:43:26-08:00 geert@linux-m68k.org # [PATCH] Zorro: replace printk() with pr_info() in drivers/zorro/zorro.c # # Zorro: This fixes the only printk() in drivers/zorro that has no KERN_* # constant. # # Signed-off-by: James Nelson # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # drivers/zorro/zorro.c # 2005/01/20 17:11:38-08:00 geert@linux-m68k.org +1 -1 # Zorro: replace printk() with pr_info() in drivers/zorro/zorro.c # # ChangeSet # 2005/03/26 13:43:09-08:00 geert@linux-m68k.org # [PATCH] M68k/stdma: Replace sleep_on() with wait_event() # # M68k/stdma: Use wait_event() instead of the deprecated sleep_on() function. # Since wait_event() expects the condition passed in to be the stopping # condition, negate the current one. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # arch/m68k/atari/stdma.c # 2005/01/19 17:25:33-08:00 geert@linux-m68k.org +5 -5 # M68k/stdma: Replace sleep_on() with wait_event() # # ChangeSet # 2005/03/26 13:42:52-08:00 geert@linux-m68k.org # [PATCH] M68k: Update signal delivery handling # # M68k: Update signal delivery handling, which was broken by the removal of # notify_parent() in 2.6.9-rc2 # # Signed-off-by: Roman Zippel # Signed-off-by: Geert Uytterhoeven # Signed-off-by: Linus Torvalds # # include/asm-m68k/signal.h # 2004/12/07 16:43:09-08:00 geert@linux-m68k.org +1 -1 # M68k: Update signal delivery handling # # arch/m68k/kernel/signal.c # 2004/12/07 16:43:09-08:00 geert@linux-m68k.org +20 -129 # M68k: Update signal delivery handling # # ChangeSet # 2005/03/26 13:31:00-08:00 gerg@snapgear.com # [PATCH] m68knommu: remove unused variables in mcfserial.c # # Removed unused/unrefernced mcfrs_tmp_buf array in mcfserial.c, and # mutex associated with it. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # drivers/serial/mcfserial.c # 2005/03/13 19:59:14-08:00 gerg@snapgear.com +0 -12 # m68knommu: remove unused variables in mcfserial.c # # ChangeSet # 2005/03/26 13:30:45-08:00 gerg@snapgear.com # [PATCH] m68knommu: cleanup ColdFire specific trap handling asm code # # A couple of fixes to the ColdFire specific trap handling code: # # . do not clear the stack alignment bits in exception frame (in Lreturn) # breaks return stack badly if applications work with stack un-aligned. # . use generated asm-offsets instead of local offset definitions # . use THREAD_SIZE definition instead of hard coding stack size # (this is needed to support 4k stacks) # . some instruction optimization (uses instructions that encode using # ledd bytes) # # Patches originally from Philippe De Muyter # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/entry.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +33 -43 # m68knommu: cleanup ColdFire specific trap handling asm code # # ChangeSet # 2005/03/26 13:30:30-08:00 gerg@snapgear.com # [PATCH] m68knommu: use generated asm-offsets in trap handlers # # Use generated asm-offsets in trap handling code, not local definitions # of the offsets. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/entry.S # 2005/03/13 19:57:39-08:00 gerg@snapgear.com +3 -3 # m68knommu: use generated asm-offsets in trap handlers # # ChangeSet # 2005/03/26 13:30:15-08:00 gerg@snapgear.com # [PATCH] m68knommu: move LED variable definitions for 5307 # # The LED specific setup code that used to be in platform specific # start up code moved to board level code. This is specificaly for # the Motorola/Freescale 5307 family. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/config.c # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +8 -0 # m68knommu: move LED variable definitions for 5307 # # ChangeSet # 2005/03/26 13:30:01-08:00 gerg@snapgear.com # [PATCH] m68knommu: generate asm-offsets for thread_info struct # # Offsets into the thread_info structure should be auto generated, # instead of using hard coded offset values. This adds entries to # the asm-offsets generated for the m68knommu varients. # # Original patch submitted by Philippe De Muyter # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/kernel/asm-offsets.c # 2005/03/13 19:57:39-08:00 gerg@snapgear.com +14 -2 # m68knommu: generate asm-offsets for thread_info struct # # ChangeSet # 2005/03/26 13:29:46-08:00 gerg@snapgear.com # [PATCH] m68knommu: move LED variable definitions for 5272 # # The LED specific setup code that used to be in platform specific # start up code moved to board level code. This is specificaly for # the Motorola/Freescale 5272 family. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5272/config.c # 2005/03/13 19:57:46-08:00 gerg@snapgear.com +8 -0 # m68knommu: move LED variable definitions for 5272 # # ChangeSet # 2005/03/26 13:29:30-08:00 gerg@snapgear.com # [PATCH] m68knommu: update MAINTAINERS entry # # Update entry in MAINTAINERS file to use my generic uclinux.org # email address. And also clarify who is support the m68knommu # architecture branch. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2005/03/13 19:57:04-08:00 gerg@snapgear.com +2 -1 # m68knommu: update MAINTAINERS entry # # ChangeSet # 2005/03/26 13:29:14-08:00 gerg@snapgear.com # [PATCH] m68knommu: 4k stack support # # Support for 4k kernel stacks on m68knommu. This cleans up the use # of THREAD_SIZE, so it is used instead of hard coded size. Also remove # local offset definitions, these are generated in asm-offsets. # # Patches original from Patch submitted by Philippe De Muyter # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/thread_info.h # 2005/03/13 20:00:03-08:00 gerg@snapgear.com +16 -11 # m68knommu: 4k stack support # # ChangeSet # 2005/03/26 13:28:59-08:00 gerg@snapgear.com # [PATCH] m68knommu: remove duplicate definition of THREAD_SIZE # # Remove definition of THREAD_SIZE in page.h for m68knommu. # It is defined in thread_info.h # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/page.h # 2005/03/13 20:00:03-08:00 gerg@snapgear.com +0 -6 # m68knommu: remove duplicate definition of THREAD_SIZE # # ChangeSet # 2005/03/26 13:28:43-08:00 gerg@snapgear.com # [PATCH] m68knommu: fix spelling mistakes in mafcache.h # # Fix some spelling mistakes in mcfcache.h # # Patch originally submitted by Geert Uytterhoeven # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/mcfcache.h # 2005/03/13 20:00:03-08:00 gerg@snapgear.com +3 -3 # m68knommu: fix spelling mistakes in mafcache.h # # ChangeSet # 2005/03/26 13:28:27-08:00 gerg@snapgear.com # [PATCH] m68knommu: add missing KM_ enums # # Bring the km_type enum definitions into like with other architectures. # # Patch originally submitted by Leon Woestenberg # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/kmap_types.h # 2005/03/13 20:00:03-08:00 gerg@snapgear.com +4 -2 # m68knommu: add missing KM_ enums # # ChangeSet # 2005/03/26 13:28:10-08:00 gerg@snapgear.com # [PATCH] m68knommu: optimize trap handling asm code # # Optimize the trap handling asm code for m68knommu targets. # Mostly this is using instructions that use fewer bytes to encode. # Also remove local definitions for constants that are automatically # generated in the asm-offsets header. # # Original patch came from Philippe De Muyter # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/entry.h # 2005/03/13 20:00:03-08:00 gerg@snapgear.com +24 -29 # m68knommu: optimize trap handling asm code # # ChangeSet # 2005/03/25 21:05:43-08:00 gregkh@suse.de # Merge suse.de:/home/greg/linux/BK/bleed-2.6 # into suse.de:/home/greg/linux/BK/foo # # net/ipv4/fib_hash.c # 2005/03/25 21:05:36-08:00 gregkh@suse.de +0 -0 # Auto merged # # net/bluetooth/af_bluetooth.c # 2005/03/25 21:05:36-08:00 gregkh@suse.de +0 -0 # Auto merged # # fs/isofs/inode.c # 2005/03/25 21:05:36-08:00 gregkh@suse.de +0 -5 # Auto merged # # drivers/net/tun.c # 2005/03/25 21:05:36-08:00 gregkh@suse.de +0 -0 # Auto merged # # Makefile # 2005/03/25 21:05:36-08:00 gregkh@suse.de +0 -0 # Auto merged # # ChangeSet # 2005/03/25 20:57:47-08:00 gregkh@suse.de # merge mainline with 2.6.11.6 and 2.6.11.5 # # net/ipv4/fib_hash.c # 2005/03/25 20:57:27-08:00 gregkh@suse.de +0 -11 # merge mainline with 2.6.11.6 and 2.6.11.5 # # Makefile # 2005/03/25 20:57:27-08:00 gregkh@suse.de +0 -1 # merge mainline with 2.6.11.6 and 2.6.11.5 # # sound/pci/ac97/ac97_codec.c # 2005/03/25 20:51:38-08:00 gregkh@suse.de +0 -8 # Auto merged # # net/xfrm/xfrm_state.c # 2005/03/25 20:51:38-08:00 gregkh@suse.de +0 -1 # Auto merged # # net/netrom/nr_in.c # 2005/03/25 20:51:38-08:00 gregkh@suse.de +0 -0 # Auto merged # # net/bluetooth/af_bluetooth.c # 2005/03/25 20:51:38-08:00 gregkh@suse.de +0 -0 # Auto merged # # kernel/signal.c # 2005/03/25 20:51:37-08:00 gregkh@suse.de +0 -1 # Auto merged # # fs/isofs/rock.c # 2005/03/25 20:51:37-08:00 gregkh@suse.de +0 -14 # Auto merged # # fs/binfmt_elf.c # 2005/03/25 20:51:37-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/net/wan/hd6457x.c # 2005/03/25 20:51:37-08:00 gregkh@suse.de +0 -1 # Auto merged # # drivers/net/via-rhine.c # 2005/03/25 20:51:37-08:00 gregkh@suse.de +0 -3 # Auto merged # # drivers/net/tun.c # 2005/03/25 20:51:37-08:00 gregkh@suse.de +0 -1 # Auto merged # # drivers/net/amd8111e.c # 2005/03/25 20:51:36-08:00 gregkh@suse.de +0 -2 # Auto merged # # ChangeSet # 2005/03/25 20:50:14-08:00 davem@sunset.davemloft.net # [NET]: Forgot to remove doc file when I killed ethertap. # # Noticed by Chris Wright. # # Signed-off-by: David S. Miller # # BitKeeper/deleted/.del-ethertap.txt~88f454fe7fbaa15f # 2005/03/25 20:49:31-08:00 davem@sunset.davemloft.net +0 -0 # Delete: Documentation/networking/ethertap.txt # # ChangeSet # 2005/03/25 19:07:07-08:00 torvalds@ppc970.osdl.org # Undo VIA AGP TLB flush low-bits-zero patch # # It causes problems for people, and as DaveJ says: "Yes, it's clearly # completely broken". # # Cset exclude: davej@delerium.kernelslacker.org|ChangeSet|20050223022752|60156 # # drivers/char/agp/via-agp.c # 2005/03/25 19:07:04-08:00 torvalds@ppc970.osdl.org +0 -0 # Undo VIA AGP TLB flush low-bits-zero patch # # ChangeSet # 2005/03/25 18:14:44-08:00 paulus@samba.org # [PATCH] ppc64: prom.c: use pSeries reconfig notifier # # Use the pSeries_reconfig notifier list to fix up a device node which is about # to be added. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2005/03/18 18:10:38-08:00 paulus@samba.org +31 -9 # ppc64: prom.c: use pSeries reconfig notifier # # ChangeSet # 2005/03/25 18:14:28-08:00 paulus@samba.org # [PATCH] ppc64: introduce pSeries_reconfig.[ch] # # Move as much pSeries-specific DLPAR/hotplug code as possible into its own # file, which is built only when pSeries support is enabled in the config. This # new file is intended to contain support code for the "Dynamic Reconfiguration" # option in the RISC Platform Architecture, which encompasses both PCI hotplug # and dynamic logical partitioning (DLPAR). # # This patch mostly just moves code around, but the device node addition and # removal API is slightly modified. In this way, of_add_node and of_remove_node # are now responsible only for safely updating the device tree and global list, # without all the other stuff like proc entries etc. of_add_node and # of_remove_node have been renamed to of_attach_node and of_detach_node, # respectively. # # This also adds the definitions and api for a notifier chain which is meant to # be used by code that must act upon device node addition or removal. Patches # to migrate code to the notifier api follow in this series. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pSeries_reconfig.h # 2005/03/18 18:10:38-08:00 paulus@samba.org +25 -0 # ppc64: introduce pSeries_reconfig.[ch] # # include/asm-ppc64/prom.h # 2005/03/18 18:10:38-08:00 paulus@samba.org +2 -2 # ppc64: introduce pSeries_reconfig.[ch] # # include/asm-ppc64/pSeries_reconfig.h # 2005/03/18 18:10:38-08:00 paulus@samba.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/pSeries_reconfig.h # # arch/ppc64/kernel/prom.c # 2005/03/18 18:10:43-08:00 paulus@samba.org +13 -143 # ppc64: introduce pSeries_reconfig.[ch] # # arch/ppc64/kernel/proc_ppc64.c # 2005/03/18 18:10:38-08:00 paulus@samba.org +0 -249 # ppc64: introduce pSeries_reconfig.[ch] # # arch/ppc64/kernel/Makefile # 2005/03/18 18:10:38-08:00 paulus@samba.org +1 -1 # ppc64: introduce pSeries_reconfig.[ch] # # arch/ppc64/kernel/pSeries_reconfig.c # 2005/03/18 18:10:38-08:00 paulus@samba.org +446 -0 # ppc64: introduce pSeries_reconfig.[ch] # # arch/ppc64/kernel/pSeries_reconfig.c # 2005/03/18 18:10:38-08:00 paulus@samba.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/pSeries_reconfig.c # # ChangeSet # 2005/03/25 18:04:55-08:00 paulus@samba.org # [PATCH] ppc64: make OF node fixup code usable at runtime # # At boot we recurse through the device tree "fixing up" various fields and # properties in the device nodes. Long ago, to support DLPAR and hotplug, we # largely duplicated some of this fixup code, the main data structures which are # attached to the new device nodes. # # This patch introduces a helper function (prom_alloc) for handling allocations # at both boot and runtime, kills most of the duplicated code, and makes # finish_node, finish_node_interrupts, and interpret_pci_props suitable for use # at runtime by converting them to use prom_alloc. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2005/03/18 18:10:45-08:00 paulus@samba.org +62 -115 # ppc64: make OF node fixup code usable at runtime # # ChangeSet # 2005/03/25 18:04:37-08:00 paulus@samba.org # [PATCH] ppc64: preliminary changes to OF fixup functions # # Preliminary modifications to support using some of the interpret_func family # of functions at runtime. Changes the mem_start argument to be passed by # reference, and the return type to int for error handling to be implemented in # following patches. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom.c # 2005/03/18 18:10:47-08:00 paulus@samba.org +71 -64 # ppc64: preliminary changes to OF fixup functions # # ChangeSet # 2005/03/25 18:00:30-08:00 chrisw@osdl.org # Linux 2.6.11.6 # TAG: v2.6.11.6 # # Makefile # 2005/03/25 17:57:28-08:00 chrisw@osdl.org +1 -1 # Linux 2.6.11.6 # # ChangeSet # 2005/03/25 17:50:52-08:00 akpm@osdl.org # [PATCH] Potential DOS in load_elf_library # # From: Herbert Xu # # Yichen Xie points out that load_elf_library can # modify `elf_phdata' before freeing it. # # CAN-2005-0749 is assigned to this issue. # # Signed-off-by: Andrew Morton # Signed-off-by: Chris Wright # # fs/binfmt_elf.c # 2005/03/20 16:56:41-08:00 akpm@osdl.org +17 -13 # Potential DOS in load_elf_library # # ChangeSet # 2005/03/25 17:50:01-08:00 mlafon@arkoon.net # [PATCH] Suspected information leak (mem pages) in ext2 # # From: "Mathieu Lafon" # # I think I have discovered a potential security problem in ext2: when a # new directory is created, the ext2 block written to disk is not # initialized. # # Included is a proposed patch for Linux 2.6 (ext2_make_empty() function): # # CAN-2005-0400 is assigned to this issue. # # Signed-off-by: Chris Wright # # fs/ext2/dir.c # 2005/03/16 10:17:01-08:00 mlafon@arkoon.net +1 -0 # Suspected information leak (mem pages) in ext2 # # ChangeSet # 2005/03/25 17:49:05-08:00 meissner@suse.de # [PATCH] Fix signedness problem at socket creation # # From: Marcel Holtmann # # CAN-2005-0750 is assigned to this issue # # ilja discovered potential local root exploit in # bluetooth socket creation. # # This patch fixes a small signedness problem when creating the # socket. # # Signed-off-by: Marcel Holtmann # Signed-off-by: Chris Wright # # net/bluetooth/af_bluetooth.c # 2005/03/24 15:39:07-08:00 meissner@suse.de +3 -3 # Fix signedness problem at socket creation # # ChangeSet # 2005/03/25 17:46:03-08:00 chrisw@osdl.org # [PATCH] isofs: more defensive checks against corrupt isofs images # # Michal Zalewski discovers range checking flaws in # iso9660 filesystem. # # http://marc.theaimsgroup.com/?l=bugtraq&m=111110067304783&w=2 # # CAN-2005-0815 is assigned to this issue. # # Some more defensive checks to keep corrupt isofs images from corrupting # memory or causing Oops. # # Signed-off-by: Chris Wright # # ===== fs/isofs/rock.c 1.23 vs edited ===== # # fs/isofs/rock.c # 2005/03/24 00:41:31-08:00 chrisw@osdl.org +4 -0 # isofs: more defensive checks against corrupt isofs images # # ChangeSet # 2005/03/25 17:45:24-08:00 torvalds@osdl.org # [PATCH] isofs: more "corrupted iso image" error cases # # Michal Zalewski discovers range checking flaws in # iso9660 filesystem. # # http://marc.theaimsgroup.com/?l=bugtraq&m=111110067304783&w=2 # # CAN-2005-0815 is assigned to this issue. # # From: Linus Torvalds # # isofs: more "corrupted iso image" error cases # # Thanks to Michal Zalewski for testing. # # Signed-off-by: Chris Wright # # fs/isofs/inode.c # 2005/03/25 15:26:02-08:00 torvalds@osdl.org +5 -0 # isofs: more "corrupted iso image" error cases # # ChangeSet # 2005/03/25 17:44:34-08:00 torvalds@osdl.org # [PATCH] isofs: Handle corupted rock-ridge info slightly better # # Michal Zalewski discovers range checking flaws in # iso9660 filesystem. # # http://marc.theaimsgroup.com/?l=bugtraq&m=111110067304783&w=2 # # CAN-2005-0815 is assigned to this issue. # # From: Linus Torvalds # # isofs: Handle corupted rock-ridge info slightly better. # # Keyword here being 'slightly'. The code is a mess. # # Signed-off-by: Chris Wright # # fs/isofs/rock.c # 2005/03/25 15:25:50-08:00 torvalds@osdl.org +14 -7 # isofs: Handle corupted rock-ridge info slightly better # # ChangeSet # 2005/03/26 11:16:56+11:00 airlied@starflyer.(none) # drm: fixup pci ids # # Add new ATI PCI ID, and fixup i915GM one... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_pciids.h # 2005/03/26 11:16:47+11:00 airlied@starflyer.(none) +2 -1 # drm: fixup pci ids # # Add new ATI PCI ID, and fixup i915GM one... # # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/25 22:43:46+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2577/1: more ixp2000 comment work (typo fixes and annotations) # # Patch from Lennert Buytenhek # # Fix two more ixp2000 typos, and place some comments in ixp2000-regs.h # to remind the developer that the virtual addresses of some of the io # mappings have been hardcoded in various assembly files. (I've been # bitten by this too many times now.) # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/platform.h # 2005/03/20 18:11:34+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2577/1: more ixp2000 comment work (typo fixes and annotations) # # include/asm-arm/arch-ixp2000/ixp2000-regs.h # 2005/03/25 21:35:49+00:00 buytenh@org.rmk.(none) +11 -4 # [PATCH] 2577/1: more ixp2000 comment work (typo fixes and annotations) # # arch/arm/mach-ixp2000/core.c # 2005/03/20 18:11:34+00:00 buytenh@org.rmk.(none) +3 -1 # [PATCH] 2577/1: more ixp2000 comment work (typo fixes and annotations) # # ChangeSet # 2005/03/25 21:06:29+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2507/1: work around ixp2400 erratum #66 # # Patch from Lennert Buytenhek # # Intel's ixp2400 can occasionally corrupt writes to its on-chip # registers, leading to system crashes. The suggested workaround for # this is to map in those registers using XCB=101 instead of XCB=000. # Patch 2491/1 makes all mappings of ixp2000 on-chip I/O regions use # section mappings. This patch makes all iotable section mappings use # XCB=101. This patch depends on 2491/1. # Kernel iotable mappings that are not 1MB-aligned, ioremap(), and # userspace mappings using mmap() on /dev/mem will still generate # XCB=000 mappings, which can trigger erratum #66 quite easily. # For this, an extra patch (to arch/arm/mm/proc-xscale.S) is needed, # which is maintained out-of-tree because it has been rejected in # the past. See http://ixp2xxx.sourceforge.net/kernel/ and look # for 'ixp2000-erratum66-ptes.diff'. # 2.6.11-rc4 with 2491/1 plus this patch survives a week of heavy # testing on my ENP-2611, while 2.6.11-rc4 vanilla doesn't stand a # chance and crashes within 30 minutes under the same workload. # # Signed-off-by: Lennert BuytenhekSigned-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/mach/map.h # 2005/02/16 23:52:13+00:00 buytenh@org.rmk.(none) +8 -7 # [PATCH] 2507/1: work around ixp2400 erratum #66 # # include/asm-arm/arch-ixp2000/ixp2000-regs.h # 2005/02/16 23:52:13+00:00 buytenh@org.rmk.(none) +2 -1 # [PATCH] 2507/1: work around ixp2400 erratum #66 # # arch/arm/mm/mm-armv.c # 2005/02/16 23:52:13+00:00 buytenh@org.rmk.(none) +9 -0 # [PATCH] 2507/1: work around ixp2400 erratum #66 # # arch/arm/mach-ixp2000/core.c # 2005/02/16 23:52:13+00:00 buytenh@org.rmk.(none) +16 -0 # [PATCH] 2507/1: work around ixp2400 erratum #66 # # ChangeSet # 2005/03/25 14:58:46-06:00 stevef@smf-t23.(none) # [CIFS] cleanup unnecessary casts, and redundant null pointer checks # # Suggested by Jesper Juhl, although slightly modified. # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/readdir.c # 2005/03/25 14:58:29-06:00 stevef@smf-t23.(none) +40 -30 # cleanup unnecessary casts, and redundant null pointer checks # # fs/cifs/cifsfs.c # 2005/03/25 14:58:29-06:00 stevef@smf-t23.(none) +2 -4 # cleanup two unnecessary casts # # ChangeSet # 2005/03/25 14:12:19-06:00 stevef@smf-t23.(none) # [CIFS] add generic readv/writev and aio support. # # Suggested by Christoph Hellwig # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/readdir.c # 2005/03/25 14:12:00-06:00 stevef@smf-t23.(none) +11 -3 # add generic readv/writev and aio support, and cleanup some source code formatting. # # fs/cifs/inode.c # 2005/03/25 14:12:00-06:00 stevef@smf-t23.(none) +27 -20 # add generic readv/writev and aio support, and cleanup some source code formatting. # # fs/cifs/file.c # 2005/03/25 14:12:00-06:00 stevef@smf-t23.(none) +0 -11 # move the check for directio mounts on mmap # # fs/cifs/cifsfs.h # 2005/03/25 14:12:00-06:00 stevef@smf-t23.(none) +1 -0 # add generic readv/writev and aio support. # # fs/cifs/cifsfs.c # 2005/03/25 14:12:00-06:00 stevef@smf-t23.(none) +22 -32 # add generic readv/writev and aio support. # # fs/cifs/CHANGES # 2005/03/25 14:12:00-06:00 stevef@smf-t23.(none) +2 -1 # update cifs change log # # ChangeSet # 2005/03/25 09:34:52-08:00 hadi@cyberus.ca # [PKT_SCHED]: action stats double dip # # Following patch fixes a scenario where we have forward compatibility # but action stats being double dipped. # # Signed-off-by: David S. Miller # # net/sched/cls_u32.c # 2005/03/25 09:34:39-08:00 hadi@cyberus.ca +1 -1 # [PKT_SCHED]: action stats double dip # # Following patch fixes a scenario where we have forward compatibility # but action stats being double dipped. # # Signed-off-by: David S. Miller # # net/sched/cls_tcindex.c # 2005/03/25 09:34:39-08:00 hadi@cyberus.ca +3 -2 # [PKT_SCHED]: action stats double dip # # Following patch fixes a scenario where we have forward compatibility # but action stats being double dipped. # # Signed-off-by: David S. Miller # # net/sched/cls_route.c # 2005/03/25 09:34:39-08:00 hadi@cyberus.ca +3 -2 # [PKT_SCHED]: action stats double dip # # Following patch fixes a scenario where we have forward compatibility # but action stats being double dipped. # # Signed-off-by: David S. Miller # # net/sched/cls_fw.c # 2005/03/25 09:34:39-08:00 hadi@cyberus.ca +3 -2 # [PKT_SCHED]: action stats double dip # # Following patch fixes a scenario where we have forward compatibility # but action stats being double dipped. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/25 09:25:23-08:00 mingo@elte.hu # [XFRM]: xfrm_policy destructor fix # # the patch below fixes a bug that i encountered while running a # PREEMPT_RT kernel, but i believe it should be fixed in the generic # kernel too. xfrm_policy_kill() queues a destroyed policy structure to # the GC list, and unlocks the policy->lock spinlock _after_ that point. # This created a scenario where GC processing got to the new structure # first, and kfree()d it - then the write_unlock_bh() was done on the # already kfreed structure. There is no guarantee that GC processing will # be done after policy->lock has been dropped and softirq processing has # been enabled. # # Signed-off-by: Ingo Molnar # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/25 09:25:09-08:00 mingo@elte.hu +10 -6 # [XFRM]: xfrm_policy destructor fix # # the patch below fixes a bug that i encountered while running a # PREEMPT_RT kernel, but i believe it should be fixed in the generic # kernel too. xfrm_policy_kill() queues a destroyed policy structure to # the GC list, and unlocks the policy->lock spinlock _after_ that point. # This created a scenario where GC processing got to the new structure # first, and kfree()d it - then the write_unlock_bh() was done on the # already kfreed structure. There is no guarantee that GC processing will # be done after policy->lock has been dropped and softirq processing has # been enabled. # # Signed-off-by: Ingo Molnar # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/24 23:32:42-05:00 Carlos.Pardo@siliconimage.com # [PATCH] sata_sil: Fix FIFO PCI Bus Arbitration # # This patch set default values for the FIFO PCI Bus Arbitration to avoid # data corruption. The root cause is due to our PCI bus master handling # mismatch with the chipset PCI bridge during DMA xfer (write data to the # device). The patch is to setup the DMA fifo threshold so that there is # no chance for the DMA engine to change protocol. We have seen this # problem only on one motherboard. # # Signed-off-by: Silicon Image Corporation # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_sil.c # 2005/03/24 23:32:35-05:00 Carlos.Pardo@siliconimage.com +27 -1 # [PATCH] sata_sil: Fix FIFO PCI Bus Arbitration # # This patch set default values for the FIFO PCI Bus Arbitration to avoid # data corruption. The root cause is due to our PCI bus master handling # mismatch with the chipset PCI bridge during DMA xfer (write data to the # device). The patch is to setup the DMA fifo threshold so that there is # no chance for the DMA engine to change protocol. We have seen this # problem only on one motherboard. # # Signed-off-by: Silicon Image Corporation # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/24 22:56:42-05:00 bunk@stusta.de # [PATCH] drivers/net/wireless/airo.c: correct a wrong check # # The Coverity checker correctly noted that this condition can't ever be # fulfilled. # # This patch changes it to what it should have been. # # Signed-off-by: Adrian Bunk # Signed-off-by: Jeff Garzik # # drivers/net/wireless/airo.c # 2005/03/22 16:50:03-05:00 bunk@stusta.de +1 -1 # drivers/net/wireless/airo.c: correct a wrong check # # ChangeSet # 2005/03/24 19:33:28-06:00 stevef@smf-t23.(none) # [CIFS] Check if cifs demultiplex thread valid (not exited, or exiting) before we wake it on unmount (otherwise can cause oops in send_sig). # # Pointed out by Ameet Paranjape # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/connect.c # 2005/03/24 19:33:13-06:00 stevef@smf-t23.(none) +2 -1 # Do not wake up cifs demultiplex thread if already exited. # # ChangeSet # 2005/03/24 16:11:28-08:00 phil@ipom.com # [PATCH] USB Storage: Remove dup in unusual_devs # # Matthew Dharm pointed out that your BK tree somehow got 2 versions of an # unusual_devs entry in it. One was from a patch in January and the other # was from an automerge. # # I dug around in bk - which I find to be the most counter-intuitive # program in the world - and generated a patch against your latest BK # tree, and I've attached it. It just removes the dup. # # Signed-off-by: Phil Dibowitz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2005/03/21 01:28:39-08:00 phil@ipom.com +0 -8 # USB Storage: Remove dup in unusual_devs # # ChangeSet # 2005/03/24 16:11:11-08:00 colin@colino.net # [PATCH] USB: fix harmful typos in zd1201.c # # I was looking around to see why monitor mode wouldn't work using the # zd1201 driver, and spotted these obvious typos. # # I think you can safely apply :) # # Signed-off-by: Colin Leroy # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/zd1201.c # 2005/03/24 03:24:41-08:00 colin@colino.net +2 -2 # USB: fix harmful typos in zd1201.c # # ChangeSet # 2005/03/24 15:31:46-08:00 david-b@pacbell.net # [PATCH] USB: ehci split ISO fixes (full speed audio etc) # # This contains patches to the EHCI driver for the full speed isochronous # transfer support: # # - The sitd->hw_buf[1] and sitd->hw_buf_hi[1] fields were not # correctly initialized, affecting transfers which crossed 4K # boundaries. Helps resolve some "buzz" in audio playback. # # - Correctly rounds 188-byte OUT transfers to fit into a single # packet ... no split transfers needed. Resolves other "buzz" in # audio OUT streams. # # - Fixes a cut'n'paste error in the logic to check for microframe # scheduling collisions with a given transaction translator. # The error caused full speed iso tds to be treated in part as # if they were high speed iso tds, which could oops. # # - The split transaction state flag doesn't indicate an error, and # it should be ignored when deciding if (IN) transfers had errors. # # - Remove some code rejecting full speed iso IN transfers; it's # not fully working yet though. # # Plus a some minor cleanups: reporting the iso start frame in the # relevant units, making a debug message more consistent. # # Signed-off-by: Karsten Wiese # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci.h # 2005/03/22 11:23:47-08:00 david-b@pacbell.net +1 -1 # USB: ehci split ISO fixes (full speed audio etc) # # drivers/usb/host/ehci-sched.c # 2005/03/23 16:30:13-08:00 david-b@pacbell.net +13 -18 # USB: ehci split ISO fixes (full speed audio etc) # # ChangeSet # 2005/03/24 15:31:29-08:00 david-b@pacbell.net # [PATCH] USB: usbnet uses netif_msg_*() ethtool filtering # # This converts most of the usbnet code to actually use the ethtool # message flags. The ASIX code is left untouched, since there are # a bunch of patches pending there ... that's where the remaining # handful of "sparse -Wbitwise" warnings come from. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2005/03/21 00:19:25-08:00 david-b@pacbell.net +108 -85 # USB: usbnet uses netif_msg_*() ethtool filtering # # ChangeSet # 2005/03/24 15:31:13-08:00 david-b@pacbell.net # [PATCH] USB: usbnet minor bugfixes # # Two bugfixes to usbnet. The important one is that it's OK when the # minidriver doesn't want to use a status endpoint. That shouldn't # be treated as an error ... errors prevent probe() from succeeding! # # The minor fix is that software driven interface shutdown should neither # be accounted as an error, nor generate a diagnostic. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2005/03/21 01:04:33-08:00 david-b@pacbell.net +6 -1 # USB: usbnet minor bugfixes # # ChangeSet # 2005/03/24 15:30:57-08:00 david-b@pacbell.net # [PATCH] USB: pegasus uses netif_msg_*() filters # # This updates the messaging for the pegasus driver: # # - Use driver model diagnostics or printk using the interface name # for all diagnostic messages ... not dbg()/warn()/err(). # # - Almost everywhere, use the netif_msg_XXX() macros to check the # message control bitmask maintained by ethtool. The default mask # is initialized using a new "message_level" module parameter. # # Also: # # - Removes the needless PEGASUS_RUNNING flag, replacing it with the # standard netdevice mechanism. # # - Cleaner access for unaligned values. Not all processors spend # silicon to support them like x86 does. # # - Adds a few "sparse" fixes. # # - Saves the return values for the requests that manipulate chip # registers ... doesn't yet check them, but at least anyone looking # at the code (e.g. to find out why the link check task is wedged...) # will see where those failure modes are ignored. Currently the # errors may be reported by printk, but the netif_msg_*() filters # make that an even worse alert mechanism. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/pegasus.h # 2005/03/20 21:42:40-08:00 david-b@pacbell.net +2 -2 # USB: pegasus uses netif_msg_*() filters # # drivers/usb/net/pegasus.c # 2005/03/21 00:19:25-08:00 david-b@pacbell.net +191 -106 # USB: pegasus uses netif_msg_*() filters # # ChangeSet # 2005/03/24 15:30:41-08:00 david-b@pacbell.net # [PATCH] USB: usb rndis gadget sparse fixes [4/5] # # This is a bunch of "sparse" fixups for the RNDIS code, saying it's # little-endian on the wire and swapping cpu_to_le32() calls with # more-correct le32_to_cpu() ones. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/rndis.h # 2005/03/19 14:05:11-08:00 david-b@pacbell.net +81 -81 # USB: usb rndis gadget sparse fixes [4/5] # # drivers/usb/gadget/rndis.c # 2005/03/19 14:05:11-08:00 david-b@pacbell.net +86 -83 # USB: usb rndis gadget sparse fixes [4/5] # # ChangeSet # 2005/03/24 15:30:24-08:00 david-b@pacbell.net # [PATCH] USB: gadget zero sparse fixes [5/5] # # Some "sparse" updates for the Gadget Zero driver, preparing it to # expect SETUP packets to be little endian. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/zero.c # 2005/03/19 15:00:06-08:00 david-b@pacbell.net +25 -23 # USB: gadget zero sparse fixes [5/5] # # ChangeSet # 2005/03/24 15:30:07-08:00 david-b@pacbell.net # [PATCH] USB: usb gadgetfs sparse fixes [3/5] # # Many "sparse" updates for GadgetFS driver, preparing it to expect # SETUP packets to be little endian. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/inode.c # 2005/03/19 15:15:46-08:00 david-b@pacbell.net +15 -14 # USB: usb gadgetfs sparse fixes [3/5] # # ChangeSet # 2005/03/24 15:29:50-08:00 stern@rowland.harvard.edu # [PATCH] USB: fix usb file_storage gadget sparse fixes [2/5] # # On Sun, 20 Mar 2005, David Brownell wrote: # # > > - gfile-0319 ... gets rid of most byteorder warnings from the # > > file_storage gadget driver (except for SETUP packet fields) # # This patch causes an undeclared variable error when verbose debugging is # enabled. Please add the following on top of it. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/file_storage.c # 2005/03/21 02:39:23-08:00 stern@rowland.harvard.edu +1 -1 # USB: fix usb file_storage gadget sparse fixes [2/5] # # ChangeSet # 2005/03/24 15:29:34-08:00 david-b@pacbell.net # [PATCH] USB: usb file_storage gadget sparse fixes [2/5] # # Some "sparse" updates for the File-backed Storage Gadget driver, # preparing it to expect SETUP packets to be little endian. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/file_storage.c # 2005/03/19 14:05:11-08:00 david-b@pacbell.net +27 -22 # USB: usb file_storage gadget sparse fixes [2/5] # # ChangeSet # 2005/03/24 15:29:17-08:00 david-b@pacbell.net # [PATCH] USB: usb gadget misc sparse fixes [1/5] # # This lets the file_storage gadget appear again in Kconfig, and fixes # some minor "sparse" warnings. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/usbstring.c # 2005/03/19 15:00:06-08:00 david-b@pacbell.net +2 -2 # USB: usb gadget misc sparse fixes [1/5] # # drivers/usb/gadget/config.c # 2005/03/19 15:00:06-08:00 david-b@pacbell.net +1 -0 # USB: usb gadget misc sparse fixes [1/5] # # drivers/usb/gadget/Kconfig # 2005/03/19 15:00:06-08:00 david-b@pacbell.net +0 -2 # USB: usb gadget misc sparse fixes [1/5] # # ChangeSet # 2005/03/25 00:26:46+01:00 marcel@holtmann.org # [Bluetooth] Fix signedness problem at socket creation # # This patch fixes a small signedness problem when creating the # socket. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/af_bluetooth.c # 2005/03/25 00:23:06+01:00 marcel@holtmann.org +3 -3 # Fix signedness problem at socket creation # # ChangeSet # 2005/03/24 15:14:10-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: remove RW_DETECT from being a config option # # This patch started life as as454b from Alan Stern. It has been rediffed # against the tip, including updates for the way unusual_devs flags are # defined. # # This patch removes the Kconfig option USB_STORAGE_RW_DETECT. That option # was used to enable/supress the attempt to detect if a device was write # protected. # # It seems that the vast majority of devices properly respond to the latest # algorithm for making that determination. So now we move to excluding only # those devices that can't handle it. We accomplish this via the # unusual_devs.h list. # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2005/03/21 00:40:36-08:00 mdharm-usb@one-eyed-alien.net +2 -0 # USB Storage: remove RW_DETECT from being a config option # # drivers/usb/storage/unusual_devs.h # 2005/03/21 00:40:36-08:00 mdharm-usb@one-eyed-alien.net +8 -1 # USB Storage: remove RW_DETECT from being a config option # # drivers/usb/storage/scsiglue.c # 2005/03/21 00:40:36-08:00 mdharm-usb@one-eyed-alien.net +10 -8 # USB Storage: remove RW_DETECT from being a config option # # drivers/usb/storage/Kconfig # 2005/03/21 00:40:36-08:00 mdharm-usb@one-eyed-alien.net +0 -22 # USB Storage: remove RW_DETECT from being a config option # # ChangeSet # 2005/03/24 15:13:53-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: combine waitqueues # # This patch started life as as476, and has been rediffed against the tip. # However, that was a few days ago. # # This patch combines the two separate waitqueue heads used by the # scsi-scanning thread and the device-reset routine into one. After all, # until the scanning thread is through waiting there will be no SCSI # devices and hence no device resets. # # Once the scanning thread is done waiting, the waitqueue can be used by the # reset logic -- so even if the act of scanning produces resets, we're fine. # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2005/03/13 21:33:16-08:00 mdharm-usb@one-eyed-alien.net +3 -5 # USB Storage: combine waitqueues # # drivers/usb/storage/usb.c # 2005/03/13 21:33:16-08:00 mdharm-usb@one-eyed-alien.net +6 -8 # USB Storage: combine waitqueues # # drivers/usb/storage/transport.c # 2005/03/13 21:33:16-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: combine waitqueues # # ChangeSet # 2005/03/24 15:13:36-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: allow disconnect to complete faster # # This patch started life as as476 from Alan Stern. It has been rediffed # against the tip, tho that was a few days ago. # # This patch makes the disconnect() routine not wait for the control and # scanning threads to exit. This may not seem important now, but it will # become important later: We would end up with a deadlock if disconnect() # (which is called with the device locked) was waiting for the control # thread to exit, while the control thread was waiting to lock the device so # it could do an autosuspend. # # It's necessary to make sure that the host and us_data structures aren't # deallocated before the control and scanning threads are through with them. # This is done by calling scsi_host_get and scsi_host_put at the start and # end of each thread, before signalling that the threads are running. Since # the probe() and disconnect() routines cannot run concurrently (guaranteed # to us by the USB core), this method will guarantee the structures are not # deallocated too soon. # # While there's nothing wrong with leaving the threads alive after # disconnect() returns, there would be a real problem if the threads were # still alive when usb_stor_exit returned! So now usb_stor_exit has to wait # to make sure all the threads have died. Apparently the only safe way for # one thread to signal another while exiting is to use complete_and_exit, # which we've been doing. So the patch adds a new driver-wide struct # completion, named threads_gone, and each thread signals it while exiting. # usb_stor_exit must call wait_for_completion the appropriate number of # times, and that number is stored in a new counter named total_threads. # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.c # 2005/03/13 21:33:29-08:00 mdharm-usb@one-eyed-alien.net +41 -7 # USB Storage: allow disconnect to complete faster # # ChangeSet # 2005/03/24 15:13:20-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: exit control thread immediately upon disconnect # # This patch started life as as475 from Alan Stern. It has been rediffed # against the tip, tho that was several days ago. # # This patch causes the main control thread to exit as soon as possible, # i.e., as soon as the DISCONNECTING flag is set. It no longer waits for an # explicit exit command, one with srb == NULL. # # There won't be any bad implications for our interaction with the SCSI # midlayer, because once the DISCONNECTING flag is set we fail every # submitted command immediately in the queuecommand routine. And if a # command manages to squeeze through the crack (submitted and accepted # before we disconnect but not yet processed), the SCSI midlayer will cancel # it automatically when we remove the host. # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.c # 2005/03/13 21:33:41-08:00 mdharm-usb@one-eyed-alien.net +9 -36 # USB Storage: exit control thread immediately upon disconnect # # ChangeSet # 2005/03/24 15:13:02-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: make usb-storage structures refcounted by SCSI # # This patch started life as as474 from Alan Stern. It's been rediffed # against the tip, tho that is now several days old. # # This patch changes the way our private struct us_data is allocated; now it # gets stored at the end of the Scsi_Host rather than separately. That's # what the hostdata field is intended for, and this is how other low-level # host drivers operate. In order to convert between us_data and the # corresponding Scsi_Host I added two new inline routines: us_to_host and # host_to_us. (The conversion actually should be quicker than before by a # microscopic amount, because now it only involves adding an offset whereas # before it involved dereferencing a pointer.) # # The main advantage is that the host is refcounted, so now our us_data # automatically is too. Although that doesn't matter at the moment, it will # matter later on when the control thread may need to outlive the disconnect # callback. # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2005/03/13 21:33:54-08:00 mdharm-usb@one-eyed-alien.net +8 -1 # USB Storage: make usb-storage structures refcounted by SCSI # # drivers/usb/storage/usb.c # 2005/03/13 21:33:54-08:00 mdharm-usb@one-eyed-alien.net +23 -32 # USB Storage: make usb-storage structures refcounted by SCSI # # drivers/usb/storage/transport.c # 2005/03/13 21:33:54-08:00 mdharm-usb@one-eyed-alien.net +2 -2 # USB Storage: make usb-storage structures refcounted by SCSI # # drivers/usb/storage/scsiglue.c # 2005/03/13 21:33:54-08:00 mdharm-usb@one-eyed-alien.net +24 -27 # USB Storage: make usb-storage structures refcounted by SCSI # # ChangeSet # 2005/03/24 14:45:05-08:00 bunk@stusta.de # [PATCH] drivers/usb/core/devices.c: small corrections # # total_written is used at places where it can't have any value different # from 0. # # This patch is partially based on findings of the Coverity checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/devices.c # 2005/03/22 12:15:02-08:00 bunk@stusta.de +2 -5 # drivers/usb/core/devices.c: small corrections # # ChangeSet # 2005/03/24 14:34:40-08:00 rkagan@mail.ru # [PATCH] drivers/usb/core/usb.c: add MODALIAS env var to hotplug # # The patch below adds MODALIAS environment variable to usb hotplug # callout, allowing for its straightforward use with modprobe. # # Signed-off-by: Roman Kagan # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/usb.c # 2005/03/24 14:30:58-08:00 rkagan@mail.ru +27 -0 # drivers/usb/core/usb.c: add MODALIAS env var to hotplug # # ChangeSet # 2005/03/24 14:29:06-08:00 david-b@pacbell.net # [PATCH] USB: pxa25x udc updates, mostly PM # # This has various updates to the PXA 21x/25x/26x UDC driver. # # - Implement the "new" pullup() and vbus_session() methods, and # use them to keep the UDC 48 MHz clock off much of the time. # # * Reworked that ugly Lubbock VBUS IRQ code. Claim both IRQs, # enable only one at a time; clock the UDC only when VBUS is # present. (And get rid of rude runtime messages.) # # * Implement driver model suspend() and resume() calls. When # this device suspends, it clocks off the UDC. On boards that # support it (including Zaurus clamshells, but not Lubbock) # the D+ pullup is disabled, so the host won't see the device. # # - Hmm, the "latest" errata defined some "Must Be One" bits. OK. # # - Change the LED support for debugging. It stopped compiling for # Lubbock a while back. This switches to the standard LED calls # (so it can work on non-Lubbock hardware), removes the EP0 calls # (not very useful any more), and for Lubbock now initializes the # hex leds (U-Boot doesn't enable them, BLOB did). # # - "sparse" updates, and get rid of a warning that's pointless # unless someone's working on DMA support; # # Tested on Lubbock (VBUS sensing but no pullup) and some Zaurus # clamshells (pullup but no VBUS). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/pxa2xx_udc.h # 2005/03/12 16:35:52-08:00 david-b@pacbell.net +16 -13 # USB: pxa25x udc updates, mostly PM # # drivers/usb/gadget/pxa2xx_udc.c # 2005/03/12 16:35:52-08:00 david-b@pacbell.net +183 -96 # USB: pxa25x udc updates, mostly PM # # ChangeSet # 2005/03/24 14:28:49-08:00 david-b@pacbell.net # [PATCH] USB: ohci-omap update (mostly clock gating) # # This syncs the OMAP OHCI code with the latest from the OMAP tree. # The main changes are updated clock gating support (goes with some # clock tree updates, submitted separately) and two minor cleanups: # the platform device resources use physical addressing, not the # static i/o mapped addresses; and there's no longer a need for a # (noexistent in mainstream) separate header file. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-omap.c # 2005/03/16 21:21:33-08:00 david-b@pacbell.net +51 -70 # USB: ohci-omap update (mostly clock gating) # # arch/arm/mach-omap/usb.c # 2005/03/16 20:19:25-08:00 david-b@pacbell.net +2 -2 # USB: ohci-omap update (mostly clock gating) # # ChangeSet # 2005/03/24 14:28:28-08:00 colin@colino.net # [PATCH] USB: fix missing hunk in drivers/usb/Makefile # # I see there's been a driver for zd1201 added in drivers/usb/net/. # There's a hunk missing in drivers/usb/Makefile, the driver doesn't # get built in nothing else in drivers/usb/net is configured in : # # Signed-off-by: Colin Leroy # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/Makefile # 2005/03/18 01:27:22-08:00 colin@colino.net +1 -0 # USB: fix missing hunk in drivers/usb/Makefile # # ChangeSet # 2005/03/24 21:10:51+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Remove SERIAL_INLINE, and move debug macro to 8250_pci.c # # This removes the unnecessary SERIAL_INLINE macro, and moves # SERIAL_DEBUG_PCI to 8250_pci.c # # Signed-off-by: Russell King # # drivers/serial/8250_pci.c # 2005/03/24 21:05:59+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add SERIAL_DEBUG_PCI from drivers/serial/8250.h # # drivers/serial/8250.h # 2005/03/24 21:05:59+00:00 rmk@flint.arm.linux.org.uk +0 -6 # Remove SERIAL_INLINE. # Move SERIAL_DEBUG_PCI to drivers/serial/8250_pci.c # # ChangeSet # 2005/03/24 10:29:25-08:00 davem@sunset.davemloft.net # [TG3]: Update driver version and reldate. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/24 10:28:51-08:00 davem@sunset.davemloft.net +2 -2 # [TG3]: Update driver version and reldate. # # ChangeSet # 2005/03/24 12:13:35-06:00 stevef@smfhome.smfdom # [CIFS] Display pool sizes in cifs stats # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/cifsfs.c # 2005/03/24 12:13:23-06:00 stevef@smfhome.smfdom +1 -1 # Fix undisplayable init message. # # fs/cifs/cifs_debug.c # 2005/03/24 12:13:23-06:00 stevef@smfhome.smfdom +4 -4 # Display pool sizes in cifs stats # # fs/cifs/CHANGES # 2005/03/24 12:13:23-06:00 stevef@smfhome.smfdom +2 -1 # Update change log # # ChangeSet # 2005/03/24 18:07:49+00:00 rmk@flint.arm.linux.org.uk # [ARM] Don't call force_sig_info() for kernel-mode exceptions. # # If an exception happens during boot, we may call force_sig_info(), # which tries to allocate memory. If the memory subsystem has not # been setup, we oops. However, we have lost the real cause of the # problem (the original exception.) Avoid this problem by not calling # force_sig_info() for kernel mode exceptions. # # Signed-off-by: Russell King # # arch/arm/kernel/traps.c # 2005/03/24 18:01:44+00:00 rmk@flint.arm.linux.org.uk +19 -15 # Don't call force_sig_info() for kernel-mode exceptions. # # ChangeSet # 2005/03/24 17:49:23+00:00 rmk@flint.arm.linux.org.uk # [ARM] Move alignment_trap/zero_fp macros into usr_entry macro. # # Signed-off-by: Russell King # # arch/arm/kernel/entry-armv.S # 2005/03/24 17:43:07+00:00 rmk@flint.arm.linux.org.uk +13 -8 # Move alignment_trap/zero_fp macros into usr_entry macro. # # ChangeSet # 2005/03/24 17:34:28+00:00 rmk@flint.arm.linux.org.uk # [ARM] mach-types update # # Signed-off-by: Russell King # # arch/arm/tools/mach-types # 2005/03/24 17:29:13+00:00 rmk@flint.arm.linux.org.uk +18 -2 # mach-types update # # ChangeSet # 2005/03/24 16:22:25+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Add UART_CAP_UUE # # Rather than relying on port->type == PORT_XSCALE, determine when we # need to set UUE via a capability. # # Signed-off-by: Russell King # # drivers/serial/8250.h # 2005/03/24 16:16:39+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add UART_CAP_UUE # # drivers/serial/8250.c # 2005/03/24 16:16:39+00:00 rmk@flint.arm.linux.org.uk +4 -3 # Add UART_CAP_UUE for Xscale UARTs, to enable UART_IER_UUE as # appropriate. # # ChangeSet # 2005/03/24 08:06:44-06:00 shaggy@austin.ibm.com # JFS: remove aops from directory inodes # # jfs no longer uses a directory inode's address space. Clean up the # code by removing aops for directories altogether # # Signed-off-by: Dave Kleikamp # # fs/jfs/namei.c # 2005/03/24 08:05:42-06:00 shaggy@austin.ibm.com +0 -2 # directories no longer need aops # # fs/jfs/inode.c # 2005/03/24 08:05:42-06:00 shaggy@austin.ibm.com +3 -11 # directories no longer need aops # # ChangeSet # 2005/03/24 12:18:28+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] au1x00_uart: remove duplicate serial registration functions # # au1x00_uart doesn't need to provide duplicated 8250 registration # functions. Remove them. # # Signed-off-by: Russell King # # drivers/serial/au1x00_uart.c # 2005/03/24 12:08:52+00:00 rmk@flint.arm.linux.org.uk +0 -65 # Remove duplicate __register_serial/register_serial/unregister_serial # # ChangeSet # 2005/03/24 11:58:57+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Set port.dev to PCMCIA device. # # Since serial_cs provides power management callbacks, we should not use # the fallback methods in 8250.c. We tell 8250.c about this when we # associate a struct device with the port, and, since we now have such # a beast, use it. # # This also makes sysfs indicate which port is associated with which # PCMCIA device. # # Signed-off-by: Russell King # # drivers/serial/serial_cs.c # 2005/03/24 11:53:01+00:00 rmk@flint.arm.linux.org.uk +9 -7 # Set port.dev to PCMCIA device. # # ChangeSet # 2005/03/24 11:34:14+00:00 rmk@flint.arm.linux.org.uk # [SERIAL] Allow drivers to use uart_match_port # # This removes the duplicate of uart_match_port in 8250.c # # Signed-off-by: Russell King # # include/linux/serial_core.h # 2005/03/24 11:28:52+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add uart_match_port prototype # # drivers/serial/serial_core.c # 2005/03/24 11:28:52+00:00 rmk@flint.arm.linux.org.uk +2 -1 # Export uart_match_port # # drivers/serial/8250.c # 2005/03/24 11:28:51+00:00 rmk@flint.arm.linux.org.uk +0 -20 # Remove local copy of uart_match_port() # # ChangeSet # 2005/03/24 12:13:42+01:00 perex@suse.cz # ALSA 1.0.9rc2 # # include/sound/version.h # 2005/03/24 12:13:12+01:00 perex@suse.cz +1 -1 # ALSA 1.0.9rc2 # # ChangeSet # 2005/03/24 12:00:49+01:00 perex@suse.cz # ALSA CVS update # ALSA Version # release: 1.0.9rc2 # # Signed-off-by: Jaroslav Kysela # # include/sound/version.h # 2005/03/24 02:49:11+01:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2005/03/24 09:49:11 # C:ALSA Version # F:include/version.h:1.55->1.56 # L:release: 1.0.9rc2 # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2005/03/24 12:00:05+01:00 perex@suse.cz # [ALSA] seq - fix local variable initialization # # ALSA sequencer # This patch re-adds the initialization of callbacks and pcallbacks # that was accidentally removed in the last revision. # # Signed-off-by: Clemens Ladisch # # sound/core/seq/seq_system.c # 2005/03/24 00:32:08+01:00 perex@suse.cz +2 -0 # [ALSA] seq - fix local variable initialization # # D:2005/03/24 07:32:08 # C:ALSA sequencer # F:core/seq/seq_system.c:1.7->1.8 # L:This patch re-adds the initialization of callbacks and pcallbacks # L:that was accidentally removed in the last revision. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/24 11:59:21+01:00 perex@suse.cz # [ALSA] usb - change timeout of USB control/bulk msg functions to msecs # # USB generic driver # This changes the timeout in the remaining (indirect) calls to # usb_control/bulk_msg from jiffies to msecs. # # Signed-off-by: Clemens Ladisch # # sound/usb/usbmidi.c # 2005/03/24 00:17:17+01:00 perex@suse.cz +1 -1 # [ALSA] usb - change timeout of USB control/bulk msg functions to msecs # # D:2005/03/24 07:17:17 # C:USB generic driver # F:usb/usbaudio.c:1.118->1.119 # F:usb/usbmidi.c:1.44->1.45 # L:This changes the timeout in the remaining (indirect) calls to # L:usb_control/bulk_msg from jiffies to msecs. # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2005/03/24 00:17:17+01:00 perex@suse.cz +4 -4 # [ALSA] usb - change timeout of USB control/bulk msg functions to msecs # # D:2005/03/24 07:17:17 # C:USB generic driver # F:usb/usbaudio.c:1.118->1.119 # F:usb/usbmidi.c:1.44->1.45 # L:This changes the timeout in the remaining (indirect) calls to # L:usb_control/bulk_msg from jiffies to msecs. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/24 11:58:40+01:00 perex@suse.cz # [ALSA] cs4281 - fix typos in the case gameport is disabled # # CS4281 driver # This patch fixes the wrong names of the dummy gameport functions # used when CONFIG_GAMEPORT isn't set. # # Signed-off-by: Clemens Ladisch # # sound/pci/cs4281.c # 2005/03/24 00:11:42+01:00 perex@suse.cz +2 -2 # [ALSA] cs4281 - fix typos in the case gameport is disabled # # D:2005/03/24 07:11:42 # C:CS4281 driver # F:pci/cs4281.c:1.75->1.76 # L:This patch fixes the wrong names of the dummy gameport functions # L:used when CONFIG_GAMEPORT isn't set. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/24 11:57:55+01:00 perex@suse.cz # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # controls on ac97 codec. This flag is used when the sound chip has its # native SPDIF support and it conflicts with the one of AC97 codec. # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emumixer.c # 2005/03/23 10:04:17+01:00 perex@suse.cz +1 -5 # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # D:2005/03/23 17:03:57 # C:AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # F:include/ac97_codec.h:1.64->1.65 # F:pci/atiixp.c:1.33->1.34 # F:pci/ac97/ac97_codec.c:1.178->1.179 # F:pci/au88x0/au88x0_mixer.c:1.4->1.5 # F:pci/emu10k1/emu10k1x.c:1.7->1.8 # F:pci/emu10k1/emumixer.c:1.33->1.34 # L:Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # L:controls on ac97 codec. This flag is used when the sound chip has its # L:native SPDIF support and it conflicts with the one of AC97 codec. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1x.c # 2005/03/23 10:04:17+01:00 perex@suse.cz +1 -0 # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # D:2005/03/23 17:03:57 # C:AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # F:include/ac97_codec.h:1.64->1.65 # F:pci/atiixp.c:1.33->1.34 # F:pci/ac97/ac97_codec.c:1.178->1.179 # F:pci/au88x0/au88x0_mixer.c:1.4->1.5 # F:pci/emu10k1/emu10k1x.c:1.7->1.8 # F:pci/emu10k1/emumixer.c:1.33->1.34 # L:Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # L:controls on ac97 codec. This flag is used when the sound chip has its # L:native SPDIF support and it conflicts with the one of AC97 codec. # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_mixer.c # 2005/03/23 10:04:16+01:00 perex@suse.cz +1 -0 # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # D:2005/03/23 17:03:57 # C:AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # F:include/ac97_codec.h:1.64->1.65 # F:pci/atiixp.c:1.33->1.34 # F:pci/ac97/ac97_codec.c:1.178->1.179 # F:pci/au88x0/au88x0_mixer.c:1.4->1.5 # F:pci/emu10k1/emu10k1x.c:1.7->1.8 # F:pci/emu10k1/emumixer.c:1.33->1.34 # L:Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # L:controls on ac97 codec. This flag is used when the sound chip has its # L:native SPDIF support and it conflicts with the one of AC97 codec. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2005/03/23 10:04:15+01:00 perex@suse.cz +2 -0 # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # D:2005/03/23 17:03:57 # C:AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # F:include/ac97_codec.h:1.64->1.65 # F:pci/atiixp.c:1.33->1.34 # F:pci/ac97/ac97_codec.c:1.178->1.179 # F:pci/au88x0/au88x0_mixer.c:1.4->1.5 # F:pci/emu10k1/emu10k1x.c:1.7->1.8 # F:pci/emu10k1/emumixer.c:1.33->1.34 # L:Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # L:controls on ac97 codec. This flag is used when the sound chip has its # L:native SPDIF support and it conflicts with the one of AC97 codec. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2005/03/23 10:04:16+01:00 perex@suse.cz +1 -1 # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # D:2005/03/23 17:03:57 # C:AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # F:include/ac97_codec.h:1.64->1.65 # F:pci/atiixp.c:1.33->1.34 # F:pci/ac97/ac97_codec.c:1.178->1.179 # F:pci/au88x0/au88x0_mixer.c:1.4->1.5 # F:pci/emu10k1/emu10k1x.c:1.7->1.8 # F:pci/emu10k1/emumixer.c:1.33->1.34 # L:Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # L:controls on ac97 codec. This flag is used when the sound chip has its # L:native SPDIF support and it conflicts with the one of AC97 codec. # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2005/03/23 10:03:57+01:00 perex@suse.cz +1 -0 # [ALSA] Add AC97_SCAP_NO_SPDIF flag # # D:2005/03/23 17:03:57 # C:AC97 Codec,ATIIXP driver,au88x0 driver,EMU10K1/EMU10K2 driver # F:include/ac97_codec.h:1.64->1.65 # F:pci/atiixp.c:1.33->1.34 # F:pci/ac97/ac97_codec.c:1.178->1.179 # F:pci/au88x0/au88x0_mixer.c:1.4->1.5 # F:pci/emu10k1/emu10k1x.c:1.7->1.8 # F:pci/emu10k1/emumixer.c:1.33->1.34 # L:Added a new flag, AC97_SCAP_NO_SPDIF, to prevent to build the SPDIF-related # L:controls on ac97 codec. This flag is used when the sound chip has its # L:native SPDIF support and it conflicts with the one of AC97 codec. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:57:09+01:00 perex@suse.cz # [ALSA] Fix EFX voice allocation/preparation # # EMU10K1/EMU10K2 driver # Fixed a bug (possibly Oops) in allocation/preparation of EFX voices # The invalid voice pointer was accessed when voices are allocated over # the voice table boundary. # # The patch includes a small clean-up & optimization. # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/voice.c # 2005/03/23 10:01:31+01:00 perex@suse.cz +3 -5 # [ALSA] Fix EFX voice allocation/preparation # # D:2005/03/23 17:01:31 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.45->1.46 # F:pci/emu10k1/voice.c:1.8->1.9 # L:Fixed a bug (possibly Oops) in allocation/preparation of EFX voices # L:The invalid voice pointer was accessed when voices are allocated over # L:the voice table boundary. # L: # L:The patch includes a small clean-up & optimization. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2005/03/23 10:01:31+01:00 perex@suse.cz +33 -33 # [ALSA] Fix EFX voice allocation/preparation # # D:2005/03/23 17:01:31 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.45->1.46 # F:pci/emu10k1/voice.c:1.8->1.9 # L:Fixed a bug (possibly Oops) in allocation/preparation of EFX voices # L:The invalid voice pointer was accessed when voices are allocated over # L:the voice table boundary. # L: # L:The patch includes a small clean-up & optimization. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:56:28+01:00 perex@suse.cz # [ALSA] Fix Oops in snd_emu10k1_add_controls # # EMU10K1/EMU10K2 driver # Fixed Oops in snd_emu101k_add_controls (introduced in the last patch # for stack usage reduction). # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2005/03/23 09:58:41+01:00 perex@suse.cz +8 -6 # [ALSA] Fix Oops in snd_emu10k1_add_controls # # D:2005/03/23 16:58:41 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emufx.c:1.72->1.73 # L:Fixed Oops in snd_emu101k_add_controls (introduced in the last patch # L:for stack usage reduction). # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:55:42+01:00 perex@suse.cz # [ALSA] Clean up the chip detection # # EMU10K1/EMU10K2 driver # Minor clean-ups of the chip detectoin code. # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2005/03/23 09:56:03+01:00 perex@suse.cz +25 -33 # [ALSA] Clean up the chip detection # # D:2005/03/23 16:56:02 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.60->1.61 # F:pci/emu10k1/emu10k1.c:1.34->1.35 # F:pci/emu10k1/emu10k1_main.c:1.46->1.47 # L:Minor clean-ups of the chip detectoin code. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1.c # 2005/03/23 09:56:03+01:00 perex@suse.cz +3 -1 # [ALSA] Clean up the chip detection # # D:2005/03/23 16:56:02 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.60->1.61 # F:pci/emu10k1/emu10k1.c:1.34->1.35 # F:pci/emu10k1/emu10k1_main.c:1.46->1.47 # L:Minor clean-ups of the chip detectoin code. # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2005/03/23 09:56:02+01:00 perex@suse.cz +10 -10 # [ALSA] Clean up the chip detection # # D:2005/03/23 16:56:02 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.60->1.61 # F:pci/emu10k1/emu10k1.c:1.34->1.35 # F:pci/emu10k1/emu10k1_main.c:1.46->1.47 # L:Minor clean-ups of the chip detectoin code. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:54:58+01:00 perex@suse.cz # [ALSA] Add Mono volume controls for ALC260 # # HDA Codec driver # Added Mono volume controls for ALC260 codec. # # Signed-off-by: Takashi Iwai # # sound/pci/hda/patch_realtek.c # 2005/03/22 14:02:44+01:00 perex@suse.cz +11 -0 # [ALSA] Add Mono volume controls for ALC260 # # D:2005/03/22 21:02:44 # C:HDA Codec driver # F:pci/hda/patch_realtek.c:1.6->1.7 # L:Added Mono volume controls for ALC260 codec. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:54:18+01:00 perex@suse.cz # [ALSA] Add AD1986A support # # HDA generic driver,HDA Codec driver # Added the patch for Analog Device AD1986A codec. # # Signed-off-by: Takashi Iwai # # sound/pci/hda/hda_patch.h # 2005/03/22 14:02:04+01:00 perex@suse.cz +3 -0 # [ALSA] Add AD1986A support # # D:2005/03/22 21:02:04 # C:HDA generic driver,HDA Codec driver # F:pci/hda/Makefile:1.1->1.2 # F:pci/hda/hda_patch.h:1.1->1.2 # F:pci/hda/patch_analog.c:INITIAL->1.1 # L:Added the patch for Analog Device AD1986A codec. # Signed-off-by: Takashi Iwai # # sound/pci/hda/Makefile # 2005/03/22 14:02:04+01:00 perex@suse.cz +1 -1 # [ALSA] Add AD1986A support # # D:2005/03/22 21:02:04 # C:HDA generic driver,HDA Codec driver # F:pci/hda/Makefile:1.1->1.2 # F:pci/hda/hda_patch.h:1.1->1.2 # F:pci/hda/patch_analog.c:INITIAL->1.1 # L:Added the patch for Analog Device AD1986A codec. # Signed-off-by: Takashi Iwai # # sound/pci/hda/patch_analog.c # 2005/03/24 11:41:29+01:00 perex@suse.cz +445 -0 # [ALSA] Add AD1986A support # # D:2005/03/22 21:02:04 # C:HDA generic driver,HDA Codec driver # F:pci/hda/Makefile:1.1->1.2 # F:pci/hda/hda_patch.h:1.1->1.2 # F:pci/hda/patch_analog.c:INITIAL->1.1 # L:Added the patch for Analog Device AD1986A codec. # Signed-off-by: Takashi Iwai # # sound/pci/hda/patch_analog.c # 2005/03/24 11:41:29+01:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/hda/patch_analog.c # # ChangeSet # 2005/03/24 11:53:32+01:00 perex@suse.cz # [ALSA] correct comment for setting widget output # # HDA Codec driver # This patch has no real logical change, it simply correct the comment. # # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # sound/pci/hda/patch_cmedia.c # 2005/03/22 14:00:37+01:00 perex@suse.cz +4 -4 # [ALSA] correct comment for setting widget output # # D:2005/03/22 21:00:37 # C:HDA Codec driver # F:pci/hda/patch_cmedia.c:1.5->1.6 # L:This patch has no real logical change, it simply correct the comment. # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:52:53+01:00 perex@suse.cz # [ALSA] Fixes AC3 output on Audigy2 sound cards # # EMU10K1/EMU10K2 driver # This patch adds a DSP patch to fix an spdif_bug on some Audigy2 cards. # # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2005/03/22 13:58:45+01:00 perex@suse.cz +9 -1 # [ALSA] Fixes AC3 output on Audigy2 sound cards # # D:2005/03/22 20:58:45 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emufx.c:1.71->1.72 # L:This patch adds a DSP patch to fix an spdif_bug on some Audigy2 cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:52:11+01:00 perex@suse.cz # [ALSA] Add framework for better audigy sound card capabilities selection # # EMU10K1/EMU10K2 driver # This patch adds more options to help identify all the many different # creative sound cards. It will eventually be used to control features # more finely. # # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2005/03/22 13:56:33+01:00 perex@suse.cz +114 -17 # [ALSA] Add framework for better audigy sound card capabilities selection # # D:2005/03/22 20:56:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.59->1.60 # F:pci/emu10k1/emu10k1.c:1.33->1.34 # F:pci/emu10k1/emu10k1_main.c:1.45->1.46 # L:This patch adds more options to help identify all the many different # L:creative sound cards. It will eventually be used to control features # L:more finely. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1.c # 2005/03/22 13:56:33+01:00 perex@suse.cz +2 -16 # [ALSA] Add framework for better audigy sound card capabilities selection # # D:2005/03/22 20:56:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.59->1.60 # F:pci/emu10k1/emu10k1.c:1.33->1.34 # F:pci/emu10k1/emu10k1_main.c:1.45->1.46 # L:This patch adds more options to help identify all the many different # L:creative sound cards. It will eventually be used to control features # L:more finely. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2005/03/22 13:56:17+01:00 perex@suse.cz +18 -0 # [ALSA] Add framework for better audigy sound card capabilities selection # # D:2005/03/22 20:56:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.59->1.60 # F:pci/emu10k1/emu10k1.c:1.33->1.34 # F:pci/emu10k1/emu10k1_main.c:1.45->1.46 # L:This patch adds more options to help identify all the many different # L:creative sound cards. It will eventually be used to control features # L:more finely. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:51:23+01:00 perex@suse.cz # [ALSA] Replace with macros for gameport initialization # # ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # Use some macros for gameport initialization. This makes much easier # to write the compatible layer for the old gameport API in alsa-driver # tree. # # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci.c # 2005/03/22 11:09:38+01:00 perex@suse.cz +3 -3 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2005/03/22 11:09:36+01:00 perex@suse.cz +3 -3 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_main.c # 2005/03/22 11:09:37+01:00 perex@suse.cz +6 -6 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/sonicvibes.c # 2005/03/22 11:09:35+01:00 perex@suse.cz +1 -1 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2005/03/22 11:09:35+01:00 perex@suse.cz +3 -3 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/es1938.c # 2005/03/22 11:09:35+01:00 perex@suse.cz +1 -1 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2005/03/22 11:09:35+01:00 perex@suse.cz +1 -1 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2005/03/22 11:09:37+01:00 perex@suse.cz +5 -5 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2005/03/22 11:09:34+01:00 perex@suse.cz +5 -5 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/cmipci.c # 2005/03/22 11:09:34+01:00 perex@suse.cz +3 -3 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/azt3328.c # 2005/03/22 11:09:33+01:00 perex@suse.cz +3 -3 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_game.c # 2005/03/22 11:09:37+01:00 perex@suse.cz +6 -6 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # sound/pci/als4000.c # 2005/03/22 11:09:33+01:00 perex@suse.cz +3 -3 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2005/03/22 11:09:32+01:00 perex@suse.cz +9 -0 # [ALSA] Replace with macros for gameport initialization # # D:2005/03/22 18:09:32 # C:ALSA Core,ALS4000 driver,AZT3328 driver,CMIPCI driver,CS4281 driver # C:ENS1370/1+ driver,ES1938 driver,ES1968 driver,SonicVibes driver # C:VIA82xx driver,au88x0 driver,CS46xx driver,Trident driver,YMFPCI driver # F:include/core.h:1.67->1.68 # F:pci/als4000.c:1.40->1.41 # F:pci/azt3328.c:1.25->1.26 # F:pci/cmipci.c:1.81->1.82 # F:pci/cs4281.c:1.74->1.75 # F:pci/ens1370.c:1.78->1.79 # F:pci/es1938.c:1.47->1.48 # F:pci/es1968.c:1.86->1.87 # F:pci/sonicvibes.c:1.46->1.47 # F:pci/via82xx.c:1.140->1.141 # F:pci/au88x0/au88x0_game.c:1.6->1.7 # F:pci/cs46xx/cs46xx_lib.c:1.98->1.99 # F:pci/trident/trident_main.c:1.71->1.72 # F:pci/ymfpci/ymfpci.c:1.40->1.41 # L:Use some macros for gameport initialization. This makes much easier # L:to write the compatible layer for the old gameport API in alsa-driver # L:tree. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:50:38+01:00 perex@suse.cz # [ALSA] Fix Oops with joystick support # # YMFPCI driver # Fix Oops when joystick is enabled. # # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci.c # 2005/03/22 10:56:38+01:00 perex@suse.cz +1 -0 # [ALSA] Fix Oops with joystick support # # D:2005/03/22 17:56:38 # C:YMFPCI driver # F:pci/ymfpci/ymfpci.c:1.39->1.40 # L:Fix Oops when joystick is enabled. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:49:58+01:00 perex@suse.cz # [ALSA] Fix Oops with joystick support # # ES1968 driver # Fix Oops when joystick is enabled. # # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2005/03/22 10:46:32+01:00 perex@suse.cz +1 -0 # [ALSA] Fix Oops with joystick support # # D:2005/03/22 17:46:32 # C:ES1968 driver # F:pci/es1968.c:1.85->1.86 # L:Fix Oops when joystick is enabled. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:48:53+01:00 perex@suse.cz # [ALSA] Use vprintk() # # ALSA Core # Use vprintk() instead of printk with a temporary line buffer. # # Signed-off-by: Takashi Iwai # # sound/core/misc.c # 2005/03/22 08:32:43+01:00 perex@suse.cz +2 -6 # [ALSA] Use vprintk() # # D:2005/03/22 15:32:43 # C:ALSA Core # F:core/misc.c:1.18->1.19 # L:Use vprintk() instead of printk with a temporary line buffer. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:46:07+01:00 perex@suse.cz # [ALSA] Reduce stack usage # # Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # AK4XXX AD/DA converters,GUS Library,Wavefront drivers # EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # PDAudioCF driver,USB generic driver # Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # instances. # # Signed-off-by: Takashi Iwai # # sound/usb/usbaudio.c # 2005/03/22 08:34:38+01:00 perex@suse.cz +23 -15 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/pcmcia/pdaudiocf/pdaudiocf.c # 2005/03/22 08:34:38+01:00 perex@suse.cz +9 -3 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart_hwdep.c # 2005/03/22 08:34:38+01:00 perex@suse.cz +50 -34 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/pci/hda/hda_generic.c # 2005/03/22 08:34:38+01:00 perex@suse.cz +5 -8 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2005/03/22 08:34:37+01:00 perex@suse.cz +81 -53 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/isa/wavefront/wavefront_synth.c # 2005/03/22 08:34:27+01:00 perex@suse.cz +84 -47 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_synth.c # 2005/03/22 08:34:27+01:00 perex@suse.cz +14 -7 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/i2c/other/ak4xxx-adda.c # 2005/03/22 08:34:25+01:00 perex@suse.cz +71 -63 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2005/03/22 08:31:21+01:00 perex@suse.cz +35 -24 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_virmidi.c # 2005/03/22 08:31:22+01:00 perex@suse.cz +34 -20 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_system.c # 2005/03/22 08:31:22+01:00 perex@suse.cz +34 -28 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi.c # 2005/03/22 08:31:22+01:00 perex@suse.cz +53 -43 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_midi.c # 2005/03/22 08:31:22+01:00 perex@suse.cz +18 -17 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_init.c # 2005/03/22 08:31:22+01:00 perex@suse.cz +28 -18 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2005/03/22 08:31:21+01:00 perex@suse.cz +12 -4 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/pcm.c # 2005/03/22 08:31:21+01:00 perex@suse.cz +23 -13 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2005/03/22 08:31:21+01:00 perex@suse.cz +1 -1 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/oss/mixer_oss.c # 2005/03/22 08:31:21+01:00 perex@suse.cz +26 -12 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/info.c # 2005/03/22 08:31:21+01:00 perex@suse.cz +4 -5 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # sound/core/control.c # 2005/03/22 08:31:20+01:00 perex@suse.cz +15 -10 # [ALSA] Reduce stack usage # # D:2005/03/22 15:31:20 # C:Control Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # C:AK4XXX AD/DA converters,GUS Library,Wavefront drivers # C:EMU10K1/EMU10K2 driver,HDA generic driver,MIXART driver # C:PDAudioCF driver,USB generic driver # F:core/control.c:1.59->1.60 # F:core/info.c:1.51->1.52 # F:core/pcm.c:1.50->1.51 # F:core/pcm_native.c:1.116->1.117 # F:core/timer.c:1.68->1.69 # F:core/oss/mixer_oss.c:1.39->1.40 # F:core/oss/pcm_oss.c:1.85->1.86 # F:core/seq/seq_midi.c:1.25->1.26 # F:core/seq/seq_system.c:1.6->1.7 # F:core/seq/seq_virmidi.c:1.12->1.13 # F:core/seq/oss/seq_oss_init.c:1.15->1.16 # F:core/seq/oss/seq_oss_midi.c:1.17->1.18 # F:i2c/other/ak4xxx-adda.c:1.9->1.10 # F:isa/gus/gus_synth.c:1.12->1.13 # F:isa/wavefront/wavefront_synth.c:1.25->1.26 # F:pci/emu10k1/emufx.c:1.70->1.71 # F:pci/hda/hda_generic.c:1.2->1.3 # F:pci/mixart/mixart_hwdep.c:1.9->1.10 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.12->1.13 # F:usb/usbaudio.c:1.117->1.118 # L:Reduce the stack usage, mostly by replacing large structs with kmalloc'ed # L:instances. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 11:44:51+01:00 perex@suse.cz # [ALSA] Remove unnecessary ac97 init code # # VIA82xx driver,VIA82xx-modem driver # Removed unnecessary ac97 init code in snd_via82xx_chip_init(). # This reduces eventually the big stack usage, too. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx_modem.c # 2005/03/22 08:29:30+01:00 perex@suse.cz +0 -11 # [ALSA] Remove unnecessary ac97 init code # # D:2005/03/22 15:29:30 # C:VIA82xx driver,VIA82xx-modem driver # F:pci/via82xx.c:1.139->1.140 # F:pci/via82xx_modem.c:1.5->1.6 # L:Removed unnecessary ac97 init code in snd_via82xx_chip_init(). # L:This reduces eventually the big stack usage, too. # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2005/03/22 08:29:30+01:00 perex@suse.cz +0 -9 # [ALSA] Remove unnecessary ac97 init code # # D:2005/03/22 15:29:30 # C:VIA82xx driver,VIA82xx-modem driver # F:pci/via82xx.c:1.139->1.140 # F:pci/via82xx_modem.c:1.5->1.6 # L:Removed unnecessary ac97 init code in snd_via82xx_chip_init(). # L:This reduces eventually the big stack usage, too. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/24 21:18:38+11:00 airlied@starflyer.(none) # agp: export agp_find_bridge for drm # # Signed-off-by: Dave Airlie # # drivers/char/agp/backend.c # 2005/03/24 21:18:30+11:00 airlied@starflyer.(none) +1 -0 # agp: export agp_find_bridge for drm # # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/24 21:15:09+11:00 airlied@starflyer.(none) # drm: fix issue where agp is acquired before agp_init # # With integrated chipsets ala i865 the X server acquires the bridge # for 2D operations then the DRM acquires it for 3D kaboom.. # # Based on patch from Brice Goglin but I # think this patch is safer if it can't find a bridge it acquires it. # # Tested on i865 (i830/i915) and Radeon on Xorg CVS and XFree86 4.3.0 # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_agpsupport.c # 2005/03/24 21:15:01+11:00 airlied@starflyer.(none) +10 -5 # drm: fix issue where agp is acquired before agp_init # # With integrated chipsets ala i865 the X server acquires the bridge # for 2D operations then the DRM acquires it for 3D kaboom.. # # Based on patch from Brice Goglin but I # think this patch is safer if it can't find a bridge it acquires it. # # Tested on i865 (i830/i915) and Radeon on Xorg CVS and XFree86 4.3.0 # # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/24 00:35:43-08:00 gregkh@suse.de # USB: mark usb-serial interface GPL only # # This is done because you have to use a GPL only licensed .h file in order to write a usb-serial # driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/usb-serial.c # 2005/03/24 00:35:30-08:00 gregkh@suse.de +5 -5 # USB: mark usb-serial interface GPL only # # This is done because you have to use a GPL only licensed .h file in order to write a usb-serial # driver. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2005/03/24 17:40:57+11:00 airlied@starflyer.(none) # drm: issue with unique for XFree86 4.3 backwards compatibility # # This got broken at some stage not sure when exactly... but it caused # XFree86 4.3 issues and I had to install sarge... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.c # 2005/03/24 17:40:49+11:00 airlied@starflyer.(none) +6 -0 # drm: issue with unique for XFree86 4.3 backwards compatibility # # This got broken at some stage not sure when exactly... but it caused # XFree86 4.3 issues and I had to install sarge... # # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/24 17:27:39+11:00 airlied@starflyer.(none) # verify_area is deprecated, replaced by access_ok. # Seems I missed this one when I did the big overall conversion. # # # Signed-off-by: Jesper Juhl # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_os_linux.h # 2005/03/24 17:27:30+11:00 airlied@starflyer.(none) +1 -1 # verify_area is deprecated, replaced by access_ok. # Seems I missed this one when I did the big overall conversion. # # # Signed-off-by: Jesper Juhl # Signed-off-by: Dave Airlie # # ChangeSet # 2005/03/23 21:18:39-08:00 hadi@cyberus.ca # [PKT_SCHED]: Use proper attritbute for action stats. # # Action stats were being sent on the wrong TLV. Patch attached. # # Thanks to Andy Furniss for finding and helping debug this. # # Signed-off-by: David S. Miller # # include/linux/rtnetlink.h # 2005/03/23 21:18:21-08:00 hadi@cyberus.ca +0 -1 # [PKT_SCHED]: Use proper attritbute for action stats. # # Action stats were being sent on the wrong TLV. Patch attached. # # Thanks to Andy Furniss for finding and helping debug this. # # Signed-off-by: David S. Miller # # include/linux/pkt_cls.h # 2005/03/23 21:18:21-08:00 hadi@cyberus.ca +1 -0 # [PKT_SCHED]: Use proper attritbute for action stats. # # Action stats were being sent on the wrong TLV. Patch attached. # # Thanks to Andy Furniss for finding and helping debug this. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 20:34:15-08:00 zaitcev@redhat.com # [PATCH] USB: Add myself to MAINTAINERS # # A Jan Kasprzak asked a few days ago to have a MAINTAINERS entry for ub. # This patch updates my entries in MAINTAINERS (ub & ymfpci). # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # MAINTAINERS # 2005/03/21 10:16:56-08:00 zaitcev@redhat.com +9 -2 # USB: Add myself to MAINTAINERS # # ChangeSet # 2005/03/23 20:33:55-08:00 zaitcev@redhat.com # [PATCH] USB: usbmon - document and kill pipe from API # # Someone at linux-usb-devel observed that usbmon should not leak the concept # of pipe to the user space. This patch makes a compromise between having # too many words in the line and the pipe. It breaks API, but I doubt anyone # has any usbmon tools in circulation at this time, so I decided not to move # to a different filename. # # Also, I decided to add a document which describes what is going on. I was # reluctant to do it because I doubt my ability to keep it synchronized and # updated, but there were requests to have one. # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # Documentation/usb/usbmon.txt # 2005/03/23 13:07:28-08:00 zaitcev@redhat.com +156 -0 # USB: usbmon - document and kill pipe from API # # drivers/usb/mon/mon_text.c # 2005/03/18 17:22:26-08:00 zaitcev@redhat.com +12 -2 # USB: usbmon - document and kill pipe from API # # Documentation/usb/usbmon.txt # 2005/03/23 13:07:28-08:00 zaitcev@redhat.com +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/Documentation/usb/usbmon.txt # # ChangeSet # 2005/03/23 20:33:34-08:00 zaitcev@redhat.com # [PATCH] USB: Fix baud selection in mct_u232 # # This is a patch by Hansjoerg Lipp to fix coding error in divisor calculation. # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/mct_u232.c # 2005/03/23 08:26:12-08:00 zaitcev@redhat.com +11 -11 # USB: Fix baud selection in mct_u232 # # ChangeSet # 2005/03/23 20:33:13-08:00 zaitcev@redhat.com # [PATCH] USB: ub static patch # # I'm pretty sure this comes from Bunk originally, but I didn't keep the # original, so only one signed-off-by is present. # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/block/ub.c # 2005/03/18 17:31:40-08:00 zaitcev@redhat.com +1 -1 # USB: ub static patch # # ChangeSet # 2005/03/23 15:26:40-08:00 gregkh@suse.de # USB: fix bug in visor driver with throttle/unthrottle causing oopses. # # Thanks to Mark Lord for reporting this and helping with testing. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/visor.c # 2005/03/23 15:26:23-08:00 gregkh@suse.de +27 -11 # USB: fix bug in visor driver with throttle/unthrottle causing oopses. # # Thanks to Mark Lord for reporting this and helping with testing. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2005/03/23 16:43:50-06:00 shaggy@austin.ibm.com # JFS: Don't allow xtLookup to run against directory with inline data # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_txnmgr.c # 2005/03/23 16:43:27-06:00 shaggy@austin.ibm.com +1 -1 # jfs_dirtable_inline function # # fs/jfs/jfs_incore.h # 2005/03/23 16:43:27-06:00 shaggy@austin.ibm.com +5 -1 # jfs_dirtable_inline function # # fs/jfs/jfs_dtree.c # 2005/03/23 16:43:27-06:00 shaggy@austin.ibm.com +2 -2 # jfs_dirtable_inline function # # fs/jfs/inode.c # 2005/03/23 16:43:27-06:00 shaggy@austin.ibm.com +5 -8 # disallow xtLookup of directory that contains inline data # # ChangeSet # 2005/03/23 16:32:55-06:00 jejb@mulgrave.(none) # 3ware driver update # # - Increase max ioctl buffer size to 512 sectors. # - Make tw_scsi_queue() return 0 for 'Unknown scsi opcode'. # - Fix tw_remove() to free irq handler/unregister_chrdev() before shutting down # the card. # - Change to new 'change_queue_depth' api (from James). # - Fix 'handled=1' ISR usage, remove bogus IRQ check (from Jeff). # # Signed-off-by: Adam Radford # Signed-off-by: James Bottomley # # drivers/scsi/3w-xxxx.h # 2005/03/23 16:31:26-06:00 jejb@mulgrave.(none) +2 -1 # 3ware driver update # # drivers/scsi/3w-xxxx.c # 2005/03/23 16:31:25-06:00 jejb@mulgrave.(none) +172 -194 # 3ware driver update # # ChangeSet # 2005/03/23 12:32:50-08:00 davem@sunset.davemloft.net # Merge bk://kernel.bkbits.net/acme/net-2.6 # into sunset.davemloft.net:/home/davem/src/BK/acme-2.6 # # net/rose/af_rose.c # 2005/03/23 12:32:42-08:00 davem@sunset.davemloft.net +0 -0 # Auto merged # # net/netrom/af_netrom.c # 2005/03/23 12:32:42-08:00 davem@sunset.davemloft.net +0 -0 # Auto merged # # net/bluetooth/rfcomm/sock.c # 2005/03/23 12:32:42-08:00 davem@sunset.davemloft.net +0 -0 # Auto merged # # net/bluetooth/l2cap.c # 2005/03/23 12:32:42-08:00 davem@sunset.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/23 12:27:01-08:00 davem@sunset.davemloft.net # [TG3]: Missing counter bump in tigon3_4gb_hwbug_workaround(). # # Reported by Adrian Bunk. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 12:26:33-08:00 davem@sunset.davemloft.net +1 -0 # [TG3]: Missing counter bump in tigon3_4gb_hwbug_workaround(). # # ChangeSet # 2005/03/23 12:19:14-08:00 bunk@stusta.de # [EQL]: Kill dead code # # This patch removes some obviously dead code found by the Coverity # checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # drivers/net/eql.c # 2005/03/23 12:19:01-08:00 bunk@stusta.de +0 -4 # [EQL]: Kill dead code # # This patch removes some obviously dead code found by the Coverity # checker. # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:17:47-08:00 herbert@gondor.apana.org.au # [IPV4]: Clear DF bit in ip_fragment fast path # # It is possible for ip_fragment() to send out head fragments with # both DF and MF set for packets with local_df set to true. This is # because the fast path tries to only modify the MF bit of the head # fragment. # # Since the offset is always zero for the head fragment, and we know # that DF should be cleared in case of local_df, we can change |= to # a straight assignment. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2005/03/23 12:17:35-08:00 herbert@gondor.apana.org.au +1 -1 # [IPV4]: Clear DF bit in ip_fragment fast path # # It is possible for ip_fragment() to send out head fragments with # both DF and MF set for packets with local_df set to true. This is # because the fast path tries to only modify the MF bit of the head # fragment. # # Since the offset is always zero for the head fragment, and we know # that DF should be cleared in case of local_df, we can change |= to # a straight assignment. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:16:53-08:00 herbert@gondor.apana.org.au # [IPV4]: Check mtu instead of frag_list in ip_push_pending_frames() # # I still didn't like the fact that ip_append_data was the only user # of dst_pmtu :) So I went looking for bugs in the surrounding code. # I managed to find something in ip_push_pending_frames. # # When dst_mtu < dst_pmtu - IPsec overhead (which can be caused by PMTU # discovery within an IPsec tunnel), and we transmit a packet that's # longer than dst_mtu but shorter than dst_pmtu - IPsec overhead, then # the DF bit will be incorrectly set in the inner IP header. # # This will cause the packet to be dropped when it hits the router that # generated the original PMTU event. Unfortunately the ICMP packet coming # back doesn't tell us anything new so the next time we send a packet we # will do exactly the same thing. # # The fix is similar to what we did in ip_output. Instead of checking # whether frag_list is empty, we check the condition skb->len <= dst_mtu # directly and set the DF bit based on that. # # We can enumerate all the possibilities to see that this is correct. # # If skb->len <= dst_mtu and frag_list is empty then this does the # samething as before and is obviously correct. # # If skb->len <= dst_mtu and frag_list is non-empty then it implies # that dst_pmtu has increased since the fragments were constructed # as dst_pmtu = dst_mtu + IPsec overhead. So the skb will now fit # within a single fragment which means that setting DF is correct. # The fragments will be merged by skb_linearise in dev_queue_xmit. # # If skb->len > dst_mtu and frag_list is non-empty then again this # maintains the status quo. # # If skb->len > dst_mtu and frag_list is empty then we will leave the # DF bit clear as the packet will need to be fragmented between the # remote IPsec gateway and the final destination. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2005/03/23 12:16:40-08:00 herbert@gondor.apana.org.au +2 -1 # [IPV4]: Check mtu instead of frag_list in ip_push_pending_frames() # # I still didn't like the fact that ip_append_data was the only user # of dst_pmtu :) So I went looking for bugs in the surrounding code. # I managed to find something in ip_push_pending_frames. # # When dst_mtu < dst_pmtu - IPsec overhead (which can be caused by PMTU # discovery within an IPsec tunnel), and we transmit a packet that's # longer than dst_mtu but shorter than dst_pmtu - IPsec overhead, then # the DF bit will be incorrectly set in the inner IP header. # # This will cause the packet to be dropped when it hits the router that # generated the original PMTU event. Unfortunately the ICMP packet coming # back doesn't tell us anything new so the next time we send a packet we # will do exactly the same thing. # # The fix is similar to what we did in ip_output. Instead of checking # whether frag_list is empty, we check the condition skb->len <= dst_mtu # directly and set the DF bit based on that. # # We can enumerate all the possibilities to see that this is correct. # # If skb->len <= dst_mtu and frag_list is empty then this does the # samething as before and is obviously correct. # # If skb->len <= dst_mtu and frag_list is non-empty then it implies # that dst_pmtu has increased since the fragments were constructed # as dst_pmtu = dst_mtu + IPsec overhead. So the skb will now fit # within a single fragment which means that setting DF is correct. # The fragments will be merged by skb_linearise in dev_queue_xmit. # # If skb->len > dst_mtu and frag_list is non-empty then again this # maintains the status quo. # # If skb->len > dst_mtu and frag_list is empty then we will leave the # DF bit clear as the packet will need to be fragmented between the # remote IPsec gateway and the final destination. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:13:40-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Remap when walk_out crosses page in crypt() # # This is needed so that we can keep the in_place assignment outside the # inner loop. Without this in pathalogical situations we can start out # having walk_out being different from walk_in, but when walk_out crosses # a page it may converge with walk_in. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:13:27-08:00 herbert@gondor.apana.org.au +3 -1 # [CRYPTO]: Remap when walk_out crosses page in crypt() # # This is needed so that we can keep the in_place assignment outside the # inner loop. Without this in pathalogical situations we can start out # having walk_out being different from walk_in, but when walk_out crosses # a page it may converge with walk_in. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:12:46-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Split cbc_process into encrypt/decrypt # # Rather than taking a branch on the fast path, we might as well split # cbc_process into encrypt and decrypt since they don't share anything # in common. # # We can get rid of the cryptfn argument too. I'll do that next. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:12:33-08:00 herbert@gondor.apana.org.au +25 -21 # [CRYPTO]: Split cbc_process into encrypt/decrypt # # Rather than taking a branch on the fast path, we might as well split # cbc_process into encrypt and decrypt since they don't share anything # in common. # # We can get rid of the cryptfn argument too. I'll do that next. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:11:58-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Kill obsolete iv check in cbc_process() # # Here's some more optimisations plus a bug fix for a pathological case # where in_place might not be set correctly which can't happen with any # of the current users. Here is the first one: # # We have long since stopped using a null cit_iv as a means of doing null # encryption. In fact it doesn't work here anyway since we need to copy # src into dst to achieve null encryption. # # No user of cbc_encrypt_iv/cbc_decrypt_iv does this either so let's just # get rid of this check which is sitting in the fast path. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:11:46-08:00 herbert@gondor.apana.org.au +1 -5 # [CRYPTO]: Kill obsolete iv check in cbc_process() # # Here's some more optimisations plus a bug fix for a pathological case # where in_place might not be set correctly which can't happen with any # of the current users. Here is the first one: # # We have long since stopped using a null cit_iv as a means of doing null # encryption. In fact it doesn't work here anyway since we need to copy # src into dst to achieve null encryption. # # No user of cbc_encrypt_iv/cbc_decrypt_iv does this either so let's just # get rid of this check which is sitting in the fast path. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:10:18-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Fix walk->data handling # # The problem is that walk->data wasn't being incremented anymore # after my last change. This patch should fix it up. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.h # 2005/03/23 12:10:05-08:00 herbert@gondor.apana.org.au +1 -0 # [CRYPTO]: Fix walk->data handling # # The problem is that walk->data wasn't being incremented anymore # after my last change. This patch should fix it up. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.c # 2005/03/23 12:10:05-08:00 herbert@gondor.apana.org.au +11 -4 # [CRYPTO]: Fix walk->data handling # # The problem is that walk->data wasn't being incremented anymore # after my last change. This patch should fix it up. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:09:27-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Optimise kmap calls in crypt() # # Perform kmap once (or twice if the buffer is not aligned correctly) # per page in crypt() instead of the current code which does it once # per block. Consequently it will yield once per page instead of once # per block. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:09:15-08:00 herbert@gondor.apana.org.au +11 -7 # [CRYPTO]: Optimise kmap calls in crypt() # # Perform kmap once (or twice if the buffer is not aligned correctly) # per page in crypt() instead of the current code which does it once # per block. Consequently it will yield once per page instead of once # per block. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:08:48-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Eliminate most calls to scatterwalk_copychunks from crypt() # # Only call scatterwalk_copychunks when the block straddles a page boundary. # This allows crypt() to skip the out-of-line call most of the time. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.h # 2005/03/23 12:08:36-08:00 herbert@gondor.apana.org.au +8 -0 # [CRYPTO]: Eliminate most calls to scatterwalk_copychunks from crypt() # # Only call scatterwalk_copychunks when the block straddles a page boundary. # This allows crypt() to skip the out-of-line call most of the time. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.c # 2005/03/23 12:08:36-08:00 herbert@gondor.apana.org.au +10 -16 # [CRYPTO]: Eliminate most calls to scatterwalk_copychunks from crypt() # # Only call scatterwalk_copychunks when the block straddles a page boundary. # This allows crypt() to skip the out-of-line call most of the time. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:08:36-08:00 herbert@gondor.apana.org.au +13 -3 # [CRYPTO]: Eliminate most calls to scatterwalk_copychunks from crypt() # # Only call scatterwalk_copychunks when the block straddles a page boundary. # This allows crypt() to skip the out-of-line call most of the time. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:08:10-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Split src/dst handling out from crypt() # # Move src/dst handling from crypt() into the helpers prepare_src, # prepare_dst, complete_src and complete_dst. complete_src doesn't # actually do anything at the moment but is included for completeness. # # This sets the stage for further optimisations down the track without # polluting crypt() itself. # # These helpers don't belong in scatterwalk.[ch] since they only help # the particular way that crypt() is walking the scatter lists. # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:07:58-08:00 herbert@gondor.apana.org.au +35 -11 # [CRYPTO]: Split src/dst handling out from crypt() # # Move src/dst handling from crypt() into the helpers prepare_src, # prepare_dst, complete_src and complete_dst. complete_src doesn't # actually do anything at the moment but is included for completeness. # # This sets the stage for further optimisations down the track without # polluting crypt() itself. # # These helpers don't belong in scatterwalk.[ch] since they only help # the particular way that crypt() is walking the scatter lists. # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:07:31-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Handle in_place flag in crypt() # # Move the handling of in_place into crypt() itself. This means that we only # need two temporary buffers instead of three. It also allows us to simplify # the check in scatterwalk_samebuf. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.h # 2005/03/23 12:07:18-08:00 herbert@gondor.apana.org.au +2 -4 # [CRYPTO]: Handle in_place flag in crypt() # # Move the handling of in_place into crypt() itself. This means that we only # need two temporary buffers instead of three. It also allows us to simplify # the check in scatterwalk_samebuf. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:07:18-08:00 herbert@gondor.apana.org.au +10 -15 # [CRYPTO]: Handle in_place flag in crypt() # # Move the handling of in_place into crypt() itself. This means that we only # need two temporary buffers instead of three. It also allows us to simplify # the check in scatterwalk_samebuf. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 12:06:51-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Do scatterwalk_whichbuf inline. # # scatterwalk_whichbuf is called once for each block which could be as # small as 8/16 bytes. So it makes sense to do that work inline. # # It's also a bit inflexible since we may want to use the temporary buffer # even if the block doesn't cross page boundaries. In particular, we want # to do that when the source and destination are the same. # # So let's replace it with scatterwalk_across_pages. # # I've also simplified the check in scatterwalk_across_pages. It is # sufficient to only check len_this_page. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.h # 2005/03/23 12:06:38-08:00 herbert@gondor.apana.org.au +6 -1 # [CRYPTO]: Do scatterwalk_whichbuf inline. # # scatterwalk_whichbuf is called once for each block which could be as # small as 8/16 bytes. So it makes sense to do that work inline. # # It's also a bit inflexible since we may want to use the temporary buffer # even if the block doesn't cross page boundaries. In particular, we want # to do that when the source and destination are the same. # # So let's replace it with scatterwalk_across_pages. # # I've also simplified the check in scatterwalk_across_pages. It is # sufficient to only check len_this_page. # # Signed-off-by: David S. Miller # # crypto/scatterwalk.c # 2005/03/23 12:06:38-08:00 herbert@gondor.apana.org.au +0 -10 # [CRYPTO]: Do scatterwalk_whichbuf inline. # # scatterwalk_whichbuf is called once for each block which could be as # small as 8/16 bytes. So it makes sense to do that work inline. # # It's also a bit inflexible since we may want to use the temporary buffer # even if the block doesn't cross page boundaries. In particular, we want # to do that when the source and destination are the same. # # So let's replace it with scatterwalk_across_pages. # # I've also simplified the check in scatterwalk_across_pages. It is # sufficient to only check len_this_page. # # Signed-off-by: David S. Miller # # crypto/cipher.c # 2005/03/23 12:06:38-08:00 herbert@gondor.apana.org.au +10 -2 # [CRYPTO]: Do scatterwalk_whichbuf inline. # # scatterwalk_whichbuf is called once for each block which could be as # small as 8/16 bytes. So it makes sense to do that work inline. # # It's also a bit inflexible since we may want to use the temporary buffer # even if the block doesn't cross page boundaries. In particular, we want # to do that when the source and destination are the same. # # So let's replace it with scatterwalk_across_pages. # # I've also simplified the check in scatterwalk_across_pages. It is # sufficient to only check len_this_page. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:52:39-08:00 davem@sunset.davemloft.net # [NETROM]: net/netrom.h now needs net/sock. # # Signed-off-by: David S. Miller # # include/net/netrom.h # 2005/03/23 11:52:16-08:00 davem@sunset.davemloft.net +1 -0 # [NETROM]: net/netrom.h now needs net/sock.h # # ChangeSet # 2005/03/23 11:44:24-08:00 davem@sunset.davemloft.net # [TG3]: Add missing CHIPREV_5750_{A,B}X defines. # # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2005/03/23 11:43:57-08:00 davem@sunset.davemloft.net +2 -0 # [TG3]: Add missing CHIPREV_5750_{A,B}X defines. # # ChangeSet # 2005/03/23 11:16:37-08:00 ralf@linux-mips.org # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/rose/rose_timer.c # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +7 -7 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/rose/rose_subr.c # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +6 -6 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/rose/rose_route.c # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +2 -1 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/rose/rose_out.c # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +3 -3 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/rose/rose_in.c # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +5 -5 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/rose/af_rose.c # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +20 -37 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # include/net/rose.h # 2005/03/23 11:16:15-08:00 ralf@linux-mips.org +6 -4 # [ROSE]: Get rid of sk_protinfo use # # Below patch puts struct sock into rose_cb to get rid of the need for the # use of sk_protinfo in rose_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:15:42-08:00 ralf@linux-mips.org # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/netrom/nr_timer.c # 2005/03/23 11:15:20-08:00 ralf@linux-mips.org +9 -9 # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/netrom/nr_subr.c # 2005/03/23 11:15:20-08:00 ralf@linux-mips.org +5 -5 # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/netrom/nr_out.c # 2005/03/23 11:15:20-08:00 ralf@linux-mips.org +7 -7 # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/netrom/nr_in.c # 2005/03/23 11:15:20-08:00 ralf@linux-mips.org +4 -4 # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # net/netrom/af_netrom.c # 2005/03/23 11:15:20-08:00 ralf@linux-mips.org +14 -31 # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # include/net/netrom.h # 2005/03/23 11:15:20-08:00 ralf@linux-mips.org +4 -4 # [NETROM]: Get rid of sk_protinfo use # # Below patch puts struct sock into nr_cb to get rid of the need for the # use of sk_protinfo in nr_sk(). While we're touching the data structure # convert it from a typedef into a struct. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:14:06-08:00 mchan@broadcom.com # [TG3]: Add Broadcom copyright. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 11:13:46-08:00 mchan@broadcom.com +1 -0 # [TG3]: Add Broadcom copyright. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:12:04-08:00 mchan@broadcom.com # [TG3]: Fix ethtool set functions # # Fix all relevant ethtool set functions to properly handle the # not-netif_running() case. In most cases, the new settings are accepted without # setting the hardware if not-netif_running(). The new settings will take effect # when the device is subsequently brought up. tg3_nway_reset() is the exception # where it will return -EAGAIN if not-netif_running(). # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 11:11:43-08:00 mchan@broadcom.com +28 -19 # [TG3]: Fix ethtool set functions # # Fix all relevant ethtool set functions to properly handle the # not-netif_running() case. In most cases, the new settings are accepted without # setting the hardware if not-netif_running(). The new settings will take effect # when the device is subsequently brought up. tg3_nway_reset() is the exception # where it will return -EAGAIN if not-netif_running(). # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:09:49-08:00 mchan@broadcom.com # [TG3]: Fix jumbo frames phy settings # # Fix jumbo frame settings on all copper phys that support jumbo frames by # setting the fifo elasticity bit. This setting is for the phy's tx fifo to # properly handle jumbo frames. Note that a similar jumbo frame fix for the # phy's rx fifo was made to tg3 in the past. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2005/03/23 11:09:28-08:00 mchan@broadcom.com +1 -0 # [TG3]: Fix jumbo frames phy settings # # Fix jumbo frame settings on all copper phys that support jumbo frames by # setting the fifo elasticity bit. This setting is for the phy's tx fifo to # properly handle jumbo frames. Note that a similar jumbo frame fix for the # phy's rx fifo was made to tg3 in the past. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 11:09:27-08:00 mchan@broadcom.com +13 -0 # [TG3]: Fix jumbo frames phy settings # # Fix jumbo frame settings on all copper phys that support jumbo frames by # setting the fifo elasticity bit. This setting is for the phy's tx fifo to # properly handle jumbo frames. Note that a similar jumbo frame fix for the # phy's rx fifo was made to tg3 in the past. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:07:37-08:00 mchan@broadcom.com # [TG3]: Add unstable PLL workaround for 5750 # # Add unstable PLL clock workaround for 5750 Ax and Bx devices. The workaround # code is run just before entering D3hot state. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 11:07:16-08:00 mchan@broadcom.com +12 -0 # [TG3]: Add unstable PLL workaround for 5750 # # Add unstable PLL clock workaround for 5750 Ax and Bx devices. The workaround # code is run just before entering D3hot state. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:05:03-08:00 mchan@broadcom.com # [TG3]: Flush status block in tg3_interrupt() # # Add register read of PCI state register in tg3_interrupt() if status block's # updated bit is not set. This will flush the status block and confirm whether # the interrupt is ours or not. PCI ordering rules allow the interrupt to # arrive at the CPU ahead of the status block that may be posted at the # chipset. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 11:04:43-08:00 mchan@broadcom.com +7 -1 # [TG3]: Flush status block in tg3_interrupt() # # Add register read of PCI state register in tg3_interrupt() if status block's # updated bit is not set. This will flush the status block and confirm whether # the interrupt is ours or not. PCI ordering rules allow the interrupt to # arrive at the CPU ahead of the status block that may be posted at the # chipset. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:01:22-08:00 mchan@broadcom.com # [TG3]: Add 5705_plus flag # # Add a 5705_plus flag to indicate the device is 5705, 5750, or future chips # that all share the same basic architecture. This makes it easier to add # support for future devices. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2005/03/23 11:01:01-08:00 mchan@broadcom.com +1 -0 # [TG3]: Add 5705_plus flag # # Add a 5705_plus flag to indicate the device is 5705, 5750, or future chips # that all share the same basic architecture. This makes it easier to add # support for future devices. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/23 11:01:01-08:00 mchan@broadcom.com +26 -42 # [TG3]: Add 5705_plus flag # # Add a 5705_plus flag to indicate the device is 5705, 5750, or future chips # that all share the same basic architecture. This makes it easier to add # support for future devices. # # Signed-off-by: Michael Chan # ACKed-by: Jeff Garzik # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 10:58:41-08:00 chas@cmf.nrl.navy.mil # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/raw.c # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/protocols.h # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +0 -2 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/pppoatm.c # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/mpc.h # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +0 -4 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/mpc.c # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +3 -3 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/lec_arpc.h # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +0 -24 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/lec.h # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +0 -9 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/lec.c # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +45 -38 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/common.c # 2005/03/23 10:58:20-08:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: assorted cleanups # # Signed-off-by: Adrian Bunk # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 10:57:53-08:00 chas@cmf.nrl.navy.mil # [ATM]: [lanai] alpha build fixes # # Signed-off-by: Jeff Garzik # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/lanai.c # 2005/03/23 10:57:34-08:00 chas@cmf.nrl.navy.mil +1 -0 # [ATM]: [lanai] alpha build fixes # # Signed-off-by: Jeff Garzik # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 10:57:06-08:00 chas@cmf.nrl.navy.mil # [ATM]: [ambassador] fix sparse warnings # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/ambassador.h # 2005/03/23 10:56:46-08:00 chas@cmf.nrl.navy.mil +50 -50 # [ATM]: [ambassador] fix sparse warnings # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/ambassador.c # 2005/03/23 10:56:46-08:00 chas@cmf.nrl.navy.mil +4 -4 # [ATM]: [ambassador] fix sparse warnings # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 10:53:53-08:00 chas@cmf.nrl.navy.mil # [ATM]: [nicstar] fix some sparse warnings # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/nicstar.h # 2005/03/23 10:53:33-08:00 chas@cmf.nrl.navy.mil +2 -2 # [ATM]: [nicstar] fix some sparse warnings # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/nicstar.c # 2005/03/23 10:53:33-08:00 chas@cmf.nrl.navy.mil +2 -2 # [ATM]: [nicstar] fix some sparse warnings # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 10:52:51-08:00 chas@cmf.nrl.navy.mil # [ATM]: [zatm] fix sparse warning # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # drivers/atm/zatm.c # 2005/03/23 10:52:30-08:00 chas@cmf.nrl.navy.mil +1 -1 # [ATM]: [zatm] fix sparse warning # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Domen Puncer # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 10:51:57-08:00 chas@cmf.nrl.navy.mil # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/core/dev.c # 2005/03/23 10:51:36-08:00 chas@cmf.nrl.navy.mil +6 -0 # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/bridge/br_private.h # 2005/03/23 10:51:36-08:00 chas@cmf.nrl.navy.mil +6 -0 # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/bridge/br.c # 2005/03/23 10:51:36-08:00 chas@cmf.nrl.navy.mil +1 -8 # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/lec.h # 2005/03/23 10:51:36-08:00 chas@cmf.nrl.navy.mil +0 -8 # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/lec.c # 2005/03/23 10:51:36-08:00 chas@cmf.nrl.navy.mil +1 -4 # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # net/atm/common.c # 2005/03/23 10:51:36-08:00 chas@cmf.nrl.navy.mil +0 -15 # [ATM]: Remove bridge/lec interdependency # # Signed-off-by: Chas Williams # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/23 11:13:21-06:00 jejb@mulgrave.(none) # Make Fusion-MPT much faster as module # # From: Moore, Eric Dean # # Between the 3.01.16 and 3.01.18, we introduced new method # to passing command line options to the driver. Some of the # command line options are used for fine tuning dv(domain # validation) in the driver. By accident, these command line options were # wrapped around #ifdef MODULE in the 3.01.18 version of the driver. # What this meant is when the driver is compiled built-in the kernel, # the optimal settings for dv were ignored, thus poor performance. # # There was actually a fix for this when I submitted SAS drivers # to the mailing list back in November, however the SAS drivers was # rejected, and later on I overlooked submitting a single patch to # solve this. # # Signed-off-by: Eric Moore # Signed-off-by: James Bottomley # # drivers/message/fusion/mptscsih.h # 2005/03/23 11:10:59-06:00 jejb@mulgrave.(none) +0 -8 # Make Fusion-MPT much faster as module # # drivers/message/fusion/mptscsih.c # 2005/03/23 11:10:58-06:00 jejb@mulgrave.(none) +44 -48 # Make Fusion-MPT much faster as module # # drivers/message/fusion/mptbase.h # 2005/03/23 11:10:58-06:00 jejb@mulgrave.(none) +2 -2 # Make Fusion-MPT much faster as module # # ChangeSet # 2005/03/23 11:05:01-06:00 bunk@stusta.de # [PATCH] drivers/scsi/osst.c: remove unused code # # Thanks to both the Coverity checker and GNU gcc, it was found that this # variable is completely unused. # # Signed-off-by: Adrian Bunk # Signed-off-by: Willem Riede # Signed-off-by: James Bottomley # # drivers/scsi/osst.c # 2005/03/22 15:09:32-06:00 bunk@stusta.de +0 -3 # drivers/scsi/osst.c: remove unused code # # ChangeSet # 2005/03/23 10:59:06-06:00 bunk@stusta.de # [PATCH] drivers/scsi/osst.c: make code static # # This patch makes needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Willem Riede # Signed-off-by: James Bottomley # # drivers/scsi/osst.c # 2005/02/28 12:36:25-06:00 bunk@stusta.de +2 -2 # drivers/scsi/osst.c: make code static # # ChangeSet # 2005/03/22 22:51:15-06:00 stevef@smfhome.smfdom # [CIFS] clean up source code formatting # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/ntlmssp.h # 2005/03/22 22:51:06-06:00 stevef@smfhome.smfdom +1 -1 # clean up source code formatting # # fs/cifs/cifsfs.h # 2005/03/22 22:51:06-06:00 stevef@smfhome.smfdom +7 -4 # Update CIFS version to 1.31, and cleanup source code formatting # # fs/cifs/cifsencrypt.h # 2005/03/22 22:51:06-06:00 stevef@smfhome.smfdom +1 -1 # clean up source code formatting # # fs/cifs/CHANGES # 2005/03/22 22:51:06-06:00 stevef@smfhome.smfdom +7 -0 # Update CIFS version to 1.31 # # ChangeSet # 2005/03/22 23:24:12-05:00 russb@emc.com # [PATCH] libata: support descriptor sense in ctrl page # # libata must support the descriptor format sense blocks as they # are required to properly report results of ATA pass through # commands as well as other SCSI commands reporting 48b LBAs. # This patch adjusts the control mode page to properly report # this. # # Signed-off-by: Brett Russ # Signed-off-by: Jeff Garzik # # drivers/scsi/libata-scsi.c # 2005/03/17 17:16:58-05:00 russb@emc.com +6 -1 # libata: support descriptor sense in ctrl page # # ChangeSet # 2005/03/22 20:07:41-08:00 davej@redhat.com # [IPV4]: Fix swapped memset args in multipath_wrandom.c # # Signed-off-by: Dave Jones # Signed-off-by: David S. Miller # # net/ipv4/multipath_wrandom.c # 2005/03/22 20:07:29-08:00 davej@redhat.com +2 -2 # [IPV4]: Fix swapped memset args in multipath_wrandom.c # # Signed-off-by: Dave Jones # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 20:06:35-08:00 romieu@fr.zoreil.com # [IPV4]: Fix early use of inline in route.c # # Signed-off-by: Francois Romieu # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2005/03/22 20:06:23-08:00 romieu@fr.zoreil.com +7 -8 # [IPV4]: Fix early use of inline in route.c # # Signed-off-by: Francois Romieu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 19:37:26-08:00 davem@sunset.davemloft.net # [IRDA]: Squash warnings introduced by DEBUG cleanups. # # Signed-off-by: David S. Miller # # net/irda/irlmp.c # 2005/03/22 19:37:01-08:00 davem@sunset.davemloft.net +2 -2 # [IRDA]: Squash warnings introduced by DEBUG cleanups. # # net/irda/iriap.c # 2005/03/22 19:37:01-08:00 davem@sunset.davemloft.net +1 -1 # [IRDA]: Squash warnings introduced by DEBUG cleanups. # # include/net/irda/irda.h # 2005/03/22 19:37:01-08:00 davem@sunset.davemloft.net +8 -5 # [IRDA]: Squash warnings introduced by DEBUG cleanups. # # ChangeSet # 2005/03/22 19:23:10-08:00 jt@hpl.hp.com # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/wrapper.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +6 -2 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/timer.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +11 -11 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/qos.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +24 -24 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/parameters.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +27 -23 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irttp.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +76 -74 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irqueue.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +16 -16 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlmp_frame.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +19 -19 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlmp_event.c # 2005/03/22 19:22:58-08:00 jt@hpl.hp.com +44 -44 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlmp.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +94 -91 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlap_frame.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +40 -39 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlap_event.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +50 -49 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlap.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +69 -68 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_provider_event.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +6 -6 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_provider.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +21 -21 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_filter.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +4 -4 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_event.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +4 -4 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_eth.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +11 -5 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_common.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +40 -40 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_client_event.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +19 -18 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irlan/irlan_client.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +36 -36 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irias_object.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +51 -47 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/iriap_event.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +28 -28 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/iriap.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +56 -53 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/irda_device.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +19 -17 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_tty_ioctl.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +3 -3 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_tty_attach.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +33 -30 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_tty.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +47 -45 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_ttp.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +22 -20 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_param.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +25 -25 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_lmp.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +20 -19 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/ircomm/ircomm_core.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +24 -24 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/discovery.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +5 -5 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # net/irda/af_irda.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +37 -35 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # include/net/irda/irda.h # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +13 -13 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/w83977af_ir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +14 -14 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/vlsi_ir.h # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +1 -1 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/vlsi_ir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +54 -46 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/via-ircc.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +21 -21 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/tekram.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +8 -5 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/tekram-sir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +1 -1 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/smsc-ircc2.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +76 -72 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/sir_kthread.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +4 -4 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/sir_dev.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +14 -11 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/nsc-ircc.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +42 -39 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/mcp2120.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +6 -3 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/mcp2120-sir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +2 -2 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/ma600.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +6 -3 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/ma600-sir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +3 -3 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/irtty-sir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +28 -28 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/irport.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +33 -32 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/irda-usb.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +39 -37 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/girbil.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +6 -3 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/girbil-sir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +2 -2 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/donauboe.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +10 -10 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/ali-ircc.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +35 -33 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/actisys.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +3 -2 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/act200l.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +6 -3 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # drivers/net/irda/act200l-sir.c # 2005/03/22 19:22:57-08:00 jt@hpl.hp.com +1 -1 # [IRDA]: DEBUG macro fixes # # o [CRITICA] Eliminate all 'ASSERT(..., break;)' -> use goto; # That would compile differenty with/without CONFIG_IRDA_DEBUG # o [CORRECT] Add '()' to IRDA_DEBUG macro to avoid side effects # o [CORRECT] Add 'do {} while(0)' to IRDA_ASSERT to avoid side effects # o [FEATURE] Rename ASSERT to IRDA_ASSERT (namespace pollution) # o [FEATURE] Rename MESSAGE to IRDA_MESSAGE (namespace pollution) # o [FEATURE] Rename ERROR to IRDA_ERROR (namespace pollution) # o [FEATURE] Disable IRDA_ASSERT when no CONFIG_IRDA_DEBUG -> footprint # # Signed-off-by: Jean Tourrilhes # Signed-off-by: David S. Miller ' # # ChangeSet # 2005/03/22 19:20:39-08:00 davem@sunset.davemloft.net # [NET]: Kill NETLINK_DEV and its only user, ethertap. # # This stuff has been scheduled to die for 2 years. # # Signed-off-by: David S. Miller # # net/netlink/Makefile # 2005/03/22 19:20:04-08:00 davem@sunset.davemloft.net +0 -1 # [NET]: Kill NETLINK_DEV and its only user, ethertap. # # net/Kconfig # 2005/03/22 19:20:04-08:00 davem@sunset.davemloft.net +0 -9 # [NET]: Kill NETLINK_DEV and its only user, ethertap. # # drivers/net/Makefile # 2005/03/22 19:20:04-08:00 davem@sunset.davemloft.net +0 -1 # [NET]: Kill NETLINK_DEV and its only user, ethertap. # # drivers/net/Kconfig # 2005/03/22 19:20:04-08:00 davem@sunset.davemloft.net +0 -23 # [NET]: Kill NETLINK_DEV and its only user, ethertap. # # BitKeeper/deleted/.del-netlink_dev.c~9601d74e9c777959 # 2005/03/22 19:19:45-08:00 davem@sunset.davemloft.net +0 -0 # Delete: net/netlink/netlink_dev.c # # BitKeeper/deleted/.del-ethertap.c~75c7ce1e8cd88afc # 2005/03/22 19:19:45-08:00 davem@sunset.davemloft.net +0 -0 # Delete: drivers/net/ethertap.c # # ChangeSet # 2005/03/22 19:17:22-08:00 chrisw@osdl.org # [NETLINK]: Remove unused netlink NL_EMULATE_DEV code # # Now that netlink_attach() has been removed, the NL_EMULATE_DEV handler # functions can't ever be set. So let's rip them out too, because what's # left behind can't be used at all. # # Signed-off-by: Chris Wright # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2005/03/22 19:17:09-08:00 chrisw@osdl.org +1 -23 # [NETLINK]: Remove unused netlink NL_EMULATE_DEV code # # Now that netlink_attach() has been removed, the NL_EMULATE_DEV handler # functions can't ever be set. So let's rip them out too, because what's # left behind can't be used at all. # # Signed-off-by: Chris Wright # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 19:09:27-08:00 davem@sunset.davemloft.net # [NETPOLL]: netpoll_queue needs to be exported to modules # # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 19:09:04-08:00 davem@sunset.davemloft.net +1 -0 # [NETPOLL]: netpoll_queue needs to be exported to modules # # ChangeSet # 2005/03/22 19:05:52-08:00 shemminger@osdl.org # [TCP]: BIC not binary searching correctly # # While redoing BIC for the split up version, I discovered that the existing # 2.6.11 code doesn't really do binary search. It ends up being just a slightly # modified version of Reno. See attached graphs to see the effect over simulated # 1mbit environment. # # The problem is that BIC is supposed to reset the cwnd to the last loss value # rather than ssthresh when loss is detected. The correct code (from the BIC # TCP code for Web100) is in this patch. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_input.c # 2005/03/22 19:05:39-08:00 shemminger@osdl.org +4 -1 # [TCP]: BIC not binary searching correctly # # While redoing BIC for the split up version, I discovered that the existing # 2.6.11 code doesn't really do binary search. It ends up being just a slightly # modified version of Reno. See attached graphs to see the effect over simulated # 1mbit environment. # # The problem is that BIC is supposed to reset the cwnd to the last loss value # rather than ssthresh when loss is detected. The correct code (from the BIC # TCP code for Web100) is in this patch. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 19:04:16-08:00 davem@sunset.davemloft.net # [NETPOLL]: Do not use __smp_processor_id(). # # It is not necessarily available in all configurations. # # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 19:03:43-08:00 davem@sunset.davemloft.net +3 -3 # [NETPOLL]: Do not use __smp_processor_id(). # # include/linux/netpoll.h # 2005/03/22 19:03:43-08:00 davem@sunset.davemloft.net +1 -1 # [NETPOLL]: Do not use __smp_processor_id(). # # ChangeSet # 2005/03/22 18:46:25-08:00 juhl-lkml@dif.dk # [NET]: Remove redundant NULL pointer check before kfree in socket.c # # Signed-off-by: Jesper Juhl # Signed-off-by: David S. Miller # # net/socket.c # 2005/03/22 18:46:13-08:00 juhl-lkml@dif.dk +1 -2 # [NET]: Remove redundant NULL pointer check before kfree in socket.c # # Signed-off-by: Jesper Juhl # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:44:45-08:00 akepner@sgi.com # [BONDING]: Use NETIF_F_LLTX in bonding device # # Lock contention on the bonding device's xmit_lock can # become a bottleneck when 3 or more gige links are aggregated. # And it looks like it's unnecessary too, so use the # NETIF_F_LLTX flag to avoid grabbing this lock. # # Signed-off-by: # Signed-off-by: David S. Miller # # drivers/net/bonding/bond_main.c # 2005/03/22 18:44:32-08:00 akepner@sgi.com +4 -0 # [BONDING]: Use NETIF_F_LLTX in bonding device # # Lock contention on the bonding device's xmit_lock can # become a bottleneck when 3 or more gige links are aggregated. # And it looks like it's unnecessary too, so use the # NETIF_F_LLTX flag to avoid grabbing this lock. # # Signed-off-by: # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:39:35-08:00 mpm@selenic.com # [NETPOLL]: Fix racy dev->flags usage # # Put ndev->flags usage under the lock. Spotted by Patrick McHardy. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:39:23-08:00 mpm@selenic.com +1 -4 # [NETPOLL]: Fix racy dev->flags usage # # Put ndev->flags usage under the lock. Spotted by Patrick McHardy. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:38:55-08:00 mpm@selenic.com # [NETPOLL]: Carrier clarification # # Clarify the flaky carrier detect code and use msleep(). # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:38:42-08:00 mpm@selenic.com +9 -4 # [NETPOLL]: Carrier clarification # # Clarify the flaky carrier detect code and use msleep(). # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:33:48-08:00 mpm@selenic.com # [NETPOLL]: Avoid kfree_skb() on packets with destructor # # Packets that have destructors should not be zapped here as that might # produce additional printk warnings via netconsole. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:33:35-08:00 mpm@selenic.com +4 -1 # [NETPOLL]: Avoid kfree_skb() on packets with destructor # # Packets that have destructors should not be zapped here as that might # produce additional printk warnings via netconsole. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:31:52-08:00 mpm@selenic.com # [NETPOLL]: Handle xmit_lock recursion similarly # # Handle possible recursion on xmit_lock while we're at it. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:31:39-08:00 mpm@selenic.com +3 -2 # [NETPOLL]: Handle xmit_lock recursion similarly # # Handle possible recursion on xmit_lock while we're at it. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:31:14-08:00 mpm@selenic.com # [NETPOLL]: Add optional dropping and queueing support # # This adds a callback for packets we can't deliver immediately and a # helper function for clients to queue such packets to the device # post-interrupt. # # Netconsole is modified to use the queueing function for best-effort # delivery. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:31:02-08:00 mpm@selenic.com +57 -2 # [NETPOLL]: Add optional dropping and queueing support # # This adds a callback for packets we can't deliver immediately and a # helper function for clients to queue such packets to the device # post-interrupt. # # Netconsole is modified to use the queueing function for best-effort # delivery. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # include/linux/netpoll.h # 2005/03/22 18:31:02-08:00 mpm@selenic.com +2 -0 # [NETPOLL]: Add optional dropping and queueing support # # This adds a callback for packets we can't deliver immediately and a # helper function for clients to queue such packets to the device # post-interrupt. # # Netconsole is modified to use the queueing function for best-effort # delivery. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # drivers/net/netconsole.c # 2005/03/22 18:31:02-08:00 mpm@selenic.com +1 -0 # [NETPOLL]: Add optional dropping and queueing support # # This adds a callback for packets we can't deliver immediately and a # helper function for clients to queue such packets to the device # post-interrupt. # # Netconsole is modified to use the queueing function for best-effort # delivery. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:30:38-08:00 mpm@selenic.com # [NETPOLL]: Fix ->poll() locking # # Introduce a per-client poll lock and flag. The lock assures we never # have more than one caller in dev->poll(). The flag provides recursion # avoidance on UP where the lock disappears. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:30:26-08:00 mpm@selenic.com +21 -9 # [NETPOLL]: Fix ->poll() locking # # Introduce a per-client poll lock and flag. The lock assures we never # have more than one caller in dev->poll(). The flag provides recursion # avoidance on UP where the lock disappears. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/dev.c # 2005/03/22 18:30:26-08:00 mpm@selenic.com +3 -0 # [NETPOLL]: Fix ->poll() locking # # Introduce a per-client poll lock and flag. The lock assures we never # have more than one caller in dev->poll(). The flag provides recursion # avoidance on UP where the lock disappears. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # include/linux/netpoll.h # 2005/03/22 18:30:26-08:00 mpm@selenic.com +21 -0 # [NETPOLL]: Fix ->poll() locking # # Introduce a per-client poll lock and flag. The lock assures we never # have more than one caller in dev->poll(). The flag provides recursion # avoidance on UP where the lock disappears. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:30:01-08:00 mpm@selenic.com # [NETPOLL]: Add netpoll pointer to net_device # # Add struct netpoll pointer to struct netdevice # Move netpoll rx flags to netpoll struct # Stop traversing rx_list and get np pointer from skb->dev->np # Remove now unneeded rx_list # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:29:48-08:00 mpm@selenic.com +27 -62 # [NETPOLL]: Add netpoll pointer to net_device # # Add struct netpoll pointer to struct netdevice # Move netpoll rx flags to netpoll struct # Stop traversing rx_list and get np pointer from skb->dev->np # Remove now unneeded rx_list # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # include/linux/netpoll.h # 2005/03/22 18:29:48-08:00 mpm@selenic.com +2 -2 # [NETPOLL]: Add netpoll pointer to net_device # # Add struct netpoll pointer to struct netdevice # Move netpoll rx flags to netpoll struct # Stop traversing rx_list and get np pointer from skb->dev->np # Remove now unneeded rx_list # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # include/linux/netdevice.h # 2005/03/22 18:29:48-08:00 mpm@selenic.com +2 -2 # [NETPOLL]: Add netpoll pointer to net_device # # Add struct netpoll pointer to struct netdevice # Move netpoll rx flags to netpoll struct # Stop traversing rx_list and get np pointer from skb->dev->np # Remove now unneeded rx_list # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:29:23-08:00 mpm@selenic.com # [NETPOLL]: Filter inlines # # Add netpoll rx helpers # Move skb_free for rx into __netpoll_rx # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:29:11-08:00 mpm@selenic.com +8 -2 # [NETPOLL]: Filter inlines # # Add netpoll rx helpers # Move skb_free for rx into __netpoll_rx # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/dev.c # 2005/03/22 18:29:10-08:00 mpm@selenic.com +5 -11 # [NETPOLL]: Filter inlines # # Add netpoll rx helpers # Move skb_free for rx into __netpoll_rx # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # include/linux/netpoll.h # 2005/03/22 18:29:10-08:00 mpm@selenic.com +9 -1 # [NETPOLL]: Filter inlines # # Add netpoll rx helpers # Move skb_free for rx into __netpoll_rx # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:28:36-08:00 mpm@selenic.com # [NETPOLL]: Shorten carrier detect timeout. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/22 18:28:23-08:00 mpm@selenic.com +2 -2 # [NETPOLL]: Shorten carrier detect timeout. # # Signed-off-by: Matt Mackall # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 18:27:00-08:00 davem@sunset.davemloft.net # [IPV4]: The multipath select_route method must be implemented. # # Signed-off-by: David S. Miller # # net/ipv4/multipath.c # 2005/03/22 18:26:30-08:00 davem@sunset.davemloft.net +2 -1 # [IPV4]: The multipath select_route method must be implemented. # # include/net/ip_mp_alg.h # 2005/03/22 18:26:30-08:00 davem@sunset.davemloft.net +2 -2 # [IPV4]: The multipath select_route method must be implemented. # # ChangeSet # 2005/03/22 22:40:53-03:00 acme@toy.ghostprotocols.net # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/af_x25.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/sctp/sm_statefuns.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/rose/af_rose.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/netrom/af_netrom.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/decnet/dn_nsp_in.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/bluetooth/rfcomm/sock.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/bluetooth/l2cap.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/ax25/ax25_in.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -1 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/signaling.c # 2005/03/22 22:40:20-03:00 acme@toy.ghostprotocols.net +1 -2 # [NET] use sk_acceptq_is_full # # Replacing the open coded equivalent. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/22 19:00:15-05:00 domen@coderock.org # [PATCH] net/sk98lin: remove duplicate delay # # Remove an unnecessary second (and identical) delay. # schedule_timeout() does not need to be called, as msleep_interruptible() already # delayed the task. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Domen Puncer # Signed-off-by: Jeff Garzik # # drivers/net/sk98lin/skethtool.c # 2005/03/05 10:11:09-05:00 domen@coderock.org +0 -3 # net/skethtool: remove duplicate delay # # ChangeSet # 2005/03/22 18:57:37-05:00 komurojun-mbn@nifty.com # [PATCH] net/Kconfig: remove unsupported network adapter names # # 3c569B (98) and RE1000Plus(C-Bus) is not supported at all by # the kernel 2.6.11. # # Signed-off-by: Jun Komuro # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2005/03/05 22:25:47-05:00 komurojun-mbn@nifty.com +2 -2 # remove unsupported network adapter name from # # ChangeSet # 2005/03/22 18:24:56-05:00 dale@farnsworth.org # [PATCH] mii: GigE support bug fixes # # Signed-off-by: Dale Farnsworth # Acked-by: James Chapman # Signed-off-by: Jeff Garzik # # drivers/net/mii.c # 2005/03/21 19:00:00-05:00 dale@farnsworth.org +6 -3 # mii: GigE support bug fixes # # ChangeSet # 2005/03/22 18:14:13-05:00 venza@brownhat.org # [PATCH] Maintainer change for the sis900 driver # # Signed-off-by: Jeff Garzik # # MAINTAINERS # 2005/03/12 05:44:39-05:00 venza@brownhat.org +4 -3 # Maintainer change for the sis900 driver # # ChangeSet # 2005/03/22 17:54:26-05:00 linville@tuxdriver.com # [PATCH] bonding: avoid tx balance for IGMP (alb/tlb mode) # # Add special case to bond_alb_xmit() to avoid tx balance for IGMP. # # Signed-off-by: John W. Linville # Signed-off-by: Jeff Garzik # # drivers/net/bonding/bond_alb.c # 2005/03/15 16:25:10-05:00 linville@tuxdriver.com +3 -1 # bonding: avoid tx balance for IGMP (alb/tlb mode) # # ChangeSet # 2005/03/22 17:50:47-05:00 mikpe@user.it.uu.se # [PATCH] drivers/net/depca.c gcc4 fix # # Fix # # drivers/net/depca.c: In function 'load_packet': # drivers/net/depca.c:1829: warning: operation on 'i' may be undefined # # warning from gcc4 in depca.c. # # Signed-off-by: Jeff Garzik # # drivers/net/depca.c # 2005/03/15 08:36:49-05:00 mikpe@user.it.uu.se +1 -1 # drivers/net/depca.c gcc4 fix # # ChangeSet # 2005/03/22 17:50:35-05:00 mikpe@user.it.uu.se # [PATCH] drivers/net/arcnet/arcnet.c gcc4 fixes # # Fix # # drivers/net/arcnet/arcnet.c: In function 'release_arcbuf': # drivers/net/arcnet/arcnet.c:256: warning: operation on 'i' may be undefined # drivers/net/arcnet/arcnet.c: In function 'get_arcbuf': # drivers/net/arcnet/arcnet.c:292: warning: operation on 'i' may be undefined # # warnings from gcc4 in arcnet.c. # # Signed-off-by: Jeff Garzik # # drivers/net/arcnet/arcnet.c # 2005/03/15 08:32:49-05:00 mikpe@user.it.uu.se +2 -2 # drivers/net/arcnet/arcnet.c gcc4 fixes # # ChangeSet # 2005/03/22 17:48:09-05:00 akpm@osdl.org # [PATCH] drivers/net/sis900.c: fix a warning # # From: Adrian Bunk # # drivers/net/sis900.c:199: warning: 'sis900_poll' declared `static' but never defined # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/sis900.c # 2005/03/15 09:19:54-05:00 akpm@osdl.org +2 -0 # drivers/net/sis900.c: fix a warning # # ChangeSet # 2005/03/22 17:47:57-05:00 akpm@osdl.org # [PATCH] fix pci_disable_device in 8139too # # From: Andres Salomon # # http://linux.bkbits.net:8080/linux-2.6/cset@418391928THbmFKdJ5UCOhnFPMYbOA # added an unconditional pci_disable_device() to __rtl8139_cleanup_dev(). # # That's fine for rtl8139_remove_one and rtl8139_init_one; however, for # rtl8139_init_board, it ends up being called in the error path. That is, if # pci_enable_device or pci_request_regions fails, err_out calls # __rtl8139_cleanup_dev, which calls pci_disable_device. # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2005/03/15 09:19:53-05:00 akpm@osdl.org +6 -2 # fix pci_disable_device in 8139too # # ChangeSet # 2005/03/22 17:45:58-05:00 akpm@osdl.org # [PATCH] bonding needs inet # # The bonding driver needs CONFIG_INET, for arp_create(), arp_send(), arp_xmit(). # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2005/03/15 09:19:54-05:00 akpm@osdl.org +1 -0 # bonding needs inet # # ChangeSet # 2005/03/22 17:33:07-05:00 akpm@osdl.org # [PATCH] Fix suspend/resume on via-velocity # # From: Pavel Machek # # This fixes suspend-resume on via-velocity. It was confused w.r.t. # pointers... Now uses netdev_priv(). [Well, someone should run sed over # that driver, there are many more dev->priv]. # # Signed-off-by: Pavel Machek # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/via-velocity.c # 2005/03/15 09:19:55-05:00 akpm@osdl.org +4 -2 # Fix suspend/resume on via-velocity # # ChangeSet # 2005/03/22 16:17:42-06:00 stevef@smfhome.smfdom # [CIFS] whitespace/formatting cleanup # # Signed-off-by: Jesper Juhl (juhl-lkml@dif.dk) # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/readdir.c # 2005/03/22 16:17:33-06:00 stevef@smfhome.smfdom +17 -21 # whitespace/formatting cleanup # # ChangeSet # 2005/03/22 15:41:49-05:00 jason.d.gaston@intel.com # [PATCH] SATA AHCI correction Intel ICH7R # # This patch removes an invalid DID for Intel ICH7R from the ahci.c # SATA AHCI driver. # # Signed-off-by: Jason Gaston # Signed-off-by: Jeff Garzik # # drivers/scsi/ahci.c # 2005/03/07 15:10:45-05:00 jason.d.gaston@intel.com +0 -2 # SATA AHCI correction Intel ICH7R - 2.6.11 # # ChangeSet # 2005/03/22 09:36:50+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2575/1: pass -mbig-endian/-mlittle-endian to invocations of cpp # # Patch from Lennert Buytenhek # # We currently pass -mbig-endian/-mlittle-endian to the compiler and the # assembler, but we do not pass it to cpp, even though it also needs it. # So, add this flag to CPPFLAGS, and since CPPFLAGS is also passed to the # compiler and the assembler, we can then then remove the flag from CFLAGS # and AFLAGS. # The symptom of this problem is the kernel hanging after # "Memory: ......KB available (....K code, ...K data, ...K init)" # when compiling a big-endian kernel with a little-endian toolchain or # vice versa, and this happens because 'jiffies' points to the wrong # half of 'jiffies_64' (due to vmlinux.lds having been generated with # the wrong preprocessor flags), so calibrate_delay() takes forever to # complete. # Derived from an earlier patch by Krzysztof Halasa. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # arch/arm/Makefile # 2005/03/22 08:45:59+00:00 buytenh@org.rmk.(none) +2 -4 # [PATCH] 2575/1: pass -mbig-endian/-mlittle-endian to invocations of cpp # # ChangeSet # 2005/03/22 09:17:29+01:00 perex@suse.cz # [ALSA] Increase buffer sizes for the CA0106 driver # # CA0106 driver # This patch increases the buffer size for the ca0106 driver, so this # might help prevent over/underruns. # # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # sound/pci/ca0106/ca0106_main.c # 2005/03/21 12:56:50+01:00 perex@suse.cz +6 -4 # [ALSA] Increase buffer sizes for the CA0106 driver # # D:2005/03/21 19:56:50 # C:CA0106 driver # F:pci/ca0106/ca0106_main.c:1.4->1.5 # L:This patch increases the buffer size for the ca0106 driver, so this # L:might help prevent over/underruns. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:16:48+01:00 perex@suse.cz # [ALSA] Fix 96000 SPDIF out from Audigy 2 P16V # # EMU10K1/EMU10K2 driver # This allows one to output at 96000 to the SPDIF using the P16V chip. # Note: The sample phase is wrong when using the P16V chip, but at least # no resampling is done. # # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/p16v.c # 2005/03/21 12:52:21+01:00 perex@suse.cz +6 -4 # [ALSA] Fix 96000 SPDIF out from Audigy 2 P16V # # D:2005/03/21 19:52:21 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/p16v.c:1.1->1.2 # L:This allows one to output at 96000 to the SPDIF using the P16V chip. # L:Note: The sample phase is wrong when using the P16V chip, but at least # L:no resampling is done. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:16:05+01:00 perex@suse.cz # [ALSA] emu10k1 external tram size # # EMU10K1/EMU10K2 driver # This patch fixes wrong size reported by driver for external tram. It # reports size in bytes and should report it in samples as for internal tram. # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emuproc.c # 2005/03/21 12:45:01+01:00 perex@suse.cz +1 -1 # [ALSA] emu10k1 external tram size # # D:2005/03/21 19:45:01 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emufx.c:1.69->1.70 # F:pci/emu10k1/emuproc.c:1.25->1.26 # L:This patch fixes wrong size reported by driver for external tram. It # L:reports size in bytes and should report it in samples as for internal tram. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2005/03/21 12:45:01+01:00 perex@suse.cz +1 -1 # [ALSA] emu10k1 external tram size # # D:2005/03/21 19:45:01 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emufx.c:1.69->1.70 # F:pci/emu10k1/emuproc.c:1.25->1.26 # L:This patch fixes wrong size reported by driver for external tram. It # L:reports size in bytes and should report it in samples as for internal tram. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:15:23+01:00 perex@suse.cz # [ALSA] use amp capabilities from afg if amp override not set # # HDA Codec driver # Fix by Matt : # # Some HDA codec nodes contain an amp, but do not provide local amp # capabilities. In these cases, AC_WCAP_AMP_OVRD is not set so we # should query the AFG nid in order to get the general amp capabilities. # # Signed-off-by: Takashi Iwai # # sound/pci/hda/hda_codec.c # 2005/03/21 12:42:00+01:00 perex@suse.cz +2 -0 # [ALSA] use amp capabilities from afg if amp override not set # # D:2005/03/21 19:42:00 # C:HDA Codec driver # F:pci/hda/hda_codec.c:1.8->1.9 # L:Fix by Matt : # L: # L:Some HDA codec nodes contain an amp, but do not provide local amp # L:capabilities. In these cases, AC_WCAP_AMP_OVRD is not set so we # L:should query the AFG nid in order to get the general amp capabilities. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:14:43+01:00 perex@suse.cz # [ALSA] fix bug with pci hotplug mode # # MIXART driver # Fix the Oops with hotplug fw loader. # (Theis fix is missing in the last commit to mixart.c accidentally.) # # Signed-off-by: Markus Bollinger # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart_hwdep.c # 2005/03/21 12:36:01+01:00 perex@suse.cz +6 -3 # [ALSA] fix bug with pci hotplug mode # # D:2005/03/21 19:36:01 # C:MIXART driver # F:pci/mixart/mixart.h:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.8->1.9 # L:Fix the Oops with hotplug fw loader. # L:(Theis fix is missing in the last commit to mixart.c accidentally.) # Signed-off-by: Markus Bollinger # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.h # 2005/03/21 12:36:01+01:00 perex@suse.cz +1 -1 # [ALSA] fix bug with pci hotplug mode # # D:2005/03/21 19:36:01 # C:MIXART driver # F:pci/mixart/mixart.h:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.8->1.9 # L:Fix the Oops with hotplug fw loader. # L:(Theis fix is missing in the last commit to mixart.c accidentally.) # Signed-off-by: Markus Bollinger # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:13:58+01:00 perex@suse.cz # [ALSA] add HPET support # # Timer Midlevel,ALSA Core # add a wrapper for the HPET driver # # Signed-off-by: Clemens Ladisch # # sound/core/timer.c # 2005/03/21 01:17:26+01:00 perex@suse.cz +5 -3 # [ALSA] add HPET support # # D:2005/03/21 08:17:26 # C:Timer Midlevel,ALSA Core # F:core/timer.c:1.67->1.68 # F:include/asound.h:1.48->1.49 # L:add a wrapper for the HPET driver # Signed-off-by: Clemens Ladisch # # include/sound/asound.h # 2005/03/21 01:17:26+01:00 perex@suse.cz +1 -0 # [ALSA] add HPET support # # D:2005/03/21 08:17:26 # C:Timer Midlevel,ALSA Core # F:core/timer.c:1.67->1.68 # F:include/asound.h:1.48->1.49 # L:add a wrapper for the HPET driver # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:13:15+01:00 perex@suse.cz # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # CS46xx driver,EMU10K1/EMU10K2 driver # Now that the output trigger callback is called from a softirq instead # of an hardirq, we don't need anymore to disable interrupts in our # interrupt handlers. # # Signed-off-by: Clemens Ladisch # # sound/pci/ens1370.c # 2005/03/21 01:13:29+01:00 perex@suse.cz +6 -8 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/pci/emu10k1/emumpu401.c # 2005/03/21 01:13:32+01:00 perex@suse.cz +2 -3 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/pci/emu10k1/emu10k1x.c # 2005/03/21 01:13:32+01:00 perex@suse.cz +2 -3 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/cs46xx_lib.c # 2005/03/21 01:13:29+01:00 perex@suse.cz +2 -3 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/pci/cs4281.c # 2005/03/21 01:13:28+01:00 perex@suse.cz +6 -7 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/drivers/serial-u16550.c # 2005/03/21 01:13:27+01:00 perex@suse.cz +3 -4 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/drivers/mtpav.c # 2005/03/21 01:13:27+01:00 perex@suse.cz +2 -3 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # sound/drivers/mpu401/mpu401_uart.c # 2005/03/21 01:13:28+01:00 perex@suse.cz +4 -6 # [ALSA] remove unneeded interrupt locks in rawmidi drivers # # D:2005/03/21 08:13:27 # C:Generic drivers,MPU401 UART,CS4281 driver,ENS1370/1+ driver # C:CS46xx driver,EMU10K1/EMU10K2 driver # F:drivers/mtpav.c:1.30->1.31 # F:drivers/serial-u16550.c:1.33->1.34 # F:drivers/mpu401/mpu401_uart.c:1.35->1.36 # F:pci/cs4281.c:1.72->1.73 # F:pci/ens1370.c:1.76->1.77 # F:pci/cs46xx/cs46xx_lib.c:1.96->1.97 # F:pci/emu10k1/emu10k1x.c:1.6->1.7 # F:pci/emu10k1/emumpu401.c:1.13->1.14 # L:Now that the output trigger callback is called from a softirq instead # L:of an hardirq, we don't need anymore to disable interrupts in our # L:interrupt handlers. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:12:31+01:00 perex@suse.cz # [ALSA] rawmidi - move output trigger into a tasklet # # Documentation,RawMidi Midlevel # Calling the output trigger callback from another interrupt handler # can lead to unintuitive locking requirements (i.e., spin_lock_irqsave) # in the sound card interrupt handler. Moving the call to the callback # into a tasklet cures this, and has the added benefit that the callback # is called only once if more that one sequencer event has been # delivered in one timer interrupt tick. # # Signed-off-by: Clemens Ladisch # # sound/core/rawmidi.c # 2005/03/21 01:06:49+01:00 perex@suse.cz +37 -18 # [ALSA] rawmidi - move output trigger into a tasklet # # D:2005/03/21 08:06:48 # C:Documentation,RawMidi Midlevel # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.50->1.51 # F:core/rawmidi.c:1.61->1.62 # F:include/rawmidi.h:1.14->1.15 # L:Calling the output trigger callback from another interrupt handler # L:can lead to unintuitive locking requirements (i.e., spin_lock_irqsave) # L:in the sound card interrupt handler. Moving the call to the callback # L:into a tasklet cures this, and has the added benefit that the callback # L:is called only once if more that one sequencer event has been # L:delivered in one timer interrupt tick. # Signed-off-by: Clemens Ladisch # # include/sound/rawmidi.h # 2005/03/21 01:06:49+01:00 perex@suse.cz +3 -2 # [ALSA] rawmidi - move output trigger into a tasklet # # D:2005/03/21 08:06:48 # C:Documentation,RawMidi Midlevel # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.50->1.51 # F:core/rawmidi.c:1.61->1.62 # F:include/rawmidi.h:1.14->1.15 # L:Calling the output trigger callback from another interrupt handler # L:can lead to unintuitive locking requirements (i.e., spin_lock_irqsave) # L:in the sound card interrupt handler. Moving the call to the callback # L:into a tasklet cures this, and has the added benefit that the callback # L:is called only once if more that one sequencer event has been # L:delivered in one timer interrupt tick. # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2005/03/21 01:06:48+01:00 perex@suse.cz +0 -9 # [ALSA] rawmidi - move output trigger into a tasklet # # D:2005/03/21 08:06:48 # C:Documentation,RawMidi Midlevel # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.50->1.51 # F:core/rawmidi.c:1.61->1.62 # F:include/rawmidi.h:1.14->1.15 # L:Calling the output trigger callback from another interrupt handler # L:can lead to unintuitive locking requirements (i.e., spin_lock_irqsave) # L:in the sound card interrupt handler. Moving the call to the callback # L:into a tasklet cures this, and has the added benefit that the callback # L:is called only once if more that one sequencer event has been # L:delivered in one timer interrupt tick. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:11:47+01:00 perex@suse.cz # [ALSA] rawmidi - fix locking in drop_output and drain_input # # RawMidi Midlevel # The comments in snd_rawmidi_drop_output and snd_rawmidi_drain_input # are wrong -- interrupts _are_ enabled, and spinlocks _are_ required. # So remove the comments and add spinlocks. # # Signed-off-by: Clemens Ladisch # # sound/core/rawmidi.c # 2005/03/21 00:56:51+01:00 perex@suse.cz +6 -3 # [ALSA] rawmidi - fix locking in drop_output and drain_input # # D:2005/03/21 07:56:51 # C:RawMidi Midlevel # F:core/rawmidi.c:1.60->1.61 # L:The comments in snd_rawmidi_drop_output and snd_rawmidi_drain_input # L:are wrong -- interrupts _are_ enabled, and spinlocks _are_ required. # L:So remove the comments and add spinlocks. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:11:04+01:00 perex@suse.cz # [ALSA] Replace '/' with commas in ac97 codec names # # AC97 Codec # Replaced '/' letters with commas in ac97 codec names, so that # they can be used for sysfs entries in ac97_bus. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2005/03/18 09:58:15+01:00 perex@suse.cz +18 -18 # [ALSA] Replace '/' with commas in ac97 codec names # # D:2005/03/18 16:58:15 # C:AC97 Codec # F:pci/ac97/ac97_codec.c:1.177->1.178 # L:Replaced '/' letters with commas in ac97 codec names, so that # L:they can be used for sysfs entries in ac97_bus. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:10:24+01:00 perex@suse.cz # [ALSA] Fix SPDIF output on CMI9880 # # HDA Codec driver # There is mute control on 9880's spdif (IEC958) out, so it needs to be # turned on/off in mixer. # The patch is for CVS version and I think it can be patched to azx too. # Hope this also fix the 9880 SPDIF-out bug. # # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # sound/pci/hda/hda_codec.c # 2005/03/18 09:21:56+01:00 perex@suse.cz +3 -0 # [ALSA] Fix SPDIF output on CMI9880 # # D:2005/03/18 16:21:56 # C:HDA Codec driver # F:pci/hda/hda_codec.c:1.7->1.8 # L:There is mute control on 9880's spdif (IEC958) out, so it needs to be # L:turned on/off in mixer. # L:The patch is for CVS version and I think it can be patched to azx too. # L:Hope this also fix the 9880 SPDIF-out bug. # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:09:39+01:00 perex@suse.cz # [ALSA] fix bug with pci hotplug mode # # MIXART driver # There is a bug with mixart driver, when using hotplug: # accessing NULL pointer -> segmentation fault # # Signed-off-by: Markus Bollinger # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2005/03/18 06:48:22+01:00 perex@suse.cz +3 -3 # [ALSA] fix bug with pci hotplug mode # # D:2005/03/18 13:48:22 # C:MIXART driver # F:pci/mixart/mixart.c:1.24->1.25 # L:There is a bug with mixart driver, when using hotplug: # L:accessing NULL pointer -> segmentation fault # Signed-off-by: Markus Bollinger # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:08:57+01:00 perex@suse.cz # [ALSA] rme32 - remove superfluous spin_lock_irqsave call # # RME32 driver # In the PCM trigger callback, replace spin_lock_irqsave() with # spin_lock() because interrupts are already guaranteed to be disabled. # # Signed-off-by: Clemens Ladisch # # sound/pci/rme32.c # 2005/03/18 01:47:00+01:00 perex@suse.cz +2 -3 # [ALSA] rme32 - remove superfluous spin_lock_irqsave call # # D:2005/03/18 08:47:00 # C:RME32 driver # F:pci/rme32.c:1.51->1.52 # L:In the PCM trigger callback, replace spin_lock_irqsave() with # L:spin_lock() because interrupts are already guaranteed to be disabled. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:08:16+01:00 perex@suse.cz # [ALSA] Fix typos # # ALSA sequencer,ALSA Core # Fix typos in alsa-kernel code for MIDI sostenuto. # # Signed-off-by: William # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi_emul.c # 2005/03/17 09:04:41+01:00 perex@suse.cz +6 -6 # [ALSA] Fix typos # # D:2005/03/17 16:04:41 # C:ALSA sequencer,ALSA Core # F:core/seq/seq_midi_emul.c:1.14->1.15 # F:include/asoundef.h:1.5->1.6 # F:include/seq_midi_emul.h:1.4->1.5 # L:Fix typos in alsa-kernel code for MIDI sostenuto. # Signed-off-by: William # Signed-off-by: Takashi Iwai # # include/sound/seq_midi_emul.h # 2005/03/17 09:04:42+01:00 perex@suse.cz +2 -2 # [ALSA] Fix typos # # D:2005/03/17 16:04:41 # C:ALSA sequencer,ALSA Core # F:core/seq/seq_midi_emul.c:1.14->1.15 # F:include/asoundef.h:1.5->1.6 # F:include/seq_midi_emul.h:1.4->1.5 # L:Fix typos in alsa-kernel code for MIDI sostenuto. # Signed-off-by: William # Signed-off-by: Takashi Iwai # # include/sound/asoundef.h # 2005/03/17 09:04:41+01:00 perex@suse.cz +1 -1 # [ALSA] Fix typos # # D:2005/03/17 16:04:41 # C:ALSA sequencer,ALSA Core # F:core/seq/seq_midi_emul.c:1.14->1.15 # F:include/asoundef.h:1.5->1.6 # F:include/seq_midi_emul.h:1.4->1.5 # L:Fix typos in alsa-kernel code for MIDI sostenuto. # Signed-off-by: William # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:07:30+01:00 perex@suse.cz # [ALSA] fix misc oopses # # EMU10K1/EMU10K2 driver # Fix Oops with Multi-channel (EFX) mixer controls. # # Signed-off-by: Arnaud Patard # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emumixer.c # 2005/03/17 09:00:43+01:00 perex@suse.cz +18 -8 # [ALSA] fix misc oopses # # D:2005/03/17 16:00:43 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emumixer.c:1.32->1.33 # L:Fix Oops with Multi-channel (EFX) mixer controls. # Signed-off-by: Arnaud Patard # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:06:46+01:00 perex@suse.cz # [ALSA] fix P16V breakage for non Audigy2 cards # # EMU10K1/EMU10K2 driver # The P16V patch unconditionally checks the IPR2 register in the interrupt # handler resulting in infinite loop and system lockup on any non Audigy2 # cards. I really hate checking emu->is_audigy and emu->revision in a # fast path like the IRQ handler but I don't see another way. # # Also, don't bother allocating/freeing the DMA buffer for P16V unless # it's really present. # # This is a critical fix and should trigger an immediate rc2 release IMO. # Currently any emu10k1 users other than Audigy 2 will lock up hard as # soon as they play any sound. # # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/irq.c # 2005/03/17 08:55:16+01:00 perex@suse.cz +12 -11 # [ALSA] fix P16V breakage for non Audigy2 cards # # D:2005/03/17 15:55:16 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emu10k1.c:1.32->1.33 # F:pci/emu10k1/emu10k1_main.c:1.44->1.45 # F:pci/emu10k1/irq.c:1.13->1.14 # L:The P16V patch unconditionally checks the IPR2 register in the interrupt # L:handler resulting in infinite loop and system lockup on any non Audigy2 # L:cards. I really hate checking emu->is_audigy and emu->revision in a # L:fast path like the IRQ handler but I don't see another way. # L: # L:Also, don't bother allocating/freeing the DMA buffer for P16V unless # L:it's really present. # L: # L:This is a critical fix and should trigger an immediate rc2 release IMO. # L:Currently any emu10k1 users other than Audigy 2 will lock up hard as # L:soon as they play any sound. # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2005/03/17 08:55:16+01:00 perex@suse.cz +2 -1 # [ALSA] fix P16V breakage for non Audigy2 cards # # D:2005/03/17 15:55:16 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emu10k1.c:1.32->1.33 # F:pci/emu10k1/emu10k1_main.c:1.44->1.45 # F:pci/emu10k1/irq.c:1.13->1.14 # L:The P16V patch unconditionally checks the IPR2 register in the interrupt # L:handler resulting in infinite loop and system lockup on any non Audigy2 # L:cards. I really hate checking emu->is_audigy and emu->revision in a # L:fast path like the IRQ handler but I don't see another way. # L: # L:Also, don't bother allocating/freeing the DMA buffer for P16V unless # L:it's really present. # L: # L:This is a critical fix and should trigger an immediate rc2 release IMO. # L:Currently any emu10k1 users other than Audigy 2 will lock up hard as # L:soon as they play any sound. # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1.c # 2005/03/17 08:55:16+01:00 perex@suse.cz +5 -3 # [ALSA] fix P16V breakage for non Audigy2 cards # # D:2005/03/17 15:55:16 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emu10k1.c:1.32->1.33 # F:pci/emu10k1/emu10k1_main.c:1.44->1.45 # F:pci/emu10k1/irq.c:1.13->1.14 # L:The P16V patch unconditionally checks the IPR2 register in the interrupt # L:handler resulting in infinite loop and system lockup on any non Audigy2 # L:cards. I really hate checking emu->is_audigy and emu->revision in a # L:fast path like the IRQ handler but I don't see another way. # L: # L:Also, don't bother allocating/freeing the DMA buffer for P16V unless # L:it's really present. # L: # L:This is a critical fix and should trigger an immediate rc2 release IMO. # L:Currently any emu10k1 users other than Audigy 2 will lock up hard as # L:soon as they play any sound. # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:06:04+01:00 perex@suse.cz # [ALSA] remove superfluous spin_lock_irqsave calls # # MPU401 UART,CS4281 driver,ENS1370/1+ driver,CS46xx driver # RME HDSP driver # In PCM trigger and pointer callbacks, replace spin_lock_irqsave() with # spin_lock() because interrupts are already guaranteed to be disabled. # # Signed-off-by: Clemens Ladisch # # sound/pci/rme9652/hdsp.c # 2005/03/17 01:24:39+01:00 perex@suse.cz +3 -4 # [ALSA] remove superfluous spin_lock_irqsave calls # # D:2005/03/17 08:24:38 # C:MPU401 UART,CS4281 driver,ENS1370/1+ driver,CS46xx driver # C:RME HDSP driver # F:drivers/mpu401/mpu401_uart.c:1.34->1.35 # F:pci/cs4281.c:1.71->1.72 # F:pci/ens1370.c:1.75->1.76 # F:pci/cs46xx/cs46xx_lib.c:1.95->1.96 # F:pci/rme9652/hdsp.c:1.84->1.85 # L:In PCM trigger and pointer callbacks, replace spin_lock_irqsave() with # L:spin_lock() because interrupts are already guaranteed to be disabled. # Signed-off-by: Clemens Ladisch # # sound/pci/ens1370.c # 2005/03/17 01:24:38+01:00 perex@suse.cz +10 -15 # [ALSA] remove superfluous spin_lock_irqsave calls # # D:2005/03/17 08:24:38 # C:MPU401 UART,CS4281 driver,ENS1370/1+ driver,CS46xx driver # C:RME HDSP driver # F:drivers/mpu401/mpu401_uart.c:1.34->1.35 # F:pci/cs4281.c:1.71->1.72 # F:pci/ens1370.c:1.75->1.76 # F:pci/cs46xx/cs46xx_lib.c:1.95->1.96 # F:pci/rme9652/hdsp.c:1.84->1.85 # L:In PCM trigger and pointer callbacks, replace spin_lock_irqsave() with # L:spin_lock() because interrupts are already guaranteed to be disabled. # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/cs46xx_lib.c # 2005/03/17 01:24:39+01:00 perex@suse.cz +6 -10 # [ALSA] remove superfluous spin_lock_irqsave calls # # D:2005/03/17 08:24:38 # C:MPU401 UART,CS4281 driver,ENS1370/1+ driver,CS46xx driver # C:RME HDSP driver # F:drivers/mpu401/mpu401_uart.c:1.34->1.35 # F:pci/cs4281.c:1.71->1.72 # F:pci/ens1370.c:1.75->1.76 # F:pci/cs46xx/cs46xx_lib.c:1.95->1.96 # F:pci/rme9652/hdsp.c:1.84->1.85 # L:In PCM trigger and pointer callbacks, replace spin_lock_irqsave() with # L:spin_lock() because interrupts are already guaranteed to be disabled. # Signed-off-by: Clemens Ladisch # # sound/pci/cs4281.c # 2005/03/17 01:24:38+01:00 perex@suse.cz +3 -4 # [ALSA] remove superfluous spin_lock_irqsave calls # # D:2005/03/17 08:24:38 # C:MPU401 UART,CS4281 driver,ENS1370/1+ driver,CS46xx driver # C:RME HDSP driver # F:drivers/mpu401/mpu401_uart.c:1.34->1.35 # F:pci/cs4281.c:1.71->1.72 # F:pci/ens1370.c:1.75->1.76 # F:pci/cs46xx/cs46xx_lib.c:1.95->1.96 # F:pci/rme9652/hdsp.c:1.84->1.85 # L:In PCM trigger and pointer callbacks, replace spin_lock_irqsave() with # L:spin_lock() because interrupts are already guaranteed to be disabled. # Signed-off-by: Clemens Ladisch # # sound/drivers/mpu401/mpu401_uart.c # 2005/03/17 01:24:38+01:00 perex@suse.cz +2 -3 # [ALSA] remove superfluous spin_lock_irqsave calls # # D:2005/03/17 08:24:38 # C:MPU401 UART,CS4281 driver,ENS1370/1+ driver,CS46xx driver # C:RME HDSP driver # F:drivers/mpu401/mpu401_uart.c:1.34->1.35 # F:pci/cs4281.c:1.71->1.72 # F:pci/ens1370.c:1.75->1.76 # F:pci/cs46xx/cs46xx_lib.c:1.95->1.96 # F:pci/rme9652/hdsp.c:1.84->1.85 # L:In PCM trigger and pointer callbacks, replace spin_lock_irqsave() with # L:spin_lock() because interrupts are already guaranteed to be disabled. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:05:21+01:00 perex@suse.cz # [ALSA] documentation - clarify information about atomic callbacks # # Documentation # Document that the ack callback is atomic, too, and that the atomic # callbacks are called with disabled interrupts. Additionally, clarify # the description of the rawmidi trigger callback. # # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2005/03/17 01:23:31+01:00 perex@suse.cz +20 -5 # [ALSA] documentation - clarify information about atomic callbacks # # D:2005/03/17 08:23:31 # C:Documentation # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.49->1.50 # L:Document that the ack callback is atomic, too, and that the atomic # L:callbacks are called with disabled interrupts. Additionally, clarify # L:the description of the rawmidi trigger callback. # Signed-off-by: Clemens Ladisch # # ChangeSet # 2005/03/22 09:04:37+01:00 perex@suse.cz # [ALSA] Add new C-Media 9880 codec ID # # HDA Codec driver # Following change need to be added for newer C-Media 9880 codec ID. # # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # sound/pci/hda/patch_cmedia.c # 2005/03/16 06:37:09+01:00 perex@suse.cz +1 -0 # [ALSA] Add new C-Media 9880 codec ID # # D:2005/03/16 13:37:09 # C:HDA Codec driver # F:pci/hda/hda_codec.c:1.6->1.7 # F:pci/hda/patch_cmedia.c:1.4->1.5 # L:Following change need to be added for newer C-Media 9880 codec ID. # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # sound/pci/hda/hda_codec.c # 2005/03/16 06:37:09+01:00 perex@suse.cz +1 -0 # [ALSA] Add new C-Media 9880 codec ID # # D:2005/03/16 13:37:09 # C:HDA Codec driver # F:pci/hda/hda_codec.c:1.6->1.7 # F:pci/hda/patch_cmedia.c:1.4->1.5 # L:Following change need to be added for newer C-Media 9880 codec ID. # Signed-off-by: ChenLi Tien # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:03:57+01:00 perex@suse.cz # [ALSA] Use full-digital model as default for CMI9880 # # HDA Codec driver # Use full-digital model as default for CMI9880 rather than the # minimal model. # # Signed-off-by: Takashi Iwai # # sound/pci/hda/patch_cmedia.c # 2005/03/16 06:35:52+01:00 perex@suse.cz +1 -1 # [ALSA] Use full-digital model as default for CMI9880 # # D:2005/03/16 13:35:52 # C:HDA Codec driver # F:pci/hda/patch_cmedia.c:1.3->1.4 # L:Use full-digital model as default for CMI9880 rather than the # L:minimal model. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:03:14+01:00 perex@suse.cz # [ALSA] ak4114 (Juli@) - increased delay between statistics update & rate check # # AK4114 receiver # # # Signed-off-by: Jaroslav Kysela # # sound/i2c/other/ak4114.c # 2005/03/15 09:56:07+01:00 perex@suse.cz +2 -2 # [ALSA] ak4114 (Juli@) - increased delay between statistics update & rate check # # D:2005/03/15 16:56:07 # C:AK4114 receiver # F:i2c/other/ak4114.c:1.3->1.4 # L: # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2005/03/22 09:02:33+01:00 perex@suse.cz # [ALSA] Wake up polls and signals at timer notification # # Timer Midlevel # Wake up polls and signals at timer notification (TREAD mode only). # # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2005/03/15 04:33:32+01:00 perex@suse.cz +2 -0 # [ALSA] Wake up polls and signals at timer notification # # D:2005/03/15 11:33:32 # C:Timer Midlevel # F:core/timer.c:1.66->1.67 # L:Wake up polls and signals at timer notification (TREAD mode only). # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:01:52+01:00 perex@suse.cz # [ALSA] Fix resume of es1968 # # ES1968 driver # Fixed the resume of es1968. # - restore the running PCM set up properly in resume # - ignore spurious hw-vol irqs during resume # # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2005/03/15 04:27:27+01:00 perex@suse.cz +19 -0 # [ALSA] Fix resume of es1968 # # D:2005/03/15 11:27:27 # C:ES1968 driver # F:pci/es1968.c:1.83->1.84 # L:Fixed the resume of es1968. # L: - restore the running PCM set up properly in resume # L: - ignore spurious hw-vol irqs during resume # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:01:11+01:00 perex@suse.cz # [ALSA] Fix Oops with timer notifying # # Timer Midlevel # Fixed Oops with timer notifying after TIMER_TREAD ioctl. # # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2005/03/15 04:25:51+01:00 perex@suse.cz +2 -1 # [ALSA] Fix Oops with timer notifying # # D:2005/03/15 11:25:51 # C:Timer Midlevel # F:core/timer.c:1.65->1.66 # L:Fixed Oops with timer notifying after TIMER_TREAD ioctl. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 09:00:28+01:00 perex@suse.cz # [ALSA] Fix suspend/resume with ATIIXP # # ATIIXP driver # Fixed the suspend/resume with ATIIXP driver. # # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2005/03/14 10:31:52+01:00 perex@suse.cz +17 -1 # [ALSA] Fix suspend/resume with ATIIXP # # D:2005/03/14 17:31:52 # C:ATIIXP driver # F:pci/atiixp.c:1.32->1.33 # L:Fixed the suspend/resume with ATIIXP driver. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 08:59:49+01:00 perex@suse.cz # [ALSA] Add proper spin/irq locks to suspend # # PCM Midlevel # Add the proper spin/irq locks to PCM suspend functions so that PCM # trigger and pointer callbacks can be called safely without irqsave. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2005/03/14 10:28:55+01:00 perex@suse.cz +9 -6 # [ALSA] Add proper spin/irq locks to suspend # # D:2005/03/14 17:28:55 # C:PCM Midlevel # F:core/pcm_native.c:1.115->1.116 # L:Add the proper spin/irq locks to PCM suspend functions so that PCM # L:trigger and pointer callbacks can be called safely without irqsave. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 08:59:10+01:00 perex@suse.cz # [ALSA] isa/Kconfig - added SND_AD1848_LIB and SND_CS4231_LIB tristates # # ISA # This patch fixes problem with missing SND_GENERIC_PM for isa cards using # ad1848 and cs4231 library modules. # # Signed-off-by: Jaroslav Kysela # # sound/isa/Kconfig # 2005/03/14 02:24:58+01:00 perex@suse.cz +25 -20 # [ALSA] isa/Kconfig - added SND_AD1848_LIB and SND_CS4231_LIB tristates # # D:2005/03/14 09:24:58 # C:ISA # F:isa/Kconfig:1.15->1.16 # L:This patch fixes problem with missing SND_GENERIC_PM for isa cards using # L:ad1848 and cs4231 library modules. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2005/03/22 08:58:26+01:00 perex@suse.cz # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # EMU10K1/EMU10K2 driver # Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/p16v.h # 2005/03/22 08:41:41+01:00 perex@suse.cz +299 -0 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/p16v.h # 2005/03/22 08:41:41+01:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/emu10k1/p16v.h # # sound/pci/emu10k1/irq.c # 2005/03/13 05:17:10+01:00 perex@suse.cz +16 -2 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/io.c # 2005/03/13 05:17:09+01:00 perex@suse.cz +32 -0 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emuproc.c # 2005/03/13 05:17:09+01:00 perex@suse.cz +6 -6 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emumixer.c # 2005/03/13 05:17:09+01:00 perex@suse.cz +5 -1 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emu10k1_main.c # 2005/03/13 05:17:08+01:00 perex@suse.cz +11 -6 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emu10k1.c # 2005/03/13 05:17:08+01:00 perex@suse.cz +14 -3 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/Makefile # 2005/03/13 05:17:08+01:00 perex@suse.cz +1 -1 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # include/sound/emu10k1.h # 2005/03/13 05:17:08+01:00 perex@suse.cz +51 -0 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/p16v.c # 2005/03/22 08:41:37+01:00 perex@suse.cz +734 -0 # [ALSA] emu10k1 - add support for p16v chip (24-bit playback) # # D:2005/03/13 12:17:08 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.58->1.59 # F:pci/emu10k1/Makefile:1.12->1.13 # F:pci/emu10k1/emu10k1.c:1.31->1.32 # F:pci/emu10k1/emu10k1_main.c:1.43->1.44 # F:pci/emu10k1/emumixer.c:1.31->1.32 # F:pci/emu10k1/emuproc.c:1.24->1.25 # F:pci/emu10k1/io.c:1.9->1.10 # F:pci/emu10k1/irq.c:1.12->1.13 # F:pci/emu10k1/p16v.c:INITIAL->1.1 # F:pci/emu10k1/p16v.h:INITIAL->1.1 # L:Add 24bit, 96khz support for multichannel playback on the Audigy 2 sound cards. # Signed-off-by: James Courtier-Dutton # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/p16v.c # 2005/03/22 08:41:37+01:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/emu10k1/p16v.c # # ChangeSet # 2005/03/22 08:57:43+01:00 perex@suse.cz # [ALSA] emu10k1 - copyright additions/fixes # # EMU10K1/EMU10K2 driver # The next two patches add my copyright for adding the multichannel PCM # support to emupcm.c and emumixer.c. # # The final patch adds Clemens Ladisch to the copyright on timer.c, rather # than just saying 'Copied from similar code by CL'. This has been # bugging me for a while, since I just copied and pasted from the ymfpci # driver & changed the registers. # # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/timer.c # 2005/03/13 01:55:50+01:00 perex@suse.cz +1 -3 # [ALSA] emu10k1 - copyright additions/fixes # # D:2005/03/13 08:55:49 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emumixer.c:1.30->1.31 # F:pci/emu10k1/emupcm.c:1.44->1.45 # F:pci/emu10k1/timer.c:1.1->1.2 # L:The next two patches add my copyright for adding the multichannel PCM # L:support to emupcm.c and emumixer.c. # L: # L:The final patch adds Clemens Ladisch to the copyright on timer.c, rather # L:than just saying 'Copied from similar code by CL'. This has been # L:bugging me for a while, since I just copied and pasted from the ymfpci # L:driver & changed the registers. # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emupcm.c # 2005/03/13 01:55:50+01:00 perex@suse.cz +1 -0 # [ALSA] emu10k1 - copyright additions/fixes # # D:2005/03/13 08:55:49 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emumixer.c:1.30->1.31 # F:pci/emu10k1/emupcm.c:1.44->1.45 # F:pci/emu10k1/timer.c:1.1->1.2 # L:The next two patches add my copyright for adding the multichannel PCM # L:support to emupcm.c and emumixer.c. # L: # L:The final patch adds Clemens Ladisch to the copyright on timer.c, rather # L:than just saying 'Copied from similar code by CL'. This has been # L:bugging me for a while, since I just copied and pasted from the ymfpci # L:driver & changed the registers. # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emumixer.c # 2005/03/13 01:55:49+01:00 perex@suse.cz +1 -0 # [ALSA] emu10k1 - copyright additions/fixes # # D:2005/03/13 08:55:49 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emumixer.c:1.30->1.31 # F:pci/emu10k1/emupcm.c:1.44->1.45 # F:pci/emu10k1/timer.c:1.1->1.2 # L:The next two patches add my copyright for adding the multichannel PCM # L:support to emupcm.c and emumixer.c. # L: # L:The final patch adds Clemens Ladisch to the copyright on timer.c, rather # L:than just saying 'Copied from similar code by CL'. This has been # L:bugging me for a while, since I just copied and pasted from the ymfpci # L:driver & changed the registers. # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2005/03/22 08:57:02+01:00 perex@suse.cz # [ALSA] emu10k1 - Silence the 'BUG (or not enough voices)' message # # EMU10K1/EMU10K2 driver # Silence the 'BUG (or not enough voices)' message. This does not in fact # represent a bug; it's a normal ocurrence when the wavetable synth is in use. # # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/voice.c # 2005/03/13 01:53:53+01:00 perex@suse.cz +1 -5 # [ALSA] emu10k1 - Silence the 'BUG (or not enough voices)' message # # D:2005/03/13 08:53:53 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/voice.c:1.7->1.8 # L:Silence the 'BUG (or not enough voices)' message. This does not in fact # L:represent a bug; it's a normal ocurrence when the wavetable synth is in use. # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2005/03/22 08:56:19+01:00 perex@suse.cz # [ALSA] emu10k1 - give the subdevices descriptive names # # EMU10K1/EMU10K2 driver # Give the subdevices descriptive names, like 'ADC Capture/Standard PCM Playback' instead of 'EMU10K1' for # hw:x,0 and 'Multichannel Capture/PT Playback' instead of 'EMU10K1 EFX' # for hw:x,2. Now that qjackctl enumerates the devices automatically, # this is a significant usability improvement. # # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # sound/pci/emu10k1/emupcm.c # 2005/03/13 01:52:26+01:00 perex@suse.cz +4 -4 # [ALSA] emu10k1 - give the subdevices descriptive names # # D:2005/03/13 08:52:26 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.43->1.44 # L:Give the subdevices descriptive names, like 'ADC Capture/Standard PCM Playback' instead of 'EMU10K1' for # L:hw:x,0 and 'Multichannel Capture/PT Playback' instead of 'EMU10K1 EFX' # L:for hw:x,2. Now that qjackctl enumerates the devices automatically, # L:this is a significant usability improvement. # Signed-off-by: Lee Revell # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2005/03/22 08:55:39+01:00 perex@suse.cz # [ALSA] Fix voice allocation corruption # # EMU10K1/EMU10K2 driver # Fixed the corrupted voice allocation in snd_emu10k1_pcm_channel_alloc(). # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2005/03/11 09:32:21+01:00 perex@suse.cz +11 -8 # [ALSA] Fix voice allocation corruption # # D:2005/03/11 16:32:21 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.42->1.43 # L:Fixed the corrupted voice allocation in snd_emu10k1_pcm_channel_alloc(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 08:54:56+01:00 perex@suse.cz # [ALSA] Add DXS support for MSI K8T Neo2-FI # # VIA82xx driver # Added the DXS entry for MSI K8T Neo2-FI. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2005/03/11 09:21:55+01:00 perex@suse.cz +1 -0 # [ALSA] Add DXS support for MSI K8T Neo2-FI # # D:2005/03/11 16:21:55 # C:VIA82xx driver # F:pci/via82xx.c:1.137->1.138 # L:Added the DXS entry for MSI K8T Neo2-FI. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/22 08:54:10+01:00 perex@suse.cz # [ALSA] Fix ALC655/658/850 SPDIF playback route # # AC97 Codec # Fix ALC655/658/850 IEC958 (SPDIF) playback route control. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2005/03/11 09:20:18+01:00 perex@suse.cz +1 -1 # [ALSA] Fix ALC655/658/850 SPDIF playback route # # D:2005/03/11 16:20:18 # C:AC97 Codec # F:pci/ac97/ac97_patch.c:1.76->1.77 # L:Fix ALC655/658/850 IEC958 (SPDIF) playback route control. # Signed-off-by: Takashi Iwai # # ChangeSet # 2005/03/21 22:36:57-08:00 stern@rowland.harvard.edu # [PATCH] UHCI updates # # This is the fifth of five updates to the uhci-hcd driver: # # Separate out the part of the driver responsible for scanning the # schedule and doing delayed processing. Put it in a new routine # which can be called as needed (such as when the controller is # suspended) from several places in addition to the usual IRQ # handler. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-q.c # 2005/03/14 10:01:36-08:00 stern@rowland.harvard.edu +55 -0 # UHCI updates # # drivers/usb/host/uhci-hcd.h # 2005/03/14 10:01:36-08:00 stern@rowland.harvard.edu +4 -1 # UHCI updates # # drivers/usb/host/uhci-hcd.c # 2005/03/14 10:01:36-08:00 stern@rowland.harvard.edu +6 -60 # UHCI updates # # ChangeSet # 2005/03/21 22:36:17-08:00 stern@rowland.harvard.edu # [PATCH] UHCI updates # # This is the fourth of five updates to the uhci-hcd driver: # # Reimplement the get_current_frame routines so that when the # controller isn't running they return a cached value. Also add # a flag to track whether the controller is running and allow # critical data structure updates to occur immediately if the # controller is stopped. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-q.c # 2005/03/21 22:33:16-08:00 stern@rowland.harvard.edu +14 -17 # UHCI updates # # drivers/usb/host/uhci-hcd.h # 2005/03/21 22:33:16-08:00 stern@rowland.harvard.edu +3 -1 # UHCI updates # # drivers/usb/host/uhci-hcd.c # 2005/03/21 22:34:27-08:00 stern@rowland.harvard.edu +35 -16 # UHCI updates # # ChangeSet # 2005/03/21 22:30:56-08:00 stern@rowland.harvard.edu # [PATCH] UHCI updates # # This is the third of five updates to the uhci-hcd driver: # # Change the first argument to uhci_finish_completion from hcd # to uhci and expand the spinlock-protected region to include # the entire timer callback routine plus the suspend and resume # routines. It's a little awkward that the reset routine must # run without the spinlock, but that whole pathway will vanish # before long. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-q.c # 2005/03/14 09:53:09-08:00 stern@rowland.harvard.edu +2 -3 # UHCI updates # # drivers/usb/host/uhci-hcd.c # 2005/03/14 09:53:09-08:00 stern@rowland.harvard.edu +18 -5 # UHCI updates # # ChangeSet # 2005/03/21 22:27:09-08:00 stern@rowland.harvard.edu # [PATCH] UHCI updates # # This is the second of five updates to the uhci-hcd driver: # # Reimplement the port reset function by splitting it into two # parts like the other HC drivers do, where the second part is # triggered by a port status request when the reset finishes. Now # the entire hub_control routine can run without sleeping and can # hold the device spinlock. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hub.c # 2005/03/14 09:30:15-08:00 stern@rowland.harvard.edu +30 -16 # UHCI updates # # drivers/usb/host/uhci-hcd.h # 2005/03/14 09:30:15-08:00 stern@rowland.harvard.edu +2 -2 # UHCI updates # # drivers/usb/host/uhci-hcd.c # 2005/03/14 09:30:15-08:00 stern@rowland.harvard.edu +1 -1 # UHCI updates # # ChangeSet # 2005/03/21 22:26:12-08:00 stern@rowland.harvard.edu # [PATCH] UHCI updates # # This is the first of five updates to the uhci-hcd driver: # # Rename the uhci->schedule_lock to just plain uhci->lock. # Originally I had thought of adding a separate device-management # lock, but now it seems better to use a single lock for both # purposes. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-q.c # 2005/03/14 09:26:50-08:00 stern@rowland.harvard.edu +8 -8 # UHCI updates # # drivers/usb/host/uhci-hcd.h # 2005/03/14 09:26:50-08:00 stern@rowland.harvard.edu +12 -12 # UHCI updates # # drivers/usb/host/uhci-hcd.c # 2005/03/14 09:26:50-08:00 stern@rowland.harvard.edu +7 -7 # UHCI updates # # drivers/usb/host/uhci-debug.c # 2005/03/14 09:26:50-08:00 stern@rowland.harvard.edu +2 -2 # UHCI updates # # ChangeSet # 2005/03/21 22:24:51-08:00 stern@rowland.harvard.edu # [PATCH] USBcore updates # # This is the fifth of five updates to usbcore: # # Add some extra debugging messages to the hub driver and make it # set the power state for root hubs like it does for external hubs. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hub.c # 2005/03/14 07:26:56-08:00 stern@rowland.harvard.edu +11 -2 # USBcore updates # # ChangeSet # 2005/03/21 22:32:17-06:00 stevef@smf-t23.(none) # [CIFS] Fix NT4 attribute setting # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/inode.c # 2005/03/21 22:31:58-06:00 stevef@smf-t23.(none) +16 -7 # Workaround NT4 attribute/time setting bug by avoiding level 257 setpathinfo to NT4 # # fs/cifs/connect.c # 2005/03/21 22:31:58-06:00 stevef@smf-t23.(none) +12 -5 # recognize NT4 servers # # fs/cifs/cifsglob.h # 2005/03/21 22:31:58-06:00 stevef@smf-t23.(none) +3 -0 # recognize NT4 servers # # ChangeSet # 2005/03/21 20:09:44-06:00 stevef@smf-t23.(none) # [CIFS] add new retry on failure to legacy servers such as NT4 of delete of readonly files. # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/misc.c # 2005/03/21 20:09:25-06:00 stevef@smf-t23.(none) +7 -3 # do not log error on NT4 error responses which are just too short to include wct # # fs/cifs/inode.c # 2005/03/21 20:09:25-06:00 stevef@smf-t23.(none) +28 -2 # add new retry on failure to legacy servers such as NT4 of delete of readonly files. # # fs/cifs/cifssmb.c # 2005/03/21 20:09:25-06:00 stevef@smf-t23.(none) +27 -54 # add new retry on failure to legacy servers such as NT4 of delete of readonly files. # # fs/cifs/cifsproto.h # 2005/03/21 20:09:24-06:00 stevef@smf-t23.(none) +4 -3 # add new retry (via SMB setattr) on failure to legacy servers such as NT4 of delete of readonly files. # # fs/cifs/cifspdu.h # 2005/03/21 20:09:24-06:00 stevef@smf-t23.(none) +19 -0 # add new retry on failure to legacy servers such as NT4 of delete of readonly files. # # ChangeSet # 2005/03/21 15:04:00-08:00 stern@rowland.harvard.edu # [PATCH] USBcore updates # # This is the fourth of five updates to usbcore: # # Add a new usb_hcd_resume_root_hub function for use by HCDs in # processing resume requests from their root hubs. No calls to # this new routine are in the patch but they will be added in # due course. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/usb.h # 2005/03/21 15:00:03-08:00 stern@rowland.harvard.edu +1 -0 # USBcore updates # # drivers/usb/core/hub.h # 2005/03/21 15:00:03-08:00 stern@rowland.harvard.edu +1 -0 # USBcore updates # # drivers/usb/core/hub.c # 2005/03/21 15:00:03-08:00 stern@rowland.harvard.edu +14 -0 # USBcore updates # # drivers/usb/core/hcd.h # 2005/03/21 15:00:03-08:00 stern@rowland.harvard.edu +2 -0 # USBcore updates # # drivers/usb/core/hcd.c # 2005/03/21 15:01:10-08:00 stern@rowland.harvard.edu +24 -0 # USBcore updates # # ChangeSet # 2005/03/21 14:58:02-08:00 stern@rowland.harvard.edu # [PATCH] USBcore updates # # This is the third of five updates to usbcore: # # Adjust the usb_hc_died routine to eliminate races with root-hub # registration/deregistration and have it tell khubd to remove # all devices below the root hub. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/usb.h # 2005/03/14 07:19:06-08:00 stern@rowland.harvard.edu +2 -0 # USBcore updates # # drivers/usb/core/hub.c # 2005/03/14 07:19:06-08:00 stern@rowland.harvard.edu +16 -1 # USBcore updates # # drivers/usb/core/hcd.h # 2005/03/14 07:19:06-08:00 stern@rowland.harvard.edu +2 -0 # USBcore updates # # drivers/usb/core/hcd.c # 2005/03/14 07:19:06-08:00 stern@rowland.harvard.edu +29 -3 # USBcore updates # # ChangeSet # 2005/03/21 14:43:56-08:00 stern@rowland.harvard.edu # [PATCH] USBcore and HCD updates # # This is the second of five updates to usbcore: # # Rename the hcd->state constants so that they all begin with # HC_STATE. Right now some of them start with HCD_STATE and # others with USB_STATE, which can be very confusing. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +2 -2 # USBcore and HCD updates # # drivers/usb/host/sl811-hcd.c # 2005/03/21 14:29:26-08:00 stern@rowland.harvard.edu +3 -3 # USBcore and HCD updates # # drivers/usb/host/ohci.h # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +1 -1 # USBcore and HCD updates # # drivers/usb/host/ohci-q.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +5 -5 # USBcore and HCD updates # # drivers/usb/host/ohci-omap.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +1 -1 # USBcore and HCD updates # # drivers/usb/host/ohci-hub.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +7 -7 # USBcore and HCD updates # # drivers/usb/host/ohci-hcd.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +9 -9 # USBcore and HCD updates # # drivers/usb/host/ehci-sched.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +6 -6 # USBcore and HCD updates # # drivers/usb/host/ehci-q.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +7 -7 # USBcore and HCD updates # # drivers/usb/host/ehci-hub.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +5 -5 # USBcore and HCD updates # # drivers/usb/host/ehci-hcd.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +12 -12 # USBcore and HCD updates # # drivers/usb/gadget/dummy_hcd.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +2 -2 # USBcore and HCD updates # # drivers/usb/core/hcd.h # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +7 -7 # USBcore and HCD updates # # drivers/usb/core/hcd.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +11 -11 # USBcore and HCD updates # # drivers/usb/core/hcd-pci.c # 2005/03/21 14:28:32-08:00 stern@rowland.harvard.edu +7 -7 # USBcore and HCD updates # # ChangeSet # 2005/03/21 21:26:20+00:00 icampbell@com.rmk.(none) # [ARM PATCH] 2574/1: PXA2xx: Save CCLKCFG over sleep # # Patch from Ian Campbell # # As discussed on the ARM kernel list, the CCLKCFG[TURBO] bit is # documented as being cleared when sleep mode exits so we need # to save and restore it ourselves. # # Signed-off-by: Ian Campbell # Signed-off-by: Russell King # # arch/arm/mach-pxa/sleep.S # 2005/03/18 16:03:44+00:00 icampbell@com.rmk.(none) +11 -6 # [PATCH] 2574/1: PXA2xx: Save CCLKCFG over sleep # # ChangeSet # 2005/03/21 21:17:05+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2573/1: simplify align[bw]() in ixp2000's io.h and update comments # # Patch from Lennert Buytenhek # # We currently have a workaround for the fact that early IXP2400s # assert byte lanes for PCI I/O transactions the other way round. # Newer silicon has a bit that can be set to 1 to get the 'proper' # behavior, but since that is not available on older silicon we # choose to keep working around this issue by hand. # The workaround can be done in an easier way than is currently the # case, though -- instead of substracting the lower two bits of the # I/O address from 3 and putting the result back into the lower two # bits, we can just toggle the two lowest bits using a simple XOR # with 3. # While we are at it, the outb() macro does not seem to parenthesize # its first argument, while outw() and outl() do, so fix this up. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/io.h # 2005/03/20 18:12:11+00:00 buytenh@org.rmk.(none) +9 -5 # [PATCH] 2573/1: simplify align[bw]() in ixp2000's io.h and update comments # # ChangeSet # 2005/03/21 20:57:28+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2572/1: remove ifdefs from enp2611.c # # Patch from Lennert Buytenhek # # If enp2611.c is compiled in, it implies that CONFIG_ARCH_ENP2611 # is defined, so we don't need the ifdefs. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/enp2611.c # 2005/03/20 18:11:34+00:00 buytenh@org.rmk.(none) +0 -2 # [PATCH] 2572/1: remove ifdefs from enp2611.c # # ChangeSet # 2005/03/21 20:47:35+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2571/1: minor time-keeping fixes for ixp2000 # # Patch from Lennert Buytenhek # # There are two very minor issues with time-keeping on the ixp2000: # 1. It turns out that if T#_CLD (timer reload value) is set to X, # it means the timer will spend a full tick on 0, then a full # tick on X, and then start counting down towards 0, which then # effectively gives the timer a period of X+1 instead of the # intended X. Solve by writing X-1 instead of X to T#_CLD. # This is relatively harmless, though -- assuming a 50MHz system # clock (like on the ENP-2611) and HZ=100, there will be 500000 # timer interrupts generated per 500001 real-world jiffies, but # that last timer interrupt will call timer_tick twice, taking the # system time from 499999 jiffies plus 20000 usec to 500001 jiffies # plus 0 usec. Every 500000th jiffy will 'not exist', and every # other jiffy will last 10002us instead of 10000us. # 2. next_jiffy_time is initialised as '0xffffffff - ticks_per_jiffy', # but timer 4 starts ticking from 0xffffffff downwards, which will # cause the time offset in the first 1/HZ sec after timer int init # to be negative, and the first timer interrupt ever not to call # timer_tick(). # Neither of these issues can cause clock drift or backwards clock # motion, but it's good to fix them nevertheless. # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp2000/core.c # 2005/03/20 18:11:34+00:00 buytenh@org.rmk.(none) +2 -2 # [PATCH] 2571/1: minor time-keeping fixes for ixp2000 # # ChangeSet # 2005/03/20 21:05:57-06:00 jejb@mulgrave.(none) # 53c700: Alter interrupt assignment # # This change makes interrupt assignment the job of the # glue driver. The upshot being that the glue driver can # now set the name of the interrupt and, in the case of # the NCR_D700 driver, make the interrupt routing more efficient. # # Signed-off-by: James Bottomley # # drivers/scsi/sim710.c # 2005/03/20 21:04:31-06:00 jejb@mulgrave.(none) +10 -2 # 53c700: Alter interrupt assignment # # drivers/scsi/lasi700.c # 2005/03/20 21:04:31-06:00 jejb@mulgrave.(none) +9 -2 # 53c700: Alter interrupt assignment # # drivers/scsi/NCR_D700.c # 2005/03/20 21:04:31-06:00 jejb@mulgrave.(none) +32 -9 # 53c700: Alter interrupt assignment # # drivers/scsi/53c700.h # 2005/03/20 21:04:31-06:00 jejb@mulgrave.(none) +1 -2 # 53c700: Alter interrupt assignment # # drivers/scsi/53c700.c # 2005/03/20 21:04:31-06:00 jejb@mulgrave.(none) +3 -18 # 53c700: Alter interrupt assignment # # ChangeSet # 2005/03/21 12:16:10+11:00 nathans@sgi.com # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # SGI-PV: 932297 # SGI-Modid: xfs-linux-melb:xfs-kern:21888a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vnodeops.c # 2005/03/21 12:15:39+11:00 nathans@sgi.com +6 -6 # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # fs/xfs/xfs_vfsops.c # 2005/03/21 12:15:39+11:00 nathans@sgi.com +3 -0 # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # fs/xfs/xfs_rename.c # 2005/03/21 12:15:39+11:00 nathans@sgi.com +1 -1 # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # fs/xfs/xfs_mount.h # 2005/03/21 12:15:39+11:00 nathans@sgi.com +1 -0 # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # fs/xfs/xfs_clnt.h # 2005/03/21 12:15:39+11:00 nathans@sgi.com +2 -0 # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # fs/xfs/linux-2.6/xfs_super.c # 2005/03/21 12:15:39+11:00 nathans@sgi.com +2 -0 # [XFS] Make trivial extension to sync flag to implement dirsync, # instead of silently ignoring it. # # ChangeSet # 2005/03/21 12:03:51+11:00 nathans@sgi.com # [XFS] Fix sync mount option to also do metadata updates synchronously. # # SGI-PV: 932297 # SGI-Modid: xfs-linux-melb:xfs-kern:21887a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_super.c # 2005/03/21 12:03:20+11:00 nathans@sgi.com +2 -0 # [XFS] Fix sync mount option to also do metadata updates synchronously. # # ChangeSet # 2005/03/20 17:09:22-06:00 stevef@smf-t23.(none) # [CIFS] streamlining cifs open with various helper functions # # Signed-off-by: Jesper Juhl (juhl-lkml@dif.dk) # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/file.c # 2005/03/20 17:08:58-06:00 stevef@smf-t23.(none) +106 -80 # streamlining cifs open with various helper functions # # ChangeSet # 2005/03/20 18:12:44+01:00 marcel@holtmann.org # [Bluetooth] Fix race condition in virtual HCI driver # # This patch fixes a race condition in the hci_vhci_chr_close() # routine of the virtual HCI driver. # # Signed-off-by: Imre Deak # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/hci_vhci.c # 2005/03/20 18:10:21+01:00 marcel@holtmann.org +4 -3 # Fix race condition in virtual HCI driver # # ChangeSet # 2005/03/20 10:12:34-06:00 jejb@mulgrave.(none) # SCSI: Re-export code incorrectly made static # # The interrupt routine in 53c700 is designed to be exported # for a future code change # # Signed-off-by: James Bottomley # # drivers/scsi/53c700.h # 2005/03/20 10:11:44-06:00 jejb@mulgrave.(none) +1 -0 # SCSI: Re-export code incorrectly made static # # drivers/scsi/53c700.c # 2005/03/20 10:11:44-06:00 jejb@mulgrave.(none) +2 -2 # SCSI: Re-export code incorrectly made static # # ChangeSet # 2005/03/20 09:46:11+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add vserver syscall allocation # # Signed-off-by: Russell King # # ChangeSet # 2005/03/20 20:36:54+11:00 domen@coderock.org # [CRYPTO]: Fix sparse warnings in tea # # Signed-off-by: Domen Puncer # Signed-off-by: Herbert Xu # # crypto/tea.c # 2005/03/20 20:36:21+11:00 domen@coderock.org +2 -2 # [CRYPTO]: Fix sparse warnings in tea # # include/asm-arm/unistd.h # 2005/03/20 09:35:49+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add vserver syscall allocation. # # ChangeSet # 2005/03/20 20:30:42+11:00 domen@coderock.org # [CRYPTO]: Fix sparse warnings in blowfish # # Signed-off-by: Domen Puncer # Signed-off-by: Herbert Xu # # crypto/blowfish.c # 2005/03/20 20:30:13+11:00 domen@coderock.org +4 -4 # [CRYPTO]: Fix sparse warnings in blowfish # # ChangeSet # 2005/03/20 20:24:16+11:00 domen@coderock.org # [CRYPTO]: Fix sparse warning in sha512 # # Signed-off-by: Domen Puncer # Signed-off-by: Herbert Xu # # crypto/sha512.c # 2005/03/20 20:23:42+11:00 domen@coderock.org +1 -1 # [CRYPTO]: Fix sparse warning in sha512 # # ChangeSet # 2005/03/20 20:21:42+11:00 domen@coderock.org # [CRYPTO]: Fix sparse warning in sha256 # # Signed-off-by: Domen Puncer # Signed-off-by: Herbert Xu # # crypto/sha256.c # 2005/03/20 20:21:10+11:00 domen@coderock.org +1 -1 # [CRYPTO]: Fix sparse warning in sha256 # # ChangeSet # 2005/03/19 23:16:23-06:00 stevef@smf-t23.(none) # [CIFS] code cleanup, rearranging of large function # # Mostly following suggestions of Jesper Juhl # # Signed-of-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/file.c # 2005/03/19 23:16:00-06:00 stevef@smf-t23.(none) +118 -104 # code cleanup, rearranging of large function # # ChangeSet # 2005/03/19 20:36:15-06:00 jejb@mulgrave.(none) # ncr53c8xx: Fix small problem with initial negotiation # # The driver produces messages list this: # # ncr53c720-1: ID 7, Fast-10, Parity Checking # scsi1 : ncr53c8xx-3.4.3g # target1:0:1: target did not report SYNC. # Vendor: TOSHIBA Model: CD-ROM XM-5401TA Rev: 3605 # Type: CD-ROM ANSI SCSI revision: 02 # target1:0:1: Beginning Domain Validation # target1:0:1: asynchronous. # target1:0:1: Domain Validation skipping write tests # target1:0:1: FAST-5 SCSI 4.2 MB/s ST (236 ns, offset 8) # target1:0:1: Ending Domain Validation # # Although everything is fine. The initial "target did not report SYNC" # is because the driver is trying to negotiate over the initial inquiry # (so, naturally we don't know if it supports sync yet). The solution is # to rip out the last remnants of the spontaneous attempts at negotiation # to force it to wait for the DV negotiation in slave_configure. # # Signed-off-by: James Bottomley # # drivers/scsi/ncr53c8xx.c # 2005/03/19 20:31:04-06:00 jejb@mulgrave.(none) +1 -6 # ncr53c8xx: Fix small problem with initial negotiation # # ChangeSet # 2005/03/19 16:46:45-08:00 yoshfuji@linux-ipv6.org # [IPV4]: Size ip_mp_alg_table[] correctly. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv4/multipath.c # 2005/03/19 16:46:32-08:00 yoshfuji@linux-ipv6.org +1 -1 # [IPV4]: Size ip_mp_alg_table[] correctly. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/19 16:45:16-08:00 davem@sunset.davemloft.net # [IPV4]: Check multipath ops func pointers against NULL. # # Multipath algorithms are not required to implement # all of the methods. Just the ones they need. # # Signed-off-by: David S. Miller # # include/net/ip_mp_alg.h # 2005/03/19 16:44:15-08:00 davem@sunset.davemloft.net +6 -4 # [IPV4]: Check multipath ops func pointers against NULL. # # ChangeSet # 2005/03/19 15:43:33-06:00 jejb@titanic.il.steeleye.com # Q720: fix compile warning # # Signed-off-by: James Bottomley # # drivers/scsi/NCR_Q720.c # 2005/03/19 15:43:18-06:00 jejb@titanic.il.steeleye.com +1 -1 # Q720: fix compile warning # # ChangeSet # 2005/03/19 21:20:40+00:00 tony@com.rmk.(none) # [ARM PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # Patch from Tony Lindgren # # This patch by Ladislav Michl adds support for boards # VoiceBlue and NetStar # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # include/asm-arm/arch-omap/board-voiceblue.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +25 -0 # [PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # arch/arm/mach-omap/board-netstar.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +151 -0 # [PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # include/asm-arm/arch-omap/board-voiceblue.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-omap/board-voiceblue.h # # include/asm-arm/arch-omap/board-netstar.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +19 -0 # [PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # arch/arm/mach-omap/board-netstar.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/board-netstar.c # # arch/arm/mach-omap/Makefile # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +2 -0 # [PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # arch/arm/mach-omap/Kconfig # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +13 -0 # [PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # include/asm-arm/arch-omap/board-netstar.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-omap/board-netstar.h # # arch/arm/mach-omap/board-voiceblue.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +256 -0 # [PATCH] 2540/1: OMAP update 10/10: Add boards VoiceBlue and NetStar # # arch/arm/mach-omap/board-voiceblue.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/board-voiceblue.c # # ChangeSet # 2005/03/19 21:12:49+00:00 tony@com.rmk.(none) # [ARM PATCH] 2542/1: OMAP update 9/10: Board specific updates # # Patch from Tony Lindgren # # This patch updates the board specific files for OMAP. # The highlights of this patch are: # - Change flash memory to use device model style init by # Ladislav Michl # - USB related resource fixes by David Brownell # - Resource fixes for smc91x by Tony Lindgren # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # arch/arm/mach-omap/board-perseus2.c # 2005/03/14 14:30:32+00:00 tony@com.rmk.(none) +59 -3 # [PATCH] 2542/1: OMAP update 9/10: Board specific updates # # arch/arm/mach-omap/board-osk.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +50 -6 # [PATCH] 2542/1: OMAP update 9/10: Board specific updates # # arch/arm/mach-omap/board-innovator.c # 2005/03/14 14:30:32+00:00 tony@com.rmk.(none) +70 -4 # [PATCH] 2542/1: OMAP update 9/10: Board specific updates # # arch/arm/mach-omap/board-h3.c # 2005/03/14 14:30:32+00:00 tony@com.rmk.(none) +107 -3 # [PATCH] 2542/1: OMAP update 9/10: Board specific updates # # arch/arm/mach-omap/board-h2.c # 2005/03/14 14:30:32+00:00 tony@com.rmk.(none) +60 -2 # [PATCH] 2542/1: OMAP update 9/10: Board specific updates # # arch/arm/mach-omap/board-generic.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +0 -1 # [PATCH] 2542/1: OMAP update 9/10: Board specific updates # # ChangeSet # 2005/03/19 21:04:42+00:00 tony@com.rmk.(none) # [ARM PATCH] 2541/1: OMAP update 8/10: Leds related changes # # Patch from Tony Lindgren # # Better leds support by David Brownell # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # arch/arm/mach-omap/leds.h # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +1 -0 # [PATCH] 2541/1: OMAP update 8/10: Leds related changes # # arch/arm/mach-omap/leds.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +34 -1 # [PATCH] 2541/1: OMAP update 8/10: Leds related changes # # arch/arm/mach-omap/leds-h2p2-debug.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +69 -29 # [PATCH] 2541/1: OMAP update 8/10: Leds related changes # # arch/arm/mach-omap/leds-osk.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +198 -0 # [PATCH] 2541/1: OMAP update 8/10: Leds related changes # # arch/arm/mach-omap/leds-osk.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-omap/leds-osk.c # # ChangeSet # 2005/03/19 14:58:03-06:00 James.Bottomley@steeleye.com # [PATCH] fix breakage in the SCSI generic tag code # # When I redid the target allocation routines, I inadvertently broke the # generic tag code. The problem is that the device is added to the host # list after slave_configure in the new code. This is too late since if # any command disconnects during the initial inquiry phase, we now cannot # find the device for the reconnect. The fix is to add the device to the # lists earlier. # # Signed-off-by: James Bottomley # # drivers/scsi/scsi_sysfs.c # 2005/03/19 12:56:31-06:00 James.Bottomley@steeleye.com +8 -8 # fix breakage in the SCSI generic tag code # # ChangeSet # 2005/03/19 20:57:37+00:00 tony@com.rmk.(none) # [ARM PATCH] 2547/1: Update OMAP 7/10: USB low-level init # # Patch from Tony Lindgren # # This patch by David Brownell updates the USB low-level # init on OMAP. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # ChangeSet # 2005/03/19 14:55:41-06:00 willy@parisc-linux.org # [PATCH] Fix small bug in scsi_transport_spi # # Fix small bug in scsi_transport_spi # # "reserved" was being printed without a trailing \n. # # Signed-off-by: Matthew Wilcox # Signed-off-by: James Bottomley # # drivers/scsi/scsi_transport_spi.c # 2005/03/18 07:12:14-06:00 willy@parisc-linux.org +6 -3 # Fix small bug in scsi_transport_spi # # ChangeSet # 2005/03/19 14:54:23-06:00 willy@parisc-linux.org # [PATCH] ncr53c8xx update # # ncr53c8xx update # # ncr-3.4.3g: # # - set the starget in slave_alloc instead of slave_configure to avoid # problems with drives sending negotiation messages before we try to # configure them. # - Implement ->get_signalling. # - Pass the scsi_cmnd to ncr_get_ccb() instead of the target & lun numbers # - All ncr_show_msg() callers changed to use ncr_print_msg() # - Combine ncr_show_msg() into ncr_print_msg() # - Move ncr_print_msg() to near the top of the file and eliminate prototype # - Change PRINT_ADDR() to take a fmt string # - Make PRINT_ADDR use dev_info() # - Eliminate PRINT_LUN -- all callers can use PRINT_ADDR or dev_info # - Replace PRINT_TARGET() with a direct call to dev_info() # - Whitespace cleanups # - Get rid of superfluous ; after } of if/switch statements # - Use IDENTIFY() instead of M_IDENTIFY | ... # - Convert to use spi_display_xfer_agreement() # # Signed-off-by: Matthew Wilcox # Signed-off-by: James Bottomley # # drivers/scsi/sym53c8xx_defs.h # 2005/03/18 07:03:07-06:00 willy@parisc-linux.org +27 -27 # ncr53c8xx update # # drivers/scsi/ncr53c8xx.c # 2005/03/18 21:36:11-06:00 willy@parisc-linux.org +208 -297 # ncr53c8xx update # # ChangeSet # 2005/03/19 14:53:04-06:00 willy@parisc-linux.org # [PATCH] Zalon updates # # Zalon updates # # - Add KERN_INFO to printk # Signed-off-by: Andrew McGregor # Signed-off-by: Domen Puncer # Signed-off-by: Matthew Wilcox # # - Remove iomem-related warnings # - Improve printk message # - Use cpu_relax() # # Signed-off-by: Matthew Wilcox # Signed-off-by: James Bottomley # # drivers/scsi/zalon.c # 2005/03/18 07:03:07-06:00 willy@parisc-linux.org +11 -12 # Zalon updates # # arch/arm/mach-omap/usb.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +47 -36 # [PATCH] 2547/1: Update OMAP 7/10: USB low-level init # # ChangeSet # 2005/03/19 20:49:36+00:00 tony@com.rmk.(none) # [ARM PATCH] 2544/1: OMAP update 6/10: Change OCPI to use clock framework # # Patch from Tony Lindgren # # This patch by Paul Mundt and Tony Lindgren changes cleans up # the OCPI bus code and changes it to use clock framework. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # ChangeSet # 2005/03/19 14:47:37-06:00 willy@parisc-linux.org # [PATCH] Misc Lasi 700 fixes # # Misc Lasi 700 fixes # # - Use the DMA_32BIT_MASK constants when calling dma_set_mask() # # Signed-off-by: Tobias Klauser # Signed-off-by: Matthew Wilcox # # - ioremap fixes # # Signed-off-by: Matthew Wilcox # Signed-off-by: James Bottomley # # drivers/scsi/lasi700.c # 2005/03/18 07:03:01-06:00 willy@parisc-linux.org +4 -2 # Misc Lasi 700 fixes # # ChangeSet # 2005/03/19 14:46:29-06:00 axboe@suse.de # [PATCH] queue <-> sdev reference counting problem # # There is a problem with the way sdev is freed currently. The reason is # really that there is a circular referencing problem: the sdev needs to # hold on to the queue, but the queue (through the request function) also # needs to hold on to the sdev. # # The easiest way to work-around this problem is to kill the sdev # reference in the queue when the sdev is freed. On invocation of # scsi_request_fn(), kill io to this device. # # Signed-off-by: Jens Axboe # Signed-off-by: James Bottomley # # drivers/scsi/scsi_sysfs.c # 2005/03/18 05:32:57-06:00 axboe@suse.de +3 -1 # queue <-> sdev reference counting problem # # drivers/scsi/scsi_lib.c # 2005/03/18 05:33:09-06:00 axboe@suse.de +24 -1 # queue <-> sdev reference counting problem # # arch/arm/mach-omap/ocpi.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +26 -24 # [PATCH] 2544/1: OMAP update 6/10: Change OCPI to use clock framework # # ChangeSet # 2005/03/19 14:45:29-06:00 jejb@titanic.il.steeleye.com # atp870u DMA mask fix # # From: Alan Cox # Noted by James Bottomley # # Signed-off-by: Alan Cox # Signed-off-by: James Bottomley # # drivers/scsi/atp870u.c # 2005/03/19 14:45:13-06:00 jejb@titanic.il.steeleye.com +1 -1 # atp870u DMA mask fix # # ChangeSet # 2005/03/19 20:43:23+00:00 tony@com.rmk.(none) # [ARM PATCH] 2546/1: OMAP update 5/10: GPIO interrupt changes # # Patch from Tony Lindgren # # This patch fixes problems with missed GPIO interrupts. FPGA # interrupt handling is also simplified based on the GPIO changes. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # ChangeSet # 2005/03/19 14:39:40-06:00 jejb@titanic.il.steeleye.com # atp870u: Re-merge cleanups # # From: Alan Cox # # This restores the Adrian Bunk and Al Viro cleanups that got trashed in # the driver update. It also fixes a few formatting glitches and adds # cpu_relax() calls to the polls spinning on the controller/bus. # # Signed-off-by: Alan Cox # Signed-off-by: James Bottomley # # drivers/scsi/atp870u.c # 2005/03/19 14:39:25-06:00 jejb@titanic.il.steeleye.com +224 -115 # atp870u: Re-merge cleanups # # arch/arm/mach-omap/gpio.c # 2005/03/14 14:30:34+00:00 tony@com.rmk.(none) +65 -61 # [PATCH] 2546/1: OMAP update 5/10: GPIO interrupt changes # # arch/arm/mach-omap/fpga.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +10 -19 # [PATCH] 2546/1: OMAP update 5/10: GPIO interrupt changes # # ChangeSet # 2005/03/19 20:35:11+00:00 tony@com.rmk.(none) # [ARM PATCH] 2564/1: OMAP update 4/10: Pin multiplexing updates, take 2 # # Patch from Tony Lindgren # # This patch from David Brownell and Nishant Menon adds new pin # configurations. A fix for the mux spinlock is also included. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # include/asm-arm/arch-omap/mux.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +19 -1 # [PATCH] 2564/1: OMAP update 4/10: Pin multiplexing updates, take 2 # # ChangeSet # 2005/03/19 20:28:36+00:00 tony@com.rmk.(none) # [ARM PATCH] 2565/1: OMAP update 3/10: Clock changes, take 2 # # Patch from Tony Lindgren # # This patch by Tuukka Tikkanen and David Brownell updates OMAP # clocks and removes old clocks.h. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # arch/arm/mach-omap/clock.h # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +10 -4 # [PATCH] 2565/1: OMAP update 3/10: Clock changes, take 2 # # arch/arm/mach-omap/clock.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +166 -45 # [PATCH] 2565/1: OMAP update 3/10: Clock changes, take 2 # # BitKeeper/deleted/.del-clocks.h~1d10b69f4f7b4861 # 2005/03/19 20:15:43+00:00 tony@com.rmk.(none) +0 -0 # Delete: include/asm-arm/arch-omap/clocks.h # # ChangeSet # 2005/03/19 20:12:56+00:00 tony@com.rmk.(none) # [ARM PATCH] 2548/1: OMAP update 2/10: Include files # # Patch from Tony Lindgren # # This patch syncs the mainline kernel with the linux-omap tree. # The patch mostly contains minor fixes and extra register definitions # by various OMAP developers. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # include/asm-arm/arch-omap/tc.h # 2005/03/14 14:30:52+00:00 tony@com.rmk.(none) +58 -14 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/param.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +3 -19 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/omap16xx.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +7 -0 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/memory.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +2 -2 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/mcbsp.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +4 -0 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/irqs.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +7 -0 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/hardware.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +40 -70 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/fpga.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +26 -9 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/board-osk.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +3 -5 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/board-innovator.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +3 -4 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/board-h4.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +2 -2 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/board-h3.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +1 -3 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/board-h2.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +3 -5 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/aic23.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +112 -0 # [PATCH] 2548/1: OMAP update 2/10: Include files # # include/asm-arm/arch-omap/aic23.h # 2005/03/14 13:42:04+00:00 tony@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-omap/aic23.h # # ChangeSet # 2005/03/19 19:54:31+00:00 tony@com.rmk.(none) # [ARM PATCH] 2539/1: OMAP update 1/10: Arch files # # Patch from Tony Lindgren # # This patch syncs the mainline kernel with the linux-omap tree. # The patch contains various minor fixes by various OMAP # developers. # # Signed-off-by: Tony Lindgren # Signed-off-by: Russell King # # arch/arm/mach-omap/pm.c # 2005/03/15 16:41:41+00:00 tony@com.rmk.(none) +1 -0 # [PATCH] 2539/1: OMAP update 1/10: Arch files # # arch/arm/mach-omap/dma.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +1 -1 # [PATCH] 2539/1: OMAP update 1/10: Arch files # # arch/arm/mach-omap/common.c # 2005/03/14 13:40:59+00:00 tony@com.rmk.(none) +18 -7 # [PATCH] 2539/1: OMAP update 1/10: Arch files # # ChangeSet # 2005/03/19 20:40:25+01:00 marcel@holtmann.org # [Bluetooth] Make another variable static # # This patch makes another needlessly global variable static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Marcel Holtmann # # net/bluetooth/rfcomm/core.c # 2005/03/19 20:39:27+01:00 marcel@holtmann.org +1 -1 # Make another variable static # # ChangeSet # 2005/03/19 20:37:30+01:00 marcel@holtmann.org # [Bluetooth] Remove now unneeded references to sk_protinfo # # Now that sk_protinfo is not used anymore for storing private # protocol information, we can safely remove the code in the # socket destruct path to free it. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # Signed-off-by: Marcel Holtmann # # net/bluetooth/rfcomm/sock.c # 2005/03/19 20:35:30+01:00 marcel@holtmann.org +0 -3 # Remove now unneeded references to sk_protinfo # # net/bluetooth/sco.c # 2005/03/19 20:35:29+01:00 marcel@holtmann.org +0 -3 # Remove now unneeded references to sk_protinfo # # net/bluetooth/l2cap.c # 2005/03/19 20:35:16+01:00 marcel@holtmann.org +0 -3 # Remove now unneeded references to sk_protinfo # # ChangeSet # 2005/03/19 18:26:40+00:00 dick@com.rmk.(none) # [SERIAL] sealevel 8 port RS-232/RS-422/RS-485 board # # Patch from Dick Hollenbeck # # Vendor Sealevel suggested these changes for its new board. Tried # them, they work with the card. Please apply the patch below, which # was made from 2.6.10 but can be applied to 2.6.11.2 without errors. # # include/linux/pci_ids.h # 2005/03/19 18:20:34+00:00 dick@com.rmk.(none) +1 -0 # [PATCH] sealevel 8 port RS-232/RS-422/RS-485 board # # drivers/serial/8250_pci.c # 2005/03/19 18:20:34+00:00 dick@com.rmk.(none) +3 -0 # [PATCH] sealevel 8 port RS-232/RS-422/RS-485 board # # drivers/pci/pci.ids # 2005/03/19 18:20:32+00:00 dick@com.rmk.(none) +1 -0 # [PATCH] sealevel 8 port RS-232/RS-422/RS-485 board # # ChangeSet # 2005/03/19 16:54:46+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2557/1: S3C2410 - fix otom/nexcoder buiilds due to sparse fixes # # Patch from Ben Dooks # # These two machines where missed out when updating # for sparse fixes, return them to building correctly. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/mach-otom.c # 2005/03/17 23:01:59+00:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2557/1: S3C2410 - fix otom/nexcoder buiilds due to sparse fixes # # arch/arm/mach-s3c2410/mach-nexcoder.c # 2005/03/17 23:02:36+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2557/1: S3C2410 - fix otom/nexcoder buiilds due to sparse fixes # # ChangeSet # 2005/03/19 16:39:44+00:00 rmk@flint.arm.linux.org.uk # [MMC] SD support : protocol # # Patch from Pierre Ossman # # Protocol definitions. # # The basic commands needed for the later patches. The R1_APP_CMD seems # to be misdefined in protocol.h so this patch changes it. # # include/linux/mmc/protocol.h # 2005/03/19 16:34:06+00:00 rmk@flint.arm.linux.org.uk +11 -1 # [PATCH] SD support : protocol # # include/linux/mmc/mmc.h # 2005/03/19 16:34:06+00:00 rmk@flint.arm.linux.org.uk +1 -0 # [PATCH] SD support : protocol # # ChangeSet # 2005/03/19 16:22:50+00:00 afong@org.rmk.(none) # [SERIAL] 8250/sbc8560 bug/fix # # Patch from Amy Fong # # On the sbc8560 platform, changes were introduced as of 2.6.10-rc2 # which caused the sbc8560 to splutter noise all over the serial # console. It seems that ALPHA_KLUDGE_MCR was mulitply and differently # defined in both drivers/serial/8250.h and include/linux/serialP.h # # Below is a patch that clones the definition of ALPHA_KLUDGE_MCR from # serialP.h, it has been tested and works on the sbc8560. # # drivers/serial/8250.h # 2005/03/19 16:17:38+00:00 afong@org.rmk.(none) +7 -0 # [PATCH] 8250/sbc8560 bug/fix # # ChangeSet # 2005/03/19 16:11:36+00:00 alex.williamson@com.rmk.(none) # [SERIAL] new hp diva console port # # Patch from Alex Williamson # # The patch below adds IDs and setup for a new PCI Diva console port. # This device provides a single UART described by PCI Bar 1. ID already # submitted to pciids.sf.net. # # Signed-off-by: Alex Williamson # # include/linux/pci_ids.h # 2005/03/19 16:06:09+00:00 alex.williamson@com.rmk.(none) +1 -0 # [PATCH] new hp diva console port # # drivers/serial/8250_pci.c # 2005/03/19 16:06:08+00:00 alex.williamson@com.rmk.(none) +3 -0 # [PATCH] new hp diva console port # # drivers/pci/pci.ids # 2005/03/19 16:06:07+00:00 alex.williamson@com.rmk.(none) +1 -0 # [PATCH] new hp diva console port # # ChangeSet # 2005/03/19 09:23:19+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2563/1: RiscPC - update IOMEM annotations # # Patch from Ben Dooks # # Fixes `iomem` annotations on a number of parts # of the arch-rpc build, including IO_BASE, IOC_BASE # and IOMD_BASE. # Changed the include/asm-arm/arch-rpc/io.h and hardware.h # to reflect this, and fixed-up the build problems # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-rpc/io.h # 2005/03/18 00:31:18+00:00 ben-linux@org.rmk.(none) +4 -4 # [PATCH] 2563/1: RiscPC - update IOMEM annotations # # include/asm-arm/arch-rpc/hardware.h # 2005/03/18 00:29:35+00:00 ben-linux@org.rmk.(none) +11 -5 # [PATCH] 2563/1: RiscPC - update IOMEM annotations # # arch/arm/mach-rpc/riscpc.c # 2005/03/18 00:32:41+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2563/1: RiscPC - update IOMEM annotations # # arch/arm/mach-rpc/dma.c # 2005/03/18 00:24:14+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2563/1: RiscPC - update IOMEM annotations # # arch/arm/kernel/ecard.c # 2005/03/18 00:32:05+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2563/1: RiscPC - update IOMEM annotations # # ChangeSet # 2005/03/19 09:16:10+00:00 nico@org.rmk.(none) # [ARM PATCH] 2552/2: woops # # Patch from Nicolas Pitre # # argh! # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/kernel/ptrace.c # 2005/03/19 00:00:00+00:00 nico@org.rmk.(none) +1 -1 # [PATCH] 2552/2: woops # # ChangeSet # 2005/03/19 09:07:26+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2562/2: CL7500 - iomem fixes # # Patch from Ben Dooks # # Fixes for iomem annotations in include/asm-arm/arch-cl7500/hardware.h # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-cl7500/hardware.h # 2005/03/18 00:08:53+00:00 ben-linux@org.rmk.(none) +11 -6 # [PATCH] 2562/2: CL7500 - iomem fixes # # ChangeSet # 2005/03/19 01:32:29-06:00 stevef@smf-t23.(none) # [CIFS] remove redundant null pointer checks before kfrees # # Signed-off-by: Jesper Juhl (juhl-lkml@dif.dk) # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/file.c # 2005/03/19 01:32:12-06:00 stevef@smf-t23.(none) +6 -12 # remove redundant null pointer checks before kfrees # # ChangeSet # 2005/03/19 01:15:34-06:00 stevef@smf-t23.(none) # [CIFS] whitespace cleanups and source formatting improvements # # Signed-off-by: Jesper Juhl (juhl-lkml@dif.dk) # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/file.c # 2005/03/19 01:15:13-06:00 stevef@smf-t23.(none) +169 -125 # whitespace cleanups # # ChangeSet # 2005/03/19 00:50:27-06:00 stevef@smf-t23.(none) # [CIFS] remove sparse warnings # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/cifsfs.c # 2005/03/19 00:50:05-06:00 stevef@smf-t23.(none) +7 -0 # remove sparse warnings # # ChangeSet # 2005/03/18 22:11:36-08:00 gregkh@suse.de # Linux 2.6.11.5 # TAG: v2.6.11.5 # # Makefile # 2005/03/18 22:11:25-08:00 gregkh@suse.de +1 -1 # Linux 2.6.11.5 # # ChangeSet # 2005/03/18 21:47:12-08:00 khc@pm.waw.pl # [PATCH] Fix kernel panic on receive with WAN Hitachi SCA HD6457x # # Another patch for 2.6.11.x: already in main tree, fixes kernel panic on # receive with WAN cards based on Hitachi SCA/SCA-II: N2, C101, PCI200SYN. # The attached patch fixes NULL pointer dereference on RX. # # Signed-off-by: Krzysztof Halasa # Acked-by: Jeff Garzik # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # drivers/net/wan/hd6457x.c # 2005/02/28 16:58:08-08:00 khc@pm.waw.pl +1 -1 # Fix kernel panic on receive with WAN Hitachi SCA HD6457x # # ChangeSet # 2005/03/18 21:43:33-08:00 dilinger@debian.org # [PATCH] Possible VIA-Rhine free irq issue # # It seems to me that in the VIA Rhine device driver the requested irq might # not be freed in case the alloc_ring() function fails. alloc_ring() # can fail with a ENOMEM return value because of possible # pci_alloc_consistent() failures. # # Updated to CodingStyle. # # Signed-off-by: Jeff Garzik # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # drivers/net/via-rhine.c # 2005/03/11 15:18:25-08:00 dilinger@debian.org +3 -1 # Possible VIA-Rhine free irq issue # # ChangeSet # 2005/03/18 21:41:52-08:00 hugh@veritas.com # [PATCH] tasklist left locked # # On 4-way SMP, about one reboot in twenty hangs while killing processes: # exit needs exclusive tasklist_lock, but something still holds read_lock. # do_signal_stop race case misses unlock, and fixing it fixes the symptom. # # Signed-off-by: Hugh Dickins # Acked-by: Roland McGrath # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # kernel/signal.c # 2005/03/16 10:10:17-08:00 hugh@veritas.com +1 -0 # tasklist left locked # # ChangeSet # 2005/03/18 21:40:56-08:00 shemminger@osdl.org # [PATCH] : Fix check for underflow # # http://bugme.osdl.org/show_bug.cgi?id=4279 # Summary: When I try to start vpnc the net/core/skbuff.c:91 crash # # This check is wrong, gcc optimizes it away: # # if ((len -= sizeof(pi)) > len) # return -EINVAL; # # This could be responsible for the BUG. If len is 2 or 3 and TUN_NO_PI # isn't set it underflows. alloc_skb() allocates len + 2, which is 0 or # 1 byte. skb_reserve tries to reserve 2 bytes and things explode in # skb_put. # # [TUN]: Fix check for underflow # # Signed-off-by: Patrick McHardy # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # drivers/net/tun.c # 2005/03/04 10:41:56-08:00 shemminger@osdl.org +1 -1 # : Fix check for underflow # # ChangeSet # 2005/03/18 21:39:03-08:00 davem@davemloft.net # [PATCH] [IPSEC]: Fix __xfrm_find_acq_byseq() # # This function, as it's name implies, is supposed to only # return IPSEC objects which are in the XFRM_STATE_ACQ # ("acquire") state. But it returns any object with the # matching sequence number. # # This is wrong and confuses IPSEC daemons to no end. # # [XFRM]: xfrm_find_acq_byseq should only return XFRM_STATE_ACQ states. # # Signed-off-by: Patrick McHardy # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # net/xfrm/xfrm_state.c # 2005/03/16 14:27:04-08:00 davem@davemloft.net +1 -1 # [IPSEC]: Fix __xfrm_find_acq_byseq() # # ChangeSet # 2005/03/18 21:37:15-08:00 kaber@trash.net # [PATCH] Fix crash while reading /proc/net/route # # [IPV4]: Fix crash while reading /proc/net/route caused by stale pointers # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # net/ipv4/fib_hash.c # 2005/03/16 15:58:42-08:00 kaber@trash.net +11 -1 # Fix crash while reading /proc/net/route # # ChangeSet # 2005/03/18 21:32:44-08:00 dilinger@debian.org # [PATCH] Possible AMD8111e free irq issue # # It seems to me that if in the amd8111e_open() fuction dev->irq isn't # zero and the irq request succeeds it might not get released anymore. # # Specifically, on failure of the amd8111e_restart() call the function # returns -ENOMEM without releasing the irq. The amd8111e_restart() # function can fail because of various pci_alloc_consistent() and # dev_alloc_skb() calls in amd8111e_init_ring() which is being # called by amd8111e_restart. # # 1374 if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, # 1375 dev->name, dev)) # 1376 return -EAGAIN; # # Signed-off-by: Jeff Garzik # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # drivers/net/amd8111e.c # 2005/03/09 20:29:47-08:00 dilinger@debian.org +2 -0 # Possible AMD8111e free irq issue # # ChangeSet # 2005/03/18 21:32:08-08:00 dsd@gentoo.org # [PATCH] Fix stereo mutes on Surround volume control # # As of 2.6.11, I have no output out of the rear right speaker of my 4.1 # surround sound setup. I am using snd-intel8x0 based on a Realtek ALC650F chip # on an nvidia motherboard. # # A gentoo user with completely different hardware also ran into this: # http://bugs.gentoo.org/84276 # # 2.6.11-mm3 fixes this problem and I've identified the specific fix, which is # already in the ALSA development tree. An ALSA developer asked me to submit the # fix for 2.6.11.x when I'd found it, so here it is :) # # -- # AC97 Codec # Fix stereo mutes on Surround volume control. # # Signed-off-by: Takashi Iwai # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # sound/pci/ac97/ac97_codec.c # 2005/03/14 08:24:04-08:00 dsd@gentoo.org +8 -5 # Fix stereo mutes on Surround volume control # # ChangeSet # 2005/03/18 21:30:08-08:00 ralf@linux-mips.org # [PATCH] NetROM locking # # Fix deadlock in NetROM due to double locking. I was sent the patch by # Alan and have doublechecked it. This bug hits Net/ROM users really hard. # It's accepted by DaveM - but just too late to make it into 2.6.11. # # Signed-off-by: Ralf Baechle # Signed-off-by: Chris Wright # Signed-off-by: Greg Kroah-Hartman # # net/netrom/nr_in.c # 2005/02/05 14:16:26-08:00 ralf@linux-mips.org +0 -9 # NetROM locking # # ChangeSet # 2005/03/18 22:52:54-06:00 stevef@smf-t23.(none) # [CIFS] handle passwords with multiple commas in them # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/connect.c # 2005/03/18 22:52:37-06:00 stevef@smf-t23.(none) +25 -9 # handle passwords with multiple commas in them # # fs/cifs/CHANGES # 2005/03/18 22:52:37-06:00 stevef@smf-t23.(none) +1 -0 # handle passwords with multiple commas in them # # ChangeSet # 2005/03/18 15:17:04-08:00 tony.luck@intel.com # [IA64] Another fix for pgd_addr_end (last one was wrong). # # I confused the hole in the middle of a region when an implementation of # the Itanium architecture doesn't implement all the virtual address bits # with the actual layout in Linux. Linux doesn't put a hole in the middle # of the region, it stacks all the address space that the page tables can # reference at the start of the region. # # Thanks to Dave Miller (again) and Peter Chubb. # # Signed-off-by: Tony Luck # # include/asm-ia64/pgtable.h # 2005/03/18 15:12:20-08:00 tony.luck@intel.com +15 -5 # Another fix for pgd_addr_end (last one was wrnog). # # ChangeSet # 2005/03/18 15:08:47-08:00 stern@rowland.harvard.edu # [PATCH] USBcore updates # # This is the first of five updates to usbcore: # # Merge the hcd_register_root macro with the usb_register_root_hub # function. This is part of the ongoing campaign to flatten out # the hcd glue layer. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2005/03/18 14:22:27-08:00 stern@rowland.harvard.edu +1 -1 # USBcore updates # # drivers/usb/host/sl811-hcd.c # 2005/03/18 14:22:27-08:00 stern@rowland.harvard.edu +1 -1 # USBcore updates # # drivers/usb/host/ohci-hcd.c # 2005/03/18 14:22:27-08:00 stern@rowland.harvard.edu +1 -1 # USBcore updates # # drivers/usb/host/ehci-hcd.c # 2005/03/18 14:22:27-08:00 stern@rowland.harvard.edu +1 -1 # USBcore updates # # drivers/usb/gadget/dummy_hcd.c # 2005/03/18 14:22:27-08:00 stern@rowland.harvard.edu +1 -1 # USBcore updates # # drivers/usb/core/hcd.h # 2005/03/18 14:22:27-08:00 stern@rowland.harvard.edu +2 -19 # USBcore updates # # drivers/usb/core/hcd.c # 2005/03/18 14:23:34-08:00 stern@rowland.harvard.edu +15 -6 # USBcore updates # # ChangeSet # 2005/03/18 13:56:40-08:00 olh@suse.de # [PATCH] USB: another broken usb floppy # # Signed-off-by: Olaf Hering # Signed-off-by: Phil Dibowitz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2005/03/18 13:53:59-08:00 olh@suse.de +7 -0 # USB: another broken usb floppy # # ChangeSet # 2005/03/18 13:51:56-08:00 phil@ipom.com # [PATCH] USB unusual_devs: add another datafab device # # The following was reported by Josef Reisinger # . This entry allows the device to be # found and prevents it from showing up twice. # # Signed-off-by: Phil Dibowitz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2005/01/01 22:31:04-08:00 phil@ipom.com +7 -0 # USB unusual_devs: add another datafab device # # ChangeSet # 2005/03/18 13:51:36-08:00 phil@ipom.com # [PATCH] USB unusual_devs: Add another Tekom entry # # This patch adds support for Another "Tekom 300" camera - or more # specifically a BenQ DC5330. # # Versions of this patch were submitted by both Frank Copeland # and Manuel Fombuena - but # neither were quite right, so I've tweaked it accordingly. # # Signed-off-by: Phil Dibowitz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2005/03/13 21:18:47-08:00 phil@ipom.com +9 -0 # USB unusual_devs: Add another Tekom entry # # ChangeSet # 2005/03/18 13:51:17-08:00 gmenguez@usuarios.retecal.es # [PATCH] USB: Support for new ipod mini (and possibly others) + usb # # Just a little patch to unusual_devs.h in usb-storage in order to support # new ipods mini (ie. the new 6 gig model) and possibly other new big # models reported to have problems through usb in linux 2.6. # # # From: Guillermo Menguez Alvarez # Signed-off-by: Phil Dibowitz # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2005/03/12 06:54:43-08:00 gmenguez@usuarios.retecal.es +6 -0 # USB: Support for new ipod mini (and possibly others) + usb # # ChangeSet # 2005/03/18 13:46:48-08:00 schwidefsky@de.ibm.com # [PATCH] s390: oprofile support # # Remove experimental tag from the s390 oprofile support. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/oprofile/Kconfig # 2005/03/18 12:55:19-08:00 schwidefsky@de.ibm.com +2 -3 # s390: oprofile support # # ChangeSet # 2005/03/18 13:46:29-08:00 ptiedem@de.ibm.com # [PATCH] s390: ctc buffer size # # ctc network driver changes: # - Allow to change the ctc buffer size while ctc is offline. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/ctcmain.c # 2005/03/18 12:55:19-08:00 ptiedem@de.ibm.com +11 -7 # s390: ctc buffer size # # ChangeSet # 2005/03/18 13:46:10-08:00 schwidefsky@de.ibm.com # [PATCH] s390: missing timer ticks # # s390 core changes: # - Fix missing timer ticks. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/cio/cio.c # 2005/03/18 12:55:19-08:00 schwidefsky@de.ibm.com +5 -1 # s390: missing timer ticks # # arch/s390/kernel/time.c # 2005/03/18 12:55:19-08:00 schwidefsky@de.ibm.com +10 -1 # s390: missing timer ticks # # arch/s390/kernel/s390_ext.c # 2005/03/18 12:55:19-08:00 schwidefsky@de.ibm.com +4 -0 # s390: missing timer ticks # # ChangeSet # 2005/03/18 13:45:52-08:00 holzheu@de.ibm.com # [PATCH] s390: s390dbf permissions # # Use more specific permissions for the procfiles if s390dbf. Read only views # should have read permission, write only views should have write permission. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/debug.c # 2005/03/18 12:55:19-08:00 holzheu@de.ibm.com +5 -5 # s390: s390dbf permissions # # ChangeSet # 2005/03/18 13:45:31-08:00 cohuck@de.ibm.com # [PATCH] s390: device unregistering # # Common i/o layer changes: # - Don't unregister devices from ccw_device_{on,off}line_notoper directly, # but put the unregister on the ccw_device_work workqueue (as it is done # for all other unregisters). # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/cio/device_fsm.c # 2005/03/18 12:55:18-08:00 cohuck@de.ibm.com +10 -6 # s390: device unregistering # # ChangeSet # 2005/03/18 13:45:12-08:00 schwidefsky@de.ibm.com # [PATCH] s390: add run_posix_cpu_timers to account_user_vtime # # The posix-timers patch introduces a call to run_posix_cpu_timers in # update_process_times. The same call is required in the s390 private # account_user_vtime function as well. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/vtime.c # 2005/03/18 12:55:18-08:00 schwidefsky@de.ibm.com +2 -0 # s390: add run_posix_cpu_timers to account_user_vtime # # ChangeSet # 2005/03/18 13:44:55-08:00 schwidefsky@de.ibm.com # [PATCH] s390: define atomic_sub_return # # Add missing atomic_sub_return for skb_release_data. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/atomic.h # 2005/03/18 12:55:18-08:00 schwidefsky@de.ibm.com +4 -0 # s390: define atomic_sub_return # # ChangeSet # 2005/03/18 13:44:36-08:00 schwidefsky@de.ibm.com # [PATCH] s390: system calls # # s390 system call fixes: # - Add missing waitid and remap_file_pages system calls to s390. # - Keep consistent naming scheme xxx_wrapper in compat_wrapper.S. # - Remove #undef of __NR_getdents64 for 64 bit. The system call is # present for 64 bit (linux_getdents and linux_getdents64 differ). # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/unistd.h # 2005/03/18 12:55:18-08:00 schwidefsky@de.ibm.com +3 -3 # s390: system calls # # arch/s390/kernel/syscalls.S # 2005/03/18 12:55:18-08:00 schwidefsky@de.ibm.com +4 -3 # s390: system calls # # arch/s390/kernel/compat_wrapper.S # 2005/03/18 12:55:18-08:00 schwidefsky@de.ibm.com +22 -4 # s390: system calls # # ChangeSet # 2005/03/18 13:44:18-08:00 juhl-lkml@dif.dk # [PATCH] mips: convert a remaining verify_area to access_ok # # Signed-off-by: Jesper Juhl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-mips/uaccess.h # 2005/03/18 12:55:18-08:00 juhl-lkml@dif.dk +4 -2 # mips: convert a remaining verify_area to access_ok # # ChangeSet # 2005/03/18 13:44:00-08:00 paulus@samba.org # [PATCH] ppc64: allow xmon=on,off,early # # allow 'xmon' or 'xmon=early' to enter xmon very early during boot. allow # 'xmon=on' to just enable it, or 'xmon=off' to disable it. # # Signed-off-by: Olaf Hering # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/setup.c # 2005/03/18 12:55:18-08:00 paulus@samba.org +6 -0 # ppc64: allow xmon=on,off,early # # ChangeSet # 2005/03/18 13:43:42-08:00 paulus@samba.org # [PATCH] ppc64: fix error cases in nvram partition scan # # The NVRAM on pSeries machines and powermacs is structured as a series of # partitions, each of which has a header containing its length (including the # header) and a header checksum. When the checksum was wrong or the length # was zero, we would previously keep trying to scan through the partitions, # possibly looping forever if the length was zero. This patch changes the # behaviour to terminate the scan when a corrupted partition is found. # # Signed-off-by: Utz Bacher # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/nvram.c # 2005/03/18 12:55:17-08:00 paulus@samba.org +22 -12 # ppc64: fix error cases in nvram partition scan # # ChangeSet # 2005/03/18 13:43:21-08:00 paulus@samba.org # [PATCH] ppc64: remove unnecessary ISA ioports # # During boot, pSeries_request_regions() should only request I/O ports for # legacy ISA in the case that ISA exists on the system. Add a check for # this. This patch was suggested by Anton. # # Signed-off-by: John Rose # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_pci.c # 2005/03/18 12:55:17-08:00 paulus@samba.org +3 -0 # ppc64: remove unnecessary ISA ioports # # ChangeSet # 2005/03/18 13:43:04-08:00 paulus@samba.org # [PATCH] ppc64: make cpu hotplug play well with maxcpus and smt-enabled # # This patch allows you to boot a pSeries system with maxcpus=x or # smt-enabled=off (or both) and bring up the offline cpus later from userspace, # assuming the kernel was built with CONFIG_HOTPLUG_CPU=y. # # - Record cpus which were started from OF in a cpu map and use that instead # of system_state to decide how to start a cpu in smp_startup_cpu. # # - Change the smp bootup logic slightly so that the path for bringing up # secondary threads is exactly the same as hotplugging a cpu later from # userspace. # # - Add a new function to smp_ops - cpu_bootable. This is implemented only by # pSeries to filter out secondary threads during boot with smt-enabled=off. # Another way this could be done is to change the kick_cpu member to return # int and we can check for this case in smp_pSeries_kick_cpu. # # - Remove the games we play with cpu_present_map and the # hard_smp_processor_id to handle smt-enabled=off, since they're now # unnecessary. # # - Remove find_physical_cpu_to_start; assigning threads to logical slots # should be done at bootup and at DLPAR time, not during a cpu online # operation. # # One caveat: you need up-to-date firmware on Power5 for the maxcpus option to # work on systems with more than one processor. Otherwise interrupts get # misrouted, typically resulting in hangs or "unable to find root filesystem" # problems. # # Tested on Power5 with and without CONFIG_HOTPLUG_CPU and with various # combinations of the maxcpus= and smt-enabled= parameters. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/machdep.h # 2005/03/18 12:55:17-08:00 paulus@samba.org +1 -0 # ppc64: make cpu hotplug play well with maxcpus and smt-enabled # # arch/ppc64/kernel/smp.c # 2005/03/18 12:55:17-08:00 paulus@samba.org +2 -11 # ppc64: make cpu hotplug play well with maxcpus and smt-enabled # # arch/ppc64/kernel/setup.c # 2005/03/18 12:55:50-08:00 paulus@samba.org +3 -9 # ppc64: make cpu hotplug play well with maxcpus and smt-enabled # # arch/ppc64/kernel/pSeries_smp.c # 2005/03/18 12:55:17-08:00 paulus@samba.org +72 -111 # ppc64: make cpu hotplug play well with maxcpus and smt-enabled # # ChangeSet # 2005/03/18 13:42:41-08:00 paulus@samba.org # [PATCH] ppc64: use pSeries reconfig notifier for cpu DLPAR # # Use the pSeries_reconfig notifier API to handle processor addition and removal # on pSeries LPAR. This is the "right" way to do it, as opposed to setting # cpu_present_map = cpu_possible_map at boot (this is fixed in a following # patch). # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_smp.c # 2005/03/18 12:55:50-08:00 paulus@samba.org +126 -0 # ppc64: use pSeries reconfig notifier for cpu DLPAR # # ChangeSet # 2005/03/18 13:42:16-08:00 olh@suse.de # [PATCH] ppc64: missing newline/carrige return in zImage # # Some eyecandy for zImage and zImage.initrd. # # Most OF implementations do not print a newline after their last line of # output, so the "zImage starting..." appears right after the last number or # netboot output. # # A zImage.initrd misses a carrige return to avoid a staircase effect. # # Tested on JS20. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/boot/main.c # 2005/03/18 12:55:16-08:00 olh@suse.de +2 -2 # ppc64: missing newline/carrige return in zImage # # ChangeSet # 2005/03/18 13:41:56-08:00 benh@kernel.crashing.org # [PATCH] ppc64: thermal control for Xserve # # This patch adds support for Xserve G5 to the thermal control driver. It # also adds a few updates to the desktop G5 code based from changes Apple did # to their own drivers. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/therm_pm72.h # 2005/03/18 12:55:15-08:00 benh@kernel.crashing.org +54 -22 # ppc64: thermal control for Xserve # # drivers/macintosh/therm_pm72.c # 2005/03/18 12:55:15-08:00 benh@kernel.crashing.org +427 -61 # ppc64: thermal control for Xserve # # ChangeSet # 2005/03/18 13:41:39-08:00 kravetz@us.ibm.com # [PATCH] ppc64: NUMA memory fixup (another try) # # Below is a new version of the patch that allows holes within nodes on ppc64 # NUMA. I would appreciate it if someone familiar with OF device tree # parsing could take a look at this part of the code. So far, I've gotten # this wrong twice. Patch was tested in various configurations on a G5 and # OpenPower 720. # # Signed-off-by: Mike Kravetz # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/numa.c # 2005/03/18 12:55:15-08:00 kravetz@us.ibm.com +104 -67 # ppc64: NUMA memory fixup (another try) # # ChangeSet # 2005/03/18 13:41:20-08:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries: cleanup iSeries_setup # # This patch does some trivial cleanups on iSeries_setup.[ch]: # - eliminiate warning about iommu_init_early_iSeries not being # declared # - remove trailing whitespace # - change some functions to static # - remove defunct function declarations # # Built and booted on iSeries. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/iSeries_setup.h # 2005/03/18 12:55:15-08:00 sfr@canb.auug.org.au +0 -11 # ppc64 iSeries: cleanup iSeries_setup # # arch/ppc64/kernel/iSeries_setup.c # 2005/03/18 12:55:15-08:00 sfr@canb.auug.org.au +40 -42 # ppc64 iSeries: cleanup iSeries_setup # # ChangeSet # 2005/03/18 13:41:02-08:00 sfr@canb.auug.org.au # [PATCH] ppc64 iSeries: cleanup viopath # # I figured I might as well do some simple cleanups. This patch does: # # - single bit int bitfields are a bit suspect and Anndrew pointed out # recently that they are probably slower to access than ints # # - get rid of some more studly caps # # - define the semaphore and the atomic in struct alloc_parms rather than # pointers to them since we just allocate them on the stack anyway. # # - one small white space cleanup # # - use the HvLpIndexInvalid constant instead of ita value # # Built and booted on iSeries (which is the only place it is used). # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/viopath.c # 2005/03/18 12:55:15-08:00 sfr@canb.auug.org.au +22 -25 # ppc64 iSeries: cleanup viopath # # ChangeSet # 2005/03/18 13:40:44-08:00 paulus@samba.org # [PATCH] ppc64: delete unused file iSeries_fixup.h # # This patch is from Domen Puncer . # # Remove nowhere referenced file. (egrep "filename\." didn't find anything) # # Signed-off-by: Domen Puncer # Acked-by: Stephen Rothwell # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-iSeries_fixup.h~69300e6725c4479 # 2005/03/18 13:40:32-08:00 paulus@samba.org +0 -0 # Delete: include/asm-ppc64/iSeries/iSeries_fixup.h # # ChangeSet # 2005/03/18 13:40:25-08:00 paulus@samba.org # [PATCH] ppc64: delete unused file no_initrd.c # # This patch is from Domen Puncer . # # Remove nowhere referenced file. (egrep "filename\." didn't find anything) # # Signed-off-by: Domen Puncer # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2005/03/18 13:40:24-08:00 clemens@ladisch.de # [PATCH] emi26: add another product ID for the Emi2|6/A26 # # This adds the product ID for another hardware revision of the Emi 2|6. # Except for the ID, this device behaves the same and uses the same # firmware. # # Signed-off-by: Clemens Ladisch # Signed-off-by: Greg Kroah-Hartman # # BitKeeper/deleted/.del-no_initrd.c~c32da4b842103bb3 # 2005/03/18 13:40:14-08:00 paulus@samba.org +0 -0 # Delete: arch/ppc64/boot/no_initrd.c # # drivers/usb/misc/emi26.c # 2005/03/12 09:19:39-08:00 clemens@ladisch.de +2 -0 # emi26: add another product ID for the Emi2|6/A26 # # ChangeSet # 2005/03/18 13:40:06-08:00 paulus@samba.org # [PATCH] ppc64: make RTAS code usable on non-pSeries machines # # This patch is from Arnd Bergmann . # # RTAS is not actually pSeries specific, but some PPC64 code that relies on RTAS # is currently protected by CONFIG_PPC_PSERIES. # # This introduces a generic configuration option PPC_RTAS that can be used by # other subarchitectures as well. The existing option with the same name is # renamed to the more specific RTAS_PROC. # # Signed-off-by: Arnd Bergmann # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/oprofile/op_model_power4.c # 2005/03/18 12:55:14-08:00 paulus@samba.org +1 -1 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/kernel/setup.c # 2005/03/18 12:55:50-08:00 paulus@samba.org +2 -2 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/kernel/rtc.c # 2005/03/18 12:55:14-08:00 paulus@samba.org +1 -1 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/kernel/prom.c # 2005/03/18 12:55:51-08:00 paulus@samba.org +2 -2 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/kernel/misc.S # 2005/03/18 12:55:14-08:00 paulus@samba.org +1 -1 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/kernel/entry.S # 2005/03/18 12:55:14-08:00 paulus@samba.org +2 -2 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/kernel/Makefile # 2005/03/18 12:55:51-08:00 paulus@samba.org +1 -1 # ppc64: make RTAS code usable on non-pSeries machines # # arch/ppc64/Kconfig # 2005/03/18 12:55:14-08:00 paulus@samba.org +8 -3 # ppc64: make RTAS code usable on non-pSeries machines # # ChangeSet # 2005/03/18 13:39:47-08:00 paulus@samba.org # [PATCH] ppc64: kill might_sleep() warnings in __copy_*_user_inatomic # # This patch is from Arnd Bergmann and Olof Johansson. # # This implements the __copy_{to,from}_user_inatomic() functions on ppc64. The # only difference between the inatomic and regular version is that inatomic does # not call might_sleep() to detect possible faults while holding locks/elevated # preempt counts. # # Signed-off-by: Arnd Bergmann # Acked-by: Olof Johansson # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/uaccess.h # 2005/03/18 12:55:14-08:00 paulus@samba.org +19 -8 # ppc64: kill might_sleep() warnings in __copy_*_user_inatomic # # ChangeSet # 2005/03/18 13:39:27-08:00 paulus@samba.org # [PATCH] ppc64: fix kprobes calling smp_processor_id when preemptible # # When booting with kprobes and preemption both enabled and # CONFIG_DEBUG_PREEMPT=y, I get lots of warnings about smp_processor_id being # called in preemptible code, from kprobe_exceptions_notify. On ppc64, # interrupts and preemption are not disabled in the handlers for most # synchronous exceptions such as breakpoints and page faults (interrupts are # disabled in the very early exception entry code but are reenabled before # calling the C handler). # # This patch adds a preempt_disable/enable pair to kprobe_exceptions_notify, # and moves the preempt_disable() in kprobe_handler() to be done only in the # case where we are about to single-step an instruction. This eliminates the # bug warnings. # # From: Ananth N Mavinakayanahalli # # The patch is fine, but it seems to break jprobes - we have an unbalanced # preempt_enable/disable path while handling jprobes. Patch below is # against 2.6.11-mm4 and fixes the issue. # # Signed-off-by: Paul Mackerras # Signed-off-by: Ananth N Mavinakayanahalli # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/kprobes.c # 2005/03/18 12:51:48-08:00 paulus@samba.org +17 -9 # ppc64: fix kprobes calling smp_processor_id when preemptible # # ChangeSet # 2005/03/18 13:39:10-08:00 waite@skycomputers.com # [PATCH] ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # The Sky Computers HDPU compute blade is an embedded compute platform for # the Sky Computers SMARTpac 600/1200 series. The blade consists of # ppc7445/ppc7447A UP or SMP, Marvell Discovery II, 100 BaseT ethernet, a # single PCI/PCI-X slot, and a PCI-X on-board Infiniband device. # # This patch contains drivers for enhanced features of the HDPU compute # blade. Namely, 2 drivers for registers used by the Health monitoring # co-processor. The cpustate register is a write only register used to # convey critical states to the health monitor and the nexus registers # provides a read-only interface from the health monitoring system to provide # location based information. # # Signed-off-by: Brian Waite # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/hdpu_features.h # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +26 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # drivers/misc/hdpuftrs/hdpu_nexus.c # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +111 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # drivers/misc/hdpuftrs/Makefile # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +1 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # include/linux/hdpu_features.h # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/hdpu_features.h # # drivers/misc/hdpuftrs/hdpu_nexus.c # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/misc/hdpuftrs/hdpu_nexus.c # # drivers/misc/hdpuftrs/Makefile # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/misc/hdpuftrs/Makefile # # drivers/misc/Makefile # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +1 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # arch/ppc/platforms/hdpu.c # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +78 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # arch/ppc/Kconfig # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +6 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # drivers/misc/hdpuftrs/hdpu_cpustate.c # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +234 -0 # ppc32: add support for Sky Computers HDPU Compute blade enhanced features # # drivers/misc/hdpuftrs/hdpu_cpustate.c # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/misc/hdpuftrs/hdpu_cpustate.c # # ChangeSet # 2005/03/18 13:38:51-08:00 ntl@pobox.com # [PATCH] ppc64: rtasd shouldn't hold cpucontrol while sleeping # # The rtasd thread should not hold the cpucontrol semaphore while sleeping # between event scans in its first pass; it needlessly delays boot by one # second per cpu when CONFIG_HOTPLUG_CPU=y. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/rtasd.c # 2005/03/18 12:51:33-08:00 ntl@pobox.com +30 -31 # ppc64: rtasd shouldn't hold cpucontrol while sleeping # # ChangeSet # 2005/03/18 13:38:22-08:00 waite@skycomputers.com # [PATCH] ppc32: add support for Sky Computers HDPU Compute blade # # The Sky Computers HDPU compute blade is an embedded compute platform for # the Sky Computers SMARTpac 600/1200 series. A blade consists of # ppc7445/ppc7447A, Marvell Discovery II, 100 BaseT ethernet, a single # PCI/PCI-X slot, and a PCI-X on-board Infiniband device. # # This patch contains the base platform support required for booting Linux. # # Signed-off-by: Brian Waite # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/hdpu.h # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +82 -0 # ppc32: add support for Sky Computers HDPU Compute blade # # arch/ppc/platforms/hdpu.c # 2005/03/18 12:55:53-08:00 waite@skycomputers.com +994 -0 # ppc32: add support for Sky Computers HDPU Compute blade # # arch/ppc/syslib/Makefile # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +1 -0 # ppc32: add support for Sky Computers HDPU Compute blade # # arch/ppc/platforms/hdpu.h # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/hdpu.h # # arch/ppc/platforms/hdpu.c # 2005/03/18 12:55:53-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/hdpu.c # # arch/ppc/platforms/Makefile # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +1 -0 # ppc32: add support for Sky Computers HDPU Compute blade # # arch/ppc/configs/hdpu_defconfig # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +890 -0 # ppc32: add support for Sky Computers HDPU Compute blade # # arch/ppc/Kconfig # 2005/03/18 12:55:53-08:00 waite@skycomputers.com +6 -1 # ppc32: add support for Sky Computers HDPU Compute blade # # arch/ppc/configs/hdpu_defconfig # 2005/03/18 12:51:33-08:00 waite@skycomputers.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/configs/hdpu_defconfig # # ChangeSet # 2005/03/18 13:37:48-08:00 tnt@246tNt.com # [PATCH] ppc32: sparse clean ups for the Freescale MPC52xx related code # # These clean-ups are mainly missing __iomem qualifier, unnecessary (and # 'wrong') casting, missing static. # # Signed-off-by: Sylvain Munaut # Acked-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/mpc52xx_uart.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +6 -6 # ppc32: sparse clean ups for the Freescale MPC52xx related code # # arch/ppc/syslib/mpc52xx_setup.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +13 -13 # ppc32: sparse clean ups for the Freescale MPC52xx related code # # arch/ppc/syslib/mpc52xx_pic.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +9 -14 # ppc32: sparse clean ups for the Freescale MPC52xx related code # # arch/ppc/platforms/mpc5200.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +1 -1 # ppc32: sparse clean ups for the Freescale MPC52xx related code # # arch/ppc/platforms/lite5200.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +3 -4 # ppc32: sparse clean ups for the Freescale MPC52xx related code # # arch/ppc/boot/simple/mpc52xx_tty.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +7 -6 # ppc32: sparse clean ups for the Freescale MPC52xx related code # # ChangeSet # 2005/03/18 13:37:25-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Add pegasos ethernet support # # This patch declares the necessary platform device on the pegasos platform # so that the mv643xx eth driver can be used on it. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Sven Luther # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/chrp_pegasos_eth.c # 2005/03/18 12:51:33-08:00 benh@kernel.crashing.org +101 -0 # ppc32: Add pegasos ethernet support # # arch/ppc/platforms/Makefile # 2005/03/18 12:55:53-08:00 benh@kernel.crashing.org +2 -1 # ppc32: Add pegasos ethernet support # # arch/ppc/platforms/chrp_pegasos_eth.c # 2005/03/18 12:51:33-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/chrp_pegasos_eth.c # # ChangeSet # 2005/03/18 13:37:05-08:00 tnt@246tNt.com # [PATCH] ppc32: Add PCI bus support for Freescale MPC52xx # # Note that this support has "known" problem but theses are believed to be # due to hardware issues. # # Signed-off-by: Sylvain Munaut # Acked-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/mpc52xx_pci.h # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +139 -0 # ppc32: Add PCI bus support for Freescale MPC52xx # # include/linux/pci_ids.h # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +1 -0 # ppc32: Add PCI bus support for Freescale MPC52xx # # include/asm-ppc/mpc52xx.h # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +2 -0 # ppc32: Add PCI bus support for Freescale MPC52xx # # arch/ppc/syslib/mpc52xx_pci.h # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/mpc52xx_pci.h # # arch/ppc/syslib/mpc52xx_pci.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +235 -0 # ppc32: Add PCI bus support for Freescale MPC52xx # # arch/ppc/syslib/Makefile # 2005/03/18 12:55:53-08:00 tnt@246tNt.com +3 -0 # ppc32: Add PCI bus support for Freescale MPC52xx # # arch/ppc/platforms/lite5200.c # 2005/03/18 12:55:53-08:00 tnt@246tNt.com +34 -3 # ppc32: Add PCI bus support for Freescale MPC52xx # # arch/ppc/Kconfig # 2005/03/18 12:55:53-08:00 tnt@246tNt.com +1 -1 # ppc32: Add PCI bus support for Freescale MPC52xx # # arch/ppc/syslib/mpc52xx_pci.c # 2005/03/18 12:51:32-08:00 tnt@246tNt.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/mpc52xx_pci.c # # ChangeSet # 2005/03/18 13:36:44-08:00 galak@freescale.com # [PATCH] ppc32: Fix FEC ethernet intialization on MPC8540 ADS board # # The PHY interrupt for the DM9121 PHY connected to the FEC ethernet port # does not work on the MPC8540 ADS board. If we tell the driver that the PHY # does not have an interrupt the FEC works properly on the MPC8540 ADS board. # # Signed-off-by: Roy Zang # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/85xx/mpc8540_ads.c # 2005/03/18 12:51:32-08:00 galak@freescale.com +1 -1 # ppc32: Fix FEC ethernet intialization on MPC8540 ADS board # # ChangeSet # 2005/03/18 13:36:24-08:00 mgreer@mvista.com # [PATCH] ppc32: Clean up mv64x60 bootwrapper support # # This patch removes the call to mv64x60_init() in # arch/ppc/boot/simple/head.S and now uses the 'load_kernel()' hook to call # to have mv64x60-specific code called. This means that the mv64x60 code # will be called after the bootwrapper has relocated itself. The platforms # affected by this change are updated by this patch as well. # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/simple/misc-mv64x60.c # 2005/03/18 13:36:06-08:00 mgreer@mvista.com +61 -0 # # arch/ppc/boot/simple/misc-ev64260.c # 2005/03/18 13:36:06-08:00 mgreer@mvista.com +57 -0 # # arch/ppc/boot/simple/mv64x60_tty.c # 2005/03/18 12:51:32-08:00 mgreer@mvista.com +54 -78 # ppc32: Clean up mv64x60 bootwrapper support # # arch/ppc/boot/simple/misc-radstone_ppc7d.c # 2005/03/18 12:51:32-08:00 mgreer@mvista.com +13 -6 # ppc32: Clean up mv64x60 bootwrapper support # # arch/ppc/boot/simple/misc-mv64x60.c # 2005/03/18 13:36:06-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-mv64x60.c # # arch/ppc/boot/simple/misc-katana.c # 2005/03/18 12:51:32-08:00 mgreer@mvista.com +24 -2 # ppc32: Clean up mv64x60 bootwrapper support # # arch/ppc/boot/simple/misc-ev64260.c # 2005/03/18 13:36:06-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-ev64260.c # # arch/ppc/boot/simple/misc-cpci690.c # 2005/03/18 12:51:32-08:00 mgreer@mvista.com +13 -1 # ppc32: Clean up mv64x60 bootwrapper support # # arch/ppc/boot/simple/head.S # 2005/03/18 12:51:32-08:00 mgreer@mvista.com +0 -5 # ppc32: Clean up mv64x60 bootwrapper support # # arch/ppc/boot/simple/Makefile # 2005/03/18 12:51:32-08:00 mgreer@mvista.com +3 -3 # ppc32: Clean up mv64x60 bootwrapper support # # arch/ppc/boot/simple/misc-chestnut.c # 2005/03/18 13:36:03-08:00 mgreer@mvista.com +35 -0 # # arch/ppc/boot/simple/misc-chestnut.c # 2005/03/18 13:36:03-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/misc-chestnut.c # # BitKeeper/deleted/.del-mv64x60_stub.c~c6f5add23488ba20 # 2005/03/18 13:36:03-08:00 mgreer@mvista.com +0 -0 # Delete: arch/ppc/boot/simple/mv64x60_stub.c # # BitKeeper/deleted/.del-misc-mv64x60.S~780744cb78a3308e # 2005/03/18 13:36:02-08:00 mgreer@mvista.com +0 -0 # Delete: arch/ppc/boot/simple/misc-mv64x60.S # # BitKeeper/deleted/.del-misc-ev64260.S~4edfd91bed21e45f # 2005/03/18 13:36:02-08:00 mgreer@mvista.com +0 -0 # Delete: arch/ppc/boot/simple/misc-ev64260.S # # BitKeeper/deleted/.del-misc-chestnut.S~ffe8d6e861c3e926 # 2005/03/18 13:36:01-08:00 mgreer@mvista.com +0 -0 # Delete: arch/ppc/boot/simple/misc-chestnut.S # # ChangeSet # 2005/03/18 13:35:33-08:00 mgreer@mvista.com # [PATCH] ppc32: update Radstone ppc7d platform # # - Recent mv643xx #define name changes broke the PPC7D platform compile. # Fixed by this patch. # # - Change default platform config to add mv643xx_eth and mv64xxx-i2c # config options. # # - Add i2c platform data and update to cope with recent platform device # name change. # # Signed-off-by: James Chapman # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/radstone_ppc7d.c # 2005/03/18 12:51:31-08:00 mgreer@mvista.com +58 -14 # ppc32: update Radstone ppc7d platform # # arch/ppc/configs/radstone_ppc7d_defconfig # 2005/03/18 12:51:31-08:00 mgreer@mvista.com +115 -29 # ppc32: update Radstone ppc7d platform # # ChangeSet # 2005/03/18 13:35:15-08:00 mgreer@mvista.com # [PATCH] ppc32: Patch for changed dev->bus_id format # # - Recent changes to drivers/base/platform.c:platform_device_register() # changed the format of dev->bus_id (there is now a '.' between the name & # instance (e.g., the old mpsc0 is now mpsc.0)). This field is used by # some platform's platform_notify() routine to identify the dev entry. # This patch updates the bus_id value compared to include the dot. # # - Fix an bad macro name change by a previous patch. # # - Some coding style fixups, etc. # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/katana.c # 2005/03/18 12:51:31-08:00 mgreer@mvista.com +5 -5 # ppc32: Patch for changed dev->bus_id format # # arch/ppc/platforms/ev64260.c # 2005/03/18 12:51:31-08:00 mgreer@mvista.com +3 -3 # ppc32: Patch for changed dev->bus_id format # # arch/ppc/platforms/cpci690.h # 2005/03/18 12:51:31-08:00 mgreer@mvista.com +5 -0 # ppc32: Patch for changed dev->bus_id format # # arch/ppc/platforms/cpci690.c # 2005/03/18 12:51:31-08:00 mgreer@mvista.com +9 -30 # ppc32: Patch for changed dev->bus_id format # # ChangeSet # 2005/03/18 13:34:57-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Update 8260_io/fcc_enet.c to function again # # There's too many things in here that've sat too long (I'd been hoping to # just delete the driver, but that hasn't happened yet, so). A cobbled # together list of changes is: # # - Update MDIO support for workqueues. # - Make use of # - Add RPX6 support. # - Comment out set_multicast_list (broken). # - Rework tx_ring stuff so we have tx_free, not tx_Full/n_pkts. # - Other PHY updates/fixes. # - Leo Li: Rework FCC clock configuration, make it easier. # - 2.4 : VLAN header room, other misc bits. # - Kill MII_REG_NNN in favor of defines from # - DM9161 PHY support (2.4, Myself & alebas@televes.com) # - PQ2ADS and PQ2FADS support bits (Myself & alebas@televes.com # # From: Leo Li # Signed-off-by: Tom Rini # Signed-off-by: Alexandre Bastos # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/cpm2.h # 2005/03/18 12:51:31-08:00 trini@kernel.crashing.org +1 -0 # ppc32: Update 8260_io/fcc_enet.c to function again # # arch/ppc/8260_io/fcc_enet.c # 2005/03/18 12:51:31-08:00 trini@kernel.crashing.org +670 -299 # ppc32: Update 8260_io/fcc_enet.c to function again # # arch/ppc/8260_io/Kconfig # 2005/03/18 12:51:31-08:00 trini@kernel.crashing.org +9 -2 # ppc32: Update 8260_io/fcc_enet.c to function again # # ChangeSet # 2005/03/18 13:34:37-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix a typo on 8260 # # This fixes a lingering typo in arch/ppc/boot/simple/m8260_tty.c # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/simple/m8260_tty.c # 2005/03/18 12:51:31-08:00 trini@kernel.crashing.org +1 -1 # ppc32: Fix a typo on 8260 # # ChangeSet # 2005/03/18 13:34:08-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Serial fix for PAL4 # # Add PAL4's bit to # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/serial.h # 2005/03/18 12:51:31-08:00 trini@kernel.crashing.org +2 -0 # ppc32: Serial fix for PAL4 # # ChangeSet # 2005/03/18 13:33:38-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Better comment arch/ppc/syslib/cpc700.h # # This adds better comments to arch/ppc/syslib/cpc700.h # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/cpc700.h # 2005/03/18 12:51:31-08:00 trini@kernel.crashing.org +16 -10 # ppc32: Better comment arch/ppc/syslib/cpc700.h # # ChangeSet # 2005/03/18 13:33:17-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Lindent include/asm-ppc/dma.h # # This originally came from Paul, back in July of 2003. Run Lindent over # include/asm-ppc/dma.h # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/dma.h # 2005/03/18 12:51:30-08:00 trini@kernel.crashing.org +55 -59 # ppc32: Lindent include/asm-ppc/dma.h # # ChangeSet # 2005/03/18 13:32:53-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Delete arch/ppc/syslib/ppc4xx_serial.c # # arch/ppc/syslib/ppc4xx_serial.c is unused cruft, delete. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-ppc4xx_serial.c~8104ba34d96cf741 # 2005/03/18 13:32:42-08:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/syslib/ppc4xx_serial.c # # ChangeSet # 2005/03/18 13:32:35-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Fix a warning in planb video driver # # [ aside: This has been sitting in the linuxppc-2.5 bk tree for I don't # know how long. And the driver is still horribly broken. ] # # The following patch moves overlay_is_active to before its first use. It # was originally written when gcc wouldn't complain, but now does, about not # having the definition before usage. # # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/planb.c # 2005/03/18 12:51:30-08:00 trini@kernel.crashing.org +10 -10 # ppc32: Fix a warning in planb video driver # # ChangeSet # 2005/03/18 13:32:14-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Add virtual DMA support to legacy floppy driver # # This patch adds support for pseudo-dma transfers on ppc32 for the legacy # floppy driver. It is useful on some machines like pegasos where the legacy # DMA doesn't seem to work properly (possibly to the lack of a "legacy" DMA zone # on ppc32). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Pavel Fedin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/floppy.h # 2005/03/18 12:51:30-08:00 benh@kernel.crashing.org +137 -16 # ppc32: Add virtual DMA support to legacy floppy driver # # ChangeSet # 2005/03/18 13:31:55-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Update PowerMac models table # # This patch updates the table of PowerMac models, adding the Mac mini, a few # missing ones in older slots too, and sorts it in a more logical way. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/pmac_feature.c # 2005/03/18 12:51:30-08:00 benh@kernel.crashing.org +114 -75 # ppc32: Update PowerMac models table # # ChangeSet # 2005/03/18 13:31:36-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Fix overflow in cpuinfo freq. display # # The CPU frequency in /proc/cpuinfo would overflow because of a signed/unsigned # bug. This fixes it. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/setup.c # 2005/03/18 12:51:30-08:00 benh@kernel.crashing.org +3 -2 # ppc32: Fix overflow in cpuinfo freq. display # # ChangeSet # 2005/03/18 13:31:16-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Fix PowerMac cpufreq for newer machines # # This patch fixes the cpufreq support for newer machines, including latest # Apple laptops using the 7447A CPU. With this patch, it should now # propertly detect that the CPU is booting low speed on some models, and let # you switch it to full speed (previously, /proc/cpuinfo would display the # frequency of the full speed CPU but it was really running low speed). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/pmac_cpufreq.c # 2005/03/18 12:51:29-08:00 benh@kernel.crashing.org +15 -14 # ppc32: Fix PowerMac cpufreq for newer machines # # ChangeSet # 2005/03/18 10:45:06-08:00 herbert@gondor.apana.org.au # [NET]: Make dst_allfrag use dst instead of dst->path # # > BTW, shouldn't dst_allfrag be called dst_path_allfrag? # # Rather than doing that, let's make the path usage explicit in # the one place that it's needed (the same place where we use # dst_mtu(dst->path)). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2005/03/18 10:44:52-08:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Make dst_allfrag use dst instead of dst->path # # > BTW, shouldn't dst_allfrag be called dst_path_allfrag? # # Rather than doing that, let's make the path usage explicit in # the one place that it's needed (the same place where we use # dst_mtu(dst->path)). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/03/18 10:44:52-08:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Make dst_allfrag use dst instead of dst->path # # > BTW, shouldn't dst_allfrag be called dst_path_allfrag? # # Rather than doing that, let's make the path usage explicit in # the one place that it's needed (the same place where we use # dst_mtu(dst->path)). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:43:40-08:00 herbert@gondor.apana.org.au # [NET]: Kill dst_pmtu/dst_path_metric # # This would have been the patch that removed dst->path. But # ip_append_data got in the way :) # # However, using dst->path is only needed rarely and should always # require a bit of deliberation. So let's get rid of dst_pmtu # and dst_path_metric and use dst_mtu and dst_metric directly. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2005/03/18 10:43:26-08:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Kill dst_pmtu/dst_path_metric # # This would have been the patch that removed dst->path. But # ip_append_data got in the way :) # # However, using dst->path is only needed rarely and should always # require a bit of deliberation. So let's get rid of dst_pmtu # and dst_path_metric and use dst_mtu and dst_metric directly. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2005/03/18 10:43:26-08:00 herbert@gondor.apana.org.au +1 -1 # [NET]: Kill dst_pmtu/dst_path_metric # # This would have been the patch that removed dst->path. But # ip_append_data got in the way :) # # However, using dst->path is only needed rarely and should always # require a bit of deliberation. So let's get rid of dst_pmtu # and dst_path_metric and use dst_mtu and dst_metric directly. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/03/18 10:43:26-08:00 herbert@gondor.apana.org.au +1 -16 # [NET]: Kill dst_pmtu/dst_path_metric # # This would have been the patch that removed dst->path. But # ip_append_data got in the way :) # # However, using dst->path is only needed rarely and should always # require a bit of deliberation. So let's get rid of dst_pmtu # and dst_path_metric and use dst_mtu and dst_metric directly. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:42:32-08:00 herbert@gondor.apana.org.au # [NET]: Kill unnecessary uses of dst_path_metric # # This gets rid of the last unnecessary use of dst_path_metric. In # decnet dst->path is always equal to dst. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/decnet/af_decnet.c # 2005/03/18 10:42:16-08:00 herbert@gondor.apana.org.au +2 -2 # [NET]: Kill unnecessary uses of dst_path_metric # # This gets rid of the last unnecessary use of dst_path_metric. In # decnet dst->path is always equal to dst. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:41:41-08:00 herbert@gondor.apana.org.au # [IPSEC]: Get ttl from child instead of path # # Now that dst_pmtu is almost gone let's do the same to dst_path_metric. # I've only found one legitimate use of it and that's the one that was # recently added in dst_allfrag. # # This patch makes xfrm4_encap/xfrm6_encap use dst->child instead of # dst->path so that we choose the correct route to get the hoplimit # from when nested tunnels are present. # # For simple tunnels dst->child == dst->path so there is no change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2005/03/18 10:41:26-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Get ttl from child instead of path # # Now that dst_pmtu is almost gone let's do the same to dst_path_metric. # I've only found one legitimate use of it and that's the one that was # recently added in dst_allfrag. # # This patch makes xfrm4_encap/xfrm6_encap use dst->child instead of # dst->path so that we choose the correct route to get the hoplimit # from when nested tunnels are present. # # For simple tunnels dst->child == dst->path so there is no change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2005/03/18 10:41:26-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Get ttl from child instead of path # # Now that dst_pmtu is almost gone let's do the same to dst_path_metric. # I've only found one legitimate use of it and that's the one that was # recently added in dst_allfrag. # # This patch makes xfrm4_encap/xfrm6_encap use dst->child instead of # dst->path so that we choose the correct route to get the hoplimit # from when nested tunnels are present. # # For simple tunnels dst->child == dst->path so there is no change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:39:12-08:00 herbert@gondor.apana.org.au # [IPV4]: Kill remaining unnecessary uses of dst_pmtu # # Once again here is a couple of trivial dst_pmtu/dst_mtu replacements. # In both locations, we can only have simple dst entries which means # that dst == dst->path. # # BTW, this is the rule that we should apply in future for uses of # dst_mtu/dst_pmtu (or other metrics on dst). If the only dst's that # can appear are simple dst's (dst == dst->path), then we should use # dst_mtu or dst_metric. If dst != dst->path, then whoever is writing # the code will need to think about which of dst or dst->path is the # right one. # # In most instances dst will be the one. However, as we have seen in # ip_append_data, dst->path may be needed rarely. In particular, if # we're doing fragmentation immediately after IPsec, then you may need # it. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2005/03/18 10:38:59-08:00 herbert@gondor.apana.org.au +1 -1 # [IPV4]: Kill remaining unnecessary uses of dst_pmtu # # Once again here is a couple of trivial dst_pmtu/dst_mtu replacements. # In both locations, we can only have simple dst entries which means # that dst == dst->path. # # BTW, this is the rule that we should apply in future for uses of # dst_mtu/dst_pmtu (or other metrics on dst). If the only dst's that # can appear are simple dst's (dst == dst->path), then we should use # dst_mtu or dst_metric. If dst != dst->path, then whoever is writing # the code will need to think about which of dst or dst->path is the # right one. # # In most instances dst will be the one. However, as we have seen in # ip_append_data, dst->path may be needed rarely. In particular, if # we're doing fragmentation immediately after IPsec, then you may need # it. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_xmit.c # 2005/03/18 10:38:59-08:00 herbert@gondor.apana.org.au +5 -5 # [IPV4]: Kill remaining unnecessary uses of dst_pmtu # # Once again here is a couple of trivial dst_pmtu/dst_mtu replacements. # In both locations, we can only have simple dst entries which means # that dst == dst->path. # # BTW, this is the rule that we should apply in future for uses of # dst_mtu/dst_pmtu (or other metrics on dst). If the only dst's that # can appear are simple dst's (dst == dst->path), then we should use # dst_mtu or dst_metric. If dst != dst->path, then whoever is writing # the code will need to think about which of dst or dst->path is the # right one. # # In most instances dst will be the one. However, as we have seen in # ip_append_data, dst->path may be needed rarely. In particular, if # we're doing fragmentation immediately after IPsec, then you may need # it. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:37:41-08:00 herbert@gondor.apana.org.au # [NETFILTER]: Use correct IPSEC MTU in TCPMSS # # This patch makes ipt_TCPMSS use the correct MTU value for clamping. # This is a bit tricky actually since TCPMSS can be used in FORWARD, # LOCAL_OUT as well as POST_ROUTING. # # In the first two cases we haven't performed IPsec yet so dst_mtu # obviously does the right thing. As it is, POST_ROUTING is performed # after xfrm_output so MSS clamping is useless there. # # With Patrick's IPsec netfilter stuff, there will be a POST_ROUTING # processing before IPsec processing, in which case dst_mtu also returns # exactly what we want. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_TCPMSS.c # 2005/03/18 10:37:27-08:00 herbert@gondor.apana.org.au +3 -3 # [NETFILTER]: Use correct IPSEC MTU in TCPMSS # # This patch makes ipt_TCPMSS use the correct MTU value for clamping. # This is a bit tricky actually since TCPMSS can be used in FORWARD, # LOCAL_OUT as well as POST_ROUTING. # # In the first two cases we haven't performed IPsec yet so dst_mtu # obviously does the right thing. As it is, POST_ROUTING is performed # after xfrm_output so MSS clamping is useless there. # # With Patrick's IPsec netfilter stuff, there will be a POST_ROUTING # processing before IPsec processing, in which case dst_mtu also returns # exactly what we want. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:36:23-08:00 herbert@gondor.apana.org.au # [IPV4]: Fix MTU check in ipmr_queue_xmit # # Somehow I missed four files with dst_pmtu usages in them. I'm going # to split them along the sames lines I did before: bug fixes and then # the trivial changes. # # Here is a patch that replaces dst_pmtu with dst_pmtu in ipmr.c # since this is straight IPIP tunneling equivalent to what we have # in ipip.c. # # As it is we may send ICMP packets when IPsec is present which is # exactly what the comment says that we shouldn't do. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ipmr.c # 2005/03/18 10:36:11-08:00 herbert@gondor.apana.org.au +1 -1 # [IPV4]: Fix MTU check in ipmr_queue_xmit # # Somehow I missed four files with dst_pmtu usages in them. I'm going # to split them along the sames lines I did before: bug fixes and then # the trivial changes. # # Here is a patch that replaces dst_pmtu with dst_pmtu in ipmr.c # since this is straight IPIP tunneling equivalent to what we have # in ipip.c. # # As it is we may send ICMP packets when IPsec is present which is # exactly what the comment says that we shouldn't do. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:34:53-08:00 shenkel@gmail.com # [TUN]: Align only ethernet packets to NET_IP_ALIGN. # # Signed-off-by: Sven Henkel # Signed-off-by: David S. Miller # # drivers/net/tun.c # 2005/03/18 10:34:38-08:00 shenkel@gmail.com +7 -3 # [TUN]: Align only ethernet packets to NET_IP_ALIGN. # # Signed-off-by: Sven Henkel # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 10:30:20-08:00 shenkel@gmail.com # [NETPOLL]: Align UDP packets to NET_IP_ALIGN. # # This avoids unnecessary alignment traps on some # platforms. # # Signed-off-by: Sven Henkel # Signed-off-by: David S. Miller # # net/core/netpoll.c # 2005/03/18 10:30:04-08:00 shenkel@gmail.com +1 -1 # [NETPOLL]: Align UDP packets to NET_IP_ALIGN. # # This avoids unnecessary alignment traps on some # platforms. # # Signed-off-by: Sven Henkel # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/18 08:01:17-08:00 tali@admingilde.org # [PATCH] docbook: fix escaping of kernel-doc # # This fixes a bug I introduced with the last patches of the DocBook # generation. # # Signed-off-by: Martin Waitz # Signed-off-by: Linus Torvalds # # scripts/kernel-doc # 2005/03/18 02:51:17-08:00 tali@admingilde.org +5 -5 # docbook: fix escaping of kernel-doc # # ChangeSet # 2005/03/18 08:01:00-08:00 aia21@cam.ac.uk # [PATCH] uml: Fix compilation due to mismerge. # # The recent slew of UML updates that appeared in BK seems to have gone # wrong somewhere. The file "arch/um/kernel/syscall_user.c" contains # identical content twice over, thus breaking compilation. # # Below is a patch to fix this. Please apply. # # Signed-off-by: Anton Altaparmakov # Signed-off-by: Linus Torvalds # # arch/um/kernel/syscall_user.c # 2005/03/18 03:37:43-08:00 aia21@cam.ac.uk +0 -48 # uml: Fix compilation due to mismerge. # # ChangeSet # 2005/03/18 07:52:44-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: remove vendor/board specific startup code # # Remove all board specific startup code files. Code has been merged # into a much smaller set of common code for each CPU class type, # so that is 3 types now. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-crt0_rom.S~d205d5b741021fe9 # 2005/03/18 07:52:34-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/ucdimm/crt0_rom.S # # BitKeeper/deleted/.del-crt0_ram.S~f6713b1bc05601a1 # 2005/03/18 07:52:34-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/ucdimm/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~d34cdd1e21edee23 # 2005/03/18 07:52:34-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5206/ARNEWSH/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~40ae24348bbd7fb # 2005/03/18 07:52:34-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5206e/eLITE/crt0_ram.S # # BitKeeper/deleted/.del-crt0_rom.S~b82150e6a6d2797f # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S # # BitKeeper/deleted/.del-crt0_ram.S~4e94a534e3d15f48 # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68EZ328/ucsimm/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~2cf8f7ebac1567a0 # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/de2/crt0_ram.S # # BitKeeper/deleted/.del-crt0_himem.S~ebbc88a6394f9fdc # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/ucdimm/crt0_himem.S # # BitKeeper/deleted/.del-crt0_himem.S~30b71a46cd003e4d # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68EZ328/ucsimm/crt0_himem.S # # BitKeeper/deleted/.del-crt0_fixed.S~cbb143aab415963c # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/ucdimm/crt0_fixed.S # # BitKeeper/deleted/.del-crt0_fixed.S~4d29b192f1c2fd52 # 2005/03/18 07:52:33-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68EZ328/ucsimm/crt0_fixed.S # # BitKeeper/deleted/.del-crt0_rom.S~b8b77df97a1f9b5 # 2005/03/18 07:52:32-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68328/pilot/crt0_rom.S # # BitKeeper/deleted/.del-crt0_rom.S~1126a728d0284fe3 # 2005/03/18 07:52:32-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68360/uCquicc/crt0_rom.S # # BitKeeper/deleted/.del-crt0_ram.S~ffb6beec95d31ab8 # 2005/03/18 07:52:32-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68360/uCquicc/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~f11dd49d2b6d0f6a # 2005/03/18 07:52:32-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5407/CLEOPATRA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~c71f6f8027e92792 # 2005/03/18 07:52:32-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5407/MOTOROLA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~8ed728011670803 # 2005/03/18 07:52:32-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5307/NETtel/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~f221fd3a294d32aa # 2005/03/18 07:52:31-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/528x/senTec/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~e40c4c64b428fcaf # 2005/03/18 07:52:31-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5307/MP3/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~e2f919923f242cac # 2005/03/18 07:52:31-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~d2e9a99a82f8dc65 # 2005/03/18 07:52:31-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~450fbe04da91d331 # 2005/03/18 07:52:31-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5307/CLEOPATRA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~158add31f04a42c6 # 2005/03/18 07:52:31-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5307/MOTOROLA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~be3aad01149175a5 # 2005/03/18 07:52:30-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~792820ab59d5a88c # 2005/03/18 07:52:30-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5272/NETtel/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~72f51f34759d54ff # 2005/03/18 07:52:30-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~36cddf89bf29efa4 # 2005/03/18 07:52:30-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5272/SCALES/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~1ee046bfd0b6da12 # 2005/03/18 07:52:30-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5272/senTec/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~d9746ca72c7794a3 # 2005/03/18 07:52:29-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5272/MOTOROLA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~d3a50f66f7c69dc8 # 2005/03/18 07:52:29-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5249/MOTOROLA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~2c2e4e1ef0fcb2f1 # 2005/03/18 07:52:29-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S # # BitKeeper/deleted/.del-crt0_ram.S~1db926d789af312c # 2005/03/18 07:52:29-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/5272/CANCam/crt0_ram.S # # ChangeSet # 2005/03/18 07:52:22-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: move PILOT platform startup code # # Create more common 68328 startup code for the PILOT platform. # It requires some unique setup from boot, that no other platform # requires. This is part of the re-organization of the start up # code to make more if it common. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/68328/head-pilot.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +224 -0 # m68k-nommu: move PILOT platform startup code # # arch/m68knommu/platform/68328/head-pilot.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/68328/head-pilot.S # # ChangeSet # 2005/03/18 07:52:05-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: create common 68328 RAM based startup code # # Create common 68328 startup code for the ram based platforms. # This is part of the re-organization of the start up code to # make more if it common. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/68328/head-ram.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +171 -0 # m68k-nommu: create common 68328 RAM based startup code # # arch/m68knommu/platform/68328/head-ram.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/68328/head-ram.S # # ChangeSet # 2005/03/18 07:51:48-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: remove nowhere referenced file semp3.h # # Remove nowhere referenced file. (egrep "filename\." didn't find anything) # # Signed-off-by: Domen Puncer # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-semp3.h~54fb3963e4a5b961 # 2005/03/18 07:51:38-08:00 gerg@snapgear.com +0 -0 # Delete: include/asm-m68knommu/semp3.h # # ChangeSet # 2005/03/18 07:51:32-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: create common 68328 ROM based startup code # # Create common 68328 startup code for the ROM based platforms. # This is part of the re-organization of the start up code to # make more if it common. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/68328/head-rom.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +109 -0 # m68k-nommu: create common 68328 ROM based startup code # # arch/m68knommu/platform/68328/head-rom.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/m68knommu/platform/68328/head-rom.S # # ChangeSet # 2005/03/18 07:51:14-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: fix broken GET_MEM_SIZE macro in ColdFire head code # # Fix GET_MEM_SIZE macro, name was wrong. It is only used on the 5272 # platform, so got overlooked in original changes. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/5307/head.S # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +2 -2 # m68k-nommu: fix broken GET_MEM_SIZE macro in ColdFire head code # # ChangeSet # 2005/03/18 07:50:57-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: change build process to use common head code # # Update m68knommu Makefiles to build just the common start up head # code now. Remove all referneces to the older vendor/board specific # start codes. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # arch/m68knommu/platform/68VZ328/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +11 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/68EZ328/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +3 -4 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/68360/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +4 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/68328/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +14 -8 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/5407/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/5307/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +1 -3 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/528x/Makefile # 2005/03/13 19:57:47-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/527x/Makefile # 2005/03/13 19:57:46-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/5272/Makefile # 2005/03/13 19:57:46-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/5249/Makefile # 2005/03/13 19:57:46-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/5206e/Makefile # 2005/03/13 19:57:46-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/platform/5206/Makefile # 2005/03/13 19:57:46-08:00 gerg@snapgear.com +0 -1 # m68k-nommu: change build process to use common head code # # arch/m68knommu/Makefile # 2005/03/13 19:57:39-08:00 gerg@snapgear.com +5 -3 # m68k-nommu: change build process to use common head code # # BitKeeper/deleted/.del-Makefile~d9739365beaf4b84 # 2005/03/18 07:50:47-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/ucdimm/Makefile # # BitKeeper/deleted/.del-Makefile~b99fc5d52fab7c32 # 2005/03/18 07:50:47-08:00 gerg@snapgear.com +0 -0 # Delete: arch/m68knommu/platform/68VZ328/de2/Makefile # # ChangeSet # 2005/03/18 07:50:40-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: use vma list in nommu mmap support # # Modify the mm_context struct to keep a list of vma's instead of # the uClinux specific mm_block struct's that used to be used. # This reflects the changes made to mm/nommu.c in 2.6.11. # # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # include/asm-m68knommu/mmu.h # 2005/03/13 20:00:03-08:00 gerg@snapgear.com +1 -12 # m68k-nommu: use vma list in nommu mmap support # # ChangeSet # 2005/03/18 07:50:25-08:00 gerg@snapgear.com # [PATCH] m68k-nommu: remove nowhere referenced file io_hw_swap.h # # Remove nowhere referenced file. (egrep "filename\." didn't find anything) # # Signed-off-by: Domen Puncer # Signed-off-by: Greg Ungerer # Signed-off-by: Linus Torvalds # # BitKeeper/deleted/.del-io_hw_swap.h~8338456a17243204 # 2005/03/18 07:50:15-08:00 gerg@snapgear.com +0 -0 # Delete: include/asm-m68knommu/io_hw_swap.h # # ChangeSet # 2005/03/18 15:10:40+01:00 marcel@holtmann.org # [Bluetooth] Kill bt_sock_alloc() and its usage # # Kill bt_sock_alloc() function and make the derived socks have # a struct bt_sock as its first member, so that the _pi() functions # can just cast the struct sock pointer to its respective types, # taking advantage of the fact that sk_alloc() now use kmalloc() # when no slab is passed. # # This is another step, close to the final one, to kill sk_protinfo # and make further planned changes possible. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # Signed-off-by: Marcel Holtmann # # net/bluetooth/hidp/sock.c # 2005/03/18 15:07:31+01:00 marcel@holtmann.org +6 -2 # Kill bt_sock_alloc() and its usage # # net/bluetooth/cmtp/sock.c # 2005/03/18 15:07:29+01:00 marcel@holtmann.org +6 -2 # Kill bt_sock_alloc() and its usage # # net/bluetooth/bnep/sock.c # 2005/03/18 15:07:28+01:00 marcel@holtmann.org +8 -3 # Kill bt_sock_alloc() and its usage # # net/bluetooth/rfcomm/sock.c # 2005/03/18 15:07:27+01:00 marcel@holtmann.org +8 -2 # Kill bt_sock_alloc() and its usage # # net/bluetooth/sco.c # 2005/03/18 15:07:26+01:00 marcel@holtmann.org +8 -1 # Kill bt_sock_alloc() and its usage # # net/bluetooth/l2cap.c # 2005/03/18 15:07:25+01:00 marcel@holtmann.org +6 -1 # Kill bt_sock_alloc() and its usage # # net/bluetooth/hci_sock.c # 2005/03/18 15:07:23+01:00 marcel@holtmann.org +7 -1 # Kill bt_sock_alloc() and its usage # # net/bluetooth/af_bluetooth.c # 2005/03/18 15:07:22+01:00 marcel@holtmann.org +0 -43 # Kill bt_sock_alloc() and its usage # # include/net/bluetooth/rfcomm.h # 2005/03/18 15:07:21+01:00 marcel@holtmann.org +2 -1 # Kill bt_sock_alloc() and its usage # # include/net/bluetooth/sco.h # 2005/03/18 15:07:20+01:00 marcel@holtmann.org +2 -1 # Kill bt_sock_alloc() and its usage # # include/net/bluetooth/l2cap.h # 2005/03/18 15:07:18+01:00 marcel@holtmann.org +2 -1 # Kill bt_sock_alloc() and its usage # # include/net/bluetooth/hci_core.h # 2005/03/18 15:07:17+01:00 marcel@holtmann.org +3 -1 # Kill bt_sock_alloc() and its usage # # include/net/bluetooth/bluetooth.h # 2005/03/18 15:06:56+01:00 marcel@holtmann.org +0 -1 # Kill bt_sock_alloc() and its usage # # ChangeSet # 2005/03/18 13:25:42+01:00 marcel@holtmann.org # [Bluetooth] Fix session reference counting for RFCOMM # # When an incoming connection terminates, the signal DLC is never # closed and thus the underlaying L2CAP connection stays open. This # problem doesn't show up often, because most times the other side # takes care of terminating the signal DLC. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/rfcomm/core.c # 2005/03/18 13:24:00+01:00 marcel@holtmann.org +4 -0 # Fix session reference counting for RFCOMM # # ChangeSet # 2005/03/18 13:21:52+01:00 marcel@holtmann.org # [Bluetooth] Support HCI Extensions in BCSP driver # # To support the vendor specific HCI commands and events the BCSP # drivers needs to convert these to BCSP packets for the correct # channel. # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/hci_bcsp.c # 2005/03/18 13:20:08+01:00 marcel@holtmann.org +52 -18 # Support HCI Extensions in BCSP driver # # ChangeSet # 2005/03/18 12:06:33+01:00 bzolnier@trik.(none) # [ide] ide-tape: fix character device ->open() vs ->cleanup() race # # Similar to the same race but for the block device. # # * store pointer to struct ide_tape_obj in idetape_chrdevs[] # * rename idetape_chrdevs[] to idetape_devs[] and kill idetape_chrdev_t # * add ide_tape_chrdev_get() for getting reference to the tape # * store tape pointer in file->private_data and fix all users of it # * fix idetape_chrdev_{open,release}() to get/put reference to the tape # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-tape.c # 2005/03/18 11:33:10+01:00 bzolnier@trik.(none) +51 -30 # [ide] ide-tape: fix character device ->open() vs ->cleanup() race # # ChangeSet # 2005/03/18 12:05:37+01:00 bzolnier@trik.(none) # [ide] ide-scsi: add basic refcounting # # * pointers to a SCSI host and a drive are added to idescsi_scsi_t # * pointer to the SCSI host is stored in disk->private_data # * ide_scsi_{get,put}() is used to {get,put} reference to the SCSI host # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/scsi/ide-scsi.c # 2005/03/18 12:05:25+01:00 bzolnier@trik.(none) +56 -11 # [ide] ide-scsi: add basic refcounting # # ChangeSet # 2005/03/18 12:01:47+01:00 bzolnier@trik.(none) # [ide] ide-tape: add basic refcounting # # Similar changes as for ide-cd.c. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-tape.c # 2005/03/18 11:32:44+01:00 bzolnier@trik.(none) +80 -14 # [ide] ide-tape: add basic refcounting # # ChangeSet # 2005/03/18 11:59:51+01:00 bzolnier@trik.(none) # [ide] ide-floppy: add basic refcounting # # Similar changes as for ide-cd.c. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-floppy.c # 2005/03/18 11:32:32+01:00 bzolnier@trik.(none) +90 -25 # [ide] ide-floppy: add basic refcounting # # ChangeSet # 2005/03/18 11:57:25+01:00 bzolnier@trik.(none) # [ide] ide-disk: add basic refcounting # # Similar changes as for ide-cd.c (except that struct ide_disk_obj is added). # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-disk.c # 2005/03/18 11:32:20+01:00 bzolnier@trik.(none) +88 -9 # [ide] ide-disk: add basic refcounting # # ChangeSet # 2005/03/18 11:54:40+01:00 bzolnier@trik.(none) # [ide] ide-cd: add basic refcounting # # * based on reference counting in drivers/scsi/{sd,sr}.c # * fixes race between ->open() and ->cleanup() (ide_unregister_subdriver() # tests for drive->usage != 0 but there is no protection against new users) # * struct kref and pointer to a drive are added to struct ide_cdrom_info # * pointer to drive's struct ide_cdrom_info is stored in disk->private_data # * ide_cd_{get,put}() is used to {get,put} reference to struct ide_cdrom_info # * ide_cd_release() is a release method for struct ide_cdrom_info # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/ide-cd.h # 2005/03/18 11:29:00+01:00 bzolnier@trik.(none) +2 -0 # [ide] ide-cd: add basic refcounting # # drivers/ide/ide-cd.c # 2005/03/18 11:29:00+01:00 bzolnier@trik.(none) +80 -19 # [ide] ide-cd: add basic refcounting # # ChangeSet # 2005/03/18 11:51:25+01:00 bzolnier@trik.(none) # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # As a result disk->private_data can be used by device drivers now. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/ide.h # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +1 -1 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # drivers/scsi/ide-scsi.c # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +2 -1 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # drivers/ide/ide.c # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +1 -2 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # drivers/ide/ide-tape.c # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +1 -1 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # drivers/ide/ide-floppy.c # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +1 -1 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # drivers/ide/ide-disk.c # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +2 -1 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # drivers/ide/ide-cd.c # 2005/03/18 11:28:48+01:00 bzolnier@trik.(none) +1 -1 # [ide] make ide_generic_ioctl() take ide_drive_t * as an argument # # ChangeSet # 2005/03/18 11:45:52+01:00 htejun@gmail.com # [ide] hdio.txt update # # This patch updates Documentation/ioctl/hdio.txt to include more # detailed descriptions about HDIO_DRIVE_{CMD|TASK|TASKFILE} ioctls. # # Signed-off-by: Tejun Heo # Signed-off-by: Bartlomiej Zolnierkiewicz # # Documentation/ioctl/hdio.txt # 2005/03/11 07:27:33+01:00 htejun@gmail.com +142 -37 # [ide] hdio.txt update # # ChangeSet # 2005/03/18 11:42:11+01:00 tklauser@nuerscht.ch # [ide] drivers/ide/cs5520.c: use the DMA_{64,32}BIT_MASK constants # # Description: Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h # when calling pci_set_dma_mask() or pci_set_consistent_dma_mask() # See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details # # Signed-off-by: Tobias Klauser # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/ide/pci/cs5520.c # 2005/03/18 11:41:57+01:00 tklauser@nuerscht.ch +2 -1 # [ide] drivers/ide/cs5520.c: use the DMA_{64,32}BIT_MASK constants # # ChangeSet # 2005/03/18 11:36:11+01:00 Jason.d.gaston@intel.com # [ide] pci_ids.h correction for Intel ICH7R # # This patch removes an incorrect ICH7R DID in pci_ids.h. # # Signed-off-by: Jason Gaston # Signed-off-by: Bartlomiej Zolnierkiewicz # # include/linux/pci_ids.h # 2005/03/07 21:32:16+01:00 Jason.d.gaston@intel.com +0 -1 # [ide] pci_ids.h correction for Intel ICH7R # # ChangeSet # 2005/03/17 20:00:13-08:00 davem@sunset.davemloft.net # [IPV4]: Make multipath algs into true drivers. # # This also makes them configurable on a per-route # basis via rtnetlink route attributes. # # Based upon suggestions from Thomas Graf and Alexey # Kuznetsov. # # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +76 -93 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/multipath_wrandom.c # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +45 -64 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/multipath_rr.c # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +23 -11 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/multipath_random.c # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +28 -16 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/multipath_drr.c # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +42 -61 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/fib_semantics.c # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +18 -1 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/Makefile # 2005/03/17 19:58:49-08:00 davem@sunset.davemloft.net +1 -0 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/Kconfig # 2005/03/17 19:58:48-08:00 davem@sunset.davemloft.net +10 -16 # [IPV4]: Make multipath algs into true drivers. # # include/net/route.h # 2005/03/17 19:58:48-08:00 davem@sunset.davemloft.net +0 -73 # [IPV4]: Make multipath algs into true drivers. # # include/net/ip_mp_alg.h # 2005/03/17 19:58:48-08:00 davem@sunset.davemloft.net +75 -4 # [IPV4]: Make multipath algs into true drivers. # # include/net/ip_fib.h # 2005/03/17 19:58:48-08:00 davem@sunset.davemloft.net +7 -3 # [IPV4]: Make multipath algs into true drivers. # # include/linux/rtnetlink.h # 2005/03/17 19:58:48-08:00 davem@sunset.davemloft.net +1 -0 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/multipath.c # 2005/03/17 19:58:44-08:00 davem@sunset.davemloft.net +54 -0 # [IPV4]: Make multipath algs into true drivers. # # net/ipv4/multipath.c # 2005/03/17 19:58:44-08:00 davem@sunset.davemloft.net +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/net/ipv4/multipath.c # # include/linux/ip_mp_alg.h # 2005/03/17 19:58:42-08:00 davem@sunset.davemloft.net +22 -0 # [IPV4]: Make multipath algs into true drivers. # # include/linux/ip_mp_alg.h # 2005/03/17 19:58:42-08:00 davem@sunset.davemloft.net +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/include/linux/ip_mp_alg.h # # ChangeSet # 2005/03/17 18:15:50-08:00 gregkh@suse.de # [PATCH] USB Storage: remove unneeded unusual_devs.h entry. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/unusual_devs.h # 2005/03/17 18:12:25-08:00 gregkh@suse.de +0 -6 # USB Storage: remove unneeded unusual_devs.h entry. # # ChangeSet # 2005/03/17 18:15:30-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: change how unusual_devs.h flags are defined # # This patch started life as as473 from Alan Stern, and has been rediffed # against the current tip. # # This patch changes the way the flags bits are defined, so that the # proc_info routine can automatically list all the flags that are set. As a # side effect it will also include the NEED_OVERRIDE flag; that shouldn't # really matter. (As another side effect, the definitions grew too long to # fit on a single 80-character line so I had to wrap the comments.) # # This patch also takes the opportunity to remove a couple of obsolete flags # and to renumber the bit values. The patch also removes an unusual_devs # entry whose only purpose was to set one of those obsolete flags; apparently # it got left behind when all the other uses of those flags were removed. # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2005/03/13 21:34:07-08:00 mdharm-usb@one-eyed-alien.net +27 -12 # USB Storage: change how unusual_devs.h flags are defined # # drivers/usb/storage/scsiglue.c # 2005/03/13 21:34:07-08:00 mdharm-usb@one-eyed-alien.net +4 -6 # USB Storage: change how unusual_devs.h flags are defined # # ChangeSet # 2005/03/17 18:15:11-08:00 rddunlap@osdl.org # [PATCH] pwc: fix printk arg types # # Fix gcc printk arg type warnings: # drivers/usb/media/pwc/pwc-if.c:325: warning: int format, different type arg (arg 2) # drivers/usb/media/pwc/pwc-if.c:1182: warning: int format, different type arg (arg 4) # # Signed-off-by: Randy Dunlap # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc/pwc-if.c # 2005/03/14 12:04:31-08:00 rddunlap@osdl.org +2 -2 # pwc: fix printk arg types # # ChangeSet # 2005/03/17 18:14:52-08:00 rddunlap@osdl.org # [PATCH] sisusb: fix arg. types # # Fix gcc printk arg type and other function parameter warnings: # # drivers/usb/misc/sisusbvga/sisusb.c: In function `sisusb_send_packet': # drivers/usb/misc/sisusbvga/sisusb.c:583: warning: passing arg 7 of `sisusb_send_bulk_msg' from incompatible pointer type # drivers/usb/misc/sisusbvga/sisusb.c:591: warning: passing arg 6 of `sisusb_recv_bulk_msg' from incompatible pointer type # drivers/usb/misc/sisusbvga/sisusb.c: In function `sisusb_send_bridge_packet': # drivers/usb/misc/sisusbvga/sisusb.c:620: warning: passing arg 7 of `sisusb_send_bulk_msg' from incompatible pointer type # drivers/usb/misc/sisusbvga/sisusb.c:628: warning: passing arg 6 of `sisusb_recv_bulk_msg' from incompatible pointer type # drivers/usb/misc/sisusbvga/sisusb.c: In function `sisusb_write_mem_bulk': # drivers/usb/misc/sisusbvga/sisusb.c:989: warning: int format, different type arg (arg 3) # drivers/usb/misc/sisusbvga/sisusb.c:989: warning: int format, different type arg (arg 3) # drivers/usb/misc/sisusbvga/sisusb.c: In function `sisusb_clear_vram': # drivers/usb/misc/sisusbvga/sisusb.c:1407: warning: passing arg 7 of `sisusb_write_mem_bulk' from incompatible pointer type # # Signed-off-by: Randy Dunlap # Signed-off-by: Thomas Winischhofer # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/sisusbvga/sisusb.c # 2005/03/14 11:57:23-08:00 rddunlap@osdl.org +5 -4 # sisusb: fix arg. types # # ChangeSet # 2005/03/17 18:14:33-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: remove unneeded NULL tests # # This patch started life as as472 from Alan Stern, and has been rediffed # against the current tip. # # This patch simply removes some unnecessary NULL checking before kfree() # calls. # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.c # 2005/03/13 21:34:20-08:00 mdharm-usb@one-eyed-alien.net +2 -5 # USB Storage: remove unneeded NULL tests # # ChangeSet # 2005/03/17 18:14:14-08:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: Header reorganization # # This patch started life as as471 from Alan Stern, and has been regenerated # against the current tip. # # This patch cleans up the use of header files. Primarily it makes sure # that "usb.h" is included before any of the other local headers. It also # removes some unnecessary declarations of struct us_data and struct # scsi_cmnd, and it moves the inclusion of to usb.h where # it will be needed by a later patch. # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -0 # USB Storage: Header reorganization # # drivers/usb/storage/usb.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +3 -4 # USB Storage: Header reorganization # # drivers/usb/storage/transport.h # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +0 -3 # USB Storage: Header reorganization # # drivers/usb/storage/transport.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/shuttle_usbat.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/sddr55.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/sddr09.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/scsiglue.h # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +0 -5 # USB Storage: Header reorganization # # drivers/usb/storage/scsiglue.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -2 # USB Storage: Header reorganization # # drivers/usb/storage/protocol.h # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +0 -3 # USB Storage: Header reorganization # # drivers/usb/storage/protocol.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +2 -1 # USB Storage: Header reorganization # # drivers/usb/storage/jumpshot.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/isd200.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/initializers.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +2 -0 # USB Storage: Header reorganization # # drivers/usb/storage/freecom.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/dpcm.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # drivers/usb/storage/debug.h # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +0 -2 # USB Storage: Header reorganization # # drivers/usb/storage/datafab.c # 2005/03/13 21:34:34-08:00 mdharm-usb@one-eyed-alien.net +1 -1 # USB Storage: Header reorganization # # ChangeSet # 2005/03/17 18:13:54-08:00 okir@suse.de # [PATCH] USB: fix uhci irq 10: nobody cared! error # # From: Olaf Kirch # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2005/03/17 16:00:00-08:00 okir@suse.de +3 -1 # USB: fix uhci irq 10: nobody cared! error # # ChangeSet # 2005/03/17 18:13:34-08:00 domen@coderock.org # [PATCH] USB: compile warning cleanup # # compile warning cleanup - handle error return from # scsi_add_host # # Signed-off-by: Stephen Biggs # Signed-off-by: Domen Puncer # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/image/microtek.c # 2005/03/05 07:13:09-08:00 domen@coderock.org +6 -2 # USB: compile warning cleanup # # ChangeSet # 2005/03/17 18:13:15-08:00 domen@coderock.org # [PATCH] usb/digi_acceleport: remove interruptible_sleep_on_timeout() usage # # Replace deprecated interruptible_sleep_on_timeout() with direct # wait-queue usage. Also replace some rather odd wait-queue usage with the # existent macros. Also adjusted the wake_up_interruptible() call appropriately, # as I changed all the states to TASK_UNINTERRUPTIBLE (signals were not be checked # in the current code). Patch is compile-tested. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Domen Puncer # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/digi_acceleport.c # 2005/03/05 07:12:12-08:00 domen@coderock.org +11 -18 # usb/digi_acceleport: remove interruptible_sleep_on_timeout() usage # # ChangeSet # 2005/03/17 18:12:55-08:00 domen@coderock.org # [PATCH] usb/rio500: remove interruptible_sleep_on_timeout() usage # # Replace deprecated interruptible_sleep_on_timeout() with direct # wait-queue usage. Patch is compile-tested. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Domen Puncer # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/rio500.c # 2005/03/05 07:12:11-08:00 domen@coderock.org +9 -3 # usb/rio500: remove interruptible_sleep_on_timeout() usage # # ChangeSet # 2005/03/17 17:58:07-08:00 oliver@neukum.org # [PATCH] USB: removal of obsolete error code from kaweth # # this patch from David removes an obsolete error code from kaweth. # # Signed-off-by: Oliver Neukum # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2005/03/04 23:57:34-08:00 oliver@neukum.org +1 -1 # USB: removal of obsolete error code from kaweth # # ChangeSet # 2005/03/17 17:57:47-08:00 stern@rowland.harvard.edu # [PATCH] USB: Prevent hub driver interference during port reset # # This patch causes the hub driver to ignore ports that are being reset by # another driver. Without this protection khubd will sometimes notice that # the port is behaving funny while the reset is taking place and will # unilaterally disconnect it, which is not what we want. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hub.h # 2005/02/27 05:30:15-08:00 stern@rowland.harvard.edu +1 -0 # USB: Prevent hub driver interference during port reset # # drivers/usb/core/hub.c # 2005/02/27 05:30:15-08:00 stern@rowland.harvard.edu +4 -0 # USB: Prevent hub driver interference during port reset # # ChangeSet # 2005/03/17 17:57:27-08:00 stern@rowland.harvard.edu # [PATCH] g_file_storage: add configuration and interface strings # # This patch adds iConfiguration and iInterface strings to the # g_file_storage driver (just to spiff it up and help in testing software # that looks at those strings). It also enlarges the space reserved for the # Manufacturer string, since combinations of long kernel names and long UDC # driver names were sometimes getting truncated. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/file_storage.c # 2005/02/25 07:39:06-08:00 stern@rowland.harvard.edu +8 -2 # g_file_storage: add configuration and interface strings # # ChangeSet # 2005/03/17 17:57:07-08:00 stern@rowland.harvard.edu # [PATCH] usb-midi: fix arguments to usb_maxpacket() # # The usb-midi driver uses an incorrect value for the is_out argument to # usb_maxpacket(), triggering a WARN_ON. This patch fixes the mistake. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/class/usb-midi.c # 2005/02/26 02:17:03-08:00 stern@rowland.harvard.edu +2 -2 # usb-midi: fix arguments to usb_maxpacket() # # ChangeSet # 2005/03/17 17:56:48-08:00 akpm@osdl.org # [PATCH] usb hcd u64 warning fix # # drivers/usb/core/hcd.c:1689: warning: long long unsigned int format, u64 arg (arg 6) # drivers/usb/core/hcd.c:1695: warning: long long unsigned int format, u64 arg (arg 5) # # We must not assume that u64 is implemented as `unsigned long long'. On ppc64 # (for example) it is `unsigned long'. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd.c # 2005/02/28 07:44:29-08:00 akpm@osdl.org +4 -2 # usb hcd u64 warning fix # # ChangeSet # 2005/03/17 17:49:09-08:00 zaitcev@redhat.com # [PATCH] USB: Patch for ub to fix oops after disconnect # # This patch was developed by Glenn Maynard for his oops back in December, # but for some reason I forgot about it and had it reimplemented when I stepped # on this problem myself. In my case, there was no oops, but a warning about # slab corruption. # # Signed-off-by: Pete Zaitcev # Signed-off-by: Greg Kroah-Hartman # # drivers/block/ub.c # 2005/02/20 21:46:58-08:00 zaitcev@redhat.com +5 -6 # USB: Patch for ub to fix oops after disconnect # # ChangeSet # 2005/03/17 17:35:24-08:00 david-b@pacbell.net # [PATCH] USB: ethernet/rndis gadget driver updates # # Various fixes to the Ethernet/RNDIS gadget core code: # # - Pre-allocate the request used to transfer status back to the host. # Used initially for CDC Ethernet; RNDIS will change later. This # resolves a longstanding FIXME, elimininating fault modes. # # - Use larger packets for those status reports, 16 bytes not 8; this # eliminates some fault modes, without losing hardware support. # # - Streamline endpoint configuration, just save the endpoints during # driver binding. The previous scheme was a complex leftover from # before the endpoint autoselection library code existed, and this # bit of cleanup prepares for more simplifications later. # # - Implement a basic outgoing packet filter, for CDC Ethernet and RNDIS # but not the CDC subset. This improves conformance to both specs. # # - Correct the bit rate reports for CDC Ethernet and RNDIS to match # the peak bulk transfer rates, not the raw signaling rates. # # This still doesn't issue CDC or RNDIS link status change notifications # to the host as often as it should, but that'll be easier now. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/ether.c # 2005/02/28 18:26:02-08:00 david-b@pacbell.net +154 -92 # USB: ethernet/rndis gadget driver updates # # ChangeSet # 2005/03/17 17:35:05-08:00 david-b@pacbell.net # [PATCH] USB: net2280 reports correct dequeue status # # Minor bugfix to net2280: don't return incorrect dequeue() status. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/net2280.c # 2005/02/06 15:35:42-08:00 david-b@pacbell.net +1 -1 # USB: net2280 reports correct dequeue status # # ChangeSet # 2005/03/17 17:34:45-08:00 david-b@pacbell.net # [PATCH] USB: usbnet fix for Zaurus C-860 # # This patch resolves a recent problem with the Zaurus C-860 support. # # A change to correct handling of Zaurii that are lying about their support # for the "CDC Ethernet" class specification broke the C-860, which tells # an entirely different lie (that it supports "CDC MDLM", providing access # to a cell phone modem). The code expecting it to be telling a lie about # CDC Ethernet support naturally misbehaved. (Sharp should straighten out # its story. The 2.6 OpenZaurus kernels don't have any such issues...) # # The fix is just to recognize this bogus MDLM stuff and ignore it. # This patch also includes the two MDLM descriptors in # although they're not currently used. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # include/linux/usb_cdc.h # 2005/03/04 13:27:54-08:00 david-b@pacbell.net +32 -2 # USB: usbnet fix for Zaurus C-860 # # drivers/usb/net/usbnet.c # 2005/03/04 13:42:57-08:00 david-b@pacbell.net +31 -1 # USB: usbnet fix for Zaurus C-860 # # ChangeSet # 2005/03/17 17:34:24-08:00 david-b@pacbell.net # [PATCH] USB: usbnet gets status polling, uses for CDC Ethernet # # This adds status/interrupt transfer infrastructure to "usbnet", and # uses it for CDC Ethernet support. It can be used with other devices # that define an interrupt-IN endpoint (quite a few!), so long as the # meaning of the events is documented (erm, not so many). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/usbnet.c # 2005/02/03 23:10:02-08:00 david-b@pacbell.net +186 -9 # USB: usbnet gets status polling, uses for CDC Ethernet # # ChangeSet # 2005/03/17 17:34:04-08:00 david-b@pacbell.net # [PATCH] USB: ehci and short in-bulk transfers with 20KB+ urbs # # This changes handling of short bulk IN transfers with URB buffers that require # two or more transfer descriptors. The case is rare in most systems, since few # drivers use such large buffers (bigger than 20KB, assuming 4K-aligned). # # The existing code misbehave on at least NEC's EHCI 0.95 silicon, where it seems # to hit a new variant of a silicon quirk relating to dummy TDs. Symptom of the # misbehavior is that the host stops polling on the IN endpoint, and the URB queue # no longer progresses. # # This fix uses simpler logic to detect those short reads, dodging that quirk. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ehci-q.c # 2005/03/03 10:55:26-08:00 david-b@pacbell.net +4 -3 # USB: ehci and short in-bulk transfers with 20KB+ urbs # # ChangeSet # 2005/03/17 17:33:44-08:00 david-b@pacbell.net # [PATCH] USB: ohci zero length control IN transfers # # This fixes a longstanding bug in the OHCI driver, inherited from the 2.4 # code. It also fixes a related comment in the EHCI driver, which came when # the EHCI code was first derived from OHCI. (The EHCI code doesn't have # that bug; the comment was effectively "FIXME add bug".) # # The bug: control-IN transfers with no data stages have status stages with # an IN packet (like a control-OUT transfer), instead of using an OUT packet. # See figure 8-37 of the USB spec. The current code makes trouble with some # peripheral hardware and zero length IN transfers (scarce in the Real World). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-q.c # 2005/03/01 13:28:30-08:00 david-b@pacbell.net +1 -1 # USB: ohci zero length control IN transfers # # drivers/usb/host/ehci-q.c # 2005/03/02 08:59:20-08:00 david-b@pacbell.net +1 -1 # USB: ohci zero length control IN transfers # # ChangeSet # 2005/03/17 17:33:24-08:00 david-b@pacbell.net # [PATCH] USB: usb gadget kconfig tweaks # # This makes two small changes to the gadget Kconfig. # # - It removes SA-1100 support ... if anyone gets around to # finishing that controller driver, it could go back, but # until then there's no real point. # # - The "dummy_hcd" moves to the end, with a comment to please # keep it there. # # Moving that Kconfig entry helps keep "real hardware" as the default # on systems that have it ... otherwise Kconfig will surprise people # with a curious default. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/Kconfig # 2005/02/28 18:57:37-08:00 david-b@pacbell.net +32 -43 # USB: usb gadget kconfig tweaks # # ChangeSet # 2005/03/17 17:33:03-08:00 david-b@pacbell.net # [PATCH] USB: add at91_udc recognition # # Add declarations to recognize the AT91 USB peripheral controller, # as used in various ARMv4T chips including the mmu-ful at91rm9200. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/zero.c # 2005/02/28 18:21:59-08:00 david-b@pacbell.net +2 -0 # USB: add at91_udc recognition # # drivers/usb/gadget/serial.c # 2005/02/28 18:21:59-08:00 david-b@pacbell.net +3 -0 # USB: add at91_udc recognition # # drivers/usb/gadget/gadget_chips.h # 2005/02/28 18:21:59-08:00 david-b@pacbell.net +6 -1 # USB: add at91_udc recognition # # drivers/usb/gadget/file_storage.c # 2005/02/28 18:21:59-08:00 david-b@pacbell.net +4 -0 # USB: add at91_udc recognition # # drivers/usb/gadget/ether.c # 2005/02/28 18:21:59-08:00 david-b@pacbell.net +6 -0 # USB: add at91_udc recognition # # ChangeSet # 2005/03/17 17:13:54-08:00 bunk@stusta.de # [PATCH] remove drivers/usb/image/hpusbscsi.c # # USB_HPUSBSCSI was marked as BROKEN in 2.6.11 since libsane is the # preferred way to access these devices. # # Unless someone plans to resurrect this driver, I'm therefore proposing # this patch to completely remove it. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/image/Makefile # 2005/03/02 07:02:30-08:00 bunk@stusta.de +0 -1 # remove drivers/usb/image/hpusbscsi.c # # drivers/usb/image/Kconfig # 2005/03/03 05:24:33-08:00 bunk@stusta.de +0 -11 # remove drivers/usb/image/hpusbscsi.c # # drivers/usb/Makefile # 2005/03/02 07:02:18-08:00 bunk@stusta.de +0 -1 # remove drivers/usb/image/hpusbscsi.c # # BitKeeper/deleted/.del-hpusbscsi.h~d532117e5fee2a33 # 2005/03/17 17:13:35-08:00 bunk@stusta.de +0 -0 # Delete: drivers/usb/image/hpusbscsi.h # # BitKeeper/deleted/.del-hpusbscsi.c~b365c31f2ad86af1 # 2005/03/17 17:13:35-08:00 bunk@stusta.de +0 -0 # Delete: drivers/usb/image/hpusbscsi.c # # ChangeSet # 2005/03/17 17:09:47-08:00 bunk@stusta.de # [PATCH] drivers/usb/net/pegasus.c: make some code static # # This patch makes some needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/pegasus.c # 2005/02/28 14:27:45-08:00 bunk@stusta.de +4 -3 # drivers/usb/net/pegasus.c: make some code static # # ChangeSet # 2005/03/17 17:09:18-08:00 bunk@stusta.de # [PATCH] drivers/usb/storage/: cleanups # # This patch contains the following cleanups: # - make needlessly global code static # - scsiglue.c: remove the unused usb_stor_sense_notready # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/usb.h # 2005/02/28 14:26:12-08:00 bunk@stusta.de +0 -3 # drivers/usb/storage/: cleanups # # drivers/usb/storage/usb.c # 2005/02/28 14:25:58-08:00 bunk@stusta.de +2 -2 # drivers/usb/storage/: cleanups # # drivers/usb/storage/transport.h # 2005/02/28 14:23:56-08:00 bunk@stusta.de +0 -5 # drivers/usb/storage/: cleanups # # drivers/usb/storage/transport.c # 2005/02/28 14:24:26-08:00 bunk@stusta.de +3 -2 # drivers/usb/storage/: cleanups # # drivers/usb/storage/shuttle_usbat.h # 2005/02/28 14:20:55-08:00 bunk@stusta.de +0 -4 # drivers/usb/storage/: cleanups # # drivers/usb/storage/shuttle_usbat.c # 2005/02/28 14:22:52-08:00 bunk@stusta.de +8 -5 # drivers/usb/storage/: cleanups # # drivers/usb/storage/scsiglue.h # 2005/02/28 14:18:41-08:00 bunk@stusta.de +0 -1 # drivers/usb/storage/: cleanups # # drivers/usb/storage/scsiglue.c # 2005/02/28 14:19:00-08:00 bunk@stusta.de +0 -9 # drivers/usb/storage/: cleanups # # ChangeSet # 2005/03/17 17:07:38-08:00 bunk@stusta.de # [PATCH] drivers/usb/serial/: make some functions static # # This patch makes some needlessly global functions static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/serial/ipw.c # 2005/02/28 14:33:43-08:00 bunk@stusta.de +2 -2 # drivers/usb/serial/: make some functions static # # drivers/usb/serial/garmin_gps.c # 2005/02/28 14:32:50-08:00 bunk@stusta.de +2 -2 # drivers/usb/serial/: make some functions static # # drivers/usb/serial/ftdi_sio.c # 2005/02/28 14:32:13-08:00 bunk@stusta.de +7 -5 # drivers/usb/serial/: make some functions static # # ChangeSet # 2005/03/17 17:04:11-08:00 bunk@stusta.de # [PATCH] USB: possible cleanups # # Before I'm getting flamed to death: # This patch contains possible cleanups. If parts of this patch conflict # with pending changes these parts of my patch have to be dropped. # # This patch contains the following possible cleanups: # - make needlessly global code static # - #if 0 the following unused global functions: # - core/usb.c: usb_buffer_map # - core/usb.c: usb_buffer_unmap # - remove the following unneeded EXPORT_SYMBOL's: # - core/hcd.c: usb_bus_init # - core/hcd.c: usb_alloc_bus # - core/hcd.c: usb_register_bus # - core/hcd.c: usb_deregister_bus # - core/hcd.c: usb_hcd_irq # - core/usb.c: usb_buffer_map # - core/usb.c: usb_buffer_unmap # - core/buffer.c: hcd_buffer_create # - core/buffer.c: hcd_buffer_destroy # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # include/linux/usb.h # 2005/02/28 15:38:40-08:00 bunk@stusta.de +2 -2 # USB: possible cleanups # # drivers/usb/net/kawethfw.h # 2005/02/28 15:10:01-08:00 bunk@stusta.de +4 -4 # USB: possible cleanups # # drivers/usb/net/catc.c # 2005/02/28 15:08:56-08:00 bunk@stusta.de +2 -1 # USB: possible cleanups # # drivers/usb/misc/sisusbvga/sisusb.c # 2005/02/28 15:07:14-08:00 bunk@stusta.de +4 -4 # USB: possible cleanups # # drivers/usb/media/ibmcam.c # 2005/02/28 15:05:09-08:00 bunk@stusta.de +2 -1 # USB: possible cleanups # # drivers/usb/input/aiptek.c # 2005/02/28 15:04:35-08:00 bunk@stusta.de +1 -1 # USB: possible cleanups # # drivers/usb/core/usb.h # 2005/02/28 15:03:31-08:00 bunk@stusta.de +0 -5 # USB: possible cleanups # # drivers/usb/core/usb.c # 2005/02/28 15:37:27-08:00 bunk@stusta.de +9 -5 # USB: possible cleanups # # drivers/usb/core/message.c # 2005/02/28 14:58:25-08:00 bunk@stusta.de +6 -4 # USB: possible cleanups # # drivers/usb/core/hub.c # 2005/02/28 14:56:41-08:00 bunk@stusta.de +2 -1 # USB: possible cleanups # # drivers/usb/core/hcd.h # 2005/02/28 14:52:44-08:00 bunk@stusta.de +0 -1 # USB: possible cleanups # # drivers/usb/core/hcd.c # 2005/02/28 15:27:36-08:00 bunk@stusta.de +1 -6 # USB: possible cleanups # # drivers/usb/core/config.c # 2005/02/28 14:49:04-08:00 bunk@stusta.de +1 -1 # USB: possible cleanups # # drivers/usb/core/buffer.c # 2005/02/28 15:28:42-08:00 bunk@stusta.de +0 -2 # USB: possible cleanups # # ChangeSet # 2005/03/18 00:10:10+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2561/1: CL7500 - core.c init call should be void # # Patch from Ben Dooks # # The init call should not return anything # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-clps7500/core.c # 2005/03/17 23:36:21+00:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2561/1: CL7500 - core.c init call should be void # # ChangeSet # 2005/03/18 00:03:02+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2559/1: CL7500 - fix `__iomem` on VIDC_BASE # # Patch from Ben Dooks # # Add __iomem to VIDC_BASE # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2005/03/17 15:58:54-08:00 elueck@de.ibm.com # [IPV4]: Multipath cache algorithm support. # # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +248 -4 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/fib_semantics.c # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +7 -1 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/fib_lookup.h # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +2 -1 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/fib_hash.c # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +1 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/Makefile # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +4 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/Kconfig # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +48 -0 # [IPV4]: Multipath cache algorithm support. # # include/net/route.h # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +79 -1 # [IPV4]: Multipath cache algorithm support. # # include/net/ip_fib.h # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +12 -0 # [IPV4]: Multipath cache algorithm support. # # include/net/flow.h # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +1 -0 # [IPV4]: Multipath cache algorithm support. # # include/net/dst.h # 2005/03/17 15:58:27-08:00 elueck@de.ibm.com +1 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/multipath_wrandom.c # 2005/03/17 15:58:22-08:00 elueck@de.ibm.com +363 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/multipath_rr.c # 2005/03/17 15:58:22-08:00 elueck@de.ibm.com +103 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/multipath_random.c # 2005/03/17 15:58:22-08:00 elueck@de.ibm.com +116 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/multipath_wrandom.c # 2005/03/17 15:58:22-08:00 elueck@de.ibm.com +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/net/ipv4/multipath_wrandom.c # # net/ipv4/multipath_rr.c # 2005/03/17 15:58:22-08:00 elueck@de.ibm.com +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/net/ipv4/multipath_rr.c # # net/ipv4/multipath_random.c # 2005/03/17 15:58:22-08:00 elueck@de.ibm.com +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/net/ipv4/multipath_random.c # # net/ipv4/multipath_drr.c # 2005/03/17 15:58:21-08:00 elueck@de.ibm.com +284 -0 # [IPV4]: Multipath cache algorithm support. # # net/ipv4/multipath_drr.c # 2005/03/17 15:58:21-08:00 elueck@de.ibm.com +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/net/ipv4/multipath_drr.c # # include/net/ip_mp_alg.h # 2005/03/17 15:58:20-08:00 elueck@de.ibm.com +26 -0 # [IPV4]: Multipath cache algorithm support. # # include/net/ip_mp_alg.h # 2005/03/17 15:58:20-08:00 elueck@de.ibm.com +0 -0 # BitKeeper file /home/davem/src/BK/net-2.6/include/net/ip_mp_alg.h # # include/asm-arm/arch-cl7500/hardware.h # 2005/03/17 23:34:18+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2559/1: CL7500 - fix `__iomem` on VIDC_BASE # # ChangeSet # 2005/03/17 23:54:43+00:00 sascha@de.rmk.(none) # [ARM PATCH] 2555/1: i.MX DMA fix # # Patch from Sascha Hauer # # This patch fixes the dma interrupt acknowledge as mentioned by Nicolas # Pitre here: # http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-March/027349.html # # Signed-off-by: Sascha Hauer # Signed-off-by: Russell King # # arch/arm/mach-imx/dma.c # 2005/03/17 17:39:32+00:00 sascha@de.rmk.(none) +3 -3 # [PATCH] 2555/1: i.MX DMA fix # # ChangeSet # 2005/03/17 14:02:44-08:00 davem@sunset.davemloft.net # [M68KNOMMU]: Use asm-generic/unaligned.h for COLDFIRE. # # Based upon comments from Geert Uytterhoeven. # # Signed-off-by: David S. Miller # # include/asm-m68knommu/unaligned.h # 2005/03/17 14:02:09-08:00 davem@sunset.davemloft.net +1 -9 # [M68KNOMMU]: Use asm-generic/unaligned.h for COLDFIRE. # # ChangeSet # 2005/03/17 22:01:38+00:00 lucasvr@org.rmk.(none) # [ARM PATCH] 2556/1: S3C2400 - defines PHYS_OFFSET at include/asm-arm/arch-s3c2410/memory.h # # Patch from Lucas Correia Villa Real # # This patch defines the PHYS_OFFSET for the S3C2400 cpu at # include/asm-arm/arch-s3c2400/memory.h . This is going to # be used by the GP32 machine. # # Signed-off-by: Lucas Correia Villa Real # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2005/03/17 13:54:31-08:00 davem@sunset.davemloft.net # [ARCH]: Consolidate portable unaligned.h implementations. # # Several architectures do their asm/unaligned.h support support by # simply casting the pointer to a packed strcuture, then deref'ing that # pointer. This forces gcc to assume the object is not aligned # properly. # # This technique originated in Richard Henderson's # asm-alpha/unaligned.h, IA64 uses the same technique as well. # # This works well on RISC systems for two reasons: # # 1) On systems like Alpha, MIPS, et al. which have special # "load unaligned" instructions, GCC knows to emit them # for code like this. # # 2) Even on systems without explicit unaligned load/store instruction # support, the code emitted (basically, byte loads with shifts and # ors) is about the same as what you get when emitting a memmove() # call and you don't need the local stack slot. # # I was going to thus move asm-sparc64/unaligned.h over to such a # scheme, but then I noticed that nobody actually includes the current # memmove() based asm-generic/unaligned.h code. So why not put the # portable packed structure implementation into asm-generic/unaligned.h # and then make asm-{alpha,ia64,sparc64}/unaligned.h simply include that? # # I only had to make minor modifications to the alpha header when placing # it into the generic area. In particular I had to convert some explicit # "unsigned long", "unsigned int" et al. into the arch-agnostic "u64" "u32" # etc. so that even 32-bit platforms could use this. # # Come to think of it I'll make sparc32 use this as well. # # I looked at all the other platform unaligned.h headers: # # I386/X86_64: can do unaligned loads directly # ARM: is trying to be incredibly clever, and open codes the shifts and # ors. I think it would be better if it used something similar to # the packed structure technique. # CRIS: like x86, can do unaligned stuff directly. # FRV: needs help doing unaligned stuff, it probably also could use the # packed structure stuff. # H8300: needs help, could use this new asm-generic/unaligned.h header # M32R: likewise # M68K: can do unaligned access directly. # MIPS: appears to be a copy of the original alpha/ia64 unaligned.h # header, so I converted it to use the new asm-generic/unaligned.h # too # PARISC: is just a copy of asm-sparc/unaligned.h, so I converted it # over to use asm-generic/unaligned.h too # PPC/PPC64: can do unaligned access directly in big-endian mode which # is what the Linux kernel runs in # S390: can do it directly as well # SH/SH64: just has the memmove() code ala asm-sparc/unaligned.h, I # converted it to use asm-generic/unaligned.h # V850: has some clever code just like ARM, so I didn't touch it. # # So this is the patch I came up with. # # Signed-off-by: David S. Miller # # include/asm-sparc64/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -14 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-sparc/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -14 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-sh64/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -12 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-sh/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -13 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-parisc/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -16 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-mips/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -131 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-ia64/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -116 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-generic/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +108 -7 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-alpha/unaligned.h # 2005/03/17 13:54:10-08:00 davem@sunset.davemloft.net +1 -109 # [ARCH]: Consolidate portable unaligned.h implementations. # # include/asm-arm/arch-s3c2410/memory.h # 2005/03/17 19:40:58+00:00 lucasvr@org.rmk.(none) +7 -1 # [PATCH] 2556/1: S3C2400 - defines PHYS_OFFSET at include/asm-arm/arch-s3c2410/memory.h # # ChangeSet # 2005/03/17 21:14:25+00:00 dvrabel@com.rmk.(none) # [ARM PATCH] 2501/2: ixp4xx: support edge triggered gpio irqs # # Patch from David Vrabel # # Adds support for edge triggered GPIO IRQs on IXP4xx. The correct IRQ type (level or edge) is set when the GPIO line is configured (with gpio_line_config(..)). GPIO IRQs default to level triggered since that's the most common type. # # Signed-off-by: David Vrabel # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/common.c # 2005/03/02 16:23:36+00:00 dvrabel@com.rmk.(none) +58 -23 # [PATCH] 2501/2: ixp4xx: support edge triggered gpio irqs # # ChangeSet # 2005/03/17 10:31:09-08:00 yoshfuji@linux-ipv6.org # [NET]: Save space for sk_alloc_slab() failure message. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv6/af_inet6.c # 2005/03/17 10:30:53-08:00 yoshfuji@linux-ipv6.org +6 -9 # [NET]: Save space for sk_alloc_slab() failure message. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv4/af_inet.c # 2005/03/17 10:30:53-08:00 yoshfuji@linux-ipv6.org +5 -9 # [NET]: Save space for sk_alloc_slab() failure message. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/core/sock.c # 2005/03/17 10:30:53-08:00 yoshfuji@linux-ipv6.org +7 -1 # [NET]: Save space for sk_alloc_slab() failure message. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # include/net/sock.h # 2005/03/17 10:30:53-08:00 yoshfuji@linux-ipv6.org +0 -5 # [NET]: Save space for sk_alloc_slab() failure message. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/17 10:05:53-08:00 herbert@gondor.apana.org.au # [IPV4]: Send TCP reset through dst_output in ipt_REJECT # # I noticed that the TCP reset code in ipt_REJECT didn't call dst_output # either so it also bypasses IPsec processing. Here is a patch to fix # that and use the correct MTU value. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_REJECT.c # 2005/03/17 10:05:37-08:00 herbert@gondor.apana.org.au +2 -2 # [IPV4]: Send TCP reset through dst_output in ipt_REJECT # # I noticed that the TCP reset code in ipt_REJECT didn't call dst_output # either so it also bypasses IPsec processing. Here is a patch to fix # that and use the correct MTU value. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/17 18:01:33+00:00 sascha@de.rmk.(none) # [ARM PATCH] 2553/1: imx __REG2 fix # # Patch from Sascha Hauer # # This patch changes the definition of __REG2 not to use conditional # expressions as lvalue, which are deprecated in gcc 3.4 # # Signed-off-by: Sascha Hauer # Signed-off-by: Russell King # # include/asm-arm/arch-imx/hardware.h # 2005/03/17 09:42:18+00:00 sascha@de.rmk.(none) +1 -3 # [PATCH] 2553/1: imx __REG2 fix # # ChangeSet # 2005/03/17 17:53:55+00:00 nico@org.rmk.(none) # [ARM PATCH] 2552/1: ptrace support for accessing iWMMXt regs # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # include/asm-arm/ptrace.h # 2005/03/17 00:00:00+00:00 nico@org.rmk.(none) +3 -0 # [PATCH] 2552/1: ptrace support for accessing iWMMXt regs # # arch/arm/kernel/ptrace.c # 2005/03/17 00:00:00+00:00 nico@org.rmk.(none) +49 -0 # [PATCH] 2552/1: ptrace support for accessing iWMMXt regs # # ChangeSet # 2005/03/17 17:46:33+00:00 cbrake@com.rmk.(none) # [ARM PATCH] 2551/1: Fix timer and CPU leds on Vibren PXA255 IDP Platform # # Patch from Cliff Brake # # This patch fixes the timer and CPU LED (blinky LEDS) logic for the Vibren PXA255 IDP (CONFIG_ARCH_PXA_IDP). # # Signed-off-by: Cliff Brake # Signed-off-by: Russell King # # include/asm-arm/arch-pxa/idp.h # 2005/03/16 19:25:07+00:00 cbrake@com.rmk.(none) +0 -2 # [PATCH] 2551/1: Fix timer and CPU leds on Vibren PXA255 IDP Platform # # arch/arm/mach-pxa/leds-idp.c # 2005/03/16 19:25:07+00:00 cbrake@com.rmk.(none) +9 -7 # [PATCH] 2551/1: Fix timer and CPU leds on Vibren PXA255 IDP Platform # # ChangeSet # 2005/03/17 17:37:53+00:00 lucasvr@org.rmk.(none) # [ARM PATCH] 2549/2: S3C2400 - adds EDO DRAM definitions to regs-mem.h # # Patch from Lucas Correia Villa Real # # This patch defines EDO DRAM for the S3C2400 at # include/asm-arm/arch-s3c2410/regs-mem.h, which is going to be used by # the GP32 machine. # # Signed-off-by: Lucas Correia Villa Real # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-mem.h # 2005/03/13 00:28:05+00:00 lucasvr@org.rmk.(none) +21 -0 # [PATCH] 2549/2: S3C2400 - adds EDO DRAM definitions to regs-mem.h # # ChangeSet # 2005/03/16 20:57:52-08:00 yoshfuji@linux-ipv6.org # [IPV6]: Remove redundant NULL checks before kfree # # I don't mind calling kfree twice itself (because that function is not # so performance critical), but fl_free(NULL) is out because # if fl is NULL, kfree(fl->opt) is out. # # So, what do you think of checking fl inside fl_free like this? # # Based on patch from Jesper Juhl . # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv6/ip6_flowlabel.c # 2005/03/16 20:57:38-08:00 yoshfuji@linux-ipv6.org +4 -7 # [IPV6]: Remove redundant NULL checks before kfree # # I don't mind calling kfree twice itself (because that function is not # so performance critical), but fl_free(NULL) is out because # if fl is NULL, kfree(fl->opt) is out. # # So, what do you think of checking fl inside fl_free like this? # # Based on patch from Jesper Juhl . # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/16 20:56:17-08:00 aaw@rincewind.tv # [AF_KEY]: Fix error handling in pfkey_xfrm_state2msg() # # The pfkey_xfrm_state2msg() was missing a return in an EINVAL statement. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/key/af_key.c # 2005/03/16 20:56:04-08:00 aaw@rincewind.tv +1 -1 # [AF_KEY]: Fix error handling in pfkey_xfrm_state2msg() # # The pfkey_xfrm_state2msg() was missing a return in an EINVAL statement. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/16 20:54:22-08:00 dada1@cosmosbay.com # [IPV4]: Save space in struct inetpeer on 64-bit platforms. # # Signed-off-by: David S. Miller # # include/net/inetpeer.h # 2005/03/16 20:54:07-08:00 dada1@cosmosbay.com +1 -1 # [IPV4]: Save space in struct inetpeer on 64-bit platforms. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/16 20:44:03-08:00 bunk@stusta.de # [IPV4]: Mark a struct static in inetpeer.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # net/ipv4/inetpeer.c # 2005/03/16 20:43:50-08:00 bunk@stusta.de +2 -2 # [IPV4]: Mark a struct static in inetpeer.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # include/net/inetpeer.h # 2005/03/16 20:43:50-08:00 bunk@stusta.de +0 -1 # [IPV4]: Mark a struct static in inetpeer.c # # Signed-off-by: Adrian Bunk # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/16 15:43:34-06:00 shaggy@austin.ibm.com # JFS: Fix hang caused by race waking commit threads # # The flag, jfs_commit_threads_waking, is meant to avoid waking up too # many jfs_commit threads when only one is needed. There is a # possibility that all the threads will be running, and the flag gets # set, but never reset. The fix is to make sure the flag is reset # before a thread sleeps. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_txnmgr.c # 2005/03/16 15:43:17-06:00 shaggy@austin.ibm.com +3 -1 # Reset jfs_commit_threads_waking before going to sleep # # ChangeSet # 2005/03/16 10:15:17-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/1394-2.6 # into modernduck.com:/usr/src/bk/1394-dev # # drivers/ieee1394/raw1394.c # 2005/03/16 10:15:08-05:00 scjody@modernduck.com +0 -0 # Auto merged # # ChangeSet # 2005/03/16 12:26:59+11:00 nathans@sgi.com # [XFS] Provide a mechanism for reporting ihashsize defaults via # /proc/mounts. # # SGI-PV: 931940 # SGI-Modid: xfs-linux-melb:xfs-kern:21841a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vfsops.c # 2005/03/16 12:26:25+11:00 nathans@sgi.com +9 -6 # [XFS] Provide a mechanism for reporting ihashsize defaults via # /proc/mounts. # # fs/xfs/xfs_mount.h # 2005/03/16 12:26:25+11:00 nathans@sgi.com +2 -1 # [XFS] Provide a mechanism for reporting ihashsize defaults via # /proc/mounts. # # fs/xfs/xfs_clnt.h # 2005/03/16 12:26:25+11:00 nathans@sgi.com +2 -1 # [XFS] Provide a mechanism for reporting ihashsize defaults via # /proc/mounts. # # ChangeSet # 2005/03/16 12:17:21+11:00 nathans@sgi.com # [XFS] Further improvements to the default XFS inode hash table sizing # algorithms, resolving regressions reported with the previous change. # # SGI-PV: 931940 # SGI-Modid: xfs-linux-melb:xfs-kern:21839a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_iget.c # 2005/03/16 12:16:49+11:00 nathans@sgi.com +7 -4 # [XFS] Further improvements to the default XFS inode hash table sizing # algorithms, resolving regressions reported with the previous change. # # ChangeSet # 2005/03/15 09:16:28-06:00 shaggy@austin.ibm.com # JFS: Don't clobber wait_queue_head while there are waitors on it # # The resize code closes down the log and reinitializes it in another location # on the disk. The problem is that it re-initializes a wait_queue_head while # there are waitors waiting for the resize to be completed. The result # is that the waitors are never awakened. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_logmgr.c # 2005/03/15 09:15:55-06:00 shaggy@austin.ibm.com +3 -2 # Don't clobber wait_queue_head while there are waitors on it # # ChangeSet # 2005/03/14 23:57:02-08:00 gregkh@suse.de # USB: fix cpia_usb driver's warning messages in the syslog # # This fixes the cpia driver to call usb_kill_urb() instead of # usb_unlink_urb() which reduces the ammount of syslog messages when # kernel debugging is enabled. # # Signed-off-by: Greg Kroah-Hartman # # drivers/media/video/cpia_usb.c # 2005/03/14 23:56:43-08:00 gregkh@suse.de +2 -2 # USB: fix cpia_usb driver's warning messages in the syslog # # This fixes the cpia driver to call usb_kill_urb() instead of # usb_unlink_urb() which reduces the ammount of syslog messages when # kernel debugging is enabled. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2005/03/14 22:57:48-08:00 gregkh@suse.de # [PATCH] USB: minor cleanup of string freeing in core code. # # As pointed out by Paulo Marques # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/config.c # 2005/03/14 16:31:43-08:00 gregkh@suse.de +2 -2 # USB: minor cleanup of string freeing in core code. # # ChangeSet # 2005/03/14 22:57:23-08:00 gregkh@suse.de # [PATCH] USB: optimize the usb-storage device string logic a bit. # # As pointed out by Alan Stern # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/storage/scsiglue.c # 2005/03/14 16:32:38-08:00 gregkh@suse.de +12 -8 # USB: optimize the usb-storage device string logic a bit. # # ChangeSet # 2005/03/14 11:19:59-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # drivers/ieee1394/raw1394.c # 2005/03/14 11:19:50-05:00 scjody@modernduck.com +0 -0 # Auto merged # # ChangeSet # 2005/03/14 09:03:04-06:00 stevef@smfhome.smfdom # [CIFS] whitespace cleanup # # Signed-off-by: Jesper Juhl # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/readdir.c # 2005/03/14 09:02:55-06:00 stevef@smfhome.smfdom +12 -15 # whitespace cleanup # # fs/cifs/file.c # 2005/03/14 09:02:55-06:00 stevef@smfhome.smfdom +294 -317 # whitespace cleanup # # ChangeSet # 2005/03/10 12:43:32+11:00 nathans@sgi.com # [XFS] reinstate missed copyright date updates. # # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vnodeops.c # 2005/03/10 12:43:00+11:00 nathans@sgi.com +1 -1 # [XFS] reinstate missed copyright date updates. # # fs/xfs/linux-2.6/xfs_vfs.h # 2005/03/10 12:43:00+11:00 nathans@sgi.com +1 -1 # [XFS] reinstate missed copyright date updates. # # fs/xfs/linux-2.6/xfs_vfs.c # 2005/03/10 12:43:00+11:00 nathans@sgi.com +1 -1 # [XFS] reinstate missed copyright date updates. # # ChangeSet # 2005/03/10 12:37:19+11:00 nathans@sgi.com # [XFS] reinstate a missed xfs_iget check on is_bad_inode. # # Signed-off-by: Nathan Scott # # fs/xfs/xfs_iget.c # 2005/03/10 12:36:48+11:00 nathans@sgi.com +5 -0 # [XFS] reinstate a missed xfs_iget check on is_bad_inode. # # ChangeSet # 2005/03/10 12:19:57+11:00 nathans@sgi.com # [XFS] Steve noticed we were duplicating some work the block layer can do # for us; switch to SYNC_READ/WRITE for some metadata buffers. # # SGI-PV: 931924 # SGI-Modid: xfs-linux-melb:xfs-kern:21771a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_buf.c # 2005/03/10 12:19:26+11:00 nathans@sgi.com +9 -8 # [XFS] Steve noticed we were duplicating some work the block layer can do # for us; switch to SYNC_READ/WRITE for some metadata buffers. # # ChangeSet # 2005/03/10 12:16:11+11:00 nathans@sgi.com # [XFS] remove non-helpful inode shakers # # SGI-PV: 931920 # SGI-Modid: xfs-linux-melb:xfs-kern:189108a # Signed-off-by: Christoph Hellwig # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_super.c # 2005/03/10 12:15:39+11:00 nathans@sgi.com +0 -23 # [XFS] remove non-helpful inode shakers # # fs/xfs/linux-2.6/kmem.h # 2005/03/10 12:15:39+11:00 nathans@sgi.com +0 -6 # [XFS] remove non-helpful inode shakers # # ChangeSet # 2005/03/10 11:25:28+11:00 nathans@sgi.com # Merge sgi.com:/source2/linux-2.6 into sgi.com:/source2/xfs-linux-2.6 # # fs/xfs/xfs_da_btree.c # 2005/03/10 11:25:07+11:00 nathans@sgi.com +0 -0 # Auto merged # # ChangeSet # 2005/03/09 15:08:09+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update Assabet and related Neponset default configuration. # # Signed-off-by: Russell King # # arch/arm/configs/neponset_defconfig # 2005/03/09 15:02:39+00:00 rmk@flint.arm.linux.org.uk +611 -355 # Update Assabet and related Neponset default configuration. # # arch/arm/configs/assabet_defconfig # 2005/03/09 15:02:38+00:00 rmk@flint.arm.linux.org.uk +237 -231 # Update Assabet and related Neponset default configuration. # # ChangeSet # 2005/03/09 14:53:10+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update RiscPC default configuration # # Signed-off-by: Russell King # # arch/arm/configs/rpc_defconfig # 2005/03/09 14:47:53+00:00 rmk@flint.arm.linux.org.uk +530 -367 # Update RiscPC default configuration # # ChangeSet # 2005/03/07 15:13:46-05:00 scjody@modernduck.com # convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Domen Puncer # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/03/07 15:13:23-05:00 scjody@modernduck.com +1 -1 # convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Domen Puncer # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/03/07 15:13:23-05:00 scjody@modernduck.com +1 -1 # convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Domen Puncer # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/03/07 14:56:08-05:00 scjody@modernduck.com # Fix comment to match reality. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/03/07 14:55:45-05:00 scjody@modernduck.com +1 -1 # Fix comment to match reality. # # ChangeSet # 2005/03/07 14:54:30-05:00 scjody@modernduck.com # Fix end of line to match linux1394.org SVN and be <80 chars. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/03/07 14:54:07-05:00 scjody@modernduck.com +2 -1 # Fix end of line to match linux1394.org SVN and be <80 chars. # # ChangeSet # 2005/03/07 14:02:01-05:00 scjody@modernduck.com # # Fix a partial conversion to unlocked_ioctl(). # # drivers/ieee1394/dv1394.c: In function `handle_dv1394_init': # drivers/ieee1394/dv1394.c:2529: warning: comparison of distinct pointer types lacks a cast # drivers/ieee1394/dv1394.c: In function `handle_dv1394_get_status': # drivers/ieee1394/dv1394.c:2559: warning: comparison of distinct pointer types lacks a cast # drivers/ieee1394/dv1394.c: In function `dv1394_compat_ioctl': # drivers/ieee1394/dv1394.c:2593: warning: unused variable `err' # # # Signed-off-by: Andrew Morton # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/dv1394.c # 2005/03/07 14:01:00-05:00 scjody@modernduck.com +4 -7 # # Fix a partial conversion to unlocked_ioctl(). # # drivers/ieee1394/dv1394.c: In function `handle_dv1394_init': # drivers/ieee1394/dv1394.c:2529: warning: comparison of distinct pointer types lacks a cast # drivers/ieee1394/dv1394.c: In function `handle_dv1394_get_status': # drivers/ieee1394/dv1394.c:2559: warning: comparison of distinct pointer types lacks a cast # drivers/ieee1394/dv1394.c: In function `dv1394_compat_ioctl': # drivers/ieee1394/dv1394.c:2593: warning: unused variable `err' # # # Signed-off-by: Andrew Morton # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/03/07 12:55:26+11:00 roehrich@sgi.com # [XFS] fix DMAPI & NOSPACE data corruption # # SGI-PV: 931297 # SGI-Modid: xfs-linux:xfs-kern:188833a # Signed-off-by: Dean Roehrich # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_lrw.c # 2005/03/07 12:54:58+11:00 roehrich@sgi.com +1 -0 # [XFS] fix DMAPI & NOSPACE data corruption # # ChangeSet # 2005/03/07 12:54:09+11:00 gnb@sgi.com # [XFS] Make XFS provide encoding and decoding callbacks from knfsd which # encode the fileid portion of the NFS filehandle differently than the # default functions. The new fileid formats allow filesystems mounted with # "inode64" to be exported over NFSv3 (and NFSv2 if you also use the # "no_subtree_check" export option). # # SGI-PV: 902621 # SGI-Modid: xfs-linux:xfs-kern:21686a # Signed-off-by: Greg Banks # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_export.h # 2005/03/07 12:53:36+11:00 gnb@sgi.com +122 -0 # # fs/xfs/linux-2.6/xfs_export.h # 2005/03/07 12:53:36+11:00 gnb@sgi.com +0 -0 # BitKeeper file /source2/xfs-linux-2.6/fs/xfs/linux-2.6/xfs_export.h # # fs/xfs/linux-2.6/xfs_export.c # 2005/03/07 12:53:36+11:00 gnb@sgi.com +97 -22 # [XFS] Make XFS provide encoding and decoding callbacks from knfsd which # encode the fileid portion of the NFS filehandle differently than the # default functions. The new fileid formats allow filesystems mounted with # "inode64" to be exported over NFSv3 (and NFSv2 if you also use the # "no_subtree_check" export option). For filesystems without "inode64", the # file handles are binary compatible with the old ones, so it should be # possible to upgrade a server without unmounting clients. # # ChangeSet # 2005/03/07 12:52:40+11:00 tes@sgi.com # [XFS] Revokes revision 1.37 of xfs_acl.c. It caused CAPP evaluation to # break as it always requires exec permission for directories when the aim # was really meant for non-dir executables. See pv#930290. # # SGI-PV: 930290 # SGI-Modid: xfs-linux:xfs-kern:21668a # Signed-off-by: Tim Shimmin # Signed-off-by: Nathan Scott # # fs/xfs/xfs_acl.c # 2005/03/07 12:52:09+11:00 tes@sgi.com +4 -41 # [XFS] Revokes revision 1.37 of xfs_acl.c. It caused CAPP evaluation to # break as it always requires exec permission for directories when the aim # was really meant for non-dir executables. See pv#930290. # # ChangeSet # 2005/03/07 12:51:26+11:00 hch@sgi.com # [XFS] Fix and streamline directory inode number handling # # SGI-PV: 930401 # SGI-Modid: xfs-linux:xfs-kern:187996a # Signed-off-by: Christoph Hellwig # Signed-off-by: Nathan Scott # # fs/xfs/xfs_dir_sf.h # 2005/03/07 12:50:57+11:00 hch@sgi.com +2 -2 # [XFS] Fix and streamline directory inode number handling # # fs/xfs/xfs_dir_leaf.h # 2005/03/07 12:50:57+11:00 hch@sgi.com +0 -3 # [XFS] Fix and streamline directory inode number handling # # fs/xfs/xfs_dir_leaf.c # 2005/03/07 12:50:57+11:00 hch@sgi.com +3 -3 # [XFS] Fix and streamline directory inode number handling # # fs/xfs/xfs_dir2_sf.h # 2005/03/07 12:50:57+11:00 hch@sgi.com +4 -9 # [XFS] Fix and streamline directory inode number handling # # fs/xfs/xfs_dir.c # 2005/03/07 12:50:57+11:00 hch@sgi.com +2 -2 # [XFS] Fix and streamline directory inode number handling # # fs/xfs/xfs_arch.h # 2005/03/07 12:50:57+11:00 hch@sgi.com +46 -78 # [XFS] Fix and streamline directory inode number handling # # ChangeSet # 2005/03/07 12:47:06+11:00 roehrich@sgi.com # [XFS] Update copyright to 2005 # # SGI-PV: 929263 # SGI-Modid: xfs-linux:xfs-kern:187126a # Signed-off-by: Dean Roehrich # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_file.c # 2005/03/07 12:46:35+11:00 roehrich@sgi.com +1 -1 # [XFS] Update copyright to 2005 # # ChangeSet # 2005/03/07 12:44:25+11:00 roehrich@sgi.com # [XFS] dmapi - Execution of an offline script or binary fails. If a user # thread is trying to execute the file that is offline then the HSM won't # get write access when it attempts invisible I/O to bring it online because # the user thread has already denied write access...but that thread is # waiting for us to write the file.... So add a callout from open_exec() to # give DMAPI an early notice that the file must be online. # # SGI-PV: 929263 # SGI-Modid: xfs-linux:xfs-kern:186543a # Signed-off-by: Dean Roehrich # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_file.c # 2005/03/07 12:43:54+11:00 roehrich@sgi.com +35 -0 # [XFS] dmapi - Execution of an offline script or binary fails. If a user # thread is trying to execute the file that is offline then the HSM won't # get write access when it attempts invisible I/O to bring it online because # the user thread has already denied write access...but that thread is # waiting for us to write the file.... So add a callout from open_exec() to # give DMAPI an early notice that the file must be online. # # ChangeSet # 2005/03/07 12:38:16+11:00 hch@sgi.com # [XFS] pagebuf_lock_value is also needed for trace builds # # SGI-PV: 928101 # SGI-Modid: xfs-linux:xfs-kern:185972a # Signed-off-by: Christoph Hellwig # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_buf.c # 2005/03/07 12:37:45+11:00 hch@sgi.com +1 -1 # [XFS] pagebuf_lock_value is also needed for trace builds # # ChangeSet # 2005/03/07 12:37:01+11:00 hch@sgi.com # [XFS] Remove INT_ZERO and INT_ISZERO # # SGI-PV: 928382 # SGI-Modid: xfs-linux:xfs-kern:185768a # Signed-off-by: Christoph Hellwig # Signed-off-by: Nathan Scott # # fs/xfs/xfs_log_recover.c # 2005/03/07 12:36:32+11:00 hch@sgi.com +6 -6 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_log.c # 2005/03/07 12:36:32+11:00 hch@sgi.com +5 -5 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_inode.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +8 -8 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_ialloc.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +2 -2 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_fsops.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +8 -8 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dir_leaf.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +20 -20 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dir2_node.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +10 -10 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dir2_leaf.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +11 -11 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dir2_data.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +18 -18 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dir2_block.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +4 -4 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dir2.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +1 -1 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_dinode.h # 2005/03/07 12:36:31+11:00 hch@sgi.com +1 -1 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_da_btree.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +11 -11 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_btree.c # 2005/03/07 12:36:31+11:00 hch@sgi.com +6 -6 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_bmap.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +1 -1 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_attr_leaf.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +30 -30 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_attr.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +1 -1 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_arch.h # 2005/03/07 12:36:30+11:00 hch@sgi.com +0 -6 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_alloc_btree.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +1 -1 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/xfs_alloc.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +3 -3 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/quota/xfs_trans_dquot.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +5 -5 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/quota/xfs_quota_priv.h # 2005/03/07 12:36:30+11:00 hch@sgi.com +10 -10 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/quota/xfs_qm_syscalls.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +2 -4 # [XFS] Remove INT_ZERO and INT_ISZERO # # fs/xfs/quota/xfs_dquot.c # 2005/03/07 12:36:30+11:00 hch@sgi.com +25 -27 # [XFS] Remove INT_ZERO and INT_ISZERO # # ChangeSet # 2005/03/07 12:35:06+11:00 hch@sgi.com # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # SGI-PV: 928382 # SGI-Modid: xfs-linux:xfs-kern:185644a # Signed-off-by: Christoph Hellwig # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vnodeops.c # 2005/03/07 12:34:34+11:00 hch@sgi.com +1 -1 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_mount.h # 2005/03/07 12:34:34+11:00 hch@sgi.com +1 -2 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_mount.c # 2005/03/07 12:34:34+11:00 hch@sgi.com +6 -13 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_macros.c # 2005/03/07 12:34:34+11:00 hch@sgi.com +32 -141 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_log_recover.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +14 -14 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_log_priv.h # 2005/03/07 12:34:33+11:00 hch@sgi.com +9 -9 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_log.h # 2005/03/07 12:34:33+11:00 hch@sgi.com +9 -20 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_log.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +28 -30 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_itable.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +164 -112 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_inode_item.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +2 -2 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_inode.h # 2005/03/07 12:34:33+11:00 hch@sgi.com +3 -2 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_inode.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +41 -40 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_ialloc_btree.h # 2005/03/07 12:34:33+11:00 hch@sgi.com +10 -12 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_ialloc_btree.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +4 -12 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_ialloc.c # 2005/03/07 12:34:33+11:00 hch@sgi.com +16 -17 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_fsops.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +1 -1 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir_sf.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +3 -9 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir_leaf.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +1 -3 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir_leaf.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +15 -15 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_sf.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +27 -34 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_sf.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +47 -49 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_node.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +1 -1 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_leaf.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +4 -4 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_leaf.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +9 -9 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_data.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +5 -6 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_data.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +17 -17 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_block.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +5 -6 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir2_block.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +15 -15 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dir.c # 2005/03/07 12:34:32+11:00 hch@sgi.com +4 -4 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_dinode.h # 2005/03/07 12:34:32+11:00 hch@sgi.com +47 -109 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_bmap_btree.h # 2005/03/07 12:34:31+11:00 hch@sgi.com +2 -2 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_bmap_btree.c # 2005/03/07 12:34:31+11:00 hch@sgi.com +2 -2 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/xfs_arch.h # 2005/03/07 12:34:31+11:00 hch@sgi.com +0 -25 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # fs/xfs/linux-2.6/xfs_ioctl.c # 2005/03/07 12:34:31+11:00 hch@sgi.com +1 -1 # [XFS] Stop passing ARCH_CONVERT/ARCH_NOCONVERT around everywhere # # ChangeSet # 2005/03/07 11:53:40+11:00 hch@sgi.com # [XFS] Don't dereference user pointers in xattr by handle ioctls # # SGI-PV: 930402 # SGI-Modid: xfs-linux:xfs-kern:187995a # Signed-off-by: Christoph Hellwig # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_ioctl.c # 2005/03/07 11:52:57+11:00 hch@sgi.com +164 -70 # [XFS] Don't dereference user pointers in xattr by handle ioctls # # ChangeSet # 2005/03/06 13:16:02+00:00 rmk@flint.arm.linux.org.uk # [ARM] Remove arch/arm/configs/a5k_defconfig # # A5000 is no longer supported by ARM, but by ARM26. # # Signed-off-by: Russell King # # BitKeeper/deleted/.del-a5k_defconfig~ad01c7e52317edbf # 2005/03/06 13:10:24+00:00 rmk@flint.arm.linux.org.uk +0 -0 # Delete: arch/arm/configs/a5k_defconfig # # ChangeSet # 2005/03/05 13:32:17-05:00 scjody@modernduck.com # # Description: Use wait_event_interruptible() instead of the deprecated # interruptible_sleep_on(). Add a helper function to make the condition # for wait_event_interruptible() sane and lock-safe. Patch is compile-tested. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/03/05 13:31:10-05:00 scjody@modernduck.com +16 -15 # # Description: Use wait_event_interruptible() instead of the deprecated # interruptible_sleep_on(). Add a helper function to make the condition # for wait_event_interruptible() sane and lock-safe. Patch is compile-tested. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/03/05 14:07:36+00:00 bunk@de.rmk.(none) # [ARM] NR_CPUS: use range # # Patch from Adrian Bunk # # The patch below uses range for NR_CPUS on arm (the same is already # done on all other architectures). # # Signed-off-by: Adrian Bunk # # arch/arm/Kconfig # 2005/03/05 14:02:18+00:00 bunk@de.rmk.(none) +1 -0 # [PATCH] arm: NR_CPUS: use range # # ChangeSet # 2005/03/05 13:03:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Remove depends on/default y from FIQ configuration # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 12:57:58+00:00 rmk@flint.arm.linux.org.uk +3 -5 # Remove depends on/default y from FIQ configuration # # ChangeSet # 2005/03/05 12:46:29+00:00 rmk@flint.arm.linux.org.uk # [ARM] Simplify LEDs dependencies # # The LED dependencies were getting completely out of hand, and # weren't obvious what was actually intended. Simplify them so # that it's easlier to understand, and wrap overly long lines. # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 12:38:39+00:00 rmk@flint.arm.linux.org.uk +11 -5 # Simplify LEDs dependencies # # ChangeSet # 2005/03/05 12:18:43+00:00 rmk@flint.arm.linux.org.uk # [ARM] We're always CPU_32, so remove dependencies on this symbol # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 12:13:32+00:00 rmk@flint.arm.linux.org.uk +1 -3 # We're always CPU_32, so remove this dependency # # ChangeSet # 2005/03/05 12:10:59+00:00 rmk@flint.arm.linux.org.uk # [ARM] Group more options into their own separate menus # # Group boot options, floating point emulation, userspace binary # formats, and power management into their own separate menus. # # arch/arm/Kconfig # 2005/03/05 12:04:52+00:00 rmk@flint.arm.linux.org.uk +35 -21 # Group boot options, floating point emulation, userspace binary # formats, and power management into their own separate menus # # ChangeSet # 2005/03/05 11:58:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Group device drivers together under their own menu # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 11:53:47+00:00 rmk@flint.arm.linux.org.uk +18 -15 # Group device drivers together under their own menu # # ChangeSet # 2005/03/05 11:48:07+00:00 rmk@flint.arm.linux.org.uk # [ARM] Group kernel features together under their own menu # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 11:42:44+00:00 rmk@flint.arm.linux.org.uk +70 -70 # Group kernel features together under their own menu. # # ChangeSet # 2005/03/05 11:38:44+00:00 rmk@flint.arm.linux.org.uk # [ARM] Group bus support options together under own menu # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 11:27:19+00:00 rmk@flint.arm.linux.org.uk +51 -48 # Group bus support options together, and place them under their # own menu. # # ChangeSet # 2005/03/05 11:21:36+00:00 rmk@flint.arm.linux.org.uk # [ARM] Move "common" Kconfig symbols to arch/arm/common/Kconfig # # Move ICST525, ICST307, SA1111, DMABOUNCE, TIMER_ACORN, SHARP_LOCOMO # and SHARP_SCOOP to arch/arm/common/Kconfig # # arch/arm/Kconfig # 2005/03/05 11:16:21+00:00 rmk@flint.arm.linux.org.uk +1 -23 # Move ICST525, ICST307, SA1111, DMABOUNCE, TIMER_ACORN, SHARP_LOCOMO # and SHARP_SCOOP to arch/arm/common/Kconfig # # ChangeSet # 2005/03/05 11:12:44+00:00 rmk@flint.arm.linux.org.uk # [ARM] Use select for DMABOUNCE, SA1111, SHARP_LOCOMO and SHARP_SCOOP # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 11:00:08+00:00 rmk@flint.arm.linux.org.uk +2 -8 # Remove depends on/default y for DMABOUNCE, SA1111, SHARP_LOCOMO # and SHARP_SCOOP # # arch/arm/mach-sa1100/Kconfig # 2005/03/05 11:00:03+00:00 rmk@flint.arm.linux.org.uk +5 -1 # Add select for SA1111, SHARP_SCOOP and SHARP_LOCOMO # # arch/arm/mach-pxa/Kconfig # 2005/03/05 10:59:57+00:00 rmk@flint.arm.linux.org.uk +3 -0 # Add select for SA1111, SHARP_SCOOP and SHARP_LOCOMO # # arch/arm/common/Kconfig # 2005/03/05 10:48:23+00:00 rmk@flint.arm.linux.org.uk +21 -0 # # arch/arm/common/Kconfig # 2005/03/05 10:48:23+00:00 rmk@flint.arm.linux.org.uk +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-config/arch/arm/common/Kconfig # # ChangeSet # 2005/03/05 10:27:08+00:00 rmk@flint.arm.linux.org.uk # [ARM] Use select for some hidden ARM configuration symbols # # Convert ARCH_ACORN, TIMER_ACORN, ICST525, ICST307 and ARM_AMBA # to be controlled via "select" rather than "default y" and # "depends on" # # Signed-off-by: Russell King # # arch/arm/Kconfig # 2005/03/05 10:20:20+00:00 rmk@flint.arm.linux.org.uk +10 -11 # Convert ARCH_ACORN, TIMER_ACORN, ICST525, ICST307 and ARM_AMBA # to be controlled via "select" rather than "default y" and # "depends on" # # ChangeSet # 2005/02/24 10:47:48-05:00 scjody@modernduck.com # ohci1394.c allocates the legacy IR DMA Context on demand. This happens in IRQ # path resulting in call to dma_pool_create from within interrupt. Same is true # for de-allocation of the IR DMA Context - it happens again in IRQ path # resulting in call to dma_pool_destroy. # # After attempting to fix the above by using schedule_work for delayed # allocation and de-allocation, it was determined that it should be fixed # simply by moving the allocation to the drivers probe() function and # de-allocation to remove() function. This way it reduces the complexity and # does not result into any significant wastage of resources. # # This patch also fixes duplicate pci pool names and removes spaces from the # names to make it easier for parsing by scripts. # # Thanks go to Dave Brownell for greatly simplifying this. # # Signed-off-by: Parag Warudkar # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/02/24 10:47:23-05:00 scjody@modernduck.com +50 -30 # ohci1394.c allocates the legacy IR DMA Context on demand. This happens in IRQ # path resulting in call to dma_pool_create from within interrupt. Same is true # for de-allocation of the IR DMA Context - it happens again in IRQ path # resulting in call to dma_pool_destroy. # # After attempting to fix the above by using schedule_work for delayed # allocation and de-allocation, it was determined that it should be fixed # simply by moving the allocation to the drivers probe() function and # de-allocation to remove() function. This way it reduces the complexity and # does not result into any significant wastage of resources. # # This patch also fixes duplicate pci pool names and removes spaces from the # names to make it easier for parsing by scripts. # # Thanks go to Dave Brownell for greatly simplifying this. # # Signed-off-by: Parag Warudkar # # ChangeSet # 2005/02/23 17:17:28-05:00 scjody@modernduck.com # Move hpsb_unregister_protocol, which fixes a hang on rmmod # experienced by Parag Warudkar # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/02/23 17:17:04-05:00 scjody@modernduck.com +1 -1 # Move hpsb_unregister_protocol, which fixes a hang on rmmod # experienced by Parag Warudkar # # ChangeSet # 2005/02/15 13:13:47-05:00 scjody@modernduck.com # This should fix u32 vs. pm_message_t confusion in firewire. No code # changes. Please apply, # Pavel # Signed-off-by: Pavel Machek # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/02/15 13:13:22-05:00 scjody@modernduck.com +1 -1 # This should fix u32 vs. pm_message_t confusion in firewire. No code # changes. Please apply, # Pavel # Signed-off-by: Pavel Machek # # drivers/ieee1394/nodemgr.c # 2005/02/15 13:13:21-05:00 scjody@modernduck.com +1 -1 # This should fix u32 vs. pm_message_t confusion in firewire. No code # changes. Please apply, # Pavel # Signed-off-by: Pavel Machek # # ChangeSet # 2005/02/10 14:23:38-05:00 scjody@modernduck.com # # sbp2: add precautionary log notice to new exit branch from last # patch # # Signed-off-by: Stefan Richter # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/02/10 14:23:13-05:00 scjody@modernduck.com +1 -0 # # sbp2: add precautionary log notice to new exit branch from last # patch # # Signed-off-by: Stefan Richter # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/02/10 14:22:20-05:00 scjody@modernduck.com # # apply patch from Nishanth Aravamudan to use # sleep_interruptible for clarity and prevent early return on wait_queue # events. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/02/10 14:21:56-05:00 scjody@modernduck.com +6 -3 # # apply patch from Nishanth Aravamudan to use # sleep_interruptible for clarity and prevent early return on wait_queue # events. # # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/02/10 13:08:56-05:00 scjody@modernduck.com # # Change the initialization message for eth1394 to KERN_INFO, requested by # Steffen Zieger # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/02/10 13:08:32-05:00 scjody@modernduck.com +1 -1 # # Change the initialization message for eth1394 to KERN_INFO, requested by # Steffen Zieger # # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/02/10 13:02:21-05:00 scjody@modernduck.com # Description: Use wait_event_interruptible() instead of the deprecated # interruptible_sleep_on(). The first change is simply to clean up the code a # little to make it clearer. The second actually does a replacement, mimicking # exactly the first. I removed the #if 1/#else/endif logic, as it duplicated the # same code. Patch is compile-tested. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/02/10 13:01:31-05:00 scjody@modernduck.com +6 -16 # Description: Use wait_event_interruptible() instead of the deprecated # interruptible_sleep_on(). The first change is simply to clean up the code a # little to make it clearer. The second actually does a replacement, mimicking # exactly the first. I removed the #if 1/#else/endif logic, as it duplicated the # same code. Patch is compile-tested. # # Signed-off-by: Nishanth Aravamudan # # --- 2.6.11-rc2-kj-v/drivers/ieee1394/video1394.c 2005-01-24 09:34:07.000000000 -0800 # +++ 2.6.11-rc2-kj/drivers/ieee1394/video1394.c 2005-01-24 15:06:16.000000000 -0800 # @@ -964,10 +964,9 @@ static int __video1394_ioctl(struct file # } # } # #else # - if (wait_event_interruptible(d->waitq, # - d->buffer_status[v.buffer] # - == VIDEO1394_BUFFER_READY) # - == -ERESTARTSYS) # + wait_event_interruptible(d->waitq, # + (d->buffer_status[v.buffer] == VIDEO1394_BUFFER_READY)); # + if (signal_pending(current)) # return -EINTR; # #endif # d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; # @@ -1126,19 +1125,10 @@ static int __video1394_ioctl(struct file # d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; # return 0; # case VIDEO1394_BUFFER_QUEUED: # -#if 1 # - while (d->buffer_status[v.buffer]!= # - VIDEO1394_BUFFER_READY) { # - interruptible_sleep_on(&d->waitq); # - if (signal_pending(current)) return -EINTR; # - } # -#else # - if (wait_event_interruptible(d->waitq, # - d->buffer_status[v.buffer] # - == VIDEO1394_BUFFER_READY) # - == -ERESTARTSYS) # + wait_event_interruptible(d->waitq, # + (d->buffer_status[v.buffer] == VIDEO1394_BUFFER_READY)); # + if (signal_pending(current)) # return -EINTR; # -#endif # d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; # return 0; # default: # Signed-off-by: Jody McIntyre # diff -Nru a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt --- a/Documentation/cachetlb.txt 2005-03-30 16:58:48 -08:00 +++ b/Documentation/cachetlb.txt 2005-03-30 16:58:48 -08:00 @@ -142,6 +142,11 @@ The ia64 sn2 platform is one example of a platform that uses this interface. +8) void lazy_mmu_prot_update(pte_t pte) + This interface is called whenever the protection on + any user PTEs change. This interface provides a notification + to architecture specific code to take appropiate action. + Next, we have the cache flushing interfaces. In general, when Linux is changing an existing virtual-->physical mapping to a new value, diff -Nru a/Documentation/cdrom/mcd b/Documentation/cdrom/mcd --- a/Documentation/cdrom/mcd 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,4 +0,0 @@ -This driver does not support XA or MultiSession CDs (PhotoCDs). Use the -experimental driver mcdx.c for that. - -You can use mcd for one interface, and mcdx for another. diff -Nru a/Documentation/cdrom/mcdx b/Documentation/cdrom/mcdx --- a/Documentation/cdrom/mcdx 2005-03-30 16:58:49 -08:00 +++ b/Documentation/cdrom/mcdx 2005-03-30 16:58:49 -08:00 @@ -1,16 +1,3 @@ -This is a first attempt to create an `improved' driver for the Mitsumi drives. -It is able to "live together" with mcd.c, if you have at least two Mitsumi -drives: each driver can use its own drive. - -To allow this "coexistence" as long as mcdx.c is not a superset of mcd.c, -this driver has to use its own device files. We use MAJOR 20 for it. So, -you have to do - - # mknod /dev/mcdx0 b 20 0 - # mknod /dev/mcdx1 b 20 1 - -and so on, one entry for each drive to support, once. - If you are using the driver as a module, you can specify your ports and IRQs like @@ -25,9 +12,7 @@ ordinary CDs; o supports up to 5 drives (of course, you'll need free IRQs, i/o ports and slots); - o uses much less kernel memory than the standard mcd driver - (no extra driver internal buffers!). - o plays audio (like the `old' driver, I hope) + o plays audio This version doesn't support yet: diff -Nru a/Documentation/cdrom/packet-writing.txt b/Documentation/cdrom/packet-writing.txt --- a/Documentation/cdrom/packet-writing.txt 2005-03-30 16:58:47 -08:00 +++ b/Documentation/cdrom/packet-writing.txt 2005-03-30 16:58:47 -08:00 @@ -62,6 +62,14 @@ # mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime +Packet writing for DVD-RAM media +-------------------------------- + +DVD-RAM discs are random writable, so using the pktcdvd driver is not +necessary. However, using the pktcdvd driver can improve performance +in the same way it does for DVD+RW media. + + Notes ----- diff -Nru a/Documentation/dvb/README.dibusb b/Documentation/dvb/README.dibusb --- a/Documentation/dvb/README.dibusb 2005-03-30 16:58:47 -08:00 +++ b/Documentation/dvb/README.dibusb 2005-03-30 16:58:47 -08:00 @@ -1,7 +1,7 @@ -Documentation for dib3000mb frontend driver and dibusb device driver +Documentation for dib3000* frontend drivers and dibusb device driver ==================================================================== -Copyright (C) 2004 Patrick Boettcher (patrick.boettcher@desy.de), +Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de), dibusb and dib3000mb/mc drivers based on GPL code, which has @@ -46,7 +46,7 @@ Others: ------- -- Ultima Electronic/Artec T1 USB TVBOX (AN2135, AN2235, AN2235 with Panasonic Tuner) +- Ultima Electronic/Artec T1 USB TVBOX (AN2135, AN2235, AN2235 with Panasonic Tuner) http://82.161.246.249/products-tvbox.html - Compro Videomate DVB-U2000 - DVB-T USB (2) @@ -74,19 +74,27 @@ - Artec T1 USB TVBOX (FX2) (2) +- Hauppauge WinTV NOVA-T USB2 + http://www.hauppauge.com/ + +- KWorld/ADSTech Instant DVB-T USB2.0 (DiB3000M-B) + - DiBcom USB2.0 DVB-T reference device (non-public) 1) It is working almost. -2) No test reports received yet. +2) No test reports received yet. 0. NEWS: - 2004-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb + 2005-02-11 - added support for the KWorld/ADSTech Instant DVB-T USB2.0. Thanks a lot to Joachim von Caron + 2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2 + 2005-01-31 - distorted streaming is finally gone for USB1.1 devices + 2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb - first almost working version for HanfTek UMT-010 - - found out, that Yakumo/HAMA/Typhoon are predessors of the HanfTek - 2004-01-10 - refactoring completed, now everything is very delightful + - found out, that Yakumo/HAMA/Typhoon are predessors of the HanfTek UMT-010 + 2005-01-10 - refactoring completed, now everything is very delightful - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a - Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich. + Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich. 2004-12-29 - after several days of struggling around bug of no returning URBs fixed. 2004-12-26 - refactored the dibusb-driver, splitted into separate files - i2c-probing enabled @@ -106,7 +114,7 @@ 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek) 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks to Amaury Demol for reporting - - changed usb TS transfer method (several urbs, stopping transfer + - changed usb TS transfer method (several urbs, stopping transfer before setting a new pid) 2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks to Christian Motschke for reporting @@ -149,13 +157,20 @@ can get it directly via for USB1.1 (AN2135) -http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-5.0.0.11.fw?rev=1.1&content-type=text/plain +http://www.linuxtv.org/downloads/firmware/dvb-dibusb-5.0.0.11.fw for USB1.1 (AN2235) (a few Artec T1 devices) -http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-an2235-1.fw?rev=1.1&content-type=text/plain +http://www.linuxtv.org/downloads/firmware/dvb-dibusb-an2235-1.fw + +for USB2.0 (FX2) Hauppauge, DiBcom +http://www.linuxtv.org/downloads/firmware/dvb-dibusb-6.0.0.5.fw + +for USB2.0 ADSTech/Kworld USB2.0 +http://www.linuxtv.org/downloads/firmware/dvb-dibusb-adstech-usb2-1.fw + +for USB2.0 HanfTek +http://www.linuxtv.org/downloads/firmware/dvb-dibusb-an2235-1.fw -for USB2.0 (FX2) -http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-6.0.0.5.fw?rev=1.1&content-type=text/plain 1.2. Compiling @@ -191,13 +206,13 @@ At this point you should be able to start a dvb-capable application. For myself I used mplayer, dvbscan, tzap and kaxtv, they are working. Using the device -in vdr (at least the USB2.0 one) is working. +in vdr is working now also. 2. Known problems and bugs -- none this time +- Don't remove the USB device while running an DVB application, your system will die. -2.1. Adding support for devices +2.1. Adding support for devices It is not possible to determine the range of devices based on the DiBcom reference designs. This is because the reference design of DiBcom can be sold @@ -213,55 +228,50 @@ others. If you are familar with C you can also add the VID and PID of the device to -the dvb-dibusb.h-file and create a patch and send it over to me or to +the dvb-dibusb-core.c-file and create a patch and send it over to me or to the linux-dvb mailing list, _after_ you have tried compiling and modprobing it. 2.2. USB1.1 Bandwidth limitation -Most of the current supported devices are USB1.1 and thus they have a +Most of the currently supported devices are USB1.1 and thus they have a maximum bandwidth of about 5-6 MBit/s when connected to a USB2.0 hub. This is not enough for receiving the complete transport stream of a DVB-T channel (which can be about 16 MBit/s). Normally this is not a problem, if you only want to watch TV (this does not apply for HDTV), -but watching a channel while recording another channel on the same -frequency simply does not work. This applies to all USB1.1 DVB-T -devices, not only dibusb) - -A special problem of the dibusb for the USB1.1 is, that the USB control -IC has a problem with write accesses while having MPEG2-streaming -enabled. When you set another pid while receiving MPEG2-TS it happens, that -the stream is disturbed and probably data is lost (results in distortions of -the video or strange beeps within the audio stream). DiBcom is preparing a -firmware especially for Linux which perhaps solves the problem. - -Especially VDR users are victoms of this bug. VDR frequently requests new PIDs -due the automatic scanning (introduced in 1.3.x, afaik) and epg-scan. Disabling -these features is maybe a solution. Additionally this behaviour of VDR exceeds -the USB1.1 bandwidth. - -Update: -For the USB1.1 and VDR some work has been done (patches and comments are still -very welcome). Maybe the problem is solved in the meantime because I now use -the dmx_sw_filter function instead of dmx_sw_filter_packet. I hope the +but watching a channel while recording another channel on the same +frequency simply does not work very well. This applies to all USB1.1 +DVB-T devices, not just dibusb) + +Update: For the USB1.1 and VDR some work has been done (patches and comments +are still very welcome). Maybe the problem is solved in the meantime because I +now use the dmx_sw_filter function instead of dmx_sw_filter_packet. I hope the linux-dvb software filter is able to get the best of the garbled TS. +The bug, where the TS is distorted by a heavy usage of the device is gone +definitely. All dibusb-devices I was using (Twinhan, Kworld, DiBcom) are +working like charm now with VDR. Sometimes I even was able to record a channel +and watch another one. + 2.3. Comments -Patches, comments and suggestions are very very welcome +Patches, comments and suggestions are very very welcome. 3. Acknowledgements Amaury Demol (ademol@dibcom.fr) and Francois Kanounnikoff from DiBcom for - providing specs, code and help, on which the dvb-dibusb, dib3000mb and + providing specs, code and help, on which the dvb-dibusb, dib3000mb and dib3000mc are based. David Matthews for identifying a new device type (Artec T1 with AN2235) and for extending dibusb with remote control event handling. Thank you. Alex Woods for frequently answering question about usb and dvb - stuff, a big thank you + stuff, a big thank you. Bernd Wagner for helping with huge bug reports and discussions. + + Gunnar Wittich and Joachim von Caron for their trust for giving me + root-shells on their machines to implement support for new devices. Some guys on the linux-dvb mailing list for encouraging me diff -Nru a/Documentation/dvb/contributors.txt b/Documentation/dvb/contributors.txt --- a/Documentation/dvb/contributors.txt 2005-03-30 16:58:47 -08:00 +++ b/Documentation/dvb/contributors.txt 2005-03-30 16:58:47 -08:00 @@ -72,5 +72,8 @@ Ernst Peinlich for tuning/DiSEqC support for the DEC 3000-s +Peter Beutner + for the IR code for the ttusb-dec driver + (If you think you should be in this list, but you are not, drop a line to the DVB mailing list) diff -Nru a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware --- a/Documentation/dvb/get_dvb_firmware 2005-03-30 16:58:49 -08:00 +++ b/Documentation/dvb/get_dvb_firmware 2005-03-30 16:58:49 -08:00 @@ -22,14 +22,15 @@ use IO::Handle; @components = ( "sp8870", "sp887x", "tda10045", "tda10046", "av7110", "dec2000t", - "dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002" ); + "dec2540t", "dec3000s", "vp7041", "dibusb", "nxt2002", + "or51211", "or51132_qam", "or51132_vsb"); # Check args syntax() if (scalar(@ARGV) != 1); $cid = $ARGV[0]; # Do it! -for($i=0; $i < scalar(@components); $i++) { +for ($i=0; $i < scalar(@components); $i++) { if ($cid eq $components[$i]) { $outfile = eval($cid); die $@ if $@; @@ -79,8 +80,8 @@ wgetfile($sourcefile, $url); unzip($sourcefile, $tmpdir); unshield("$tmpdir/$cabfile", $tmpdir); - verify("$tmpdir/sc_main.mc", $hash); - copy("$tmpdir/sc_main.mc", $outfile); + verify("$tmpdir/ZEnglish/sc_main.mc", $hash); + copy("$tmpdir/ZEnglish/sc_main.mc", $outfile); $outfile; } @@ -122,9 +123,9 @@ } sub av7110 { - my $sourcefile = "dvb-ttpci-01.fw-261c"; - my $url = "http://www.linuxtv.org/download/dvb/firmware/$sourcefile"; - my $hash = "7b263de6b0b92d2347319c65adc7d4fb"; + my $sourcefile = "dvb-ttpci-01.fw-261d"; + my $url = "http://www.linuxtv.org/downloads/firmware/$sourcefile"; + my $hash = "603431b6259715a8e88f376a53b64e2f"; my $outfile = "dvb-ttpci-01.fw"; checkstandard(); @@ -222,7 +223,7 @@ } sub dibusb { - my $url = "http://linuxtv.org/cgi-bin/cvsweb.cgi/dvb-kernel/firmware/dvb-dibusb-5.0.0.11.fw?rev=1.1&content-type=text/plain"; + my $url = "http://www.linuxtv.org/downloads/firmware/dvb-dibusb-5.0.0.11.fw"; my $outfile = "dvb-dibusb-5.0.0.11.fw"; my $hash = "fa490295a527360ca16dcdf3224ca243"; @@ -251,6 +252,45 @@ $outfile; } +sub or51211 { + my $fwfile = "dvb-fe-or51211.fw"; + my $url = "http://linuxtv.org/downloads/firmware/$fwfile"; + my $hash = "d830949c771a289505bf9eafc225d491"; + + checkstandard(); + + wgetfile($fwfile, $url); + verify($fwfile, $hash); + + $fwfile; +} + +sub or51132_qam { + my $fwfile = "dvb-fe-or51132-qam.fw"; + my $url = "http://linuxtv.org/downloads/firmware/$fwfile"; + my $hash = "7702e8938612de46ccadfe9b413cb3b5"; + + checkstandard(); + + wgetfile($fwfile, $url); + verify($fwfile, $hash); + + $fwfile; +} + +sub or51132_vsb { + my $fwfile = "dvb-fe-or51132-vsb.fw"; + my $url = "http://linuxtv.org/downloads/firmware/$fwfile"; + my $hash = "c16208e02f36fc439a557ad4c613364a"; + + checkstandard(); + + wgetfile($fwfile, $url); + verify($fwfile, $hash); + + $fwfile; +} + # --------------------------------------------------------------- # Utilities @@ -292,7 +332,7 @@ sub unshield { my ($sourcefile, $todir) = @_; - system("unshield -d \"$todir\" \"$sourcefile\" > /dev/null" ) and die ("unshield failed - unable to extract firmware"); + system("unshield x -d \"$todir\" \"$sourcefile\" > /dev/null" ) and die ("unshield failed - unable to extract firmware"); } sub verify { diff -Nru a/Documentation/dvb/readme.txt b/Documentation/dvb/readme.txt --- a/Documentation/dvb/readme.txt 2005-03-30 16:58:47 -08:00 +++ b/Documentation/dvb/readme.txt 2005-03-30 16:58:47 -08:00 @@ -5,8 +5,9 @@ drivers is http://linuxtv.org/. The developer mailing list linux-dvb is also hosted there, -see http://linuxtv.org/mailinglists.xml. Please check -the archive http://linuxtv.org/mailinglists/linux-dvb/ +see http://linuxtv.org/lists.php. Please check +the archive http://linuxtv.org/pipermail/linux-dvb/ +and the Wiki http://linuxtv.org/wiki/ before asking newbie questions on the list. API documentation, utilities and test/example programs @@ -15,7 +16,7 @@ We plan to split this into separate packages, but it's not been done yet. -http://linuxtv.org/download/dvb/ +http://linuxtv.org/downloads/ What's inside this directory: diff -Nru a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt --- a/Documentation/feature-removal-schedule.txt 2005-03-30 16:58:49 -08:00 +++ b/Documentation/feature-removal-schedule.txt 2005-03-30 16:58:49 -08:00 @@ -37,3 +37,12 @@ Why: Noone uses it, and it probably does not work, anyway. swsusp is faster, more reliable, and people are actually using it. Who: Pavel Machek + +--------------------------- + +What: io_remap_page_range() (macro or function) +When: September 2005 +Why: Replaced by io_remap_pfn_range() which allows more memory space + addressabilty (by using a pfn) and supports sparc & sparc64 + iospace as part of the pfn. +Who: Randy Dunlap diff -Nru a/Documentation/ioctl/hdio.txt b/Documentation/ioctl/hdio.txt --- a/Documentation/ioctl/hdio.txt 2005-03-30 16:58:50 -08:00 +++ b/Documentation/ioctl/hdio.txt 2005-03-30 16:58:50 -08:00 @@ -573,26 +573,43 @@ EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) EPERM req_cmd == TASKFILE_MULTI_OUT and drive multi-count not yet set. - + EIO Drive failed the command. notes: - [1] Currently (2.6.8), both the input and output buffers are - copied from the user and written back to the user, even when - not used. This may be a bug. - - [2] The out_flags and in_flags are returned to the user after - the ioctl completes. Currently (2.6.8) these are the same - as the input values, unchanged. In the future, they may have - more significance. - - Extreme caution should be used with using this ioctl. A - mistake can easily corrupt data or hang the system. - - The argument to the ioctl is a pointer to a region of memory - containing a ide_task_request_t structure, followed by an - optional buffer of data to be transmitted to the drive, - followed by an optional buffer to receive data from the drive. + [1] READ THE FOLLOWING NOTES *CAREFULLY*. THIS IOCTL IS + FULL OF GOTCHAS. Extreme caution should be used with using + this ioctl. A mistake can easily corrupt data or hang the + system. + + [2] Both the input and output buffers are copied from the + user and written back to the user, even when not used. + + [3] If one or more bits are set in out_flags and in_flags is + zero, the following values are used for in_flags.all and + written back into in_flags on completion. + + * IDE_TASKFILE_STD_IN_FLAGS | (IDE_HOB_STD_IN_FLAGS << 8) + if LBA48 addressing is enabled for the drive + * IDE_TASKFILE_STD_IN_FLAGS + if CHS/LBA28 + + The association between in_flags.all and each enable + bitfield flips depending on endianess; fortunately, TASKFILE + only uses inflags.b.data bit and ignores all other bits. + The end result is that, on any endian machines, it has no + effect other than modifying in_flags on completion. + + [4] The default value of SELECT is (0xa0|DEV_bit|LBA_bit) + except for four drives per port chipsets. For four drives + per port chipsets, it's (0xa0|DEV_bit|LBA_bit) for the first + pair and (0x80|DEV_bit|LBA_bit) for the second pair. + + [5] The argument to the ioctl is a pointer to a region of + memory containing a ide_task_request_t structure, followed + by an optional buffer of data to be transmitted to the + drive, followed by an optional buffer to receive data from + the drive. Command is passed to the disk drive via the ide_task_request_t structure, which contains these fields: @@ -611,11 +628,66 @@ out_size output (user->drive) buffer size, bytes in_size input (drive->user) buffer size, bytes - This ioctl does not necessarily respect all flags in the - out_flags and in_flags values -- some taskfile registers - may be written or read even if not requested in the flags. - Unused fields of io_ports[] and hob_ports[] should be set - to zero. + When out_flags is zero, the following registers are loaded. + + HOB_FEATURE If the drive supports LBA48 + HOB_NSECTOR If the drive supports LBA48 + HOB_SECTOR If the drive supports LBA48 + HOB_LCYL If the drive supports LBA48 + HOB_HCYL If the drive supports LBA48 + FEATURE + NSECTOR + SECTOR + LCYL + HCYL + SELECT First, masked with 0xE0 if LBA48, 0xEF + otherwise; then, or'ed with the default + value of SELECT. + + If any bit in out_flags is set, the following registers are loaded. + + HOB_DATA If out_flags.b.data is set. HOB_DATA will + travel on DD8-DD15 on little endian machines + and on DD0-DD7 on big endian machines. + DATA If out_flags.b.data is set. DATA will + travel on DD0-DD7 on little endian machines + and on DD8-DD15 on big endian machines. + HOB_NSECTOR If out_flags.b.nsector_hob is set + HOB_SECTOR If out_flags.b.sector_hob is set + HOB_LCYL If out_flags.b.lcyl_hob is set + HOB_HCYL If out_flags.b.hcyl_hob is set + FEATURE If out_flags.b.feature is set + NSECTOR If out_flags.b.nsector is set + SECTOR If out_flags.b.sector is set + LCYL If out_flags.b.lcyl is set + HCYL If out_flags.b.hcyl is set + SELECT Or'ed with the default value of SELECT and + loaded regardless of out_flags.b.select. + + Taskfile registers are read back from the drive into + {io|hob}_ports[] after the command completes iff one of the + following conditions is met; otherwise, the original values + will be written back, unchanged. + + 1. The drive fails the command (EIO). + 2. One or more than one bits are set in out_flags. + 3. The requested data_phase is TASKFILE_NO_DATA. + + HOB_DATA If in_flags.b.data is set. It will contain + DD8-DD15 on little endian machines and + DD0-DD7 on big endian machines. + DATA If in_flags.b.data is set. It will contain + DD0-DD7 on little endian machines and + DD8-DD15 on big endian machines. + HOB_FEATURE If the drive supports LBA48 + HOB_NSECTOR If the drive supports LBA48 + HOB_SECTOR If the drive supports LBA48 + HOB_LCYL If the drive supports LBA48 + HOB_HCYL If the drive supports LBA48 + NSECTOR + SECTOR + LCYL + HCYL The data_phase field describes the data transfer to be performed. Value is one of: @@ -626,27 +698,30 @@ TASKFILE_MULTI_OUT TASKFILE_IN_OUT TASKFILE_IN_DMA - TASKFILE_IN_DMAQ + TASKFILE_IN_DMAQ == IN_DMA (queueing not supported) TASKFILE_OUT_DMA - TASKFILE_OUT_DMAQ - TASKFILE_P_IN - TASKFILE_P_IN_DMA - TASKFILE_P_IN_DMAQ - TASKFILE_P_OUT - TASKFILE_P_OUT_DMA - TASKFILE_P_OUT_DMAQ + TASKFILE_OUT_DMAQ == OUT_DMA (queueing not supported) + TASKFILE_P_IN unimplemented + TASKFILE_P_IN_DMA unimplemented + TASKFILE_P_IN_DMAQ unimplemented + TASKFILE_P_OUT unimplemented + TASKFILE_P_OUT_DMA unimplemented + TASKFILE_P_OUT_DMAQ unimplemented The req_cmd field classifies the command type. It may be one of: IDE_DRIVE_TASK_NO_DATA - IDE_DRIVE_TASK_SET_XFER + IDE_DRIVE_TASK_SET_XFER unimplemented IDE_DRIVE_TASK_IN - IDE_DRIVE_TASK_OUT + IDE_DRIVE_TASK_OUT unimplemented IDE_DRIVE_TASK_RAW_WRITE - - + [6] Do not access {in|out}_flags->all except for resetting + all the bits. Always access individual bit fields. ->all + value will flip depending on endianess. For the same + reason, do not use IDE_{TASKFILE|HOB}_STD_{OUT|IN}_FLAGS + constants defined in hdreg.h. @@ -663,7 +738,13 @@ inputs: - Taskfile register values: + Commands other than WIN_SMART + args[0] COMMAND + args[1] NSECTOR + args[2] FEATURE + args[3] NSECTOR + + WIN_SMART args[0] COMMAND args[1] SECTOR args[2] FEATURE @@ -682,11 +763,28 @@ error returns: EACCES Access denied: requires CAP_SYS_RAWIO ENOMEM Unable to allocate memory for task + EIO Drive reports error notes: - Taskfile registers IDE_LCYL, IDE_HCYL, and IDE_SELECT are - set to zero before executing the command. + [1] For commands other than WIN_SMART, args[1] should equal + args[3]. SECTOR, LCYL and HCYL are undefined. For + WIN_SMART, 0x4f and 0xc2 are loaded into LCYL and HCYL + respectively. In both cases SELECT will contain the default + value for the drive. Please refer to HDIO_DRIVE_TASKFILE + notes for the default value of SELECT. + + [2] If NSECTOR value is greater than zero and the drive sets + DRQ when interrupting for the command, NSECTOR * 512 bytes + are read from the device into the area following NSECTOR. + In the above example, the area would be + args[4..4+XFER_SIZE]. 16bit PIO is used regardless of + HDIO_SET_32BIT setting. + + [3] If COMMAND == WIN_SETFEATURES && FEATURE == SETFEATURES_XFER + && NSECTOR >= XFER_SW_DMA_0 && the drive supports any DMA + mode, IDE driver will try to tune the transfer mode of the + drive accordingly. @@ -726,7 +824,14 @@ error returns: EACCES Access denied: requires CAP_SYS_RAWIO ENOMEM Unable to allocate memory for task + ENOMSG Device is not a disk drive. + EIO Drive failed the command. + + notes: + [1] DEV bit (0x10) of SELECT register is ignored and the + appropriate value for the drive is used. All other bits + are used unaltered. diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt 2005-03-30 16:58:51 -08:00 +++ b/Documentation/kernel-parameters.txt 2005-03-30 16:58:51 -08:00 @@ -80,6 +80,9 @@ VT Virtual terminal support is enabled. WDT Watchdog support is enabled. XT IBM PC/XT MFM hard disk support is enabled. + X86-64 X86-64 architecture is enabled. + More X86-64 boot options can be found in + Documentation/x86_64/boot-options.txt . In addition, the following text indicates that the option: @@ -403,7 +406,7 @@ dtc3181e= [HW,SCSI] - earlyprintk= [x86, x86_64] + earlyprintk= [IA-32, X86-64] earlyprintk=vga earlyprintk=serial[,ttySn[,baudrate]] @@ -635,6 +638,9 @@ keepinitrd [HW,ARM] + kstack=N [IA-32, X86-64] Print N words from the kernel stack + in oops dumps. + l2cr= [PPC] lapic [IA-32,APIC] Enable the local APIC even if BIOS disabled it. @@ -864,7 +870,7 @@ noexec [IA-64] - noexec [i386, x86_64] + noexec [IA-32, X86-64] noexec=on: enable non-executable mappings (default) noexec=off: disable nn-executable mappings diff -Nru a/Documentation/networking/ethertap.txt b/Documentation/networking/ethertap.txt --- a/Documentation/networking/ethertap.txt 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,268 +0,0 @@ -NOTE: Ethertap is now an obsolete facility, and is scheduled - to be removed in the 2.5.x kernel series. Those writing - applications using ethertap should convert their code to - use the TUN/TAP driver instead, see 'tuntap.txt' in this - directory for more details. -DaveM - -Ethertap programming mini-HOWTO -------------------------------- - -The ethertap driver was written by Jay Schulist , -you should contact him for further information. This document was written by -bert hubert . Updates are welcome. - -What ethertap can do for you ----------------------------- - -Ethertap allows you to easily run your own network stack from userspace. -Tunnels can benefit greatly from this. You can also use it to do network -experiments. The alternative would be to use a raw socket to send data and -use libpcap to receive it. Using ethertap saves you this multiplicity and -also does ARP for you if you want. - -The more technical blurb: - -Ethertap provides packet reception and transmission for user space programs. -It can be viewed as a simple Ethernet device, which instead of receiving -packets from a network wire, it receives them from user space. - -Ethertap can be used for anything from AppleTalk to IPX to even building -bridging tunnels. It also has many other general purpose uses. - -Configuring your kernel ------------------------ - -Firstly, you need this in Networking Options: - - # - # Code maturity level options - # - CONFIG_EXPERIMENTAL=y - -Then you need Netlink support: - - CONFIG_NETLINK=y - -This allows the kernel to exchange data with userspace applications. There -are two ways of doing this, the new way works with netlink sockets and I -have no experience with that yet. ANK uses it in his excellent iproute2 -package, see for example rtmon.c. iproute2 can be found on -ftp://ftp.tux.org/pub/net/ip-routing/iproute2* - -The new way is described, partly in netlink(7), available on -http://www.europe.redhat.com/documentation/man-pages/man7/netlink.7.php3 - -There is also a Netlink-HOWTO, available on http://snafu.freedom.org/linux2.2/docs/netlink-HOWTO.html -Sadly I know of no code using ethertap with this new interface. - -The older way works by opening character special files with major node 36. -Enable this with: - - CONFIG_NETLINK_DEV=m - -Please be advised that this support is going to be dropped somewhere in the -future! - -Then finally in the Network Devices section, - - CONFIG_ETHERTAP=m - -You can include it directly in the kernel if you want, of course, no need -for modules. - -Setting it all up ------------------ - -First we need to create the /dev/tap0 device node: - - # mknod /dev/tap0 c 36 16 - # mknod /dev/tap1 c 36 17 - (etc) - -Include the relevant modules (ethertap.o, netlink_dev.o, perhaps netlink.o), -and bring up your tap0 device: - - # ifconfig tap0 10.0.0.123 up - -Now your device is up and running, you can ping it as well. This is what -confused me to no end, because nothing is connected to our ethertap as yet, -how is it that we can ping it? - -It turns out that the ethertap is just like a regular network interface - -even when it's down you can ping it. We need to route stuff to it: - - # route add -host 10.0.0.124 gw 10.0.0.123 - -Now we can read /dev/tap0 and when we ping 10.0.0.124 from our -localhost, output should appear on the screen. - - # cat /dev/tap0 - :ßVU:9````````````````````````þýþET@?' - - -Getting this to work from other hosts -------------------------------------- - -For this to work, you often need proxy ARP. - - # echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp - -eth0 here stands for the interface that connects to 'other hosts'. - -Chances are that you are trying this on a non-routing desktop computer, so -you need to enable ip forwarding: - - # echo 1 > /proc/sys/net/ipv4/ip_forward - -You should now be able to ping 10.0.0.124 from other hosts on your -10.0.0.0/8 subnet. If you are using public ip space, it should work from -everywhere. - -ARP ---- - -If we were to take things very literally, your tcp/ip pseudo stack would -also have to implement ARP and MAC addresses. This is often a bit silly as -the ethertap device is a figment of our imagination anyway. However, should -you want to go 'all the way', you can add the 'arp' flag to ifconfig: - - # ifconfig tap0 10.0.0.123 up arp - -This may also be useful when implementing a bridge, which needs to bridge -ARP packets as well. - -The sample program below will no longer work then, because it does not -implement ARP. - -Sample program --------------- - -A sample program is included somewhere in the bowels of the netfilter -source. I've extracted this program and list it here. It implements a very -tiny part of the IP stack and can respond to any pings it receives. It gets -confused if it receives ARP, as it tries to parse it by treating it as an IP -packet. - -/* Simple program to listen to /dev/tap0 and reply to pings. */ -#include -#include -#include -#if defined(__GLIBC__) && (__GLIBC__ == 2) -#include -#include -#else -#include -#include -#endif -#include -#include -#include -#include - -u_int16_t csum_partial(void *buffer, unsigned int len, u_int16_t prevsum) -{ - u_int32_t sum = 0; - u_int16_t *ptr = buffer; - - while (len > 1) { - sum += *ptr++; - len -= 2; - } - if (len) { - union { - u_int8_t byte; - u_int16_t wyde; - } odd; - odd.wyde = 0; - odd.byte = *((u_int8_t *)ptr); - sum += odd.wyde; - } - sum = (sum >> 16) + (sum & 0xFFFF); - sum += prevsum; - return (sum + (sum >> 16)); -} - -int main() -{ - int fd, len; - union { - struct { - char etherhdr[16]; - struct iphdr ip; - } fmt; - unsigned char raw[65536]; - } u; - - fd = open("/dev/tap0", O_RDWR); - if (fd < 0) { - perror("Opening `/dev/tap0'"); - return 1; - } - - /* u.fmt.ip.ihl in host order! Film at 11. */ - while ((len = read(fd, &u, sizeof(u))) > 0) { - u_int32_t tmp; - struct icmphdr *icmp - = (void *)((u_int32_t *)&u.fmt.ip + u.fmt.ip.ihl ); - struct tcphdr *tcp = (void *)icmp; - struct udphdr *udp = (void *)icmp; - - fprintf(stderr, "SRC = %u.%u.%u.%u DST = %u.%u.%u.%u\n", - (ntohl(u.fmt.ip.saddr) >> 24) & 0xFF, - (ntohl(u.fmt.ip.saddr) >> 16) & 0xFF, - (ntohl(u.fmt.ip.saddr) >> 8) & 0xFF, - (ntohl(u.fmt.ip.saddr) >> 0) & 0xFF, - (ntohl(u.fmt.ip.daddr) >> 24) & 0xFF, - (ntohl(u.fmt.ip.daddr) >> 16) & 0xFF, - (ntohl(u.fmt.ip.daddr) >> 8) & 0xFF, - (ntohl(u.fmt.ip.daddr) >> 0) & 0xFF); - - switch (u.fmt.ip.protocol) { - case IPPROTO_ICMP: - if (icmp->type == ICMP_ECHO) { - fprintf(stderr, "PONG! (iphdr = %u bytes)\n", - (unsigned int)((char *)icmp - - (char *)&u.fmt.ip)); - - /* Turn it around */ - tmp = u.fmt.ip.saddr; - u.fmt.ip.saddr = u.fmt.ip.daddr; - u.fmt.ip.daddr = tmp; - - icmp->type = ICMP_ECHOREPLY; - icmp->checksum = 0; - icmp->checksum - = ~csum_partial(icmp, - ntohs(u.fmt.ip.tot_len) - - u.fmt.ip.ihl*4, 0); - - { - unsigned int i; - for (i = 44; - i < ntohs(u.fmt.ip.tot_len); i++){ - printf("%u:0x%02X ", i, - ((unsigned char *) - &u.fmt.ip)[i]); - } - printf("\n"); - } - write(fd, &u, len); - } - break; - case IPPROTO_TCP: - fprintf(stderr, "TCP: %u -> %u\n", ntohs(tcp->source), - ntohs(tcp->dest)); - break; - - case IPPROTO_UDP: - fprintf(stderr, "UDP: %u -> %u\n", ntohs(udp->source), - ntohs(udp->dest)); - break; - } - } - if (len < 0) - perror("Reading from `/dev/tap0'"); - else fprintf(stderr, "Empty read from `/dev/tap0'"); - return len < 0 ? 1 : 0; -} - diff -Nru a/Documentation/power/devices.txt b/Documentation/power/devices.txt --- a/Documentation/power/devices.txt 2005-03-30 16:58:47 -08:00 +++ b/Documentation/power/devices.txt 2005-03-30 16:58:47 -08:00 @@ -15,7 +15,7 @@ struct bus_type { ... - int (*suspend)(struct device * dev, u32 state); + int (*suspend)(struct device * dev, pm_message_t state); int (*resume)(struct device * dev); }; diff -Nru a/Documentation/power/video.txt b/Documentation/power/video.txt --- a/Documentation/power/video.txt 2005-03-30 16:58:49 -08:00 +++ b/Documentation/power/video.txt 2005-03-30 16:58:49 -08:00 @@ -32,7 +32,7 @@ acpi_sleep=s3_bios,s3_mode is needed. (5) radeon systems, where X can soft-boot your video card. You'll need - patched X, and plain text console (no vesafb or radeonfb), see + new enough X, and plain text console (no vesafb or radeonfb), see http://www.doesi.gmxhome.de/linux/tm800s3/s3.html. Actually you should probably use vbetool (6) instead. @@ -64,11 +64,14 @@ ------------------------------------------------------------------------------ Acer Aspire 1406LC ole's late BIOS init (7), turn off DRI Acer TM 242FX vbetool (6) +Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) Acer TM 4052LCi s3_bios (2) Acer TM 636Lci s3_bios vga=normal (2) Acer TM 650 (Radeon M7) vga=normal plus boot-radeon (5) gets text console back Acer TM 660 ??? (*) -Acer TM 800 vga=normal, X patches, see webpage (5) +Acer TM 800 vga=normal, X patches, see webpage (5) or vbetool (6) +Acer TM 803 vga=normal, X patches, see webpage (5) or vbetool (6) +Acer TM 803LCi vga=normal, vbetool (6) Arima W730a vbetool needed (6) Asus L2400D s3_mode (3)(***) (S1 also works OK) Asus L3800C (Radeon M7) s3_bios (2) (S1 also works OK) @@ -76,8 +79,9 @@ Athlon64 desktop prototype s3_bios (2) Compal CL-50 ??? (*) Compaq Armada E500 - P3-700 none (1) (S1 also works OK) +Compaq Evo N620c vga=normal, s3_bios (2) Dell 600m, ATI R250 Lf none (1), but needs xorg-x11-6.8.1.902-1 -Dell D600, ATI RV250 vga=normal (**), or try vbestate (6) +Dell D600, ATI RV250 vga=normal and X, or try vbestate (6) Dell Inspiron 4000 ??? (*) Dell Inspiron 500m ??? (*) Dell Inspiron 600m ??? (*) @@ -85,11 +89,12 @@ Dell Inspiron 8500 ??? (*) Dell Inspiron 8600 ??? (*) eMachines athlon64 machines vbetool needed (6) (someone please get me model #s) -HP NC6000 s3_bios, may not use radeonfb (2) +HP NC6000 s3_bios, may not use radeonfb (2); or vbetool (6) HP NX7000 ??? (*) HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X HP Omnibook XE3 athlon version none (1) -HP Omnibook XE3GC w/S3 Savage/IX-MV none (1) +HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV +IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work. IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(] IBM TP R32 / Type 2658-MMG none (1) IBM TP R40 2722B3G ??? (*) @@ -97,20 +102,22 @@ IBM TP R51 ??? (*) IBM TP T30 236681A ??? (*) IBM TP T40 / Type 2373-MU4 none (1) -IBM TP T40p ??? (*) -IBM TP T41p none (1) +IBM TP T40p none (1) +IBM TP R40p s3_bios (2) +IBM TP T41p s3_bios (2), switch to X after resume IBM TP T42 ??? (*) IBM ThinkPad T42p (2373-GTG) s3_bios (2) IBM TP X20 ??? (*) IBM TP X30 ??? (*) IBM TP X31 / Type 2672-XXH none (1), use radeontool (http://fdd.com/software/radeon/) to turn off backlight. -IBM TP X40 ??? (*) +IBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) Medion MD4220 ??? (*) Samsung P35 vbetool needed (6) Sharp PC-AR10 (ATI rage) none (1) Sony Vaio PCG-F403 ??? (*) Sony Vaio PCG-N505SN ??? (*) Sony Vaio vgn-s260 X or boot-radeon can init it (5) +Toshiba Libretto L5 none (1) Toshiba Satellite 4030CDT s3_mode (3) Toshiba Satellite 4080XCDT s3_mode (3) Toshiba Satellite 4090XCDT ??? (*) @@ -120,14 +127,6 @@ (*) from http://www.ubuntulinux.org/wiki/HoaryPMResults, not sure which options to use. If you know, please tell me. - -(**) Text console is "strange" after resume. Backlight is switched on again - by the X server. X server is: - | X Window System Version 6.8.1.904 (6.8.2 RC 4) - | Release Date: 2 February 2005 - | X Protocol Version 11, Revision 0, Release 6.8.1.904 - | Build Operating System: SuSE Linux [ELF] SuSE - as present in SUSE 9.3preview3. (***) To be tested with a newer kernel. diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2005-03-30 16:58:48 -08:00 +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 2005-03-30 16:58:48 -08:00 @@ -3011,6 +3011,9 @@ current appl_ptr for the internal buffer, and this callback is useful only for such a purpose. + + This callback is atomic. +
@@ -3208,6 +3211,11 @@ udelay() or mdelay(). + + All three atomic callbacks (trigger, pointer, and ack) are + called with local interrupts disabled. + +
Constraints @@ -4596,14 +4604,6 @@ zero up parameter when the transmission of data should be aborted. - - - The trigger callback may be called from - another hardware interrupt handler. This means that all - spinlocks taken in the trigger callback - must be taken with spin_lock_irqsave - everywhere. -
@@ -4622,6 +4622,12 @@ This is called with a nonzero up parameter to enable receiving data, or with a zero up parameter do disable receiving data. + + + + The trigger callback must not sleep; the + actual reading of data from the device is usually done in an + interrupt handler. diff -Nru a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt --- a/Documentation/spinlocks.txt 2005-03-30 16:58:50 -08:00 +++ b/Documentation/spinlocks.txt 2005-03-30 16:58:50 -08:00 @@ -1,3 +1,29 @@ +UPDATE March 21 2005 Amit Gud + +Macros SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated and will be +removed soon. So for any new code dynamic initialization should be used: + + spinlock_t xxx_lock; + rwlock_t xxx_rw_lock; + + static int __init xxx_init(void) + { + spin_lock_init(&xxx_lock); + rw_lock_init(&xxx_rw_lock); + ... + } + + module_init(xxx_init); + +Reasons for deprecation + - it hurts automatic lock validators + - it becomes intrusive for the realtime preemption patches + +Following discussion is still valid, however, with the dynamic initialization +of spinlocks instead of static. + +----------------------- + On Fri, 2 Jan 1998, Doug Ledford wrote: > > I'm working on making the aic7xxx driver more SMP friendly (as well as diff -Nru a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/usb/usbmon.txt 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,156 @@ +* Introduction + +The name "usbmon" in lowercase refers to a facility in kernel which is +used to collect traces of I/O on the USB bus. This function is analogous +to a packet socket used by network monitoring tools such as tcpdump(1) +or Ethereal. Similarly, it is expected that a tool such as usbdump or +USBMon (with uppercase letters) is used to examine raw traces produced +by usbmon. + +The usbmon reports requests made by peripheral-specific drivers to Host +Controller Drivers (HCD). So, if HCD is buggy, the traces reported by +usbmon may not correspond to bus transactions precisely. This is the same +situation as with tcpdump. + +* How to use usbmon to collect raw text traces + +Unlike the packet socket, usbmon has an interface which provides traces +in a text format. This is used for two purposes. First, it serves as a +common trace exchange format for tools while most sophisticated formats +are finalized. Second, humans can read it in case tools are not available. + +To collect a raw text trace, execute following steps. + +1. Prepare + +Mount debugfs (it has to be enabled in your kernel configuration), and +load the usbmon module (if built as module). The second step is skipped +if usbmon is built into the kernel. + +# mount -t debugfs none_debugs /sys/kernel/debug +# modprobe usbmon + +Verify that bus sockets are present. + +[root@lembas zaitcev]# ls /sys/kernel/debug/usbmon +1s 1t 2s 2t 3s 3t 4s 4t +[root@lembas zaitcev]# + +# ls /sys/kernel + +2. Find which bus connects to the desired device + +Run "cat /proc/bus/usb/devices", and find the T-line which corresponds to +the device. Usually you do it by looking for the vendor string. If you have +many similar devices, unplug one and compare two /proc/bus/usb/devices outputs. +The T-line will have a bus number. Example: + +T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 +D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 +P: Vendor=0557 ProdID=2004 Rev= 1.00 +S: Manufacturer=ATEN +S: Product=UC100KM V2.00 + +Bus=03 means it's bus 3. + +3. Start 'cat' + +# cat /sys/kernel/debug/usbmon/3t > /tmp/1.mon.out + +This process will be reading until killed. Naturally, the output can be +redirected to a desirable location. This is preferred, because it is going +to be quite long. + +4. Perform the desired operation on the USB bus + +This is where you do something that creates the traffic: plug in a flash key, +copy files, control a webcam, etc. + +5. Kill cat + +Usually it's done with a keyboard interrupt (Control-C). + +At this point the output file (/tmp/1.mon.out in this example) can be saved, +sent by e-mail, or inspected with a text editor. In the last case make sure +that the file size is not excessive for your favourite editor. + +* Raw text data format + +The '0t' type data consists of a stream of events, such as URB submission, +URB callback, submission error. Every event is a text line, which consists +of whitespace separated words. The number of position of words may depend +on the event type, but there is a set of words, common for all types. + +Here is the list of words, from left to right: +- URB Tag. This is used to identify URBs is normally a kernel mode address + of the URB structure in hexadecimal. +- Timestamp in microseconds, a decimal number. The timestamp's resolution + depends on available clock, and so it can be much worse than a microsecond + (if the implementation uses jiffies, for example). +- Event Type. This type refers to the format of the event, not URB type. + Available types are: S - submission, C - callback, E - submission error. +- "Pipe". The pipe concept is deprecated. This is a composite word, used to + be derived from information in pipes. It consists of three fields, separated + by colons: URB type and direction, Device address, Endpoint number. + Type and direction are encoded with two bytes in the following manner: + Ci Co Control input and output + Zi Zo Isochronous input and output + Ii Io Interrupt input and output + Bi Bo Bulk input and output + Device address and Endpoint number are decimal numbers with leading zeroes + or 3 and 2 positions, correspondingly. +- URB Status. This field makes no sense for submissions, but is present + to help scripts with parsing. In error case, it contains the error code. +- Data Length. This is the actual length in the URB. +- Data tag. The usbmon may not always capture data, even if length is nonzero. + Only if tag is '=', the data words are present. +- Data words follow, in big endian hexadecimal format. Notice that they are + not machine words, but really just a byte stream split into words to make + it easier to read. Thus, the last word may contain from one to four bytes. + The length of collected data is limited and can be less than the data length + report in Data Length word. + +Here is an example of code to read the data stream in a well known programming +language: + +class ParsedLine { + int data_len; /* Available length of data */ + byte data[]; + + void parseData(StringTokenizer st) { + int availwords = st.countTokens(); + data = new byte[availwords * 4]; + data_len = 0; + while (st.hasMoreTokens()) { + String data_str = st.nextToken(); + int len = data_str.length() / 2; + int i; + for (i = 0; i < len; i++) { + data[data_len] = Byte.parseByte( + data_str.substring(i*2, i*2 + 2), + 16); + data_len++; + } + } + } +} + +This format is obviously deficient. For example, the setup packet for control +transfers is not delivered. This will change in the future. + +Examples: + +An input control transfer to get a port status: + +d74ff9a0 2640288196 S Ci:001:00 -115 4 < +d74ff9a0 2640288202 C Ci:001:00 0 4 = 01010100 + +An output bulk transfer to send a SCSI command 0x5E in a 31-byte Bulk wrapper +to a storage device at address 5: + +dd65f0e8 4128379752 S Bo:005:02 -115 31 = 55534243 5e000000 00000000 00000600 00000000 00000000 00000000 000000 +dd65f0e8 4128379808 C Bo:005:02 0 31 > + +* Raw binary format and API + +TBD diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2005-03-30 16:58:49 -08:00 +++ b/MAINTAINERS 2005-03-30 16:58:49 -08:00 @@ -984,11 +984,6 @@ W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi S: Maintained -HPUSBSCSI -P: Oliver Neukum -M: oliver@neukum.name -S: Maintained - HUGETLB FILESYSTEM P: William Irwin M: wli@holomorphy.com @@ -2044,10 +2039,11 @@ S: Maintained SIS 900/7016 FAST ETHERNET DRIVER -P: Ollie Lho -M: ollie@sis.com.tw +P: Daniele Venzano +M: venza@brownhat.org +W: http://www.brownhat.org/sis900.html L: linux-net@vger.kernel.org -S: Supported +S: Maintained SIS FRAMEBUFFER DRIVER P: Thomas Winischhofer @@ -2313,6 +2309,13 @@ L: linux-usb-devel@lists.sourceforge.net S: Maintained +USB BLOCK DRIVER (UB ub) +P: Pete Zaitcev +M: zaitcev@redhat.com +L: linux-kernel@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net +S: Supported + USB BLUETOOTH TTY CONVERTER DRIVER P: Greg Kroah-Hartman M: greg@kroah.com @@ -2548,8 +2551,9 @@ M: rl@hellgate.ch S: Maintained -UCLINUX +UCLINUX (AND M68KNOMMU) P: Greg Ungerer +M: gerg@uclinux.org M: gerg@snapgear.com P: David McCullough M: davidm@snapgear.com @@ -2661,11 +2665,11 @@ L: linux-hams@vger.kernel.org S: Maintained -YMFPCI YAMAHA PCI SOUND +YMFPCI YAMAHA PCI SOUND (Use ALSA instead) P: Pete Zaitcev M: zaitcev@yahoo.com L: linux-kernel@vger.kernel.org -S: Maintained +S: Obsolete Z8530 DRIVER FOR AX.25 P: Joerg Reuter diff -Nru a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c --- a/arch/alpha/kernel/smp.c 2005-03-30 16:58:48 -08:00 +++ b/arch/alpha/kernel/smp.c 2005-03-30 16:58:48 -08:00 @@ -175,48 +175,6 @@ cpu_idle(); } - -/* - * Rough estimation for SMP scheduling, this is the number of cycles it - * takes for a fully memory-limited process to flush the SMP-local cache. - * - * We are not told how much cache there is, so we have to guess. - */ -static void __init -smp_tune_scheduling (int cpuid) -{ - struct percpu_struct *cpu; - unsigned long on_chip_cache; /* kB */ - unsigned long freq; /* Hz */ - unsigned long bandwidth = 350; /* MB/s */ - - cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset - + cpuid * hwrpb->processor_size); - switch (cpu->type) - { - case EV45_CPU: - on_chip_cache = 16 + 16; - break; - - case EV5_CPU: - case EV56_CPU: - on_chip_cache = 8 + 8 + 96; - break; - - case PCA56_CPU: - on_chip_cache = 16 + 8; - break; - - case EV6_CPU: - case EV67_CPU: - default: - on_chip_cache = 64 + 64; - break; - } - - freq = hwrpb->cycle_freq ? : est_cycle_freq; -} - /* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ static int __init wait_for_txrdy (unsigned long cpumask) @@ -517,7 +475,6 @@ current_thread_info()->cpu = boot_cpuid; smp_store_cpu_info(boot_cpuid); - smp_tune_scheduling(boot_cpuid); smp_setup_percpu_timer(boot_cpuid); /* Nothing to do on a UP box, or when told not to. */ diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c --- a/arch/alpha/kernel/srmcons.c 2005-03-30 16:58:50 -08:00 +++ b/arch/alpha/kernel/srmcons.c 2005-03-30 16:58:50 -08:00 @@ -164,29 +164,22 @@ unsigned long flags; int retval = 0; - spin_lock_irqsave(&srmconsp_lock, flags); - - do { - if (srmconsp != NULL) { - *ps = srmconsp; - break; - } + if (srmconsp == NULL) { + spin_lock_irqsave(&srmconsp_lock, flags); srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL); - if (srmconsp == NULL) { + if (srmconsp == NULL) retval = -ENOMEM; - break; + else { + srmconsp->tty = NULL; + spin_lock_init(&srmconsp->lock); + init_timer(&srmconsp->timer); } - srmconsp->tty = NULL; - spin_lock_init(&srmconsp->lock); - init_timer(&srmconsp->timer); - - *ps = srmconsp; - } while(0); - - spin_unlock_irqrestore(&srmconsp_lock, flags); + spin_unlock_irqrestore(&srmconsp_lock, flags); + } + *ps = srmconsp; return retval; } diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/Kconfig 2005-03-30 16:58:49 -08:00 @@ -71,6 +71,9 @@ bool default y +config FIQ + bool + source "init/Kconfig" menu "System Type" @@ -81,6 +84,7 @@ config ARCH_CLPS7500 bool "Cirrus-CL-PS7500FE" + select TIMER_ACORN config ARCH_CLPS711X bool "CLPS711x/EP721x-based" @@ -111,18 +115,22 @@ config ARCH_INTEGRATOR bool "Integrator" + select ARM_AMBA + select ICST525 config ARCH_IOP3XX bool "IOP3xx-based" config ARCH_IXP4XX bool "IXP4xx-based" + select DMABOUNCE config ARCH_IXP2000 bool "IXP2400/2800-based" config ARCH_L7200 bool "LinkUp-L7200" + select FIQ help Say Y here if you intend to run this kernel on a LinkUp Systems L7200 Software Development Board which uses an ARM720T processor. @@ -138,6 +146,9 @@ config ARCH_RPC bool "RiscPC" + select ARCH_ACORN + select FIQ + select TIMER_ACORN help On the Acorn Risc-PC, Linux can support the internal IDE disk and CD-ROM interface, serial and parallel port, and the floppy drive. @@ -168,6 +179,8 @@ config ARCH_VERSATILE bool "Versatile" + select ARM_AMBA + select ICST307 help This enables support for ARM Ltd Versatile board. @@ -214,54 +227,72 @@ # Definitions to make life easier config ARCH_ACORN bool - depends on ARCH_RPC - default y -config TIMER_ACORN - bool - depends on ARCH_ACORN || ARCH_CLPS7500 - default y +source arch/arm/mm/Kconfig -##################################################################### -# SA1111 support -config SA1111 +# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER +config XSCALE_PMU bool - depends on ASSABET_NEPONSET || SA1100_ADSBITSY || SA1100_BADGE4 || SA1100_CONSUS || SA1100_GRAPHICSMASTER || SA1100_JORNADA720 || ARCH_LUBBOCK || SA1100_PFS168 || SA1100_PT_SYSTEM3 || SA1100_XP860 + depends on CPU_XSCALE && !XSCALE_PMU_TIMER default y -config SHARP_LOCOMO - bool - depends on SA1100_COLLIE || MACH_POODLE - default y +endmenu -config SHARP_SCOOP - bool - depends on PXA_SHARPSL || SA1100_COLLIE - default y +source "arch/arm/common/Kconfig" config FORCE_MAX_ZONEORDER int depends on SA1111 default "9" -config DMABOUNCE +menu "Bus support" + +config ARM_AMBA + bool + +config ISA bool - depends on SA1111 || ARCH_IXP4XX + depends on FOOTBRIDGE_HOST || ARCH_SHARK || ARCH_CLPS7500 || ARCH_EBSA110 || ARCH_CDB89712 || ARCH_EDB7211 || ARCH_SA1100 || ARCH_MX1ADS default y + help + Find out whether you have ISA slots on your motherboard. ISA is the + name of a bus system, i.e. the way the CPU talks to the other stuff + inside your box. Other bus systems are PCI, EISA, MicroChannel + (MCA) or VESA. ISA is an older system, now being displaced by PCI; + newer boards don't support it. If you have ISA, say Y, otherwise N. -source arch/arm/mm/Kconfig +config ISA_DMA + bool + depends on FOOTBRIDGE_HOST || ARCH_SHARK + default y -# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER -config XSCALE_PMU +config PCI + bool "PCI support" if ARCH_INTEGRATOR_AP + default y if ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_IXP2000 + help + Find out whether you have a PCI motherboard. PCI is the name of a + bus system, i.e. the way the CPU talks to the other stuff inside + your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or + VESA. If you have PCI, say Y, otherwise N. + + The PCI-HOWTO, available from + , contains valuable + information about which PCI hardware does work under Linux and which + doesn't. + +# Select the host bridge type +config PCI_HOST_VIA82C505 bool - depends on CPU_XSCALE && !XSCALE_PMU_TIMER + depends on PCI && ARCH_SHARK default y -endmenu +source "drivers/pci/Kconfig" -menu "General setup" +source "drivers/pcmcia/Kconfig" + +endmenu -# Select various configuration options depending on the machine type +menu "Kernel Features" config SMP bool "Symmetric Multi-Processing (EXPERIMENTAL)" @@ -286,9 +317,23 @@ config NR_CPUS int "Maximum number of CPUs (2-32)" + range 2 32 depends on SMP default "4" +config PREEMPT + bool "Preemptible Kernel (EXPERIMENTAL)" + depends on EXPERIMENTAL + help + This option reduces the latency of the kernel when reacting to + real-time or interactive events by allowing a low priority process to + be preempted even if it is in kernel mode executing a system call. + This allows applications to run more reliably even when the system is + under load. + + Say Y here if you are building a kernel for a desktop, embedded + or real-time system. Say N if you are unsure. + config DISCONTIGMEM bool depends on ARCH_EDB7211 || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_CONTIGMEM) @@ -299,62 +344,68 @@ or have huge holes in the physical address space for other reasons. See for more. -# Now handle the bus types -config PCI - bool "PCI support" if ARCH_INTEGRATOR_AP - default y if ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_IXP2000 +config LEDS + bool "Timer and CPU usage LEDs" + depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \ + ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \ + ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ + ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ + ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE help - Find out whether you have a PCI motherboard. PCI is the name of a - bus system, i.e. the way the CPU talks to the other stuff inside - your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or - VESA. If you have PCI, say Y, otherwise N. + If you say Y here, the LEDs on your machine will be used + to provide useful information about your current system status. - The PCI-HOWTO, available from - , contains valuable - information about which PCI hardware does work under Linux and which - doesn't. + If you are compiling a kernel for a NetWinder or EBSA-285, you will + be able to select which LEDs are active using the options below. If + you are compiling a kernel for the EBSA-110 or the LART however, the + red LED will simply flash regularly to indicate that the system is + still functional. It is safe to say Y here if you have a CATS + system, but the driver will do nothing. -# Select the host bridge type -config PCI_HOST_VIA82C505 - bool - depends on PCI && ARCH_SHARK - default y +config LEDS_TIMER + bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \ + MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 + depends on LEDS + default y if ARCH_EBSA110 + help + If you say Y here, one of the system LEDs (the green one on the + NetWinder, the amber one on the EBSA285, or the red one on the LART) + will flash regularly to indicate that the system is still + operational. This is mainly useful to kernel hackers who are + debugging unstable kernels. -config ICST525 - bool - depends on ARCH_INTEGRATOR - default y + The LART uses the same LED for both Timer LED and CPU usage LED + functions. You may choose to use both, but the Timer LED function + will overrule the CPU usage LED. -config ICST307 - bool - depends on ARCH_VERSATILE - default y +config LEDS_CPU + bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \ + !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 + depends on LEDS + help + If you say Y here, the red LED will be used to give a good real + time indication of CPU usage, by lighting whenever the idle task + is not currently executing. -config ARM_AMBA - bool - depends on ARCH_INTEGRATOR || ARCH_VERSATILE - default y + The LART uses the same LED for both Timer LED and CPU usage LED + functions. You may choose to use both, but the Timer LED function + will overrule the CPU usage LED. -config ISA +config ALIGNMENT_TRAP bool - depends on FOOTBRIDGE_HOST || ARCH_SHARK || ARCH_CLPS7500 || ARCH_EBSA110 || ARCH_CDB89712 || ARCH_EDB7211 || ARCH_SA1100 || ARCH_MX1ADS - default y + default y if !ARCH_EBSA110 help - Find out whether you have ISA slots on your motherboard. ISA is the - name of a bus system, i.e. the way the CPU talks to the other stuff - inside your box. Other bus systems are PCI, EISA, MicroChannel - (MCA) or VESA. ISA is an older system, now being displaced by PCI; - newer boards don't support it. If you have ISA, say Y, otherwise N. + ARM processors can not fetch/store information which is not + naturally aligned on the bus, i.e., a 4 byte fetch must start at an + address divisible by 4. On 32-bit ARM processors, these non-aligned + fetch/store instructions will be emulated in software if you say + here, which has a severe performance impact. This is necessary for + correct operation of some network protocols. With an IP-only + configuration it is safe to say N, otherwise say Y. -config ISA_DMA - bool - depends on FOOTBRIDGE_HOST || ARCH_SHARK - default y +endmenu -config FIQ - bool - depends on ARCH_ACORN || ARCH_L7200 - default y +menu "Boot options" # Compressed boot loader in ROM. Yes, we really want to ask about # TEXT and BSS so we preserve their values in the config files. @@ -388,6 +439,16 @@ Say Y here if you intend to execute your compressed kernel image (zImage) directly from ROM or flash. If unsure, say N. +config CMDLINE + string "Default kernel command string" + default "" + help + On some architectures (EBSA110 and CATS), there is currently no way + for the boot loader to pass arguments to the kernel. For these + architectures, you should supply some command-line options at build + time by entering them here. As a minimum, you should specify the + memory size and the root device (e.g., mem=64M root=/dev/nfs). + config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" depends on !ZBOOT_ROM @@ -418,8 +479,12 @@ be linked for and stored to. This address is dependent on your own flash usage. +endmenu + if (ARCH_SA1100 || ARCH_INTEGRATOR) +menu "CPU Frequency scaling" + source "drivers/cpufreq/Kconfig" config CPU_FREQ_SA1100 @@ -434,7 +499,7 @@ config CPU_FREQ_INTEGRATOR tristate "CPUfreq driver for ARM Integrator CPUs" - depends on ARCH_INTEGRATOR && ICST525 && CPU_FREQ + depends on ARCH_INTEGRATOR && CPU_FREQ default y help This enables the CPUfreq driver for ARM Integrator CPUs. @@ -443,13 +508,13 @@ If in doubt, say Y. -endif +endmenu -source "drivers/pci/Kconfig" +endif -source "drivers/pcmcia/Kconfig" +menu "Floating point emulation" -comment "At least one math emulation must be selected" +comment "At least one emulation must be selected" config FPE_NWFPE bool "NWFPE math emulation" @@ -500,9 +565,24 @@ Say N if your target does not have VFP hardware. +endmenu + +menu "Userspace binary formats" + source "fs/Kconfig.binfmt" -source "drivers/base/Kconfig" +config ARTHUR + tristate "RISC OS personality" + help + Say Y here to include the kernel code necessary if you want to run + Acorn RISC OS/Arthur binaries under Linux. This code is still very + experimental; if this sounds frightening, say N and sleep in peace. + You can also say M here to compile this support as a module (which + will be called arthur). + +endmenu + +menu "Power management options" config PM bool "Power Management support" @@ -524,19 +604,6 @@ will issue the hlt instruction if nothing is to be done, thereby sending the processor to sleep and saving power. -config PREEMPT - bool "Preemptible Kernel (EXPERIMENTAL)" - depends on CPU_32 && EXPERIMENTAL - help - This option reduces the latency of the kernel when reacting to - real-time or interactive events by allowing a low priority process to - be preempted even if it is in kernel mode executing a system call. - This allows applications to run more reliably even when the system is - under load. - - Say Y here if you are building a kernel for a desktop, embedded - or real-time system. Say N if you are unsure. - config APM tristate "Advanced Power Management Emulation" depends on PM @@ -596,115 +663,44 @@ To compile this driver as a module, choose M here: the module will be called apm. -config ARTHUR - tristate "RISC OS personality" - depends on CPU_32 - help - Say Y here to include the kernel code necessary if you want to run - Acorn RISC OS/Arthur binaries under Linux. This code is still very - experimental; if this sounds frightening, say N and sleep in peace. - You can also say M here to compile this support as a module (which - will be called arthur). - -config CMDLINE - string "Default kernel command string" - default "" - help - On some architectures (EBSA110 and CATS), there is currently no way - for the boot loader to pass arguments to the kernel. For these - architectures, you should supply some command-line options at build - time by entering them here. As a minimum, you should specify the - memory size and the root device (e.g., mem=64M root=/dev/nfs). - -config LEDS - bool "Timer and CPU usage LEDs" - depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX - help - If you say Y here, the LEDs on your machine will be used - to provide useful information about your current system status. - - If you are compiling a kernel for a NetWinder or EBSA-285, you will - be able to select which LEDs are active using the options below. If - you are compiling a kernel for the EBSA-110 or the LART however, the - red LED will simply flash regularly to indicate that the system is - still functional. It is safe to say Y here if you have a CATS - system, but the driver will do nothing. - -config LEDS_TIMER - bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2) - depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX - default y if ARCH_EBSA110 - help - If you say Y here, one of the system LEDs (the green one on the - NetWinder, the amber one on the EBSA285, or the red one on the LART) - will flash regularly to indicate that the system is still - operational. This is mainly useful to kernel hackers who are - debugging unstable kernels. - - The LART uses the same LED for both Timer LED and CPU usage LED - functions. You may choose to use both, but the Timer LED function - will overrule the CPU usage LED. - -config LEDS_CPU - bool "CPU usage LED" - depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2) - help - If you say Y here, the red LED will be used to give a good real - time indication of CPU usage, by lighting whenever the idle task - is not currently executing. - - The LART uses the same LED for both Timer LED and CPU usage LED - functions. You may choose to use both, but the Timer LED function - will overrule the CPU usage LED. - -config ALIGNMENT_TRAP - bool - depends on CPU_32 - default y if !ARCH_EBSA110 - help - ARM processors can not fetch/store information which is not - naturally aligned on the bus, i.e., a 4 byte fetch must start at an - address divisible by 4. On 32-bit ARM processors, these non-aligned - fetch/store instructions will be emulated in software if you say - here, which has a severe performance impact. This is necessary for - correct operation of some network protocols. With an IP-only - configuration it is safe to say N, otherwise say Y. - endmenu -source "drivers/parport/Kconfig" +menu "Device Drivers" + +source "drivers/base/Kconfig" if ALIGNMENT_TRAP source "drivers/mtd/Kconfig" endif +source "drivers/parport/Kconfig" + source "drivers/pnp/Kconfig" source "drivers/block/Kconfig" -source "drivers/md/Kconfig" - source "drivers/acorn/block/Kconfig" -source "net/Kconfig" - if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE source "drivers/ide/Kconfig" endif source "drivers/scsi/Kconfig" +source "drivers/md/Kconfig" + source "drivers/message/fusion/Kconfig" source "drivers/ieee1394/Kconfig" source "drivers/message/i2o/Kconfig" +source "net/Kconfig" + source "drivers/isdn/Kconfig" -# # input before char - char/joystick depends on it. As does USB. -# + source "drivers/input/Kconfig" source "drivers/char/Kconfig" @@ -713,21 +709,23 @@ #source "drivers/l3/Kconfig" -source "drivers/media/Kconfig" - -source "fs/Kconfig" +source "drivers/misc/Kconfig" -source "arch/arm/oprofile/Kconfig" +source "drivers/media/Kconfig" source "drivers/video/Kconfig" source "sound/Kconfig" -source "drivers/misc/Kconfig" - source "drivers/usb/Kconfig" source "drivers/mmc/Kconfig" + +endmenu + +source "fs/Kconfig" + +source "arch/arm/oprofile/Kconfig" source "arch/arm/Kconfig.debug" diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile --- a/arch/arm/Makefile 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/Makefile 2005-03-30 16:58:51 -08:00 @@ -22,15 +22,13 @@ endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) -CFLAGS += -mbig-endian +CPPFLAGS += -mbig-endian AS += -EB LD += -EB -AFLAGS += -mbig-endian else -CFLAGS += -mlittle-endian +CPPFLAGS += -mlittle-endian AS += -EL LD += -EL -AFLAGS += -mlittle-endian endif comma = , diff -Nru a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/common/Kconfig 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,21 @@ +config ICST525 + bool + +config ICST307 + bool + +config SA1111 + bool + select DMABOUNCE + +config DMABOUNCE + bool + +config TIMER_ACORN + bool + +config SHARP_LOCOMO + bool + +config SHARP_SCOOP + bool diff -Nru a/arch/arm/configs/a5k_defconfig b/arch/arm/configs/a5k_defconfig --- a/arch/arm/configs/a5k_defconfig 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,522 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_ARM=y -# CONFIG_SBUS is not set -CONFIG_UID16=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_OBSOLETE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y - -# -# System Type -# -CONFIG_ARCH_ARCA5K=y -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# -# CONFIG_ARCH_ARC is not set -CONFIG_ARCH_A5K=y - -# -# Footbridge Implementations -# - -# -# SA11x0 Implementations -# -CONFIG_ARCH_ACORN=y -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -# CONFIG_CPU_32 is not set -CONFIG_CPU_26=y -# CONFIG_PAGESIZE_16 is not set - -# -# Processor Type -# -# CONFIG_DISCONTIGMEM is not set - -# -# General setup -# -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y -# CONFIG_BINFMT_ELF is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -# CONFIG_PARPORT_PC_FIFO is not set -CONFIG_PARPORT_PC_SUPERIO=y -# CONFIG_PARPORT_ARC is not set -# CONFIG_PARPORT_AMIGA is not set -# CONFIG_PARPORT_MFC3 is not set -# CONFIG_PARPORT_ATARI is not set -# CONFIG_PARPORT_SUNBPP is not set -# CONFIG_PARPORT_OTHER is not set -# CONFIG_PARPORT_1284 is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Plug and Play configuration -# -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y - -# -# Acorn-specific block devices -# -# CONFIG_BLK_DEV_FD1772 is not set -CONFIG_BLK_DEV_MFM=m -CONFIG_BLK_DEV_MFM_AUTODETECT=y - -# -# Networking options -# -# CONFIG_PACKET is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set - -# -# -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_LLC is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_NET_SB1000 is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_ARM_ETHER1=y -CONFIG_ARM_ETHER3=y -# CONFIG_ARM_ETHERH is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_NET_ISA is not set -# CONFIG_NET_PCI is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# ATA/IDE/MFM/RLL support -# -CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -CONFIG_BLK_DEV_IDE_ICSIDE=y -# CONFIG_BLK_DEV_IDEDMA_ICS is not set -# CONFIG_IDEDMA_ICS_AUTO is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_BLK_DEV_IDE_RAPIDE is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set - -# -# SCSI support -# -# CONFIG_SCSI is not set - -# -# I2O device support -# -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_ATOMWIDE_SERIAL is not set -# CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_UNIX98_PTYS is not set -# CONFIG_PRINTER is not set -# CONFIG_PPDEV is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_ALGOBIT=y -# CONFIG_I2C_ALGOPCF is not set -CONFIG_I2C_CHARDEV=y - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -CONFIG_MOUSE=y -# CONFIG_PSMOUSE is not set -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set - -# -# Joysticks -# -# CONFIG_JOYSTICK is not set - -# -# Input core support is needed for joysticks -# -# CONFIG_QIC02_TAPE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=y -CONFIG_ADFS_FS=y -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_RAMFS is not set -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_MINIX_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -# CONFIG_CODA_FS is not set -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y -CONFIG_LOCKD=y -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_MOUNT_SUBDIR is not set -# CONFIG_NCPFS_NDS_DOMAINS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_ACORN_PARTITION=y -CONFIG_ACORN_PARTITION_ADFS=y -CONFIG_ACORN_PARTITION_ICS=y -CONFIG_ACORN_PARTITION_POWERTEC=y -CONFIG_ACORN_PARTITION_RISCIX=y -CONFIG_NLS=y - -# -# Native Language Support -# -CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_UTF8 is not set - -# -# Console drivers -# -CONFIG_FB=y - -# -# Frame-buffer support -# -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FB_ACORN=y -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FBCON_ADVANCED is not set -CONFIG_FBCON_MFB=y -CONFIG_FBCON_CFB2=y -CONFIG_FBCON_CFB4=y -CONFIG_FBCON_CFB8=y -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -CONFIG_FBCON_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_PEARL_8x8 is not set -CONFIG_FONT_ACORN_8x8=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# Kernel hacking -# -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_NO_PGT_CACHE=y -CONFIG_DEBUG_LL=y diff -Nru a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig --- a/arch/arm/configs/assabet_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/assabet_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,22 +1,26 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11 +# Wed Mar 9 13:13:30 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -25,16 +29,22 @@ # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -43,106 +53,52 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y -# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # CONFIG_SA1100_ASSABET=y # CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set # CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set # CONFIG_SA1100_HACKKIT is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set # CONFIG_SA1100_SSP is not set -CONFIG_SA1100_USB=m -CONFIG_SA1100_USB_NETLINK=m -# CONFIG_SA1100_USB_CHAR is not set - -# -# TI OMAP Implementations -# - -# -# OMAP Feature Selections -# - -# -# S3C2410 Implementations -# # # Processor Type @@ -152,6 +108,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4=y CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WB=y CONFIG_CPU_MINICACHE=y @@ -160,60 +117,86 @@ # # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# +# CONFIG_I82365 is not set +# CONFIG_TCIC is not set +CONFIG_PCMCIA_SA1100=y + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram" +# CONFIG_XIP_KERNEL is not set CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_SA1110=y -# CONFIG_CPU_FREQ_PROC_INTF is not set +# CONFIG_CPU_FREQ_DEBUG is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_24_API=y +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_SA1110=y # -# PCMCIA/CardBus support +# Floating point emulation # -CONFIG_PCMCIA=y -# CONFIG_PCMCIA_DEBUG is not set -# CONFIG_I82365 is not set -# CONFIG_TCIC is not set -CONFIG_PCMCIA_SA1100=y # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_FW_LOADER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set # CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="mem=32M console=ttySA0,38400n8 initrd=0xc0800000,3M root=/dev/ram" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -223,6 +206,9 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -246,10 +232,12 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -# CONFIG_MTD_CFI_B2 is not set -CONFIG_MTD_CFI_B4=y -# CONFIG_MTD_CFI_B8 is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set # CONFIG_MTD_CFI_I1 is not set CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set @@ -257,10 +245,11 @@ CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -275,8 +264,10 @@ # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -291,6 +282,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # # CONFIG_PNP is not set @@ -300,12 +296,58 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECS is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -313,6 +355,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -335,6 +389,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -354,12 +411,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -411,11 +468,9 @@ # # CONFIG_NSC_FIR is not set # CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set # CONFIG_SMC_IRCC_FIR is not set # CONFIG_ALI_FIR is not set CONFIG_SA1100_FIR=m -# CONFIG_VIA_FIR is not set # CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set @@ -436,6 +491,7 @@ # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -485,51 +541,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -559,7 +570,6 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y # CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set # # Input Device Drivers @@ -596,7 +606,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -609,17 +618,12 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -CONFIG_SA1100_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -634,12 +638,8 @@ # CONFIG_I2C is not set # -# L3 serial bus support +# Misc devices # -CONFIG_L3=y -CONFIG_L3_ALGOBIT=y -CONFIG_L3_BIT_SA1100_GPIO=y -CONFIG_BIT_SA1100_GPIO=y # # Multimedia devices @@ -652,6 +652,60 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_SA1100=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # MMC/SD Card support # # CONFIG_MMC is not set @@ -665,10 +719,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -684,6 +743,7 @@ CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y # CONFIG_VFAT_FS is not set +CONFIG_FAT_DEFAULT_CODEPAGE=437 # CONFIG_NTFS_FS is not set # @@ -694,6 +754,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -711,6 +772,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -727,14 +793,13 @@ # CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -752,7 +817,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -786,6 +850,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -807,84 +872,19 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_SA1100=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -CONFIG_SOUND_SA1100=y -CONFIG_SOUND_UDA1341=y -CONFIG_SOUND_ASSABET_UDA1341=y -# CONFIG_SOUND_SA1100SSP is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -CONFIG_MCP=y -CONFIG_MCP_SA1100=y -CONFIG_MCP_UCB1200=y -CONFIG_MCP_UCB1200_AUDIO=m -CONFIG_MCP_UCB1200_TS=y - -# -# Console Switches -# -CONFIG_SWITCHES=y -CONFIG_SWITCHES_SA1100=y -CONFIG_SWITCHES_UCB1X00=y - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_PRINTK_TIME is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_KERNEL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -893,8 +893,14 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig --- a/arch/arm/configs/badge4_defconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/configs/badge4_defconfig 2005-03-30 16:58:49 -08:00 @@ -1,41 +1,64 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sat Mar 26 21:32:26 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_NET=y +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y # CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -43,161 +66,134 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set - -# -# Footbridge Implementations -# -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_H3XXX is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set CONFIG_SA1100_BADGE4=y # CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set -CONFIG_SA1111=y -CONFIG_FORCE_MAX_ZONEORDER=9 -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_USB_NETLINK is not set -# CONFIG_SA1100_USB_CHAR is not set -# CONFIG_H3600_SLEEVE is not set - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_AUTCPU12 is not set -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_FORTUNET is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set +# CONFIG_SA1100_SSP is not set # # Processor Type # -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set +CONFIG_CPU_32=y CONFIG_CPU_SA1100=y -# CONFIG_XSCALE_PMU is not set -# CONFIG_ARM_THUMB is not set -CONFIG_DISCONTIGMEM=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # -# General setup +# Processor Features +# +CONFIG_SA1111=y +CONFIG_DMABOUNCE=y +CONFIG_FORCE_MAX_ZONEORDER=9 + +# +# Bus support # -# CONFIG_PCI is not set CONFIG_ISA=y -# CONFIG_ISA_DMA is not set -# CONFIG_FIQ is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="init=/linuxrc root=/dev/mtdblock3" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# CONFIG_CPU_FREQ=y -CONFIG_HOTPLUG=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set # -# PCMCIA/CardBus support +# Floating point emulation # -CONFIG_PCMCIA=y -CONFIG_PCMCIA_PROBE=y -# CONFIG_I82092 is not set -# CONFIG_I82365 is not set -# CONFIG_TCIC is not set -# CONFIG_PCMCIA_CLPS6700 is not set -CONFIG_PCMCIA_SA1100=y # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -CONFIG_FPE_FASTFPE=m -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=m +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m CONFIG_BINFMT_MISC=m -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_APM is not set CONFIG_ARTHUR=m -CONFIG_CMDLINE="init=/linuxrc root=/dev/mtdblock3" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -CONFIG_PARPORT=m -# CONFIG_PARPORT_PC is not set -# CONFIG_PARPORT_ARC is not set -# CONFIG_PARPORT_AMIGA is not set -# CONFIG_PARPORT_MFC3 is not set -# CONFIG_PARPORT_ATARI is not set -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_SUNBPP is not set -# CONFIG_PARPORT_OTHER is not set -# CONFIG_PARPORT_1284 is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -205,9 +201,10 @@ CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=0 +# CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_BOOTLDR_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -217,6 +214,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -229,51 +227,49 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -CONFIG_MTD_CFI_B2=y -# CONFIG_MTD_CFI_B4 is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=y # CONFIG_MTD_CFI_I2 is not set # CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set CONFIG_MTD_SA1100=y -# CONFIG_MTD_2PARTS_IPAQ is not set -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set -# CONFIG_MTD_EPXA10DB is not set -# CONFIG_MTD_PCI is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -281,11 +277,19 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +CONFIG_PARPORT=m +# CONFIG_PARPORT_PC is not set +CONFIG_PARPORT_NOT_PC=y +# CONFIG_PARPORT_ARC is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_1284 is not set + +# +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set # # Block devices @@ -293,178 +297,193 @@ # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set # -# Multi-device support (RAID and LVM) +# IO Schedulers # -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # -# Networking options +# ATA/ATAPI/MFM/RLL support # -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set +CONFIG_IDE=m +CONFIG_BLK_DEV_IDE=m # +# Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=m +CONFIG_BLK_DEV_IDESCSI=m +# CONFIG_IDE_TASK_IOCTL is not set + # -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_LLC is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set # -# QoS and/or fair queueing +# SCSI device support # -# CONFIG_NET_SCHED is not set +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y # -# Network device support +# SCSI support type (disk, tape, CD-ROM) # -CONFIG_NETDEVICES=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y # -# ARCnet devices +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs # -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set # -# Ethernet (10 or 100Mbit) +# SCSI Transport Attributes # -# CONFIG_NET_ETHERNET is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # -# Ethernet (1000 Mbit) +# SCSI low-level drivers # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_DEBUG is not set # -# Wireless LAN (non-hamradio) +# Multi-device support (RAID and LVM) # -CONFIG_NET_RADIO=y -# CONFIG_STRIP is not set -# CONFIG_ARLAN is not set -# CONFIG_AIRONET4500 is not set -# CONFIG_AIRONET4500_NONCS is not set -# CONFIG_AIRONET4500_PROC is not set +# CONFIG_MD is not set # -# Wireless ISA/PCI cards support +# Fusion MPT device support # -# CONFIG_WAVELAN is not set -# CONFIG_AIRO is not set -CONFIG_HERMES=y # -# Wireless Pcmcia/Cardbus cards support +# IEEE 1394 (FireWire) support # -CONFIG_PCMCIA_NETWAVE=m -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_HERMES=y -CONFIG_AIRO_CS=m -CONFIG_NET_WIRELESS=y # -# Token Ring devices +# I2O device support # -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Networking support # -# CONFIG_WAN is not set +CONFIG_NET=y # -# PCMCIA network device support +# Networking options # -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=y -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=y -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -CONFIG_NET_PCMCIA_RADIO=y -CONFIG_PCMCIA_RAYCS=m -# CONFIG_AIRONET4500_CS is not set +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set # -# Amateur Radio support +# SCTP Configuration (EXPERIMENTAL) # -# CONFIG_HAMRADIO is not set +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# IrDA (infrared) support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set CONFIG_IRDA=y # # IrDA protocols # CONFIG_IRLAN=y -# CONFIG_IRNET is not set CONFIG_IRCOMM=y CONFIG_IRDA_ULTRA=y @@ -483,139 +502,106 @@ # SIR device drivers # # CONFIG_IRTTY_SIR is not set -# CONFIG_IRPORT_SIR is not set # # Dongle support # -# CONFIG_DONGLE is not set + +# +# Old SIR device drivers +# +# CONFIG_IRPORT_SIR is not set + +# +# Old Serial dongle support +# # # FIR device drivers # # CONFIG_USB_IRDA is not set +# CONFIG_SIGMATEL_FIR is not set # CONFIG_NSC_FIR is not set # CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set # CONFIG_SMC_IRCC_FIR is not set # CONFIG_ALI_FIR is not set -# CONFIG_VLSI_FIR is not set CONFIG_SA1100_FIR=y +CONFIG_BT=m +CONFIG_BT_L2CAP=m +# CONFIG_BT_SCO is not set +# CONFIG_BT_RFCOMM is not set +# CONFIG_BT_BNEP is not set +# CONFIG_BT_HIDP is not set # -# ATA/IDE/MFM/RLL support +# Bluetooth device drivers # -CONFIG_IDE=m +CONFIG_BT_HCIUSB=m +# CONFIG_BT_HCIUSB_SCO is not set +CONFIG_BT_HCIUART=m +# CONFIG_BT_HCIUART_H4 is not set +# CONFIG_BT_HCIUART_BCSP is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +CONFIG_BT_HCIVHCI=m +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # -# IDE, ATA and ATAPI Block devices +# ARCnet devices # -CONFIG_BLK_DEV_IDE=m +# CONFIG_ARCNET is not set # -# Please see Documentation/ide.txt for help/info on IDE drives +# Ethernet (10 or 100Mbit) # -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=m -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECS is not set -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=m -CONFIG_BLK_DEV_IDESCSI=m +# CONFIG_NET_ETHERNET is not set +CONFIG_MII=m # -# IDE chipset support/bugfixes +# Ethernet (1000 Mbit) # -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set # -# SCSI support +# Ethernet (10000 Mbit) # -CONFIG_SCSI=y # -# SCSI support type (disk, tape, CD-ROM) +# Token Ring devices # -CONFIG_BLK_DEV_SD=y -CONFIG_SD_EXTRA_DEVS=40 -CONFIG_CHR_DEV_ST=m -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_SR_EXTRA_DEVS=2 -CONFIG_CHR_DEV_SG=y +# CONFIG_TR is not set # -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# Wireless LAN (non-hamradio) # -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set +CONFIG_NET_RADIO=y # -# SCSI low-level drivers +# Obsolete Wireless cards support (pre-802.11) # -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AHA1740 is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_DMA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_PPA is not set -# CONFIG_SCSI_IMM is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_NCR53C7xx is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_SIM710 is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_DEBUG is not set +# CONFIG_STRIP is not set +# CONFIG_ARLAN is not set +# CONFIG_WAVELAN is not set # -# PCMCIA SCSI adapter support +# Wireless 802.11b ISA/PCI cards support # -# CONFIG_SCSI_PCMCIA is not set +# CONFIG_ATMEL is not set +CONFIG_NET_WIRELESS=y # -# I2O device support +# Wan interfaces # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +# CONFIG_WAN is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -626,129 +612,152 @@ # Input device support # # CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_INPUT_EMU10K1 is not set -# CONFIG_GAMEPORT_PCIGAME is not set -# CONFIG_GAMEPORT_FM801 is not set -# CONFIG_GAMEPORT_CS461x is not set -# CONFIG_SERIO is not set -# CONFIG_SERIO_SERPORT is not set # # Character devices # # CONFIG_VT is not set -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# CONFIG_SERIAL_SA1100=y CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=115200 -# CONFIG_SERIAL_8250 is not set -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_ATOMWIDE_SERIAL is not set -# CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_PRINTER is not set # CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set # -# I2C support +# IPMI # -CONFIG_I2C=m -CONFIG_I2C_ALGOBIT=m -# CONFIG_I2C_BIT_SA1100_GPIO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ELEKTOR=m -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_PROC=m +# CONFIG_IPMI_HANDLER is not set # -# L3 serial bus support +# Watchdog Cards # -CONFIG_L3=y -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set # -# Other L3 adapters +# Watchdog Device Drivers # -CONFIG_L3_SA1111=y -# CONFIG_BIT_SA1100_GPIO is not set +CONFIG_SOFT_WATCHDOG=m +CONFIG_SA1100_WATCHDOG=m # -# Mice +# ISA-based Watchdog Cards # -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_WDT is not set # -# Watchdog Cards +# USB-based Watchdog Cards # -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -CONFIG_SOFT_WATCHDOG=m -# CONFIG_WDT is not set -# CONFIG_WDTPCI is not set -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -# CONFIG_21285_WATCHDOG is not set -# CONFIG_977_WATCHDOG is not set -CONFIG_SA1100_WATCHDOG=m -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_60XX_WDT is not set -# CONFIG_W83877F_WDT is not set -# CONFIG_MACHZ_WDT is not set -# CONFIG_INTEL_RNG is not set +# CONFIG_USBPCWATCHDOG is not set # CONFIG_NVRAM is not set CONFIG_RTC=m -CONFIG_SA1100_RTC=m # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set # -# PCMCIA character devices +# I2C support +# +CONFIG_I2C=m +CONFIG_I2C_CHARDEV=m + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=m +CONFIG_I2C_ALGOPCF=m +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +CONFIG_I2C_ELEKTOR=m +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Misc devices # # @@ -759,27 +768,18 @@ # # Video For Linux # -CONFIG_VIDEO_PROC_FS=y -# CONFIG_I2C_PARPORT is not set # # Video Adapters # -# CONFIG_VIDEO_BT848 is not set # CONFIG_VIDEO_PMS is not set # CONFIG_VIDEO_BWQCAM is not set # CONFIG_VIDEO_CQCAM is not set # CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5246A is not set # CONFIG_VIDEO_SAA5249 is not set # CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_ZORAN_BUZ is not set -# CONFIG_VIDEO_ZORAN_DC10 is not set -# CONFIG_VIDEO_ZORAN_LML33 is not set -# CONFIG_VIDEO_ZR36120 is not set -# CONFIG_VIDEO_MEYE is not set -# CONFIG_VIDEO_CYBERPRO is not set +# CONFIG_VIDEO_OVCAMCHIP is not set # # Radio Adapters @@ -789,215 +789,54 @@ # CONFIG_RADIO_RTRACK2 is not set # CONFIG_RADIO_AZTECH is not set # CONFIG_RADIO_GEMTEK is not set -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set # CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_MIROPCM20 is not set -# CONFIG_RADIO_MIROPCM20_RDS is not set # CONFIG_RADIO_SF16FMI is not set +# CONFIG_RADIO_SF16FMR2 is not set # CONFIG_RADIO_TERRATEC is not set # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set # -# File systems +# Digital Video Broadcasting Devices # -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -CONFIG_EXT3_FS=m -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=m -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_CRAMFS=m -CONFIG_TMPFS=y -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -CONFIG_MINIX_FS=m -# CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=m -# CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set +# CONFIG_DVB is not set # -# Network File Systems +# Graphics support # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -# CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=m -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -# CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set +# CONFIG_FB is not set # -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -CONFIG_SMB_NLS=y -CONFIG_NLS=y - -# -# Native Language Support +# Sound # -CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_SOUND=y # -# Sound +# Advanced Linux Sound Architecture # -CONFIG_SOUND=y +# CONFIG_SND is not set # # Open Sound System # CONFIG_SOUND_PRIME=y # CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_MIDI_EMU10K1 is not set # CONFIG_SOUND_FUSION is not set # CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_RME96XX is not set # CONFIG_SOUND_SONICVIBES is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_MIDI_VIA82CXXX is not set -CONFIG_SOUND_SA1100=y -CONFIG_SOUND_UDA1341=y -# CONFIG_SOUND_ASSABET_UDA1341 is not set -# CONFIG_SOUND_H3600_UDA1341 is not set -# CONFIG_SOUND_PANGOLIN_UDA1341 is not set -CONFIG_SOUND_SA1111_UDA1341=y -# CONFIG_SOUND_STORK_UDA1341 is not set -# CONFIG_SOUND_SA1100SSP is not set -# CONFIG_SOUND_STORK_AC97 is not set # CONFIG_SOUND_OSS is not set -# CONFIG_SOUND_WAVEARTIST is not set # CONFIG_SOUND_TVMIXER is not set - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Multimedia Capabilities Port drivers -# -CONFIG_MCP=y -CONFIG_MCP_SA1100=y -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set +# CONFIG_SOUND_AD1980 is not set # # USB support # +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB=y CONFIG_USB_DEBUG=y @@ -1006,75 +845,106 @@ # CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_LONG_TIMEOUT is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set # # USB Host Controller Drivers # -# CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_OHCI_HCD is not set -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -# CONFIG_USB_OHCI is not set -CONFIG_USB_OHCI_SA1111=y +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers # CONFIG_USB_AUDIO=y -CONFIG_USB_BLUETOOTH=m + +# +# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem +# +# CONFIG_USB_MIDI is not set +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_DEBUG=y +# CONFIG_USB_STORAGE_RW_DETECT is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_USBAT is not set # CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m # -# USB Human Interface Devices (HID) +# USB Input Devices # +# CONFIG_USB_HID is not set # -# Input core support is needed for USB HID +# USB HID Boot Protocol drivers # # # USB Imaging devices # -CONFIG_USB_DC2XX=m CONFIG_USB_MDC800=m -CONFIG_USB_SCANNER=m CONFIG_USB_MICROTEK=m -CONFIG_USB_HPUSBSCSI=m # # USB Multimedia devices # +CONFIG_USB_DABUSB=m +CONFIG_USB_VICAM=m +CONFIG_USB_DSBR=m CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m CONFIG_USB_OV511=m -CONFIG_USB_PWC=m CONFIG_USB_SE401=m +# CONFIG_USB_SN9C102 is not set # CONFIG_USB_STV680 is not set -CONFIG_USB_VICAM=m -CONFIG_USB_DSBR=m -CONFIG_USB_DABUSB=m -CONFIG_USB_KONICAWC=m +CONFIG_USB_PWC=m # -# USB Network adaptors +# USB Network Adapters # -CONFIG_USB_PEGASUS=m -CONFIG_USB_KAWETH=m CONFIG_USB_CATC=m -CONFIG_USB_CDCETHER=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +# CONFIG_USB_RTL8150 is not set CONFIG_USB_USBNET=m # +# USB Host-to-Host Cables +# +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_GENESYS=y +CONFIG_USB_NET1080=y +CONFIG_USB_PL2301=y +CONFIG_USB_KC2190=y + +# +# Intelligent USB Devices/Gadgets +# +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_ZAURUS=y +CONFIG_USB_CDCETHER=y + +# +# USB Network Adapters +# +# CONFIG_USB_ZD1201 is not set +CONFIG_USB_MON=y + +# # USB port drivers # CONFIG_USB_USS720=m @@ -1087,14 +957,19 @@ CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_VISOR=m # CONFIG_USB_SERIAL_IPAQ is not set CONFIG_USB_SERIAL_IR=m CONFIG_USB_SERIAL_EDGEPORT=m +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KEYSPAN=m +# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set # CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set # CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set # CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set @@ -1102,53 +977,264 @@ # CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set # CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set # CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set # CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -CONFIG_USB_SERIAL_MCT_U232=m +# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set # CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +CONFIG_USB_SERIAL_MCT_U232=m CONFIG_USB_SERIAL_PL2303=m +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_TI is not set CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_EZUSB=y # # USB Miscellaneous drivers # -CONFIG_USB_RIO500=m +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set # CONFIG_USB_AUERSWALD is not set +CONFIG_USB_RIO500=m +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_TEST is not set # -# Bluetooth support +# USB ATM/DSL drivers # -CONFIG_BT=m -CONFIG_BT_L2CAP=m # -# Bluetooth device drivers +# USB Gadget Support # -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIVHCI=m +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# File systems +# +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=m +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=m +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=m +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +CONFIG_CRAMFS=m +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set # # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines # -# CONFIG_CRC32 is not set +CONFIG_CRC_CCITT=y +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig --- a/arch/arm/configs/bast_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/bast_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Mon Nov 15 15:32:48 2004 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 02:24:16 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -27,7 +28,6 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set @@ -35,6 +35,7 @@ CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -44,6 +45,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -85,12 +87,21 @@ # CONFIG_ARCH_BAST=y # CONFIG_ARCH_H1940 is not set +# CONFIG_MACH_N30 is not set # CONFIG_ARCH_SMDK2410 is not set +# CONFIG_ARCH_S3C2440 is not set CONFIG_MACH_VR1000=y # CONFIG_MACH_RX3715 is not set +# CONFIG_MACH_OTOM is not set +# CONFIG_MACH_NEXCODER_2440 is not set CONFIG_CPU_S3C2410=y # +# S3C2410 Boot +# +# CONFIG_S3C2410_BOOT_WATCHDOG is not set + +# # S3C2410 Setup # CONFIG_S3C2410_DMA=y @@ -120,53 +131,74 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options # -# CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" # CONFIG_XIP_KERNEL is not set # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_DEBUG_DRIVER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set CONFIG_APM=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -CONFIG_PARPORT=y -# CONFIG_PARPORT_PC is not set -# CONFIG_PARPORT_ARC is not set -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set CONFIG_MTD_CMDLINE_PARTS=y @@ -206,6 +238,7 @@ # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -225,6 +258,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -243,6 +277,16 @@ # CONFIG_MTD_NAND_S3C2410_DEBUG is not set # CONFIG_MTD_NAND_S3C2410_HWECC is not set # CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set + +# +# Parallel port support +# +CONFIG_PARPORT=y +# CONFIG_PARPORT_PC is not set +# CONFIG_PARPORT_ARC is not set +# CONFIG_PARPORT_GSC is not set +CONFIG_PARPORT_1284=y # # Plug and Play support @@ -253,10 +297,12 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_PARIDE is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" @@ -269,6 +315,39 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDE_BAST=y +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -276,6 +355,19 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -380,51 +472,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDE_BAST=y -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -447,17 +494,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -475,6 +511,17 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -485,9 +532,9 @@ # CONFIG_ROCKETPORT is not set # CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set +# CONFIG_ISI is not set # CONFIG_SYNCLINKMP is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set @@ -554,6 +601,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -582,11 +634,14 @@ CONFIG_I2C_SENSOR=m # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set CONFIG_SENSORS_LM75=m @@ -599,6 +654,7 @@ # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -617,6 +673,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -627,6 +687,53 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_SOFT_CURSOR is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -640,6 +747,10 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y @@ -692,6 +803,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -713,7 +825,6 @@ # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -793,62 +904,20 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=16 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set @@ -868,6 +937,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/cerfcube_defconfig b/arch/arm/configs/cerfcube_defconfig --- a/arch/arm/configs/cerfcube_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/cerfcube_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,35 +1,51 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 14:19:40 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -39,94 +55,54 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set CONFIG_SA1100_CERF=y # CONFIG_SA1100_CERF_FLASH_8MB is not set CONFIG_SA1100_CERF_FLASH_16MB=y # CONFIG_SA1100_CERF_FLASH_32MB is not set -# CONFIG_SA1100_CERF_CPLD is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set # CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set # CONFIG_SA1100_HACKKIT is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set # CONFIG_SA1100_SSP is not set -CONFIG_SA1100_USB=m -CONFIG_SA1100_USB_NETLINK=m -# CONFIG_SA1100_USB_CHAR is not set # # Processor Type @@ -136,6 +112,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4=y CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WB=y CONFIG_CPU_MINICACHE=y @@ -144,69 +121,105 @@ # # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +CONFIG_PCCARD=m +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=m + +# +# PC-card bridges +# +# CONFIG_I82365 is not set +# CONFIG_TCIC is not set +CONFIG_PCMCIA_SA1100=m + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttySA0,38400 root=/dev/mtdblock3 rootfstype=jffs2 rw mem=32M init=/linuxrc" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_SA1110=y -# CONFIG_CPU_FREQ_PROC_INTF is not set +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_24_API=y -CONFIG_HOTPLUG=y +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_SA1110=y # -# PCMCIA/CardBus support +# Floating point emulation # -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_DEBUG is not set -# CONFIG_I82365 is not set -# CONFIG_TCIC is not set -CONFIG_PCMCIA_SA1100=m # -# At least one math emulation must be selected +# At least one emulation must be selected # # CONFIG_FPE_NWFPE is not set CONFIG_FPE_FASTFPE=y + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_FW_LOADER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set # CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0,38400 root=/dev/mtdblock3 rootfstype=jffs2 rw mem=32M init=/linuxrc" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set @@ -226,13 +239,24 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -247,8 +271,10 @@ # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -263,6 +289,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # # CONFIG_PNP is not set @@ -272,12 +303,57 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECS is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -285,6 +361,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -307,23 +395,24 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -332,37 +421,42 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y # CONFIG_MII is not set -# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -372,7 +466,6 @@ # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_CS89x0 is not set -CONFIG_CS8900=m # CONFIG_NET_POCKET is not set # @@ -382,25 +475,16 @@ # # Ethernet (10000 Mbit) # -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set -# CONFIG_HOSTAP is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +# CONFIG_NET_RADIO is not set # # PCMCIA network device support @@ -408,60 +492,18 @@ # CONFIG_NET_PCMCIA is not set # -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=m -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -CONFIG_BLK_DEV_IDECS=m -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# I2O device support +# Wan interfaces # +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -477,19 +519,10 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_TSLIBDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -499,6 +532,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -514,42 +554,13 @@ # # Non-8250 serial port support # -# CONFIG_SERIAL_DZ is not set CONFIG_SERIAL_SA1100=y CONFIG_SERIAL_SA1100_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Algorithms -# - -# -# I2C Hardware Bus support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# L3 serial bus support -# -CONFIG_L3=m - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # # IPMI @@ -561,40 +572,27 @@ # CONFIG_WATCHDOG=y # CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# # CONFIG_SOFT_WATCHDOG is not set -# CONFIG_WDT is not set -# CONFIG_WDTPCI is not set -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set CONFIG_SA1100_WATCHDOG=m -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set + +# +# ISA-based Watchdog Cards +# +# CONFIG_PCWATCHDOG is not set # CONFIG_MIXCOMWD is not set -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_W83877F_WDT is not set -# CONFIG_MACHZ_WDT is not set -# CONFIG_SC520_WDT is not set -# CONFIG_AMD7XX_TCO is not set -# CONFIG_ALIM7101_WDT is not set -# CONFIG_ALIM1535_WDT is not set -# CONFIG_SC1200_WDT is not set -# CONFIG_WAFER_WDT is not set -# CONFIG_CPU5_WDT is not set +# CONFIG_WDT is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_SA1100_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -604,6 +602,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -614,6 +626,35 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # MMC/SD Card support # # CONFIG_MMC is not set @@ -632,10 +673,16 @@ CONFIG_FS_MBCACHE=m # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -651,16 +698,19 @@ CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -670,6 +720,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -677,6 +728,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -694,18 +750,19 @@ CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y -# CONFIG_NFSD_TCP is not set +CONFIG_NFSD_TCP=y CONFIG_LOCKD=m CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m CONFIG_SUNRPC=m -# CONFIG_SUNRPC_GSS is not set +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -723,17 +780,15 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_EFI_PARTITION is not set -CONFIG_SMB_NLS=y -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set @@ -758,6 +813,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -774,69 +830,76 @@ # CONFIG_NLS_UTF8 is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches +# Profiling support # -# CONFIG_SWITCHES is not set - -# -# USB support -# -# CONFIG_USB_GADGET is not set +# CONFIG_PROFILING is not set # # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # -# CONFIG_CRYPTO is not set +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=m +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# # # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/clps7500_defconfig b/arch/arm/configs/clps7500_defconfig --- a/arch/arm/configs/clps7500_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/clps7500_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,17 +1,49 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 17:20:48 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -CONFIG_OBSOLETE=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_SYSCTL is not set +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -21,138 +53,177 @@ # # System Type # -# CONFIG_ARCH_ARCA5K is not set CONFIG_ARCH_CLPS7500=y +# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_FTVPCI is not set -# CONFIG_ARCH_TBOX is not set -# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_ARM710=y +CONFIG_CPU_32v3=y +CONFIG_CPU_CACHE_V3=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V3=y +CONFIG_CPU_TLB_V3=y # -# Archimedes/A5000 Implementations +# Processor Features # +CONFIG_TIMER_ACORN=y # -# Footbridge Implementations +# Bus support # +CONFIG_ISA=y # -# SA11x0 Implementations +# PCCARD (PCMCIA/CardBus) support # +# CONFIG_PCCARD is not set # -# CLPS711X/EP721X Implementations +# Kernel Features # -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y # -# Processor Type +# Boot options # -CONFIG_CPU_32v3=y -# CONFIG_CPU_32v4 is not set -# CONFIG_CPU_ARM610 is not set -CONFIG_CPU_ARM710=y -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -# CONFIG_CPU_SA1100 is not set -# CONFIG_DISCONTIGMEM is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=16M root=nfs" +# CONFIG_XIP_KERNEL is not set # -# General setup +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_FPE_NWFPE is not set + +# +# Userspace binary formats # -CONFIG_ANGELBOOT=y -# CONFIG_PCI is not set -CONFIG_ISA=y -# CONFIG_ISA_DMA is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -CONFIG_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="mem=16M root=nfs" -# CONFIG_ALIGNMENT_TRAP is not set # -# Parallel port support +# Power management options +# +# CONFIG_PM is not set + +# +# Device Drivers # -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_FIFO=y -# CONFIG_PARPORT_PC_SUPERIO is not set -# CONFIG_PARPORT_AMIGA is not set -# CONFIG_PARPORT_MFC3 is not set -# CONFIG_PARPORT_ATARI is not set -# CONFIG_PARPORT_SUNBPP is not set -# CONFIG_PARPORT_OTHER is not set -CONFIG_PARPORT_1284=y + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_PARTITIONS is not set # -# Disk-On-Chip Device Drivers +# User Modules And Translation Layers # -# CONFIG_MTD_DOC1000 is not set -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_CHAR is not set +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set # -# RAM/ROM Device Drivers +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set + +# +# Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PMC551_BUGFIX is not set -# CONFIG_MTD_PMC551_DEBUG is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # -# Linearly Mapped Flash Device Drivers +# Disk-On-Chip Device Drivers # -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_JEDEC is not set +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set # -# Drivers for chip mappings +# NAND Flash Device Drivers # +# CONFIG_MTD_NAND is not set # -# User modules and translation layers for MTD devices +# Parallel port support # -# CONFIG_MTD_CHAR is not set -# CONFIG_MTD_BLOCK is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set +CONFIG_PARPORT=y +CONFIG_PARPORT_PC=y +CONFIG_PARPORT_PC_FIFO=y +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_ARC is not set +# CONFIG_PARPORT_GSC is not set +CONFIG_PARPORT_1284=y # -# Plug and Play configuration +# Plug and Play support # # CONFIG_PNP is not set @@ -162,77 +233,136 @@ # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set -# CONFIG_BLK_DEV_FLD7500 is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y # # Networking options # # CONFIG_PACKET is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN is not set +# CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set +# CONFIG_NETFILTER is not set # -# +# SCTP Configuration (EXPERIMENTAL) # +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_NET_SB1000 is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -242,18 +372,34 @@ # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set CONFIG_CS89x0=y -# CONFIG_ZNET is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set # CONFIG_PLIP is not set CONFIG_PPP=y # CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set # CONFIG_PPP_ASYNC is not set # CONFIG_PPP_SYNC_TTY is not set # CONFIG_PPP_DEFLATE is not set @@ -263,183 +409,340 @@ CONFIG_SLIP_COMPRESSED=y # CONFIG_SLIP_SMART is not set # CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# Wireless LAN (non-hamradio) +# ISDN subsystem # -# CONFIG_NET_RADIO is not set +# CONFIG_ISDN is not set # -# Token Ring devices +# Input device support # -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set +CONFIG_INPUT=y # -# Wan interfaces +# Userland interfaces # -# CONFIG_WAN is not set -# CONFIG_ASH is not set +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_PARKBD is not set +CONFIG_SERIO_RPCKBD=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # -# Amateur Radio support +# Character devices # -# CONFIG_HAMRADIO is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set # -# IrDA (infrared) support +# Serial drivers # -# CONFIG_IRDA is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set # -# ATA/IDE/MFM/RLL support +# Non-8250 serial port support # -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_PRINTER=y +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set # -# SCSI support +# IPMI # -# CONFIG_SCSI is not set +# CONFIG_IPMI_HANDLER is not set # -# I2O device support +# Watchdog Cards # -# CONFIG_I2O is not set +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set # -# ISDN subsystem +# Ftape, the floppy tape device driver # -# CONFIG_ISDN is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set # -# Input core support +# TPM devices # -# CONFIG_INPUT is not set +# CONFIG_TCG_TPM is not set # -# Character devices +# I2C support # -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_SERIAL=y -# CONFIG_SERIAL_CONSOLE is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 -CONFIG_PRINTER=y -# CONFIG_LP_CONSOLE is not set -# CONFIG_PPDEV is not set +CONFIG_I2C=y +# CONFIG_I2C_CHARDEV is not set # -# I2C support +# I2C Algorithms # -CONFIG_I2C=y CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_CHARDEV is not set +# CONFIG_I2C_ALGOPCA is not set # -# Mice +# I2C Hardware Bus support # -CONFIG_BUSMOUSE=y -# CONFIG_ATIXL_BUSMOUSE is not set -# CONFIG_LOGIBUSMOUSE is not set -# CONFIG_MS_BUSMOUSE is not set -CONFIG_MOUSE=y -# CONFIG_PSMOUSE is not set -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set +# CONFIG_I2C_ELEKTOR is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set # -# Joysticks +# Misc devices # # -# Game port support +# Multimedia devices # +# CONFIG_VIDEO_DEV is not set # -# Gameport joysticks +# Digital Video Broadcasting Devices # +# CONFIG_DVB is not set # -# Serial port support +# Graphics support # +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_ACORN=y +# CONFIG_FB_VIRTUAL is not set # -# Serial port joysticks +# Console display driver support # +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # -# Parallel port joysticks +# Sound # -# CONFIG_QIC02_TAPE is not set +# CONFIG_SOUND is not set # -# Watchdog Cards +# USB support # -# CONFIG_WATCHDOG is not set -CONFIG_CLPS7500_FLASH=y -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set # -# Multimedia devices +# USB Gadget Support # -# CONFIG_VIDEO_DEV is not set +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_FAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_RAMFS is not set -# CONFIG_ISO9660_FS is not set -CONFIG_MINIX_FS=y -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set -CONFIG_ROOT_NFS=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -CONFIG_SUNRPC=y +CONFIG_ROOT_NFS=y CONFIG_LOCKD=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types @@ -451,66 +754,50 @@ # CONFIG_ATARI_PARTITION is not set # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -# CONFIG_SMB_NLS is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# # CONFIG_NLS is not set # -# Console drivers +# Profiling support # -CONFIG_PC_KEYB=y -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FB=y +# CONFIG_PROFILING is not set # -# Frame-buffer support +# Kernel hacking # -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FB_ACORN=y -# CONFIG_CHRONTEL_7003 is not set -# CONFIG_FB_VIRTUAL is not set -CONFIG_FBCON_ADVANCED=y -CONFIG_FBCON_MFB=y -CONFIG_FBCON_CFB2=y -CONFIG_FBCON_CFB4=y -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -CONFIG_FBCON_CFB24=y -# CONFIG_FBCON_CFB32 is not set -# CONFIG_FBCON_AFB is not set -# CONFIG_FBCON_ILBM is not set -# CONFIG_FBCON_IPLAN2P2 is not set -# CONFIG_FBCON_IPLAN2P4 is not set -# CONFIG_FBCON_IPLAN2P8 is not set -# CONFIG_FBCON_MAC is not set -# CONFIG_FBCON_VGA_PLANES is not set -# CONFIG_FBCON_VGA is not set -# CONFIG_FBCON_HGA is not set -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -# CONFIG_FBCON_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set # -# Sound +# Security options # -# CONFIG_SOUND is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# USB support +# Cryptographic options # -# CONFIG_USB is not set +# CONFIG_CRYPTO is not set # -# Kernel hacking +# Hardware crypto devices # -# CONFIG_FRAME_POINTER is not set -# CONFIG_DEBUG_ERRORS is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_LL=y + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/ebsa110_defconfig b/arch/arm/configs/ebsa110_defconfig --- a/arch/arm/configs/ebsa110_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/ebsa110_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,40 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 18:29:48 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -43,12 +53,12 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -58,6 +68,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -66,7 +77,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Processor Type @@ -76,6 +89,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4=y CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WB=y @@ -84,54 +98,85 @@ # # -# General setup +# Bus support # CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=m +CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=m + +# +# PC-card bridges +# CONFIG_I82365=m # CONFIG_TCIC is not set CONFIG_PCMCIA_PROBE=y +CONFIG_PCCARD_NONSTATIC=m + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/nfs rw mem=16M console=ttyS1,38400n8" +# CONFIG_XIP_KERNEL is not set # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set CONFIG_FPE_FASTFPE=y + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +# CONFIG_PM is not set + +# +# Device Drivers +# # # Generic Driver Options # +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/nfs rw mem=16M console=ttyS1,38400n8" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y # # Parallel port support # CONFIG_PARPORT=y CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_CML1=y CONFIG_PARPORT_PC_FIFO=y # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_PC_PCMCIA is not set # CONFIG_PARPORT_ARC is not set -# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_GSC is not set CONFIG_PARPORT_1284=y # @@ -145,11 +190,29 @@ # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -157,6 +220,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -174,7 +249,6 @@ CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y # CONFIG_IP_ROUTE_MULTIPATH is not set CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_PNP=y @@ -189,6 +263,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +CONFIG_IP_TCPDIAG_IPV6=y # # IP: Virtual Server Configuration @@ -199,6 +276,7 @@ # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -207,6 +285,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=y +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CONNTRACK_MARK is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=y CONFIG_IP_NF_IRC=y # CONFIG_IP_NF_TFTP is not set @@ -231,8 +312,16 @@ CONFIG_IP_NF_MATCH_STATE=y CONFIG_IP_NF_MATCH_CONNTRACK=y # CONFIG_IP_NF_MATCH_OWNER is not set +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_LOG=y +# CONFIG_IP_NF_TARGET_ULOG is not set +CONFIG_IP_NF_TARGET_TCPMSS=y CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y @@ -248,14 +337,11 @@ CONFIG_IP_NF_TARGET_DSCP=y CONFIG_IP_NF_TARGET_MARK=y CONFIG_IP_NF_TARGET_CLASSIFY=y -CONFIG_IP_NF_TARGET_LOG=y -# CONFIG_IP_NF_TARGET_ULOG is not set -CONFIG_IP_NF_TARGET_TCPMSS=y -# CONFIG_IP_NF_ARPTABLES is not set # CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_ARPTABLES is not set # -# IPv6: Netfilter Configuration +# IPv6: Netfilter Configuration (EXPERIMENTAL) # # CONFIG_IP6_NF_QUEUE is not set CONFIG_IP6_NF_IPTABLES=y @@ -294,12 +380,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -330,6 +416,7 @@ # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -387,24 +474,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -415,20 +484,11 @@ # CONFIG_INPUT is not set # -# Userland interfaces -# - -# -# Input I/O drivers +# Hardware I/O ports # +# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# -# Input Device Drivers -# # # Character devices @@ -457,7 +517,6 @@ # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set # CONFIG_TIPAR is not set -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -483,16 +542,12 @@ # CONFIG_WDT is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -502,11 +557,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -517,6 +581,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # # CONFIG_EXT2_FS is not set @@ -524,10 +615,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set CONFIG_MINIX_FS=y # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=y @@ -540,7 +636,8 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -581,9 +678,10 @@ # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set +CONFIG_LOCKD_V4=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -601,7 +699,6 @@ # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -618,39 +715,19 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_KERNEL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -659,8 +736,13 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m diff -Nru a/arch/arm/configs/edb7211_defconfig b/arch/arm/configs/edb7211_defconfig --- a/arch/arm/configs/edb7211_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/edb7211_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,17 +1,49 @@ # -# Automatically generated by make menuconfig: don't edit +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 21:48:12 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -21,81 +53,116 @@ # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set +CONFIG_ARCH_CLPS711X=y # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -CONFIG_ARCH_CLPS711X=y +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_AUTCPU12 is not set +# CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CEIVA is not set +# CONFIG_ARCH_CLEP7312 is not set +CONFIG_ARCH_EDB7211=y +# CONFIG_ARCH_P720T is not set +# CONFIG_ARCH_FORTUNET is not set +CONFIG_ARCH_EP7211=y +# CONFIG_EP72XX_ROM_BOOT is not set # -# Archimedes/A5000 Implementations +# Processor Type # +CONFIG_CPU_32=y +CONFIG_CPU_ARM720T=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_LV4T=y +CONFIG_CPU_CACHE_V4=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WT=y +CONFIG_CPU_TLB_V4WT=y # -# Footbridge Implementations +# Processor Features # +CONFIG_ARM_THUMB=y # -# SA11x0 Implementations +# Bus support # +CONFIG_ISA=y # -# CLPS711X/EP721X Implementations +# PCCARD (PCMCIA/CardBus) support # -CONFIG_ARCH_EDB7211=y -CONFIG_EP7211_BOOT_MODE=y -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_ACORN is not set -CONFIG_ARCH_EP7211=y -# CONFIG_ARCH_EP7212 is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -CONFIG_CPU_ARM720T=y -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -# CONFIG_CPU_SA1100 is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set CONFIG_DISCONTIGMEM=y +CONFIG_ALIGNMENT_TRAP=y # -# General setup +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats # -# CONFIG_ANGELBOOT is not set -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -103,77 +170,133 @@ # CONFIG_MTD is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN is not set +# CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_NET_SB1000 is not set # # Ethernet (10 or 100Mbit) @@ -183,121 +306,105 @@ # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set # -# Amateur Radio support +# Wireless LAN (non-hamradio) # -# CONFIG_HAMRADIO is not set +# CONFIG_NET_RADIO is not set # -# IrDA (infrared) support +# Wan interfaces # -# CONFIG_IRDA is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# ATA/IDE/MFM/RLL support +# ISDN subsystem # -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set +# CONFIG_ISDN is not set # -# SCSI support +# Input device support # -# CONFIG_SCSI is not set +# CONFIG_INPUT is not set # -# I2O device support +# Hardware I/O ports # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # -# ISDN subsystem +# Character devices # -# CONFIG_ISDN is not set +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set # -# Input core support +# Serial drivers # -# CONFIG_INPUT is not set +# CONFIG_SERIAL_8250 is not set # -# Character devices +# Non-8250 serial port support # -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set CONFIG_SERIAL_CLPS711X=y CONFIG_SERIAL_CLPS711X_CONSOLE=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# I2C support +# IPMI # -# CONFIG_I2C is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set - -# -# Joysticks -# -# CONFIG_JOYSTICK is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# # # Multimedia devices @@ -305,68 +412,109 @@ # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -CONFIG_MINIX_FS=y -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set # CONFIG_NFS_FS is not set -# CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set # CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -# CONFIG_SUNRPC is not set -# CONFIG_LOCKD is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types @@ -378,23 +526,50 @@ # CONFIG_ATARI_PARTITION is not set # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -# CONFIG_SMB_NLS is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# # CONFIG_NLS is not set # -# USB support +# Profiling support # -# CONFIG_USB is not set +# CONFIG_PROFILING is not set # # Kernel hacking # +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_LL=y + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig --- a/arch/arm/configs/enp2611_defconfig 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/configs/enp2611_defconfig 2005-03-30 16:58:51 -08:00 @@ -1,10 +1,14 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:08:24 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -16,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -23,20 +28,24 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -64,7 +73,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -87,6 +98,7 @@ CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -98,51 +110,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -181,6 +217,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -200,6 +237,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -214,6 +252,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -225,13 +268,31 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -239,6 +300,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -265,6 +340,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -284,8 +362,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -336,7 +412,6 @@ # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set @@ -348,7 +423,6 @@ # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -361,6 +435,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -410,25 +485,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -451,14 +507,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -468,6 +516,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # # CONFIG_VT is not set @@ -489,7 +544,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -515,7 +569,6 @@ # CONFIG_WDTPCI is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -523,11 +576,15 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -538,6 +595,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -563,6 +621,7 @@ # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support @@ -570,20 +629,29 @@ CONFIG_I2C_SENSOR=y # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -602,6 +670,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -612,6 +684,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -628,10 +727,15 @@ # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -656,6 +760,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -673,6 +778,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -695,9 +801,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -735,55 +841,41 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_BDI2000_XSCALE is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/ep80219_defconfig b/arch/arm/configs/ep80219_defconfig --- a/arch/arm/configs/ep80219_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/ep80219_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10 -# Thu Jan 6 10:54:33 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:34:12 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -27,13 +28,13 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -43,6 +44,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -117,49 +119,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" # CONFIG_XIP_KERNEL is not set -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -198,6 +226,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -218,6 +247,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -232,6 +262,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -243,6 +278,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set @@ -260,6 +296,78 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -279,6 +387,22 @@ # CONFIG_DM_SNAPSHOT is not set # CONFIG_DM_MIRROR is not set # CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set # # Networking support @@ -381,7 +505,6 @@ # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set CONFIG_E100=y -CONFIG_E100_NAPI=y # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set @@ -437,94 +560,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -547,13 +582,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -563,6 +591,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -609,6 +644,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -659,7 +699,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set @@ -672,6 +714,8 @@ # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -691,6 +735,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -701,6 +749,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -714,7 +795,12 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# CONFIG_XFS_FS=y +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y @@ -765,6 +851,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -831,51 +918,12 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y @@ -889,6 +937,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/epxa10db_defconfig b/arch/arm/configs/epxa10db_defconfig --- a/arch/arm/configs/epxa10db_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/epxa10db_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,37 +1,49 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:46:51 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_AUDIT is not set # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -41,30 +53,33 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set CONFIG_ARCH_CAMELOT=y # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# CLPS711X/EP721X Implementations -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Epxa10db @@ -77,28 +92,6 @@ # CONFIG_PLD_HOTSWAP is not set # -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# - -# -# SA11x0 Implementations -# - -# # Processor Type # CONFIG_CPU_32=y @@ -106,6 +99,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -118,35 +112,62 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options # -# CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=32M console=ttyUA0,115200 initrd=0x00200000,8M root=/dev/ram0 rw" +# CONFIG_XIP_KERNEL is not set # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="mem=32M console=ttyUA0,115200 initrd=0x00200000,8M root=/dev/ram0 rw" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -154,6 +175,11 @@ # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -161,12 +187,30 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -174,6 +218,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -197,23 +253,24 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -222,17 +279,22 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set @@ -251,68 +313,31 @@ # # Ethernet (10000 Mbit) # -CONFIG_PPP=y -CONFIG_PPP_MULTILINK=y -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -CONFIG_PPP_DEFLATE=y -# CONFIG_PPP_BSDCOMP is not set -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set # -# Token Ring devices +# Wireless LAN (non-hamradio) # -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# +CONFIG_PPP=y +CONFIG_PPP_MULTILINK=y +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_PPP_DEFLATE=y +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -337,16 +362,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -356,6 +371,15 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -380,12 +404,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set - -# # IPMI # # CONFIG_IPMI_HANDLER is not set @@ -396,25 +414,30 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -425,6 +448,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -433,10 +489,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y CONFIG_AUTOFS4_FS=y @@ -449,13 +510,15 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set # CONFIG_TMPFS is not set @@ -484,7 +547,6 @@ # # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set -# CONFIG_EXPORTFS is not set CONFIG_SMB_FS=y # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set @@ -496,6 +558,7 @@ # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -525,6 +588,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -546,41 +610,19 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_KERNEL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -589,8 +631,14 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +CONFIG_CRC_CCITT=y CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig --- a/arch/arm/configs/footbridge_defconfig 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/configs/footbridge_defconfig 2005-03-30 16:58:51 -08:00 @@ -1,101 +1,186 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 23:02:24 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set CONFIG_ARCH_FOOTBRIDGE=y # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_CLPS711X is not set - -# -# Archimedes/A5000 Implementations -# +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Footbridge Implementations # -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set +CONFIG_ARCH_CATS=y +CONFIG_ARCH_PERSONAL_SERVER=y # CONFIG_ARCH_EBSA285_ADDIN is not set CONFIG_ARCH_EBSA285_HOST=y CONFIG_ARCH_NETWINDER=y - -# -# SA11x0 Implementations -# - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_ACORN is not set CONFIG_FOOTBRIDGE=y CONFIG_FOOTBRIDGE_HOST=y -# CONFIG_FOOTBRIDGE_ADDIN is not set CONFIG_ARCH_EBSA285=y -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set # # Processor Type # -CONFIG_CPU_32v4=y +CONFIG_CPU_32=y CONFIG_CPU_SA110=y -# CONFIG_DISCONTIGMEM is not set +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WB=y # -# General setup +# Processor Features +# + +# +# Bus support # -# CONFIG_ANGELBOOT is not set -CONFIG_PCI=y CONFIG_ISA=y CONFIG_ISA_DMA=y +CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set -# CONFIG_ARTHUR is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set CONFIG_LEDS=y CONFIG_LEDS_TIMER=y # CONFIG_LEDS_CPU is not set CONFIG_ALIGNMENT_TRAP=y # +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +CONFIG_FPE_NWFPE_XP=y +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# # Parallel port support # CONFIG_PARPORT=y @@ -103,22 +188,18 @@ CONFIG_PARPORT_PC_FIFO=y # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_ARC is not set -# CONFIG_PARPORT_AMIGA is not set -# CONFIG_PARPORT_MFC3 is not set -# CONFIG_PARPORT_ATARI is not set -# CONFIG_PARPORT_SUNBPP is not set -# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_GSC is not set CONFIG_PARPORT_1284=y # -# Memory Technology Devices (MTD) +# Plug and Play support # -# CONFIG_MTD is not set +CONFIG_PNP=y +# CONFIG_PNP_DEBUG is not set # -# Plug and Play configuration +# Protocols # -CONFIG_PNP=y CONFIG_ISAPNP=y # @@ -143,11 +224,13 @@ # CONFIG_PARIDE_ATEN=m CONFIG_PARIDE_BPCK=m +# CONFIG_PARIDE_BPCK6 is not set CONFIG_PARIDE_COMM=m CONFIG_PARIDE_DSTR=m CONFIG_PARIDE_FIT2=m CONFIG_PARIDE_FIT3=m CONFIG_PARIDE_EPAT=m +# CONFIG_PARIDE_EPATC8 is not set CONFIG_PARIDE_EPIA=m CONFIG_PARIDE_FRIQ=m CONFIG_PARIDE_FRPW=m @@ -158,67 +241,202 @@ # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_BLK_DEV_IDEPNP is not set +# CONFIG_BLK_DEV_IDEPCI is not set +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Networking support +# +CONFIG_NET=y # # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -# CONFIG_INET_ECN is not set +# CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -CONFIG_ATM=y -# CONFIG_ATM_CLIP is not set -# CONFIG_ATM_LANE is not set +# CONFIG_NETFILTER is not set # -# +# SCTP Configuration (EXPERIMENTAL) # +# CONFIG_IP_SCTP is not set +CONFIG_ATM=y +# CONFIG_ATM_CLIP is not set +# CONFIG_ATM_LANE is not set +# CONFIG_ATM_BR2684 is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # -CONFIG_NETDEVICES=y +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +CONFIG_IRDA=m # -# ARCnet devices +# IrDA protocols # -# CONFIG_ARCNET is not set +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +CONFIG_IRDA_DEBUG=y + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +# CONFIG_IRTTY_SIR is not set + +# +# Dongle support +# + +# +# Old SIR device drivers +# +# CONFIG_IRPORT_SIR is not set + +# +# Old Serial dongle support +# + +# +# FIR device drivers +# +# CONFIG_USB_IRDA is not set +# CONFIG_SIGMATEL_FIR is not set +# CONFIG_NSC_FIR is not set +CONFIG_WINBOND_FIR=m +# CONFIG_TOSHIBA_FIR is not set +# CONFIG_SMC_IRCC_FIR is not set +# CONFIG_ALI_FIR is not set +# CONFIG_VLSI_FIR is not set +# CONFIG_VIA_FIR is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set @@ -226,9 +444,17 @@ # CONFIG_NET_SB1000 is not set # +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set CONFIG_NET_VENDOR_3COM=y # CONFIG_EL1 is not set # CONFIG_EL2 is not set @@ -236,301 +462,252 @@ # CONFIG_EL16 is not set # CONFIG_EL3 is not set # CONFIG_3C515 is not set -# CONFIG_ELMC is not set -# CONFIG_ELMC_II is not set CONFIG_VORTEX=y +# CONFIG_TYPHOON is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set # CONFIG_HP100 is not set # CONFIG_NET_ISA is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_CS89x0 is not set -CONFIG_TULIP=m -# CONFIG_DE4X5 is not set # CONFIG_DGRS is not set -# CONFIG_DM9102 is not set # CONFIG_EEPRO100 is not set -# CONFIG_EEPRO100_PM is not set -# CONFIG_LNE390 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set CONFIG_NE2K_PCI=y -# CONFIG_NE3210 is not set -# CONFIG_ES3210 is not set +# CONFIG_8139CP is not set # CONFIG_8139TOO is not set -# CONFIG_RTL8129 is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_WINBOND_840 is not set -# CONFIG_HAPPYMEAL is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set # CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set # -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRDA_OPTIONS=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -CONFIG_IRDA_DEBUG=y - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -# CONFIG_IRTTY_SIR is not set -# CONFIG_IRPORT_SIR is not set - -# -# FIR device drivers -# -# CONFIG_NSC_FIR is not set -CONFIG_WINBOND_FIR=m -# CONFIG_TOSHIBA_FIR is not set -# CONFIG_SMC_IRCC_FIR is not set - -# -# Dongle support -# -# CONFIG_DONGLE is not set - -# -# ATA/IDE/MFM/RLL support -# -CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set - -# -# IDE chipset support/bugfixes +# Wireless LAN (non-hamradio) # -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_IDEPCI_SHARE_IRQ=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -CONFIG_BLK_DEV_OFFBOARD=y -CONFIG_IDEDMA_PCI_AUTO=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_AEC62XX_TUNING is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_WDC_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD7409 is not set -# CONFIG_AMD7409_OVERRIDE is not set -# CONFIG_BLK_DEV_CMD64X is not set -CONFIG_BLK_DEV_CY82C693=y -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_HPT34X_AUTODMA is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_PDC202XX_BURST is not set -# CONFIG_BLK_DEV_OSB4 is not set -# CONFIG_BLK_DEV_SIS5513 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -CONFIG_BLK_DEV_SL82C105=y -# CONFIG_IDE_CHIPSETS is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_IDEDMA_IVB is not set +# CONFIG_NET_RADIO is not set # -# SCSI support +# Wan interfaces # -# CONFIG_SCSI is not set +# CONFIG_WAN is not set # -# IEEE 1394 (FireWire) support +# ATM drivers # -# CONFIG_IEEE1394 is not set +# CONFIG_ATM_TCP is not set +# CONFIG_ATM_LANAI is not set +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_ZATM is not set +# CONFIG_ATM_NICSTAR is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_AMBASSADOR is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +# CONFIG_PPPOATM is not set +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_SLIP_MODE_SLIP6=y +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# I2O device support +# ISDN subsystem # -# CONFIG_I2O is not set -# CONFIG_I2O_PCI is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +# CONFIG_ISDN is not set # -# ISDN subsystem +# Input device support # -# CONFIG_ISDN is not set +CONFIG_INPUT=y # -# Input core support +# Userland interfaces # -# CONFIG_INPUT is not set +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_SERIAL_EXTENDED is not set +CONFIG_HW_CONSOLE=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set # CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set # CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set # CONFIG_SX is not set # CONFIG_RIO is not set # CONFIG_STALDRV is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# CONFIG_SERIAL_21285=y CONFIG_SERIAL_21285_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 CONFIG_PRINTER=m # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set # -# I2C support +# IPMI # -CONFIG_I2C=m -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_CHARDEV is not set +# CONFIG_IPMI_HANDLER is not set # -# Mice +# Watchdog Cards # -# CONFIG_BUSMOUSE is not set -CONFIG_MOUSE=y -CONFIG_PSMOUSE=y -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set # -# Joysticks +# Watchdog Device Drivers # -# CONFIG_JOYSTICK is not set +CONFIG_SOFT_WATCHDOG=y +CONFIG_21285_WATCHDOG=m +CONFIG_977_WATCHDOG=m # -# Input core support is needed for joysticks +# ISA-based Watchdog Cards # -# CONFIG_QIC02_TAPE is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_WDT is not set # -# Watchdog Cards +# PCI-based Watchdog Cards # -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -CONFIG_SOFT_WATCHDOG=y -# CONFIG_WDT is not set +# CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_MIXCOMWD is not set -CONFIG_21285_WATCHDOG=m -CONFIG_977_WATCHDOG=m + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set CONFIG_DS1620=y CONFIG_NWBUTTON=y CONFIG_NWBUTTON_REBOOT=y CONFIG_NWFLASH=m -# CONFIG_INTEL_RNG is not set CONFIG_NVRAM=m CONFIG_RTC=y # CONFIG_DTLK is not set @@ -540,9 +717,104 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +CONFIG_I2C=m +# CONFIG_I2C_CHARDEV is not set + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_ELEKTOR is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Misc devices +# # # Multimedia devices @@ -552,23 +824,27 @@ # # Video For Linux # -CONFIG_VIDEO_PROC_FS=y -# CONFIG_I2C_PARPORT is not set # # Video Adapters # +# CONFIG_VIDEO_BT848 is not set # CONFIG_VIDEO_PMS is not set # CONFIG_VIDEO_BWQCAM is not set # CONFIG_VIDEO_CQCAM is not set +# CONFIG_VIDEO_W9966 is not set # CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5246A is not set # CONFIG_VIDEO_SAA5249 is not set # CONFIG_TUNER_3036 is not set # CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_BUZ is not set -# CONFIG_VIDEO_ZR36120 is not set -CONFIG_VIDEO_CYBERPRO=m +# CONFIG_VIDEO_SAA7134 is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_DPC is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_CX88 is not set +# CONFIG_VIDEO_OVCAMCHIP is not set # # Radio Adapters @@ -578,85 +854,306 @@ # CONFIG_RADIO_RTRACK2 is not set # CONFIG_RADIO_AZTECH is not set # CONFIG_RADIO_GEMTEK is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set # CONFIG_RADIO_MAESTRO is not set -# CONFIG_RADIO_MIROPCM20 is not set # CONFIG_RADIO_SF16FMI is not set +# CONFIG_RADIO_SF16FMR2 is not set # CONFIG_RADIO_TERRATEC is not set # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +CONFIG_FB_CYBER2000=y +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON_OLD is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB=m +CONFIG_USB_DEBUG=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_AUDIO=m +# CONFIG_USB_BLUETOOTH_TTY is not set +# CONFIG_USB_MIDI is not set +# CONFIG_USB_ACM is not set +CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# +# CONFIG_USB_STORAGE is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_SN9C102 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_PWC is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +CONFIG_USB_MON=m + +# +# USB port drivers +# +# CONFIG_USB_USS720 is not set + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_TEST is not set + +# +# USB ATM/DSL drivers +# +# CONFIG_USB_ATM is not set +# CONFIG_USB_SPEEDTOUCH is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=y + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# CONFIG_ADFS_FS=m # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=m # CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_RAMFS is not set -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -# CONFIG_MINIX_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set -CONFIG_ROOT_NFS=y +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=m # CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y CONFIG_LOCKD=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_MOUNT_SUBDIR is not set -# CONFIG_NCPFS_NDS_DOMAINS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # CONFIG_PARTITION_ADVANCED=y CONFIG_ACORN_PARTITION=y +# CONFIG_ACORN_PARTITION_CUMANA is not set +# CONFIG_ACORN_PARTITION_EESOX is not set # CONFIG_ACORN_PARTITION_ICS is not set CONFIG_ACORN_PARTITION_ADFS=y # CONFIG_ACORN_PARTITION_POWERTEC is not set @@ -667,16 +1164,19 @@ # CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y # CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -CONFIG_NLS=y +# CONFIG_EFI_PARTITION is not set # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set @@ -693,11 +1193,15 @@ # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m # CONFIG_NLS_ISO8859_3 is not set @@ -705,173 +1209,49 @@ # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # -# Console drivers -# -CONFIG_PC_KEYB=y -CONFIG_PC_KEYMAP=y -CONFIG_VGA_CONSOLE=y -CONFIG_FB=y - +# Profiling support # -# Frame-buffer support -# -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_RIVA is not set -# CONFIG_FB_CLGEN is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_ACORN is not set -# CONFIG_FB_CLPS711X is not set -CONFIG_FB_CYBER2000=y -# CONFIG_FB_SA1100 is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_VIRTUAL is not set -CONFIG_FBCON_ADVANCED=y -# CONFIG_FBCON_MFB is not set -# CONFIG_FBCON_CFB2 is not set -# CONFIG_FBCON_CFB4 is not set -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -CONFIG_FBCON_CFB24=y -# CONFIG_FBCON_CFB32 is not set -# CONFIG_FBCON_AFB is not set -# CONFIG_FBCON_ILBM is not set -# CONFIG_FBCON_IPLAN2P2 is not set -# CONFIG_FBCON_IPLAN2P4 is not set -# CONFIG_FBCON_IPLAN2P8 is not set -# CONFIG_FBCON_MAC is not set -# CONFIG_FBCON_VGA_PLANES is not set -CONFIG_FBCON_VGA=y -# CONFIG_FBCON_HGA is not set -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -CONFIG_FBCON_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_PEARL_8x8 is not set -CONFIG_FONT_ACORN_8x8=y +# CONFIG_PROFILING is not set # -# Sound -# -CONFIG_SOUND=m -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -CONFIG_SOUND_OSS=m -# CONFIG_SOUND_TRACEINIT is not set -# CONFIG_SOUND_DMAP is not set -# CONFIG_SOUND_AD1816 is not set -# CONFIG_SOUND_SGALAXY is not set -CONFIG_SOUND_ADLIB=m -# CONFIG_SOUND_ACI_MIXER is not set -# CONFIG_SOUND_CS4232 is not set -# CONFIG_SOUND_SSCAPE is not set -# CONFIG_SOUND_GUS is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_VMIDI is not set -# CONFIG_SOUND_TRIX is not set -# CONFIG_SOUND_MSS is not set -# CONFIG_SOUND_MPU401 is not set -# CONFIG_SOUND_NM256 is not set -# CONFIG_SOUND_MAD16 is not set -# CONFIG_SOUND_PAS is not set -# CONFIG_PAS_JOYSTICK is not set -# CONFIG_SOUND_PSS is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -# CONFIG_SOUND_WAVEFRONT is not set -# CONFIG_SOUND_MAUI is not set -# CONFIG_SOUND_YM3812 is not set -# CONFIG_SOUND_OPL3SA1 is not set -# CONFIG_SOUND_OPL3SA2 is not set -# CONFIG_SOUND_YMPCI is not set -# CONFIG_SOUND_UART6850 is not set -# CONFIG_SOUND_AEDSP16 is not set -CONFIG_SOUND_WAVEARTIST=m -# CONFIG_SOUND_TVMIXER is not set - -# -# USB support -# -CONFIG_USB=m -CONFIG_USB_DEBUG=y - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set - -# -# USB Controllers +# Kernel hacking # -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -CONFIG_USB_OHCI=m +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # -# USB Devices +# Security options # -CONFIG_USB_PRINTER=m -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -CONFIG_USB_AUDIO=m -# CONFIG_USB_ACM is not set -# CONFIG_USB_SERIAL is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_USS720 is not set -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_PLUSB is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_NET1080 is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# USB Human Interface Devices (HID) +# Cryptographic options # +# CONFIG_CRYPTO is not set # -# Input core support is needed for USB HID +# Hardware crypto devices # # -# Kernel hacking +# Library routines # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_DC21285_PORT is not set +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/arm/configs/fortunet_defconfig b/arch/arm/configs/fortunet_defconfig --- a/arch/arm/configs/fortunet_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/fortunet_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,33 +1,58 @@ # -# Automatically generated by make menuconfig: don't edit +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 23:51:10 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # # CONFIG_MODULES is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set CONFIG_ARCH_CLPS711X=y # CONFIG_ARCH_CO285 is not set @@ -35,135 +60,122 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set - -# -# Footbridge Implementations -# -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set - -# -# SA11x0 Implementations -# -# CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set -# CONFIG_SA1100_CERF is not set -# CONFIG_SA1100_H3100 is not set -# CONFIG_SA1100_H3600 is not set -# CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_H3XXX is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set -# CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set -# CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set -# CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set -# CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_USB_NETLINK is not set -# CONFIG_SA1100_USB_CHAR is not set -# CONFIG_H3600_SLEEVE is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # CLPS711X/EP721X Implementations # # CONFIG_ARCH_AUTCPU12 is not set # CONFIG_ARCH_CDB89712 is not set +# CONFIG_ARCH_CEIVA is not set # CONFIG_ARCH_CLEP7312 is not set # CONFIG_ARCH_EDB7211 is not set # CONFIG_ARCH_P720T is not set CONFIG_ARCH_FORTUNET=y -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set + +# +# Processor Type +# CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set CONFIG_CPU_ARM720T=y -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -# CONFIG_CPU_SA1100 is not set +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_LV4T=y +CONFIG_CPU_CACHE_V4=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WT=y +CONFIG_CPU_TLB_V4WT=y + +# +# Processor Features +# # CONFIG_ARM_THUMB is not set -# CONFIG_DISCONTIGMEM is not set # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y # CONFIG_FPE_NWFPE is not set CONFIG_FPE_FASTFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set # CONFIG_MTD_PARTITIONS is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_BOOTLDR_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -172,40 +184,48 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set -# CONFIG_MTD_SA1100 is not set -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set -CONFIG_MTD_FORTUNET=y -# CONFIG_MTD_PCI is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_DOC1000 is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -213,157 +233,166 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y # # Networking options # # CONFIG_PACKET is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set # CONFIG_INET is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_NETFILTER is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set -# CONFIG_ECONET_AUNUDP is not set -# CONFIG_ECONET_NATIVE is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set # CONFIG_NETDEVICES is not set # -# Amateur Radio support +# ISDN subsystem # -# CONFIG_HAMRADIO is not set +# CONFIG_ISDN is not set # -# IrDA (infrared) support +# Input device support # -# CONFIG_IRDA is not set +# CONFIG_INPUT is not set # -# ATA/IDE/MFM/RLL support +# Hardware I/O ports # -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # -# SCSI support +# Character devices # -# CONFIG_SCSI is not set +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set # -# Synchronous Serial Interface +# Serial drivers # -# CONFIG_SSI is not set -# CONFIG_SSI_CLPS711X is not set -# CONFIG_SSI_JUNO is not set +# CONFIG_SERIAL_8250 is not set # -# I2O device support +# Non-8250 serial port support # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +CONFIG_SERIAL_CLPS711X=y +CONFIG_SERIAL_CLPS711X_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# ISDN subsystem +# IPMI # -# CONFIG_ISDN is not set +# CONFIG_IPMI_HANDLER is not set # -# Input core support +# Watchdog Cards # -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set # -# Character devices +# Ftape, the floppy tape device driver # -# CONFIG_VT is not set -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set # -# Serial drivers +# TPM devices # -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -CONFIG_SERIAL_CLPS711X=y -CONFIG_SERIAL_CLPS711X_CONSOLE=y -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set -# CONFIG_SERIAL_SA1100 is not set -# CONFIG_SERIAL_SA1100_CONSOLE is not set -# CONFIG_SERIAL_8250 is not set -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_HUB6 is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_TCG_TPM is not set # # I2C support @@ -371,219 +400,159 @@ # CONFIG_I2C is not set # -# L3 serial bus support +# Misc devices +# + +# +# Multimedia devices # -# CONFIG_L3 is not set -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set -# CONFIG_L3_SA1111 is not set -# CONFIG_BIT_SA1100_GPIO is not set +# CONFIG_VIDEO_DEV is not set # -# Mice +# Digital Video Broadcasting Devices # -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set # -# Joysticks +# Graphics support # -# CONFIG_INPUT_GAMEPORT is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_FB is not set # -# Watchdog Cards +# Sound # -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set +# CONFIG_SOUND is not set # -# Ftape, the floppy tape device driver +# USB support # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set # -# Multimedia devices +# USB Gadget Support # -# CONFIG_VIDEO_DEV is not set +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set CONFIG_JFFS_FS=y CONFIG_JFFS_FS_VERBOSE=0 # CONFIG_JFFS_PROC_FS is not set # CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -# CONFIG_RAMFS is not set -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -# CONFIG_NFS_FS is not set -# CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -# CONFIG_SUNRPC is not set -# CONFIG_LOCKD is not set -# CONFIG_SMB_FS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_ZISOFS_FS is not set -# CONFIG_ZLIB_FS_INFLATE is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -# CONFIG_SMB_NLS is not set + +# +# Native Language Support +# # CONFIG_NLS is not set # -# Multimedia Capabilities Port drivers +# Profiling support # -# CONFIG_MCP is not set -# CONFIG_MCP_SA1100 is not set -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set +# CONFIG_PROFILING is not set # -# USB support +# Kernel hacking # -# CONFIG_USB is not set -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -# CONFIG_USB_OHCI is not set -# CONFIG_USB_OHCI_SA1111 is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_USS720 is not set - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_RIO500 is not set +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # -# Bluetooth support +# Security options # -# CONFIG_BT is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# Kernel hacking +# Cryptographic options # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_NO_PGT_CACHE is not set -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_ERRORS is not set -# CONFIG_DEBUG_LL is not set -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set -# CONFIG_DEBUG_LL_SER3 is not set +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig --- a/arch/arm/configs/h3600_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/h3600_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,33 +1,63 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:02:26 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -35,144 +65,155 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set - -# -# Footbridge Implementations -# -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set +# CONFIG_SA1100_H3100 is not set CONFIG_SA1100_H3600=y -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_H3800 is not set +CONFIG_SA1100_H3XXX=y +# CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_SHANNON is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -CONFIG_SA1100_USB=m -CONFIG_SA1100_USB_NETLINK=m -# CONFIG_SA1100_USB_CHAR is not set - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set +# CONFIG_SA1100_SSP is not set +# CONFIG_H3600_SLEEVE is not set # # Processor Type # -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set +CONFIG_CPU_32=y CONFIG_CPU_SA1100=y -# CONFIG_ARM_THUMB is not set -CONFIG_DISCONTIGMEM=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # -# General setup +# Processor Features +# + +# +# Bus support # -# CONFIG_PCI is not set CONFIG_ISA=y -# CONFIG_ISA_DMA is not set -CONFIG_CPU_FREQ=y -CONFIG_HOTPLUG=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_I82365 is not set # CONFIG_TCIC is not set -# CONFIG_PCMCIA_CLPS6700 is not set CONFIG_PCMCIA_SA1100=y -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y # -# At least one math emulation must be selected +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set -CONFIG_PM=y # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +CONFIG_PM=y +# CONFIG_APM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_BOOTLDR_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -182,6 +223,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -194,49 +236,49 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -# CONFIG_MTD_CFI_B2 is not set -CONFIG_MTD_CFI_B4=y +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set # CONFIG_MTD_CFI_I1 is not set CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set CONFIG_MTD_SA1100=y -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set -# CONFIG_MTD_PCI is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -244,95 +286,209 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=m +CONFIG_BLK_DEV_IDE=m + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECS is not set +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y # # Networking options # # CONFIG_PACKET is not set -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN is not set +# CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set +# CONFIG_NETFILTER is not set # +# SCTP Configuration (EXPERIMENTAL) # -# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # -CONFIG_NETDEVICES=y +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +CONFIG_IRDA=m # -# ARCnet devices +# IrDA protocols # -# CONFIG_ARCNET is not set +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +# CONFIG_IRDA_ULTRA is not set + +# +# IrDA options +# +# CONFIG_IRDA_CACHE_LAST_LSAP is not set +# CONFIG_IRDA_FAST_RR is not set +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +# CONFIG_IRTTY_SIR is not set + +# +# Dongle support +# + +# +# Old SIR device drivers +# +# CONFIG_IRPORT_SIR is not set + +# +# Old Serial dongle support +# + +# +# FIR device drivers +# +# CONFIG_NSC_FIR is not set +# CONFIG_WINBOND_FIR is not set +# CONFIG_SMC_IRCC_FIR is not set +# CONFIG_ALI_FIR is not set +CONFIG_SA1100_FIR=m +# CONFIG_BT is not set +CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# # Ethernet (10 or 100Mbit) # # CONFIG_NET_ETHERNET is not set @@ -340,43 +496,20 @@ # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +# CONFIG_NET_RADIO is not set # # PCMCIA network device support @@ -389,316 +522,317 @@ # CONFIG_PCMCIA_NMCLAN is not set # CONFIG_PCMCIA_SMC91C92 is not set # CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -# CONFIG_NET_PCMCIA_RADIO is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set +# CONFIG_PCMCIA_AXNET is not set # -# IrDA (infrared) support +# Wan interfaces # -CONFIG_IRDA=m +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# IrDA protocols +# ISDN subsystem # -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set -# CONFIG_IRDA_OPTIONS is not set +# CONFIG_ISDN is not set # -# Infrared-port device drivers +# Input device support # +CONFIG_INPUT=y # -# SIR device drivers +# Userland interfaces # -# CONFIG_IRTTY_SIR is not set -# CONFIG_IRPORT_SIR is not set +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set # -# Dongle support +# Input Device Drivers # -# CONFIG_DONGLE is not set +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # -# FIR device drivers +# Character devices # -# CONFIG_USB_IRDA is not set -# CONFIG_NSC_FIR is not set -# CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set -# CONFIG_SMC_IRCC_FIR is not set -# CONFIG_ALI_FIR is not set -# CONFIG_VLSI_FIR is not set -CONFIG_SA1100_FIR=m +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set # -# ATA/IDE/MFM/RLL support +# Serial drivers # -CONFIG_IDE=m +CONFIG_SERIAL_8250=m +# CONFIG_SERIAL_8250_CS is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set # -# IDE, ATA and ATAPI Block devices +# Non-8250 serial port support # -CONFIG_BLK_DEV_IDE=m +CONFIG_SERIAL_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# Please see Documentation/ide.txt for help/info on IDE drives +# IPMI # -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=m -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDECS is not set -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IPMI_HANDLER is not set # -# IDE chipset support/bugfixes +# Watchdog Cards # -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set # -# SCSI support +# Ftape, the floppy tape device driver # -# CONFIG_SCSI is not set +# CONFIG_DRM is not set # -# I2O device support +# PCMCIA character devices # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set # -# ISDN subsystem +# TPM devices # -# CONFIG_ISDN is not set +# CONFIG_TCG_TPM is not set # -# Input core support +# I2C support # -# CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set +# CONFIG_I2C is not set # -# Character devices +# Misc devices # -CONFIG_VT=y -# CONFIG_VT_CONSOLE is not set -CONFIG_SERIAL=m -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set # -# Serial drivers +# Multimedia devices # -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=38400 -CONFIG_SERIAL_8250=m -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_HUB6 is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +# CONFIG_VIDEO_DEV is not set # -# I2C support +# Digital Video Broadcasting Devices # -# CONFIG_I2C is not set +# CONFIG_DVB is not set # -# L3 serial bus support +# Graphics support # -CONFIG_L3=y -CONFIG_L3_ALGOBIT=y -CONFIG_L3_BIT_SA1100_GPIO=y +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_SA1100=y +# CONFIG_FB_VIRTUAL is not set # -# Other L3 adapters +# Console display driver support # -# CONFIG_L3_SA1111 is not set -CONFIG_BIT_SA1100_GPIO=y +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set # -# Mice +# Logo configuration # -# CONFIG_BUSMOUSE is not set -CONFIG_MOUSE=m -# CONFIG_PSMOUSE is not set -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # -# Joysticks +# Sound # -# CONFIG_INPUT_GAMEPORT is not set +CONFIG_SOUND=y # -# Input core support is needed for gameports +# Advanced Linux Sound Architecture # +# CONFIG_SND is not set # -# Input core support is needed for joysticks +# Open Sound System # -# CONFIG_QIC02_TAPE is not set +# CONFIG_SOUND_PRIME is not set # -# Watchdog Cards +# USB support # -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -CONFIG_SA1100_RTC=m -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set # -# Ftape, the floppy tape device driver +# USB Gadget Support # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +# CONFIG_USB_GADGET is not set # -# PCMCIA character devices +# MMC/SD Card support # -# CONFIG_PCMCIA_SERIAL_CS is not set -# CONFIG_MWAVE is not set +# CONFIG_MMC is not set # -# Multimedia devices +# File systems # -# CONFIG_VIDEO_DEV is not set +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set # -# File systems +# XFS support # +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_CMS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=m # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=m -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_FREEVXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=m # CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y +CONFIG_NFSD_TCP=y CONFIG_LOCKD=y +CONFIG_EXPORTFS=m +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set -CONFIG_ZLIB_FS_INFLATE=m +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -CONFIG_SMB_NLS=y -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # CONFIG_NLS_CODEPAGE_737 is not set @@ -721,7 +855,9 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -738,209 +874,40 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers -# -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set - -# -# Frame-buffer support -# -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_ACORN is not set -# CONFIG_FB_CLPS711X is not set -CONFIG_FB_SA1100=y -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_VIRTUAL is not set -CONFIG_FBCON_ADVANCED=y -# CONFIG_FBCON_MFB is not set -# CONFIG_FBCON_CFB2 is not set -# CONFIG_FBCON_CFB4 is not set -# CONFIG_FBCON_CFB8 is not set -CONFIG_FBCON_CFB16=y -# CONFIG_FBCON_CFB24 is not set -# CONFIG_FBCON_CFB32 is not set -# CONFIG_FBCON_AFB is not set -# CONFIG_FBCON_ILBM is not set -# CONFIG_FBCON_IPLAN2P2 is not set -# CONFIG_FBCON_IPLAN2P4 is not set -# CONFIG_FBCON_IPLAN2P8 is not set -# CONFIG_FBCON_MAC is not set -# CONFIG_FBCON_VGA_PLANES is not set -# CONFIG_FBCON_VGA is not set -# CONFIG_FBCON_HGA is not set -CONFIG_FBCON_FONTWIDTH8_ONLY=y -CONFIG_FBCON_FONTS=y -CONFIG_FONT_8x8=y -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set - -# -# Sound -# -CONFIG_SOUND=y -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_MIDI_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_RME96XX is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_MIDI_VIA82CXXX is not set -CONFIG_SOUND_SA1100=y -CONFIG_SOUND_UDA1341=y -# CONFIG_SOUND_ASSABET_UDA1341 is not set -CONFIG_SOUND_H3600_UDA1341=y -# CONFIG_SOUND_PANGOLIN_UDA1341 is not set -# CONFIG_SOUND_SA1111_UDA1341 is not set -# CONFIG_SOUND_SA1100SSP is not set -# CONFIG_SOUND_OSS is not set -# CONFIG_SOUND_WAVEARTIST is not set -# CONFIG_SOUND_TVMIXER is not set - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set -# CONFIG_MCP_SA1100 is not set -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Controllers -# -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -# CONFIG_USB_OHCI is not set -# CONFIG_USB_OHCI_SA1111 is not set - -# -# USB Device Class drivers +# Profiling support # -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set +# CONFIG_PROFILING is not set # -# USB Human Interface Devices (HID) -# - -# -# Input core support is needed for USB HID -# - -# -# USB Imaging devices -# -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set - -# -# USB Multimedia devices -# - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set -# CONFIG_USB_USBNET is not set - -# -# USB port drivers +# Kernel hacking # -# CONFIG_USB_USS720 is not set +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set # -# USB Serial Converter support +# Security options # -# CONFIG_USB_SERIAL is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# USB Miscellaneous drivers +# Cryptographic options # -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_ID75 is not set +# CONFIG_CRYPTO is not set # -# Bluetooth support +# Hardware crypto devices # -# CONFIG_BT is not set # -# Kernel hacking +# Library routines # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_NO_PGT_CACHE is not set -# CONFIG_DEBUG_LL is not set -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/h7201_defconfig b/arch/arm/configs/h7201_defconfig --- a/arch/arm/configs/h7201_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/h7201_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,12 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc1 -# Thu Sep 2 11:04:11 2004 +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:11:33 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -18,24 +20,28 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -44,6 +50,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -58,6 +65,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -66,7 +74,7 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_IMX is not set CONFIG_ARCH_H720X=y @@ -85,6 +93,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_LV4T=y CONFIG_CPU_CACHE_V4=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WT=y CONFIG_CPU_TLB_V4WT=y @@ -94,46 +103,62 @@ CONFIG_ARM_THUMB=y # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options # -# CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set # -# PCMCIA/CardBus support +# Floating point emulation # -CONFIG_PCMCIA=y -# CONFIG_PCMCIA_DEBUG is not set -# CONFIG_TCIC is not set # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -141,8 +166,8 @@ CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=0 -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -184,6 +209,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -201,6 +227,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -215,6 +242,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -222,27 +254,32 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set # -# Multi-device support (RAID and LVM) +# IO Schedulers # -# CONFIG_MD is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # -# Networking support +# SCSI device support # -# CONFIG_NET is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_SCSI is not set # -# SCSI device support +# Multi-device support (RAID and LVM) # -# CONFIG_SCSI is not set +# CONFIG_MD is not set # # Fusion MPT device support @@ -257,6 +294,13 @@ # # +# Networking support +# +# CONFIG_NET is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# # ISDN subsystem # @@ -278,16 +322,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -297,6 +331,15 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -315,7 +358,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -328,21 +370,19 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set # -# PCMCIA character devices +# TPM devices # -# CONFIG_SYNCLINK_CS is not set -# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set # # I2C support @@ -350,6 +390,10 @@ # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -359,6 +403,49 @@ # # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -367,10 +454,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -412,6 +504,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -427,6 +520,7 @@ # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -439,67 +533,29 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/h7202_defconfig b/arch/arm/configs/h7202_defconfig --- a/arch/arm/configs/h7202_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/h7202_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,12 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc1 -# Thu Sep 30 10:30:42 2004 +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:15:45 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -18,26 +20,31 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -46,6 +53,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -60,6 +68,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -68,7 +77,7 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_IMX is not set CONFIG_ARCH_H720X=y @@ -77,8 +86,8 @@ # # CONFIG_ARCH_H7201 is not set CONFIG_ARCH_H7202=y -# CONFIG_ARCH_FU7202 is not set CONFIG_CPU_H7202=y +# CONFIG_H7202_SERIAL23 is not set # # Processor Type @@ -88,6 +97,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_LV4T=y CONFIG_CPU_CACHE_V4=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WT=y CONFIG_CPU_TLB_V4WT=y @@ -97,47 +107,71 @@ # CONFIG_ARM_THUMB is not set # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options # -# CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,19200" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y CONFIG_FPE_NWFPE_XP=y # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,19200" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set @@ -175,6 +209,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -192,6 +227,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -206,6 +242,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -213,9 +254,27 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -223,6 +282,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -249,6 +320,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -268,7 +341,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -297,8 +369,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_MII is not set # CONFIG_SMC91X is not set -# CONFIG_CS89x0 is not set -CONFIG_CIRRUS=y # # Ethernet (1000 Mbit) @@ -327,23 +397,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -366,17 +419,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -CONFIG_SERIO_H7202=y - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -394,6 +436,16 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -417,7 +469,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -430,23 +481,30 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -457,6 +515,68 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_SOFT_CURSOR is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_SA1100 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +CONFIG_USB_ZERO=m +# CONFIG_USB_ETH is not set +CONFIG_USB_GADGETFS=m +CONFIG_USB_FILE_STORAGE=m +CONFIG_USB_FILE_STORAGE_TEST=y +CONFIG_USB_G_SERIAL=m + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -465,10 +585,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -495,6 +620,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -512,6 +638,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -534,7 +661,6 @@ # CONFIG_ROOT_NFS is not set CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -548,6 +674,7 @@ # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -560,72 +687,20 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=m -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_SA1100 is not set -CONFIG_USB_GADGET_H7202=y -CONFIG_USB_H7202=m -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -CONFIG_USB_ZERO=m -# CONFIG_USB_ETH is not set -CONFIG_USB_GADGETFS=m -CONFIG_USB_FILE_STORAGE=m -CONFIG_USB_FILE_STORAGE_TEST=y -CONFIG_USB_G_SERIAL=m -CONFIG_USB_G_MULTISER=m - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set @@ -635,12 +710,17 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/hackkit_defconfig b/arch/arm/configs/hackkit_defconfig --- a/arch/arm/configs/hackkit_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/hackkit_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,119 +1,103 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:22:34 2005 # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_SWAP=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_NET=y +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y # CONFIG_MODULE_UNLOAD is not set -# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP310 Implementation Options -# - -# -# IOP310 Chipset Features -# - -# -# Intel PXA250/210 Implementations -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set # CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set CONFIG_SA1100_HACKKIT=y -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set -# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_SSP is not set # # Processor Type @@ -121,47 +105,94 @@ CONFIG_CPU_32=y CONFIG_CPU_SA1100=y CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # # Processor Features # # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttySA0,115200 root=/dev/ram0 initrd=0xc0400000,8M init=/rootshell" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_24_API=y -CONFIG_CPU_FREQ_26_API=y -# CONFIG_HOTPLUG is not set +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0,115200 root=/dev/ram0 initrd=0xc0400000,8M init=/rootshell" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -169,8 +200,8 @@ CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=3 -# CONFIG_MTD_PARTITIONS is not set # CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_PARTITIONS is not set # # User Modules And Translation Layers @@ -179,6 +210,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -187,18 +219,30 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set @@ -206,15 +250,17 @@ # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -222,7 +268,12 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set @@ -231,11 +282,34 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -243,13 +317,28 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -259,54 +348,58 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -CONFIG_INET_ECN=y CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set -# CONFIG_XFRM_USER is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set - -# -# Network device support -# +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) @@ -316,67 +409,47 @@ # # Ethernet (1000 Mbit) # -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -# CONFIG_STRIP is not set -# CONFIG_ARLAN is not set -# CONFIG_AIRONET4500 is not set - -# -# Wireless ISA/PCI cards support -# -# CONFIG_WAVELAN is not set -# CONFIG_AIRO is not set -# CONFIG_HERMES is not set -CONFIG_NET_WIRELESS=y - -# -# Token Ring devices (depends on LLC=y) -# -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Ethernet (10000 Mbit) # -# CONFIG_WAN is not set # -# IrDA (infrared) support +# Token Ring devices # -# CONFIG_IRDA is not set +# CONFIG_TR is not set # -# Amateur Radio support +# Wireless LAN (non-hamradio) # -# CONFIG_HAMRADIO is not set +CONFIG_NET_RADIO=y # -# ATA/ATAPI/MFM/RLL support +# Obsolete Wireless cards support (pre-802.11) # -# CONFIG_IDE is not set +# CONFIG_STRIP is not set +# CONFIG_ARLAN is not set +# CONFIG_WAVELAN is not set # -# SCSI support +# Wireless 802.11b ISA/PCI cards support # -# CONFIG_SCSI is not set +# CONFIG_ATMEL is not set +CONFIG_NET_WIRELESS=y # -# I2O device support +# Wan interfaces # -# CONFIG_I2O is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -392,21 +465,10 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_TSLIBDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -416,6 +478,15 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -436,23 +507,13 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# L3 serial bus support +# IPMI # -# CONFIG_L3 is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards @@ -460,88 +521,162 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -CONFIG_SA1100_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set # CONFIG_JFFS2_FS is not set CONFIG_CRAMFS=y -CONFIG_TMPFS=y -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_XFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set -# CONFIG_EXPORTFS is not set -# CONFIG_CIFS is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set -CONFIG_NLS=y +CONFIG_MSDOS_PARTITION=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # CONFIG_NLS_CODEPAGE_737 is not set @@ -566,6 +701,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -582,63 +718,37 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers +# Profiling support # -# CONFIG_VGA_CONSOLE is not set - -# -# Frame-buffer support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches -# -# CONFIG_SWITCHES is not set - -# -# USB support -# - -# -# Bluetooth support -# -# CONFIG_BT is not set +# CONFIG_PROFILING is not set # # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SLAB=y CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_WAITQ=y +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_WAITQ=y CONFIG_DEBUG_ERRORS=y -CONFIG_KALLSYMS=y CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set # # Security options # -CONFIG_SECURITY_CAPABILITIES=y +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # # Cryptographic options @@ -646,7 +756,13 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set # CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/arm/configs/integrator_defconfig b/arch/arm/configs/integrator_defconfig --- a/arch/arm/configs/integrator_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/integrator_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc3 -# Mon Dec 20 16:08:21 2004 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 21:14:51 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -26,7 +27,6 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y @@ -35,6 +35,7 @@ CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -44,6 +45,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -94,6 +96,7 @@ CONFIG_CPU_32=y CONFIG_CPU_ARM720T=y CONFIG_CPU_ARM920T=y +# CONFIG_CPU_ARM922T is not set # CONFIG_CPU_ARM926T is not set # CONFIG_CPU_ARM1020 is not set # CONFIG_CPU_ARM1022 is not set @@ -117,68 +120,98 @@ # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_DCACHE_DISABLE is not set # CONFIG_CPU_DCACHE_WRITETHROUGH is not set +CONFIG_ICST525=y # -# General setup +# Bus support # -CONFIG_PCI=y -CONFIG_ICST525=y CONFIG_ARM_AMBA=y +CONFIG_PCI=y +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp mem=32M" # CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set -# CONFIG_CPU_FREQ_PROC_INTF is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_24_API is not set CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_INTEGRATOR=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_DEBUG_DRIVER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set # CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp mem=32M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_AFS_PARTS=y @@ -220,6 +253,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -237,6 +271,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -251,6 +286,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -262,6 +302,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set @@ -280,6 +321,12 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -287,6 +334,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -387,7 +448,6 @@ # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set CONFIG_E100=y -# CONFIG_E100_NAPI is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set @@ -441,25 +501,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -482,18 +523,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_AMBAKMI is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -511,6 +540,18 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_AMBAKMI is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -557,11 +598,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -572,6 +622,77 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_ARMCLCD is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +CONFIG_FB_MATROX=y +CONFIG_FB_MATROX_MILLENIUM=y +CONFIG_FB_MATROX_MYSTIQUE=y +# CONFIG_FB_MATROX_G is not set +CONFIG_FB_MATROX_MULTIHEAD=y +# CONFIG_FB_RADEON_OLD is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -580,6 +701,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -627,6 +752,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -693,90 +819,20 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_ARMCLCD is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_RIVA is not set -CONFIG_FB_MATROX=y -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -CONFIG_FB_MATROX_MULTIHEAD=y -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_WAITQ is not set @@ -793,6 +849,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/iq31244_defconfig b/arch/arm/configs/iq31244_defconfig --- a/arch/arm/configs/iq31244_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/iq31244_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10 -# Thu Jan 6 10:53:05 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 02:10:38 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -27,7 +28,6 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y @@ -35,6 +35,7 @@ # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -44,6 +45,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -118,49 +120,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" # CONFIG_XIP_KERNEL is not set -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -199,6 +227,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -219,6 +248,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -233,6 +263,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -244,6 +279,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set @@ -261,6 +297,78 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -280,6 +388,22 @@ # CONFIG_DM_SNAPSHOT is not set # CONFIG_DM_MIRROR is not set # CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set # # Networking support @@ -406,94 +530,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -516,13 +552,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -532,6 +561,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -578,6 +614,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -628,7 +669,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set @@ -641,6 +684,8 @@ # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -660,6 +705,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -670,6 +719,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -683,7 +765,12 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# CONFIG_XFS_FS=y +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y @@ -734,6 +821,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -800,51 +888,12 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y @@ -858,6 +907,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/iq80321_defconfig b/arch/arm/configs/iq80321_defconfig --- a/arch/arm/configs/iq80321_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/iq80321_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10 -# Thu Jan 6 10:52:05 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 13:24:10 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -27,13 +28,13 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -43,6 +44,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -117,49 +119,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" # CONFIG_XIP_KERNEL is not set -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -198,6 +226,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -218,6 +247,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -232,6 +262,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -243,6 +278,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set @@ -260,6 +296,17 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -267,6 +314,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -390,30 +451,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -436,13 +473,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -452,6 +482,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -498,6 +535,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -548,7 +590,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set @@ -561,6 +605,8 @@ # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -580,6 +626,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -590,6 +640,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -603,7 +686,12 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# CONFIG_XFS_FS=y +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y @@ -654,6 +742,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -720,51 +809,12 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y @@ -778,6 +828,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/iq80331_defconfig b/arch/arm/configs/iq80331_defconfig --- a/arch/arm/configs/iq80331_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/iq80331_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10 -# Thu Jan 6 10:44:16 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 15:13:37 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -27,13 +28,13 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -43,6 +44,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -117,49 +119,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" # CONFIG_XIP_KERNEL is not set -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -202,6 +230,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -222,6 +251,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -236,6 +266,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -247,6 +282,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set @@ -264,6 +300,78 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -283,6 +391,22 @@ # CONFIG_DM_SNAPSHOT is not set # CONFIG_DM_MIRROR is not set # CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set # # Networking support @@ -409,94 +533,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -519,13 +555,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -535,6 +564,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -581,6 +617,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -631,7 +672,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set @@ -644,6 +687,8 @@ # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -663,6 +708,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -673,6 +722,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -686,7 +768,12 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# CONFIG_XFS_FS=y +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y @@ -797,51 +884,12 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y @@ -855,6 +903,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/iq80332_defconfig b/arch/arm/configs/iq80332_defconfig --- a/arch/arm/configs/iq80332_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/iq80332_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10 -# Thu Jan 6 10:51:02 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 17:33:39 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -27,13 +28,13 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -43,6 +44,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -117,49 +119,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y +# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" # CONFIG_XIP_KERNEL is not set -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -202,6 +230,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -222,6 +251,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -236,6 +266,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -247,6 +282,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set @@ -264,6 +300,78 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -283,6 +391,22 @@ # CONFIG_DM_SNAPSHOT is not set # CONFIG_DM_MIRROR is not set # CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set # # Networking support @@ -409,94 +533,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_QLA6322 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -519,13 +555,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -535,6 +564,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -581,6 +617,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -631,7 +672,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set @@ -644,6 +687,8 @@ # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -663,6 +708,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -673,6 +722,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -686,7 +768,12 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# CONFIG_XFS_FS=y +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y @@ -797,51 +884,12 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y @@ -855,6 +903,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig --- a/arch/arm/configs/ixdp2400_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/ixdp2400_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,10 +1,14 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 21:13:38 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -16,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -23,20 +28,24 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -64,7 +73,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -88,6 +99,7 @@ CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -99,51 +111,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -182,6 +218,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -201,6 +238,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -215,6 +253,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -226,13 +269,31 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -240,6 +301,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -266,6 +341,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -285,8 +363,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -337,7 +413,6 @@ # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set @@ -349,7 +424,6 @@ # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -362,6 +436,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -411,25 +486,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -452,14 +508,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -469,6 +517,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # # CONFIG_VT is not set @@ -490,7 +545,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -516,7 +570,6 @@ # CONFIG_WDTPCI is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -524,11 +577,15 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -539,6 +596,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -564,6 +622,7 @@ # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support @@ -571,20 +630,29 @@ CONFIG_I2C_SENSOR=y # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -603,6 +671,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -613,6 +685,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -629,10 +728,15 @@ # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -657,6 +761,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -674,6 +779,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -696,9 +802,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -736,55 +842,41 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_BDI2000_XSCALE is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig --- a/arch/arm/configs/ixdp2401_defconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/configs/ixdp2401_defconfig 2005-03-30 16:58:49 -08:00 @@ -1,10 +1,14 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 21:53:55 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -16,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -23,20 +28,24 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -64,7 +73,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -88,6 +99,7 @@ CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -99,51 +111,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -182,6 +218,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -201,6 +238,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -215,6 +253,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -226,13 +269,31 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -240,6 +301,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -266,6 +341,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -285,8 +363,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -338,7 +414,6 @@ CONFIG_CS89x0=y # CONFIG_DGRS is not set CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set @@ -350,7 +425,6 @@ # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -363,6 +437,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -412,25 +487,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -453,14 +509,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -470,6 +518,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # # CONFIG_VT is not set @@ -491,7 +546,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -517,7 +571,6 @@ # CONFIG_WDTPCI is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -525,11 +578,15 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -540,6 +597,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -565,6 +623,7 @@ # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support @@ -572,20 +631,29 @@ CONFIG_I2C_SENSOR=y # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -604,6 +672,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -614,6 +686,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -630,10 +729,15 @@ # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -658,6 +762,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -675,6 +780,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -697,9 +803,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -737,55 +843,41 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_BDI2000_XSCALE is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig --- a/arch/arm/configs/ixdp2800_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/ixdp2800_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,10 +1,14 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:15:23 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -16,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -23,20 +28,24 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -64,7 +73,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -88,6 +99,7 @@ CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -99,51 +111,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -182,6 +218,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -201,6 +238,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -215,6 +253,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -226,13 +269,31 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -240,6 +301,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -266,6 +341,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -285,8 +363,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -337,7 +413,6 @@ # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set @@ -349,7 +424,6 @@ # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -362,6 +436,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -411,25 +486,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -452,14 +508,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -469,6 +517,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # # CONFIG_VT is not set @@ -490,7 +545,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -516,7 +570,6 @@ # CONFIG_WDTPCI is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -524,11 +577,15 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -539,6 +596,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -564,6 +622,7 @@ # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support @@ -571,20 +630,29 @@ CONFIG_I2C_SENSOR=y # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -603,6 +671,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -613,6 +685,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -629,10 +728,15 @@ # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -657,6 +761,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -674,6 +779,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -696,9 +802,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -736,55 +842,41 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_BDI2000_XSCALE is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig --- a/arch/arm/configs/ixdp2801_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/ixdp2801_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,10 +1,14 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:39:19 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options @@ -16,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -23,20 +28,24 @@ # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -64,7 +73,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -88,6 +99,7 @@ CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -99,51 +111,75 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # CONFIG_PCI=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware ixdp2x01_clock=50000000" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmware ixdp2x01_clock=50000000" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y CONFIG_MTD_REDBOOT_PARTS_READONLY=y # CONFIG_MTD_CMDLINE_PARTS is not set @@ -182,6 +218,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -201,6 +238,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -215,6 +253,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -226,13 +269,31 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -240,6 +301,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -266,6 +341,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -285,8 +363,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -338,7 +414,6 @@ CONFIG_CS89x0=y # CONFIG_DGRS is not set CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set @@ -350,7 +425,6 @@ # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -363,6 +437,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -412,25 +487,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -453,14 +509,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -470,6 +518,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # # CONFIG_VT is not set @@ -491,7 +546,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -517,7 +571,6 @@ # CONFIG_WDTPCI is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -525,11 +578,15 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -540,6 +597,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -565,6 +623,7 @@ # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support @@ -572,20 +631,29 @@ CONFIG_I2C_SENSOR=y # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -604,6 +672,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -614,6 +686,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -630,10 +729,15 @@ # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -658,6 +762,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -675,6 +780,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -697,9 +803,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -737,55 +843,41 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_BDI2000_XSCALE is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig --- a/arch/arm/configs/ixp4xx_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/ixp4xx_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,40 +1,51 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:53:40 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -43,52 +54,33 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set CONFIG_ARCH_IXP4XX=y +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_VERSATILE_PB is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -98,12 +90,15 @@ # # IXP4xx Platforms # +# CONFIG_ARCH_AVILA is not set +CONFIG_ARCH_ADI_COYOTE=y CONFIG_ARCH_IXDP425=y +# CONFIG_MACH_IXDPG425 is not set +# CONFIG_MACH_IXDP465 is not set CONFIG_ARCH_IXCDP1100=y CONFIG_ARCH_PRPMC1100=y -CONFIG_ARCH_ADI_COYOTE=y -# CONFIG_ARCH_AVILA is not set CONFIG_ARCH_IXDP4XX=y +# CONFIG_MACH_GTWX5715 is not set # # IXP4xx Options @@ -111,45 +106,13 @@ # CONFIG_IXP4XX_INDIRECT_PCI is not set # -# Intel PXA250/210 Implementations -# - -# -# SA11x0 Implementations -# - -# -# TI OMAP Implementations -# - -# -# OMAP Core Type -# - -# -# OMAP Board Type -# - -# -# OMAP Feature Selections -# - -# -# S3C2410 Implementations -# - -# -# LH7A40X Implementations -# -CONFIG_DMABOUNCE=y - -# # Processor Type # CONFIG_CPU_32=y CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -159,51 +122,81 @@ # CONFIG_ARM_THUMB is not set CONFIG_CPU_BIG_ENDIAN=y CONFIG_XSCALE_PMU=y +CONFIG_DMABOUNCE=y # -# General setup +# Bus support # CONFIG_PCI=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_DEBUG_DRIVER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set CONFIG_APM=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -223,13 +216,24 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -246,8 +250,10 @@ # # CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -262,6 +268,13 @@ CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set CONFIG_MTD_NAND_IDS=m +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set # # Plug and Play support @@ -275,13 +288,88 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_IDEPCI_SHARE_IRQ is not set +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_GENERIC is not set +# CONFIG_BLK_DEV_OPTI621 is not set +# CONFIG_BLK_DEV_SL82C105 is not set +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +# CONFIG_IDEDMA_PCI_AUTO is not set +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +CONFIG_BLK_DEV_CMD64X=y +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +CONFIG_BLK_DEV_HPT366=y +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +CONFIG_BLK_DEV_PDC202XX_NEW=y +# CONFIG_PDC202XX_FORCE is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -289,6 +377,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -306,14 +408,14 @@ CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_NAT=y CONFIG_IP_ROUTE_MULTIPATH=y +# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set -CONFIG_NET_IPIP=m +# CONFIG_NET_IPIP is not set CONFIG_NET_IPGRE=m CONFIG_NET_IPGRE_BROADCAST=y CONFIG_IP_MROUTE=y @@ -324,6 +426,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +CONFIG_INET_TUNNEL=m +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -366,6 +471,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CONNTRACK_MARK is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m # CONFIG_IP_NF_TFTP is not set @@ -391,8 +499,16 @@ # CONFIG_IP_NF_MATCH_CONNTRACK is not set CONFIG_IP_NF_MATCH_OWNER=m # CONFIG_IP_NF_MATCH_PHYSDEV is not set +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m @@ -408,15 +524,10 @@ # CONFIG_IP_NF_TARGET_DSCP is not set CONFIG_IP_NF_TARGET_MARK=m # CONFIG_IP_NF_TARGET_CLASSIFY is not set -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +# CONFIG_IP_NF_RAW is not set CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m # CONFIG_IP_NF_ARP_MANGLE is not set -CONFIG_IP_NF_COMPAT_IPCHAINS=m -CONFIG_IP_NF_COMPAT_IPFWADM=m -# CONFIG_IP_NF_RAW is not set # # Bridge: Netfilter Configuration @@ -455,16 +566,17 @@ CONFIG_ECONET_AUNUDP=y CONFIG_ECONET_NATIVE=y CONFIG_WAN_ROUTER=m -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m # CONFIG_NET_SCH_HFSC is not set -CONFIG_NET_SCH_CSZ=m # CONFIG_NET_SCH_ATM is not set CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m @@ -473,18 +585,24 @@ CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_DELAY is not set +# CONFIG_NET_SCH_NETEM is not set CONFIG_NET_SCH_INGRESS=m CONFIG_NET_QOS=y CONFIG_NET_ESTIMATOR=y CONFIG_NET_CLS=y +# CONFIG_NET_CLS_BASIC is not set CONFIG_NET_CLS_TCINDEX=m CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_NET_CLS_IND is not set +# CONFIG_CLS_U32_MARK is not set CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # @@ -516,6 +634,7 @@ # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set +# CONFIG_SMC91X is not set # # Tulip family network device support @@ -530,7 +649,6 @@ # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set @@ -554,6 +672,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -580,7 +699,6 @@ # # Wireless 802.11b ISA/PCI cards support # -# CONFIG_AIRO is not set CONFIG_HERMES=y # CONFIG_PLX_HERMES is not set # CONFIG_TMD_HERMES is not set @@ -590,6 +708,7 @@ # # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # +# CONFIG_PRISM54 is not set CONFIG_NET_WIRELESS=y # @@ -637,89 +756,10 @@ # CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPCI=y -# CONFIG_IDEPCI_SHARE_IRQ is not set -# CONFIG_BLK_DEV_OFFBOARD is not set -# CONFIG_BLK_DEV_GENERIC is not set -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_SL82C105 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -# CONFIG_IDEDMA_PCI_AUTO is not set -CONFIG_BLK_DEV_ADMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -CONFIG_BLK_DEV_CMD64X=y -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -# CONFIG_PDC202XX_FORCE is not set -# CONFIG_BLK_DEV_SVWKS is not set -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -742,14 +782,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -759,6 +791,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # # CONFIG_VT is not set @@ -780,7 +819,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -806,7 +844,6 @@ # CONFIG_WDTPCI is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -814,12 +851,15 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -830,6 +870,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -841,6 +882,7 @@ # CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set +# CONFIG_I2C_IOP3XX is not set # CONFIG_I2C_ISA is not set CONFIG_I2C_IXP4XX=y # CONFIG_I2C_NFORCE2 is not set @@ -852,26 +894,41 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support # CONFIG_I2C_SENSOR=y # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set @@ -883,12 +940,17 @@ CONFIG_SENSORS_EEPROM=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -899,6 +961,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -915,10 +1004,15 @@ # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -931,7 +1025,8 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -942,6 +1037,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -959,6 +1055,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -977,14 +1078,13 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -1002,7 +1102,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -1019,49 +1118,31 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_BDI2000_XSCALE is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1070,8 +1151,13 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig --- a/arch/arm/configs/jornada720_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/jornada720_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,33 +1,64 @@ # -# Automatically generated by make menuconfig: don't edit +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 23:10:35 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -35,136 +66,136 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set - -# -# Footbridge Implementations -# -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_H3XXX is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_BADGE4 is not set CONFIG_SA1100_JORNADA720=y -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -CONFIG_SA1111=y -CONFIG_FORCE_MAX_ZONEORDER=9 -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_USB_NETLINK is not set -# CONFIG_SA1100_USB_CHAR is not set -# CONFIG_REGISTERS is not set - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_AUTCPU12 is not set -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set +# CONFIG_SA1100_SSP is not set + +# +# Processor Type +# CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set CONFIG_CPU_SA1100=y -# CONFIG_ARM_THUMB is not set -CONFIG_DISCONTIGMEM=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # -# General setup +# Processor Features +# +CONFIG_SA1111=y +CONFIG_DMABOUNCE=y +CONFIG_FORCE_MAX_ZONEORDER=9 + +# +# Bus support # -# CONFIG_PCI is not set CONFIG_ISA=y -# CONFIG_ISA_DMA is not set -# CONFIG_CPU_FREQ is not set -CONFIG_HOTPLUG=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y -# CONFIG_I82092 is not set -# CONFIG_I82365 is not set + +# +# PC-card bridges +# +CONFIG_I82365=y # CONFIG_TCIC is not set -# CONFIG_PCMCIA_CLPS6700 is not set CONFIG_PCMCIA_SA1100=y -# CONFIG_MERCURY_BACKPAQ is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +# CONFIG_PCMCIA_SA1111 is not set +CONFIG_PCCARD_NONSTATIC=y + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="keepinitrd mem=32M" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set CONFIG_FPE_FASTFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=m + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=m # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# CONFIG_PM=y # CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="keepinitrd mem=32M" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -172,14 +203,20 @@ CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=1 +# CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_BOOTLDR_PARTS=y +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# CONFIG_MTD_CHAR=m CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -192,45 +229,49 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -CONFIG_MTD_CFI_B2=y -CONFIG_MTD_CFI_B4=y +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_AMDSTD is not set -# CONFIG_MTD_SHARP is not set -# CONFIG_MTD_JEDEC is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_CDB89712 is not set CONFIG_MTD_SA1100=y -# CONFIG_MTD_H3600_BACKPAQ is not set -# CONFIG_MTD_DC21285 is not set -# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # -# CONFIG_MTD_PMC551 is not set # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_DOC1000 is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -238,49 +279,101 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=m +CONFIG_BLK_DEV_IDE=m + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECS is not set +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y # # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y -CONFIG_NETLINK=y -CONFIG_RTNETLINK=y # CONFIG_NETLINK_DEV is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_FILTER=y CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set @@ -289,204 +382,200 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set # -# IP: Netfilter Configuration +# IP: Netfilter Configuration # # CONFIG_IP_NF_CONNTRACK is not set +# CONFIG_IP_NF_CONNTRACK_MARK is not set # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # -CONFIG_NETDEVICES=y +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +CONFIG_IRDA=m # -# ARCnet devices +# IrDA protocols # -# CONFIG_ARCNET is not set +CONFIG_IRLAN=m +# CONFIG_IRNET is not set +CONFIG_IRCOMM=m +# CONFIG_IRDA_ULTRA is not set + +# +# IrDA options +# +# CONFIG_IRDA_CACHE_LAST_LSAP is not set +# CONFIG_IRDA_FAST_RR is not set +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +# CONFIG_IRTTY_SIR is not set + +# +# Dongle support +# + +# +# Old SIR device drivers +# +# CONFIG_IRPORT_SIR is not set + +# +# Old Serial dongle support +# + +# +# FIR device drivers +# +# CONFIG_NSC_FIR is not set +# CONFIG_WINBOND_FIR is not set +# CONFIG_SMC_IRCC_FIR is not set +# CONFIG_ALI_FIR is not set +CONFIG_SA1100_FIR=m +# CONFIG_BT is not set +CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set # # Ethernet (10 or 100Mbit) # # CONFIG_NET_ETHERNET is not set +CONFIG_MII=m # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_MYRI_SBUS is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -CONFIG_NET_RADIO=y -# CONFIG_STRIP is not set -CONFIG_WAVELAN=m -CONFIG_ARLAN=m -CONFIG_AIRONET4500=m -CONFIG_AIRONET4500_NONCS=m -# CONFIG_AIRONET4500_PNP is not set -# CONFIG_AIRONET4500_PCI is not set -# CONFIG_AIRONET4500_ISA is not set -# CONFIG_AIRONET4500_I365 is not set -# CONFIG_AIRONET4500_PROC is not set -# CONFIG_AIRO is not set -CONFIG_HERMES=m -CONFIG_PCMCIA_HERMES=m -CONFIG_AIRO_CS=m -CONFIG_NET_WIRELESS=y # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +CONFIG_NET_RADIO=y # -# PCMCIA network device support +# Obsolete Wireless cards support (pre-802.11) # -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -# CONFIG_PCMCIA_AXNET is not set -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -CONFIG_NET_PCMCIA_RADIO=y -# CONFIG_PCMCIA_RAYCS is not set -# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_STRIP is not set +CONFIG_ARLAN=m +CONFIG_WAVELAN=m CONFIG_PCMCIA_WAVELAN=m -CONFIG_AIRONET4500_CS=m - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -CONFIG_IRDA=m -CONFIG_IRLAN=m -# CONFIG_IRNET is not set -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set -# CONFIG_IRDA_OPTIONS is not set +# CONFIG_PCMCIA_NETWAVE is not set # -# Infrared-port device drivers +# Wireless 802.11 Frequency Hopping cards support # -# CONFIG_IRTTY_SIR is not set -# CONFIG_IRPORT_SIR is not set -# CONFIG_DONGLE is not set -# CONFIG_USB_IRDA is not set -# CONFIG_NSC_FIR is not set -# CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set -# CONFIG_SMC_IRCC_FIR is not set -# CONFIG_ALI_FIR is not set -# CONFIG_VLSI_FIR is not set -CONFIG_SA1100_FIR=m +# CONFIG_PCMCIA_RAYCS is not set # -# ATA/IDE/MFM/RLL support +# Wireless 802.11b ISA/PCI cards support # -CONFIG_IDE=m +CONFIG_HERMES=m +# CONFIG_ATMEL is not set # -# IDE, ATA and ATAPI Block devices +# Wireless 802.11b Pcmcia/Cardbus cards support # -CONFIG_BLK_DEV_IDE=m -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=m -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_ATARAID is not set -# CONFIG_BLK_DEV_ATARAID_PDC is not set -# CONFIG_BLK_DEV_ATARAID_HPT is not set +CONFIG_PCMCIA_HERMES=m +CONFIG_AIRO_CS=m +# CONFIG_PCMCIA_WL3501 is not set +CONFIG_NET_WIRELESS=y # -# SCSI support +# PCMCIA network device support # -# CONFIG_SCSI is not set +CONFIG_NET_PCMCIA=y +CONFIG_PCMCIA_3C589=m +CONFIG_PCMCIA_3C574=m +CONFIG_PCMCIA_FMVJ18X=m +CONFIG_PCMCIA_PCNET=m +CONFIG_PCMCIA_NMCLAN=m +CONFIG_PCMCIA_SMC91C92=m +CONFIG_PCMCIA_XIRC2PS=m +CONFIG_PCMCIA_AXNET=m # -# I2O device support +# Wan interfaces # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -494,399 +583,337 @@ # CONFIG_ISDN is not set # -# Input core support +# Input device support # CONFIG_INPUT=y -# CONFIG_INPUT_KEYBDEV is not set + +# +# Userland interfaces +# CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_SA1111 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y -CONFIG_SERIAL=m -# CONFIG_SERIAL_EXTENDED is not set +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# CONFIG_SERIAL_SA1100=y CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=115200 -# CONFIG_SERIAL_8250 is not set -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_HUB6 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 -# CONFIG_NEWTONKBD is not set - -# -# I2C support -# -# CONFIG_I2C is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# L3 serial bus support +# IPMI # -# CONFIG_L3 is not set -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set -# CONFIG_L3_SA1111 is not set -# CONFIG_BIT_SA1100_GPIO is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -CONFIG_MOUSE=m -# CONFIG_PSMOUSE is not set -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set - -# -# Joysticks -# -# CONFIG_INPUT_GAMEPORT is not set -# CONFIG_INPUT_NS558 is not set -# CONFIG_INPUT_LIGHTNING is not set -# CONFIG_INPUT_PCIGAME is not set -# CONFIG_INPUT_CS461X is not set -# CONFIG_INPUT_EMU10K1 is not set -# CONFIG_INPUT_SERIO is not set -# CONFIG_INPUT_SERPORT is not set -# CONFIG_INPUT_ANALOG is not set -# CONFIG_INPUT_A3D is not set -# CONFIG_INPUT_ADI is not set -# CONFIG_INPUT_COBRA is not set -# CONFIG_INPUT_GF2K is not set -# CONFIG_INPUT_GRIP is not set -# CONFIG_INPUT_INTERACT is not set -# CONFIG_INPUT_TMDC is not set -# CONFIG_INPUT_SIDEWINDER is not set -# CONFIG_INPUT_IFORCE_USB is not set -# CONFIG_INPUT_IFORCE_232 is not set -# CONFIG_INPUT_WARRIOR is not set -# CONFIG_INPUT_MAGELLAN is not set -# CONFIG_INPUT_SPACEORB is not set -# CONFIG_INPUT_SPACEBALL is not set -# CONFIG_INPUT_STINGER is not set -# CONFIG_INPUT_DB9 is not set -# CONFIG_INPUT_GAMECON is not set -# CONFIG_INPUT_TURBOGRAFX is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -CONFIG_SA1100_RTC=m # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # # PCMCIA character devices # -# CONFIG_PCMCIA_SERIAL_CS is not set +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -# CONFIG_V4L2_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_SOFT_CURSOR is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_SA1100 is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +CONFIG_DEVFS_DEBUG=y +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=2 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -CONFIG_ISO9660_FS=m -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -CONFIG_DEVFS_DEBUG=y -# CONFIG_DRIVERFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=m CONFIG_NFS_V3=y -# CONFIG_ROOT_NFS is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=m CONFIG_LOCKD=m CONFIG_LOCKD_V4=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set -# CONFIG_ZISOFS_FS is not set -# CONFIG_ZLIB_FS_INFLATE is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -# CONFIG_SMB_NLS is not set + +# +# Native Language Support +# # CONFIG_NLS is not set # -# Console drivers +# Profiling support # -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set +# CONFIG_PROFILING is not set # -# Frame-buffer support +# Kernel hacking # -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_ACORN is not set -# CONFIG_FB_CLPS711X is not set -# CONFIG_FB_SA1100 is not set -CONFIG_FB_EPSON1356=y -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_VIRTUAL is not set -CONFIG_FBCON_ADVANCED=y -# CONFIG_FBCON_MFB is not set -# CONFIG_FBCON_CFB2 is not set -# CONFIG_FBCON_CFB4 is not set -# CONFIG_FBCON_CFB8 is not set -CONFIG_FBCON_CFB16=y -# CONFIG_FBCON_CFB24 is not set -# CONFIG_FBCON_CFB32 is not set -# CONFIG_FBCON_AFB is not set -# CONFIG_FBCON_ILBM is not set -# CONFIG_FBCON_IPLAN2P2 is not set -# CONFIG_FBCON_IPLAN2P4 is not set -# CONFIG_FBCON_IPLAN2P8 is not set -# CONFIG_FBCON_MAC is not set -# CONFIG_FBCON_VGA_PLANES is not set -# CONFIG_FBCON_VGA is not set -# CONFIG_FBCON_HGA is not set -CONFIG_FBCON_FONTWIDTH8_ONLY=y -CONFIG_FBCON_FONTS=y -CONFIG_FONT_8x8=y -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_PRINTK_TIME is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +CONFIG_DEBUG_SLAB=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set # -# Sound +# Security options # -CONFIG_SOUND=m -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_MIDI_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_RME96XX is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -# CONFIG_MIDI_VIA82CXXX is not set -CONFIG_SOUND_SA1100=m -# CONFIG_SOUND_UDA1341 is not set -# CONFIG_SOUND_ASSABET_UDA1341 is not set -# CONFIG_SOUND_H3600_UDA1341 is not set -# CONFIG_SOUND_PANGOLIN_UDA1341 is not set -# CONFIG_SOUND_SA1111_UDA1341 is not set -# CONFIG_SOUND_SA1100SSP is not set -# CONFIG_SOUND_OSS is not set -# CONFIG_SOUND_WAVEARTIST is not set -# CONFIG_SOUND_TVMIXER is not set - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set -# CONFIG_MCP_SA1100 is not set -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# USB support +# Cryptographic options # -# CONFIG_USB is not set -# CONFIG_USB_UHCI is not set -# CONFIG_USB_UHCI_ALT is not set -# CONFIG_USB_OHCI is not set -# CONFIG_USB_OHCI_SA1111 is not set -# CONFIG_USB_AUDIO is not set -# CONFIG_USB_BLUETOOTH is not set -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_HID is not set -# CONFIG_USB_HIDDEV is not set -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_DC2XX is not set -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_USS720 is not set - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set -# CONFIG_USB_SERIAL_GENERIC is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_PL2303 is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set -# CONFIG_USB_RIO500 is not set +# CONFIG_CRYPTO is not set # -# Bluetooth support +# Hardware crypto devices # -# CONFIG_BT is not set # -# Kernel hacking +# Library routines # -CONFIG_FRAME_POINTER=y -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_NO_PGT_CACHE is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SLAB=y -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set -# CONFIG_DEBUG_LL_SER3 is not set +CONFIG_CRC_CCITT=m +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/lart_defconfig b/arch/arm/configs/lart_defconfig --- a/arch/arm/configs/lart_defconfig 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/configs/lart_defconfig 2005-03-30 16:58:51 -08:00 @@ -1,35 +1,49 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 23:53:24 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -38,90 +52,51 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set # CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set # CONFIG_SA1100_HACKKIT is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set CONFIG_SA1100_LART=y -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set # CONFIG_SA1100_SSP is not set -CONFIG_SA1100_USB=m -CONFIG_SA1100_USB_NETLINK=m -CONFIG_SA1100_USB_CHAR=m # # Processor Type @@ -131,6 +106,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4=y CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WB=y CONFIG_CPU_MINICACHE=y @@ -139,51 +115,84 @@ # # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +CONFIG_LEDS=y +# CONFIG_LEDS_TIMER is not set +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttySA0,9600 root=/dev/ram" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_SA1100=y -# CONFIG_CPU_FREQ_PROC_INTF is not set +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_24_API=y -# CONFIG_HOTPLUG is not set +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_SA1100=y + +# +# Floating point emulation +# # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # CONFIG_PM=y -# CONFIG_PREEMPT is not set CONFIG_APM=m -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0,9600 root=/dev/ram" -CONFIG_LEDS=y -# CONFIG_LEDS_TIMER is not set -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -191,8 +200,8 @@ CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=1 -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -211,10 +220,19 @@ # # CONFIG_MTD_CFI is not set # CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access @@ -225,9 +243,11 @@ # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set CONFIG_MTD_LART=y # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -242,6 +262,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # # CONFIG_PNP is not set @@ -251,11 +276,56 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=m +CONFIG_BLK_DEV_IDE=m + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=m +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=m +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -263,6 +333,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -282,23 +364,24 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -CONFIG_INET_ECN=y CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -307,88 +390,20 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -CONFIG_DUMMY=m -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_MII is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -# CONFIG_NET_PCI is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPPOE is not set -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -# CONFIG_SLIP_SMART is not set -# CONFIG_SLIP_MODE_SLIP6 is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# CONFIG_IRDA=m # @@ -433,56 +448,79 @@ # # CONFIG_NSC_FIR is not set # CONFIG_WINBOND_FIR is not set -# CONFIG_TOSHIBA_FIR is not set # CONFIG_SMC_IRCC_FIR is not set # CONFIG_ALI_FIR is not set CONFIG_SA1100_FIR=m -# CONFIG_VIA_FIR is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # -# Bluetooth support +# ARCnet devices # -# CONFIG_BT is not set +# CONFIG_ARCNET is not set # -# ATA/ATAPI/MFM/RLL support +# Ethernet (10 or 100Mbit) # -CONFIG_IDE=m -CONFIG_BLK_DEV_IDE=m +CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_PCI is not set +# CONFIG_NET_POCKET is not set # -# Please see Documentation/ide.txt for help/info on IDE drives +# Ethernet (1000 Mbit) # -CONFIG_BLK_DEV_IDEDISK=m -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # -# IDE chipset support/bugfixes +# Ethernet (10000 Mbit) # -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set # -# SCSI device support +# Token Ring devices # -# CONFIG_SCSI is not set +# CONFIG_TR is not set # -# I2O device support +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces # +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +# CONFIG_PPPOE is not set +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -502,35 +540,36 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_PS2_SYNAPTICS is not set # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -551,7 +590,33 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set # # I2C support @@ -559,57 +624,62 @@ # CONFIG_I2C is not set # -# I2C Algorithms +# Misc devices # # -# I2C Hardware Bus support +# Multimedia devices # +# CONFIG_VIDEO_DEV is not set # -# I2C Hardware Sensors Chip support +# Digital Video Broadcasting Devices # -# CONFIG_I2C_SENSOR is not set +# CONFIG_DVB is not set # -# Mice +# Graphics support # -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_FB is not set # -# IPMI +# Console display driver support # -# CONFIG_IPMI_HANDLER is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y # -# Watchdog Cards +# Sound # -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set +CONFIG_SOUND=m # -# Ftape, the floppy tape device driver +# Advanced Linux Sound Architecture # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set +# CONFIG_SND is not set # -# Multimedia devices +# Open Sound System # -# CONFIG_VIDEO_DEV is not set +# CONFIG_SOUND_PRIME is not set # -# Digital Video Broadcasting Devices +# USB support # -# CONFIG_DVB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems @@ -626,11 +696,17 @@ CONFIG_REISERFS_FS=m # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -641,21 +717,24 @@ CONFIG_JOLIET=y # CONFIG_ZISOFS is not set CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -665,6 +744,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -672,6 +752,11 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=1 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=m # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -685,6 +770,7 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=m CONFIG_NFSD_V3=y # CONFIG_NFSD_V4 is not set @@ -693,23 +779,24 @@ CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m CONFIG_SUNRPC=m -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set -CONFIG_NLS=y +CONFIG_MSDOS_PARTITION=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set @@ -734,6 +821,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -750,52 +838,24 @@ CONFIG_NLS_UTF8=m # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound +# Profiling support # -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB_GADGET is not set +# CONFIG_PROFILING is not set # # Kernel hacking # +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_KERNEL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -804,8 +864,14 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=m +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/arm/configs/lpd7a400_defconfig b/arch/arm/configs/lpd7a400_defconfig --- a/arch/arm/configs/lpd7a400_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/lpd7a400_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,42 +1,52 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:06:33 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" # CONFIG_SWAP is not set CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -46,7 +56,6 @@ # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -56,6 +65,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -64,69 +74,9 @@ # CONFIG_ARCH_SHARK is not set CONFIG_ARCH_LH7A40X=y # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel IXP4xx Implementation Options -# - -# -# IXP4xx Platforms -# - -# -# IXP4xx Options -# - -# -# Intel PXA2xx Implementations -# - -# -# SA11x0 Implementations -# - -# -# TI OMAP Implementations -# - -# -# OMAP Core Type -# - -# -# OMAP Board Type -# - -# -# OMAP Feature Selections -# - -# -# S3C2410 Implementations -# +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # LH7A40X Implementations @@ -135,6 +85,8 @@ CONFIG_MACH_LPD7A400=y # CONFIG_MACH_LPD7A404 is not set CONFIG_ARCH_LH7A400=y +# CONFIG_LH7A40X_CONTIGMEM is not set +# CONFIG_LH7A40X_ONE_BANK_PER_NODE is not set # # Processor Type @@ -144,6 +96,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -156,46 +109,72 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support # + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y CONFIG_DISCONTIGMEM=y -CONFIG_FIQ=y -# CONFIG_ZBOOT_ROM is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -CONFIG_PREEMPT=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -216,13 +195,24 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -230,15 +220,16 @@ # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -CONFIG_MTD_LPD7A40X=y # CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -253,6 +244,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -260,10 +256,54 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -271,6 +311,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -297,6 +349,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -316,12 +371,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -372,52 +427,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set -CONFIG_IDE_POLL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_IDE_ARM=y -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -440,14 +449,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -457,6 +458,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -479,7 +487,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -494,22 +501,28 @@ CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -520,6 +533,39 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -533,10 +579,15 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -552,6 +603,8 @@ CONFIG_FAT_FS=y # CONFIG_MSDOS_FS is not set CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -562,6 +615,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -579,6 +633,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -597,9 +656,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -621,7 +680,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -655,6 +713,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -676,53 +735,31 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y # CONFIG_DEBUG_LL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -731,8 +768,13 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/arm/configs/lpd7a404_defconfig b/arch/arm/configs/lpd7a404_defconfig --- a/arch/arm/configs/lpd7a404_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/lpd7a404_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,42 +1,52 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:14:08 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" # CONFIG_SWAP is not set CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y # CONFIG_EPOLL is not set -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -46,7 +56,6 @@ # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -56,6 +65,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -64,69 +74,9 @@ # CONFIG_ARCH_SHARK is not set CONFIG_ARCH_LH7A40X=y # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel IXP4xx Implementation Options -# - -# -# IXP4xx Platforms -# - -# -# IXP4xx Options -# - -# -# Intel PXA2xx Implementations -# - -# -# SA11x0 Implementations -# - -# -# TI OMAP Implementations -# - -# -# OMAP Core Type -# - -# -# OMAP Board Type -# - -# -# OMAP Feature Selections -# - -# -# S3C2410 Implementations -# +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # LH7A40X Implementations @@ -135,6 +85,8 @@ # CONFIG_MACH_LPD7A400 is not set CONFIG_MACH_LPD7A404=y CONFIG_ARCH_LH7A404=y +# CONFIG_LH7A40X_CONTIGMEM is not set +# CONFIG_LH7A40X_ONE_BANK_PER_NODE is not set # # Processor Type @@ -144,6 +96,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -156,45 +109,72 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features # +CONFIG_PREEMPT=y CONFIG_DISCONTIGMEM=y -# CONFIG_ZBOOT_ROM is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -CONFIG_PREEMPT=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -215,13 +195,24 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -229,15 +220,16 @@ # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -CONFIG_MTD_LPD7A40X=y # CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -252,6 +244,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -259,10 +256,86 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +# CONFIG_BLK_DEV_SD is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -270,6 +343,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -296,6 +381,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -315,12 +403,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -371,85 +459,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set -CONFIG_IDE_POLL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_IDE_ARM=y -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -# CONFIG_BLK_DEV_SD is not set -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -469,14 +478,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -486,6 +487,13 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -508,7 +516,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -523,22 +530,28 @@ CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -549,6 +562,148 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_BLUETOOTH_TTY is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DEBUG=y +# CONFIG_USB_STORAGE_RW_DETECT is not set +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_TEST is not set + +# +# USB ATM/DSL drivers +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -562,10 +717,15 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -581,6 +741,8 @@ CONFIG_FAT_FS=y # CONFIG_MSDOS_FS is not set CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -591,6 +753,7 @@ # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -608,6 +771,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -626,9 +794,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -650,7 +818,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -684,6 +851,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -705,152 +873,31 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_EHCI_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811HS is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_BLUETOOTH_TTY is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -CONFIG_USB_STORAGE_DATAFAB=y -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set - -# -# USB Human Interface Devices (HID) -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_TEST is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y # CONFIG_DEBUG_LL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -859,8 +906,13 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/arm/configs/lubbock_defconfig b/arch/arm/configs/lubbock_defconfig --- a/arch/arm/configs/lubbock_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/lubbock_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,40 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:18:13 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -43,50 +53,33 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -CONFIG_ARCH_PXA=y # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +CONFIG_ARCH_PXA=y # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Intel PXA2xx Implementations @@ -94,95 +87,110 @@ CONFIG_ARCH_LUBBOCK=y # CONFIG_MACH_MAINSTONE is not set # CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set CONFIG_PXA25x=y # -# SA11x0 Implementations +# Processor Type # +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_MINICACHE=y # -# TI OMAP Implementations +# Processor Features # +# CONFIG_ARM_THUMB is not set +CONFIG_XSCALE_PMU=y +CONFIG_SA1111=y +CONFIG_DMABOUNCE=y +CONFIG_FORCE_MAX_ZONEORDER=9 # -# OMAP Feature Selections +# Bus support # # -# S3C2410 Implementations +# PCCARD (PCMCIA/CardBus) support # -CONFIG_SA1111=y -CONFIG_FORCE_MAX_ZONEORDER=9 -CONFIG_DMABOUNCE=y +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=y # -# Processor Type +# PC-card bridges # -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_MINICACHE=y +# CONFIG_TCIC is not set +CONFIG_PCMCIA_PXA2XX=y # -# Processor Features +# Kernel Features # -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y # -# General setup +# Boot options # -# CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" +# CONFIG_XIP_KERNEL is not set # -# PCMCIA/CardBus support +# Floating point emulation # -CONFIG_PCMCIA=y -# CONFIG_PCMCIA_DEBUG is not set -# CONFIG_TCIC is not set -CONFIG_PCMCIA_PXA2XX=y # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -206,10 +214,12 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -# CONFIG_MTD_CFI_B2 is not set -CONFIG_MTD_CFI_B4=y -# CONFIG_MTD_CFI_B8 is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set # CONFIG_MTD_CFI_I1 is not set CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set @@ -217,10 +227,11 @@ CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -230,13 +241,16 @@ CONFIG_MTD_LUBBOCK=y # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_SHARP_SL is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -251,6 +265,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -258,9 +277,32 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -268,6 +310,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -293,6 +347,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -312,12 +369,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -381,29 +438,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -426,17 +460,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -CONFIG_SERIO_SA1111=y - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -454,6 +477,17 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +CONFIG_SERIO_SA1111=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -476,7 +510,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -489,16 +522,12 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -508,11 +537,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -523,6 +561,55 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_NET2280 is not set +CONFIG_USB_GADGET_PXA2XX=y +CONFIG_USB_PXA2XX=y +CONFIG_USB_PXA2XX_SMALL=y +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_SA1100 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +CONFIG_USB_G_SERIAL=y + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -531,10 +618,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -550,6 +642,7 @@ CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y # CONFIG_VFAT_FS is not set +CONFIG_FAT_DEFAULT_CODEPAGE=437 # CONFIG_NTFS_FS is not set # @@ -577,6 +670,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -594,20 +692,20 @@ # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -637,6 +735,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -658,61 +757,23 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_NET2280 is not set -CONFIG_USB_GADGET_PXA2XX=y -CONFIG_USB_PXA2XX=y -CONFIG_USB_PXA2XX_SMALL=y -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_SA1100 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -CONFIG_USB_G_SERIAL=y - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set @@ -720,6 +781,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -728,8 +790,14 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/lusl7200_defconfig b/arch/arm/configs/lusl7200_defconfig --- a/arch/arm/configs/lusl7200_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/lusl7200_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,41 +1,63 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:24:38 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_FIQ=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -# CONFIG_NET is not set +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -43,147 +65,94 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set CONFIG_ARCH_L7200=y +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # -# Archimedes/A5000 Implementations +# Processor Type # +CONFIG_CPU_32=y +CONFIG_CPU_ARM720T=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_LV4T=y +CONFIG_CPU_CACHE_V4=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WT=y +CONFIG_CPU_TLB_V4WT=y # -# Archimedes/A5000 Implementations (select only ONE) +# Processor Features # -# CONFIG_ARCH_ARC is not set -# CONFIG_ARCH_A5K is not set +# CONFIG_ARM_THUMB is not set # -# Footbridge Implementations -# -# CONFIG_ARCH_CATS is not set -# CONFIG_ARCH_PERSONAL_SERVER is not set -# CONFIG_ARCH_EBSA285_ADDIN is not set -# CONFIG_ARCH_EBSA285_HOST is not set -# CONFIG_ARCH_NETWINDER is not set - -# -# SA11x0 Implementations -# -# CONFIG_SA1100_ASSABET is not set -# CONFIG_ASSABET_NEPONSET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set -# CONFIG_SA1100_CERF is not set -# CONFIG_SA1100_H3100 is not set -# CONFIG_SA1100_H3600 is not set -# CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_H3XXX is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set -# CONFIG_SA1100_BADGE4 is not set -# CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set -# CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set -# CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set -# CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set -# CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_USB_NETLINK is not set -# CONFIG_SA1100_USB_CHAR is not set -# CONFIG_H3600_SLEEVE is not set - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_AUTCPU12 is not set -# CONFIG_ARCH_CDB89712 is not set -# CONFIG_ARCH_CLEP7312 is not set -# CONFIG_ARCH_EDB7211 is not set -# CONFIG_ARCH_P720T is not set -# CONFIG_ARCH_FORTUNET is not set -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set -CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set +# Bus support +# # -# Processor Type +# PCCARD (PCMCIA/CardBus) support # -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_32v5 is not set -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -CONFIG_CPU_ARM720T=y -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -# CONFIG_CPU_SA1100 is not set -# CONFIG_CPU_XSCALE is not set -# CONFIG_XSCALE_PMU is not set +# CONFIG_PCCARD is not set # -# Processor Features +# Kernel Features # -# CONFIG_ARM_THUMB is not set +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y # -# General setup +# Boot options # -# CONFIG_DISCONTIGMEM is not set -# CONFIG_PCI is not set -# CONFIG_ISA is not set -# CONFIG_ISA_DMA is not set -CONFIG_FIQ=y +CONFIG_ZBOOT_ROM_TEXT=0x00010000 +CONFIG_ZBOOT_ROM_BSS=0xf03e0000 CONFIG_ZBOOT_ROM=y -CONFIG_ZBOOT_ROM_TEXT=00010000 -CONFIG_ZBOOT_ROM_BSS=f03e0000 -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set +CONFIG_CMDLINE="console=tty0 console=ttyLU1,115200 root=/dev/ram initrd=0xf1000000,0x005dac7b mem=32M" # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # # CONFIG_FPE_NWFPE is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_APM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=tty0 console=ttyLU1,115200 root=/dev/ram initrd=0xf1000000,0x005dac7b mem=32M" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -191,59 +160,68 @@ # CONFIG_MTD is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set -# CONFIG_PNPBIOS is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_CISS_SCSI_TAPE is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set # -# Multi-device support (RAID and LVM) +# IO Schedulers # -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # # CONFIG_IDE is not set -# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # # CONFIG_SCSI is not set # +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# # I2O device support # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set + +# +# Networking support +# +# CONFIG_NET is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set # # ISDN subsystem @@ -253,37 +231,29 @@ # Input device support # # CONFIG_INPUT is not set -# CONFIG_INPUT_KEYBDEV is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_LIBPS2 is not set +# CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_GAMEPORT_NS558 is not set -# CONFIG_GAMEPORT_L4 is not set -# CONFIG_INPUT_EMU10K1 is not set -# CONFIG_GAMEPORT_PCIGAME is not set -# CONFIG_GAMEPORT_FM801 is not set -# CONFIG_GAMEPORT_CS461x is not set -# CONFIG_SERIO is not set -# CONFIG_SERIO_SERPORT is not set # # Character devices # # CONFIG_VT is not set -# CONFIG_SERIAL_EXTENDED is not set CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set # CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set -# CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -# CONFIG_SYNCLINK is not set # CONFIG_SYNCLINKMP is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set @@ -296,35 +266,38 @@ # Serial drivers # # CONFIG_SERIAL_8250 is not set -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_SHARE_IRQ is not set -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set # # Non-8250 serial port support # +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set # -# ARM Serial drivers +# TPM devices # -# CONFIG_ATOMWIDE_SERIAL is not set -# CONFIG_DUALSP_SERIAL is not set -# CONFIG_SERIAL_AMBA is not set -# CONFIG_SERIAL_AMBA_CONSOLE is not set -# CONFIG_SERIAL_CLPS711X is not set -# CONFIG_SERIAL_CLPS711X_CONSOLE is not set -# CONFIG_SERIAL_21285 is not set -# CONFIG_SERIAL_21285_OLD is not set -# CONFIG_SERIAL_21285_CONSOLE is not set -# CONFIG_SERIAL_UART00 is not set -# CONFIG_SERIAL_UART00_CONSOLE is not set -# CONFIG_SERIAL_SA1100 is not set -# CONFIG_SERIAL_SA1100_CONSOLE is not set -# CONFIG_UNIX98_PTYS is not set +# CONFIG_TCG_TPM is not set # # I2C support @@ -332,154 +305,151 @@ # CONFIG_I2C is not set # -# L3 serial bus support +# Misc devices # -# CONFIG_L3 is not set -# CONFIG_L3_ALGOBIT is not set -# CONFIG_L3_BIT_SA1100_GPIO is not set # -# Other L3 adapters +# Multimedia devices # -# CONFIG_L3_SA1111 is not set -# CONFIG_BIT_SA1100_GPIO is not set +# CONFIG_VIDEO_DEV is not set # -# Mice +# Digital Video Broadcasting Devices # -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set -# CONFIG_QIC02_TAPE is not set # -# Watchdog Cards +# Graphics support # -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set +# CONFIG_FB is not set # -# Ftape, the floppy tape device driver +# Sound # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +# CONFIG_SOUND is not set # -# Multimedia devices +# USB support # -# CONFIG_VIDEO_DEV is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set -# CONFIG_QFMT_V1 is not set -# CONFIG_QFMT_V2 is not set -# CONFIG_QIFACE_COMPAT is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set -# CONFIG_JFS_FS is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_SMB_FS is not set -# CONFIG_ZISOFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set -# CONFIG_SMB_NLS is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# # CONFIG_NLS is not set # -# Multimedia Capabilities Port drivers +# Profiling support # -# CONFIG_MCP is not set -# CONFIG_MCP_SA1100 is not set -# CONFIG_MCP_UCB1200 is not set -# CONFIG_MCP_UCB1200_AUDIO is not set -# CONFIG_MCP_UCB1200_TS is not set +# CONFIG_PROFILING is not set # -# Console Switches +# Kernel hacking # -# CONFIG_SWITCHES is not set +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # -# USB support +# Security options # -# CONFIG_USB is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# Kernel hacking +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_ERRORS is not set -# CONFIG_DEBUG_LL is not set -# CONFIG_DEBUG_DC21285_PORT is not set -# CONFIG_DEBUG_CLPS711X_UART2 is not set # # Library routines # +# CONFIG_CRC_CCITT is not set # CONFIG_CRC32 is not set -# CONFIG_ZLIB_INFLATE is not set -# CONFIG_ZLIB_DEFLATE is not set +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/mainstone_defconfig b/arch/arm/configs/mainstone_defconfig --- a/arch/arm/configs/mainstone_defconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/configs/mainstone_defconfig 2005-03-30 16:58:49 -08:00 @@ -1,41 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sat Mar 26 20:00:45 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -44,12 +53,12 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -59,6 +68,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set CONFIG_ARCH_PXA=y # CONFIG_ARCH_RPC is not set @@ -67,7 +77,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Intel PXA2xx Implementations @@ -75,6 +87,7 @@ # CONFIG_ARCH_LUBBOCK is not set CONFIG_MACH_MAINSTONE=y # CONFIG_ARCH_PXA_IDP is not set +# CONFIG_PXA_SHARPSL is not set CONFIG_PXA27x=y CONFIG_IWMMXT=y @@ -85,6 +98,7 @@ CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_MINICACHE=y @@ -95,59 +109,78 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options # -# CONFIG_ZBOOT_ROM is not set CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" +# CONFIG_XIP_KERNEL is not set # -# PCMCIA/CardBus support +# Floating point emulation # -CONFIG_PCMCIA=y -# CONFIG_PCMCIA_DEBUG is not set -# CONFIG_TCIC is not set -CONFIG_PCMCIA_PXA2XX=y # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -171,10 +204,12 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_CFI_B1 is not set -# CONFIG_MTD_CFI_B2 is not set -CONFIG_MTD_CFI_B4=y -# CONFIG_MTD_CFI_B8 is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set # CONFIG_MTD_CFI_I1 is not set CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set @@ -182,10 +217,11 @@ CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -194,13 +230,16 @@ # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_SHARP_SL is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -215,6 +254,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -222,9 +266,53 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_IDE_GENERIC is not set +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -232,6 +320,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -257,6 +357,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -276,12 +379,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -323,11 +426,6 @@ # CONFIG_NET_RADIO is not set # -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# # Wan interfaces # # CONFIG_WAN is not set @@ -337,51 +435,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECS=y -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_IDE_GENERIC is not set -# CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -404,16 +457,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -428,6 +471,16 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -450,7 +503,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -463,23 +515,19 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set # -# PCMCIA character devices +# TPM devices # -# CONFIG_SYNCLINK_CS is not set -# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set # # I2C support @@ -487,6 +535,10 @@ # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -497,6 +549,61 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_PXA=y +# CONFIG_FB_PXA_PARAMETERS is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -505,10 +612,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -552,6 +664,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -569,9 +686,9 @@ # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -582,6 +699,7 @@ # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -633,63 +751,23 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_PXA=y -# CONFIG_FB_PXA_PARAMETERS is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set @@ -697,6 +775,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -705,8 +784,13 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/arm/configs/mx1ads_defconfig b/arch/arm/configs/mx1ads_defconfig --- a/arch/arm/configs/mx1ads_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/mx1ads_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,40 +1,49 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 02:15:46 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -# CONFIG_IOSCHED_NOOP is not set -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -44,6 +53,7 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -58,6 +68,7 @@ # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set @@ -66,8 +77,9 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set CONFIG_ARCH_IMX=y +# CONFIG_ARCH_H720X is not set # # IMX Implementations @@ -82,6 +94,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -94,49 +107,73 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support # CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_PREEMPT=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_CPU_FREQ is not set +CONFIG_CMDLINE="console=ttySMX0,57600n8 ip=bootp root=/dev/nfs" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y CONFIG_FPE_NWFPE_XP=y CONFIG_FPE_FASTFPE=y -# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -CONFIG_PREEMPT=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySMX0,57600n8 ip=bootp root=/dev/nfs" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -155,23 +192,33 @@ # # CONFIG_MTD_CFI is not set # CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set # CONFIG_MTD_RAM is not set CONFIG_MTD_ROM=y # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_MX1ADS=y # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -186,6 +233,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # # CONFIG_PNP is not set @@ -195,10 +247,28 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -206,6 +276,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -232,6 +314,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -251,8 +336,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -285,10 +368,10 @@ # CONFIG_NET_ETHERNET=y CONFIG_MII=y -# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -332,24 +415,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -360,20 +425,11 @@ # CONFIG_INPUT is not set # -# Userland interfaces -# - -# -# Input I/O drivers +# Hardware I/O ports # +# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set -# CONFIG_SERIO_I8042 is not set - -# -# Input Device Drivers -# # # Character devices @@ -395,7 +451,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -408,25 +463,30 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set CONFIG_RTC=m -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -437,6 +497,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # # CONFIG_EXT2_FS is not set @@ -444,10 +531,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -477,6 +569,7 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -494,6 +587,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -512,9 +610,9 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -525,6 +623,7 @@ # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -576,46 +675,31 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_INFO=y +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y # CONFIG_DEBUG_LL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -629,6 +713,8 @@ # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set @@ -636,16 +722,23 @@ # CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # -CONFIG_CRC16=y +CONFIG_CRC_CCITT=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig --- a/arch/arm/configs/neponset_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/neponset_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,122 +1,106 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11 +# Wed Mar 9 14:28:26 2005 # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_SWAP=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_NET=y +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP310 Implementation Options -# - -# -# IOP310 Chipset Features -# - -# -# Intel PXA250/210 Implementations -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # CONFIG_SA1100_ASSABET=y CONFIG_ASSABET_NEPONSET=y -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set # CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set -CONFIG_SA1100_USB=m -CONFIG_SA1100_USB_NETLINK=m -CONFIG_SA1100_USB_CHAR=m -CONFIG_SA1111=y -CONFIG_FORCE_MAX_ZONEORDER=9 +# CONFIG_SA1100_SSP is not set # # Processor Type @@ -124,57 +108,102 @@ CONFIG_CPU_32=y CONFIG_CPU_SA1100=y CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # # Processor Features # +CONFIG_SA1111=y +CONFIG_DMABOUNCE=y +CONFIG_FORCE_MAX_ZONEORDER=9 # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -CONFIG_ZBOOT_ROM=y -CONFIG_ZBOOT_ROM_TEXT=0x80000 -CONFIG_ZBOOT_ROM_BSS=0xc1000000 -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_24_API=y -CONFIG_CPU_FREQ_26_API=y -CONFIG_HOTPLUG=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_I82365 is not set # CONFIG_TCIC is not set CONFIG_PCMCIA_SA1100=y CONFIG_PCMCIA_SA1111=y # -# At least one math emulation must be selected +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x80000 +CONFIG_ZBOOT_ROM_BSS=0xc1000000 +CONFIG_ZBOOT_ROM=y +CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M" +CONFIG_CPU_FREQ=y +# CONFIG_CPU_FREQ_DEBUG is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_SA1110=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# CONFIG_PM=y -# CONFIG_PREEMPT is not set CONFIG_APM=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/mtdblock2 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -184,6 +213,9 @@ CONFIG_MTD_PARTITIONS=y CONFIG_MTD_CONCAT=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set +# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set @@ -194,6 +226,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -206,37 +239,49 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set # CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set CONFIG_MTD_SA1100=y # CONFIG_MTD_EDB7312 is not set -CONFIG_MTD_PCMCIA=y -# CONFIG_MTD_UCLINUX is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -244,7 +289,12 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set @@ -253,11 +303,94 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_DEBUG is not set + +# +# PCMCIA SCSI adapter support +# +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_SYM53C500 is not set # # Multi-device support (RAID and LVM) @@ -265,14 +398,30 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set @@ -280,56 +429,70 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set # CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +CONFIG_MII=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set CONFIG_NET_VENDOR_SMC=y # CONFIG_WD80x3 is not set # CONFIG_ULTRA is not set +CONFIG_SMC91X=y CONFIG_SMC9194=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set @@ -342,27 +505,20 @@ # # Ethernet (1000 Mbit) # -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +# CONFIG_NET_RADIO is not set # # PCMCIA network device support @@ -376,37 +532,20 @@ # CONFIG_PCMCIA_SMC91C92 is not set # CONFIG_PCMCIA_XIRC2PS is not set # CONFIG_PCMCIA_AXNET is not set -# CONFIG_NET_PCMCIA_RADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set # -# SCSI support -# -# CONFIG_SCSI is not set - -# -# I2O device support +# Wan interfaces # -# CONFIG_I2O is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -416,12 +555,14 @@ # # Userland interfaces # -# CONFIG_INPUT_MOUSEDEV is not set +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set CONFIG_INPUT_TSDEV=y CONFIG_INPUT_TSDEV_SCREEN_X=240 CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_TSLIBDEV=y # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set @@ -431,10 +572,11 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=m # CONFIG_SERIO_CT82C710 is not set CONFIG_SERIO_SA1111=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -442,6 +584,7 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_INPUT_MOUSE is not set @@ -466,7 +609,6 @@ # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -# CONFIG_SYNCLINK is not set # CONFIG_SYNCLINKMP is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set @@ -481,6 +623,7 @@ CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_CONSOLE is not set CONFIG_SERIAL_8250_CS=y +CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -491,65 +634,45 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=64 # -# I2C support +# IPMI # -CONFIG_I2C=y -CONFIG_I2C_ALGOBIT=y -# CONFIG_SCx200_ACB is not set -CONFIG_I2C_BIT_SA1100_GPIO=y -# CONFIG_I2C_ALGOPCF is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_PROC=y +# CONFIG_IPMI_HANDLER is not set # -# L3 serial bus support +# Watchdog Cards # -CONFIG_L3=y -CONFIG_L3_ALGOBIT=y -CONFIG_L3_BIT_SA1100_GPIO=y -CONFIG_BIT_SA1100_GPIO=y +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set # -# Mice +# Watchdog Device Drivers # -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SA1100_WATCHDOG=m # -# Watchdog Cards +# ISA-based Watchdog Cards # -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_WDT is not set -# CONFIG_WDTPCI is not set # CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_SA1100_WATCHDOG=m -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set # CONFIG_MIXCOMWD is not set -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_W83877F_WDT is not set -# CONFIG_MACHZ_WDT is not set +# CONFIG_WDT is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -CONFIG_SA1100_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -559,154 +682,110 @@ # CONFIG_RAW_DRIVER is not set # -# Multimedia devices +# I2C support # -# CONFIG_VIDEO_DEV is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y # -# File systems +# I2C Algorithms # -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -# CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set -# CONFIG_UFS_FS is not set -# CONFIG_XFS_FS is not set +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # -# Network File Systems +# I2C Hardware Bus support # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFSD is not set -CONFIG_SUNRPC=y -CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set -# CONFIG_CIFS is not set -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set -# CONFIG_AFS_FS is not set +# CONFIG_I2C_ELEKTOR is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set # -# Partition Types +# Misc devices # -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -# CONFIG_MSDOS_PARTITION is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set -CONFIG_NLS=y # -# Native Language Support +# Multimedia devices # -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ISO8859_1=m -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +# CONFIG_VIDEO_DEV is not set # -# Console drivers +# Digital Video Broadcasting Devices # -# CONFIG_VGA_CONSOLE is not set +# CONFIG_DVB is not set # -# Frame-buffer support +# Graphics support # CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set CONFIG_FB_SA1100=y # CONFIG_FB_VIRTUAL is not set -# CONFIG_FBCON_ADVANCED is not set -CONFIG_FBCON_CFB2=y -CONFIG_FBCON_CFB4=y -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -CONFIG_FBCON_FONTWIDTH8_ONLY=y -# CONFIG_FONT_SUN8x16 is not set -CONFIG_FBCON_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_PEARL_8x8 is not set -CONFIG_FONT_ACORN_8x8=y -# CONFIG_FONT_MINI_4x6 is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -714,48 +793,24 @@ CONFIG_SOUND=y # +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# # Open Sound System # CONFIG_SOUND_PRIME=y # CONFIG_SOUND_BT878 is not set # CONFIG_SOUND_FUSION is not set # CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set # CONFIG_SOUND_SONICVIBES is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_SA1100=y -CONFIG_SOUND_UDA1341=y -CONFIG_SOUND_ASSABET_UDA1341=y -CONFIG_SOUND_SA1111_UDA1341=y -# CONFIG_SOUND_SA1100SSP is not set # CONFIG_SOUND_OSS is not set # CONFIG_SOUND_TVMIXER is not set - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -CONFIG_MCP=y -CONFIG_MCP_SA1100=y -CONFIG_MCP_UCB1200=y -CONFIG_MCP_UCB1200_AUDIO=m -CONFIG_MCP_UCB1200_TS=y - -# -# Console Switches -# -# CONFIG_SWITCHES is not set +# CONFIG_SOUND_AD1980 is not set # # USB support @@ -767,17 +822,20 @@ # Miscellaneous USB options # CONFIG_USB_DEVICEFS=y -# CONFIG_USB_LONG_TIMEOUT is not set # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers # -# CONFIG_USB_EHCI_HCD is not set CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_UHCI_HCD_ALT is not set -# CONFIG_USB_SL811HS is not set +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -789,11 +847,21 @@ # CONFIG_USB_PRINTER is not set # -# SCSI support is needed for USB Storage +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information # +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_RW_DETECT is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # # CONFIG_USB_HID is not set @@ -804,14 +872,18 @@ CONFIG_USB_MOUSE=m # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set # # USB Imaging devices # # CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set +# CONFIG_USB_MICROTEK is not set # # USB Multimedia devices @@ -823,14 +895,14 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set -# CONFIG_USB_CDCETHER is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set +CONFIG_USB_MON=m # # USB port drivers @@ -844,37 +916,215 @@ # # USB Miscellaneous drivers # -# CONFIG_USB_TIGL is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # -# Bluetooth support +# USB ATM/DSL drivers # -# CONFIG_BT is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +# CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set # # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SLAB=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_PRINTK_TIME is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_DEBUG_SLAB=y # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y -# CONFIG_KALLSYMS is not set CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set # # Security options # -CONFIG_SECURITY_CAPABILITIES=y +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # # Cryptographic options @@ -882,8 +1132,14 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # -# CONFIG_CRC32 is not set +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/netwinder_defconfig b/arch/arm/configs/netwinder_defconfig --- a/arch/arm/configs/netwinder_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/netwinder_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,35 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 15:18:42 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -39,28 +54,27 @@ # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set CONFIG_ARCH_FOOTBRIDGE=y # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Footbridge Implementations @@ -70,24 +84,6 @@ # CONFIG_ARCH_EBSA285_ADDIN is not set # CONFIG_ARCH_EBSA285_HOST is not set CONFIG_ARCH_NETWINDER=y - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# - -# -# SA11x0 Implementations -# CONFIG_FOOTBRIDGE=y CONFIG_FOOTBRIDGE_HOST=y @@ -99,6 +95,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4=y CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WB=y @@ -107,59 +104,90 @@ # # -# General setup +# Bus support # -CONFIG_PCI=y CONFIG_ISA=y CONFIG_ISA_DMA=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_PCI=y CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG is not set # -# At least one math emulation must be selected +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +# CONFIG_LEDS_TIMER is not set +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=0x301" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=0x301" -CONFIG_LEDS=y -# CONFIG_LEDS_TIMER is not set -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set # # Parallel port support # CONFIG_PARPORT=y CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_CML1=y # CONFIG_PARPORT_SERIAL is not set # CONFIG_PARPORT_PC_FIFO is not set CONFIG_PARPORT_PC_SUPERIO=y # CONFIG_PARPORT_ARC is not set -# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_GSC is not set # CONFIG_PARPORT_1284 is not set # -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# # Plug and Play support # # CONFIG_PNP is not set @@ -174,11 +202,87 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_IDEPCI_SHARE_IRQ is not set +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_GENERIC is not set +# CONFIG_BLK_DEV_OPTI621 is not set +CONFIG_BLK_DEV_SL82C105=y +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -186,6 +290,20 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -208,19 +326,19 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -228,6 +346,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=y +# CONFIG_IP_NF_CT_ACCT is not set +# CONFIG_IP_NF_CONNTRACK_MARK is not set +# CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=y # CONFIG_IP_NF_IRC is not set # CONFIG_IP_NF_TFTP is not set @@ -252,21 +373,28 @@ # CONFIG_IP_NF_MATCH_STATE is not set # CONFIG_IP_NF_MATCH_CONNTRACK is not set # CONFIG_IP_NF_MATCH_OWNER is not set +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set +# CONFIG_IP_NF_MATCH_SCTP is not set +# CONFIG_IP_NF_MATCH_COMMENT is not set +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set # CONFIG_IP_NF_FILTER is not set -# CONFIG_IP_NF_NAT is not set -# CONFIG_IP_NF_MANGLE is not set # CONFIG_IP_NF_TARGET_LOG is not set # CONFIG_IP_NF_TARGET_ULOG is not set # CONFIG_IP_NF_TARGET_TCPMSS is not set +# CONFIG_IP_NF_NAT is not set +# CONFIG_IP_NF_MANGLE is not set +# CONFIG_IP_NF_RAW is not set # CONFIG_IP_NF_ARPTABLES is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -275,23 +403,23 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set @@ -299,16 +427,21 @@ # CONFIG_ETHERTAP is not set # +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y -# CONFIG_SMC91X is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -319,6 +452,7 @@ CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set CONFIG_TULIP_MMIO=y +# CONFIG_TULIP_NAPI is not set # CONFIG_DE4X5 is not set # CONFIG_WINBOND_840 is not set # CONFIG_DM9102 is not set @@ -333,6 +467,7 @@ # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_CS89x0 is not set # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set @@ -359,130 +494,42 @@ # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set -# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set -# CONFIG_HOSTAP is not set +# CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -# CONFIG_IDEDISK_STROKE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # -# IDE chipset support/bugfixes -# -CONFIG_BLK_DEV_IDEPCI=y -# CONFIG_IDEPCI_SHARE_IRQ is not set -# CONFIG_BLK_DEV_OFFBOARD is not set -# CONFIG_BLK_DEV_GENERIC is not set -# CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_SL82C105=y -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -# CONFIG_BLK_DEV_CMD64X is not set -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -# CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_BLK_DEV_SVWKS is not set -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# Wireless LAN (non-hamradio) # -# CONFIG_IEEE1394 is not set +# CONFIG_NET_RADIO is not set # -# I2O device support +# Wan interfaces # -# CONFIG_I2O is not set +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -498,44 +545,44 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_TSLIBDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_PS2_SYNAPTICS is not set CONFIG_MOUSE_SERIAL=y # CONFIG_MOUSE_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y -# CONFIG_INPUT_PCSPKR is not set CONFIG_INPUT_UINPUT=y # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -554,78 +601,47 @@ # # Non-8250 serial port support # -# CONFIG_SERIAL_DZ is not set # CONFIG_SERIAL_21285 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 CONFIG_PRINTER=y # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set # CONFIG_TIPAR is not set # -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Algorithms -# - -# -# I2C Hardware Bus support -# - -# -# I2C Hardware Sensors Chip support +# IPMI # -# CONFIG_I2C_SENSOR is not set +# CONFIG_IPMI_HANDLER is not set # -# L3 serial bus support +# Watchdog Cards # -# CONFIG_L3 is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set # -# Mice +# Watchdog Device Drivers # -CONFIG_BUSMOUSE=y -# CONFIG_QIC02_TAPE is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_21285_WATCHDOG is not set +CONFIG_977_WATCHDOG=y # -# IPMI +# ISA-based Watchdog Cards # -# CONFIG_IPMI_HANDLER is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_WDT is not set # -# Watchdog Cards +# PCI-based Watchdog Cards # -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_WDT is not set +# CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -# CONFIG_21285_WATCHDOG is not set -CONFIG_977_WATCHDOG=y -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_SCx200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_W83877F_WDT is not set -# CONFIG_MACHZ_WDT is not set -# CONFIG_SC520_WDT is not set -# CONFIG_AMD7XX_TCO is not set -# CONFIG_ALIM7101_WDT is not set -# CONFIG_ALIM1535_WDT is not set -# CONFIG_SC1200_WDT is not set -# CONFIG_WAFER_WDT is not set -# CONFIG_CPU5_WDT is not set CONFIG_DS1620=y CONFIG_NWBUTTON=y CONFIG_NWBUTTON_REBOOT=y @@ -639,12 +655,24 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -655,6 +683,137 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +CONFIG_FB_CYBER2000=y +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON_OLD is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_VIA82CXXX is not set +CONFIG_SOUND_OSS=y +CONFIG_SOUND_TRACEINIT=y +CONFIG_SOUND_DMAP=y +# CONFIG_SOUND_AD1816 is not set +# CONFIG_SOUND_AD1889 is not set +# CONFIG_SOUND_SGALAXY is not set +# CONFIG_SOUND_ADLIB is not set +# CONFIG_SOUND_ACI_MIXER is not set +# CONFIG_SOUND_CS4232 is not set +# CONFIG_SOUND_SSCAPE is not set +# CONFIG_SOUND_GUS is not set +# CONFIG_SOUND_VMIDI is not set +# CONFIG_SOUND_TRIX is not set +# CONFIG_SOUND_MSS is not set +# CONFIG_SOUND_MPU401 is not set +# CONFIG_SOUND_NM256 is not set +# CONFIG_SOUND_MAD16 is not set +# CONFIG_SOUND_PAS is not set +# CONFIG_SOUND_PSS is not set +# CONFIG_SOUND_SB is not set +# CONFIG_SOUND_AWE32_SYNTH is not set +# CONFIG_SOUND_MAUI is not set +CONFIG_SOUND_YM3812=y +# CONFIG_SOUND_OPL3SA1 is not set +# CONFIG_SOUND_OPL3SA2 is not set +# CONFIG_SOUND_YMFPCI is not set +# CONFIG_SOUND_UART6850 is not set +# CONFIG_SOUND_AEDSP16 is not set +CONFIG_SOUND_WAVEARTIST=y +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_AD1980 is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # MMC/SD Card support # # CONFIG_MMC is not set @@ -668,10 +827,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set @@ -686,17 +850,19 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -706,6 +872,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -733,12 +900,13 @@ CONFIG_EXPORTFS=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=y # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -756,17 +924,15 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_EFI_PARTITION is not set -CONFIG_SMB_NLS=y -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set @@ -791,6 +957,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y # CONFIG_NLS_ISO8859_3 is not set @@ -807,157 +974,73 @@ CONFIG_NLS_UTF8=y # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CYBER2000=y -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set - -# -# Logo configuration -# -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=y -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_VIA82CXXX is not set -CONFIG_SOUND_OSS=y -CONFIG_SOUND_TRACEINIT=y -CONFIG_SOUND_DMAP=y -# CONFIG_SOUND_AD1816 is not set -# CONFIG_SOUND_AD1889 is not set -# CONFIG_SOUND_SGALAXY is not set -# CONFIG_SOUND_ADLIB is not set -# CONFIG_SOUND_ACI_MIXER is not set -# CONFIG_SOUND_CS4232 is not set -# CONFIG_SOUND_SSCAPE is not set -# CONFIG_SOUND_GUS is not set -# CONFIG_SOUND_VMIDI is not set -# CONFIG_SOUND_TRIX is not set -# CONFIG_SOUND_MSS is not set -# CONFIG_SOUND_MPU401 is not set -# CONFIG_SOUND_NM256 is not set -# CONFIG_SOUND_MAD16 is not set -# CONFIG_SOUND_PAS is not set -# CONFIG_SOUND_PSS is not set -# CONFIG_SOUND_SB is not set -# CONFIG_SOUND_AWE32_SYNTH is not set -# CONFIG_SOUND_MAUI is not set -CONFIG_SOUND_YM3812=y -# CONFIG_SOUND_OPL3SA1 is not set -# CONFIG_SOUND_OPL3SA2 is not set -# CONFIG_SOUND_YMFPCI is not set -# CONFIG_SOUND_UART6850 is not set -# CONFIG_SOUND_AEDSP16 is not set -CONFIG_SOUND_WAVEARTIST=y -# CONFIG_SOUND_ALI5455 is not set -# CONFIG_SOUND_FORTE is not set -# CONFIG_SOUND_RME96XX is not set -# CONFIG_SOUND_AD1980 is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches +# Profiling support # -# CONFIG_SWITCHES is not set - -# -# USB support -# -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set +# CONFIG_PROFILING is not set # # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_ERRORS is not set # CONFIG_DEBUG_LL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # -# CONFIG_CRYPTO is not set +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# # # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig --- a/arch/arm/configs/omap_h2_1610_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/omap_h2_1610_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc2 -# Tue Feb 1 14:01:46 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 17:52:41 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -28,7 +28,6 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set @@ -36,6 +35,7 @@ CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -45,6 +45,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -110,6 +111,8 @@ CONFIG_OMAP_MUX=y # CONFIG_OMAP_MUX_DEBUG is not set CONFIG_OMAP_MUX_WARNINGS=y +CONFIG_OMAP_MPU_TIMER=y +# CONFIG_OMAP_32K_TIMER is not set CONFIG_OMAP_LL_DEBUG_UART1=y # CONFIG_OMAP_LL_DEBUG_UART2 is not set # CONFIG_OMAP_LL_DEBUG_UART3 is not set @@ -140,11 +143,8 @@ # CONFIG_CPU_CACHE_ROUND_ROBIN is not set # -# General setup +# Bus support # -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_XIP_KERNEL is not set # # PCCARD (PCMCIA/CardBus) support @@ -152,39 +152,57 @@ # CONFIG_PCCARD is not set # -# PC-card bridges +# Kernel Features # +CONFIG_PREEMPT=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y # -# At least one math emulation must be selected +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set # CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -CONFIG_DEBUG_DRIVER=y CONFIG_PM=y -CONFIG_PREEMPT=y # CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +CONFIG_DEBUG_DRIVER=y # # Memory Technology Devices (MTD) @@ -192,8 +210,8 @@ CONFIG_MTD=y CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=3 -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set @@ -263,6 +281,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -291,11 +314,58 @@ CONFIG_ATA_OVER_ETH=m # +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +# CONFIG_BLK_DEV_SD is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DEBUG is not set + +# # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -410,53 +480,6 @@ # CONFIG_NETCONSOLE is not set # -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -# CONFIG_BLK_DEV_SD is not set -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -479,16 +502,6 @@ CONFIG_INPUT_EVBUG=y # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -499,6 +512,15 @@ CONFIG_INPUT_UINPUT=y # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -549,6 +571,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -580,7 +607,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set @@ -613,6 +642,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -623,6 +656,101 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_SOFT_CURSOR is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_TVMIXER is not set +# CONFIG_SOUND_AD1980 is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_SA1100 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_OMAP=y +CONFIG_USB_OMAP=y +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=y +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -631,6 +759,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y @@ -702,7 +834,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y @@ -769,113 +900,17 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=y -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_OSS is not set -# CONFIG_SOUND_TVMIXER is not set -# CONFIG_SOUND_AD1980 is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_SA1100 is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -CONFIG_USB_GADGET_OMAP=y -CONFIG_USB_OMAP=y -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -CONFIG_USB_ETH_RNDIS=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y @@ -905,6 +940,7 @@ # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set diff -Nru a/arch/arm/configs/omnimeter_defconfig b/arch/arm/configs/omnimeter_defconfig --- a/arch/arm/configs/omnimeter_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/omnimeter_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,113 +1,193 @@ # -# Automatically generated by make menuconfig: don't edit +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 21:31:45 2005 # CONFIG_ARM=y -# CONFIG_SBUS is not set +CONFIG_MMU=y CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -# CONFIG_OBSOLETE is not set +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y -# CONFIG_ARCH_CLPS711X is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Footbridge Implementations -# +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_BRUTUS is not set -CONFIG_SA1100_OMNIMETER=y # CONFIG_SA1100_CERF is not set -# CONFIG_SA1100_BITSY is not set +# CONFIG_SA1100_COLLIE is not set +# CONFIG_SA1100_H3100 is not set +# CONFIG_SA1100_H3600 is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_BADGE4 is not set +# CONFIG_SA1100_JORNADA720 is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_SHERMAN is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_PANGOLIN is not set -# CONFIG_SA1100_USB is not set -# CONFIG_SA1100_FREQUENCY_SCALE is not set -# CONFIG_SA1100_VOLTAGE_SCALE is not set - -# -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_SHANNON is not set +# CONFIG_SA1100_SIMPAD is not set +# CONFIG_SA1100_SSP is not set + +# +# Processor Type +# CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set -CONFIG_CPU_32v4=y CONFIG_CPU_SA1100=y -CONFIG_DISCONTIGMEM=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # -# General setup +# Processor Features +# + +# +# Bus support # -# CONFIG_ANGELBOOT is not set -# CONFIG_PCI is not set CONFIG_ISA=y -# CONFIG_ISA_DMA is not set -CONFIG_HOTPLUG=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y + +# +# PC-card bridges +# CONFIG_I82365=y -# CONFIG_PCMCIA_CLPS6700 is not set -CONFIG_SA1100_PCMCIA=y -# CONFIG_H3600_SLEEVE is not set -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -CONFIG_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y +# CONFIG_TCIC is not set +CONFIG_PCMCIA_SA1100=y +CONFIG_PCCARD_NONSTATIC=y + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="keepinitrd mem=16M root=/dev/ram ramdisk=8192 initrd=0xd0000000,4M" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="keepinitrd mem=16M root=/dev/ram ramdisk=8192 initrd=0xd0000000,4M" -# CONFIG_LEDS is not set -# CONFIG_ALIGNMENT_TRAP is not set # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -115,38 +195,101 @@ # CONFIG_MTD is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set -# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_BLK_DEV_FLASH is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECS is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y # # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y -CONFIG_NETLINK=y -CONFIG_RTNETLINK=y # CONFIG_NETLINK_DEV is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set @@ -155,62 +298,83 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set # -# IP: Netfilter Configuration +# IP: Netfilter Configuration # # CONFIG_IP_NF_CONNTRACK is not set +# CONFIG_IP_NF_CONNTRACK_MARK is not set # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set -# CONFIG_NET_SB1000 is not set -# CONFIG_NET_SA1100_USB_HOST is not set -# CONFIG_NET_SA1100_USB_CLIENT is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -222,256 +386,345 @@ # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +CONFIG_NET_RADIO=y # -# PCMCIA network device support +# Obsolete Wireless cards support (pre-802.11) # -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=y -# CONFIG_PCMCIA_3C574 is not set -# CONFIG_PCMCIA_FMVJ18X is not set -CONFIG_PCMCIA_PCNET=y -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_ARCNET_COM20020_CS is not set -# CONFIG_PCMCIA_IBMTR is not set -CONFIG_NET_PCMCIA_RADIO=y -# CONFIG_PCMCIA_RAYCS is not set -# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_STRIP is not set +# CONFIG_ARLAN is not set +# CONFIG_WAVELAN is not set CONFIG_PCMCIA_WAVELAN=y -CONFIG_AIRONET4500_CS=y -CONFIG_PCMCIA_WVLAN=y -CONFIG_PCMCIA_NETCARD=y +# CONFIG_PCMCIA_NETWAVE is not set # -# Amateur Radio support +# Wireless 802.11 Frequency Hopping cards support # -# CONFIG_HAMRADIO is not set +# CONFIG_PCMCIA_RAYCS is not set # -# IrDA (infrared) support +# Wireless 802.11b ISA/PCI cards support # -# CONFIG_IRDA is not set +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set # -# ATA/IDE/MFM/RLL support +# Wireless 802.11b Pcmcia/Cardbus cards support # -CONFIG_IDE=y +CONFIG_AIRO_CS=y +CONFIG_PCMCIA_WL3501=y +CONFIG_NET_WIRELESS=y # -# IDE, ATA and ATAPI Block devices +# PCMCIA network device support # -CONFIG_BLK_DEV_IDE=y -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECS=y -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set +CONFIG_NET_PCMCIA=y +CONFIG_PCMCIA_3C589=y +# CONFIG_PCMCIA_3C574 is not set +# CONFIG_PCMCIA_FMVJ18X is not set +CONFIG_PCMCIA_PCNET=y +# CONFIG_PCMCIA_NMCLAN is not set +# CONFIG_PCMCIA_SMC91C92 is not set +# CONFIG_PCMCIA_XIRC2PS is not set +# CONFIG_PCMCIA_AXNET is not set # -# SCSI support +# Wan interfaces # -# CONFIG_SCSI is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# I2O device support +# ISDN subsystem # -# CONFIG_I2O is not set -# CONFIG_I2O_BLOCK is not set -# CONFIG_I2O_LAN is not set -# CONFIG_I2O_SCSI is not set -# CONFIG_I2O_PROC is not set +# CONFIG_ISDN is not set # -# ISDN subsystem +# Input device support # -# CONFIG_ISDN is not set +CONFIG_INPUT=y # -# Input core support +# Userland interfaces # -# CONFIG_INPUT is not set +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -# CONFIG_TOUCHSCREEN_UCB1200 is not set -# CONFIG_TOUCHSCREEN_BITSY is not set -# CONFIG_TOUCHSCREEN_BITSY_KEYBOARD is not set -# CONFIG_H3600_SLEEVE is not set -CONFIG_SERIAL=y -# CONFIG_SERIAL_CONSOLE is not set -# CONFIG_SERIAL_EXTENDED is not set +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=9600 -# CONFIG_TOUCHSCREEN_UCB1200 is not set -# CONFIG_TOUCHSCREEN_BITSY is not set -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=32 # -# I2C support +# Serial drivers # -# CONFIG_I2C is not set +# CONFIG_SERIAL_8250 is not set # -# Mice +# Non-8250 serial port support # -# CONFIG_BUSMOUSE is not set -CONFIG_MOUSE=m -# CONFIG_PSMOUSE is not set -# CONFIG_82C710_MOUSE is not set -# CONFIG_PC110_PAD is not set +CONFIG_SERIAL_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # -# Joysticks +# IPMI # -# CONFIG_JOYSTICK is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_SA1100_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set -CONFIG_PCMCIA_SERIAL=y # -# PCMCIA character device support +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_SA1100=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support # -# CONFIG_PCMCIA_SERIAL_CS is not set +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_VFAT_FS is not set +CONFIG_FAT_DEFAULT_CODEPAGE=437 +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_RAMFS is not set -# CONFIG_ISO9660_FS is not set -# CONFIG_JOLIET is not set -# CONFIG_MINIX_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # -# CONFIG_CODA_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y CONFIG_LOCKD=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_MOUNT_SUBDIR is not set -# CONFIG_NCPFS_NDS_DOMAINS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # CONFIG_NLS_CODEPAGE_737 is not set @@ -488,11 +741,15 @@ # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -500,71 +757,47 @@ # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # -# Console drivers +# Profiling support # -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FB=y +# CONFIG_PROFILING is not set # -# Frame-buffer support +# Kernel hacking # -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FB_ACORN is not set -# CONFIG_FB_CLPS711X is not set -# CONFIG_FB_CYBER2000 is not set -CONFIG_FB_SA1100=y -# CONFIG_FB_VIRTUAL is not set -CONFIG_FBCON_ADVANCED=y -# CONFIG_FBCON_MFB is not set -# CONFIG_FBCON_CFB2 is not set -CONFIG_FBCON_CFB4=y -# CONFIG_FBCON_CFB8 is not set -# CONFIG_FBCON_CFB16 is not set -# CONFIG_FBCON_CFB24 is not set -# CONFIG_FBCON_CFB32 is not set -# CONFIG_FBCON_AFB is not set -# CONFIG_FBCON_ILBM is not set -# CONFIG_FBCON_IPLAN2P2 is not set -# CONFIG_FBCON_IPLAN2P4 is not set -# CONFIG_FBCON_IPLAN2P8 is not set -# CONFIG_FBCON_MAC is not set -# CONFIG_FBCON_VGA_PLANES is not set -# CONFIG_FBCON_VGA is not set -# CONFIG_FBCON_HGA is not set -CONFIG_FBCON_FONTWIDTH8_ONLY=y -CONFIG_FBCON_FONTS=y -CONFIG_FONT_8x8=y -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set # -# Sound +# Security options # -# CONFIG_SOUND is not set +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# USB support +# Cryptographic options # -# CONFIG_USB is not set +# CONFIG_CRYPTO is not set # -# Kernel hacking +# Hardware crypto devices # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_MAGIC_SYSRQ is not set -CONFIG_DEBUG_LL=y + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/pleb_defconfig b/arch/arm/configs/pleb_defconfig --- a/arch/arm/configs/pleb_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/pleb_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Wed Nov 24 15:12:32 2004 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:03:02 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -26,7 +27,6 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set # CONFIG_KOBJECT_UEVENT is not set # CONFIG_IKCONFIG is not set @@ -34,6 +34,7 @@ CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -43,6 +44,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 CONFIG_TINY_SHMEM=y +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -96,7 +98,6 @@ # CONFIG_SA1100_SHANNON is not set # CONFIG_SA1100_SIMPAD is not set # CONFIG_SA1100_SSP is not set -# CONFIG_SA1100_USB is not set # # Processor Type @@ -115,17 +116,39 @@ # # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttySA0,9600 mem=16M@0xc0000000 mem=16M@0xc8000000 root=/dev/ram initrd=0xc0400000,4M" # CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set -# CONFIG_CPU_FREQ_PROC_INTF is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y @@ -135,41 +158,50 @@ CONFIG_CPU_FREQ_SA1100=y # -# At least one math emulation must be selected +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0,9600 mem=16M@0xc0000000 mem=16M@0xc8000000 root=/dev/ram initrd=0xc0400000,4M" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set CONFIG_MTD_CMDLINE_PARTS=y @@ -208,6 +240,7 @@ # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -225,6 +258,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -239,6 +273,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # # CONFIG_PNP is not set @@ -248,10 +287,12 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" @@ -264,6 +305,17 @@ # CONFIG_IOSCHED_AS is not set # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -271,6 +323,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -388,28 +452,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -420,19 +462,11 @@ # CONFIG_INPUT is not set # -# Userland interfaces -# - -# -# Input I/O drivers +# Hardware I/O ports # +# CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set - -# -# Input Device Drivers -# # # Character devices @@ -477,11 +511,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -492,6 +535,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -502,6 +572,10 @@ # CONFIG_JBD_DEBUG is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -567,7 +641,6 @@ # CONFIG_NFSD is not set CONFIG_LOCKD=m CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=m # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -633,47 +706,20 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_WAITQ is not set @@ -690,6 +736,10 @@ # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/pxa255-idp_defconfig b/arch/arm/configs/pxa255-idp_defconfig --- a/arch/arm/configs/pxa255-idp_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/pxa255-idp_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc3 -# Fri Feb 11 16:53:43 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:20:17 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -27,7 +27,6 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set @@ -35,6 +34,7 @@ CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -44,6 +44,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -107,11 +108,8 @@ CONFIG_XSCALE_PMU=y # -# General setup +# Bus support # -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_XIP_KERNEL is not set # # PCCARD (PCMCIA/CardBus) support @@ -119,18 +117,49 @@ # CONFIG_PCCARD is not set # -# PC-card bridges +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/nfs ip=dhcp console=ttyS0,115200 mem=64M" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation # # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +# CONFIG_PM is not set + +# +# Device Drivers +# # # Generic Driver Options @@ -139,27 +168,14 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/nfs ip=dhcp console=ttyS0,115200 mem=64M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y - -# -# Parallel port support -# -# CONFIG_PARPORT is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set @@ -234,6 +250,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -259,11 +280,54 @@ # CONFIG_ATA_OVER_ETH is not set # +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_IDE_GENERIC is not set +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -367,49 +431,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_IDE_GENERIC is not set -# CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -432,17 +453,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -457,6 +467,16 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -501,11 +521,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -516,6 +545,67 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_PXA=y +# CONFIG_FB_PXA_PARAMETERS is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -663,72 +753,16 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -CONFIG_FB_PXA=y -# CONFIG_FB_PXA_PARAMETERS is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y diff -Nru a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig --- a/arch/arm/configs/rpc_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/rpc_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,124 +1,178 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11 +# Wed Mar 9 14:41:48 2005 # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_SWAP=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y +CONFIG_FIQ=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # -CONFIG_NET=y +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set CONFIG_ARCH_RPC=y # CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +CONFIG_ARCH_ACORN=y # -# Archimedes/A5000 Implementations +# Processor Type # +CONFIG_CPU_32=y +CONFIG_CPU_ARM610=y +CONFIG_CPU_ARM710=y +CONFIG_CPU_SA110=y +CONFIG_CPU_32v3=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V3=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V3=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V3=y +CONFIG_CPU_TLB_V4WB=y # -# Archimedes/A5000 Implementations (select only ONE) +# Processor Features # +CONFIG_TIMER_ACORN=y # -# CLPS711X/EP721X Implementations +# Bus support # # -# Epxa10db +# PCCARD (PCMCIA/CardBus) support # +# CONFIG_PCCARD is not set # -# Footbridge Implementations +# PC-card bridges # # -# IOP310 Implementation Options +# Kernel Features # +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y # -# IOP310 Chipset Features +# Boot options # +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set # -# Intel PXA250/210 Implementations +# Floating point emulation # # -# SA11x0 Implementations +# At least one emulation must be selected # -CONFIG_ARCH_ACORN=y +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # -# Processor Type +# Userspace binary formats # -CONFIG_CPU_32=y -CONFIG_CPU_ARM610=y -CONFIG_CPU_ARM710=y -CONFIG_CPU_SA110=y -CONFIG_CPU_32v3=y +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Processor Features +# Power management options +# +# CONFIG_PM is not set + +# +# Device Drivers # # -# General setup +# Generic Driver Options # -CONFIG_FIQ=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_HOTPLUG is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # -# At least one math emulation must be selected +# Memory Technology Devices (MTD) # -CONFIG_FPE_NWFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="" -CONFIG_ALIGNMENT_TRAP=y +# CONFIG_MTD is not set # # Parallel port support @@ -126,7 +180,6 @@ CONFIG_PARPORT=y CONFIG_PARPORT_PC=y CONFIG_PARPORT_PC_CML1=y -# CONFIG_PARPORT_SERIAL is not set CONFIG_PARPORT_PC_FIFO=y # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_ARC is not set @@ -134,163 +187,52 @@ # CONFIG_PARPORT_1284 is not set # -# Memory Technology Devices (MTD) +# Plug and Play support # -# CONFIG_MTD is not set - -# -# Plug and Play configuration -# -# CONFIG_PNP is not set # # Block devices # CONFIG_BLK_DEV_FD=y # CONFIG_PARIDE is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set # -# Multi-device support (RAID and LVM) +# IO Schedulers # -# CONFIG_MD is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # Acorn-specific block devices # # -# Networking options -# -# CONFIG_PACKET is not set -CONFIG_NETLINK_DEV=y -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_IPV6 is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IPV6_SCTP__=y -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_ARM_ETHER1=y -CONFIG_ARM_ETHER3=y -CONFIG_ARM_ETHERH=y -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_ASYNC is not set -# CONFIG_PPP_SYNC_TTY is not set -# CONFIG_PPP_DEFLATE is not set -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPPOE=m -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# # ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y -# CONFIG_IDEDISK_STROKE is not set CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set @@ -298,18 +240,22 @@ # # IDE chipset support/bugfixes # -CONFIG_BLK_DEV_IDEDMA=y +CONFIG_IDE_GENERIC=y +CONFIG_IDE_ARM=y CONFIG_BLK_DEV_IDE_ICSIDE=y CONFIG_BLK_DEV_IDEDMA_ICS=y CONFIG_IDEDMA_ICS_AUTO=y CONFIG_BLK_DEV_IDE_RAPIDE=y -CONFIG_IDEDMA_AUTO=y +CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) @@ -319,43 +265,30 @@ # CONFIG_CHR_DEV_OSST is not set CONFIG_BLK_DEV_SR=y CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_SR_EXTRA_DEVS=2 CONFIG_CHR_DEV_SG=y # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_REPORT_LUNS is not set CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_LOGGING=y # +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# # SCSI low-level drivers # -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_DMA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_SATA is not set CONFIG_SCSI_PPA=m CONFIG_SCSI_IMM=m # CONFIG_SCSI_IZIP_EPP16 is not set # CONFIG_SCSI_IZIP_SLOW_CTR is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set CONFIG_SCSI_ACORNSCSI_3=m CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE=y @@ -372,14 +305,145 @@ CONFIG_SCSI_OAK1=m # +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# # I2O device support # -# CONFIG_I2O is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set +CONFIG_ARM_ETHER1=y +CONFIG_ARM_ETHER3=y +CONFIG_ARM_ETHERH=y +# CONFIG_SMC91X is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PLIP is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +# CONFIG_PPP_ASYNC is not set +# CONFIG_PPP_SYNC_TTY is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_BSDCOMP is not set +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -395,7 +459,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_TSLIBDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set @@ -405,11 +468,12 @@ # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set CONFIG_SERIO_RPCKBD=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -417,12 +481,14 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y # CONFIG_MOUSE_PS2 is not set # CONFIG_MOUSE_SERIAL is not set CONFIG_MOUSE_RISCPC=y +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set @@ -440,6 +506,7 @@ # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=16 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -449,32 +516,17 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=64 CONFIG_PRINTER=m # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set # CONFIG_TIPAR is not set # -# I2C support +# IPMI # -CONFIG_I2C=y -CONFIG_I2C_ALGOBIT=y -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_ALGOPCF is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_PROC is not set - -# -# L3 serial bus support -# -# CONFIG_L3 is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set # # Watchdog Cards @@ -482,84 +534,292 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=y +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_ACORN=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +CONFIG_FONT_ACORN_8x8=y +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=m +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +CONFIG_SOUND_OSS=m +# CONFIG_SOUND_TRACEINIT is not set +# CONFIG_SOUND_DMAP is not set +# CONFIG_SOUND_AD1816 is not set +# CONFIG_SOUND_AD1889 is not set +# CONFIG_SOUND_SGALAXY is not set +# CONFIG_SOUND_ADLIB is not set +# CONFIG_SOUND_ACI_MIXER is not set +# CONFIG_SOUND_CS4232 is not set +# CONFIG_SOUND_SSCAPE is not set +# CONFIG_SOUND_GUS is not set +# CONFIG_SOUND_VMIDI is not set +# CONFIG_SOUND_TRIX is not set +# CONFIG_SOUND_MSS is not set +# CONFIG_SOUND_MPU401 is not set +# CONFIG_SOUND_NM256 is not set +# CONFIG_SOUND_MAD16 is not set +# CONFIG_SOUND_PAS is not set +# CONFIG_SOUND_PSS is not set +# CONFIG_SOUND_SB is not set +# CONFIG_SOUND_AWE32_SYNTH is not set +# CONFIG_SOUND_WAVEFRONT is not set +# CONFIG_SOUND_MAUI is not set +# CONFIG_SOUND_YM3812 is not set +# CONFIG_SOUND_OPL3SA1 is not set +# CONFIG_SOUND_OPL3SA2 is not set +# CONFIG_SOUND_UART6850 is not set +# CONFIG_SOUND_AEDSP16 is not set +CONFIG_SOUND_VIDC=m +# CONFIG_SOUND_TVMIXER is not set +# CONFIG_SOUND_AD1980 is not set + +# +# USB support +# +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=m -# CONFIG_REISERFS_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# CONFIG_ADFS_FS=y # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_FAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -# CONFIG_JFS_FS is not set -# CONFIG_MINIX_FS is not set # CONFIG_VXFS_FS is not set -# CONFIG_NTFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_XFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -CONFIG_SUNRPC=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set -# CONFIG_CIFS is not set +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set -CONFIG_FS_MBCACHE=y # # Partition Types @@ -586,11 +846,11 @@ # CONFIG_ULTRIX_PARTITION is not set CONFIG_SUN_PARTITION=y # CONFIG_EFI_PARTITION is not set -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_CODEPAGE_737=m @@ -615,6 +875,7 @@ CONFIG_NLS_ISO8859_8=m # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_ISO8859_3=m @@ -631,139 +892,35 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers -# - -# -# Frame-buffer support -# -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FB_ACORN=y -# CONFIG_FB_VIRTUAL is not set -CONFIG_FBCON_ADVANCED=y -CONFIG_FBCON_MFB=y -CONFIG_FBCON_CFB2=y -CONFIG_FBCON_CFB4=y -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -CONFIG_FBCON_CFB24=y -CONFIG_FBCON_CFB32=y -# CONFIG_FBCON_ACCEL is not set -# CONFIG_FBCON_AFB is not set -# CONFIG_FBCON_ILBM is not set -# CONFIG_FBCON_IPLAN2P2 is not set -# CONFIG_FBCON_IPLAN2P4 is not set -# CONFIG_FBCON_IPLAN2P8 is not set -# CONFIG_FBCON_VGA_PLANES is not set -# CONFIG_FBCON_HGA is not set -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -CONFIG_FBCON_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_PEARL_8x8 is not set -CONFIG_FONT_ACORN_8x8=y -# CONFIG_FONT_MINI_4x6 is not set - -# -# Sound +# Profiling support # -CONFIG_SOUND=m - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_OSS=m -# CONFIG_SOUND_TRACEINIT is not set -# CONFIG_SOUND_DMAP is not set -# CONFIG_SOUND_AD1816 is not set -# CONFIG_SOUND_SGALAXY is not set -# CONFIG_SOUND_ADLIB is not set -# CONFIG_SOUND_ACI_MIXER is not set -# CONFIG_SOUND_CS4232 is not set -# CONFIG_SOUND_SSCAPE is not set -# CONFIG_SOUND_GUS is not set -# CONFIG_SOUND_VMIDI is not set -# CONFIG_SOUND_TRIX is not set -# CONFIG_SOUND_MSS is not set -# CONFIG_SOUND_MPU401 is not set -# CONFIG_SOUND_NM256 is not set -# CONFIG_SOUND_MAD16 is not set -# CONFIG_SOUND_PAS is not set -# CONFIG_SOUND_PSS is not set -# CONFIG_SOUND_SB is not set -# CONFIG_SOUND_AWE32_SYNTH is not set -# CONFIG_SOUND_WAVEFRONT is not set -# CONFIG_SOUND_MAUI is not set -# CONFIG_SOUND_YM3812 is not set -# CONFIG_SOUND_OPL3SA1 is not set -# CONFIG_SOUND_OPL3SA2 is not set -# CONFIG_SOUND_UART6850 is not set -# CONFIG_SOUND_AEDSP16 is not set -CONFIG_SOUND_VIDC=m -# CONFIG_SOUND_TVMIXER is not set - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches -# -# CONFIG_SWITCHES is not set - -# -# USB support -# - -# -# Bluetooth support -# -# CONFIG_BT is not set +# CONFIG_PROFILING is not set # # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +# CONFIG_PRINTK_TIME is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_DEBUG_ERRORS=y -# CONFIG_KALLSYMS is not set CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set # # Security options # -CONFIG_SECURITY_CAPABILITIES=y +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # # Cryptographic options @@ -771,6 +928,12 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # -# CONFIG_CRC32 is not set +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig --- a/arch/arm/configs/s3c2410_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/s3c2410_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc1-bk5 -# Tue Jan 18 11:36:49 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 17:47:45 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -28,7 +28,6 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=16 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set @@ -36,6 +35,7 @@ CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -45,6 +45,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -97,6 +98,11 @@ CONFIG_CPU_S3C2440=y # +# S3C2410 Boot +# +# CONFIG_S3C2410_BOOT_WATCHDOG is not set + +# # S3C2410 Setup # CONFIG_S3C2410_DMA=y @@ -126,11 +132,8 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support # -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_XIP_KERNEL is not set # # PCCARD (PCMCIA/CardBus) support @@ -138,49 +141,63 @@ # CONFIG_PCCARD is not set # -# PC-card bridges +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation # # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set CONFIG_APM=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -CONFIG_PARPORT=y -# CONFIG_PARPORT_PC is not set -# CONFIG_PARPORT_ARC is not set -CONFIG_PARPORT_OTHER=y -CONFIG_PARPORT_1284=y + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y CONFIG_MTD_REDBOOT_PARTS=y CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y @@ -265,6 +282,15 @@ # CONFIG_MTD_NAND_NANDSIM is not set # +# Parallel port support +# +CONFIG_PARPORT=y +# CONFIG_PARPORT_PC is not set +# CONFIG_PARPORT_ARC is not set +# CONFIG_PARPORT_GSC is not set +CONFIG_PARPORT_1284=y + +# # Plug and Play support # @@ -294,11 +320,56 @@ CONFIG_ATA_OVER_ETH=m # +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_IDETAPE=m +CONFIG_BLK_DEV_IDEFLOPPY=m +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDE_BAST=y +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -403,51 +474,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=m -CONFIG_BLK_DEV_IDEFLOPPY=m -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDE_BAST=y -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -470,18 +496,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -499,6 +513,17 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -509,7 +534,6 @@ # CONFIG_ROCKETPORT is not set # CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set -# CONFIG_DIGI is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set @@ -579,6 +603,11 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -612,7 +641,9 @@ # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set CONFIG_SENSORS_LM75=m @@ -644,6 +675,10 @@ # CONFIG_I2C_DEBUG_CHIP is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -654,6 +689,53 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_SOFT_CURSOR is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -667,6 +749,10 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y @@ -741,7 +827,6 @@ # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -821,64 +906,16 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=16 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y diff -Nru a/arch/arm/configs/shannon_defconfig b/arch/arm/configs/shannon_defconfig --- a/arch/arm/configs/shannon_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/configs/shannon_defconfig 2005-03-30 16:58:47 -08:00 @@ -1,33 +1,63 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 23:26:46 2005 # CONFIG_ARM=y -# CONFIG_EISA is not set -# CONFIG_SBUS is not set -# CONFIG_MCA is not set +CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_GENERIC_BUST_SPINLOCK is not set -# CONFIG_GENERIC_ISA_DMA is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y -CONFIG_OBSOLETE=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set # # System Type # -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -35,133 +65,139 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set - -# -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# - -# -# Footbridge Implementations -# +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_COLLIE is not set +# CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set +# CONFIG_SA1100_H3800 is not set +# CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set +# CONFIG_SA1100_HACKKIT is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set CONFIG_SA1100_SHANNON=y -# CONFIG_SA1100_SHERMAN is not set # CONFIG_SA1100_SIMPAD is not set -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_SSP is not set # -# CLPS711X/EP721X Implementations -# -# CONFIG_ARCH_EP7211 is not set -# CONFIG_ARCH_EP7212 is not set -# CONFIG_ARCH_ACORN is not set -# CONFIG_FOOTBRIDGE is not set -# CONFIG_FOOTBRIDGE_HOST is not set -# CONFIG_FOOTBRIDGE_ADDIN is not set +# Processor Type +# CONFIG_CPU_32=y -# CONFIG_CPU_26 is not set +CONFIG_CPU_SA1100=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WB=y +CONFIG_CPU_MINICACHE=y # -# Processor Type +# Processor Features # -# CONFIG_CPU_32v3 is not set -CONFIG_CPU_32v4=y -# CONFIG_CPU_ARM610 is not set -# CONFIG_CPU_ARM710 is not set -# CONFIG_CPU_ARM720T is not set -# CONFIG_CPU_ARM920T is not set -# CONFIG_CPU_ARM922T is not set -# CONFIG_CPU_ARM926T is not set -# CONFIG_CPU_ARM1020 is not set -# CONFIG_CPU_SA110 is not set -CONFIG_CPU_SA1100=y -# CONFIG_ARM_THUMB is not set -CONFIG_DISCONTIGMEM=y # -# General setup +# Bus support # -# CONFIG_PCI is not set CONFIG_ISA=y -# CONFIG_ISA_DMA is not set -# CONFIG_CPU_FREQ is not set -CONFIG_HOTPLUG=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # +CONFIG_PCCARD=y +# CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y -# CONFIG_I82092 is not set + +# +# PC-card bridges +# # CONFIG_I82365 is not set # CONFIG_TCIC is not set CONFIG_PCMCIA_SA1100=y -CONFIG_NET=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y # -# At least one math emulation must be selected +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttySA0,9600 console=tty1 root=/dev/mtdblock2 init=/linuxrc" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set -# CONFIG_PM is not set # CONFIG_ARTHUR is not set -CONFIG_CMDLINE="console=ttySA0,9600 console=tty1 root=/dev/mtdblock2 init=/linuxrc" -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Power management options # -# CONFIG_PARPORT is not set +# CONFIG_PM is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_BOOTLDR_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -171,6 +207,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers @@ -179,36 +216,49 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set # CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_AMDSTD_RETRY=0 +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_NORA is not set # CONFIG_MTD_ARM_INTEGRATOR is not set CONFIG_MTD_SA1100=y -# CONFIG_MTD_IQ80310 is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOCPROBE is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -216,7 +266,12 @@ # CONFIG_MTD_NAND is not set # -# Plug and Play configuration +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support # # CONFIG_PNP is not set @@ -225,11 +280,57 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=m +CONFIG_BLK_DEV_IDE=m + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +# CONFIG_BLK_DEV_IDEDISK is not set +# CONFIG_IDEDISK_MULTI_MODE is not set +# CONFIG_BLK_DEV_IDECS is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=m +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -237,67 +338,99 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Networking support +# +CONFIG_NET=y + +# # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y +# CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_INET_ECN is not set +# CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set +# CONFIG_NETFILTER is not set # -# +# SCTP Configuration (EXPERIMENTAL) # +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_LLC is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # -# Network device support +# Network testing # +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +CONFIG_MII=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set @@ -309,28 +442,20 @@ # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC_OMIT_TIGON_I is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set # -# Wan interfaces +# Wireless LAN (non-hamradio) # -# CONFIG_WAN is not set +# CONFIG_NET_RADIO is not set # # PCMCIA network device support @@ -343,90 +468,136 @@ # CONFIG_PCMCIA_NMCLAN is not set CONFIG_PCMCIA_SMC91C92=y # CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_NET_PCMCIA_RADIO is not set +# CONFIG_PCMCIA_AXNET is not set # -# Amateur Radio support +# Wan interfaces # -# CONFIG_HAMRADIO is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # -# IrDA (infrared) support +# ISDN subsystem # -# CONFIG_IRDA is not set +# CONFIG_ISDN is not set # -# ATA/IDE/MFM/RLL support +# Input device support # -CONFIG_IDE=m +CONFIG_INPUT=y # -# IDE, ATA and ATAPI Block devices +# Userland interfaces # -CONFIG_BLK_DEV_IDE=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set # -# Please see Documentation/ide.txt for help/info on IDE drives +# Input Device Drivers # -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -# CONFIG_BLK_DEV_IDEDISK is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # -# IDE chipset support/bugfixes +# Character devices # -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_ATARAID is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set # -# SCSI support +# Serial drivers # -# CONFIG_SCSI is not set +# CONFIG_SERIAL_8250 is not set # -# I2O device support +# Non-8250 serial port support +# +CONFIG_SERIAL_SA1100=y +CONFIG_SERIAL_SA1100_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI # -# CONFIG_I2O is not set +# CONFIG_IPMI_HANDLER is not set # -# ISDN subsystem +# Watchdog Cards # -# CONFIG_ISDN is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set # -# Input core support +# Watchdog Device Drivers # -CONFIG_INPUT=y -CONFIG_INPUT_KEYBDEV=y -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_EVDEV is not set +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SA1100_WATCHDOG=y # -# Character devices +# ISA-based Watchdog Cards # -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -# CONFIG_SERIAL is not set -# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_WDT is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set # -# Serial drivers +# Ftape, the floppy tape device driver # -CONFIG_SERIAL_SA1100=y -CONFIG_SERIAL_SA1100_CONSOLE=y -CONFIG_SA1100_DEFAULT_BAUDRATE=9600 -# CONFIG_SERIAL_8250 is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +# CONFIG_DRM is not set + +# +# PCMCIA character devices +# +# CONFIG_SYNCLINK_CS is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set # # I2C support @@ -434,129 +605,168 @@ # CONFIG_I2C is not set # -# L3 serial bus support +# Misc devices +# + +# +# Multimedia devices # -# CONFIG_L3 is not set +# CONFIG_VIDEO_DEV is not set # -# Other L3 adapters +# Digital Video Broadcasting Devices # -# CONFIG_BIT_SA1100_GPIO is not set +# CONFIG_DVB is not set # -# Mice +# Graphics support # -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_SA1100=y +# CONFIG_FB_VIRTUAL is not set # -# Joysticks +# Console display driver support # -# CONFIG_INPUT_GAMEPORT is not set -# CONFIG_INPUT_SERIO is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set # -# Joysticks +# Logo configuration # -# CONFIG_QIC02_TAPE is not set +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # -# Watchdog Cards +# Sound # -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_WDT is not set -# CONFIG_WDTPCI is not set -# CONFIG_PCWATCHDOG is not set -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_SA1100_WATCHDOG=y -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_60XX_WDT is not set -# CONFIG_W83877F_WDT is not set -# CONFIG_MACHZ_WDT is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -CONFIG_SA1100_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set +CONFIG_SOUND=y # -# Ftape, the floppy tape device driver +# Advanced Linux Sound Architecture # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +# CONFIG_SND is not set # -# PCMCIA character devices +# Open Sound System # +# CONFIG_SOUND_PRIME is not set # -# Multimedia devices +# USB support # -# CONFIG_VIDEO_DEV is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set # # File systems # +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_REISERFS_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set -# CONFIG_CMS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_UMSDOS_FS is not set -CONFIG_VFAT_FS=y # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set -# CONFIG_TMPFS is not set -CONFIG_RAMFS=y -# CONFIG_ISO9660_FS is not set -CONFIG_MINIX_FS=y -# CONFIG_FREEVXFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set +# CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_EXT2_FS is not set # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set -CONFIG_SUNRPC=y CONFIG_LOCKD=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set -# CONFIG_ZISOFS_FS is not set -# CONFIG_ZLIB_FS_INFLATE is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set # # Partition Types @@ -576,12 +786,12 @@ # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -# CONFIG_SMB_NLS is not set -CONFIG_NLS=y +# CONFIG_EFI_PARTITION is not set # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # CONFIG_NLS_CODEPAGE_737 is not set @@ -604,7 +814,9 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -621,112 +833,40 @@ # CONFIG_NLS_UTF8 is not set # -# Console drivers +# Profiling support # -CONFIG_PC_KEYMAP=y -# CONFIG_VGA_CONSOLE is not set +# CONFIG_PROFILING is not set # -# Frame-buffer support -# -CONFIG_FB=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FB_SA1100=y -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FBCON_ADVANCED is not set -CONFIG_FBCON_CFB2=y -CONFIG_FBCON_CFB4=y -CONFIG_FBCON_CFB8=y -CONFIG_FBCON_CFB16=y -# CONFIG_FBCON_FONTWIDTH8_ONLY is not set -# CONFIG_FBCON_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Sound -# -CONFIG_SOUND=y -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -CONFIG_SOUND_SA1100=y -# CONFIG_SOUND_SA1100SSP is not set -# CONFIG_SOUND_OSS is not set - -# -# Multimedia Capabilities Port drivers -# -CONFIG_MCP=y -CONFIG_MCP_SA1100=y -CONFIG_MCP_UCB1200=y -CONFIG_MCP_UCB1200_AUDIO=y -CONFIG_MCP_UCB1200_TS=y - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Controllers -# - -# -# USB Device Class drivers -# - -# -# USB Human Interface Devices (HID) -# - -# -# USB Imaging devices -# - -# -# USB Multimedia devices -# - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network adaptors -# - -# -# USB port drivers +# Kernel hacking # +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # -# USB Serial Converter support +# Security options # +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set # -# USB Miscellaneous drivers +# Cryptographic options # +# CONFIG_CRYPTO is not set # -# Bluetooth support +# Hardware crypto devices # -# CONFIG_BT is not set # -# Kernel hacking +# Library routines # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_DEBUG_LL=y +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig --- a/arch/arm/configs/shark_defconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/configs/shark_defconfig 2005-03-30 16:58:49 -08:00 @@ -1,36 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 23:59:14 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y # CONFIG_CLEAN_COMPILE is not set -# CONFIG_STANDALONE is not set CONFIG_BROKEN=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -40,125 +54,134 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set CONFIG_ARCH_SHARK=y +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # -# CLPS711X/EP721X Implementations +# Processor Type # +CONFIG_CPU_32=y +CONFIG_CPU_SA110=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WB=y # -# Epxa10db +# Processor Features # # -# Footbridge Implementations +# Bus support # +CONFIG_ISA=y +CONFIG_ISA_DMA=y +CONFIG_PCI=y +CONFIG_PCI_HOST_VIA82C505=y +CONFIG_PCI_LEGACY_PROC=y +# CONFIG_PCI_NAMES is not set # -# IOP3xx Implementation Options +# PCCARD (PCMCIA/CardBus) support # -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set +# CONFIG_PCCARD is not set # -# IOP3xx Chipset Features +# Kernel Features # +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +# CONFIG_LEDS_CPU is not set +CONFIG_ALIGNMENT_TRAP=y # -# Intel PXA250/210 Implementations +# Boot options # +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set # -# SA11x0 Implementations +# Floating point emulation # # -# Processor Type +# At least one emulation must be selected # -CONFIG_CPU_32=y -CONFIG_CPU_SA110=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4=y -CONFIG_CPU_CACHE_V4WB=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WB=y +# CONFIG_FPE_NWFPE is not set +CONFIG_FPE_FASTFPE=y # -# Processor Features +# Userspace binary formats # +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# General setup +# Power management options # -CONFIG_PCI=y -CONFIG_PCI_HOST_VIA82C505=y -CONFIG_ISA=y -CONFIG_ISA_DMA=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set +# CONFIG_PM is not set # -# At least one math emulation must be selected +# Device Drivers # -# CONFIG_FPE_NWFPE is not set -CONFIG_FPE_FASTFPE=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set # # Generic Driver Options # -# CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -# CONFIG_LEDS_CPU is not set -CONFIG_ALIGNMENT_TRAP=y +# CONFIG_STANDALONE is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set # # Parallel port support # CONFIG_PARPORT=y CONFIG_PARPORT_PC=y -CONFIG_PARPORT_PC_CML1=y # CONFIG_PARPORT_SERIAL is not set # CONFIG_PARPORT_PC_FIFO is not set # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_ARC is not set -# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_GSC is not set # CONFIG_PARPORT_1284 is not set # -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# # Plug and Play support # # CONFIG_PNP is not set @@ -173,12 +196,144 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=y +# CONFIG_BLK_DEV_IDESCSI is not set +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_BLK_DEV_IDEPCI is not set +CONFIG_IDE_ARM=y +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=m +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) @@ -186,6 +341,21 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# # Networking support # CONFIG_NET=y @@ -205,23 +375,24 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -230,39 +401,44 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y # CONFIG_MII is not set -# CONFIG_SMC91X is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set +# CONFIG_SMC91X is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -280,6 +456,7 @@ # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set CONFIG_CS89x0=y # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set @@ -306,169 +483,43 @@ # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set -# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PLIP is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set -# CONFIG_HOSTAP is not set +# CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set # -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_BLK_DEV_IDEPCI is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_REPORT_LUNS is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_PPA is not set -# CONFIG_SCSI_IMM is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# Wireless LAN (non-hamradio) # -# CONFIG_IEEE1394 is not set +# CONFIG_NET_RADIO is not set # -# I2O device support +# Wan interfaces # -# CONFIG_I2O is not set +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Input device support @@ -484,42 +535,43 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_TSLIBDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y -# CONFIG_MOUSE_PS2_SYNAPTICS is not set # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -538,77 +590,189 @@ # # Non-8250 serial port support # -# CONFIG_SERIAL_DZ is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 CONFIG_PRINTER=m # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set # CONFIG_TIPAR is not set # +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +CONFIG_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # -# I2C Algorithms +# Misc devices # # -# I2C Hardware Bus support +# Multimedia devices # +# CONFIG_VIDEO_DEV is not set # -# I2C Hardware Sensors Chip support +# Digital Video Broadcasting Devices # -# CONFIG_I2C_SENSOR is not set +# CONFIG_DVB is not set # -# L3 serial bus support +# Graphics support # -# CONFIG_L3 is not set +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +CONFIG_FB_CYBER2000=y +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON_OLD is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_VIRTUAL is not set # -# Mice +# Console display driver support # -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y # -# IPMI +# Logo configuration # -# CONFIG_IPMI_HANDLER is not set +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # -# Watchdog Cards +# Sound # -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set +CONFIG_SOUND=m # -# Ftape, the floppy tape device driver +# Advanced Linux Sound Architecture # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set +# CONFIG_SND is not set # -# Multimedia devices +# Open Sound System # -# CONFIG_VIDEO_DEV is not set +CONFIG_SOUND_PRIME=m +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +CONFIG_SOUND_OSS=m +# CONFIG_SOUND_TRACEINIT is not set +# CONFIG_SOUND_DMAP is not set +# CONFIG_SOUND_AD1816 is not set +# CONFIG_SOUND_AD1889 is not set +# CONFIG_SOUND_SGALAXY is not set +CONFIG_SOUND_ADLIB=m +# CONFIG_SOUND_ACI_MIXER is not set +# CONFIG_SOUND_CS4232 is not set +# CONFIG_SOUND_SSCAPE is not set +# CONFIG_SOUND_GUS is not set +# CONFIG_SOUND_VMIDI is not set +# CONFIG_SOUND_TRIX is not set +# CONFIG_SOUND_MSS is not set +# CONFIG_SOUND_MPU401 is not set +# CONFIG_SOUND_NM256 is not set +# CONFIG_SOUND_MAD16 is not set +# CONFIG_SOUND_PAS is not set +# CONFIG_SOUND_PSS is not set +CONFIG_SOUND_SB=m +# CONFIG_SOUND_AWE32_SYNTH is not set +# CONFIG_SOUND_WAVEFRONT is not set +# CONFIG_SOUND_MAUI is not set +# CONFIG_SOUND_YM3812 is not set +# CONFIG_SOUND_OPL3SA1 is not set +# CONFIG_SOUND_OPL3SA2 is not set +# CONFIG_SOUND_YMFPCI is not set +# CONFIG_SOUND_UART6850 is not set +# CONFIG_SOUND_AEDSP16 is not set +# CONFIG_SOUND_KAHLUA is not set +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_AD1980 is not set # -# Digital Video Broadcasting Devices +# USB support # -# CONFIG_DVB is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set # # MMC/SD Card support @@ -629,10 +793,15 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -650,16 +819,19 @@ CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_SYSFS=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y # CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set # CONFIG_TMPFS is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set @@ -671,6 +843,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -690,14 +863,13 @@ # CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -715,16 +887,15 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_EFI_PARTITION is not set -CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set @@ -749,6 +920,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -765,142 +937,24 @@ # CONFIG_NLS_UTF8 is not set # -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -CONFIG_FB_CYBER2000=y -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -# CONFIG_SOUND_BT878 is not set -# CONFIG_SOUND_CMPCI is not set -# CONFIG_SOUND_EMU10K1 is not set -# CONFIG_SOUND_FUSION is not set -# CONFIG_SOUND_CS4281 is not set -# CONFIG_SOUND_ES1370 is not set -# CONFIG_SOUND_ES1371 is not set -# CONFIG_SOUND_ESSSOLO1 is not set -# CONFIG_SOUND_MAESTRO is not set -# CONFIG_SOUND_MAESTRO3 is not set -# CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_SONICVIBES is not set -# CONFIG_SOUND_TRIDENT is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set -# CONFIG_SOUND_VIA82CXXX is not set -CONFIG_SOUND_OSS=m -# CONFIG_SOUND_TRACEINIT is not set -# CONFIG_SOUND_DMAP is not set -# CONFIG_SOUND_AD1816 is not set -# CONFIG_SOUND_AD1889 is not set -# CONFIG_SOUND_SGALAXY is not set -CONFIG_SOUND_ADLIB=m -# CONFIG_SOUND_ACI_MIXER is not set -# CONFIG_SOUND_CS4232 is not set -# CONFIG_SOUND_SSCAPE is not set -# CONFIG_SOUND_GUS is not set -# CONFIG_SOUND_VMIDI is not set -# CONFIG_SOUND_TRIX is not set -# CONFIG_SOUND_MSS is not set -# CONFIG_SOUND_MPU401 is not set -# CONFIG_SOUND_NM256 is not set -# CONFIG_SOUND_MAD16 is not set -# CONFIG_SOUND_PAS is not set -# CONFIG_SOUND_PSS is not set -CONFIG_SOUND_SB=m -# CONFIG_SOUND_AWE32_SYNTH is not set -# CONFIG_SOUND_WAVEFRONT is not set -# CONFIG_SOUND_MAUI is not set -# CONFIG_SOUND_YM3812 is not set -# CONFIG_SOUND_OPL3SA1 is not set -# CONFIG_SOUND_OPL3SA2 is not set -# CONFIG_SOUND_YMFPCI is not set -# CONFIG_SOUND_UART6850 is not set -# CONFIG_SOUND_AEDSP16 is not set -# CONFIG_SOUND_KAHLUA is not set -# CONFIG_SOUND_ALI5455 is not set -# CONFIG_SOUND_FORTE is not set -# CONFIG_SOUND_RME96XX is not set -# CONFIG_SOUND_AD1980 is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches -# -# CONFIG_SWITCHES is not set - -# -# USB support +# Profiling support # -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set +# CONFIG_PROFILING is not set # # Kernel hacking # +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_KERNEL is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -909,6 +963,12 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set diff -Nru a/arch/arm/configs/simpad_defconfig b/arch/arm/configs/simpad_defconfig --- a/arch/arm/configs/simpad_defconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/configs/simpad_defconfig 2005-03-30 16:58:50 -08:00 @@ -1,12 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2 -# Thu Sep 16 15:42:43 2004 +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:10:36 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_IOMAP=y # @@ -15,6 +16,7 @@ CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -26,22 +28,24 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -50,6 +54,7 @@ # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # @@ -73,46 +78,27 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE_PB is not set +# CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # SA11x0 Implementations # # CONFIG_SA1100_ASSABET is not set -# CONFIG_SA1100_ADSBITSY is not set -# CONFIG_SA1100_BRUTUS is not set # CONFIG_SA1100_CERF is not set # CONFIG_SA1100_COLLIE is not set # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set -# CONFIG_SA1100_EXTENEX1 is not set -# CONFIG_SA1100_FLEXANET is not set -# CONFIG_SA1100_FREEBIRD is not set -# CONFIG_SA1100_GRAPHICSCLIENT is not set -# CONFIG_SA1100_GRAPHICSMASTER is not set # CONFIG_SA1100_BADGE4 is not set # CONFIG_SA1100_JORNADA720 is not set # CONFIG_SA1100_HACKKIT is not set -# CONFIG_SA1100_HUW_WEBPANEL is not set -# CONFIG_SA1100_ITSY is not set # CONFIG_SA1100_LART is not set -# CONFIG_SA1100_NANOENGINE is not set -# CONFIG_SA1100_OMNIMETER is not set -# CONFIG_SA1100_PANGOLIN is not set # CONFIG_SA1100_PLEB is not set -# CONFIG_SA1100_PT_SYSTEM3 is not set # CONFIG_SA1100_SHANNON is not set -# CONFIG_SA1100_SHERMAN is not set CONFIG_SA1100_SIMPAD=y -# CONFIG_SA1100_PFS168 is not set -# CONFIG_SA1100_VICTOR is not set -# CONFIG_SA1100_XP860 is not set -# CONFIG_SA1100_YOPY is not set -# CONFIG_SA1100_STORK is not set # CONFIG_SA1100_SSP is not set -# CONFIG_SA1100_USB is not set # # Processor Type @@ -122,6 +108,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4=y CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WB=y CONFIG_CPU_MINICACHE=y @@ -130,63 +117,91 @@ # # -# General setup +# Bus support # -CONFIG_DISCONTIGMEM=y CONFIG_ISA=y -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -# CONFIG_CPU_FREQ is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=y +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set +CONFIG_PCMCIA=y + +# +# PC-card bridges +# # CONFIG_I82365 is not set # CONFIG_TCIC is not set CONFIG_PCMCIA_SA1100=y # -# At least one math emulation must be selected +# Kernel Features +# +CONFIG_PREEMPT=y +CONFIG_DISCONTIGMEM=y +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +# CONFIG_LEDS_CPU is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA0 root=1f02 noinitrd mem=64M jffs2_orphaned_inodes=delete rootfstype=jffs2" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_MISC=m +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set CONFIG_PM=y -CONFIG_PREEMPT=y CONFIG_APM=y -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA0 root=1f02 noinitrd mem=64M jffs2_orphaned_inodes=delete rootfstype=jffs2" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -# CONFIG_LEDS_CPU is not set -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set @@ -228,6 +243,7 @@ CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -246,6 +262,7 @@ # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -260,6 +277,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # # CONFIG_PNP is not set @@ -269,11 +291,34 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -281,6 +326,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -308,6 +365,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -327,7 +386,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -405,10 +463,10 @@ # Bluetooth device drivers # # CONFIG_BT_HCIUART is not set -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m +# CONFIG_BT_HCIDTL1 is not set +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBLUECARD is not set +# CONFIG_BT_HCIBTUART is not set # CONFIG_BT_HCIVHCI is not set CONFIG_NETDEVICES=y CONFIG_DUMMY=y @@ -482,7 +540,7 @@ # # Wireless 802.11b Pcmcia/Cardbus cards support # -CONFIG_AIRO_CS=m +# CONFIG_AIRO_CS is not set # CONFIG_PCMCIA_WL3501 is not set CONFIG_NET_WIRELESS=y @@ -516,28 +574,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -562,15 +598,6 @@ CONFIG_INPUT_EVBUG=y # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=m -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_CT82C710=m - -# # Input Device Drivers # # CONFIG_INPUT_KEYBOARD is not set @@ -580,6 +607,16 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_LIBPS2 is not set +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -629,11 +666,20 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -644,6 +690,71 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_SOFT_CURSOR is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_SA1100 is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=m @@ -660,10 +771,15 @@ CONFIG_REISERFS_PROC_INFO=y # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -712,6 +828,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -734,7 +851,6 @@ # CONFIG_ROOT_NFS is not set CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -749,6 +865,7 @@ # Partition Types # # CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y # # Native Language Support @@ -800,75 +917,21 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_SA1100 is not set -CONFIG_FB_MQ200=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set @@ -879,12 +942,17 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/arm/configs/smdk2410_defconfig b/arch/arm/configs/smdk2410_defconfig --- a/arch/arm/configs/smdk2410_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/smdk2410_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,40 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Sun Mar 27 22:42:40 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -44,82 +54,51 @@ # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_SHARK is not set CONFIG_ARCH_S3C2410=y -# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_VERSATILE_PB is not set - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# - -# -# SA11x0 Implementations -# - -# -# TI OMAP Implementations -# - -# -# OMAP Core Type -# - -# -# OMAP Board Type -# - -# -# OMAP Feature Selections -# +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # -# S3C2410 Implementations +# S3C24XX Implementations # # CONFIG_ARCH_BAST is not set # CONFIG_ARCH_H1940 is not set +# CONFIG_MACH_N30 is not set CONFIG_ARCH_SMDK2410=y +# CONFIG_ARCH_S3C2440 is not set # CONFIG_MACH_VR1000 is not set +# CONFIG_MACH_RX3715 is not set +# CONFIG_MACH_OTOM is not set +# CONFIG_MACH_NEXCODER_2440 is not set +CONFIG_CPU_S3C2410=y + +# +# S3C2410 Boot +# # -# LH7A40X Implementations +# S3C2410 Setup # +# CONFIG_S3C2410_DMA is not set +CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 # # Processor Type @@ -129,6 +108,7 @@ CONFIG_CPU_32v4=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_CACHE_V4WT=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -141,43 +121,70 @@ # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # -# General setup +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=1f04 mem=32M" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation # -# CONFIG_ZBOOT_ROM is not set -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 # -# At least one math emulation must be selected +# At least one emulation must be selected # # CONFIG_FPE_NWFPE is not set # CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_DEBUG_DRIVER is not set # CONFIG_PM is not set -# CONFIG_PREEMPT is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=1f04 mem=32M" -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set # CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_PARTITIONS is not set # # User Modules And Translation Layers @@ -195,13 +202,24 @@ # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -215,8 +233,10 @@ # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -231,6 +251,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -238,11 +263,34 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -250,6 +298,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -275,6 +335,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -294,12 +357,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -321,6 +384,7 @@ # CONFIG_NET_ETHERNET=y # CONFIG_MII is not set +# CONFIG_SMC91X is not set # # Ethernet (1000 Mbit) @@ -349,29 +413,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -394,16 +435,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -421,6 +452,16 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -443,7 +484,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -456,25 +496,31 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set +# CONFIG_S3C2410_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set # +# Misc devices +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set @@ -485,6 +531,56 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_VIRTUAL=y + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -493,10 +589,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -509,7 +610,8 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -552,14 +654,13 @@ # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -573,7 +674,6 @@ # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -590,68 +690,33 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_VIRTUAL=y - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# Misc devices -# - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_ERRORS is not set CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set -CONFIG_DEBUG_LL_PRINTK=y CONFIG_DEBUG_S3C2410_PORT=y CONFIG_DEBUG_S3C2410_UART=0 # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -660,7 +725,12 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y CONFIG_LIBCRC32C=y diff -Nru a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig --- a/arch/arm/configs/versatile_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/configs/versatile_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,40 +1,50 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:20:50 2005 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -44,70 +54,33 @@ # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # System Type # -# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set CONFIG_ARCH_VERSATILE=y - -# -# CLPS711X/EP721X Implementations -# - -# -# Epxa10db -# - -# -# Footbridge Implementations -# - -# -# IOP3xx Implementation Options -# -# CONFIG_ARCH_IOP310 is not set -# CONFIG_ARCH_IOP321 is not set - -# -# IOP3xx Chipset Features -# - -# -# Intel PXA250/210 Implementations -# - -# -# SA11x0 Implementations -# - -# -# TI OMAP Implementations -# - -# -# OMAP Feature Selections -# - -# -# S3C2410 Implementations -# +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set # # Versatile platform type @@ -122,6 +95,7 @@ CONFIG_CPU_ARM926T=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5TJ=y +CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y CONFIG_CPU_TLB_V4WBI=y @@ -133,56 +107,80 @@ # CONFIG_CPU_DCACHE_DISABLE is not set # CONFIG_CPU_DCACHE_WRITETHROUGH is not set # CONFIG_CPU_CACHE_ROUND_ROBIN is not set +CONFIG_ICST307=y # -# General setup +# Bus support # CONFIG_ARM_AMBA=y -# CONFIG_ZBOOT_ROM is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=1f03 mem=32M" +# CONFIG_XIP_KERNEL is not set # -# PCMCIA/CardBus support +# Floating point emulation # -# CONFIG_PCMCIA is not set # -# At least one math emulation must be selected +# At least one emulation must be selected # CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +# CONFIG_VFP is not set + +# +# Userspace binary formats +# CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set # -# Generic Driver Options +# Power management options # -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set CONFIG_PM=y -# CONFIG_PREEMPT is not set # CONFIG_APM is not set -# CONFIG_ARTHUR is not set -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y # -# Parallel port support +# Device Drivers # -# CONFIG_PARPORT is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set @@ -207,13 +205,24 @@ # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set # CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -227,8 +236,10 @@ # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -243,6 +254,11 @@ # CONFIG_MTD_NAND is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # @@ -250,11 +266,29 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -262,6 +296,18 @@ # CONFIG_MD is not set # +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# # Networking support # CONFIG_NET=y @@ -289,6 +335,9 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -308,12 +357,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -353,7 +402,6 @@ # Wireless LAN (non-hamradio) # # CONFIG_NET_RADIO is not set -# CONFIG_HOSTAP is not set # # Wan interfaces @@ -365,29 +413,6 @@ # CONFIG_NETCONSOLE is not set # -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# - -# # ISDN subsystem # # CONFIG_ISDN is not set @@ -406,22 +431,10 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_TSLIBDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -CONFIG_SERIO_AMBAKMI=y - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -439,6 +452,17 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +CONFIG_SERIO_AMBAKMI=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -469,7 +493,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -482,20 +505,21 @@ # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # CONFIG_I2C=y @@ -506,33 +530,44 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support # -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_ISA is not set # CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set # # Hardware Sensors Chip support # CONFIG_I2C_SENSOR=m # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set # CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -543,15 +578,15 @@ CONFIG_SENSORS_EEPROM=m # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set # -# L3 serial bus support +# Misc devices # -# CONFIG_L3 is not set # # Multimedia devices @@ -564,6 +599,88 @@ # CONFIG_DVB is not set # +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_ARMCLCD=y +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +CONFIG_FONT_ACORN_8x8=y +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA ARM devices +# + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # MMC/SD Card support # CONFIG_MMC=y @@ -580,10 +697,15 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set CONFIG_MINIX_FS=y CONFIG_ROMFS_FS=y # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -599,6 +721,8 @@ CONFIG_FAT_FS=m # CONFIG_MSDOS_FS is not set CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -626,6 +750,11 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -650,11 +779,11 @@ CONFIG_EXPORTFS=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -672,7 +801,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -706,6 +834,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -727,107 +856,23 @@ # CONFIG_PROFILING is not set # -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_PEARL_8x8 is not set -CONFIG_FONT_ACORN_8x8=y -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -CONFIG_SND_AC97_CODEC=m - -# -# ALSA ARM devices -# -CONFIG_SND_ARMAACI=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set - -# -# Console Switches -# -# CONFIG_SWITCHES is not set - -# -# USB support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# # Kernel hacking # -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_INFO is not set +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y # CONFIG_DEBUG_ICEDCC is not set @@ -835,6 +880,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -843,8 +889,14 @@ # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c --- a/arch/arm/kernel/ecard.c 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/kernel/ecard.c 2005-03-30 16:58:51 -08:00 @@ -228,7 +228,7 @@ */ pgd_t *src_pgd, *dst_pgd; - src_pgd = pgd_offset(mm, IO_BASE); + src_pgd = pgd_offset(mm, (unsigned long)IO_BASE); dst_pgd = pgd_offset(mm, IO_START); memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (IO_SIZE / PGDIR_SIZE)); diff -Nru a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S --- a/arch/arm/kernel/entry-armv.S 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/kernel/entry-armv.S 2005-03-30 16:58:48 -08:00 @@ -280,13 +280,21 @@ @ stmia r5, {r2 - r4} stmdb r5, {sp, lr}^ + + @ + @ Enable the alignment trap while in kernel mode + @ + alignment_trap r7, r0, __temp_\sym + + @ + @ Clear FP to mark the first stack frame + @ + zero_fp .endm .align 5 __dabt_usr: usr_entry abt - alignment_trap r7, r0, __temp_abt - zero_fp @ @ Call the processor-specific abort handler: @@ -316,8 +324,7 @@ .align 5 __irq_usr: usr_entry irq - alignment_trap r7, r0, __temp_irq - zero_fp + #ifdef CONFIG_PREEMPT get_thread_info r8 ldr r9, [r8, #TI_PREEMPT] @ get preempt count @@ -348,8 +355,7 @@ .align 5 __und_usr: usr_entry und - alignment_trap r7, r0, __temp_und - zero_fp + tst r3, #PSR_T_BIT @ Thumb mode? bne fpundefinstr @ ignore FP sub r4, r2, #4 @@ -465,8 +471,7 @@ .align 5 __pabt_usr: usr_entry abt - alignment_trap r7, r0, __temp_abt - zero_fp + enable_irq r0 @ Enable interrupts mov r0, r2 @ address (pc) mov r1, sp @ regs diff -Nru a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S --- a/arch/arm/kernel/head.S 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/kernel/head.S 2005-03-30 16:58:47 -08:00 @@ -24,9 +24,11 @@ #define PROCINFO_MMUFLAGS 8 #define PROCINFO_INITFUNC 12 +#define MACHINFO_TYPE 0 #define MACHINFO_PHYSRAM 4 #define MACHINFO_PHYSIO 8 #define MACHINFO_PGOFFIO 12 +#define MACHINFO_NAME 16 #ifndef CONFIG_XIP_KERNEL /* @@ -101,12 +103,10 @@ @ and irqs disabled bl __lookup_processor_type @ r5=procinfo r9=cpuid movs r10, r5 @ invalid processor (r5=0)? - moveq r0, #'p' @ yes, error 'p' - beq __error + beq __error_p @ yes, error 'p' bl __lookup_machine_type @ r5=machinfo movs r8, r5 @ invalid machine (r5=0)? - moveq r0, #'a' @ yes, error 'a' - beq __error + beq __error_a @ yes, error 'a' bl __create_page_tables /* @@ -359,22 +359,59 @@ * ought to tell the user, but since we don't have any guarantee that * we're even running on the right architecture, we do virtually nothing. * - * r0 = ascii error character: - * a = invalid architecture - * p = invalid processor - * i = invalid calling convention - * - * Generally, only serious errors cause this. + * If CONFIG_DEBUG_LL is set we try to print out something about the error + * and hope for the best (useful if bootloader fails to pass a proper + * machine ID for example). */ - .type __error, %function -__error: + + .type __error_p, %function +__error_p: +#ifdef CONFIG_DEBUG_LL + adr r0, str_p1 + bl printascii + b __error +str_p1: .asciz "\nError: unrecognized/unsupported processor variant.\n" + .align +#endif + + .type __error_a, %function +__error_a: #ifdef CONFIG_DEBUG_LL - mov r8, r0 @ preserve r0 - adr r0, err_str + mov r4, r1 @ preserve machine ID + adr r0, str_a1 + bl printascii + mov r0, r4 + bl printhex8 + adr r0, str_a2 + bl printascii + adr r3, 3f + ldmia r3, {r4, r5, r6} @ get machine desc list + sub r4, r3, r4 @ get offset between virt&phys + add r5, r5, r4 @ convert virt addresses to + add r6, r6, r4 @ physical address space +1: ldr r0, [r5, #MACHINFO_TYPE] @ get machine type + bl printhex8 + mov r0, #'\t' + bl printch + ldr r0, [r5, #MACHINFO_NAME] @ get machine name + add r0, r0, r4 bl printascii - mov r0, r8 + mov r0, #'\n' bl printch + add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc + cmp r5, r6 + blo 1b + adr r0, str_a3 + bl printascii + b __error +str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x" +str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n" +str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n" + .align #endif + + .type __error, %function +__error: #ifdef CONFIG_ARCH_RPC /* * Turn the screen red on a error - RiscPC only. @@ -391,12 +428,6 @@ 1: mov r0, r0 b 1b -#ifdef CONFIG_DEBUG_LL - .type err_str, %object -err_str: - .asciz "\nError: " - .align -#endif /* * Read processor ID register (CP#15, CR0), and look up in the linker-built @@ -424,7 +455,7 @@ beq 2f add r5, r5, #PROC_INFO_SZ @ sizeof(proc_info_list) cmp r5, r6 - blt 1b + blo 1b mov r5, #0 @ unknown processor 2: mov pc, lr @@ -465,12 +496,12 @@ sub r3, r3, r4 @ get offset between virt&phys add r5, r5, r3 @ convert virt addresses to add r6, r6, r3 @ physical address space -1: ldr r3, [r5] @ get machine type +1: ldr r3, [r5, #MACHINFO_TYPE] @ get machine type teq r3, r1 @ matches loader number? beq 2f @ found add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc cmp r5, r6 - blt 1b + blo 1b mov r5, #0 @ unknown machine 2: mov pc, lr diff -Nru a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c --- a/arch/arm/kernel/ptrace.c 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/kernel/ptrace.c 2005-03-30 16:58:47 -08:00 @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -608,6 +609,44 @@ sizeof(struct user_fp)) ? -EFAULT : 0; } +#ifdef CONFIG_IWMMXT + +/* + * Get the child iWMMXt state. + */ +static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) +{ + struct thread_info *thread = tsk->thread_info; + void *ptr = &thread->fpstate; + + if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) + return -ENODATA; + iwmmxt_task_disable(thread); /* force it to ram */ + /* The iWMMXt state is stored doubleword-aligned. */ + if (((long) ptr) & 4) + ptr += 4; + return copy_to_user(ufp, ptr, 0x98) ? -EFAULT : 0; +} + +/* + * Set the child iWMMXt state. + */ +static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) +{ + struct thread_info *thread = tsk->thread_info; + void *ptr = &thread->fpstate; + + if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) + return -EACCES; + iwmmxt_task_release(thread); /* force a reload */ + /* The iWMMXt state is stored doubleword-aligned. */ + if (((long) ptr) & 4) + ptr += 4; + return copy_from_user(ptr, ufp, 0x98) ? -EFAULT : 0; +} + +#endif + static int do_ptrace(int request, struct task_struct *child, long addr, long data) { unsigned long tmp; @@ -718,6 +757,16 @@ case PTRACE_SETFPREGS: ret = ptrace_setfpregs(child, (void __user *)data); break; + +#ifdef CONFIG_IWMMXT + case PTRACE_GETWMMXREGS: + ret = ptrace_getwmmxregs(child, (void __user *)data); + break; + + case PTRACE_SETWMMXREGS: + ret = ptrace_setwmmxregs(child, (void __user *)data); + break; +#endif case PTRACE_GET_THREAD_AREA: ret = put_user(child->thread_info->tp_value, diff -Nru a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c --- a/arch/arm/kernel/traps.c 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/kernel/traps.c 2005-03-30 16:58:48 -08:00 @@ -240,6 +240,19 @@ die(str, regs, err); } +static void notify_die(const char *str, struct pt_regs *regs, siginfo_t *info, + unsigned long err, unsigned long trap) +{ + if (user_mode(regs)) { + current->thread.error_code = err; + current->thread.trap_no = trap; + + force_sig_info(info->si_signo, info, current); + } else { + die(str, regs, err); + } +} + static LIST_HEAD(undef_hook); static DEFINE_SPINLOCK(undef_lock); @@ -299,17 +312,12 @@ } #endif - current->thread.error_code = 0; - current->thread.trap_no = 6; - info.si_signo = SIGILL; info.si_errno = 0; info.si_code = ILL_ILLOPC; info.si_addr = pc; - force_sig_info(SIGILL, &info, current); - - die_if_kernel("Oops - undefined instruction", regs, 0); + notify_die("Oops - undefined instruction", regs, &info, 0, 6); } asmlinkage void do_unexp_fiq (struct pt_regs *regs) @@ -362,8 +370,8 @@ info.si_addr = (void __user *)instruction_pointer(regs) - (thumb_mode(regs) ? 2 : 4); - force_sig_info(SIGILL, &info, current); - die_if_kernel("Oops - bad syscall", regs, n); + notify_die("Oops - bad syscall", regs, &info, n, 0); + return regs->ARM_r0; } @@ -406,9 +414,7 @@ info.si_code = SEGV_MAPERR; info.si_addr = NULL; - force_sig_info(SIGSEGV, &info, current); - - die_if_kernel("branch through zero", regs, 0); + notify_die("branch through zero", regs, &info, 0, 0); return 0; case NR(breakpoint): /* SWI BREAK_POINT */ @@ -487,8 +493,7 @@ info.si_addr = (void __user *)instruction_pointer(regs) - (thumb_mode(regs) ? 2 : 4); - force_sig_info(SIGILL, &info, current); - die_if_kernel("Oops - bad syscall(2)", regs, no); + notify_die("Oops - bad syscall(2)", regs, &info, no, 0); return 0; } @@ -524,8 +529,7 @@ info.si_code = ILL_ILLOPC; info.si_addr = (void __user *)addr; - force_sig_info(SIGILL, &info, current); - die_if_kernel("unknown data abort code", regs, instr); + notify_die("unknown data abort code", regs, &info, instr, 0); } volatile void __bug(const char *file, int line, void *data) diff -Nru a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S --- a/arch/arm/kernel/vmlinux.lds.S 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/kernel/vmlinux.lds.S 2005-03-30 16:58:48 -08:00 @@ -160,3 +160,7 @@ .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } } + +/* those must never be empty */ +ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support") +ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") diff -Nru a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c --- a/arch/arm/mach-clps7500/core.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mach-clps7500/core.c 2005-03-30 16:58:49 -08:00 @@ -358,9 +358,9 @@ }, }; -static int __init clps7500_init(void) +static void __init clps7500_init(void) { - return platform_device_register(&serial_device); + platform_device_register(&serial_device); } MACHINE_START(CLPS7500, "CL-PS7500") diff -Nru a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c --- a/arch/arm/mach-footbridge/cats-hw.c 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/mach-footbridge/cats-hw.c 2005-03-30 16:58:48 -08:00 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff -Nru a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c --- a/arch/arm/mach-imx/dma.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-imx/dma.c 2005-03-30 16:58:50 -08:00 @@ -100,10 +100,11 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs) { - int i; + int i, disr = DISR; struct dma_channel *channel; unsigned int err_mask = DBTOSR | DRTOSR | DSESR | DBOSR; + DISR = disr; for (i = 0; i < 11; i++) { channel = &dma_channels[i]; @@ -136,7 +137,6 @@ i, channel->name); DBOSR |= (1 << i); } - DISR = (1 << i); } return IRQ_HANDLED; } @@ -146,6 +146,7 @@ { int i, disr = DISR; + DISR = disr; for (i = 0; i < 11; i++) { if (disr & (1 << i)) { struct dma_channel *channel = &dma_channels[i]; @@ -161,7 +162,6 @@ } } } - DISR = disr; return IRQ_HANDLED; } diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c --- a/arch/arm/mach-ixp2000/core.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-ixp2000/core.c 2005-03-30 16:58:50 -08:00 @@ -133,6 +133,22 @@ void __init ixp2000_map_io(void) { + extern unsigned int processor_id; + + /* + * On IXP2400 CPUs we need to use MT_IXP2000_DEVICE for + * tweaking the PMDs so XCB=101. On IXP2800s we use the normal + * PMD flags. + */ + if ((processor_id & 0xfffffff0) == 0x69054190) { + int i; + + printk(KERN_INFO "Enabling IXP2400 erratum #66 workaround\n"); + + for(i=0;i") BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) @@ -217,6 +216,5 @@ .timer = &enp2611_timer, INIT_MACHINE(enp2611_init_machine) MACHINE_END -#endif diff -Nru a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c --- a/arch/arm/mach-ixp4xx/common.c 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/mach-ixp4xx/common.c 2005-03-30 16:58:48 -08:00 @@ -38,6 +38,10 @@ #include #include +enum ixp4xx_irq_type { + IXP4XX_IRQ_LEVEL, IXP4XX_IRQ_EDGE +}; +static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type); /************************************************************************* * GPIO acces functions @@ -51,9 +55,13 @@ */ void gpio_line_config(u8 line, u32 style) { + static const int gpio2irq[] = { + 6, 7, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 + }; u32 enable; volatile u32 *int_reg; u32 int_style; + enum ixp4xx_irq_type irq_type; enable = *IXP4XX_GPIO_GPOER; @@ -66,24 +74,33 @@ { case (IXP4XX_GPIO_ACTIVE_HIGH): int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH; + irq_type = IXP4XX_IRQ_LEVEL; break; case (IXP4XX_GPIO_ACTIVE_LOW): int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW; + irq_type = IXP4XX_IRQ_LEVEL; break; case (IXP4XX_GPIO_RISING_EDGE): int_style = IXP4XX_GPIO_STYLE_RISING_EDGE; + irq_type = IXP4XX_IRQ_EDGE; break; case (IXP4XX_GPIO_FALLING_EDGE): int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE; + irq_type = IXP4XX_IRQ_EDGE; break; case (IXP4XX_GPIO_TRANSITIONAL): int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL; + irq_type = IXP4XX_IRQ_EDGE; break; default: int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH; + irq_type = IXP4XX_IRQ_LEVEL; break; } + if (style & IXP4XX_GPIO_INTSTYLE_MASK) + ixp4xx_config_irq(gpio2irq[line], irq_type); + if (line >= 8) { /* pins 8-15 */ line -= 8; int_reg = IXP4XX_GPIO_GPIT2R; @@ -138,10 +155,7 @@ * * TODO: GPIO IRQs should be marked invalid until the user of the IRQ * (be it PCI or something else) configures that GPIO line - * as an IRQ. Also, we should use a different chip structure for - * level-based GPIO vs edge-based GPIO. Currently nobody needs this as - * all HW that's publically available uses level IRQs, so we'll - * worry about it if/when we have HW to test. + * as an IRQ. **************************************************************************/ static void ixp4xx_irq_mask(unsigned int irq) { @@ -151,12 +165,15 @@ *IXP4XX_ICMR &= ~(1 << irq); } -static void ixp4xx_irq_mask_ack(unsigned int irq) +static void ixp4xx_irq_unmask(unsigned int irq) { - ixp4xx_irq_mask(irq); + if (cpu_is_ixp46x() && irq >= 32) + *IXP4XX_ICMR2 |= (1 << (irq - 32)); + else + *IXP4XX_ICMR |= (1 << irq); } -static void ixp4xx_irq_unmask(unsigned int irq) +static void ixp4xx_irq_ack(unsigned int irq) { static int irq2gpio[32] = { -1, -1, -1, -1, -1, -1, 0, 1, @@ -166,26 +183,47 @@ }; int line = (irq < 32) ? irq2gpio[irq] : -1; - /* - * This only works for LEVEL gpio IRQs as per the IXP4xx developer's - * manual. If edge-triggered, need to move it to the mask_ack. - * Nobody seems to be using the edge-triggered mode on the GPIOs. - */ if (line >= 0) gpio_line_isr_clear(line); +} - if (cpu_is_ixp46x() && irq >= 32) - *IXP4XX_ICMR2 |= (1 << (irq - 32)); - else - *IXP4XX_ICMR |= (1 << irq); +/* + * Level triggered interrupts on GPIO lines can only be cleared when the + * interrupt condition disappears. + */ +static void ixp4xx_irq_level_unmask(unsigned int irq) +{ + ixp4xx_irq_ack(irq); + ixp4xx_irq_unmask(irq); } -static struct irqchip ixp4xx_irq_chip = { - .ack = ixp4xx_irq_mask_ack, +static struct irqchip ixp4xx_irq_level_chip = { + .ack = ixp4xx_irq_mask, + .mask = ixp4xx_irq_mask, + .unmask = ixp4xx_irq_level_unmask, +}; + +static struct irqchip ixp4xx_irq_edge_chip = { + .ack = ixp4xx_irq_ack, .mask = ixp4xx_irq_mask, .unmask = ixp4xx_irq_unmask, }; +static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type) +{ + switch (type) { + case IXP4XX_IRQ_LEVEL: + set_irq_chip(irq, &ixp4xx_irq_level_chip); + set_irq_handler(irq, do_level_IRQ); + break; + case IXP4XX_IRQ_EDGE: + set_irq_chip(irq, &ixp4xx_irq_edge_chip); + set_irq_handler(irq, do_edge_IRQ); + break; + } + set_irq_flags(irq, IRQF_VALID); +} + void __init ixp4xx_init_irq(void) { int i = 0; @@ -204,12 +242,9 @@ *IXP4XX_ICMR2 = 0x00; } + /* Default to all level triggered */ for(i = 0; i < NR_IRQS; i++) - { - set_irq_chip(i, &ixp4xx_irq_chip); - set_irq_handler(i, do_level_IRQ); - set_irq_flags(i, IRQF_VALID); - } + ixp4xx_config_irq(i, IXP4XX_IRQ_LEVEL); } diff -Nru a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig --- a/arch/arm/mach-omap/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/mach-omap/Kconfig 2005-03-30 16:58:47 -08:00 @@ -66,6 +66,19 @@ Support for TI OMAP 730 Perseus2 board. Say Y here if you have such a board. +config MACH_VOICEBLUE + bool "Voiceblue" + depends on ARCH_OMAP1510 + help + Support for Voiceblue GSM/VoIP gateway. Say Y here if you have such + board. + +config MACH_NETSTAR + bool "NetStar" + depends on ARCH_OMAP1510 + help + Support for NetStar PBX. Say Y here if you have such a board. + config MACH_OMAP_GENERIC bool "Generic OMAP board" depends on ARCH_OMAP1510 || ARCH_OMAP16XX diff -Nru a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile --- a/arch/arm/mach-omap/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/mach-omap/Makefile 2005-03-30 16:58:47 -08:00 @@ -16,6 +16,8 @@ obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o +obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o +obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o # OCPI interconnect support for 1710, 1610 and 5912 obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o diff -Nru a/arch/arm/mach-omap/board-generic.c b/arch/arm/mach-omap/board-generic.c --- a/arch/arm/mach-omap/board-generic.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mach-omap/board-generic.c 2005-03-30 16:58:49 -08:00 @@ -26,7 +26,6 @@ #include #include #include -#include #include "common.h" diff -Nru a/arch/arm/mach-omap/board-h2.c b/arch/arm/mach-omap/board-h2.c --- a/arch/arm/mach-omap/board-h2.c 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/mach-omap/board-h2.c 2005-03-30 16:58:51 -08:00 @@ -23,14 +23,17 @@ #include #include #include +#include +#include #include #include #include +#include #include -#include #include +#include #include #include "common.h" @@ -39,10 +42,64 @@ static int __initdata h2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; +static struct mtd_partition h2_partitions[] = { + /* bootloader (U-Boot, etc) in first sector */ + { + .name = "bootloader", + .offset = 0, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + /* bootloader params in the next sector */ + { + .name = "params", + .offset = MTDPART_OFS_APPEND, + .size = SZ_128K, + .mask_flags = 0, + }, + /* kernel */ + { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = SZ_2M, + .mask_flags = 0 + }, + /* file system */ + { + .name = "filesystem", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0 + } +}; + +static struct flash_platform_data h2_flash_data = { + .map_name = "cfi_probe", + .width = 2, + .parts = h2_partitions, + .nr_parts = ARRAY_SIZE(h2_partitions), +}; + +static struct resource h2_flash_resource = { + .start = OMAP_CS2B_PHYS, + .end = OMAP_CS2B_PHYS + OMAP_CS2B_SIZE - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device h2_flash_device = { + .name = "omapflash", + .id = 0, + .dev = { + .platform_data = &h2_flash_data, + }, + .num_resources = 1, + .resource = &h2_flash_resource, +}; + static struct resource h2_smc91x_resources[] = { [0] = { .start = OMAP1610_ETHR_START, /* Physical */ - .end = OMAP1610_ETHR_START + SZ_4K, + .end = OMAP1610_ETHR_START + 0xf, .flags = IORESOURCE_MEM, }, [1] = { @@ -60,6 +117,7 @@ }; static struct platform_device *h2_devices[] __initdata = { + &h2_flash_device, &h2_smc91x_device, }; diff -Nru a/arch/arm/mach-omap/board-h3.c b/arch/arm/mach-omap/board-h3.c --- a/arch/arm/mach-omap/board-h3.c 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/mach-omap/board-h3.c 2005-03-30 16:58:47 -08:00 @@ -21,16 +21,22 @@ #include #include #include +#include +#include #include #include #include +#include #include +#include #include + +#include #include #include -#include -#include +#include +#include #include "common.h" @@ -38,10 +44,64 @@ static int __initdata h3_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; +static struct mtd_partition h3_partitions[] = { + /* bootloader (U-Boot, etc) in first sector */ + { + .name = "bootloader", + .offset = 0, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + /* bootloader params in the next sector */ + { + .name = "params", + .offset = MTDPART_OFS_APPEND, + .size = SZ_128K, + .mask_flags = 0, + }, + /* kernel */ + { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = SZ_2M, + .mask_flags = 0 + }, + /* file system */ + { + .name = "filesystem", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0 + } +}; + +static struct flash_platform_data h3_flash_data = { + .map_name = "cfi_probe", + .width = 2, + .parts = h3_partitions, + .nr_parts = ARRAY_SIZE(h3_partitions), +}; + +static struct resource h3_flash_resource = { + .start = OMAP_CS2B_PHYS, + .end = OMAP_CS2B_PHYS + OMAP_CS2B_SIZE - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device flash_device = { + .name = "omapflash", + .id = 0, + .dev = { + .platform_data = &h3_flash_data, + }, + .num_resources = 1, + .resource = &h3_flash_resource, +}; + static struct resource smc91x_resources[] = { [0] = { .start = OMAP1710_ETHR_START, /* Physical */ - .end = OMAP1710_ETHR_START + OMAP1710_ETHR_SIZE, + .end = OMAP1710_ETHR_START + 0xf, .flags = IORESOURCE_MEM, }, [1] = { @@ -58,8 +118,52 @@ .resource = smc91x_resources, }; +#define GPTIMER_BASE 0xFFFB1400 +#define GPTIMER_REGS(x) (0xFFFB1400 + (x * 0x800)) +#define GPTIMER_REGS_SIZE 0x46 + +static struct resource intlat_resources[] = { + [0] = { + .start = GPTIMER_REGS(0), /* Physical */ + .end = GPTIMER_REGS(0) + GPTIMER_REGS_SIZE, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = INT_1610_GPTIMER1, + .end = INT_1610_GPTIMER1, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device intlat_device = { + .name = "omap_intlat", + .id = 0, + .num_resources = ARRAY_SIZE(intlat_resources), + .resource = intlat_resources, +}; + static struct platform_device *devices[] __initdata = { + &flash_device, &smc91x_device, + &intlat_device, +}; + +static struct omap_usb_config h3_usb_config __initdata = { + /* usb1 has a Mini-AB port and external isp1301 transceiver */ + .otg = 2, + +#ifdef CONFIG_USB_GADGET_OMAP + .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */ +#elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) + /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */ + .hmc_mode = 20, /* 1:dev|otg(off) 1:host 2:disabled */ +#endif + + .pins[1] = 3, +}; + +static struct omap_board_config_kernel h3_config[] = { + { OMAP_TAG_USB, &h3_usb_config }, }; static void __init h3_init(void) diff -Nru a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap/board-innovator.c --- a/arch/arm/mach-omap/board-innovator.c 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/mach-omap/board-innovator.c 2005-03-30 16:58:47 -08:00 @@ -20,21 +20,85 @@ #include #include #include +#include +#include #include #include #include +#include #include -#include -#include #include +#include +#include #include #include "common.h" static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; +static struct mtd_partition innovator_partitions[] = { + /* bootloader (U-Boot, etc) in first sector */ + { + .name = "bootloader", + .offset = 0, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + /* bootloader params in the next sector */ + { + .name = "params", + .offset = MTDPART_OFS_APPEND, + .size = SZ_128K, + .mask_flags = 0, + }, + /* kernel */ + { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = SZ_2M, + .mask_flags = 0 + }, + /* rest of flash1 is a file system */ + { + .name = "rootfs", + .offset = MTDPART_OFS_APPEND, + .size = SZ_16M - SZ_2M - 2 * SZ_128K, + .mask_flags = 0 + }, + /* file system */ + { + .name = "filesystem", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0 + } +}; + +static struct flash_platform_data innovator_flash_data = { + .map_name = "cfi_probe", + .width = 2, + .parts = innovator_partitions, + .nr_parts = ARRAY_SIZE(innovator_partitions), +}; + +static struct resource innovator_flash_resource = { + .start = OMAP_CS0_PHYS, + .end = OMAP_CS0_PHYS + SZ_32M - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device innovator_flash_device = { + .name = "omapflash", + .id = 0, + .dev = { + .platform_data = &innovator_flash_data, + }, + .num_resources = 1, + .resource = &innovator_flash_resource, +}; + #ifdef CONFIG_ARCH_OMAP1510 /* Only FPGA needs to be mapped here. All others are done with ioremap */ @@ -46,7 +110,7 @@ static struct resource innovator1510_smc91x_resources[] = { [0] = { .start = OMAP1510_FPGA_ETHR_START, /* Physical */ - .end = OMAP1510_FPGA_ETHR_START + 16, + .end = OMAP1510_FPGA_ETHR_START + 0xf, .flags = IORESOURCE_MEM, }, [1] = { @@ -64,6 +128,7 @@ }; static struct platform_device *innovator1510_devices[] __initdata = { + &innovator_flash_device, &innovator1510_smc91x_device, }; @@ -74,7 +139,7 @@ static struct resource innovator1610_smc91x_resources[] = { [0] = { .start = INNOVATOR1610_ETHR_START, /* Physical */ - .end = INNOVATOR1610_ETHR_START + SZ_4K, + .end = INNOVATOR1610_ETHR_START + 0xf, .flags = IORESOURCE_MEM, }, [1] = { @@ -92,6 +157,7 @@ }; static struct platform_device *innovator1610_devices[] __initdata = { + &innovator_flash_device, &innovator1610_smc91x_device, }; diff -Nru a/arch/arm/mach-omap/board-netstar.c b/arch/arm/mach-omap/board-netstar.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/board-netstar.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,151 @@ +/* + * Modified from board-generic.c + * + * Copyright (C) 2004 2N Telekomunikace, Ladislav Michl + * + * Code for Netstar OMAP board. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "common.h" + +extern void __init omap_init_time(void); +extern int omap_gpio_init(void); + +static struct resource netstar_smc91x_resources[] = { + [0] = { + .start = OMAP_CS1_PHYS + 0x300, + .end = OMAP_CS1_PHYS + 0x300 + 16, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = OMAP_GPIO_IRQ(8), + .end = OMAP_GPIO_IRQ(8), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device netstar_smc91x_device = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(netstar_smc91x_resources), + .resource = netstar_smc91x_resources, +}; + +static struct platform_device *netstar_devices[] __initdata = { + &netstar_smc91x_device, +}; + +static void __init netstar_init_irq(void) +{ + omap_init_irq(); + omap_gpio_init(); +} + +static void __init netstar_init(void) +{ + /* green LED */ + omap_request_gpio(4); + omap_set_gpio_direction(4, 0); + /* smc91x reset */ + omap_request_gpio(7); + omap_set_gpio_direction(7, 0); + omap_set_gpio_dataout(7, 1); + udelay(2); /* wait at least 100ns */ + omap_set_gpio_dataout(7, 0); + mdelay(50); /* 50ms until PHY ready */ + /* smc91x interrupt pin */ + omap_request_gpio(8); + omap_set_gpio_edge_ctrl(8, OMAP_GPIO_RISING_EDGE); + + omap_request_gpio(12); + omap_request_gpio(13); + omap_request_gpio(14); + omap_request_gpio(15); + omap_set_gpio_edge_ctrl(12, OMAP_GPIO_FALLING_EDGE); + omap_set_gpio_edge_ctrl(13, OMAP_GPIO_FALLING_EDGE); + omap_set_gpio_edge_ctrl(14, OMAP_GPIO_FALLING_EDGE); + omap_set_gpio_edge_ctrl(15, OMAP_GPIO_FALLING_EDGE); + + platform_add_devices(netstar_devices, ARRAY_SIZE(netstar_devices)); + + /* Switch on green LED */ + omap_set_gpio_dataout(4, 0); + /* Switch off red LED */ + omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */ + omap_writeb(0x80, OMAP_LPG1_LCR); +} + +static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + +static void __init netstar_map_io(void) +{ + omap_map_io(); + omap_serial_init(omap_serial_ports); +} + +#define MACHINE_PANICED 1 +#define MACHINE_REBOOTING 2 +#define MACHINE_REBOOT 4 +static unsigned long machine_state; + +static int panic_event(struct notifier_block *this, unsigned long event, + void *ptr) +{ + if (test_and_set_bit(MACHINE_PANICED, &machine_state)) + return NOTIFY_DONE; + + /* Switch off green LED */ + omap_set_gpio_dataout(4, 1); + /* Flash red LED */ + omap_writeb(0x78, OMAP_LPG1_LCR); + omap_writeb(0x01, OMAP_LPG1_PMR); /* Enable clock */ + + return NOTIFY_DONE; +} + +static struct notifier_block panic_block = { + .notifier_call = panic_event, +}; + +static int __init netstar_late_init(void) +{ + /* TODO: Setup front panel switch here */ + + /* Setup panic notifier */ + notifier_chain_register(&panic_notifier_list, &panic_block); + + return 0; +} + +postcore_initcall(netstar_late_init); + +MACHINE_START(NETSTAR, "NetStar OMAP5910") + MAINTAINER("Ladislav Michl ") + BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) + BOOT_PARAMS(0x10000100) + MAPIO(netstar_map_io) + INITIRQ(netstar_init_irq) + INIT_MACHINE(netstar_init) + .timer = &omap_timer, +MACHINE_END diff -Nru a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap/board-osk.c --- a/arch/arm/mach-omap/board-osk.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/board-osk.c 2005-03-30 16:58:50 -08:00 @@ -35,10 +35,10 @@ #include #include -#include #include -#include #include +#include +#include #include "common.h" @@ -52,7 +52,7 @@ static struct resource osk5912_smc91x_resources[] = { [0] = { .start = OMAP_OSK_ETHR_START, /* Physical */ - .end = OMAP_OSK_ETHR_START + SZ_4K, + .end = OMAP_OSK_ETHR_START + 0xf, .flags = IORESOURCE_MEM, }, [1] = { @@ -64,13 +64,32 @@ static struct platform_device osk5912_smc91x_device = { .name = "smc91x", - .id = 0, + .id = -1, .num_resources = ARRAY_SIZE(osk5912_smc91x_resources), .resource = osk5912_smc91x_resources, }; +static struct resource osk5912_cf_resources[] = { + [0] = { + .start = OMAP_GPIO_IRQ(62), + .end = OMAP_GPIO_IRQ(62), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device osk5912_cf_device = { + .name = "omap_cf", + .id = -1, + .dev = { + .platform_data = (void *) 2 /* CS2 */, + }, + .num_resources = ARRAY_SIZE(osk5912_cf_resources), + .resource = osk5912_cf_resources, +}; + static struct platform_device *osk5912_devices[] __initdata = { &osk5912_smc91x_device, + &osk5912_cf_device, }; static void __init osk_init_smc91x(void) @@ -80,6 +99,20 @@ return; } omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE); + + /* Check EMIFS wait states to fix errors with SMC_GET_PKT_HDR */ + EMIFS_CCS(1) |= 0x2; +} + +static void __init osk_init_cf(void) +{ + omap_cfg_reg(M7_1610_GPIO62); + if ((omap_request_gpio(62)) < 0) { + printk("Error requesting gpio 62 for CF irq\n"); + return; + } + /* it's really active-low */ + omap_set_gpio_edge_ctrl(62, OMAP_GPIO_FALLING_EDGE); } void osk_init_irq(void) @@ -87,12 +120,22 @@ omap_init_irq(); omap_gpio_init(); osk_init_smc91x(); + osk_init_cf(); } static struct omap_usb_config osk_usb_config __initdata = { - /* has usb host and device, but no Mini-AB port */ + /* has usb host connector (A) ... for development it can also + * be used, with a NONSTANDARD gender-bending cable/dongle, as + * a peripheral. + */ +#ifdef CONFIG_USB_GADGET_OMAP + .register_dev = 1, + .hmc_mode = 0, +#else .register_host = 1, .hmc_mode = 16, + .rwc = 1, +#endif .pins[0] = 2, }; @@ -102,9 +145,10 @@ static void __init osk_init(void) { - platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); + platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); omap_board_config = osk_config; omap_board_config_size = ARRAY_SIZE(osk_config); + USB_TRANSCEIVER_CTRL_REG |= (3 << 1); } static void __init osk_map_io(void) diff -Nru a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap/board-perseus2.c --- a/arch/arm/mach-omap/board-perseus2.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mach-omap/board-perseus2.c 2005-03-30 16:58:49 -08:00 @@ -15,24 +15,25 @@ #include #include #include +#include +#include #include #include #include +#include #include -#include #include #include #include -#include #include "common.h" static struct resource smc91x_resources[] = { [0] = { .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ - .end = H2P2_DBG_FPGA_ETHR_START + SZ_4K, + .end = H2P2_DBG_FPGA_ETHR_START + 0xf, .flags = IORESOURCE_MEM, }, [1] = { @@ -44,6 +45,60 @@ static int __initdata p2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 0}; +static struct mtd_partition p2_partitions[] = { + /* bootloader (U-Boot, etc) in first sector */ + { + .name = "bootloader", + .offset = 0, + .size = SZ_128K, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, + /* bootloader params in the next sector */ + { + .name = "params", + .offset = MTDPART_OFS_APPEND, + .size = SZ_128K, + .mask_flags = 0, + }, + /* kernel */ + { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = SZ_2M, + .mask_flags = 0 + }, + /* rest of flash is a file system */ + { + .name = "rootfs", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0 + }, +}; + +static struct flash_platform_data p2_flash_data = { + .map_name = "cfi_probe", + .width = 2, + .parts = p2_partitions, + .nr_parts = ARRAY_SIZE(p2_partitions), +}; + +static struct resource p2_flash_resource = { + .start = OMAP_FLASH_0_START, + .end = OMAP_FLASH_0_START + OMAP_FLASH_0_SIZE - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device p2_flash_device = { + .name = "omapflash", + .id = 0, + .dev = { + .platform_data = &p2_flash_data, + }, + .num_resources = 1, + .resource = &p2_flash_resource, +}; + static struct platform_device smc91x_device = { .name = "smc91x", .id = 0, @@ -52,6 +107,7 @@ }; static struct platform_device *devices[] __initdata = { + &p2_flash_device, &smc91x_device, }; diff -Nru a/arch/arm/mach-omap/board-voiceblue.c b/arch/arm/mach-omap/board-voiceblue.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/board-voiceblue.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,256 @@ +/* + * linux/arch/arm/mach-omap/board-voiceblue.c + * + * Modified from board-generic.c + * + * Copyright (C) 2004 2N Telekomunikace, Ladislav Michl + * + * Code for OMAP5910 based VoiceBlue board (VoIP to GSM gateway). + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "common.h" + +extern void omap_init_time(void); +extern int omap_gpio_init(void); + +static struct plat_serial8250_port voiceblue_ports[] = { + { + .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x40000), + .irq = OMAP_GPIO_IRQ(12), + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, + .iotype = UPIO_MEM, + .regshift = 1, + .uartclk = 3686400, + }, + { + .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x50000), + .irq = OMAP_GPIO_IRQ(13), + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, + .iotype = UPIO_MEM, + .regshift = 1, + .uartclk = 3686400, + }, + { + .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x60000), + .irq = OMAP_GPIO_IRQ(14), + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, + .iotype = UPIO_MEM, + .regshift = 1, + .uartclk = 3686400, + }, + { + .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x70000), + .irq = OMAP_GPIO_IRQ(15), + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, + .iotype = UPIO_MEM, + .regshift = 1, + .uartclk = 3686400, + }, + { }, +}; + +static struct platform_device serial_device = { + .name = "serial8250", + .id = 1, + .dev = { + .platform_data = voiceblue_ports, + }, +}; + +static int __init ext_uart_init(void) +{ + return platform_device_register(&serial_device); +} +arch_initcall(ext_uart_init); + +static struct resource voiceblue_smc91x_resources[] = { + [0] = { + .start = OMAP_CS2_PHYS + 0x300, + .end = OMAP_CS2_PHYS + 0x300 + 16, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = OMAP_GPIO_IRQ(8), + .end = OMAP_GPIO_IRQ(8), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device voiceblue_smc91x_device = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources), + .resource = voiceblue_smc91x_resources, +}; + +static struct platform_device *voiceblue_devices[] __initdata = { + &voiceblue_smc91x_device, +}; + +static struct omap_usb_config voiceblue_usb_config __initdata = { + .hmc_mode = 3, + .register_host = 1, + .register_dev = 1, + .pins[0] = 2, + .pins[1] = 6, + .pins[2] = 6, +}; + +static struct omap_board_config_kernel voiceblue_config[] = { + { OMAP_TAG_USB, &voiceblue_usb_config }, +}; + +static void __init voiceblue_init_irq(void) +{ + omap_init_irq(); + omap_gpio_init(); +} + +static void __init voiceblue_init(void) +{ + /* There is a good chance board is going up, so enable Power LED + * (it is connected through invertor) */ + omap_writeb(0x00, OMAP_LPG1_LCR); + /* Watchdog */ + omap_request_gpio(0); + /* smc91x reset */ + omap_request_gpio(7); + omap_set_gpio_direction(7, 0); + omap_set_gpio_dataout(7, 1); + udelay(2); /* wait at least 100ns */ + omap_set_gpio_dataout(7, 0); + mdelay(50); /* 50ms until PHY ready */ + /* smc91x interrupt pin */ + omap_request_gpio(8); + omap_set_gpio_edge_ctrl(8, OMAP_GPIO_RISING_EDGE); + /* 16C554 reset*/ + omap_request_gpio(6); + omap_set_gpio_direction(6, 0); + omap_set_gpio_dataout(6, 0); + /* 16C554 interrupt pins */ + omap_request_gpio(12); + omap_request_gpio(13); + omap_request_gpio(14); + omap_request_gpio(15); + omap_set_gpio_edge_ctrl(12, OMAP_GPIO_RISING_EDGE); + omap_set_gpio_edge_ctrl(13, OMAP_GPIO_RISING_EDGE); + omap_set_gpio_edge_ctrl(14, OMAP_GPIO_RISING_EDGE); + omap_set_gpio_edge_ctrl(15, OMAP_GPIO_RISING_EDGE); + + platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); + omap_board_config = voiceblue_config; + omap_board_config_size = ARRAY_SIZE(voiceblue_config); +} + +static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + +static void __init voiceblue_map_io(void) +{ + omap_map_io(); + omap_serial_init(omap_serial_ports); +} + +#define MACHINE_PANICED 1 +#define MACHINE_REBOOTING 2 +#define MACHINE_REBOOT 4 +static unsigned long machine_state; + +static int panic_event(struct notifier_block *this, unsigned long event, + void *ptr) +{ + if (test_and_set_bit(MACHINE_PANICED, &machine_state)) + return NOTIFY_DONE; + + /* Flash Power LED + * (TODO: Enable clock right way (enabled in bootloader already)) */ + omap_writeb(0x78, OMAP_LPG1_LCR); + + return NOTIFY_DONE; +} + +static struct notifier_block panic_block = { + .notifier_call = panic_event, +}; + +static int __init setup_notifier(void) +{ + /* Setup panic notifier */ + notifier_chain_register(&panic_notifier_list, &panic_block); + + return 0; +} + +postcore_initcall(setup_notifier); + +static int wdt_gpio_state; + +void voiceblue_wdt_enable(void) +{ + omap_set_gpio_direction(0, 0); + omap_set_gpio_dataout(0, 0); + omap_set_gpio_dataout(0, 1); + omap_set_gpio_dataout(0, 0); + wdt_gpio_state = 0; +} + +void voiceblue_wdt_disable(void) +{ + omap_set_gpio_dataout(0, 0); + omap_set_gpio_dataout(0, 1); + omap_set_gpio_dataout(0, 0); + omap_set_gpio_direction(0, 1); +} + +void voiceblue_wdt_ping(void) +{ + if (test_bit(MACHINE_REBOOT, &machine_state)) + return; + + wdt_gpio_state = !wdt_gpio_state; + omap_set_gpio_dataout(0, wdt_gpio_state); +} + +void voiceblue_reset(void) +{ + set_bit(MACHINE_REBOOT, &machine_state); + voiceblue_wdt_enable(); + while (1) ; +} + +EXPORT_SYMBOL(voiceblue_wdt_enable); +EXPORT_SYMBOL(voiceblue_wdt_disable); +EXPORT_SYMBOL(voiceblue_wdt_ping); + +MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") + MAINTAINER("Ladislav Michl ") + BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) + BOOT_PARAMS(0x10000100) + MAPIO(voiceblue_map_io) + INITIRQ(voiceblue_init_irq) + INIT_MACHINE(voiceblue_init) + .timer = &omap_timer, +MACHINE_END diff -Nru a/arch/arm/mach-omap/clock.c b/arch/arm/mach-omap/clock.c --- a/arch/arm/mach-omap/clock.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mach-omap/clock.c 2005-03-30 16:58:49 -08:00 @@ -17,6 +17,7 @@ #include #include #include +#include #include "clock.h" @@ -24,34 +25,41 @@ static DECLARE_MUTEX(clocks_sem); static DEFINE_SPINLOCK(clockfw_lock); static void propagate_rate(struct clk * clk); +/* External clock (MCLK & BCLK) functions */ +static int set_ext_clk_rate(struct clk * clk, unsigned long rate); +static long round_ext_clk_rate(struct clk * clk, unsigned long rate); +static void init_ext_clk(struct clk * clk); /* MPU virtual clock functions */ -static int select_table_rate(unsigned long rate); -static long round_to_table_rate(unsigned long rate); +static int select_table_rate(struct clk * clk, unsigned long rate); +static long round_to_table_rate(struct clk * clk, unsigned long rate); void clk_setdpll(__u16, __u16); struct mpu_rate rate_table[] = { /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv */ -#if defined(CONFIG_OMAP_ARM_216MHZ) && defined(CONFIG_ARCH_OMAP16XX) +#if defined(CONFIG_OMAP_ARM_216MHZ) { 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */ #endif -#if defined(CONFIG_OMAP_ARM_195MHZ) && defined(CONFIG_ARCH_OMAP730) +#if defined(CONFIG_OMAP_ARM_195MHZ) { 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */ #endif -#if defined(CONFIG_OMAP_ARM_192MHZ) && defined(CONFIG_ARCH_OMAP16XX) +#if defined(CONFIG_OMAP_ARM_192MHZ) { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */ { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */ { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */ { 48000000, 12000000, 192000000, 0x0ccf, 0x2810 }, /* 4/4/4/4/8/8 */ { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */ #endif -#if defined(CONFIG_OMAP_ARM_182MHZ) && defined(CONFIG_ARCH_OMAP730) +#if defined(CONFIG_OMAP_ARM_182MHZ) { 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */ #endif #if defined(CONFIG_OMAP_ARM_168MHZ) { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */ #endif +#if defined(CONFIG_OMAP_ARM_150MHZ) + { 150000000, 12000000, 150000000, 0x150a, 0x2cb0 }, /* 0/0/1/1/2/2 */ +#endif #if defined(CONFIG_OMAP_ARM_120MHZ) { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */ #endif @@ -174,12 +182,12 @@ .recalc = &watchdog_recalc, }; -static struct clk arminth_ck1610 = { +static struct clk arminth_ck16xx = { .name = "arminth_ck", .parent = &arm_ck, .flags = CLOCK_IN_OMAP16XX, .recalc = &followparent_recalc, - /* Note: On 1610/1710 frequency can be divided by 2 by programming + /* Note: On 16xx the frequency can be divided by 2 by programming * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1 * * 1510 version is in TC clocks. @@ -209,7 +217,7 @@ static struct clk tc_ck = { .name = "tc_ck", .parent = &ck_dpll1, - .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730 | RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED, .rate_offset = CKCTL_TCDIV_OFFSET, .recalc = &ckctl_recalc, @@ -220,9 +228,9 @@ .parent = &tc_ck, .flags = CLOCK_IN_OMAP1510, .recalc = &followparent_recalc, - /* Note: On 1510 frequency follows TC_CK + /* Note: On 1510 the frequency follows TC_CK * - * 1610/1710 version is in MPU clocks. + * 16xx version is in MPU clocks. */ }; @@ -309,7 +317,7 @@ static struct clk lcd_ck = { .name = "lcd_ck", .parent = &ck_dpll1, - .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | CLOCK_IN_OMAP730 | RATE_CKCTL, .enable_reg = ARM_IDLECT2, .enable_bit = EN_LCDCK, @@ -338,7 +346,7 @@ RATE_FIXED | ENABLE_REG_32BIT, .enable_reg = MOD_CONF_CTRL_0, .enable_bit = 30, - /* (1510/1610/1710) + /* (for both 1510 and 16xx) * The "enable bit" actually chooses between 48MHz and 12MHz/32kHz. */ }; @@ -356,42 +364,72 @@ */ }; -static struct clk usb_ck1610 = { - .name = "usb_ck", +static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */ + .name = "usb_clko", /* Direct from ULPD, no parent */ - .rate = 48000000, - .flags = CLOCK_IN_OMAP16XX | + .rate = 6000000, + .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | RATE_FIXED | ENABLE_REG_32BIT, .enable_reg = ULPD_CLOCK_CTRL, - .enable_bit = USB_MCLK_EN, -}; - -static struct clk usb_ck1510 = { - .name = "usb_ck", - /* Direct from ULPD, no parent */ - .rate = 48000000, - .flags = CLOCK_IN_OMAP1510 | RATE_FIXED, + .enable_bit = USB_MCLK_EN_BIT, }; -static struct clk usb_hhc_ck = { +static struct clk usb_hhc_ck1510 = { .name = "usb_hhc_ck", /* Direct from ULPD, no parent */ .rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */ - .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | + .flags = CLOCK_IN_OMAP1510 | RATE_FIXED | ENABLE_REG_32BIT, .enable_reg = MOD_CONF_CTRL_0, .enable_bit = USB_HOST_HHC_UHOST_EN, }; -/* To be done -- -static struct clk mclk = { +static struct clk usb_hhc_ck16xx = { + .name = "usb_hhc_ck", + /* Direct from ULPD, no parent */ + .rate = 48000000, + /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */ + .flags = CLOCK_IN_OMAP16XX | + RATE_FIXED | ENABLE_REG_32BIT, + .enable_reg = OTG_BASE + 0x08 /* OTG_SYSCON_2 */, + .enable_bit = 8 /* UHOST_EN */, +}; + +static struct clk mclk_1510 = { .name = "mclk", + /* Direct from ULPD, no parent. May be enabled by ext hardware. */ + .rate = 12000000, + .flags = CLOCK_IN_OMAP1510 | RATE_FIXED, +}; + +static struct clk mclk_16xx = { + .name = "mclk", + /* Direct from ULPD, no parent. May be enabled by ext hardware. */ + .flags = CLOCK_IN_OMAP16XX, + .enable_reg = COM_CLK_DIV_CTRL_SEL, + .enable_bit = COM_ULPD_PLL_CLK_REQ, + .set_rate = &set_ext_clk_rate, + .round_rate = &round_ext_clk_rate, + .init = &init_ext_clk, +}; + +static struct clk bclk_1510 = { + .name = "bclk", + /* Direct from ULPD, no parent. May be enabled by ext hardware. */ + .rate = 12000000, + .flags = CLOCK_IN_OMAP1510 | RATE_FIXED, }; -static struct clk bclk = { +static struct clk bclk_16xx = { .name = "bclk", + /* Direct from ULPD, no parent. May be enabled by ext hardware. */ + .flags = CLOCK_IN_OMAP16XX, + .enable_reg = SWD_CLK_DIV_CTRL_SEL, + .enable_bit = SWD_ULPD_PLL_CLK_REQ, + .set_rate = &set_ext_clk_rate, + .round_rate = &round_ext_clk_rate, + .init = &init_ext_clk, }; --- to be done */ static struct clk mmc1_ck = { .name = "mmc1_ck", @@ -438,8 +476,7 @@ &armxor_ck, &armtim_ck, &armwdt_ck, - &arminth_ck1510, - &arminth_ck1610, + &arminth_ck1510, &arminth_ck16xx, /* CK_GEN2 clocks */ &dsp_ck, &dspmmu_ck, @@ -460,13 +497,10 @@ &uart1_ck, &uart2_ck, &uart3_ck, - &usb_ck1510, - &usb_ck1610, - &usb_hhc_ck, - /* To be done -- - &mclk, - &bclk, - -- to be done */ + &usb_clko, + &usb_hhc_ck1510, &usb_hhc_ck16xx, + &mclk_1510, &mclk_16xx, + &bclk_1510, &bclk_16xx, &mmc1_ck, &mmc2_ck, /* Virtual clocks */ @@ -629,6 +663,13 @@ EXPORT_SYMBOL(clk_unuse); +int clk_get_usecount(struct clk *clk) +{ + return clk->usecount; +} +EXPORT_SYMBOL(clk_get_usecount); + + unsigned long clk_get_rate(struct clk *clk) { return clk->rate; @@ -742,7 +783,7 @@ } if(clk->round_rate != 0) - return clk->round_rate(rate); + return clk->round_rate(clk, rate); return clk->rate; } @@ -761,11 +802,14 @@ } -static int select_table_rate(unsigned long rate) +static int select_table_rate(struct clk * clk, unsigned long rate) { /* Find the highest supported frequency <= rate and switch to it */ struct mpu_rate * ptr; + if (clk != &virtual_ck_mpu) + return -EINVAL; + for (ptr = rate_table; ptr->rate; ptr++) { if (ptr->xtal != ck_ref.rate) continue; @@ -792,12 +836,15 @@ } -static long round_to_table_rate(unsigned long rate) +static long round_to_table_rate(struct clk * clk, unsigned long rate) { /* Find the highest supported frequency <= rate */ struct mpu_rate * ptr; long highest_rate; + if (clk != &virtual_ck_mpu) + return -EINVAL; + highest_rate = -EINVAL; for (ptr = rate_table; ptr->rate; ptr++) { @@ -840,7 +887,7 @@ ret = 0; } else if(clk->set_rate != 0) { spin_lock_irqsave(&clockfw_lock, flags); - ret = clk->set_rate(rate); + ret = clk->set_rate(clk, rate); spin_unlock_irqrestore(&clockfw_lock, flags); } @@ -852,10 +899,79 @@ EXPORT_SYMBOL(clk_set_rate); +static unsigned calc_ext_dsor(unsigned long rate) +{ + unsigned dsor; + + /* MCLK and BCLK divisor selection is not linear: + * freq = 96MHz / dsor + * + * RATIO_SEL range: dsor <-> RATIO_SEL + * 0..6: (RATIO_SEL+2) <-> (dsor-2) + * 6..48: (8+(RATIO_SEL-6)*2) <-> ((dsor-8)/2+6) + * Minimum dsor is 2 and maximum is 96. Odd divisors starting from 9 + * can not be used. + */ + for (dsor = 2; dsor < 96; ++dsor) { + if ((dsor & 1) && dsor > 8) + continue; + if (rate >= 96000000 / dsor) + break; + } + return dsor; +} + + +static int set_ext_clk_rate(struct clk * clk, unsigned long rate) +{ + unsigned dsor; + __u16 ratio_bits; + + dsor = calc_ext_dsor(rate); + clk->rate = 96000000 / dsor; + if (dsor > 8) + ratio_bits = ((dsor - 8) / 2 + 6) << 2; + else + ratio_bits = (dsor - 2) << 2; + + ratio_bits |= omap_readw(clk->enable_reg) & ~0xfd; + omap_writew(ratio_bits, clk->enable_reg); + + return 0; +} + + +static long round_ext_clk_rate(struct clk * clk, unsigned long rate) +{ + return 96000000 / calc_ext_dsor(rate); +} + + +static void init_ext_clk(struct clk * clk) +{ + unsigned dsor; + __u16 ratio_bits; + + /* Determine current rate and ensure clock is based on 96MHz APLL */ + ratio_bits = omap_readw(clk->enable_reg) & ~1; + omap_writew(ratio_bits, clk->enable_reg); + + ratio_bits = (ratio_bits & 0xfc) >> 2; + if (ratio_bits > 6) + dsor = (ratio_bits - 6) * 2 + 8; + else + dsor = ratio_bits + 2; + + clk-> rate = 96000000 / dsor; +} + + int clk_register(struct clk *clk) { down(&clocks_sem); list_add(&clk->node, &clocks); + if (clk->init) + clk->init(clk); up(&clocks_sem); return 0; } @@ -887,6 +1003,11 @@ clk_register(*clkp); continue; } + + if (((*clkp)->flags &CLOCK_IN_OMAP730) && cpu_is_omap730()) { + clk_register(*clkp); + continue; + } } info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config); @@ -906,7 +1027,7 @@ omap_writew(0x1000, ARM_SYSST); /* Find the highest supported frequency and enable it */ - if (select_table_rate(~0)) { + if (select_table_rate(&virtual_ck_mpu, ~0)) { printk(KERN_ERR "System frequencies not set. Check your config.\n"); /* Guess sane values (60MHz) */ omap_writew(0x2290, DPLL_CTL); diff -Nru a/arch/arm/mach-omap/clock.h b/arch/arm/mach-omap/clock.h --- a/arch/arm/mach-omap/clock.h 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/mach-omap/clock.h 2005-03-30 16:58:51 -08:00 @@ -22,13 +22,14 @@ struct clk *parent; unsigned long rate; __s8 usecount; - __u8 flags; + __u16 flags; __u32 enable_reg; __u8 enable_bit; __u8 rate_offset; void (*recalc)(struct clk *); - int (*set_rate)(unsigned long); - long (*round_rate)(unsigned long); + int (*set_rate)(struct clk *, unsigned long); + long (*round_rate)(struct clk *, unsigned long); + void (*init)(struct clk *); }; @@ -50,6 +51,7 @@ #define ENABLE_REG_32BIT 32 #define CLOCK_IN_OMAP16XX 64 #define CLOCK_IN_OMAP1510 128 +#define CLOCK_IN_OMAP730 256 /* ARM_CKCTL bit shifts */ #define CKCTL_PERDIV_OFFSET 0 @@ -95,8 +97,12 @@ #define EN_TC2_CK 4 /* Various register defines for clock controls scattered around OMAP chip */ -#define USB_MCLK_EN 4 /* In ULPD_CLKC_CTRL */ +#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */ #define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */ +#define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */ +#define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */ +#define SWD_CLK_DIV_CTRL_SEL 0xfffe0874 +#define COM_CLK_DIV_CTRL_SEL 0xfffe0878 int clk_register(struct clk *clk); diff -Nru a/arch/arm/mach-omap/common.c b/arch/arm/mach-omap/common.c --- a/arch/arm/mach-omap/common.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/common.c 2005-03-30 16:58:50 -08:00 @@ -263,9 +263,6 @@ iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc)); omap_check_revision(); - /* clear BM to canonicalize CS0 (not CS3) at 0000:0000 */ - omap_writel(omap_readl(EMIFS_CONFIG) & 0x0d, EMIFS_CONFIG); - #ifdef CONFIG_ARCH_OMAP730 if (cpu_is_omap730()) { iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc)); @@ -436,6 +433,9 @@ omap_cfg_reg(UART3_TX); omap_cfg_reg(UART3_RX); } + if (cpu_is_omap1710()) { + clk_enable(clk_get(0, "uart3_ck")); + } break; } omap_serial_reset(&serial_platform_data[i]); @@ -475,6 +475,12 @@ skip--; } + if ((info->len & 0x03) != 0) { + /* We bail out to avoid an alignment fault */ + printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n", + info->len, info->tag); + return NULL; + } next = (u8 *) info + sizeof(*info) + info->len; if (next >= omap_bootloader_tag + omap_bootloader_tag_len) info = NULL; @@ -484,10 +490,15 @@ if (info != NULL) { /* Check the length as a lame attempt to check for * binary inconsistancy. */ - if (len != NO_LENGTH_CHECK && info->len != len) { - printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n", - tag, len, info->len); - return NULL; + if (len != NO_LENGTH_CHECK) { + /* Word-align len */ + if (len & 0x03) + len = (len + 3) & ~0x03; + if (info->len != len) { + printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n", + tag, len, info->len); + return NULL; + } } if (len_out != NULL) *len_out = info->len; diff -Nru a/arch/arm/mach-omap/dma.c b/arch/arm/mach-omap/dma.c --- a/arch/arm/mach-omap/dma.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/dma.c 2005-03-30 16:58:50 -08:00 @@ -494,7 +494,7 @@ chan->data = data; chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; - if (cpu_is_omap16xx() || cpu_is_omap730()) { + if (cpu_is_omap16xx()) { /* If the sync device is set, configure it dynamically. */ if (dev_id != 0) { set_gdma_dev(free_ch + 1, dev_id); diff -Nru a/arch/arm/mach-omap/fpga.c b/arch/arm/mach-omap/fpga.c --- a/arch/arm/mach-omap/fpga.c 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/mach-omap/fpga.c 2005-03-30 16:58:47 -08:00 @@ -92,26 +92,17 @@ u32 stat; int fpga_irq; - /* - * Acknowledge the parent IRQ. - */ - desc->chip->ack(irq); + stat = get_fpga_unmasked_irqs(); - for (;;) { - stat = get_fpga_unmasked_irqs(); + if (!stat) + return; - if (!stat) { - break; - } - - for (fpga_irq = OMAP1510_IH_FPGA_BASE; - (fpga_irq < (OMAP1510_IH_FPGA_BASE + NR_FPGA_IRQS)) && stat; - fpga_irq++, stat >>= 1) { - if (stat & 1) { - d = irq_desc + fpga_irq; - d->handle(fpga_irq, d, regs); - desc->chip->unmask(irq); - } + for (fpga_irq = OMAP1510_IH_FPGA_BASE; + (fpga_irq < (OMAP1510_IH_FPGA_BASE + NR_FPGA_IRQS)) && stat; + fpga_irq++, stat >>= 1) { + if (stat & 1) { + d = irq_desc + fpga_irq; + d->handle(fpga_irq, d, regs); } } } @@ -177,7 +168,7 @@ set_irq_chip(i, &omap_fpga_irq); } - set_irq_handler(i, do_level_IRQ); + set_irq_handler(i, do_edge_IRQ); set_irq_flags(i, IRQF_VALID); } diff -Nru a/arch/arm/mach-omap/gpio.c b/arch/arm/mach-omap/gpio.c --- a/arch/arm/mach-omap/gpio.c 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/mach-omap/gpio.c 2005-03-30 16:58:48 -08:00 @@ -114,7 +114,7 @@ #ifdef CONFIG_ARCH_OMAP730 static struct gpio_bank gpio_bank_730[7] = { { OMAP_MPUIO_BASE, INT_730_MPUIO, IH_MPUIO_BASE, METHOD_MPUIO }, - { OMAP730_GPIO1_BASE, INT_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, + { OMAP730_GPIO1_BASE, INT_730_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_730 }, { OMAP730_GPIO2_BASE, INT_730_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_730 }, { OMAP730_GPIO3_BASE, INT_730_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_730 }, { OMAP730_GPIO4_BASE, INT_730_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_730 }, @@ -307,6 +307,9 @@ case METHOD_GPIO_1610: reg += OMAP1610_GPIO_DATAIN; break; + case METHOD_GPIO_730: + reg += OMAP730_GPIO_DATA_INPUT; + break; default: BUG(); return -1; @@ -407,13 +410,13 @@ } } -static void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) +static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask) { u32 reg = bank->base; switch (bank->method) { case METHOD_MPUIO: - /* MPUIO irqstatus cannot be cleared one bit at a time, + /* MPUIO irqstatus is reset by reading the status register, * so do nothing here */ return; case METHOD_GPIO_1510: @@ -429,10 +432,15 @@ BUG(); return; } - __raw_writel(1 << get_gpio_index(gpio), reg); + __raw_writel(gpio_mask, reg); +} + +static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) +{ + _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio)); } -static void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable) +static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable) { u32 reg = bank->base; u32 l; @@ -442,33 +450,32 @@ reg += OMAP_MPUIO_GPIO_MASKIT; l = __raw_readl(reg); if (enable) - l &= ~(1 << gpio); + l &= ~(gpio_mask); else - l |= 1 << gpio; + l |= gpio_mask; break; case METHOD_GPIO_1510: reg += OMAP1510_GPIO_INT_MASK; l = __raw_readl(reg); if (enable) - l &= ~(1 << gpio); + l &= ~(gpio_mask); else - l |= 1 << gpio; + l |= gpio_mask; break; case METHOD_GPIO_1610: - if (enable) { + if (enable) reg += OMAP1610_GPIO_SET_IRQENABLE1; - _clear_gpio_irqstatus(bank, gpio); - } else + else reg += OMAP1610_GPIO_CLEAR_IRQENABLE1; - l = 1 << gpio; + l = gpio_mask; break; case METHOD_GPIO_730: reg += OMAP730_GPIO_INT_MASK; l = __raw_readl(reg); if (enable) - l &= ~(1 << gpio); + l &= ~(gpio_mask); else - l |= 1 << gpio; + l |= gpio_mask; break; default: BUG(); @@ -477,6 +484,11 @@ __raw_writel(l, reg); } +static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int enable) +{ + _enable_gpio_irqbank(bank, 1 << get_gpio_index(gpio), enable); +} + int omap_request_gpio(int gpio) { struct gpio_bank *bank; @@ -523,31 +535,31 @@ } bank->reserved_map &= ~(1 << get_gpio_index(gpio)); _set_gpio_direction(bank, get_gpio_index(gpio), 1); - _set_gpio_irqenable(bank, get_gpio_index(gpio), 0); + _set_gpio_irqenable(bank, gpio, 0); + _clear_gpio_irqstatus(bank, gpio); spin_unlock(&bank->lock); } +/* + * We need to unmask the GPIO bank interrupt as soon as possible to + * avoid missing GPIO interrupts for other lines in the bank. + * Then we need to mask-read-clear-unmask the triggered GPIO lines + * in the bank to avoid missing nested interrupts for a GPIO line. + * If we wait to unmask individual GPIO lines in the bank after the + * line's interrupt handler has been run, we may miss some nested + * interrupts. + */ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { u32 isr_reg = 0; - struct gpio_bank *bank = (struct gpio_bank *) desc->data; + u32 isr; + unsigned int gpio_irq; + struct gpio_bank *bank; - /* - * Acknowledge the parent IRQ. - */ desc->chip->ack(irq); - /* Since the level 1 GPIO interrupt cascade (IRQ14) is configured as - * edge-sensitive, we need to unmask it here in order to avoid missing - * any additional GPIO interrupts that might occur after the last time - * we check for pending GPIO interrupts here. - * We are relying on the fact that this interrupt handler was installed - * with the SA_INTERRUPT flag so that interrupts are disabled at the - * CPU while it is executing. - */ - desc->chip->unmask(irq); - + bank = (struct gpio_bank *) desc->data; if (bank->method == METHOD_MPUIO) isr_reg = bank->base + OMAP_MPUIO_GPIO_INT; #ifdef CONFIG_ARCH_OMAP1510 @@ -562,20 +574,23 @@ if (bank->method == METHOD_GPIO_730) isr_reg = bank->base + OMAP730_GPIO_INT_STATUS; #endif - for (;;) { - u32 isr = __raw_readl(isr_reg); - unsigned int gpio_irq; - - if (!isr) - break; - gpio_irq = bank->virtual_irq_start; - - for (; isr != 0; isr >>= 1, gpio_irq++) { - if (isr & 1) { - struct irqdesc *d = irq_desc + gpio_irq; - d->handle(gpio_irq, d, regs); - } - } + + isr = __raw_readl(isr_reg); + _enable_gpio_irqbank(bank, isr, 0); + _clear_gpio_irqbank(bank, isr); + _enable_gpio_irqbank(bank, isr, 1); + desc->chip->unmask(irq); + + if (unlikely(!isr)) + return; + + gpio_irq = bank->virtual_irq_start; + for (; isr != 0; isr >>= 1, gpio_irq++) { + struct irqdesc *d; + if (!(isr & 1)) + continue; + d = irq_desc + gpio_irq; + d->handle(gpio_irq, d, regs); } } @@ -584,18 +599,7 @@ unsigned int gpio = irq - IH_GPIO_BASE; struct gpio_bank *bank = get_gpio_bank(gpio); -#ifdef CONFIG_ARCH_OMAP1510 - if (bank->method == METHOD_GPIO_1510) - __raw_writew(1 << (gpio & 0x0f), bank->base + OMAP1510_GPIO_INT_STATUS); -#endif -#if defined(CONFIG_ARCH_OMAP16XX) - if (bank->method == METHOD_GPIO_1610) - __raw_writew(1 << (gpio & 0x0f), bank->base + OMAP1610_GPIO_IRQSTATUS1); -#endif -#ifdef CONFIG_ARCH_OMAP730 - if (bank->method == METHOD_GPIO_730) - __raw_writel(1 << (gpio & 0x1f), bank->base + OMAP730_GPIO_INT_STATUS); -#endif + _clear_gpio_irqstatus(bank, gpio); } static void gpio_mask_irq(unsigned int irq) @@ -603,7 +607,7 @@ unsigned int gpio = irq - IH_GPIO_BASE; struct gpio_bank *bank = get_gpio_bank(gpio); - _set_gpio_irqenable(bank, get_gpio_index(gpio), 0); + _set_gpio_irqenable(bank, gpio, 0); } static void gpio_unmask_irq(unsigned int irq) @@ -616,7 +620,7 @@ gpio); _set_gpio_edge_ctrl(bank, get_gpio_index(gpio), OMAP_GPIO_RISING_EDGE); } - _set_gpio_irqenable(bank, get_gpio_index(gpio), 1); + _set_gpio_irqenable(bank, gpio, 1); } static void mpuio_ack_irq(unsigned int irq) @@ -629,7 +633,7 @@ unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); struct gpio_bank *bank = get_gpio_bank(gpio); - _set_gpio_irqenable(bank, get_gpio_index(gpio), 0); + _set_gpio_irqenable(bank, gpio, 0); } static void mpuio_unmask_irq(unsigned int irq) @@ -637,7 +641,7 @@ unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); struct gpio_bank *bank = get_gpio_bank(gpio); - _set_gpio_irqenable(bank, get_gpio_index(gpio), 1); + _set_gpio_irqenable(bank, gpio, 1); } static struct irqchip gpio_irq_chip = { @@ -722,7 +726,7 @@ set_irq_chip(j, &mpuio_irq_chip); else set_irq_chip(j, &gpio_irq_chip); - set_irq_handler(j, do_edge_IRQ); + set_irq_handler(j, do_simple_IRQ); set_irq_flags(j, IRQF_VALID); } set_irq_chained_handler(bank->irq, gpio_irq_handler); diff -Nru a/arch/arm/mach-omap/leds-h2p2-debug.c b/arch/arm/mach-omap/leds-h2p2-debug.c --- a/arch/arm/mach-omap/leds-h2p2-debug.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mach-omap/leds-h2p2-debug.c 2005-03-30 16:58:49 -08:00 @@ -3,6 +3,11 @@ * * Copyright 2003 by Texas Instruments Incorporated * + * There are 16 LEDs on the debug board (all green); four may be used + * for logical 'green', 'amber', 'red', and 'blue' (after "claiming"). + * + * The "surfer" expansion board and H2 sample board also have two-color + * green+red LEDs (in parallel), used here for timer and idle indicators. */ #include #include @@ -16,78 +21,111 @@ #include #include +#include #include "leds.h" + +#define GPIO_LED_RED 3 +#define GPIO_LED_GREEN OMAP_MPUIO(4) + + +#define LED_STATE_ENABLED 0x01 +#define LED_STATE_CLAIMED 0x02 +#define LED_TIMER_ON 0x04 + +#define GPIO_IDLE GPIO_LED_GREEN +#define GPIO_TIMER GPIO_LED_RED + + void h2p2_dbg_leds_event(led_event_t evt) { unsigned long flags; - static unsigned long hw_led_state = 0; + + static struct h2p2_dbg_fpga __iomem *fpga; + static u16 led_state, hw_led_state; local_irq_save(flags); + if (!(led_state & LED_STATE_ENABLED) && evt != led_start) + goto done; + switch (evt) { case led_start: - hw_led_state |= H2P2_DBG_FPGA_LED_STARTSTOP; + if (!fpga) + fpga = ioremap(H2P2_DBG_FPGA_START, + H2P2_DBG_FPGA_SIZE); + if (fpga) { + led_state |= LED_STATE_ENABLED; + __raw_writew(~0, &fpga->leds); + } break; case led_stop: - hw_led_state &= ~H2P2_DBG_FPGA_LED_STARTSTOP; - break; + case led_halted: + /* all leds off during suspend or shutdown */ + omap_set_gpio_dataout(GPIO_TIMER, 0); + omap_set_gpio_dataout(GPIO_IDLE, 0); + __raw_writew(~0, &fpga->leds); + led_state &= ~LED_STATE_ENABLED; + if (evt == led_halted) { + iounmap(fpga); + fpga = NULL; + } + goto done; case led_claim: - hw_led_state |= H2P2_DBG_FPGA_LED_CLAIMRELEASE; + led_state |= LED_STATE_CLAIMED; + hw_led_state = 0; break; case led_release: - hw_led_state &= ~H2P2_DBG_FPGA_LED_CLAIMRELEASE; + led_state &= ~LED_STATE_CLAIMED; break; #ifdef CONFIG_LEDS_TIMER case led_timer: - /* - * Toggle Timer LED - */ - if (hw_led_state & H2P2_DBG_FPGA_LED_TIMER) - hw_led_state &= ~H2P2_DBG_FPGA_LED_TIMER; - else - hw_led_state |= H2P2_DBG_FPGA_LED_TIMER; - break; + led_state ^= LED_TIMER_ON; + omap_set_gpio_dataout(GPIO_TIMER, led_state & LED_TIMER_ON); + goto done; #endif #ifdef CONFIG_LEDS_CPU case led_idle_start: - hw_led_state |= H2P2_DBG_FPGA_LED_IDLE; - break; + omap_set_gpio_dataout(GPIO_IDLE, 1); + goto done; case led_idle_end: - hw_led_state &= ~H2P2_DBG_FPGA_LED_IDLE; - break; + omap_set_gpio_dataout(GPIO_IDLE, 0); + goto done; #endif - case led_halted: - if (hw_led_state & H2P2_DBG_FPGA_LED_HALTED) - hw_led_state &= ~H2P2_DBG_FPGA_LED_HALTED; - else - hw_led_state |= H2P2_DBG_FPGA_LED_HALTED; - break; - case led_green_on: + hw_led_state |= H2P2_DBG_FPGA_LED_GREEN; break; - case led_green_off: + hw_led_state &= ~H2P2_DBG_FPGA_LED_GREEN; break; case led_amber_on: + hw_led_state |= H2P2_DBG_FPGA_LED_AMBER; break; - case led_amber_off: + hw_led_state &= ~H2P2_DBG_FPGA_LED_AMBER; break; case led_red_on: + hw_led_state |= H2P2_DBG_FPGA_LED_RED; break; - case led_red_off: + hw_led_state &= ~H2P2_DBG_FPGA_LED_RED; + break; + + case led_blue_on: + hw_led_state |= H2P2_DBG_FPGA_LED_BLUE; + break; + case led_blue_off: + hw_led_state &= ~H2P2_DBG_FPGA_LED_BLUE; break; default: @@ -98,7 +136,9 @@ /* * Actually burn the LEDs */ - __raw_writew(~hw_led_state & 0xffff, H2P2_DBG_FPGA_LEDS); + if (led_state & LED_STATE_CLAIMED) + __raw_writew(~hw_led_state, &fpga->leds); +done: local_irq_restore(flags); } diff -Nru a/arch/arm/mach-omap/leds-osk.c b/arch/arm/mach-omap/leds-osk.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-omap/leds-osk.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,198 @@ +/* + * linux/arch/arm/mach-omap/leds-osk.c + * + * LED driver for OSK, and optionally Mistral QVGA, boards + */ +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "leds.h" + + +#define LED_STATE_ENABLED (1 << 0) +#define LED_STATE_CLAIMED (1 << 1) +static u8 led_state; + +#define GREEN_LED (1 << 0) /* TPS65010 LED1 */ +#define AMBER_LED (1 << 1) /* TPS65010 LED2 */ +#define RED_LED (1 << 2) /* TPS65010 GPIO2 */ +#define TIMER_LED (1 << 3) /* Mistral board */ +#define IDLE_LED (1 << 4) /* Mistral board */ +static u8 hw_led_state; + + +/* TPS65010 leds are changed using i2c -- from a task context. + * Using one of these for the "idle" LED would be impractical... + */ +#define TPS_LEDS (GREEN_LED | RED_LED | AMBER_LED) + +static u8 tps_leds_change; + +static void tps_work(void *unused) +{ + for (;;) { + u8 leds; + + local_irq_disable(); + leds = tps_leds_change; + tps_leds_change = 0; + local_irq_enable(); + + if (!leds) + break; + + /* careful: the set_led() value is on/off/blink */ + if (leds & GREEN_LED) + tps65010_set_led(LED1, !!(hw_led_state & GREEN_LED)); + if (leds & AMBER_LED) + tps65010_set_led(LED2, !!(hw_led_state & AMBER_LED)); + + /* the gpio led doesn't have that issue */ + if (leds & RED_LED) + tps65010_set_gpio_out_value(GPIO2, + !(hw_led_state & RED_LED)); + } +} + +static DECLARE_WORK(work, tps_work, NULL); + +#ifdef CONFIG_FB_OMAP + +/* For now, all system indicators require the Mistral board, since that + * LED can be manipulated without a task context. This LED is either red, + * or green, but not both; it can't give the full "disco led" effect. + */ + +#define GPIO_LED_RED 3 +#define GPIO_LED_GREEN OMAP_MPUIO(4) + +static void mistral_setled(void) +{ + int red = 0; + int green = 0; + + if (hw_led_state & TIMER_LED) + red = 1; + else if (hw_led_state & IDLE_LED) + green = 1; + // else both sides are disabled + + omap_set_gpio_dataout(GPIO_LED_GREEN, green); + omap_set_gpio_dataout(GPIO_LED_RED, red); +} + +#endif + +void osk_leds_event(led_event_t evt) +{ + unsigned long flags; + u16 leds; + + local_irq_save(flags); + + if (!(led_state & LED_STATE_ENABLED) && evt != led_start) + goto done; + + leds = hw_led_state; + switch (evt) { + case led_start: + led_state |= LED_STATE_ENABLED; + hw_led_state = 0; + leds = ~0; + break; + + case led_halted: + case led_stop: + led_state &= ~LED_STATE_ENABLED; + hw_led_state = 0; + // NOTE: work may still be pending!! + break; + + case led_claim: + led_state |= LED_STATE_CLAIMED; + hw_led_state = 0; + leds = ~0; + break; + + case led_release: + led_state &= ~LED_STATE_CLAIMED; + hw_led_state = 0; + break; + +#ifdef CONFIG_FB_OMAP + +#ifdef CONFIG_LEDS_TIMER + case led_timer: + hw_led_state ^= TIMER_LED; + mistral_setled(); + break; +#endif + +#ifdef CONFIG_LEDS_CPU + case led_idle_start: + hw_led_state |= IDLE_LED; + mistral_setled(); + break; + + case led_idle_end: + hw_led_state &= ~IDLE_LED; + mistral_setled(); + break; +#endif + +#endif /* CONFIG_FB_OMAP */ + + /* "green" == tps LED1 (leftmost, normally power-good) + * works only with DC adapter, not on battery power! + */ + case led_green_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= GREEN_LED; + break; + case led_green_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~GREEN_LED; + break; + + /* "amber" == tps LED2 (middle) */ + case led_amber_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= AMBER_LED; + break; + case led_amber_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~AMBER_LED; + break; + + /* "red" == LED on tps gpio3 (rightmost) */ + case led_red_on: + if (led_state & LED_STATE_CLAIMED) + hw_led_state |= RED_LED; + break; + case led_red_off: + if (led_state & LED_STATE_CLAIMED) + hw_led_state &= ~RED_LED; + break; + + default: + break; + } + + leds ^= hw_led_state; + leds &= TPS_LEDS; + if (leds && (led_state & LED_STATE_CLAIMED)) { + tps_leds_change |= leds; + schedule_work(&work); + } + +done: + local_irq_restore(flags); +} diff -Nru a/arch/arm/mach-omap/leds.c b/arch/arm/mach-omap/leds.c --- a/arch/arm/mach-omap/leds.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/leds.c 2005-03-30 16:58:50 -08:00 @@ -9,6 +9,9 @@ #include #include +#include +#include + #include "leds.h" static int __init @@ -17,8 +20,38 @@ if (machine_is_omap_innovator()) leds_event = innovator_leds_event; - else if (machine_is_omap_h2() || machine_is_omap_perseus2()) { + else if (machine_is_omap_h2() || machine_is_omap_perseus2()) leds_event = h2p2_dbg_leds_event; + + else if (machine_is_omap_osk()) + leds_event = osk_leds_event; + + else + return -1; + + if (machine_is_omap_h2() + || machine_is_omap_perseus2() + || machine_is_omap_osk()) { + + /* LED1/LED2 pins can be used as GPIO (as done here), or by + * the LPG (works even in deep sleep!), to drive a bicolor + * LED on the H2 sample board, and another on the H2/P2 + * "surfer" expansion board. + * + * The same pins drive a LED on the OSK Mistral board, but + * that's a different kind of LED (just one color at a time). + */ + omap_cfg_reg(P18_1610_GPIO3); + if (omap_request_gpio(3) == 0) + omap_set_gpio_direction(3, 0); + else + printk(KERN_WARNING "LED: can't get GPIO3/red?\n"); + + omap_cfg_reg(MPUIO4); + if (omap_request_gpio(OMAP_MPUIO(4)) == 0) + omap_set_gpio_direction(OMAP_MPUIO(4), 0); + else + printk(KERN_WARNING "LED: can't get MPUIO4/green?\n"); } leds_event(led_start); diff -Nru a/arch/arm/mach-omap/leds.h b/arch/arm/mach-omap/leds.h --- a/arch/arm/mach-omap/leds.h 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/leds.h 2005-03-30 16:58:50 -08:00 @@ -1,2 +1,3 @@ extern void innovator_leds_event(led_event_t evt); extern void h2p2_dbg_leds_event(led_event_t evt); +extern void osk_leds_event(led_event_t evt); diff -Nru a/arch/arm/mach-omap/ocpi.c b/arch/arm/mach-omap/ocpi.c --- a/arch/arm/mach-omap/ocpi.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/ocpi.c 2005-03-30 16:58:50 -08:00 @@ -1,11 +1,13 @@ /* * linux/arch/arm/mach-omap/ocpi.c * - * Minimal OCP bus support for OMAP-1610 and OMAP-5912 + * Minimal OCP bus support for omap16xx * - * Copyright (C) 2003 - 2004 Nokia Corporation + * Copyright (C) 2003 - 2005 Nokia Corporation * Written by Tony Lindgren * + * Modified for clock framework by Paul Mundt . + * * 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 @@ -29,8 +31,10 @@ #include #include #include +#include #include +#include #include #define OCPI_BASE 0xfffec320 @@ -42,13 +46,12 @@ #define OCPI_PROT (OCPI_BASE + 0x14) #define OCPI_SEC (OCPI_BASE + 0x18) -#define EN_OCPI_CK (1 << 0) -#define IDLOCPI_ARM (1 << 1) - /* USB OHCI OCPI access error registers */ #define HOSTUEADDR 0xfffba0e0 #define HOSTUESTATUS 0xfffba0e4 +static struct clk *ocpi_ck; + /* * Enables device access to OMAP buses via the OCPI bridge * FIXME: Add locking @@ -57,16 +60,12 @@ { unsigned int val; + if (!cpu_is_omap16xx()) + return -ENODEV; + /* Make sure there's clock for OCPI */ + clk_enable(ocpi_ck); -#if defined(CONFIG_ARCH_OMAP16XX) - if (cpu_is_omap1610() || cpu_is_omap1710()) { - val = omap_readl(OMAP16XX_ARM_IDLECT3); - val |= EN_OCPI_CK; - val &= ~IDLOCPI_ARM; - omap_writel(val, OMAP16XX_ARM_IDLECT3); - } -#endif /* Enable access for OHCI in OCPI */ val = omap_readl(OCPI_PROT); val &= ~0xff; @@ -81,19 +80,16 @@ } EXPORT_SYMBOL(ocpi_enable); -int ocpi_status(void) +static int __init omap_ocpi_init(void) { - printk("OCPI: addr: 0x%08x cmd: 0x%08x\n" - " ohci-addr: 0x%08x ohci-status: 0x%08x\n", - omap_readl(OCPI_FAULT), omap_readl(OCPI_CMD_FAULT), - omap_readl(HOSTUEADDR), omap_readl(HOSTUESTATUS)); + if (!cpu_is_omap16xx()) + return -ENODEV; - return 1; -} -EXPORT_SYMBOL(ocpi_status); + ocpi_ck = clk_get(NULL, "l3_ocpi_ck"); + if (IS_ERR(ocpi_ck)) + return PTR_ERR(ocpi_ck); -static int __init omap_ocpi_init(void) -{ + clk_use(ocpi_ck); ocpi_enable(); printk("OMAP OCPI interconnect driver loaded\n"); @@ -102,7 +98,13 @@ static void __exit omap_ocpi_exit(void) { - /* FIXME: Disable OCPI */ + /* REVISIT: Disable OCPI */ + + if (!cpu_is_omap16xx()) + return; + + clk_unuse(ocpi_ck); + clk_put(ocpi_ck); } MODULE_AUTHOR("Tony Lindgren "); diff -Nru a/arch/arm/mach-omap/pm.c b/arch/arm/mach-omap/pm.c --- a/arch/arm/mach-omap/pm.c 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/mach-omap/pm.c 2005-03-30 16:58:48 -08:00 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include "clock.h" diff -Nru a/arch/arm/mach-omap/usb.c b/arch/arm/mach-omap/usb.c --- a/arch/arm/mach-omap/usb.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-omap/usb.c 2005-03-30 16:58:50 -08:00 @@ -49,10 +49,13 @@ /* TESTED ON: * - 1611B H2 (with usb1 mini-AB) using standard Mini-B or OTG cables + * - 5912 OSK OHCI (with usb0 standard-A), standard A-to-B cables + * - 5912 OSK UDC, with *nonstandard* A-to-A cable * - 1510 Innovator UDC with bundled usb0 cable * - 1510 Innovator OHCI with bundled usb1/usb2 cable * - 1510 Innovator OHCI with custom usb0 cable, feeding 5V VBUS * - 1710 custom development board using alternate pin group + * - 1710 H3 (with usb1 mini-AB) using standard Mini-B or OTG cables */ /*-------------------------------------------------------------------------*/ @@ -101,50 +104,48 @@ return 0; } - /* - * VP and VM are needed for all active usb0 configurations. - * USB0_VP and USB0_VM are always set on 1510, there's no muxing - * available for them. - */ - if (nwires >= 2 && !cpu_is_omap15xx()) { - omap_cfg_reg(AA9_USB0_VP); - omap_cfg_reg(R9_USB0_VM); - } if (is_device) omap_cfg_reg(W4_USB_PUEN); /* internal transceiver */ if (nwires == 2) { + // omap_cfg_reg(P9_USB_DP); + // omap_cfg_reg(R8_USB_DM); + if (cpu_is_omap15xx()) { - /* This works for OHCI on 1510-Innovator */ + /* This works on 1510-Innovator */ return 0; } - /* NOTE: host OR device mode for now, no OTG */ + /* NOTES: + * - peripheral should configure VBUS detection! + * - only peripherals may use the internal D+/D- pulldowns + * - OTG support on this port not yet written + */ + USB_TRANSCEIVER_CTRL_REG &= ~(7 << 4); - if (is_device) { - omap_cfg_reg(R18_1510_USB_GPIO0); - // omap_cfg_reg(USB0_VBUS); - // USB_TRANSCEIVER_CTRL_REG.CONF_USB0_PORT_R = 7 - } else /* host mode needs D+ and D- pulldowns */ - USB_TRANSCEIVER_CTRL_REG &= ~(3 << 1); + if (!is_device) + USB_TRANSCEIVER_CTRL_REG |= (3 << 1); return 3 << 16; } /* alternate pin config, external transceiver */ + if (cpu_is_omap15xx()) { + printk(KERN_ERR "no usb0 alt pin config on 15xx\n"); + return 0; + } + omap_cfg_reg(V6_USB0_TXD); omap_cfg_reg(W9_USB0_TXEN); omap_cfg_reg(W5_USB0_SE0); -#ifdef CONFIG_ARCH_OMAP_USB_SPEED - /* FIXME: there's good chance that pin V9 is used for MMC2 port cmddir */ - omap_cfg_reg(V9_USB0_SPEED); - // omap_cfg_reg(V9_USB0_SUSP); -#endif + /* NOTE: SPEED and SUSP aren't configured here */ if (nwires != 3) omap_cfg_reg(Y5_USB0_RCV); + if (nwires != 6) + USB_TRANSCEIVER_CTRL_REG &= ~CONF_USB2_UNI_R; switch (nwires) { case 3: @@ -155,7 +156,8 @@ break; case 6: syscon1 = 3; - /* REVISIT: Is CONF_USB2_UNI_R only needed when nwires = 6? */ + omap_cfg_reg(AA9_USB0_VP); + omap_cfg_reg(R9_USB0_VM); USB_TRANSCEIVER_CTRL_REG |= CONF_USB2_UNI_R; break; default: @@ -181,10 +183,13 @@ omap_cfg_reg(USB1_SEO); omap_cfg_reg(USB1_SPEED); // SUSP - } else if (cpu_is_omap16xx()) { + } else if (cpu_is_omap1610() || cpu_is_omap5912()) { omap_cfg_reg(W13_1610_USB1_SE0); omap_cfg_reg(R13_1610_USB1_SPEED); // SUSP + } else if (cpu_is_omap1710()) { + omap_cfg_reg(R13_1710_USB1_SE0); + // SUSP } else { pr_debug("usb unrecognized\n"); } @@ -216,12 +221,11 @@ { u32 syscon1 = 0; + /* NOTE erratum: must leave USB2_UNI_R set if usb0 in use */ if (alt_pingroup || nwires == 0) return 0; if (nwires != 6 && !cpu_is_omap15xx()) USB_TRANSCEIVER_CTRL_REG &= ~CONF_USB2_UNI_R; - if (nwires == 0) - return 0; /* external transceiver */ if (cpu_is_omap15xx()) { @@ -322,8 +326,8 @@ static struct resource ohci_resources[] = { { - .start = IO_ADDRESS(OMAP_OHCI_BASE), - .end = IO_ADDRESS(OMAP_OHCI_BASE + 4096), + .start = OMAP_OHCI_BASE, + .end = OMAP_OHCI_BASE + 4096, .flags = IORESOURCE_MEM, }, { @@ -374,6 +378,10 @@ /*-------------------------------------------------------------------------*/ +#define ULPD_CLOCK_CTRL_REG __REG16(ULPD_CLOCK_CTRL) +#define ULPD_SOFT_REQ_REG __REG16(ULPD_SOFT_REQ) + + // FIXME correct answer depends on hmc_mode, // as does any nonzero value for config->otg port number #ifdef CONFIG_USB_GADGET_OMAP @@ -412,12 +420,11 @@ syscon = config->hmc_mode; syscon |= USBX_SYNCHRO | (4 << 16) /* B_ASE0_BRST */; - if (config->otg || config->register_host) - syscon |= UHOST_EN; #ifdef CONFIG_USB_OTG if (config->otg) syscon |= OTG_EN; #endif + pr_debug("USB_TRANSCEIVER_CTRL_REG = %03x\n", USB_TRANSCEIVER_CTRL_REG); pr_debug("OTG_SYSCON_2_REG = %08x\n", syscon); OTG_SYSCON_2_REG = syscon; @@ -435,7 +442,10 @@ printk(", Mini-AB on usb%d", config->otg - 1); printk("\n"); - /* don't clock unused USB controllers */ + /* leave USB clocks/controllers off until needed */ + ULPD_SOFT_REQ_REG &= ~SOFT_USB_CLK_REQ; + ULPD_CLOCK_CTRL_REG &= ~USB_MCLK_EN; + ULPD_CLOCK_CTRL_REG |= DIS_USB_PVCI_CLK; syscon = OTG_SYSCON_1_REG; syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN; @@ -443,6 +453,7 @@ if (config->otg || config->register_dev) { syscon &= ~DEV_IDLE_EN; udc_device.dev.platform_data = config; + /* FIXME patch IRQ numbers for omap730 */ status = platform_device_register(&udc_device); if (status) pr_debug("can't register UDC device, %d\n", status); @@ -453,6 +464,8 @@ if (config->otg || config->register_host) { syscon &= ~HST_IDLE_EN; ohci_device.dev.platform_data = config; + if (cpu_is_omap730()) + ohci_resources[1].start = INT_730_USB_HHC_1; status = platform_device_register(&ohci_device); if (status) pr_debug("can't register OHCI device, %d\n", status); @@ -462,10 +475,12 @@ #ifdef CONFIG_USB_OTG if (config->otg) { syscon &= ~OTG_IDLE_EN; + otg_device.dev.platform_data = config; if (cpu_is_omap730()) otg_resources[1].start = INT_730_USB_OTG; status = platform_device_register(&otg_device); - // ... + if (status) + pr_debug("can't register OTG device, %d\n", status); } #endif pr_debug("OTG_SYSCON_1_REG = %08x\n", syscon); @@ -482,10 +497,6 @@ #ifdef CONFIG_ARCH_OMAP1510 -#define ULPD_SOFT_REQ_REG __REG16(ULPD_SOFT_REQ) -#define SOFT_UDC_REQ (1 << 4) -#define SOFT_DPLL_REQ (1 << 0) - #define ULPD_DPLL_CTRL_REG __REG16(ULPD_DPLL_CTRL) #define DPLL_IOB (1 << 13) #define DPLL_PLL_ENABLE (1 << 4) @@ -546,7 +557,6 @@ /* hcd explicitly gates 48MHz */ } #endif - } #else @@ -564,7 +574,8 @@ config = omap_get_config(OMAP_TAG_USB, struct omap_usb_config); if (config == NULL) { - printk(KERN_ERR "USB: No board-specific platform config found\n"); + printk(KERN_ERR "USB: No board-specific " + "platform config found\n"); return -ENODEV; } platform_data = *config; diff -Nru a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig --- a/arch/arm/mach-pxa/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/arm/mach-pxa/Kconfig 2005-03-30 16:58:47 -08:00 @@ -8,6 +8,7 @@ config ARCH_LUBBOCK bool "Intel DBPXA250 Development Platform" select PXA25x + select SA1111 config MACH_MAINSTONE bool "Intel HCDDBBVA0 Development Platform" @@ -21,6 +22,7 @@ config PXA_SHARPSL bool "SHARP SL-5600 and SL-C7xx Models" select PXA25x + select SHARP_SCOOP help Say Y here if you intend to run this kernel on a Sharp SL-5600 (Poodle), Sharp SL-C700 (Corgi), @@ -34,6 +36,7 @@ config MACH_POODLE bool "Enable Sharp SL-5600 (Poodle) Support" depends PXA_SHARPSL + select SHARP_LOCOMO config MACH_CORGI bool "Enable Sharp SL-C700 (Corgi) Support" diff -Nru a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c --- a/arch/arm/mach-pxa/leds-idp.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-pxa/leds-idp.c 2005-03-30 16:58:50 -08:00 @@ -66,12 +66,12 @@ #ifdef CONFIG_LEDS_CPU case led_idle_start: if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state |= IDP_BUSY_LED; + hw_led_state &= ~IDP_BUSY_LED; break; case led_idle_end: if (!(led_state & LED_STATE_CLAIMED)) - hw_led_state &= ~IDP_BUSY_LED; + hw_led_state |= IDP_BUSY_LED; break; #endif @@ -80,12 +80,12 @@ case led_green_on: if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~IDP_HB_LED; + hw_led_state |= IDP_HB_LED; break; case led_green_off: if (led_state & LED_STATE_CLAIMED) - hw_led_state |= IDP_HB_LED; + hw_led_state &= ~IDP_HB_LED; break; case led_amber_on: @@ -96,12 +96,12 @@ case led_red_on: if (led_state & LED_STATE_CLAIMED) - hw_led_state &= ~IDP_BUSY_LED; + hw_led_state |= IDP_BUSY_LED; break; case led_red_off: if (led_state & LED_STATE_CLAIMED) - hw_led_state |= IDP_BUSY_LED; + hw_led_state &= ~IDP_BUSY_LED; break; default: @@ -109,7 +109,9 @@ } if (led_state & LED_STATE_ENABLED) - IDP_WRITE_LEDS(hw_led_state); + IDP_CPLD_LED_CONTROL = ( (IDP_CPLD_LED_CONTROL | IDP_LEDS_MASK) & ~hw_led_state); + else + IDP_CPLD_LED_CONTROL |= IDP_LEDS_MASK; local_irq_restore(flags); } diff -Nru a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S --- a/arch/arm/mach-pxa/sleep.S 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-pxa/sleep.S 2005-03-30 16:58:50 -08:00 @@ -32,6 +32,7 @@ stmfd sp!, {r2 - r12, lr} @ save registers on stack @ get coprocessor registers + mrc p14, 0, r3, c6, c0, 0 @ clock configuration, for turbo mode mrc p15, 0, r4, c15, c1, 0 @ CP access reg mrc p15, 0, r5, c13, c0, 0 @ PID mrc p15, 0, r6, c3, c0, 0 @ domain ID @@ -39,9 +40,11 @@ mrc p15, 0, r8, c1, c1, 0 @ auxiliary control reg mrc p15, 0, r9, c1, c0, 0 @ control reg + bic r3, r3, #2 @ clear frequency change bit + @ store them plus current virtual stack ptr on stack mov r10, sp - stmfd sp!, {r4 - r10} + stmfd sp!, {r3 - r10} @ preserve phys address of stack mov r0, sp @@ -90,10 +93,11 @@ orrne r7, r7, #1 @@ 99.53MHz @ get ready for the change - @ note, since we are making turbo=run, do not remove the turbo - @ as this may cause non-turbo mode on resume - mrc p14, 0, r0, c6, c0, 0 - bic r0, r0, #2 @ clear change bit + + @ note, turbo is not preserved over sleep so there is no + @ point in preserving it here. we save it on the stack with the + @ other CP registers instead. + mov r0, #0 mcr p14, 0, r0, c6, c0, 0 orr r0, r0, #2 @ initiate change bit @@ -145,7 +149,7 @@ ldr r0, sleep_save_sp @ stack phys addr ldr r2, =resume_after_mmu @ its absolute virtual address - ldmfd r0, {r4 - r9, sp} @ CP regs + virt stack ptr + ldmfd r0, {r3 - r9, sp} @ CP regs + virt stack ptr mov r1, #0 mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs @@ -155,6 +159,7 @@ bic r9, r9, #0x0004 @ see cpu_xscale_proc_init #endif + mcr p14, 0, r3, c6, c0, 0 @ clock configuration, turbo mode. mcr p15, 0, r4, c15, c1, 0 @ CP access reg mcr p15, 0, r5, c13, c0, 0 @ PID mcr p15, 0, r6, c3, c0, 0 @ domain ID diff -Nru a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c --- a/arch/arm/mach-rpc/dma.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-rpc/dma.c 2005-03-30 16:58:50 -08:00 @@ -254,7 +254,7 @@ regs.ARM_r9 = dma->buf.length; regs.ARM_r10 = (unsigned long)dma->buf.__address; - regs.ARM_fp = FLOPPYDMA_BASE; + regs.ARM_fp = (unsigned long)FLOPPYDMA_BASE; if (claim_fiq(&fh)) { printk("floppydma: couldn't claim FIQ.\n"); diff -Nru a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c --- a/arch/arm/mach-rpc/riscpc.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mach-rpc/riscpc.c 2005-03-30 16:58:49 -08:00 @@ -67,7 +67,7 @@ static struct map_desc rpc_io_desc[] __initdata = { { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */ - { IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ + { (u32)IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ { EASI_BASE, EASI_START, EASI_SIZE, MT_DEVICE } /* EASI space */ }; diff -Nru a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2410/mach-nexcoder.c --- a/arch/arm/mach-s3c2410/mach-nexcoder.c 2005-03-30 16:58:51 -08:00 +++ b/arch/arm/mach-s3c2410/mach-nexcoder.c 2005-03-30 16:58:51 -08:00 @@ -148,7 +148,7 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") MAINTAINER("Guillaume GOURAT ") - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART) + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) .map_io = nexcoder_map_io, .init_irq = s3c24xx_init_irq, diff -Nru a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c --- a/arch/arm/mach-s3c2410/mach-otom.c 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-s3c2410/mach-otom.c 2005-03-30 16:58:50 -08:00 @@ -38,7 +38,7 @@ static struct map_desc otom11_iodesc[] __initdata = { /* Device area */ - { OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE }, + { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE }, }; #define UCON S3C2410_UCON_DEFAULT @@ -116,7 +116,7 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") MAINTAINER("Guillaume GOURAT ") - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART) + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) .map_io = otom11_map_io, .init_irq = s3c24xx_init_irq, diff -Nru a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig --- a/arch/arm/mach-sa1100/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mach-sa1100/Kconfig 2005-03-30 16:58:50 -08:00 @@ -11,6 +11,7 @@ config ASSABET_NEPONSET bool "Include support for Neponset" depends on SA1100_ASSABET + select SA1111 help Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 Microprocessor Development Board (Assabet) with the SA-1111 @@ -44,7 +45,8 @@ config SA1100_COLLIE bool "Sharp Zaurus SL5500" - depends on ARCH_SA1100 + select SHARP_LOCOMO + select SHARP_SCOOP help Say Y here to support the Sharp Zaurus SL5500 PDAs. @@ -85,12 +87,14 @@ config SA1100_BADGE4 bool "HP Labs BadgePAD 4" + select SA1111 help Say Y here if you want to build a kernel for the HP Laboratories BadgePAD 4. config SA1100_JORNADA720 bool "HP Jornada 720" + select SA1111 help Say Y here if you want to build a kernel for the HP Jornada 720 handheld computer. See diff -Nru a/arch/arm/mm/abort-ev4t.S b/arch/arm/mm/abort-ev4t.S --- a/arch/arm/mm/abort-ev4t.S 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/mm/abort-ev4t.S 2005-03-30 16:58:48 -08:00 @@ -1,5 +1,6 @@ #include #include +#include "abort-macro.S" /* * Function: v4t_early_abort * @@ -21,11 +22,9 @@ ENTRY(v4t_early_abort) mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR - tst r3, #PSR_T_BIT - ldrneh r3, [r2] @ read aborted thumb instruction + do_thumb_abort ldreq r3, [r2] @ read aborted ARM instruction bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR - movne r3, r3, lsl #(21 - 12) @ move thumb bit 11 to ARM bit 20 tst r3, #1 << 20 @ check write orreq r1, r1, #1 << 11 mov pc, lr diff -Nru a/arch/arm/mm/abort-ev5t.S b/arch/arm/mm/abort-ev5t.S --- a/arch/arm/mm/abort-ev5t.S 2005-03-30 16:58:50 -08:00 +++ b/arch/arm/mm/abort-ev5t.S 2005-03-30 16:58:50 -08:00 @@ -1,5 +1,6 @@ #include #include +#include "abort-macro.S" /* * Function: v5t_early_abort * @@ -21,11 +22,10 @@ ENTRY(v5t_early_abort) mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR - tst r3, #PSR_T_BIT - ldrneh r3, [r2] @ read aborted thumb instruction + do_thumb_abort ldreq r3, [r2] @ read aborted ARM instruction bic r1, r1, #1 << 11 @ clear bits 11 of FSR - movne r3, r3, lsl #(21 - 12) @ move thumb bit 11 to ARM bit 20 + do_ldrd_abort tst r3, #1 << 20 @ check write orreq r1, r1, #1 << 11 mov pc, lr diff -Nru a/arch/arm/mm/abort-ev5tj.S b/arch/arm/mm/abort-ev5tj.S --- a/arch/arm/mm/abort-ev5tj.S 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mm/abort-ev5tj.S 2005-03-30 16:58:49 -08:00 @@ -1,5 +1,6 @@ #include #include +#include "abort-macro.S" /* * Function: v5tj_early_abort * @@ -24,10 +25,9 @@ bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR tst r3, #PSR_J_BIT @ Java? movne pc, lr - tst r3, #PSR_T_BIT @ Thumb? - ldrneh r3, [r2] @ read aborted thumb instruction + do_thumb_abort ldreq r3, [r2] @ read aborted ARM instruction - movne r3, r3, lsl #(21 - 12) @ move thumb bit 11 to ARM bit 20 + do_ldrd_abort tst r3, #1 << 20 @ L = 0 -> write orreq r1, r1, #1 << 11 @ yes. mov pc, lr diff -Nru a/arch/arm/mm/abort-macro.S b/arch/arm/mm/abort-macro.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mm/abort-macro.S 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,42 @@ +/* + * The ARM LDRD and Thumb LDRSB instructions use bit 20/11 (ARM/Thumb) + * differently than every other instruction, so it is set to 0 (write) + * even though the instructions are read instructions. This means that + * during an abort the instructions will be treated as a write and the + * handler will raise a signal from unwriteable locations if they + * fault. We have to specifically check for these instructions + * from the abort handlers to treat them properly. + * + */ + + .macro do_thumb_abort + tst r3, #PSR_T_BIT + beq not_thumb + ldrh r3, [r2] @ Read aborted Thumb instruction + and r3, r3, # 0xfe00 @ Mask opcode field + cmp r3, # 0x5600 @ Is it ldrsb? + orreq r3, r3, #1 << 11 @ Set L-bit if yes + tst r3, #1 << 11 @ L = 0 -> write + orreq r1, r1, #1 << 11 @ yes. + mov pc, lr +not_thumb: + .endm + +/* + * We check for the following insturction encoding for LDRD. + * + * [27:25] == 0 + * [7:4] == 1101 + * [20] == 0 + */ + .macro do_ldrd_abort + tst r3, #0x0e000000 @ [27:25] == 0 + bne not_ldrd + and r2, r3, #0x000000f0 @ [7:4] == 1101 + cmp r2, #0x000000d0 + bne not_ldrd + tst r3, #1 << 20 @ [20] == 0 + moveq pc, lr +not_ldrd: + .endm + diff -Nru a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c --- a/arch/arm/mm/mm-armv.c 2005-03-30 16:58:49 -08:00 +++ b/arch/arm/mm/mm-armv.c 2005-03-30 16:58:49 -08:00 @@ -356,6 +356,15 @@ [MT_ROM] = { .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, + }, + [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ + .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | + L_PTE_WRITE, + .prot_l1 = PMD_TYPE_TABLE, + .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | + PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | + PMD_SECT_TEX(1), + .domain = DOMAIN_IO, } }; diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types 2005-03-30 16:58:48 -08:00 +++ b/arch/arm/tools/mach-types 2005-03-30 16:58:48 -08:00 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Wed Mar 2 11:32:53 2005 +# Last update: Thu Mar 24 14:34:50 2005 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -649,7 +649,6 @@ zefeerdzn MACH_ZEFEERDZN ZEFEERDZN 639 zefeerdzq MACH_ZEFEERDZQ ZEFEERDZQ 640 gtwx5715 MACH_GTWX5715 GTWX5715 641 -unknown MACH_VL420 VL420 642 astro_jack MACH_ASTRO_JACK ASTRO_JACK 643 tip03 MACH_TIP03 TIP03 644 a9200ec MACH_A9200EC A9200EC 645 @@ -708,3 +707,20 @@ a9m9750 MACH_A9M9750 A9M9750 699 a9m9360 MACH_A9M9360 A9M9360 700 unc90 MACH_UNC90 UNC90 701 +eco920 MACH_ECO920 ECO920 702 +satview MACH_SATVIEW SATVIEW 703 +roadrunner MACH_ROADRUNNER ROADRUNNER 704 +at91rm9200ek MACH_AT91RM9200EK AT91RM9200EK 705 +gp32 MACH_GP32 GP32 706 +gem MACH_GEM GEM 707 +i858 MACH_I858 I858 708 +hx2750 MACH_HX2750 HX2750 709 +zeusevb MACH_ZEUSEVB ZEUSEVB 710 +p700 MACH_P700 P700 711 +cpe MACH_CPE CPE 712 +spitz MACH_SPITZ SPITZ 713 +nimbra340 MACH_NIMBRA340 NIMBRA340 714 +lpc22xx MACH_LPC22XX LPC22XX 715 +omap_comet3 MACH_COMET3 COMET3 716 +omap_comet4 MACH_COMET4 COMET4 717 +csb625 MACH_CSB625 CSB625 718 diff -Nru a/arch/frv/Kconfig b/arch/frv/Kconfig --- a/arch/frv/Kconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/frv/Kconfig 2005-03-30 16:58:48 -08:00 @@ -348,151 +348,7 @@ source "fs/Kconfig" -menu "Kernel hacking" - -config DEBUG_KERNEL - bool "Kernel debugging" - help - Say Y here if you are developing drivers or trying to debug and - identify kernel problems. - -config EARLY_PRINTK - bool "Early printk" - depends on EMBEDDED && DEBUG_KERNEL - default n - help - Write kernel log output directly into the VGA buffer or to a serial - port. - - This is useful for kernel debugging when your machine crashes very - early before the console code is initialized. For normal operation - it is not recommended because it looks ugly and doesn't cooperate - with klogd/syslogd or the X server. You should normally N here, - unless you want to debug such a crash. - -config DEBUG_STACKOVERFLOW - bool "Check for stack overflows" - depends on DEBUG_KERNEL - -config DEBUG_SLAB - bool "Debug memory allocations" - depends on DEBUG_KERNEL - help - Say Y here to have the kernel do limited verification on memory - allocation as well as poisoning memory on free to catch use of freed - memory. - -config MAGIC_SYSRQ - bool "Magic SysRq key" - depends on DEBUG_KERNEL - help - If you say Y here, you will have some control over the system even - if the system crashes for example during kernel debugging (e.g., you - will be able to flush the buffer cache to disk, reboot the system - immediately or dump some status information). This is accomplished - by pressing various keys while holding SysRq (Alt+PrintScreen). It - also works on a serial console (on PC hardware at least), if you - send a BREAK and then within 5 seconds a command keypress. The - keys are documented in . Don't say Y - unless you really know what this hack does. - -config DEBUG_SPINLOCK - bool "Spinlock debugging" - depends on DEBUG_KERNEL - help - Say Y here and build SMP to catch missing spinlock initialization - and certain other kinds of spinlock errors commonly made. This is - best used in conjunction with the NMI watchdog so that spinlock - deadlocks are also debuggable. - -config DEBUG_SPINLOCK_SLEEP - bool "Sleep-inside-spinlock checking" - depends on DEBUG_KERNEL - help - If you say Y here, various routines which may sleep will become very - noisy if they are called with a spinlock held. - -config DEBUG_PAGEALLOC - bool "Page alloc debugging" - depends on DEBUG_KERNEL - help - Unmap pages from the kernel linear mapping after free_pages(). - This results in a large slowdown, but helps to find certain types - of memory corruptions. - -config DEBUG_HIGHMEM - bool "Highmem debugging" - depends on DEBUG_KERNEL && HIGHMEM - help - This options enables addition error checking for high memory systems. - Disable for production systems. - -config DEBUG_INFO - bool "Compile the kernel with debug info" - depends on DEBUG_KERNEL - help - If you say Y here the resulting kernel image will include - debugging info resulting in a larger kernel image. - Say Y here only if you plan to use gdb to debug the kernel. - If you don't debug the kernel, you can say N. - -config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting" - depends on DEBUG_KERNEL - -config FRAME_POINTER - bool "Compile the kernel with frame pointers" - depends on DEBUG_KERNEL - help - If you say Y here the resulting kernel image will be slightly larger - and slower, but it will give very useful debugging information. - If you don't debug the kernel, you can say N, but we may not be able - to solve problems without frame pointers. - -config GDBSTUB - bool "Remote GDB kernel debugging" - depends on DEBUG_KERNEL - select DEBUG_INFO - select FRAME_POINTER - help - If you say Y here, it will be possible to remotely debug the kernel - using gdb. This enlarges your kernel ELF image disk size by several - megabytes and requires a machine with more than 16 MB, better 32 MB - RAM to avoid excessive linking time. This is only useful for kernel - hackers. If unsure, say N. - -choice - prompt "GDB stub port" - default GDBSTUB_UART1 - depends on GDBSTUB - help - Select the on-CPU port used for GDB-stub - -config GDBSTUB_UART0 - bool "/dev/ttyS0" - -config GDBSTUB_UART1 - bool "/dev/ttyS1" - -endchoice - -config GDBSTUB_IMMEDIATE - bool "Break into GDB stub immediately" - depends on GDBSTUB - help - If you say Y here, GDB stub will break into the program as soon as - possible, leaving the program counter at the beginning of - start_kernel() in init/main.c. - -config GDB_CONSOLE - bool "Console output to GDB" - depends on KGDB - help - If you are using GDB for remote debugging over a serial port and - would like kernel messages to be formatted into GDB $O packets so - that GDB prints them as program output, say 'Y'. - -endmenu +source "arch/frv/Kconfig.debug" source "security/Kconfig" diff -Nru a/arch/frv/Kconfig.debug b/arch/frv/Kconfig.debug --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/frv/Kconfig.debug 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,74 @@ +menu "Kernel hacking" + +source "lib/Kconfig.debug" + +config EARLY_PRINTK + bool "Early printk" + depends on EMBEDDED && DEBUG_KERNEL + default n + help + Write kernel log output directly into the VGA buffer or to a serial + port. + + This is useful for kernel debugging when your machine crashes very + early before the console code is initialized. For normal operation + it is not recommended because it looks ugly and doesn't cooperate + with klogd/syslogd or the X server. You should normally N here, + unless you want to debug such a crash. + +config DEBUG_STACKOVERFLOW + bool "Check for stack overflows" + depends on DEBUG_KERNEL + +config DEBUG_PAGEALLOC + bool "Page alloc debugging" + depends on DEBUG_KERNEL + help + Unmap pages from the kernel linear mapping after free_pages(). + This results in a large slowdown, but helps to find certain types + of memory corruptions. + +config GDBSTUB + bool "Remote GDB kernel debugging" + depends on DEBUG_KERNEL + select DEBUG_INFO + select FRAME_POINTER + help + If you say Y here, it will be possible to remotely debug the kernel + using gdb. This enlarges your kernel ELF image disk size by several + megabytes and requires a machine with more than 16 MB, better 32 MB + RAM to avoid excessive linking time. This is only useful for kernel + hackers. If unsure, say N. + +choice + prompt "GDB stub port" + default GDBSTUB_UART1 + depends on GDBSTUB + help + Select the on-CPU port used for GDB-stub + +config GDBSTUB_UART0 + bool "/dev/ttyS0" + +config GDBSTUB_UART1 + bool "/dev/ttyS1" + +endchoice + +config GDBSTUB_IMMEDIATE + bool "Break into GDB stub immediately" + depends on GDBSTUB + help + If you say Y here, GDB stub will break into the program as soon as + possible, leaving the program counter at the beginning of + start_kernel() in init/main.c. + +config GDB_CONSOLE + bool "Console output to GDB" + depends on GDBSTUB + help + If you are using GDB for remote debugging over a serial port and + would like kernel messages to be formatted into GDB $O packets so + that GDB prints them as program output, say 'Y'. + +endmenu diff -Nru a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c --- a/arch/frv/kernel/signal.c 2005-03-30 16:58:50 -08:00 +++ b/arch/frv/kernel/signal.c 2005-03-30 16:58:50 -08:00 @@ -225,7 +225,6 @@ { struct rt_sigframe __user *frame = (struct rt_sigframe __user *) __frame->sp; sigset_t set; - stack_t st; int gr8; if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c 2005-03-30 16:58:51 -08:00 +++ b/arch/i386/kernel/apic.c 2005-03-30 16:58:51 -08:00 @@ -1165,7 +1165,7 @@ /* * the NMI deadlock-detector uses this. */ - irq_stat[cpu].apic_timer_irqs++; + per_cpu(irq_stat, cpu).apic_timer_irqs++; /* * NOTE! We'd better ACK the irq immediately, diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c --- a/arch/i386/kernel/apm.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/kernel/apm.c 2005-03-30 16:58:47 -08:00 @@ -1202,10 +1202,11 @@ } device_suspend(PMSG_SUSPEND); + local_irq_disable(); device_power_down(PMSG_SUSPEND); /* serialize with the timer interrupt */ - write_seqlock_irq(&xtime_lock); + write_seqlock(&xtime_lock); /* protect against access to timer chip registers */ spin_lock(&i8253_lock); @@ -1216,20 +1217,22 @@ * We'll undo any timer changes due to interrupts below. */ spin_unlock(&i8253_lock); - write_sequnlock_irq(&xtime_lock); + write_sequnlock(&xtime_lock); + local_irq_enable(); save_processor_state(); err = set_system_power_state(APM_STATE_SUSPEND); restore_processor_state(); - write_seqlock_irq(&xtime_lock); + local_irq_disable(); + write_seqlock(&xtime_lock); spin_lock(&i8253_lock); reinit_timer(); set_time(); ignore_normal_resume = 1; spin_unlock(&i8253_lock); - write_sequnlock_irq(&xtime_lock); + write_sequnlock(&xtime_lock); if (err == APM_NO_ERROR) err = APM_SUCCESS; @@ -1237,6 +1240,7 @@ apm_error("suspend", err); err = (err == APM_SUCCESS) ? 0 : -EIO; device_power_up(); + local_irq_enable(); device_resume(); pm_send_all(PM_RESUME, (void *)0); queue_event(APM_NORMAL_RESUME, NULL); @@ -1255,17 +1259,22 @@ { int err; + local_irq_disable(); device_power_down(PMSG_SUSPEND); /* serialize with the timer interrupt */ - write_seqlock_irq(&xtime_lock); + write_seqlock(&xtime_lock); /* If needed, notify drivers here */ get_time_diff(); - write_sequnlock_irq(&xtime_lock); + write_sequnlock(&xtime_lock); + local_irq_enable(); err = set_system_power_state(APM_STATE_STANDBY); if ((err != APM_SUCCESS) && (err != APM_NO_ERROR)) apm_error("standby", err); + + local_irq_disable(); device_power_up(); + local_irq_enable(); } static apm_event_t get_event(void) diff -Nru a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c --- a/arch/i386/kernel/cpu/mtrr/generic.c 2005-03-30 16:58:49 -08:00 +++ b/arch/i386/kernel/cpu/mtrr/generic.c 2005-03-30 16:58:49 -08:00 @@ -92,6 +92,16 @@ printk(KERN_INFO "mtrr: corrected configuration.\n"); } +/* Doesn't attempt to pass an error out to MTRR users + because it's quite complicated in some cases and probably not + worth it because the best error handling is to ignore it. */ +void mtrr_wrmsr(unsigned msr, unsigned a, unsigned b) +{ + if (wrmsr_safe(msr, a, b) < 0) + printk(KERN_ERR + "MTRR: CPU %u: Writing MSR %x to %x:%x failed\n", + smp_processor_id(), msr, a, b); +} int generic_get_free_region(unsigned long base, unsigned long size) /* [SUMMARY] Get a free MTRR. @@ -150,14 +160,14 @@ rdmsr(MTRRfix64K_00000_MSR, lo, hi); if (p[0] != lo || p[1] != hi) { - wrmsr(MTRRfix64K_00000_MSR, p[0], p[1]); + mtrr_wrmsr(MTRRfix64K_00000_MSR, p[0], p[1]); changed = TRUE; } for (i = 0; i < 2; i++) { rdmsr(MTRRfix16K_80000_MSR + i, lo, hi); if (p[2 + i * 2] != lo || p[3 + i * 2] != hi) { - wrmsr(MTRRfix16K_80000_MSR + i, p[2 + i * 2], + mtrr_wrmsr(MTRRfix16K_80000_MSR + i, p[2 + i * 2], p[3 + i * 2]); changed = TRUE; } @@ -166,7 +176,7 @@ for (i = 0; i < 8; i++) { rdmsr(MTRRfix4K_C0000_MSR + i, lo, hi); if (p[6 + i * 2] != lo || p[7 + i * 2] != hi) { - wrmsr(MTRRfix4K_C0000_MSR + i, p[6 + i * 2], + mtrr_wrmsr(MTRRfix4K_C0000_MSR + i, p[6 + i * 2], p[7 + i * 2]); changed = TRUE; } @@ -184,7 +194,7 @@ rdmsr(MTRRphysBase_MSR(index), lo, hi); if ((vr->base_lo & 0xfffff0ffUL) != (lo & 0xfffff0ffUL) || (vr->base_hi & 0xfUL) != (hi & 0xfUL)) { - wrmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi); + mtrr_wrmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi); changed = TRUE; } @@ -192,7 +202,7 @@ if ((vr->mask_lo & 0xfffff800UL) != (lo & 0xfffff800UL) || (vr->mask_hi & 0xfUL) != (hi & 0xfUL)) { - wrmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi); + mtrr_wrmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi); changed = TRUE; } return changed; @@ -267,7 +277,7 @@ rdmsr(MTRRdefType_MSR, deftype_lo, deftype_hi); /* Disable MTRRs, and set the default type to uncached */ - wrmsr(MTRRdefType_MSR, deftype_lo & 0xf300UL, deftype_hi); + mtrr_wrmsr(MTRRdefType_MSR, deftype_lo & 0xf300UL, deftype_hi); } static void post_set(void) @@ -276,7 +286,7 @@ __flush_tlb(); /* Intel (P6) standard MTRRs */ - wrmsr(MTRRdefType_MSR, deftype_lo, deftype_hi); + mtrr_wrmsr(MTRRdefType_MSR, deftype_lo, deftype_hi); /* Enable caches */ write_cr0(read_cr0() & 0xbfffffff); @@ -330,11 +340,11 @@ if (size == 0) { /* The invalid bit is kept in the mask, so we simply clear the relevant mask register to disable a range. */ - wrmsr(MTRRphysMask_MSR(reg), 0, 0); + mtrr_wrmsr(MTRRphysMask_MSR(reg), 0, 0); } else { - wrmsr(MTRRphysBase_MSR(reg), base << PAGE_SHIFT | type, + mtrr_wrmsr(MTRRphysBase_MSR(reg), base << PAGE_SHIFT | type, (base & size_and_mask) >> (32 - PAGE_SHIFT)); - wrmsr(MTRRphysMask_MSR(reg), -size << PAGE_SHIFT | 0x800, + mtrr_wrmsr(MTRRphysMask_MSR(reg), -size << PAGE_SHIFT | 0x800, (-size & size_and_mask) >> (32 - PAGE_SHIFT)); } diff -Nru a/arch/i386/kernel/cpu/mtrr/if.c b/arch/i386/kernel/cpu/mtrr/if.c --- a/arch/i386/kernel/cpu/mtrr/if.c 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/kernel/cpu/mtrr/if.c 2005-03-30 16:58:50 -08:00 @@ -98,16 +98,20 @@ unsigned long long base, size; char *ptr; char line[LINE_SIZE]; + size_t linelen; if (!capable(CAP_SYS_ADMIN)) return -EPERM; + if (!len) + return -EINVAL; memset(line, 0, LINE_SIZE); if (len > LINE_SIZE) len = LINE_SIZE; if (copy_from_user(line, buf, len - 1)) return -EFAULT; - ptr = line + strlen(line) - 1; - if (*ptr == '\n') + linelen = strlen(line); + ptr = line + linelen - 1; + if (linelen && *ptr == '\n') *ptr = '\0'; if (!strncmp(line, "disable=", 8)) { reg = simple_strtoul(line + 8, &ptr, 0); diff -Nru a/arch/i386/kernel/cpu/mtrr/mtrr.h b/arch/i386/kernel/cpu/mtrr/mtrr.h --- a/arch/i386/kernel/cpu/mtrr/mtrr.h 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/kernel/cpu/mtrr/mtrr.h 2005-03-30 16:58:50 -08:00 @@ -94,4 +94,5 @@ void finalize_mtrr_state(void); void mtrr_state_warn(void); char *mtrr_attrib_to_str(int x); +void mtrr_wrmsr(unsigned, unsigned, unsigned); diff -Nru a/arch/i386/kernel/cpu/mtrr/state.c b/arch/i386/kernel/cpu/mtrr/state.c --- a/arch/i386/kernel/cpu/mtrr/state.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/kernel/cpu/mtrr/state.c 2005-03-30 16:58:47 -08:00 @@ -42,7 +42,7 @@ { if (use_intel()) /* Disable MTRRs, and set the default type to uncached */ - wrmsr(MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL, + mtrr_wrmsr(MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL, ctxt->deftype_hi); else if (is_cpu(CYRIX)) /* Cyrix ARRs - everything else were excluded at the top */ @@ -60,7 +60,7 @@ /* Restore MTRRdefType */ if (use_intel()) /* Intel (P6) standard MTRRs */ - wrmsr(MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi); + mtrr_wrmsr(MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi); else /* Cyrix ARRs - everything else was excluded at the top */ setCx86(CX86_CCR3, ctxt->ccr3); diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c 2005-03-30 16:58:51 -08:00 +++ b/arch/i386/kernel/dmi_scan.c 2005-03-30 16:58:51 -08:00 @@ -12,8 +12,6 @@ #include -int es7000_plat = 0; - struct dmi_header { u8 type; diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c 2005-03-30 16:58:48 -08:00 +++ b/arch/i386/kernel/io_apic.c 2005-03-30 16:58:48 -08:00 @@ -275,7 +275,7 @@ #define IRQ_DELTA(cpu,irq) (irq_cpu_data[cpu].irq_delta[irq]) #define IDLE_ENOUGH(cpu,now) \ - (idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > 1)) + (idle_cpu(cpu) && ((now) - per_cpu(irq_stat, (cpu)).idle_timestamp > 1)) #define IRQ_ALLOWED(cpu, allowed_mask) cpu_isset(cpu, allowed_mask) diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c --- a/arch/i386/kernel/irq.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/kernel/irq.c 2005-03-30 16:58:47 -08:00 @@ -16,6 +16,9 @@ #include #include +DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_maxaligned_in_smp; +EXPORT_PER_CPU_SYMBOL(irq_stat); + #ifndef CONFIG_X86_LOCAL_APIC /* * 'what should we do if we get a hw irq event on an illegal vector'. @@ -246,7 +249,7 @@ for (j = 0; j < NR_CPUS; j++) if (cpu_online(j)) seq_printf(p, "%10u ", - irq_stat[j].apic_timer_irqs); + per_cpu(irq_stat,j).apic_timer_irqs); seq_putc(p, '\n'); #endif seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c 2005-03-30 16:58:48 -08:00 +++ b/arch/i386/kernel/mpparse.c 2005-03-30 16:58:48 -08:00 @@ -982,6 +982,7 @@ return; } +int es7000_plat; void __init mp_config_acpi_legacy_irqs (void) { @@ -996,9 +997,9 @@ Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); /* - * ES7000 has no legacy identity mappings + * Older generations of ES7000 have no legacy identity mappings */ - if (es7000_plat) + if (es7000_plat == 1) return; /* diff -Nru a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c --- a/arch/i386/kernel/nmi.c 2005-03-30 16:58:49 -08:00 +++ b/arch/i386/kernel/nmi.c 2005-03-30 16:58:49 -08:00 @@ -110,7 +110,7 @@ printk(KERN_INFO "testing NMI watchdog ... "); for (cpu = 0; cpu < NR_CPUS; cpu++) - prev_nmi_count[cpu] = irq_stat[cpu].__nmi_count; + prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count; local_irq_enable(); mdelay((10*1000)/nmi_hz); // wait 10 ticks @@ -483,7 +483,7 @@ */ int sum, cpu = smp_processor_id(); - sum = irq_stat[cpu].apic_timer_irqs; + sum = per_cpu(irq_stat, cpu).apic_timer_irqs; if (last_irq_sums[cpu] == sum) { /* diff -Nru a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c --- a/arch/i386/kernel/pci-dma.c 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/kernel/pci-dma.c 2005-03-30 16:58:50 -08:00 @@ -22,7 +22,7 @@ }; void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int gfp) + dma_addr_t *dma_handle, unsigned int __nocast gfp) { void *ret; struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/kernel/process.c 2005-03-30 16:58:47 -08:00 @@ -161,7 +161,7 @@ if (!idle) idle = default_idle; - irq_stat[cpu].idle_timestamp = jiffies; + __get_cpu_var(irq_stat).idle_timestamp = jiffies; idle(); } schedule(); diff -Nru a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c --- a/arch/i386/kernel/quirks.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/kernel/quirks.c 2005-03-30 16:58:47 -08:00 @@ -37,7 +37,9 @@ irqbalance_disable(""); #endif noirqdebug_setup(""); +#ifdef CONFIG_PROC_FS no_irq_affinity = 1; +#endif } config &= ~0x2; diff -Nru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c --- a/arch/i386/kernel/time.c 2005-03-30 16:58:48 -08:00 +++ b/arch/i386/kernel/time.c 2005-03-30 16:58:48 -08:00 @@ -204,19 +204,19 @@ { int retval; + WARN_ON(irqs_disabled()); + /* gets recalled with irq locally disabled */ - spin_lock(&rtc_lock); + spin_lock_irq(&rtc_lock); if (efi_enabled) retval = efi_set_rtc_mmss(nowtime); else retval = mach_set_rtc_mmss(nowtime); - spin_unlock(&rtc_lock); + spin_unlock_irq(&rtc_lock); return retval; } -/* last time the cmos clock got updated */ -static long last_rtc_update; int timer_ack; @@ -268,24 +268,6 @@ do_timer_interrupt_hook(regs); - /* - * If we have an externally synchronized Linux clock, then update - * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be - * called as close as possible to 500 ms before the new second starts. - */ - if ((time_status & STA_UNSYNC) == 0 && - xtime.tv_sec > last_rtc_update + 660 && - (xtime.tv_nsec / 1000) - >= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 && - (xtime.tv_nsec / 1000) - <= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2) { - last_rtc_update = xtime.tv_sec; - if (efi_enabled) { - if (efi_set_rtc_mmss(xtime.tv_sec)) - last_rtc_update -= 600; - } else if (set_rtc_mmss(xtime.tv_sec)) - last_rtc_update -= 600; - } if (MCA_bus) { /* The PS/2 uses level-triggered interrupts. You can't @@ -341,6 +323,55 @@ spin_unlock(&rtc_lock); return retval; +} +static void sync_cmos_clock(unsigned long dummy); + +static struct timer_list sync_cmos_timer = + TIMER_INITIALIZER(sync_cmos_clock, 0, 0); + +static void sync_cmos_clock(unsigned long dummy) +{ + struct timeval now, next; + int fail = 1; + + /* + * If we have an externally synchronized Linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + * This code is run on a timer. If the clock is set, that timer + * may not expire at the correct time. Thus, we adjust... + */ + if ((time_status & STA_UNSYNC) != 0) + /* + * Not synced, exit, do not restart a timer (if one is + * running, let it run out). + */ + return; + + do_gettimeofday(&now); + if (now.tv_usec >= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 && + now.tv_usec <= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2) + fail = set_rtc_mmss(now.tv_sec); + + next.tv_usec = USEC_AFTER - now.tv_usec; + if (next.tv_usec <= 0) + next.tv_usec += USEC_PER_SEC; + + if (!fail) + next.tv_sec = 659; + else + next.tv_sec = 0; + + if (next.tv_usec >= USEC_PER_SEC) { + next.tv_sec++; + next.tv_usec -= USEC_PER_SEC; + } + mod_timer(&sync_cmos_timer, jiffies + timeval_to_jiffies(&next)); +} + +void notify_arch_cmos_timer(void) +{ + mod_timer(&sync_cmos_timer, jiffies + 1); } static long clock_cmos_diff, sleep_start; diff -Nru a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/kernel/traps.c 2005-03-30 16:58:47 -08:00 @@ -1030,3 +1030,10 @@ trap_init_hook(); } + +static int __init kstack_setup(char *s) +{ + kstack_depth_to_print = simple_strtoul(s, NULL, 0); + return 0; +} +__setup("kstack=", kstack_setup); diff -Nru a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c --- a/arch/i386/mach-es7000/es7000plat.c 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/mach-es7000/es7000plat.c 2005-03-30 16:58:50 -08:00 @@ -138,7 +138,19 @@ es7000_plat = 0; } else { printk("\nEnabling ES7000 specific features...\n"); - es7000_plat = 1; + /* + * Determine the generation of the ES7000 currently running. + * + * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box + * es7000_plat = 1 if the machine is a 5xx ES7000 box + * es7000_plat = 2 if the machine is a x86_64 ES7000 box + * + */ + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) + es7000_plat = 2; + else + es7000_plat = 1; + ioapic_renumber_irq = es7000_rename_gsi; } return es7000_plat; diff -Nru a/arch/i386/math-emu/fpu_entry.c b/arch/i386/math-emu/fpu_entry.c --- a/arch/i386/math-emu/fpu_entry.c 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/math-emu/fpu_entry.c 2005-03-30 16:58:50 -08:00 @@ -257,7 +257,7 @@ } RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(FPU_modrm, (u_char __user *) FPU_EIP); RE_ENTRANT_CHECK_ON; FPU_EIP++; @@ -589,7 +589,7 @@ *override = (overrides) { 0, 0, PREFIX_DEFAULT }; /* defaults */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(byte, ip); RE_ENTRANT_CHECK_ON; @@ -635,7 +635,7 @@ do_next_byte: ip++; RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(byte, ip); RE_ENTRANT_CHECK_ON; break; @@ -686,7 +686,7 @@ int offset, other, i, tags, regnr, tag, newtop; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, d, 7*4 + 8*10); + FPU_access_ok(VERIFY_READ, d, 7*4 + 8*10); if (__copy_from_user(&S387->cwd, d, 7*4)) return -1; RE_ENTRANT_CHECK_ON; @@ -732,7 +732,7 @@ int offset = (S387->ftop & 7) * 10, other = 80 - offset; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE, d, 7*4 + 8*10); + FPU_access_ok(VERIFY_WRITE, d, 7*4 + 8*10); #ifdef PECULIAR_486 S387->cwd &= ~0xe080; /* An 80486 sets nearly all of the reserved bits to 1. */ diff -Nru a/arch/i386/math-emu/fpu_system.h b/arch/i386/math-emu/fpu_system.h --- a/arch/i386/math-emu/fpu_system.h 2005-03-30 16:58:48 -08:00 +++ b/arch/i386/math-emu/fpu_system.h 2005-03-30 16:58:48 -08:00 @@ -66,7 +66,7 @@ #define instruction_address (*(struct address *)&I387.soft.fip) #define operand_address (*(struct address *)&I387.soft.foo) -#define FPU_verify_area(x,y,z) if ( !access_ok(x,y,z) ) \ +#define FPU_access_ok(x,y,z) if ( !access_ok(x,y,z) ) \ math_abort(FPU_info,SIGSEGV) #undef FPU_IGNORE_CODE_SEGV @@ -75,12 +75,12 @@ about 20% slower if applied to the code. Anyway, errors due to bad code addresses should be much rarer than errors due to bad data addresses. */ -#define FPU_code_verify_area(z) +#define FPU_code_access_ok(z) #else /* A simpler test than access_ok() can probably be done for - FPU_code_verify_area() because the only possible error is to step + FPU_code_access_ok() because the only possible error is to step past the upper boundary of a legal code area. */ -#define FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void __user *)FPU_EIP,z) +#define FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user *)FPU_EIP,z) #endif #define FPU_get_user(x,y) get_user((x),(y)) diff -Nru a/arch/i386/math-emu/get_address.c b/arch/i386/math-emu/get_address.c --- a/arch/i386/math-emu/get_address.c 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/math-emu/get_address.c 2005-03-30 16:58:50 -08:00 @@ -81,7 +81,7 @@ long offset; RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(base, (u_char __user *) (*fpu_eip)); /* The SIB byte */ RE_ENTRANT_CHECK_ON; (*fpu_eip)++; @@ -111,7 +111,7 @@ /* 8 bit signed displacement */ long displacement; RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(displacement, (signed char __user *) (*fpu_eip)); offset += displacement; RE_ENTRANT_CHECK_ON; @@ -122,7 +122,7 @@ /* 32 bit displacement */ long displacement; RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(4); + FPU_code_access_ok(4); FPU_get_user(displacement, (long __user *) (*fpu_eip)); offset += displacement; RE_ENTRANT_CHECK_ON; @@ -276,7 +276,7 @@ { /* Special case: disp32 */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(4); + FPU_code_access_ok(4); FPU_get_user(address, (unsigned long __user *) (*fpu_eip)); (*fpu_eip) += 4; RE_ENTRANT_CHECK_ON; @@ -293,7 +293,7 @@ case 1: /* 8 bit signed displacement */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(address, (signed char __user *) (*fpu_eip)); RE_ENTRANT_CHECK_ON; (*fpu_eip)++; @@ -301,7 +301,7 @@ case 2: /* 32 bit displacement */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(4); + FPU_code_access_ok(4); FPU_get_user(address, (long __user *) (*fpu_eip)); (*fpu_eip) += 4; RE_ENTRANT_CHECK_ON; @@ -362,7 +362,7 @@ { /* Special case: disp16 */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(2); + FPU_code_access_ok(2); FPU_get_user(address, (unsigned short __user *) (*fpu_eip)); (*fpu_eip) += 2; RE_ENTRANT_CHECK_ON; @@ -372,7 +372,7 @@ case 1: /* 8 bit signed displacement */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(1); + FPU_code_access_ok(1); FPU_get_user(address, (signed char __user *) (*fpu_eip)); RE_ENTRANT_CHECK_ON; (*fpu_eip)++; @@ -380,7 +380,7 @@ case 2: /* 16 bit displacement */ RE_ENTRANT_CHECK_OFF; - FPU_code_verify_area(2); + FPU_code_access_ok(2); FPU_get_user(address, (unsigned short __user *) (*fpu_eip)); (*fpu_eip) += 2; RE_ENTRANT_CHECK_ON; diff -Nru a/arch/i386/math-emu/load_store.c b/arch/i386/math-emu/load_store.c --- a/arch/i386/math-emu/load_store.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/math-emu/load_store.c 2005-03-30 16:58:47 -08:00 @@ -208,7 +208,7 @@ break; case 024: /* fldcw */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, data_address, 2); + FPU_access_ok(VERIFY_READ, data_address, 2); FPU_get_user(control_word, (unsigned short __user *) data_address); RE_ENTRANT_CHECK_ON; if ( partial_status & ~control_word & CW_Exceptions ) @@ -243,7 +243,7 @@ break; case 034: /* fstcw m16int */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,data_address,2); + FPU_access_ok(VERIFY_WRITE,data_address,2); FPU_put_user(control_word, (unsigned short __user *) data_address); RE_ENTRANT_CHECK_ON; return 1; @@ -255,7 +255,7 @@ break; case 036: /* fstsw m2byte */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,data_address,2); + FPU_access_ok(VERIFY_WRITE,data_address,2); FPU_put_user(status_word(),(unsigned short __user *) data_address); RE_ENTRANT_CHECK_ON; return 1; diff -Nru a/arch/i386/math-emu/reg_ld_str.c b/arch/i386/math-emu/reg_ld_str.c --- a/arch/i386/math-emu/reg_ld_str.c 2005-03-30 16:58:49 -08:00 +++ b/arch/i386/math-emu/reg_ld_str.c 2005-03-30 16:58:49 -08:00 @@ -91,7 +91,7 @@ FPU_REG *sti_ptr = &st(stnr); RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, s, 10); + FPU_access_ok(VERIFY_READ, s, 10); __copy_from_user(sti_ptr, s, 10); RE_ENTRANT_CHECK_ON; @@ -106,7 +106,7 @@ unsigned m64, l64; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, dfloat, 8); + FPU_access_ok(VERIFY_READ, dfloat, 8); FPU_get_user(m64, 1 + (unsigned long __user *) dfloat); FPU_get_user(l64, (unsigned long __user *) dfloat); RE_ENTRANT_CHECK_ON; @@ -178,7 +178,7 @@ int exp, tag, negative; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, single, 4); + FPU_access_ok(VERIFY_READ, single, 4); FPU_get_user(m32, (unsigned long __user *) single); RE_ENTRANT_CHECK_ON; @@ -243,7 +243,7 @@ FPU_REG *st0_ptr = &st(0); RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, _s, 8); + FPU_access_ok(VERIFY_READ, _s, 8); copy_from_user(&s,_s,8); RE_ENTRANT_CHECK_ON; @@ -274,7 +274,7 @@ int negative; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, _s, 4); + FPU_access_ok(VERIFY_READ, _s, 4); FPU_get_user(s, _s); RE_ENTRANT_CHECK_ON; @@ -302,7 +302,7 @@ int s, negative; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, _s, 2); + FPU_access_ok(VERIFY_READ, _s, 2); /* Cast as short to get the sign extended. */ FPU_get_user(s, _s); RE_ENTRANT_CHECK_ON; @@ -335,7 +335,7 @@ int sign; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, s, 10); + FPU_access_ok(VERIFY_READ, s, 10); RE_ENTRANT_CHECK_ON; for ( pos = 8; pos >= 0; pos--) { @@ -380,7 +380,7 @@ if ( st0_tag != TAG_Empty ) { RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE, d, 10); + FPU_access_ok(VERIFY_WRITE, d, 10); FPU_put_user(st0_ptr->sigl, (unsigned long __user *) d); FPU_put_user(st0_ptr->sigh, (unsigned long __user *) ((u_char __user *)d + 4)); @@ -397,7 +397,7 @@ /* The masked response */ /* Put out the QNaN indefinite */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,10); + FPU_access_ok(VERIFY_WRITE,d,10); FPU_put_user(0, (unsigned long __user *) d); FPU_put_user(0xc0000000, 1 + (unsigned long __user *) d); FPU_put_user(0xffff, 4 + (short __user *) d); @@ -607,7 +607,7 @@ /* The masked response */ /* Put out the QNaN indefinite */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,dfloat,8); + FPU_access_ok(VERIFY_WRITE,dfloat,8); FPU_put_user(0, (unsigned long __user *) dfloat); FPU_put_user(0xfff80000, 1 + (unsigned long __user *) dfloat); RE_ENTRANT_CHECK_ON; @@ -620,7 +620,7 @@ l[1] |= 0x80000000; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,dfloat,8); + FPU_access_ok(VERIFY_WRITE,dfloat,8); FPU_put_user(l[0], (unsigned long __user *)dfloat); FPU_put_user(l[1], 1 + (unsigned long __user *)dfloat); RE_ENTRANT_CHECK_ON; @@ -826,7 +826,7 @@ /* The masked response */ /* Put out the QNaN indefinite */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,single,4); + FPU_access_ok(VERIFY_WRITE,single,4); FPU_put_user(0xffc00000, (unsigned long __user *) single); RE_ENTRANT_CHECK_ON; return 1; @@ -845,7 +845,7 @@ templ |= 0x80000000; RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,single,4); + FPU_access_ok(VERIFY_WRITE,single,4); FPU_put_user(templ,(unsigned long __user *) single); RE_ENTRANT_CHECK_ON; @@ -906,7 +906,7 @@ } RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,8); + FPU_access_ok(VERIFY_WRITE,d,8); copy_to_user(d, &tll, 8); RE_ENTRANT_CHECK_ON; @@ -963,7 +963,7 @@ } RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,4); + FPU_access_ok(VERIFY_WRITE,d,4); FPU_put_user(t.sigl, (unsigned long __user *) d); RE_ENTRANT_CHECK_ON; @@ -1020,7 +1020,7 @@ } RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,2); + FPU_access_ok(VERIFY_WRITE,d,2); FPU_put_user((short)t.sigl, d); RE_ENTRANT_CHECK_ON; @@ -1069,7 +1069,7 @@ { /* Produce the QNaN "indefinite" */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,10); + FPU_access_ok(VERIFY_WRITE,d,10); for ( i = 0; i < 7; i++) FPU_put_user(0, d+i); /* These bytes "undefined" */ FPU_put_user(0xc0, d+7); /* This byte "undefined" */ @@ -1088,7 +1088,7 @@ } RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,10); + FPU_access_ok(VERIFY_WRITE,d,10); RE_ENTRANT_CHECK_ON; for ( i = 0; i < 9; i++) { @@ -1186,7 +1186,7 @@ ^ (addr_modes.override.operand_size == OP_SIZE_PREFIX)) ) { RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, s, 0x0e); + FPU_access_ok(VERIFY_READ, s, 0x0e); FPU_get_user(control_word, (unsigned short __user *) s); FPU_get_user(partial_status, (unsigned short __user *) (s+2)); FPU_get_user(tag_word, (unsigned short __user *) (s+4)); @@ -1206,7 +1206,7 @@ else { RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ, s, 0x1c); + FPU_access_ok(VERIFY_READ, s, 0x1c); FPU_get_user(control_word, (unsigned short __user *) s); FPU_get_user(partial_status, (unsigned short __user *) (s+4)); FPU_get_user(tag_word, (unsigned short __user *) (s+8)); @@ -1274,7 +1274,7 @@ /* Copy all registers in stack order. */ RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_READ,s,80); + FPU_access_ok(VERIFY_READ,s,80); __copy_from_user(register_base+offset, s, other); if ( offset ) __copy_from_user(register_base, s+other, offset); @@ -1298,7 +1298,7 @@ ^ (addr_modes.override.operand_size == OP_SIZE_PREFIX)) ) { RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,14); + FPU_access_ok(VERIFY_WRITE,d,14); #ifdef PECULIAR_486 FPU_put_user(control_word & ~0xe080, (unsigned long __user *) d); #else @@ -1326,7 +1326,7 @@ else { RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE, d, 7*4); + FPU_access_ok(VERIFY_WRITE, d, 7*4); #ifdef PECULIAR_486 control_word &= ~0xe080; /* An 80486 sets nearly all of the reserved bits to 1. */ @@ -1356,7 +1356,7 @@ d = fstenv(addr_modes, data_address); RE_ENTRANT_CHECK_OFF; - FPU_verify_area(VERIFY_WRITE,d,80); + FPU_access_ok(VERIFY_WRITE,d,80); /* Copy all registers in stack order. */ __copy_to_user(d, register_base+offset, other); diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c --- a/arch/i386/mm/hugetlbpage.c 2005-03-30 16:58:50 -08:00 +++ b/arch/i386/mm/hugetlbpage.c 2005-03-30 16:58:50 -08:00 @@ -46,7 +46,7 @@ { pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); if (write_access) { entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); @@ -86,7 +86,7 @@ ptepage = pte_page(entry); get_page(ptepage); set_pte(dst_pte, entry); - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); addr += HPAGE_SIZE; } return 0; @@ -209,20 +209,23 @@ { struct mm_struct *mm = vma->vm_mm; unsigned long address; - pte_t pte; + pte_t pte, *ptep; struct page *page; BUG_ON(start & (HPAGE_SIZE - 1)); BUG_ON(end & (HPAGE_SIZE - 1)); for (address = start; address < end; address += HPAGE_SIZE) { - pte = ptep_get_and_clear(mm, address, huge_pte_offset(mm, address)); + ptep = huge_pte_offset(mm, address); + if (!ptep) + continue; + pte = ptep_get_and_clear(mm, address, ptep); if (pte_none(pte)) continue; page = pte_page(pte); put_page(page); } - mm->rss -= (end - start) >> PAGE_SHIFT; + add_mm_counter(mm ,rss, -((end - start) >> PAGE_SHIFT)); flush_tlb_range(vma, start, end); } diff -Nru a/arch/i386/oprofile/backtrace.c b/arch/i386/oprofile/backtrace.c --- a/arch/i386/oprofile/backtrace.c 2005-03-30 16:58:47 -08:00 +++ b/arch/i386/oprofile/backtrace.c 2005-03-30 16:58:47 -08:00 @@ -18,7 +18,6 @@ unsigned long ret; } __attribute__((packed)); - static struct frame_head * dump_backtrace(struct frame_head * head) { @@ -32,16 +31,6 @@ return head->ebp; } - -#ifdef CONFIG_X86_4G -/* With a 4G kernel/user split, user pages are not directly - * accessible from the kernel, so don't try - */ -static int pages_present(struct frame_head * head) -{ - return 0; -} -#else /* check that the page(s) containing the frame head are present */ static int pages_present(struct frame_head * head) { @@ -53,8 +42,6 @@ return check_user_page_readable(mm, (unsigned long)(head + 1)); } -#endif /* CONFIG_X86_4G */ - /* * | | /\ Higher addresses diff -Nru a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c --- a/arch/i386/pci/fixup.c 2005-03-30 16:58:49 -08:00 +++ b/arch/i386/pci/fixup.c 2005-03-30 16:58:49 -08:00 @@ -343,7 +343,7 @@ /* * Fixup to mark boot BIOS video selected by BIOS before it changes * - * From information provided by "Jon Smirl" + * From information provided by "Jon Smirl" * * The standard boot ROM sequence for an x86 machine uses the BIOS * to select an initial video card for boot display. This boot video @@ -354,12 +354,13 @@ * See pci_map_rom() for use of this flag. IORESOURCE_ROM_SHADOW * is marked here since the boot video device will be the only enabled * video device at this point. - * - */static void __devinit pci_fixup_video(struct pci_dev *pdev) + */ + +static void __devinit pci_fixup_video(struct pci_dev *pdev) { struct pci_dev *bridge; struct pci_bus *bus; - u16 l; + u16 config; if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) return; @@ -369,12 +370,17 @@ while (bus) { bridge = bus->self; if (bridge) { - pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &l); - if (!(l & PCI_BRIDGE_CTL_VGA)) + pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, + &config); + if (!(config & PCI_BRIDGE_CTL_VGA)) return; } bus = bus->parent; } - pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; + pci_read_config_word(pdev, PCI_COMMAND, &config); + if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { + pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; + printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev)); + } } DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); diff -Nru a/arch/i386/power/swsusp.S b/arch/i386/power/swsusp.S --- a/arch/i386/power/swsusp.S 2005-03-30 16:58:51 -08:00 +++ b/arch/i386/power/swsusp.S 2005-03-30 16:58:51 -08:00 @@ -51,6 +51,15 @@ .p2align 4,,7 done: + /* Flush TLB, including "global" things (vmalloc) */ + movl mmu_cr4_features, %eax + movl %eax, %edx + andl $~(1<<7), %edx; # PGE + movl %edx, %cr4; # turn off PGE + movl %cr3, %ecx; # flush TLB + movl %ecx, %cr3 + movl %eax, %cr4; # turn PGE back on + movl saved_context_esp, %esp movl saved_context_ebp, %ebp movl saved_context_ebx, %ebx @@ -58,5 +67,7 @@ movl saved_context_edi, %edi pushl saved_context_eflags ; popfl - call swsusp_restore + + xorl %eax, %eax + ret diff -Nru a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c --- a/arch/ia64/hp/common/sba_iommu.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ia64/hp/common/sba_iommu.c 2005-03-30 16:58:47 -08:00 @@ -762,7 +762,7 @@ #ifdef ENABLE_MARK_CLEAN /** * Since DMA is i-cache coherent, any (complete) pages that were written via - * DMA can be marked as "clean" so that update_mmu_cache() doesn't have to + * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to * flush them when they get mapped into an executable vm-area. */ static void diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c --- a/arch/ia64/kernel/irq.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ia64/kernel/irq.c 2005-03-30 16:58:50 -08:00 @@ -94,11 +94,19 @@ /* * This is updated when the user sets irq affinity via /proc */ -cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS]; +static cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS]; static unsigned long pending_irq_redir[BITS_TO_LONGS(NR_IRQS)]; -static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL }; static char irq_redir [NR_IRQS]; // = { [0 ... NR_IRQS-1] = 1 }; + +/* + * Arch specific routine for deferred write to iosapic rte to reprogram + * intr destination. + */ +void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) +{ + pending_irq_cpumask[irq] = mask_val; +} void set_irq_affinity_info (unsigned int irq, int hwid, int redir) { diff -Nru a/arch/ia64/lib/swiotlb.c b/arch/ia64/lib/swiotlb.c --- a/arch/ia64/lib/swiotlb.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ia64/lib/swiotlb.c 2005-03-30 16:58:49 -08:00 @@ -444,7 +444,7 @@ /* * Since DMA is i-cache coherent, any (complete) pages that were written via - * DMA can be marked as "clean" so that update_mmu_cache() doesn't have to + * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to * flush them when they get mapped into an executable vm-area. */ static void diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c --- a/arch/ia64/mm/hugetlbpage.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ia64/mm/hugetlbpage.c 2005-03-30 16:58:48 -08:00 @@ -73,7 +73,7 @@ { pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); if (write_access) { entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); @@ -116,7 +116,7 @@ ptepage = pte_page(entry); get_page(ptepage); set_pte(dst_pte, entry); - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); addr += HPAGE_SIZE; } return 0; @@ -246,7 +246,7 @@ put_page(page); pte_clear(mm, address, pte); } - mm->rss -= (end - start) >> PAGE_SHIFT; + add_mm_counter(mm, rss, - ((end - start) >> PAGE_SHIFT)); flush_tlb_range(vma, start, end); } diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c --- a/arch/ia64/mm/init.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ia64/mm/init.c 2005-03-30 16:58:48 -08:00 @@ -76,7 +76,7 @@ } void -update_mmu_cache (struct vm_area_struct *vma, unsigned long vaddr, pte_t pte) +lazy_mmu_prot_update (pte_t pte) { unsigned long addr; struct page *page; @@ -85,7 +85,6 @@ return; /* not an executable page... */ page = pte_page(pte); - /* don't use VADDR: it may not be mapped on this CPU (or may have just been flushed): */ addr = (unsigned long) page_address(page); if (test_bit(PG_arch_1, &page->flags)) diff -Nru a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile --- a/arch/m32r/boot/compressed/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/m32r/boot/compressed/Makefile 2005-03-30 16:58:47 -08:00 @@ -30,7 +30,12 @@ CFLAGS_misc.o += -fpic +ifdef CONFIG_MMU LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T +else +LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r -T +endif + OBJCOPYFLAGS += -R .empty_zero_page $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE diff -Nru a/arch/m32r/boot/compressed/head.S b/arch/m32r/boot/compressed/head.S --- a/arch/m32r/boot/compressed/head.S 2005-03-30 16:58:50 -08:00 +++ b/arch/m32r/boot/compressed/head.S 2005-03-30 16:58:50 -08:00 @@ -138,6 +138,11 @@ ldi r0, -1 ldi r1, 0xd0 ; invalidate i-cache, copy back d-cache stb r1, @r0 +#elif defined(CONFIG_CHIP_M32102) + /* Cache flush */ + ldi r0, -2 + ldi r1, 0x0100 ; invalidate + stb r1, @r0 #else #error "put your cache flush function, please" #endif diff -Nru a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c --- a/arch/m32r/boot/compressed/m32r_sio.c 2005-03-30 16:58:49 -08:00 +++ b/arch/m32r/boot/compressed/m32r_sio.c 2005-03-30 16:58:49 -08:00 @@ -46,9 +46,14 @@ } *BOOT_SIO0TXB = c; } -#else +#else /* defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_M32700UT) */ +#ifdef CONFIG_MMU #define SIO0STS (volatile unsigned short *)(0xa0efd000 + 14) #define SIO0TXB (volatile unsigned short *)(0xa0efd000 + 30) +#else +#define SIO0STS (volatile unsigned short *)(0x00efd000 + 14) +#define SIO0TXB (volatile unsigned short *)(0x00efd000 + 30) +#endif static void putc(char c) { diff -Nru a/arch/m32r/boot/setup.S b/arch/m32r/boot/setup.S --- a/arch/m32r/boot/setup.S 2005-03-30 16:58:48 -08:00 +++ b/arch/m32r/boot/setup.S 2005-03-30 16:58:48 -08:00 @@ -75,6 +75,11 @@ ldi r1, #0x73 ; cache on (with invalidation) ; ldi r1, #0x00 ; cache off st r1, @r0 +#elif defined(CONFIG_CHIP_M32102) + ldi r0, #-4 ;LDIMM (r0, M32R_MCCR) + ldi r1, #0x101 ; cache on (with invalidation) +; ldi r1, #0x00 ; cache off + st r1, @r0 #else #error unknown chip configuration #endif diff -Nru a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S --- a/arch/m32r/kernel/entry.S 2005-03-30 16:58:50 -08:00 +++ b/arch/m32r/kernel/entry.S 2005-03-30 16:58:50 -08:00 @@ -69,16 +69,17 @@ #include #if !defined(CONFIG_MMU) -#define sys_madvise sys_ni_syscall -#define sys_readahead sys_ni_syscall -#define sys_mprotect sys_ni_syscall -#define sys_msync sys_ni_syscall -#define sys_mlock sys_ni_syscall -#define sys_munlock sys_ni_syscall -#define sys_mlockall sys_ni_syscall -#define sys_munlockall sys_ni_syscall -#define sys_mremap sys_ni_syscall -#define sys_mincore sys_ni_syscall +#define sys_madvise sys_ni_syscall +#define sys_readahead sys_ni_syscall +#define sys_mprotect sys_ni_syscall +#define sys_msync sys_ni_syscall +#define sys_mlock sys_ni_syscall +#define sys_munlock sys_ni_syscall +#define sys_mlockall sys_ni_syscall +#define sys_munlockall sys_ni_syscall +#define sys_mremap sys_ni_syscall +#define sys_mincore sys_ni_syscall +#define sys_remap_file_pages sys_ni_syscall #endif /* CONFIG_MMU */ #define R4(reg) @reg diff -Nru a/arch/m32r/kernel/module.c b/arch/m32r/kernel/module.c --- a/arch/m32r/kernel/module.c 2005-03-30 16:58:50 -08:00 +++ b/arch/m32r/kernel/module.c 2005-03-30 16:58:50 -08:00 @@ -14,6 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include #include #include #include @@ -31,7 +33,11 @@ { if (size == 0) return NULL; +#ifdef CONFIG_MMU return vmalloc_exec(size); +#else + return vmalloc(size); +#endif } diff -Nru a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c --- a/arch/m32r/kernel/traps.c 2005-03-30 16:58:48 -08:00 +++ b/arch/m32r/kernel/traps.c 2005-03-30 16:58:48 -08:00 @@ -95,8 +95,10 @@ eit_vector[31] = 0xff000000UL; eit_vector[32] = BRA_INSN(ei_handler, 32); eit_vector[64] = BRA_INSN(pie_handler, 64); +#ifdef CONFIG_MMU eit_vector[68] = BRA_INSN(ace_handler, 68); eit_vector[72] = BRA_INSN(tme_handler, 72); +#endif /* CONFIG_MMU */ #ifdef CONFIG_SMP eit_vector[184] = (unsigned long)smp_reschedule_interrupt; eit_vector[185] = (unsigned long)smp_invalidate_interrupt; diff -Nru a/arch/m32r/mm/cache.c b/arch/m32r/mm/cache.c --- a/arch/m32r/mm/cache.c 2005-03-30 16:58:51 -08:00 +++ b/arch/m32r/mm/cache.c 2005-03-30 16:58:51 -08:00 @@ -4,8 +4,6 @@ * Copyright (C) 2002 Hirokazu Takata */ -/* $Id$ */ - #include #include @@ -25,8 +23,8 @@ #define MCCR_DCACHE_CBINV (MCCR_CC|MCCR_DIV|MCCR_DCB) #define CHECK_MCCR(mccr) (mccr = *MCCR) #elif defined(CONFIG_CHIP_M32102) -#define MCCR ((volatile unsigned long*)0xfffffffc) -#define MCCR_IIV (1UL << 8) /* I-cache invalidate */ +#define MCCR ((volatile unsigned char*)0xfffffffe) +#define MCCR_IIV (1UL << 0) /* I-cache invalidate */ #define MCCR_ICACHE_INV MCCR_IIV #endif /* CONFIG_CHIP_XNUX2 || CONFIG_CHIP_M32700 */ @@ -65,4 +63,3 @@ #endif } - diff -Nru a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c --- a/arch/m32r/mm/fault-nommu.c 2005-03-30 16:58:48 -08:00 +++ b/arch/m32r/mm/fault-nommu.c 2005-03-30 16:58:48 -08:00 @@ -23,6 +23,7 @@ #include #include #include +#include /* For unblank_screen() */ #include #include diff -Nru a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c --- a/arch/m68k/atari/stdma.c 2005-03-30 16:58:48 -08:00 +++ b/arch/m68k/atari/stdma.c 2005-03-30 16:58:48 -08:00 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -81,11 +82,10 @@ local_irq_save(flags); /* protect lock */ - while(stdma_locked) - /* Since the DMA is used for file system purposes, we - have to sleep uninterruptible (there may be locked - buffers) */ - sleep_on(&stdma_wait); + /* Since the DMA is used for file system purposes, we + have to sleep uninterruptible (there may be locked + buffers) */ + wait_event(stdma_wait, !stdma_locked); stdma_locked = 1; stdma_isr = handler; diff -Nru a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c --- a/arch/m68k/atari/stram.c 2005-03-30 16:58:49 -08:00 +++ b/arch/m68k/atari/stram.c 2005-03-30 16:58:49 -08:00 @@ -635,7 +635,7 @@ set_pte(dir, pte_mkdirty(mk_pte(page, vma->vm_page_prot))); swap_free(entry); get_page(page); - ++vma->vm_mm->rss; + inc_mm_counter(vma->vm_mm, rss); } static inline void unswap_pmd(struct vm_area_struct * vma, pmd_t *dir, diff -Nru a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig --- a/arch/m68k/configs/sun3_defconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/m68k/configs/sun3_defconfig 2005-03-30 16:58:49 -08:00 @@ -730,6 +730,7 @@ # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y +CONFIG_SUN_PARTITION=y # # Native Language Support diff -Nru a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig --- a/arch/m68k/configs/sun3x_defconfig 2005-03-30 16:58:47 -08:00 +++ b/arch/m68k/configs/sun3x_defconfig 2005-03-30 16:58:47 -08:00 @@ -740,6 +740,7 @@ # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y +CONFIG_SUN_PARTITION=y # # Native Language Support diff -Nru a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c --- a/arch/m68k/kernel/signal.c 2005-03-30 16:58:49 -08:00 +++ b/arch/m68k/kernel/signal.c 2005-03-30 16:58:49 -08:00 @@ -951,6 +951,21 @@ } } +void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) +{ + if (regs->orig_d0 < 0) + return; + switch (regs->d0) { + case -ERESTARTNOHAND: + case -ERESTARTSYS: + case -ERESTARTNOINTR: + regs->d0 = regs->orig_d0; + regs->orig_d0 = -1; + regs->pc -= 2; + break; + } +} + /* * OK, we're invoking a handler */ @@ -982,133 +997,22 @@ * Note that 'init' is a special process: it doesn't get signals it doesn't * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. - * - * Note that we go through the signals twice: once to check the signals - * that the kernel can handle, and then we build all the user-level signal - * handling stack-frames in one go after that. */ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) { siginfo_t info; - struct k_sigaction *ka; + struct k_sigaction ka; + int signr; current->thread.esp0 = (unsigned long) regs; if (!oldset) oldset = ¤t->blocked; - for (;;) { - int signr; - - signr = dequeue_signal(current, ¤t->blocked, &info); - - if (!signr) - break; - - if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { - current->exit_code = signr; - current->state = TASK_STOPPED; - regs->sr &= ~PS_T; - - /* Did we come from a system call? */ - if (regs->orig_d0 >= 0) { - /* Restart the system call the same way as - if the process were not traced. */ - struct k_sigaction *ka = - ¤t->sighand->action[signr-1]; - int has_handler = - (ka->sa.sa_handler != SIG_IGN && - ka->sa.sa_handler != SIG_DFL); - handle_restart(regs, ka, has_handler); - } - notify_parent(current, SIGCHLD); - schedule(); - - /* We're back. Did the debugger cancel the sig? */ - if (!(signr = current->exit_code)) { - discard_frame: - /* Make sure that a faulted bus cycle isn't - restarted (only needed on the 680[23]0). */ - if (regs->format == 10 || regs->format == 11) - regs->stkadj = frame_extra_sizes[regs->format]; - continue; - } - current->exit_code = 0; - - /* The debugger continued. Ignore SIGSTOP. */ - if (signr == SIGSTOP) - goto discard_frame; - - /* Update the siginfo structure. Is this good? */ - if (signr != info.si_signo) { - info.si_signo = signr; - info.si_errno = 0; - info.si_code = SI_USER; - info.si_pid = current->parent->pid; - info.si_uid = current->parent->uid; - info.si_uid16 = high2lowuid(current->parent->uid); - } - - /* If the (new) signal is now blocked, requeue it. */ - if (sigismember(¤t->blocked, signr)) { - send_sig_info(signr, &info, current); - continue; - } - } - - ka = ¤t->sighand->action[signr-1]; - if (ka->sa.sa_handler == SIG_IGN) { - if (signr != SIGCHLD) - continue; - /* Check for SIGCHLD: it's special. */ - while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0) - /* nothing */; - continue; - } - - if (ka->sa.sa_handler == SIG_DFL) { - int exit_code = signr; - - if (current->pid == 1) - continue; - - switch (signr) { - case SIGCONT: case SIGCHLD: - case SIGWINCH: case SIGURG: - continue; - - case SIGTSTP: case SIGTTIN: case SIGTTOU: - if (is_orphaned_pgrp(process_group(current))) - continue; - /* FALLTHRU */ - - case SIGSTOP: { - struct sighand_struct *sighand; - current->state = TASK_STOPPED; - current->exit_code = signr; - sighand = current->parent->sighand; - if (sighand && !(sighand->action[SIGCHLD-1].sa.sa_flags - & SA_NOCLDSTOP)) - notify_parent(current, SIGCHLD); - schedule(); - continue; - } - - case SIGQUIT: case SIGILL: case SIGTRAP: - case SIGIOT: case SIGFPE: case SIGSEGV: - case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ: - if (do_coredump(signr, exit_code, regs)) - exit_code |= 0x80; - /* FALLTHRU */ - - default: - do_group_exit(signr); - /* NOTREACHED */ - } - } - + signr = get_signal_to_deliver(&info, &ka, regs, NULL); + if (signr > 0) { /* Whee! Actually deliver the signal. */ - handle_signal(signr, ka, &info, oldset, regs); + handle_signal(signr, &ka, &info, oldset, regs); return 1; } @@ -1117,18 +1021,5 @@ /* Restart the system call - no handlers present */ handle_restart(regs, NULL, 0); - /* If we are about to discard some frame stuff we must copy - over the remaining frame. */ - if (regs->stkadj) { - struct pt_regs *tregs = - (struct pt_regs *) ((ulong) regs + regs->stkadj); - - /* This must be copied with decreasing addresses to - handle overlaps. */ - tregs->vector = 0; - tregs->format = 0; - tregs->pc = regs->pc; - tregs->sr = regs->sr; - } return 0; } diff -Nru a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile --- a/arch/m68knommu/Makefile 2005-03-30 16:58:49 -08:00 +++ b/arch/m68knommu/Makefile 2005-03-30 16:58:49 -08:00 @@ -43,7 +43,6 @@ model-$(CONFIG_RAMKERNEL) := ram model-$(CONFIG_ROMKERNEL) := rom -model-$(CONFIG_HIMEMKERNEL) := himem MODEL := $(model-y) # @@ -58,12 +57,15 @@ cpuclass-$(CONFIG_M527x) := 5307 cpuclass-$(CONFIG_M5272) := 5307 cpuclass-$(CONFIG_M528x) := 5307 +cpuclass-$(CONFIG_M5307) := 5307 cpuclass-$(CONFIG_M5407) := 5307 +cpuclass-$(CONFIG_M68328) := 68328 cpuclass-$(CONFIG_M68EZ328) := 68328 cpuclass-$(CONFIG_M68VZ328) := 68328 +cpuclass-$(CONFIG_M68360) := 68360 CPUCLASS := $(cpuclass-y) -ifneq ($(CPUCLASS),) +ifneq ($(CPUCLASS),$(PLATFORM)) CLASSDIR := arch/m68knommu/platform/$(cpuclass-y)/ endif @@ -93,7 +95,7 @@ CFLAGS += -D__linux__ CFLAGS += -DUTS_SYSNAME=\"uClinux\" -head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o +head-y := arch/m68knommu/platform/$(cpuclass-y)/head.o CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \ arch/$(ARCH)/kernel/asm-offsets.s diff -Nru a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c --- a/arch/m68knommu/kernel/asm-offsets.c 2005-03-30 16:58:51 -08:00 +++ b/arch/m68knommu/kernel/asm-offsets.c 2005-03-30 16:58:51 -08:00 @@ -15,6 +15,7 @@ #include #include #include +#include #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -63,10 +64,13 @@ DEFINE(PT_A2, offsetof(struct pt_regs, a2)); DEFINE(PT_PC, offsetof(struct pt_regs, pc)); DEFINE(PT_SR, offsetof(struct pt_regs, sr)); + +#ifdef CONFIG_COLDFIRE + /* bitfields are a bit difficult */ + DEFINE(PT_FORMATVEC, offsetof(struct pt_regs, sr) - 2); +#else /* bitfields are a bit difficult */ DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4); - -#ifndef CONFIG_COLDFIRE /* offsets into the irq_handler struct */ DEFINE(IRQ_HANDLER, offsetof(struct irq_node, handler)); DEFINE(IRQ_DEVID, offsetof(struct irq_node, dev_id)); @@ -84,6 +88,14 @@ DEFINE(PT_PTRACED, PT_PTRACED); DEFINE(PT_DTRACE, PT_DTRACE); + + DEFINE(THREAD_SIZE, THREAD_SIZE); + + /* Offsets in thread_info structure */ + DEFINE(TI_TASK, offsetof(struct thread_info, task)); + DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain)); + DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); + DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); return 0; } diff -Nru a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S --- a/arch/m68knommu/kernel/entry.S 2005-03-30 16:58:48 -08:00 +++ b/arch/m68knommu/kernel/entry.S 2005-03-30 16:58:48 -08:00 @@ -47,7 +47,7 @@ ENTRY(buserr) SAVE_ALL moveq #-1,%d0 - movel %d0,%sp@(LORIG_D0) + movel %d0,%sp@(PT_ORIG_D0) movel %sp,%sp@- /* stack frame pointer argument */ jsr buserr_c addql #4,%sp @@ -56,7 +56,7 @@ ENTRY(trap) SAVE_ALL moveq #-1,%d0 - movel %d0,%sp@(LORIG_D0) + movel %d0,%sp@(PT_ORIG_D0) movel %sp,%sp@- /* stack frame pointer argument */ jsr trap_c addql #4,%sp @@ -68,7 +68,7 @@ ENTRY(dbginterrupt) SAVE_ALL moveq #-1,%d0 - movel %d0,%sp@(LORIG_D0) + movel %d0,%sp@(PT_ORIG_D0) movel %sp,%sp@- /* stack frame pointer argument */ jsr dbginterrupt_c addql #4,%sp diff -Nru a/arch/m68knommu/platform/5206/ARNEWSH/crt0_ram.S b/arch/m68knommu/platform/5206/ARNEWSH/crt0_ram.S --- a/arch/m68knommu/platform/5206/ARNEWSH/crt0_ram.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,213 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5206 ColdFire Arnewsh board. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * - * 1999/02/24 Modified for the 5307 processor David W. Miller - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" - -/*****************************************************************************/ - -/* - * Arnewsh m5206 ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -/* - * The following define the limits within which to search for - * available RAM. - */ -#define MEM_MIN 0x00100000 /* Search from 1Mb */ -#define MEM_MAX 0x02000000 /* Max DRAM 32Mb! */ -#define MEM_LUMP 0x00010000 /* 64 Kb chunks */ - -#define MEM_TMPSTACK 0x00010000 /* At 64k - for exceptions */ - -/* - * Chip Select setup. - */ -#define CS0_ADDR 0x0000f000 /* CS0 connected to Flash ROM */ -#define CS0_MASK 0xf0000000 /* is 1Mbyte */ -#define CS0_CTRL 0x00000000 /* read-only */ -#define CS1_ADDR 0x00000000 /* CS1 not connected */ -#define CS1_MASK 0x00000000 -#define CS1_CTRL 0x00000000 -#define CS2_ADDR 0x00003000 /* CS2 connected to SRAM */ -#define CS2_MASK 0x0000f000 /* is 1Mbyte */ -#define CS2_CTRL 0x00001903 /* read-write */ -#define CS3_ADDR 0x00004000 /* CS3 connected to LED, par port */ -#define CS3_MASK 0x0000f000 /* is 1Mbyte */ -#define CS3_CTRL 0x00000083 /* read-write */ -#define CS4_ADDR 0x00000000 /* CS4 not connected */ -#define CS4_MASK 0x00000000 -#define CS4_CTRL 0x00000123 -#define CS5_ADDR 0x00000000 /* CS5 not connected */ -#define CS5_MASK 0x00000000 -#define CS5_CTRL 0x00000000 -#define CS6_ADDR 0x00000000 /* CS6 not connected */ -#define CS6_MASK 0x00000000 -#define CS6_CTRL 0x00000000 -#define CS7_ADDR 0x00000000 /* CS7 not connected */ -#define CS7_MASK 0x00000000 -#define CS7_CTRL 0x00000000 -#define DMC_CTRL 0x00000000 /* default memory control */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Determine size of RAM, then set up initial stack. - * - * On the Arnewsh 5206 board we can probe for the amount - * of DRAM present... - */ - move.l #MEM_MIN, %a0 /* Start at bottom */ - move.l #MEM_MAX, %a1 /* Set stop point */ - lea.l MEM_TMPSTACK, %sp /* Set up tmp stack ptr */ - - move.l #VBR_BASE+8, %a2 /* Address of bus trap */ - lea.l _ram_buserr, %a3 /* Get RAM trap address */ - move.l %a3, (%a2) /* Set trap to local ptr */ - -_find_ram: - move.l (%a0), %d0 /* Attempt read */ - add.l #MEM_LUMP, %a0 /* Try next bank */ - cmp.l %a1, %a0 /* Check more? */ - bne _find_ram - - /* - * BUS error trap handler - used for RAM probing. - */ -_ram_buserr: - bra _found_ram - -_found_ram: /* Vectored here on bus err */ - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current task pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5206/Makefile b/arch/m68knommu/platform/5206/Makefile --- a/arch/m68knommu/platform/5206/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/m68knommu/platform/5206/Makefile 2005-03-30 16:58:50 -08:00 @@ -18,4 +18,3 @@ obj-y := config.o -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S --- a/arch/m68knommu/platform/5206e/MOTOROLA/crt0_ram.S 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,178 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5206e ColdFire based CADRE3 boards. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) - * - * 1999/02/24 Modified for the 5307 processor David W. Miller - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" - -/*****************************************************************************/ - -/* - * Cadre-III M5206e ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * SDRAM size for the Cadre III board (m5206e). - */ -#if defined(CONFIG_RAMAUTO) - movea.l #0x00000000,%a0 - move.l MCF_MBAR+MCFSIM_DCMR0,%d0 - and.l #0x00fe0000, %d0 - beq noaddr1 - add.l #0x00020000,%d0 - move.l %d0,%a0 -noaddr1: - move.l MCF_MBAR+MCFSIM_DCMR1,%d0 - and.l #0x00fe0000, %d0 - beq noaddr2 - add.l #0x00020000,%d0 - add.l %d0,%a0 -noaddr2: - -#else - -#if defined(CONFIG_RAM32MB) -#define MEM_SIZE 0x02000000 /* Memory size 32Mb */ -#elif defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - move.l #MEM_SIZE, %a0 -#endif - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current task pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5206e/Makefile b/arch/m68knommu/platform/5206e/Makefile --- a/arch/m68knommu/platform/5206e/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/m68knommu/platform/5206e/Makefile 2005-03-30 16:58:48 -08:00 @@ -18,4 +18,3 @@ obj-y := config.o -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/5206e/eLITE/crt0_ram.S b/arch/m68knommu/platform/5206e/eLITE/crt0_ram.S --- a/arch/m68knommu/platform/5206e/eLITE/crt0_ram.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,346 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5206e ColdFire based eLITE boards. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * Copyright (C) 1999 Rob Scott (rscott@mtrob.fdns.net) - * - * 1999/02/24 Modified for the 5307 processor David W. Miller - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" - -/*****************************************************************************/ - -/* - * M5206eLITE ColdFire eval board, chip select and memory setup. - */ - -#ifdef CONFIG_SMALL -#define MEM_BASE 0x30000000 /* Base memory for M5206eLITE */ -#define MEM_RESERVED 0x00020000 /* Don't use memory reserved by dBUG */ -#define MEM_SIZE 0x00100000 /* 1 MB of SRAM on M5206eLITE */ -#else -#define MEM_BASE 0x00000000 /* Base memory for M5206eLITE */ -#define MEM_RESERVED 0x00010000 /* Skip first MEM_LUMP for colilo */ -#define MEM_SIZE 0x02000000 /* Max DRAM 32Mb */ -#endif -#define MEM_MIN MEM_BASE+MEM_RESERVED -/* Define end of probeable memory space */ -#define MEM_MAX MEM_BASE+MEM_SIZE -#define MEM_BUILTIN 0x20000000 /* Put built in SRAM at dBUG loc */ -#define MEM_TMPSTACK MEM_BUILTIN+0x800 /* Use built in SRAM for tmp stack */ -#define MEM_LUMP 0x00010000 /* 64 Kb chunks */ -#define VBR_BASE MEM_BUILTIN /* Use built in SRAM for vectors */ - -#define CS0_ADDR 0x0000ffe0 /* CS0 connected to Flash ROM */ -#define CS0_MASK 0x000f0000 /* is 1Mbyte */ -#define CS0_CTRL 0x00001da3 /* read-write (for flash) */ -#define CS1_ADDR 0x00000000 /* CS1 not connected */ -#define CS1_MASK 0x00000000 -#define CS1_CTRL 0x00000000 -#define CS2_ADDR 0x00003000 /* CS2 connected to SRAM */ -#define CS2_MASK 0x000f0000 /* is 1Mbyte */ -#define CS2_CTRL 0x00001903 /* read-write */ -#define CS3_ADDR 0x00004000 /* CS3 connected to LED, par port */ -#define CS3_MASK 0x000f0000 /* is 1Mbyte */ -#define CS3_CTRL 0x00000183 /* read-write */ -#define CS4_ADDR 0x00000000 /* CS4 not connected */ -#define CS4_MASK 0x00000000 -#define CS4_CTRL 0x00000000 -#define CS5_ADDR 0x00000000 /* CS5 not connected */ -#define CS5_MASK 0x00000000 -#define CS5_CTRL 0x00000000 -#define CS6_ADDR 0x00000000 /* CS6 not connected */ -#define CS6_MASK 0x00000000 -#define CS6_CTRL 0x00000000 -#define CS7_ADDR 0x00000000 /* CS7 not connected */ -#define CS7_MASK 0x00000000 -#define CS7_CTRL 0x00000000 -#define DMC_CTRL 0x00000000 /* default memory control */ - -#define DCRR 0x00000034 /* Refresh period */ -/* DCTR definition: - <15>: DAEM, 1 = Drive Multiplexed Address During External Master DRAM xfer - <14>: EDO, 1 = EDO, 0 = Normal - <12>: RCD, 1 = 2 clk RAS-to-CAS, 0 = 1.0 clk RAS-to-CAS - <10:09>: RSH, 10 = 3.5 clk RAS low, 01 = 2.5 clk, 00 = 1.5 clk - <06:05>: RP, 10 = 3.5 clk RAS Precharge, 01 = 2.5 clk, 00 = 1.5 clk - <03>: CAS, 1 = 2.5 clk CAS assertion, 0 = 1.5 clk - <01>: CP, 1 = 1.5 CAS clk precharge, 0 = .5 clk - <00>: CSR, 1 = 2.0 clk CAS before RAS setup, 0 = 1.0 clk -*/ -#define DCTR 0x0000144B /* Slow DRAM */ -#define DCAR0 0x00000000 /* DRAM0 address, 0 base addr */ -#define DCMR0 0x003e0000 /* DRAM0 mask, 4Mb DRAM */ -#define DCCR0 0x00000007 /* DRAM0 control, R/W, burst pg mde */ -#define DCAR1 0x00000000 /* DRAM1 address, 0 base addr */ -#define DCMR1 0x00000000 /* DRAM1 mask, no DRAM */ -#define DCCR1 0x00000000 /* DRAM1 control, off */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - move.l #MCF_MBAR+1, %a0 /* Set I/O base addr */ - movec %a0, %MBAR /* Note: bit 0 is Validate */ - move.l #MEM_BUILTIN+1,%a0 /* Set SRAM base addr */ - movec %a0, %RAMBAR0 /* Note: bit 0 is Validate */ - - move.l #MCF_MBAR, %a0 /* Get I/O base addr */ - - /* ----------------------- CS1 ----------------------- */ - move.w #CS1_ADDR, %d0 /* CS1 address */ - move.w %d0, MCFSIM_CSAR1(%a0) /* CS1 address */ - move.l #CS1_MASK, %d0 /* CS1 mask */ - move.l %d0, MCFSIM_CSMR1(%a0) /* CS1 mask */ - move.w #CS1_CTRL, %d0 /* CS1 control */ - move.w %d0, MCFSIM_CSCR1(%a0) /* CS1 control */ - - /* ----------------------- CS2 ----------------------- */ - move.w #CS2_ADDR, %d0 /* CS2 address */ - move.w %d0, MCFSIM_CSAR2(%a0) /* CS2 address */ - move.l #CS2_MASK, %d0 /* CS2 mask */ - move.l %d0, MCFSIM_CSMR2(%a0) /* CS2 mask */ - move.w #CS2_CTRL, %d0 /* CS2 control */ - move.w %d0, MCFSIM_CSCR2(%a0) /* CS2 control */ - - /* ----------------------- CS3 ----------------------- */ - move.w #CS3_ADDR, %d0 /* CS3 address */ - move.w %d0, MCFSIM_CSAR3(%a0) /* CS3 address */ - move.l #CS3_MASK, %d0 /* CS3 mask */ - move.l %d0, MCFSIM_CSMR3(%a0) /* CS3 mask */ - move.w #CS3_CTRL, %d0 /* CS3 control */ - move.w %d0, MCFSIM_CSCR3(%a0) /* CS3 control */ - - /* ----------------------- CS4 ----------------------- */ - move.w #CS4_ADDR, %d0 /* CS4 address */ - move.w %d0, MCFSIM_CSAR4(%a0) /* CS4 address */ - move.l #CS4_MASK, %d0 /* CS4 mask */ - move.l %d0, MCFSIM_CSMR4(%a0) /* CS4 mask */ - move.w #CS4_CTRL, %d0 /* CS4 control */ - move.w %d0, MCFSIM_CSCR4(%a0) /* CS4 control */ - - /* ----------------------- CS5 ----------------------- */ - move.w #CS5_ADDR, %d0 /* CS5 address */ - move.w %d0, MCFSIM_CSAR5(%a0) /* CS5 address */ - move.l #CS5_MASK, %d0 /* CS5 mask */ - move.l %d0, MCFSIM_CSMR5(%a0) /* CS5 mask */ - move.w #CS5_CTRL, %d0 /* CS5 control */ - move.w %d0, MCFSIM_CSCR5(%a0) /* CS5 control */ - - /* ----------------------- CS6 ----------------------- */ - move.w #CS6_ADDR, %d0 /* CS6 address */ - move.w %d0, MCFSIM_CSAR6(%a0) /* CS6 address */ - move.l #CS6_MASK, %d0 /* CS6 mask */ - move.l %d0, MCFSIM_CSMR6(%a0) /* CS6 mask */ - move.w #CS6_CTRL, %d0 /* CS6 control */ - move.w %d0, MCFSIM_CSCR6(%a0) /* CS6 control */ - - /* ----------------------- CS7 ----------------------- */ - move.w #CS7_ADDR, %d0 /* CS7 address */ - move.w %d0, MCFSIM_CSAR7(%a0) /* CS7 address */ - move.l #CS7_MASK, %d0 /* CS7 mask */ - move.l %d0, MCFSIM_CSMR7(%a0) /* CS7 mask */ - move.w #CS7_CTRL, %d0 /* CS7 control */ - move.w %d0, MCFSIM_CSCR7(%a0) /* CS7 control */ - - /* --------------------- Default --------------------- */ - move.w #DMC_CTRL, %d0 /* Default control */ - move.w %d0, MCFSIM_DMCR(%a0) /* Default control */ - - /* ----------------------- DRAM ------------------------ */ - move.w #DCRR, %d0 /* Refresh period */ - move.w %d0, MCFSIM_DCRR(%a0) /* Refresh period */ - move.w #DCTR, %d0 /* Timing address */ - move.w %d0, MCFSIM_DCTR(%a0) /* Timing address */ - move.w #DCAR0, %d0 /* DRAM0 base address */ - move.w %d0, MCFSIM_DCAR0(%a0) /* DRAM0 base address */ - move.l #DCMR0, %d0 /* DRAM0 mask */ - move.l %d0, MCFSIM_DCMR0(%a0) /* DRAM0 mask */ - move.b #DCCR0, %d0 /* DRAM0 control */ - move.b %d0, MCFSIM_DCCR0(%a0) /* DRAM0 control */ - move.w #DCAR1, %d0 /* DRAM1 base address */ - move.w %d0, MCFSIM_DCAR1(%a0) /* DRAM1 base address */ - move.l #DCMR1, %d0 /* DRAM1 mask */ - move.l %d0, MCFSIM_DCMR1(%a0) /* DRAM1 mask */ - move.b #DCCR1, %d0 /* DRAM1 control */ - move.b %d0, MCFSIM_DCCR1(%a0) /* DRAM1 control */ - - /* - * ChipSelect 0 - ROM cs - * - * ChipSelect 0 is the global chip select coming out of system reset. - * CS0 is asserted for every access until CSMR0 is written. Therefore, - * the entire ChipSelect must be properly set prior to asserting - * CSCR0_V. - */ - move.w #CS0_ADDR, %d0 /* CS0 address */ - move.w %d0, MCFSIM_CSAR0(%a0) /* CS0 address */ - move.l #CS0_MASK, %d0 /* CS0 mask */ - move.l %d0, MCFSIM_CSMR0(%a0) /* CS0 mask */ - move.w #CS0_CTRL, %d0 /* CS0 control */ - move.w %d0, MCFSIM_CSCR0(%a0) /* CS0 control */ - - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Determine size of RAM, then set up initial stack - * Done differently for different eval boards and cpus. - */ - -#if defined(CONFIG_SMALL) - /* - * Set to SRAM size when configuring a minimal system - */ - move.l #MEM_MAX, %a0 - -#else - /* - * On the Arnewsh 5206 board and the Motorola m5206eLITE board - * we can probe for the amount of DRAM present... - */ - move.l #MEM_MIN, %a0 /* Start at bottom */ - move.l #MEM_MAX, %a1 /* Set stop point */ - lea.l MEM_TMPSTACK, %sp /* Set up tmp stack ptr */ - - move.l #VBR_BASE+8, %a2 /* Address of bus trap */ - lea.l _ram_buserr, %a3 /* Get RAM trap address */ - move.l %a3, (%a2) /* Set trap to local ptr */ - -_find_ram: - move.l (%a0), %d0 /* Attempt read */ - add.l #MEM_LUMP, %a0 /* Try next bank */ - cmp.l %a1, %a0 /* Check more? */ - bne _find_ram - - /* - * BUS error trap handler - used for RAM probing. - */ -_ram_buserr: - bra _found_ram - -_found_ram: /* Vectored here on bus err */ -#endif - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current task pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5249/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5249/MOTOROLA/crt0_ram.S --- a/arch/m68knommu/platform/5249/MOTOROLA/crt0_ram.S 2005-03-30 16:58:51 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,230 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for Motorola M5249C3 eval board. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" - -/*****************************************************************************/ - -/* - * Motorola M5249C3 ColdFire eval board, chip select and memory setup. - */ -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define MEM_SIZE 0x00800000 /* Memory size 8MB */ -#define VBR_BASE MEM_BASE /* Vector address */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Set MBAR1 and MBAR2, just incase they are not set. - */ - move.l #0x10000001, %a0 - movec %a0, %MBAR /* Map MBAR region */ - subq.l #1, %a0 /* Get MBAR address in a0 */ - - move.l #0x80000001, %a1 - movec %a1, #3086 /* Map MBAR2 region */ - subq.l #1, %a1 /* Get MBAR2 address in a1 */ - - /* - * Move secondary interrupts to base at 128. - */ - move.b #0x80, %d0 - move.b %d0, 0x16b(%a1) /* Interrupt base register */ - -#if 1 - /* - * Work around broken CSMR0/DRAM vector problem. - */ - move.l #0x001F0021, %d0 /* Disable C/I bit */ - move.l %d0, 0x84(%a0) /* Set CSMR0 */ -#endif - - /* - * Disable the PLL firstly. (Who knows what state it is - * in here!). - */ - move.l 0x180(%a1), %d0 /* Get current PLL value */ - and.l #0xfffffffe, %d0 /* PLL bypass first */ - move.l %d0, 0x180(%a1) /* Set PLL register */ - nop - -#ifdef CONFIG_CLOCK_140MHz - /* - * Set initial clock frequency. This assumes M5249C3 board - * is fitted with 11.2896MHz crystal. It will program the - * PLL for 140MHz. Lets go fast :-) - */ - move.l #0x125a40f0, %d0 /* Set for 140MHz */ - move.l %d0, 0x180(%a1) /* Set PLL register */ - or.l #0x1, %d0 - move.l %d0, 0x180(%a1) /* Set PLL register */ -#endif - - /* - * Setup CS1 for ethernet controller. - * (Setup as per M5249C3 doco). - */ - move.l #0xe0000000, %d0 /* CS1 mapped at 0xe0000000 */ - move.l %d0, 0x8c(%a0) - move.l #0x001f0021, %d0 /* CS1 size of 1Mb */ - move.l %d0, 0x90(%a0) - move.w #0x0080, %d0 /* CS1 = 16bit port, AA */ - move.w %d0, 0x96(%a0) - - /* - * Setup CS2 for IDE interface. - */ - move.l #0x50000000, %d0 /* CS2 mapped at 0x50000000 */ - move.l %d0, 0x98(%a0) - move.l #0x001f0001, %d0 /* CS2 size of 1MB */ - move.l %d0, 0x9c(%a0) - move.w #0x0080, %d0 /* CS2 = 16bit, TA */ - move.w %d0, 0xa2(%a0) - - move.l #0x00107000, %d0 /* IDEconfig1 */ - move.l %d0, 0x18c(%a1) - move.l #0x000c0400, %d0 /* IDEconfig2 */ - move.l %d0, 0x190(%a1) - - move.l #0x00080000, %d0 /* GPIO19, IDE reset bit */ - or.l %d0, 0xc(%a1) /* Function GPIO19 */ - or.l %d0, 0x8(%a1) /* Enable GPIO19 as output */ - or.l %d0, 0x4(%a1) /* De-assert IDE reset */ - - - /* - * Setup VBR as per eval board (really dBUG does this). - * These settings must match it. - */ - move.l #VBR_BASE, %a0 /* Note VBR can't be read */ - movec %a0, %VBR - move.l %a0, _ramvec /* Set up vector addr */ - move.l %a0, _rambase /* Set up base RAM addr */ - - - /* - * Set the memory size, and then set a temporary stack. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate whole cache */ - movec %d0, %CACR - nop - - move.l #0x0000c000, %d0 /* Set SDRAM cached only */ - movec %d0, %ACR0 - move.l #0x00000000, %d0 /* No other regions cached */ - movec %d0, %ACR1 - - move.l #0xa0000200, %d0 /* Enable cache... */ - movec %d0, %CACR - nop - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5249/Makefile b/arch/m68knommu/platform/5249/Makefile --- a/arch/m68knommu/platform/5249/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/m68knommu/platform/5249/Makefile 2005-03-30 16:58:50 -08:00 @@ -18,4 +18,3 @@ obj-y := config.o -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/5272/CANCam/crt0_ram.S b/arch/m68knommu/platform/5272/CANCam/crt0_ram.S --- a/arch/m68knommu/platform/5272/CANCam/crt0_ram.S 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,154 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for Feith CANCan board. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * (C) Copyright 2000, Lineo (www.lineo.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Feith ColdFire CANCam, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ -#define MEM_SIZE 0x04000000 /* Memory size 64Mb */ - - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - nop - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5272/MOTOROLA/crt0_ram.S b/arch/m68knommu/platform/5272/MOTOROLA/crt0_ram.S --- a/arch/m68knommu/platform/5272/MOTOROLA/crt0_ram.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,165 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5272 ColdFire based MOTOROLA boards. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * (C) Copyright 2000, Lineo (www.lineo.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Motorola M5272C3 ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - /* - * Determine size of RAM, then set up initial stack. - */ -#if defined(CONFIG_RAMAUTO) - move.l MCF_MBAR+0x7c,%d0 /* get SDRAM address mask */ - andi.l #0xfffff000,%d0 /* mask out chip select options */ - neg.l %d0 /* negate bits */ -#else -#if defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - /* - * Set memory size. - */ - move.l #MEM_SIZE, %d0 -#endif - - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile --- a/arch/m68knommu/platform/5272/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/m68knommu/platform/5272/Makefile 2005-03-30 16:58:47 -08:00 @@ -18,4 +18,3 @@ obj-y := config.o -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/5272/NETtel/crt0_ram.S b/arch/m68knommu/platform/5272/NETtel/crt0_ram.S --- a/arch/m68knommu/platform/5272/NETtel/crt0_ram.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,196 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5307 ColdFire based NETtel. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * Copyright (C) 2000 Lineo Inc. (www.lineo.com) - * - * 1999/02/24 Modified for the 5307 processor David W. Miller - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" -#include "asm/nettel.h" - -/*****************************************************************************/ - -/* - * Lineo NETtel board memory setup. - */ -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -/* - * The NETtel platform has some funky LEDs! - */ -.global ppdata -ppdata: -.short 0x0000 - -.global ledbank -ledbank: -.byte 0xff - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Determine size of RAM, then set up initial stack. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - nop - - -#ifdef CONFIG_ROMFS_FS -#ifdef CONFIG_ROMFS_FROM_ROM - /* - * check for an in RAM romfs - */ - lea.l _sbss, %a0 /* Get start of bss */ - mov.l (%a0), %d0 - cmp.l #0x2d726f6d, %d0 /* check for "-rom" */ - bne use_xip_romfs - add.l #4, %a0 - mov.l (%a0), %d0 - cmp.l #0x3166732d, %d0 /* check for "1fs-" */ - bne use_xip_romfs -#endif - - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#ifdef CONFIG_ROMFS_FROM_ROM - bra done_romfs - use_xip_romfs: - lea.l _ebss, %a1 /* Set up destination */ - mov.l #0, (%a1) /* make sure we don't use an old RAM version */ - move.l %a1, _ramstart /* Set start of ram */ - done_romfs: -#endif - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * load the current task pointer and stack - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5272/SCALES/crt0_ram.S b/arch/m68knommu/platform/5272/SCALES/crt0_ram.S --- a/arch/m68knommu/platform/5272/SCALES/crt0_ram.S 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,154 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for Feith SCALES board. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * (C) Copyright 2000, Lineo (www.lineo.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Feith ColdFire SCALES, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ -#define MEM_SIZE 0x02000000 /* Memory size 32Mb */ - - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - nop - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c --- a/arch/m68knommu/platform/5272/config.c 2005-03-30 16:58:48 -08:00 +++ b/arch/m68knommu/platform/5272/config.c 2005-03-30 16:58:48 -08:00 @@ -39,6 +39,14 @@ /***************************************************************************/ /* + * Some platforms need software versions of the GPIO data registers. + */ +unsigned short ppdata; +unsigned char ledbank = 0xff; + +/***************************************************************************/ + +/* * DMA channel base address table. */ unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { diff -Nru a/arch/m68knommu/platform/5272/senTec/crt0_ram.S b/arch/m68knommu/platform/5272/senTec/crt0_ram.S --- a/arch/m68knommu/platform/5272/senTec/crt0_ram.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,159 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5272 ColdFire based boards. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * (C) Copyright 2000, Lineo (www.lineo.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * senTec COBRA5272 board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01000000, %d0 /* Invalidate cache cmd */ - movec %d0, %CACR /* Invalidate cache */ - move.l #0x80000100, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs - -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S b/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S --- a/arch/m68knommu/platform/527x/M5271EVB/crt0_ram.S 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,166 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF527x ColdFire based Freescale boards. - * - * (C) Copyright 2003-2004, Greg Ungerer (gerg@snapgear.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Freescale M5271EVB ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM4MB) -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#endif - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01400000, %d0 - movec %d0, %CACR /* Invalidate cache */ - nop - - move.l #0x0000c000, %d0 /* Set SDRAM cached only */ - movec %d0, %ACR0 - move.l #0x00000000, %d0 /* No other regions cached */ - movec %d0, %ACR1 - - move.l #0x80400100, %d0 /* Configure cache */ - movec %d0, %CACR /* Enable cache */ - nop - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S b/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S --- a/arch/m68knommu/platform/527x/M5275EVB/crt0_ram.S 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,166 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF527x ColdFire based Freescale boards. - * - * (C) Copyright 2003-2004, Greg Ungerer (gerg@snapgear.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Freescale M5275EVB ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM4MB) -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#endif - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - */ - move.l #0x01400000, %d0 - movec %d0, %CACR /* Invalidate cache */ - nop - - move.l #0x0000c000, %d0 /* Set SDRAM cached only */ - movec %d0, %ACR0 - move.l #0x00000000, %d0 /* No other regions cached */ - movec %d0, %ACR1 - - move.l #0x80400100, %d0 /* Configure cache */ - movec %d0, %CACR /* Enable cache */ - nop - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/527x/Makefile b/arch/m68knommu/platform/527x/Makefile --- a/arch/m68knommu/platform/527x/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/m68knommu/platform/527x/Makefile 2005-03-30 16:58:48 -08:00 @@ -18,4 +18,3 @@ obj-y := config.o -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S b/arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S --- a/arch/m68knommu/platform/528x/M5282EVB/crt0_ram.S 2005-03-30 16:58:51 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,171 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for M5282EVB ColdFire based MOTOROLA boards. - * - * (C) Copyright 2003, Greg Ungerer (gerg@snapgear.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * Motorola M5282EVB ColdFire eval board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - * - * Cache is totally broken in first 5282 silicon. - * No point enabling it for now. - */ -#if 0 - move.l #0x01000000, %d0 - movec %d0, %CACR /* Invalidate cache */ - nop - - move.l #0x0000c000, %d0 /* Set SDRAM cached only */ - movec %d0, %ACR0 - move.l #0x00000000, %d0 /* No other regions cached */ - movec %d0, %ACR1 - - move.l #0x00000000, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - nop -#endif - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/528x/Makefile b/arch/m68knommu/platform/528x/Makefile --- a/arch/m68knommu/platform/528x/Makefile 2005-03-30 16:58:51 -08:00 +++ b/arch/m68knommu/platform/528x/Makefile 2005-03-30 16:58:51 -08:00 @@ -18,4 +18,3 @@ obj-y := config.o -extra-y := $(BOARD)/crt0_$(MODEL).o diff -Nru a/arch/m68knommu/platform/528x/senTec/crt0_ram.S b/arch/m68knommu/platform/528x/senTec/crt0_ram.S --- a/arch/m68knommu/platform/528x/senTec/crt0_ram.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,180 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for senTec COBRA5282 ColdFire based boards. - * - * (C) Copyright 2003, Greg Ungerer (gerg@snapgear.com). - */ - -/*****************************************************************************/ - -#include -#include -#include -#include -#include -#include - -/*****************************************************************************/ - -/* - * senTec COBRA5282 board, chip select and memory setup. - */ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#if defined(CONFIG_RAM16MB) -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ -#elif defined(CONFIG_RAM8MB) -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#else -#define MEM_SIZE 0x00400000 /* Memory size 4Mb */ -#endif - -#define IPSBAR 0x40000000 -#define GPACR0 0x30 -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Set memory size. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* - * Enable CPU internal cache. - * - * Cache is totally broken in first 5282 silicon. - * No point enabling it for now. - */ -#if 0 - move.l #0x01000000, %d0 - movec %d0, %CACR /* Invalidate cache */ - nop - - move.l #0x0000c000, %d0 /* Set SDRAM cached only */ - movec %d0, %ACR0 - move.l #0x00000000, %d0 /* No other regions cached */ - movec %d0, %ACR1 - - move.l #0x00000000, %d0 /* Setup cache mask */ - movec %d0, %CACR /* Enable cache */ - nop -#endif - - -#ifdef CONFIG_ROMFS_FS - /* - * Move ROM filesystem above bss :-) - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Set up destination */ - move.l %a0, %a2 /* Copy of bss start */ - - move.l 8(%a0), %d0 /* Get size of ROMFS */ - addq.l #8, %d0 /* Allow for rounding */ - and.l #0xfffffffc, %d0 /* Whole words */ - - add.l %d0, %a0 /* Copy from end */ - add.l %d0, %a1 /* Copy from end */ - move.l %a1, _ramstart /* Set start of ram */ - -_copy_romfs: - move.l -(%a0), %d0 /* Copy dword */ - move.l %d0, -(%a1) - cmp.l %a0, %a2 /* Check if at end */ - bne _copy_romfs -#else /* CONFIG_ROMFS_FS */ - lea.l _ebss, %a1 - move.l %a1, _ramstart -#endif /* CONFIG_ROMFS_FS */ - - - /* - * Zero out the bss region. - */ - lea.l _sbss, %a0 /* Get start of bss */ - lea.l _ebss, %a1 /* Get end of bss */ - clr.l %d0 /* Set value */ -_clear_bss: - move.l %d0, (%a0)+ /* Clear each word */ - cmp.l %a0, %a1 /* Check if at end */ - bne _clear_bss - - /* - * Load the current thread pointer and stack. - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - /* - * User mode port access - */ - move.l #0x0000000c, %d0 - move.b %d0, (IPSBAR+GPACR0) - - - /* - * Assember start up done, start code proper. - */ - jsr start_kernel /* Start Linux kernel */ - -_exit: - jmp _exit /* Should never get here */ - -/*****************************************************************************/ diff -Nru a/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S b/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S --- a/arch/m68knommu/platform/5307/ARNEWSH/crt0_ram.S 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,167 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for MCF5307 ColdFire Arnewsh board. - * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com). - * Copyright (C) 2000 Lineo Inc. (www.lineo.com) - * - * 1999/02/24 Modified for the 5307 processor David W. Miller - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" -#include "asm/nettel.h" - -/*****************************************************************************/ - -/* - * SnapGear/NETtel board memory setup. - */ -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define MEM_SIZE 0x00800000 /* Memory size 8Mb */ -#define VBR_BASE MEM_BASE /* Vector address */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - - /* - * Determine size of RAM, then set up initial stack. - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - /* make region ROM cachable (turn off for flash programming?) */ - /* 0xff000000 - 0xffffffff */ -#ifdef DEBUGGER_COMPATIBLE_CACHE - movl #(0xff<, * Kenneth Albanowski , * Copyright (C) 2000 Lineo Inc. (www.lineo.com) + * Copyright (C) 2004 Macq Electronique SA. (www.macqel.com) * * Based on: * @@ -22,6 +23,7 @@ * ColdFire support by Greg Ungerer (gerg@snapgear.com) * 5307 fixes by David W. Miller * linux 2.4 support David McCullough + * Bug, speed and maintainability fixes by Philippe De Muyter */ #include @@ -35,7 +37,7 @@ #include #include -.data +.bss sw_ksp: .long 0 @@ -59,7 +61,7 @@ move #0x2000,%sr /* enable intrs again */ movel #-LENOSYS,%d2 - movel %d2,LD0(%sp) /* default return value in d0 */ + movel %d2,PT_D0(%sp) /* default return value in d0 */ /* original D0 is in orig_d0 */ movel %d0,%d2 @@ -77,14 +79,14 @@ lsrl #2,%d2 movel %sp,%d2 /* get thread_info pointer */ - andl #0xffffe000,%d2 /* at start of 8k kernel stack */ + andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ movel %d2,%a0 btst #TIF_SYSCALL_TRACE,%a0@(TI_FLAGS) bnes 1f movel %d3,%a0 jbsr %a0@ - movel %d0,%sp@(LD0) /* save the return value */ + movel %d0,%sp@(PT_D0) /* save the return value */ jra ret_from_exception 1: subql #4,%sp @@ -94,7 +96,7 @@ addql #4,%sp movel %d3,%a0 jbsr %a0@ - movel %d0,%sp@(LD0) /* save the return value */ + movel %d0,%sp@(PT_D0) /* save the return value */ subql #4,%sp /* dummy return address */ SAVE_SWITCH_STACK jbsr syscall_trace @@ -104,20 +106,20 @@ addql #4,%sp ret_from_exception: - btst #5,%sp@(LSR) /* check if returning to kernel */ + btst #5,%sp@(PT_SR) /* check if returning to kernel */ jeq Luser_return /* if so, skip resched, signals */ Lkernel_return: - moveml %sp@,%d1-%d5/%a0-%a2 - addl #32,%sp /* space for 8 regs */ - movel %sp@+,%d0 - addql #4,%sp /* orig d0 */ - addl %sp@+,%sp /* stk adj */ + moveml %sp@,%d1-%d5/%a0-%a2 + lea %sp@(32),%sp /* space for 8 regs */ + movel %sp@+,%d0 + addql #4,%sp /* orig d0 */ + addl %sp@+,%sp /* stk adj */ rte Luser_return: movel %sp,%d1 /* get thread_info pointer */ - andl #0xffffe000,%d1 /* at base of 8k kernel stack */ + andl #-THREAD_SIZE,%d1 /* at base of kernel stack */ movel %d1,%a0 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ andl #_TIF_WORK_MASK,%d1 @@ -126,27 +128,17 @@ Lreturn: move #0x2700,%sr /* disable intrs */ movel sw_usp,%a0 /* get usp */ - moveml %sp@(LFORMATVEC),%d1-%d2 /* copy exception */ - moveml %d1-%d2,%a0@(-8) - bclr #5,%a0@(-8) /* clear format byte, bit 5 to make - * stack appear modulo 4 which it WILL - * be when we do the rte because it was - * generated in setup_frame - */ - bclr #4,%a0@(-8) /* clear format byte, bit 4 to make - * stack appear modulo 4 which it WILL - * be when we do the rte because it was - * generated in setup_frame - */ - moveml %sp@,%d1-%d5/%a0-%a2 - addl #32,%sp /* space for 8 regs */ - movel %sp@+,%d0 - addql #4,%sp /* orig d0 */ - addl %sp@+,%sp /* stk adj */ - addql #8,%sp /* remove exception */ - movel %sp,sw_ksp /* save ksp */ - movel sw_usp,%sp /* restore usp */ - subql #8,%sp /* set exception */ + movel %sp@(PT_PC),%a0@- /* copy exception program counter */ + movel %sp@(PT_FORMATVEC),%a0@-/* copy exception format/vector/sr */ + moveml %sp@,%d1-%d5/%a0-%a2 + lea %sp@(32),%sp /* space for 8 regs */ + movel %sp@+,%d0 + addql #4,%sp /* orig d0 */ + addl %sp@+,%sp /* stk adj */ + addql #8,%sp /* remove exception */ + movel %sp,sw_ksp /* save ksp */ + subql #8,sw_usp /* set exception */ + movel sw_usp,%sp /* restore usp */ rte Lwork_to_do: @@ -160,8 +152,7 @@ subql #4,%sp /* dummy return address */ SAVE_SWITCH_STACK pea %sp@(SWITCH_STACK_SIZE) - clr %d1 - movel %d1,%sp@- + clrl %sp@- jsr do_signal addql #8,%sp RESTORE_SWITCH_STACK @@ -176,10 +167,10 @@ ENTRY(inthandler) SAVE_ALL moveq #-1,%d0 - movel %d0,%sp@(LORIG_D0) + movel %d0,%sp@(PT_ORIG_D0) addql #1,local_irq_count - movew %sp@(LFORMATVEC),%d0 /* put exception # in d0 */ + movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */ andl #0x03fc,%d0 /* mask out vector only */ leal per_cpu__kstat+STAT_IRQ,%a0 @@ -197,7 +188,7 @@ movel %a0@,%a0 /* get function to call */ jbsr %a0@ /* call vector handler */ - addl #12,%sp /* pop parameters off stack */ + lea %sp@(12),%sp /* pop parameters off stack */ bra ret_from_interrupt /* this was fallthrough */ @@ -210,15 +201,14 @@ ENTRY(fasthandler) SAVE_LOCAL - movew %sp@(LFORMATVEC),%d0 + movew %sp@(PT_FORMATVEC),%d0 andl #0x03fc,%d0 /* mask out vector only */ leal per_cpu__kstat+STAT_IRQ,%a0 addql #1,%a0@(%d0) movel %sp,%sp@- /* push regs arg onto stack */ - clrl %d1 - movel %d1,%sp@- /* push devid arg */ + clrl %sp@- /* push devid arg */ lsrl #2,%d0 /* calculate real vector # */ movel %d0,%sp@- /* push vector # on stack */ @@ -226,7 +216,7 @@ lea irq_list,%a0 movel %a0@(%d0),%a0 /* get function to call */ jbsr %a0@ /* call vector handler */ - addl #12,%sp /* pop parameters off stack */ + lea %sp@(12),%sp /* pop parameters off stack */ RESTORE_LOCAL @@ -236,7 +226,7 @@ 1: RESTORE_ALL 2: - moveb %sp@(LSR),%d0 + moveb %sp@(PT_SR),%d0 andl #0x7,%d0 jhi 1b diff -Nru a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S --- a/arch/m68knommu/platform/5307/head.S 2005-03-30 16:58:50 -08:00 +++ b/arch/m68knommu/platform/5307/head.S 2005-03-30 16:58:50 -08:00 @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -87,7 +87,7 @@ .endm #elif defined(CONFIG_M5272) -.macro GET_MEMORY_SIZE +.macro GET_MEM_SIZE movel MCF_MBAR+MCFSIM_CSOR7,%d0 /* get SDRAM address mask */ andil #0xfffff000,%d0 /* mask out chip select options */ negl %d0 /* negate bits */ diff -Nru a/arch/m68knommu/platform/5407/CLEOPATRA/crt0_ram.S b/arch/m68knommu/platform/5407/CLEOPATRA/crt0_ram.S --- a/arch/m68knommu/platform/5407/CLEOPATRA/crt0_ram.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,180 +0,0 @@ -/*****************************************************************************/ - -/* - * crt0_ram.S -- startup code for Feith Cleopatra 2 board. - * - * (C) Copyright 2001, Roman Wagner. - * - * 1999/02/24 Modified for the 5307 processor David W. Miller - */ - -/*****************************************************************************/ - -#include "linux/autoconf.h" -#include "asm/coldfire.h" -#include "asm/mcfsim.h" - -/*****************************************************************************/ - -/* - * Feith CLEOPATRA board, chip select and memory setup. -*/ - -#define MEM_BASE 0x00000000 /* Memory base at address 0 */ -#define VBR_BASE MEM_BASE /* Vector address */ - -#define MEM_SIZE 0x01000000 /* Memory size 16Mb */ - -/*****************************************************************************/ - -.global _start -.global _rambase -.global _ramvec -.global _ramstart -.global _ramend - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -_rambase: -.long 0 -_ramvec: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -/*****************************************************************************/ - -.text - -/* - * This is the codes first entry point. This is where it all - * begins... - */ - -_start: - nop /* Filler */ - move.w #0x2700, %sr /* No interrupts */ - - - /* - * Setup VBR here, otherwise buserror remap will not work. - * if dBug was active before (on my SBC with dBug 1.1 of Dec 16 1996) - * - * bkr@cut.de 19990306 - * - * Note: this is because dBUG points VBR to ROM, making vectors read - * only, so the bus trap can't be changed. (RS) - */ - move.l #VBR_BASE, %a7 /* Note VBR can't be read */ - movec %a7, %VBR - move.l %a7, _ramvec /* Set up vector addr */ - move.l %a7, _rambase /* Set up base RAM addr */ - - /* - * Determine size of RAM, then set up initial stack. - */ -/* - * The current version of the 5307 processor - * SWT does not work. Probing invalid addresses - * will hang the system. - * - * For now, set the memory size to 8 meg - */ - move.l #MEM_SIZE, %a0 - - move.l %a0, %d0 /* Mem end addr is in a0 */ - move.l %d0, %sp /* Set up initial stack ptr */ - move.l %d0, _ramend /* Set end ram addr */ - - - /* - * Enable CPU internal cache. - */ - move.l #0x01040100, %d0 /* Invalidate whole cache */ - movec %d0,%CACR - nop - - /* make region ROM cachable (turn off for flash programming?) */ - /* 0xff000000 - 0xffffffff */ - move.l #(0xff< $(obj)/$(BOARD)/bootlogo.rh +extra-y := head.o +extra-$(CONFIG_M68328) += bootlogo.rh head.o +$(obj)/bootlogo.rh: $(src)/bootlogo.h + perl $(src)/bootlogo.pl < $(src)/bootlogo.h > $(obj)/bootlogo.rh + +$(obj)/head.o: $(obj)/$(head-y) + ln -sf $(head-y) $(obj)/head.o + +clean-files := $(obj)/bootlogo.rh $(obj)/head.o $(head-y) diff -Nru a/arch/m68knommu/platform/68328/head-pilot.S b/arch/m68knommu/platform/68328/head-pilot.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/68328/head-pilot.S 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,224 @@ +/* + * linux/arch/m68knommu/platform/68328/head-rom.S + * - A startup file for the MC68328 + * + * Copyright (C) 1998 D. Jeff Dionne , + * Kenneth Albanowski , + * The Silver Hammer Group, Ltd. + * + * (c) 1995, Dionne & Associates + * (c) 1995, DKG Display Tech. + */ + +#define ASSEMBLY + +#define IMMED # +#define DBG_PUTC(x) moveb IMMED x, 0xfffff907 + +#include + +.global _stext +.global _start + +.global _rambase +.global __ramvec +.global _ramvec +.global _ramstart +.global _ramend + +.global penguin_bits + +#ifdef CONFIG_PILOT + +#define IMR 0xFFFFF304 + + .data + .align 16 + +penguin_bits: +#include "bootlogo.rh" + +#endif + +/*****************************************************************************/ + +.data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +.align 4 +_ramvec: +.long 0 +_rambase: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +.text + +_start: +_stext: + + +#ifdef CONFIG_M68328 + +#ifdef CONFIG_PILOT + .byte 0x4e, 0xfa, 0x00, 0x0a /* Jmp +X bytes */ + .byte 'b', 'o', 'o', 't' + .word 10000 + + nop +#endif + + moveq #0, %d0 + movew %d0, 0xfffff618 /* Watchdog off */ + movel #0x00011f07, 0xfffff114 /* CS A1 Mask */ + + movew #0x0800, 0xfffff906 /* Ignore CTS */ + movew #0x010b, 0xfffff902 /* BAUD to 9600 */ + + movew #0x2410, 0xfffff200 /* PLLCR */ + movew #0x123, 0xfffff202 /* PLLFSR */ + +#ifdef CONFIG_PILOT + moveb #0, 0xfffffA27 /* LCKCON */ + movel #_start, 0xfffffA00 /* LSSA */ + moveb #0xa, 0xfffffA05 /* LVPW */ + movew #0x9f, 0xFFFFFa08 /* LXMAX */ + movew #0x9f, 0xFFFFFa0a /* LYMAX */ + moveb #9, 0xfffffa29 /* LBAR */ + moveb #0, 0xfffffa25 /* LPXCD */ + moveb #0x04, 0xFFFFFa20 /* LPICF */ + moveb #0x58, 0xfffffA27 /* LCKCON */ + moveb #0x85, 0xfffff429 /* PFDATA */ + moveb #0xd8, 0xfffffA27 /* LCKCON */ + moveb #0xc5, 0xfffff429 /* PFDATA */ + moveb #0xd5, 0xfffff429 /* PFDATA */ + + moveal #0x00100000, %a3 + moveal #0x100ffc00, %a4 +#endif /* CONFIG_PILOT */ + +#endif /* CONFIG_M68328 */ + + movew #0x2700, %sr + lea %a4@(-4), %sp + + DBG_PUTC('\r') + DBG_PUTC('\n') + DBG_PUTC('A') + + moveq #0,%d0 + movew #16384, %d0 /* PLL settle wait loop */ +L0: + subw #1, %d0 + bne L0 + + DBG_PUTC('B') + + /* Copy command line from beginning of RAM (+16) to end of bss */ + movel #__ramvec, %d7 + addl #16, %d7 + moveal %d7, %a0 + moveal #_ebss, %a1 + lea %a1@(512), %a2 + + DBG_PUTC('C') + + /* Copy %a0 to %a1 until %a1 == %a2 */ +L2: + movel %a0@+, %d0 + movel %d0, %a1@+ + cmpal %a1, %a2 + bhi L2 + + /* Copy data+init segment from ROM to RAM */ + moveal #_etext, %a0 + moveal #_sdata, %a1 + moveal #__init_end, %a2 + + DBG_PUTC('D') + + /* Copy %a0 to %a1 until %a1 == %a2 */ +LD1: + movel %a0@+, %d0 + movel %d0, %a1@+ + cmpal %a1, %a2 + bhi LD1 + + DBG_PUTC('E') + + moveal #_sbss, %a0 + moveal #_ebss, %a1 + + /* Copy 0 to %a0 until %a0 == %a1 */ +L1: + movel #0, %a0@+ + cmpal %a0, %a1 + bhi L1 + + DBG_PUTC('F') + + /* Copy command line from end of bss to command line */ + moveal #_ebss, %a0 + moveal #command_line, %a1 + lea %a1@(512), %a2 + + DBG_PUTC('G') + + /* Copy %a0 to %a1 until %a1 == %a2 */ +L3: + movel %a0@+, %d0 + movel %d0, %a1@+ + cmpal %a1, %a2 + bhi L3 + + movel #_sdata, %d0 + movel %d0, _rambase + movel #_ebss, %d0 + movel %d0, _ramstart + + movel %a4, %d0 + subl #4096, %d0 /* Reserve 4K of stack */ + moveq #79, %d7 + movel %d0, _ramend + + movel %a3, %d0 + movel %d0, rom_length + + pea 0 + pea env + pea %sp@(4) + pea 0 + + DBG_PUTC('H') + +#ifdef CONFIG_PILOT + movel #penguin_bits, 0xFFFFFA00 + moveb #10, 0xFFFFFA05 + movew #160, 0xFFFFFA08 + movew #160, 0xFFFFFA0A +#endif /* CONFIG_PILOT */ + + DBG_PUTC('I') + + lea init_thread_union, %a0 + lea 0x2000(%a0), %sp + + DBG_PUTC('J') + DBG_PUTC('\r') + DBG_PUTC('\n') + + jsr start_kernel +_exit: + + jmp _exit + + + .data +env: + .long 0 diff -Nru a/arch/m68knommu/platform/68328/head-ram.S b/arch/m68knommu/platform/68328/head-ram.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/68328/head-ram.S 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,171 @@ +#include + + .global __main + .global __ram_start + .global __ram_end + .global __rom_start + .global __rom_end + + .global _rambase + .global _ramstart + + .global splash_bits + .global _start + .global _stext + +#define DEBUG +#define ROM_OFFSET 0x10C00000 +#define STACK_GAURD 0x10 + + .text + +_start: +_stext: + movew #0x2700, %sr /* Exceptions off! */ + +#if 0 + /* Init chip registers. uCsimm specific */ + moveb #0x00, 0xfffffb0b /* Watchdog off */ + moveb #0x10, 0xfffff000 /* SCR */ + + movew #0x2400, 0xfffff200 /* PLLCR */ + movew #0x0123, 0xfffff202 /* PLLFSR */ + + moveb #0x00, 0xfffff40b /* enable chip select */ + moveb #0x00, 0xfffff423 /* enable /DWE */ + moveb #0x08, 0xfffffd0d /* disable hardmap */ + moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ + + movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ + movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ + + movew #0x8f00, 0xfffffc00 /* DRAM configuration */ + movew #0x9667, 0xfffffc02 /* DRAM control */ + movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ + movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ + + moveb #0x40, 0xfffff300 /* IVR */ + movel #0x007FFFFF, %d0 /* IMR */ + movel %d0, 0xfffff304 + + moveb 0xfffff42b, %d0 + andb #0xe0, %d0 + moveb %d0, 0xfffff42b + + moveb #0x08, 0xfffff907 /* Ignore CTS */ + movew #0x010b, 0xfffff902 /* BAUD to 9600 */ + movew #0xe100, 0xfffff900 /* enable */ +#endif + + movew #16384, %d0 /* PLL settle wait loop */ +L0: + subw #1, %d0 + bne L0 +#ifdef DEBUG + moveq #70, %d7 /* 'F' */ + moveb %d7,0xfffff907 /* No absolute addresses */ +pclp1: + movew 0xfffff906, %d7 + andw #0x2000, %d7 + beq pclp1 +#endif /* DEBUG */ + +#ifdef CONFIG_RELOCATE + /* Copy me to RAM */ + moveal #__rom_start, %a0 + moveal #__ram_start, %a1 + moveal #_edata, %a2 + + /* Copy %a0 to %a1 until %a1 == %a2 */ +LD1: + movel %a0@+, %d0 + movel %d0, %a1@+ + cmpal %a1, %a2 + bhi LD1 + +#ifdef DEBUG + moveq #74, %d7 /* 'J' */ + moveb %d7,0xfffff907 /* No absolute addresses */ +pclp2: + movew 0xfffff906, %d7 + andw #0x2000, %d7 + beq pclp2 +#endif /* DEBUG */ + /* jump into the RAM copy */ + jmp ram_jump +ram_jump: + +#endif /* CONFIG_RELOCATE */ + +#ifdef DEBUG + moveq #82, %d7 /* 'R' */ + moveb %d7,0xfffff907 /* No absolute addresses */ +pclp3: + movew 0xfffff906, %d7 + andw #0x2000, %d7 + beq pclp3 +#endif /* DEBUG */ + moveal #0x007ffff0, %ssp + moveal #_sbss, %a0 + moveal #_ebss, %a1 + + /* Copy 0 to %a0 until %a0 >= %a1 */ +L1: + movel #0, %a0@+ + cmpal %a0, %a1 + bhi L1 + +#ifdef DEBUG + moveq #67, %d7 /* 'C' */ + jsr putc +#endif /* DEBUG */ + + pea 0 + pea env + pea %sp@(4) + pea 0 + +#ifdef DEBUG + moveq #70, %d7 /* 'F' */ + jsr putc +#endif /* DEBUG */ + +lp: + jsr start_kernel + jmp lp +_exit: + + jmp _exit + +__main: + /* nothing */ + rts + +#ifdef DEBUG +putc: + moveb %d7,0xfffff907 +pclp: + movew 0xfffff906, %d7 + andw #0x2000, %d7 + beq pclp + rts +#endif /* DEBUG */ + + .data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +.align 4 +_ramvec: +.long 0 +_rambase: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +env: + .long 0 diff -Nru a/arch/m68knommu/platform/68328/head-rom.S b/arch/m68knommu/platform/68328/head-rom.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/m68knommu/platform/68328/head-rom.S 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,109 @@ +#include + + .global _start + .global _stext + + .global _rambase + .global _ramvec + .global _ramstart + .global _ramend + +#ifdef CONFIG_INIT_LCD + .global splash_bits +#endif + + .data + +/* + * Set up the usable of RAM stuff. Size of RAM is determined then + * an initial stack set up at the end. + */ +.align 4 +_ramvec: +.long 0 +_rambase: +.long 0 +_ramstart: +.long 0 +_ramend: +.long 0 + +#ifdef CONFIG_INIT_LCD +splash_bits: +#include "bootlogo.rh" +#endif + + .text +_start: +_stext: movew #0x2700,%sr +#ifdef CONFIG_INIT_LCD + movel #splash_bits, 0xfffffA00 /* LSSA */ + moveb #0x28, 0xfffffA05 /* LVPW */ + movew #0x280, 0xFFFFFa08 /* LXMAX */ + movew #0x1df, 0xFFFFFa0a /* LYMAX */ + moveb #0, 0xfffffa29 /* LBAR */ + moveb #0, 0xfffffa25 /* LPXCD */ + moveb #0x08, 0xFFFFFa20 /* LPICF */ + moveb #0x01, 0xFFFFFA21 /* -ve pol */ + moveb #0x81, 0xfffffA27 /* LCKCON */ + movew #0xff00, 0xfffff412 /* LCD pins */ +#endif + moveal #__ramend-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp + movew #32767, %d0 /* PLL settle wait loop */ +1: subq #1, %d0 + bne 1b + + /* Copy data segment from ROM to RAM */ + moveal #_etext, %a0 + moveal #_sdata, %a1 + moveal #_edata, %a2 + + /* Copy %a0 to %a1 until %a1 == %a2 */ +1: movel %a0@+, %a1@+ + cmpal %a1, %a2 + bhi 1b + + moveal #_sbss, %a0 + moveal #_ebss, %a1 + /* Copy 0 to %a0 until %a0 == %a1 */ + +1: + clrl %a0@+ + cmpal %a0, %a1 + bhi 1b + + movel #_sdata, %d0 + movel %d0, _rambase + movel #_ebss, %d0 + movel %d0, _ramstart + movel #__ramend-CONFIG_MEMORY_RESERVE*0x100000, %d0 + movel %d0, _ramend + movel #__ramvec, %d0 + movel %d0, _ramvec + +/* + * load the current task pointer and stack + */ + lea init_thread_union, %a0 + lea 0x2000(%a0), %sp + +1: jsr start_kernel + bra 1b +_exit: + + jmp _exit + + +putc: + moveb %d7,0xfffff907 +1: + movew 0xfffff906, %d7 + andw #0x2000, %d7 + beq 1b + rts + + .data +env: + .long 0 + .text + diff -Nru a/arch/m68knommu/platform/68328/pilot/crt0_rom.S b/arch/m68knommu/platform/68328/pilot/crt0_rom.S --- a/arch/m68knommu/platform/68328/pilot/crt0_rom.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,224 +0,0 @@ -/* - * linux/arch/m68knommu/platform/68328/pilot/crt0_rom.S - * - A startup file for the MC68332 - * - * Copyright (C) 1998 D. Jeff Dionne , - * Kenneth Albanowski , - * The Silver Hammer Group, Ltd. - * - * (c) 1995, Dionne & Associates - * (c) 1995, DKG Display Tech. - */ - -#define ASSEMBLY - -#define IMMED # -#define DBG_PUTC(x) moveb IMMED x, 0xfffff907 - -#include - -.global _stext -.global _start - -.global _rambase -.global __ramvec -.global _ramvec -.global _ramstart -.global _ramend - -.global penguin_bits - -#ifdef CONFIG_PILOT - -#define IMR 0xFFFFF304 - - .data - .align 16 - -penguin_bits: -#include "bootlogo.rh" - -#endif - -/*****************************************************************************/ - -.data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -.align 4 -_ramvec: -.long 0 -_rambase: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -.text - -_start: -_stext: - - -#ifdef CONFIG_M68328 - -#ifdef CONFIG_PILOT - .byte 0x4e, 0xfa, 0x00, 0x0a /* Jmp +X bytes */ - .byte 'b', 'o', 'o', 't' - .word 10000 - - nop -#endif - - moveq #0, %d0 - movew %d0, 0xfffff618 /* Watchdog off */ - movel #0x00011f07, 0xfffff114 /* CS A1 Mask */ - - movew #0x0800, 0xfffff906 /* Ignore CTS */ - movew #0x010b, 0xfffff902 /* BAUD to 9600 */ - - movew #0x2410, 0xfffff200 /* PLLCR */ - movew #0x123, 0xfffff202 /* PLLFSR */ - -#ifdef CONFIG_PILOT - moveb #0, 0xfffffA27 /* LCKCON */ - movel #_start, 0xfffffA00 /* LSSA */ - moveb #0xa, 0xfffffA05 /* LVPW */ - movew #0x9f, 0xFFFFFa08 /* LXMAX */ - movew #0x9f, 0xFFFFFa0a /* LYMAX */ - moveb #9, 0xfffffa29 /* LBAR */ - moveb #0, 0xfffffa25 /* LPXCD */ - moveb #0x04, 0xFFFFFa20 /* LPICF */ - moveb #0x58, 0xfffffA27 /* LCKCON */ - moveb #0x85, 0xfffff429 /* PFDATA */ - moveb #0xd8, 0xfffffA27 /* LCKCON */ - moveb #0xc5, 0xfffff429 /* PFDATA */ - moveb #0xd5, 0xfffff429 /* PFDATA */ - - moveal #0x00100000, %a3 - moveal #0x100ffc00, %a4 -#endif /* CONFIG_PILOT */ - -#endif /* CONFIG_M68328 */ - - movew #0x2700, %sr - lea %a4@(-4), %sp - - DBG_PUTC('\r') - DBG_PUTC('\n') - DBG_PUTC('A') - - moveq #0,%d0 - movew #16384, %d0 /* PLL settle wait loop */ -L0: - subw #1, %d0 - bne L0 - - DBG_PUTC('B') - - /* Copy command line from beginning of RAM (+16) to end of bss */ - movel #__ramvec, %d7 - addl #16, %d7 - moveal %d7, %a0 - moveal #_ebss, %a1 - lea %a1@(512), %a2 - - DBG_PUTC('C') - - /* Copy %a0 to %a1 until %a1 == %a2 */ -L2: - movel %a0@+, %d0 - movel %d0, %a1@+ - cmpal %a1, %a2 - bhi L2 - - /* Copy data+init segment from ROM to RAM */ - moveal #_etext, %a0 - moveal #_sdata, %a1 - moveal #__init_end, %a2 - - DBG_PUTC('D') - - /* Copy %a0 to %a1 until %a1 == %a2 */ -LD1: - movel %a0@+, %d0 - movel %d0, %a1@+ - cmpal %a1, %a2 - bhi LD1 - - DBG_PUTC('E') - - moveal #_sbss, %a0 - moveal #_ebss, %a1 - - /* Copy 0 to %a0 until %a0 == %a1 */ -L1: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi L1 - - DBG_PUTC('F') - - /* Copy command line from end of bss to command line */ - moveal #_ebss, %a0 - moveal #command_line, %a1 - lea %a1@(512), %a2 - - DBG_PUTC('G') - - /* Copy %a0 to %a1 until %a1 == %a2 */ -L3: - movel %a0@+, %d0 - movel %d0, %a1@+ - cmpal %a1, %a2 - bhi L3 - - movel #_sdata, %d0 - movel %d0, _rambase - movel #_ebss, %d0 - movel %d0, _ramstart - - movel %a4, %d0 - subl #4096, %d0 /* Reserve 4K of stack */ - moveq #79, %d7 - movel %d0, _ramend - - movel %a3, %d0 - movel %d0, rom_length - - pea 0 - pea env - pea %sp@(4) - pea 0 - - DBG_PUTC('H') - -#ifdef CONFIG_PILOT - movel #penguin_bits, 0xFFFFFA00 - moveb #10, 0xFFFFFA05 - movew #160, 0xFFFFFA08 - movew #160, 0xFFFFFA0A -#endif /* CONFIG_PILOT */ - - DBG_PUTC('I') - - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - DBG_PUTC('J') - DBG_PUTC('\r') - DBG_PUTC('\n') - - jsr start_kernel -_exit: - - jmp _exit - - - .data -env: - .long 0 diff -Nru a/arch/m68knommu/platform/68360/Makefile b/arch/m68knommu/platform/68360/Makefile --- a/arch/m68knommu/platform/68360/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/m68knommu/platform/68360/Makefile 2005-03-30 16:58:48 -08:00 @@ -4,4 +4,7 @@ obj-y := config.o commproc.o entry.o ints.o -extra-y := $(BOARD)/crt0_$(MODEL).o +extra-y := head.o + +$(obj)/head.o: $(obj)/head-$(MODEL).o + ln -sf head-$(MODEL).o $(obj)/head.o diff -Nru a/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S b/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S --- a/arch/m68knommu/platform/68360/uCquicc/crt0_ram.S 2005-03-30 16:58:51 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,408 +0,0 @@ -/* arch/m68knommu/platform/68360/uCquicc/crt0_rom.S - * - * Startup code for Motorola 68360 - * - * Copyright 2001 (C) SED Systems, a Division of Calian Ltd. - * Based on: arch/m68knommu/platform/68328/pilot/crt0_rom.S - * Based on: arch/m68knommu/platform/68360/uCquicc/crt0_rom.S, 2.0.38.1.pre7 - * uClinux Kernel - * Copyright (C) Michael Leslie - * Based on: arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S - * Copyright (C) 1998 D. Jeff Dionne , - * - */ -#define ASSEMBLY -#include - -.global _stext -.global _start - -.global _rambase -.global __ramvec -.global _ramvec -.global _ramstart -.global _ramend - -.global _quicc_base -.global _periph_base - -#define REGB 0x1000 -#define PEPAR (_dprbase + REGB + 0x0016) -#define GMR (_dprbase + REGB + 0x0040) -#define OR0 (_dprbase + REGB + 0x0054) -#define BR0 (_dprbase + REGB + 0x0050) -#define OR1 (_dprbase + REGB + 0x0064) -#define BR1 (_dprbase + REGB + 0x0060) -#define OR4 (_dprbase + REGB + 0x0094) -#define BR4 (_dprbase + REGB + 0x0090) -#define OR6 (_dprbase + REGB + 0x00b4) -#define BR6 (_dprbase + REGB + 0x00b0) -#define OR7 (_dprbase + REGB + 0x00c4) -#define BR7 (_dprbase + REGB + 0x00c0) - -#define MCR (_dprbase + REGB + 0x0000) -#define AVR (_dprbase + REGB + 0x0008) - -#define SYPCR (_dprbase + REGB + 0x0022) - -#define PLLCR (_dprbase + REGB + 0x0010) -#define CLKOCR (_dprbase + REGB + 0x000C) -#define CDVCR (_dprbase + REGB + 0x0014) - -#define BKAR (_dprbase + REGB + 0x0030) -#define BKCR (_dprbase + REGB + 0x0034) -#define SWIV (_dprbase + REGB + 0x0023) -#define PICR (_dprbase + REGB + 0x0026) -#define PITR (_dprbase + REGB + 0x002A) - -/* Define for all memory configuration */ -#define MCU_SIM_GMR 0x00000000 -#define SIM_OR_MASK 0x0fffffff - -/* Defines for chip select zero - the flash */ -#define SIM_OR0_MASK 0x20000002 -#define SIM_BR0_MASK 0x00000001 - - -/* Defines for chip select one - the RAM */ -#define SIM_OR1_MASK 0x10000000 -#define SIM_BR1_MASK 0x00000001 - -#define MCU_SIM_MBAR_ADRS 0x0003ff00 -#define MCU_SIM_MBAR_BA_MASK 0xfffff000 -#define MCU_SIM_MBAR_AS_MASK 0x00000001 - -#define MCU_SIM_PEPAR 0x00B4 - -#define MCU_DISABLE_INTRPTS 0x2700 -#define MCU_SIM_AVR 0x00 - -#define MCU_SIM_MCR 0x00005cff - -#define MCU_SIM_CLKOCR 0x00 -#define MCU_SIM_PLLCR 0x8000 -#define MCU_SIM_CDVCR 0x0000 - -#define MCU_SIM_SYPCR 0x0000 -#define MCU_SIM_SWIV 0x00 -#define MCU_SIM_PICR 0x0000 -#define MCU_SIM_PITR 0x0000 - - -#include - - -/* - * By the time this RAM specific code begins to execute, DPRAM - * and DRAM should already be mapped and accessible. - */ - - .text -_start: -_stext: - nop - ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ - /* We should not need to setup the boot stack the reset should do it. */ - movea.l #__ramend, %sp /*set up stack at the end of DRAM:*/ - -set_mbar_register: - moveq.l #0x07, %d1 /* Setup MBAR */ - movec %d1, %dfc - - lea.l MCU_SIM_MBAR_ADRS, %a0 - move.l #_dprbase, %d0 - andi.l #MCU_SIM_MBAR_BA_MASK, %d0 - ori.l #MCU_SIM_MBAR_AS_MASK, %d0 - moves.l %d0, %a0@ - - moveq.l #0x05, %d1 - movec.l %d1, %dfc - - /* Now we can begin to access registers in DPRAM */ - -set_sim_mcr: - /* Set Module Configuration Register */ - move.l #MCU_SIM_MCR, MCR - - /* to do: Determine cause of reset */ - - /* - * configure system clock MC68360 p. 6-40 - * (value +1)*osc/128 = system clock - */ -set_sim_clock: - move.w #MCU_SIM_PLLCR, PLLCR - move.b #MCU_SIM_CLKOCR, CLKOCR - move.w #MCU_SIM_CDVCR, CDVCR - - /* Wait for the PLL to settle */ - move.w #16384, %d0 -pll_settle_wait: - subi.w #1, %d0 - bne pll_settle_wait - - /* Setup the system protection register, and watchdog timer register */ - move.b #MCU_SIM_SWIV, SWIV - move.w #MCU_SIM_PICR, PICR - move.w #MCU_SIM_PITR, PITR - move.w #MCU_SIM_SYPCR, SYPCR - - /* Clear DPRAM - system + parameter */ - movea.l #_dprbase, %a0 - movea.l #_dprbase+0x2000, %a1 - - /* Copy 0 to %a0 until %a0 == %a1 */ -clear_dpram: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi clear_dpram - -configure_memory_controller: - /* Set up Global Memory Register (GMR) */ - move.l #MCU_SIM_GMR, %d0 - move.l %d0, GMR - -configure_chip_select_0: - move.l #__ramend, %d0 - subi.l #__ramstart, %d0 - subq.l #0x01, %d0 - eori.l #SIM_OR_MASK, %d0 - ori.l #SIM_OR0_MASK, %d0 - move.l %d0, OR0 - - move.l #__ramstart, %d0 - ori.l #SIM_BR0_MASK, %d0 - move.l %d0, BR0 - -configure_chip_select_1: - move.l #__rom_end, %d0 - subi.l #__rom_start, %d0 - subq.l #0x01, %d0 - eori.l #SIM_OR_MASK, %d0 - ori.l #SIM_OR1_MASK, %d0 - move.l %d0, OR1 - - move.l #__rom_start, %d0 - ori.l #SIM_BR1_MASK, %d0 - move.l %d0, BR1 - - move.w #MCU_SIM_PEPAR, PEPAR - - /* point to vector table: */ - move.l #_romvec, %a0 - move.l #_ramvec, %a1 -copy_vectors: - move.l %a0@, %d0 - move.l %d0, %a1@ - move.l %a0@, %a1@ - addq.l #0x04, %a0 - addq.l #0x04, %a1 - cmp.l #_start, %a0 - blt copy_vectors - - move.l #_ramvec, %a1 - movec %a1, %vbr - - - /* Copy data segment from ROM to RAM */ - moveal #_stext, %a0 - moveal #_sdata, %a1 - moveal #_edata, %a2 - - /* Copy %a0 to %a1 until %a1 == %a2 */ -LD1: - move.l %a0@, %d0 - addq.l #0x04, %a0 - move.l %d0, %a1@ - addq.l #0x04, %a1 - cmp.l #_edata, %a1 - blt LD1 - - moveal #_sbss, %a0 - moveal #_ebss, %a1 - - /* Copy 0 to %a0 until %a0 == %a1 */ -L1: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi L1 - -load_quicc: - move.l #_dprbase, _quicc_base - -store_ram_size: - /* Set ram size information */ - move.l #_sdata, _rambase - move.l #_ebss, _ramstart - move.l #__ramend, %d0 - sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ - move.l %d0, _ramend /* Different from __ramend.*/ - -store_flash_size: - /* Set rom size information */ - move.l #__rom_end, %d0 - sub.l #__rom_start, %d0 - move.l %d0, rom_length - - pea 0 - pea env - pea %sp@(4) - pea 0 - - lea init_thread_union, %a2 - lea 0x2000(%a2), %sp - -lp: - jsr start_kernel - -_exit: - jmp _exit - - - .data - .align 4 -env: - .long 0 -_quicc_base: - .long 0 -_periph_base: - .long 0 -_ramvec: - .long 0 -_rambase: - .long 0 -_ramstart: - .long 0 -_ramend: - .long 0 -_dprbase: - .long 0xffffe000 - - .text - - /* - * These are the exception vectors at boot up, they are copied into RAM - * and then overwritten as needed. - */ - -.section ".data.initvect","awx" - .long __ramend /* Reset: Initial Stack Pointer - 0. */ - .long _start /* Reset: Initial Program Counter - 1. */ - .long buserr /* Bus Error - 2. */ - .long trap /* Address Error - 3. */ - .long trap /* Illegal Instruction - 4. */ - .long trap /* Divide by zero - 5. */ - .long trap /* CHK, CHK2 Instructions - 6. */ - .long trap /* TRAPcc, TRAPV Instructions - 7. */ - .long trap /* Privilege Violation - 8. */ - .long trap /* Trace - 9. */ - .long trap /* Line 1010 Emulator - 10. */ - .long trap /* Line 1111 Emualtor - 11. */ - .long trap /* Harware Breakpoint - 12. */ - .long trap /* (Reserved for Coprocessor Protocol Violation)- 13. */ - .long trap /* Format Error - 14. */ - .long trap /* Uninitialized Interrupt - 15. */ - .long trap /* (Unassigned, Reserver) - 16. */ - .long trap /* (Unassigned, Reserver) - 17. */ - .long trap /* (Unassigned, Reserver) - 18. */ - .long trap /* (Unassigned, Reserver) - 19. */ - .long trap /* (Unassigned, Reserver) - 20. */ - .long trap /* (Unassigned, Reserver) - 21. */ - .long trap /* (Unassigned, Reserver) - 22. */ - .long trap /* (Unassigned, Reserver) - 23. */ - .long trap /* Spurious Interrupt - 24. */ - .long trap /* Level 1 Interrupt Autovector - 25. */ - .long trap /* Level 2 Interrupt Autovector - 26. */ - .long trap /* Level 3 Interrupt Autovector - 27. */ - .long trap /* Level 4 Interrupt Autovector - 28. */ - .long trap /* Level 5 Interrupt Autovector - 29. */ - .long trap /* Level 6 Interrupt Autovector - 30. */ - .long trap /* Level 7 Interrupt Autovector - 31. */ - .long system_call /* Trap Instruction Vectors 0 - 32. */ - .long trap /* Trap Instruction Vectors 1 - 33. */ - .long trap /* Trap Instruction Vectors 2 - 34. */ - .long trap /* Trap Instruction Vectors 3 - 35. */ - .long trap /* Trap Instruction Vectors 4 - 36. */ - .long trap /* Trap Instruction Vectors 5 - 37. */ - .long trap /* Trap Instruction Vectors 6 - 38. */ - .long trap /* Trap Instruction Vectors 7 - 39. */ - .long trap /* Trap Instruction Vectors 8 - 40. */ - .long trap /* Trap Instruction Vectors 9 - 41. */ - .long trap /* Trap Instruction Vectors 10 - 42. */ - .long trap /* Trap Instruction Vectors 11 - 43. */ - .long trap /* Trap Instruction Vectors 12 - 44. */ - .long trap /* Trap Instruction Vectors 13 - 45. */ - .long trap /* Trap Instruction Vectors 14 - 46. */ - .long trap /* Trap Instruction Vectors 15 - 47. */ - .long 0 /* (Reserved for Coprocessor) - 48. */ - .long 0 /* (Reserved for Coprocessor) - 49. */ - .long 0 /* (Reserved for Coprocessor) - 50. */ - .long 0 /* (Reserved for Coprocessor) - 51. */ - .long 0 /* (Reserved for Coprocessor) - 52. */ - .long 0 /* (Reserved for Coprocessor) - 53. */ - .long 0 /* (Reserved for Coprocessor) - 54. */ - .long 0 /* (Reserved for Coprocessor) - 55. */ - .long 0 /* (Reserved for Coprocessor) - 56. */ - .long 0 /* (Reserved for Coprocessor) - 57. */ - .long 0 /* (Reserved for Coprocessor) - 58. */ - .long 0 /* (Unassigned, Reserved) - 59. */ - .long 0 /* (Unassigned, Reserved) - 60. */ - .long 0 /* (Unassigned, Reserved) - 61. */ - .long 0 /* (Unassigned, Reserved) - 62. */ - .long 0 /* (Unassigned, Reserved) - 63. */ - /* The assignment of these vectors to the CPM is */ - /* dependent on the configuration of the CPM vba */ - /* fields. */ - .long 0 /* (User-Defined Vectors 1) CPM Error - 64. */ - .long 0 /* (User-Defined Vectors 2) CPM Parallel IO PC11- 65. */ - .long 0 /* (User-Defined Vectors 3) CPM Parallel IO PC10- 66. */ - .long 0 /* (User-Defined Vectors 4) CPM SMC2 / PIP - 67. */ - .long 0 /* (User-Defined Vectors 5) CPM SMC1 - 68. */ - .long 0 /* (User-Defined Vectors 6) CPM SPI - 69. */ - .long 0 /* (User-Defined Vectors 7) CPM Parallel IO PC9 - 70. */ - .long 0 /* (User-Defined Vectors 8) CPM Timer 4 - 71. */ - .long 0 /* (User-Defined Vectors 9) CPM Reserved - 72. */ - .long 0 /* (User-Defined Vectors 10) CPM Parallel IO PC8- 73. */ - .long 0 /* (User-Defined Vectors 11) CPM Parallel IO PC7- 74. */ - .long 0 /* (User-Defined Vectors 12) CPM Parallel IO PC6- 75. */ - .long 0 /* (User-Defined Vectors 13) CPM Timer 3 - 76. */ - .long 0 /* (User-Defined Vectors 14) CPM Reserved - 77. */ - .long 0 /* (User-Defined Vectors 15) CPM Parallel IO PC5- 78. */ - .long 0 /* (User-Defined Vectors 16) CPM Parallel IO PC4- 79. */ - .long 0 /* (User-Defined Vectors 17) CPM Reserved - 80. */ - .long 0 /* (User-Defined Vectors 18) CPM RISC Timer Tbl - 81. */ - .long 0 /* (User-Defined Vectors 19) CPM Timer 2 - 82. */ - .long 0 /* (User-Defined Vectors 21) CPM Reserved - 83. */ - .long 0 /* (User-Defined Vectors 22) CPM IDMA2 - 84. */ - .long 0 /* (User-Defined Vectors 23) CPM IDMA1 - 85. */ - .long 0 /* (User-Defined Vectors 24) CPM SDMA Bus Err - 86. */ - .long 0 /* (User-Defined Vectors 25) CPM Parallel IO PC3- 87. */ - .long 0 /* (User-Defined Vectors 26) CPM Parallel IO PC2- 88. */ - .long 0 /* (User-Defined Vectors 27) CPM Timer 1 - 89. */ - .long 0 /* (User-Defined Vectors 28) CPM Parallel IO PC1- 90. */ - .long 0 /* (User-Defined Vectors 29) CPM SCC 4 - 91. */ - .long 0 /* (User-Defined Vectors 30) CPM SCC 3 - 92. */ - .long 0 /* (User-Defined Vectors 31) CPM SCC 2 - 93. */ - .long 0 /* (User-Defined Vectors 32) CPM SCC 1 - 94. */ - .long 0 /* (User-Defined Vectors 33) CPM Parallel IO PC0- 95. */ - /* I don't think anything uses the vectors after here. */ - .long 0 /* (User-Defined Vectors 34) - 96. */ - .long 0,0,0,0,0 /* (User-Defined Vectors 35 - 39). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 40 - 49). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 50 - 59). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 60 - 69). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 70 - 79). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 80 - 89). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 90 - 99). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 100 - 109). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 110 - 119). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 120 - 129). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 130 - 139). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 140 - 149). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 150 - 159). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 160 - 169). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 170 - 179). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 180 - 189). */ - .long 0,0,0 /* (User-Defined Vectors 190 - 192). */ -.text -ignore: rte diff -Nru a/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S b/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S --- a/arch/m68knommu/platform/68360/uCquicc/crt0_rom.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,420 +0,0 @@ -/* arch/m68knommu/platform/68360/uCquicc/crt0_rom.S - * - * Startup code for Motorola 68360 - * - * Copyright (C) SED Systems, a Division of Calian Ltd. - * Based on: arch/m68knommu/platform/68328/pilot/crt0_rom.S - * Based on: arch/m68knommu/platform/68360/uCquicc/crt0_rom.S, 2.0.38.1.pre7 - * uClinux Kernel - * Copyright (C) Michael Leslie - * Based on: arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S - * Copyright (C) 1998 D. Jeff Dionne , - * - */ -#include - -.global _stext -.global _sbss -.global _start - -.global _rambase -.global __ramvec -.global _ramvec -.global _ramstart -.global _ramend - -.global _quicc_base -.global _periph_base - -#define REGB 0x1000 -#define PEPAR (_dprbase + REGB + 0x0016) -#define GMR (_dprbase + REGB + 0x0040) -#define OR0 (_dprbase + REGB + 0x0054) -#define BR0 (_dprbase + REGB + 0x0050) - -#define OR1 (_dprbase + REGB + 0x0064) -#define BR1 (_dprbase + REGB + 0x0060) - -#define OR2 (_dprbase + REGB + 0x0074) -#define BR2 (_dprbase + REGB + 0x0070) - -#define OR3 (_dprbase + REGB + 0x0084) -#define BR3 (_dprbase + REGB + 0x0080) - -#define OR4 (_dprbase + REGB + 0x0094) -#define BR4 (_dprbase + REGB + 0x0090) - -#define OR5 (_dprbase + REGB + 0x00A4) -#define BR5 (_dprbase + REGB + 0x00A0) - -#define OR6 (_dprbase + REGB + 0x00b4) -#define BR6 (_dprbase + REGB + 0x00b0) - -#define OR7 (_dprbase + REGB + 0x00c4) -#define BR7 (_dprbase + REGB + 0x00c0) - -#define MCR (_dprbase + REGB + 0x0000) -#define AVR (_dprbase + REGB + 0x0008) - -#define SYPCR (_dprbase + REGB + 0x0022) - -#define PLLCR (_dprbase + REGB + 0x0010) -#define CLKOCR (_dprbase + REGB + 0x000C) -#define CDVCR (_dprbase + REGB + 0x0014) - -#define BKAR (_dprbase + REGB + 0x0030) -#define BKCR (_dprbase + REGB + 0x0034) -#define SWIV (_dprbase + REGB + 0x0023) -#define PICR (_dprbase + REGB + 0x0026) -#define PITR (_dprbase + REGB + 0x002A) - -/* Define for all memory configuration */ -#define MCU_SIM_GMR 0x00000000 -#define SIM_OR_MASK 0x0fffffff - -/* Defines for chip select zero - the flash */ -#define SIM_OR0_MASK 0x20000000 -#define SIM_BR0_MASK 0x00000001 - -/* Defines for chip select one - the RAM */ -#define SIM_OR1_MASK 0x10000000 -#define SIM_BR1_MASK 0x00000001 - -#define MCU_SIM_MBAR_ADRS 0x0003ff00 -#define MCU_SIM_MBAR_BA_MASK 0xfffff000 -#define MCU_SIM_MBAR_AS_MASK 0x00000001 - -#define MCU_SIM_PEPAR 0x00B4 - -#define MCU_DISABLE_INTRPTS 0x2700 -#define MCU_SIM_AVR 0x00 - -#define MCU_SIM_MCR 0x00005cff - -#define MCU_SIM_CLKOCR 0x00 -#define MCU_SIM_PLLCR 0x8000 -#define MCU_SIM_CDVCR 0x0000 - -#define MCU_SIM_SYPCR 0x0000 -#define MCU_SIM_SWIV 0x00 -#define MCU_SIM_PICR 0x0000 -#define MCU_SIM_PITR 0x0000 - - -#include - - -/* - * By the time this RAM specific code begins to execute, DPRAM - * and DRAM should already be mapped and accessible. - */ - - .text -_start: -_stext: - nop - ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ - /* We should not need to setup the boot stack the reset should do it. */ - movea.l #__ramend, %sp /* set up stack at the end of DRAM:*/ - - -set_mbar_register: - moveq.l #0x07, %d1 /* Setup MBAR */ - movec %d1, %dfc - - lea.l MCU_SIM_MBAR_ADRS, %a0 - move.l #_dprbase, %d0 - andi.l #MCU_SIM_MBAR_BA_MASK, %d0 - ori.l #MCU_SIM_MBAR_AS_MASK, %d0 - moves.l %d0, %a0@ - - moveq.l #0x05, %d1 - movec.l %d1, %dfc - - /* Now we can begin to access registers in DPRAM */ - -set_sim_mcr: - /* Set Module Configuration Register */ - move.l #MCU_SIM_MCR, MCR - - /* to do: Determine cause of reset */ - - /* - * configure system clock MC68360 p. 6-40 - * (value +1)*osc/128 = system clock - * or - * (value + 1)*osc = system clock - * You do not need to divide the oscillator by 128 unless you want to. - */ -set_sim_clock: - move.w #MCU_SIM_PLLCR, PLLCR - move.b #MCU_SIM_CLKOCR, CLKOCR - move.w #MCU_SIM_CDVCR, CDVCR - - /* Wait for the PLL to settle */ - move.w #16384, %d0 -pll_settle_wait: - subi.w #1, %d0 - bne pll_settle_wait - - /* Setup the system protection register, and watchdog timer register */ - move.b #MCU_SIM_SWIV, SWIV - move.w #MCU_SIM_PICR, PICR - move.w #MCU_SIM_PITR, PITR - move.w #MCU_SIM_SYPCR, SYPCR - - /* Clear DPRAM - system + parameter */ - movea.l #_dprbase, %a0 - movea.l #_dprbase+0x2000, %a1 - - /* Copy 0 to %a0 until %a0 == %a1 */ -clear_dpram: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi clear_dpram - -configure_memory_controller: - /* Set up Global Memory Register (GMR) */ - move.l #MCU_SIM_GMR, %d0 - move.l %d0, GMR - -configure_chip_select_0: - move.l #0x00400000, %d0 - subq.l #0x01, %d0 - eori.l #SIM_OR_MASK, %d0 - ori.l #SIM_OR0_MASK, %d0 - move.l %d0, OR0 - - move.l #__rom_start, %d0 - ori.l #SIM_BR0_MASK, %d0 - move.l %d0, BR0 - - move.l #0x0, BR1 - move.l #0x0, BR2 - move.l #0x0, BR3 - move.l #0x0, BR4 - move.l #0x0, BR5 - move.l #0x0, BR6 - move.l #0x0, BR7 - - move.w #MCU_SIM_PEPAR, PEPAR - - /* point to vector table: */ - move.l #_romvec, %a0 - move.l #_ramvec, %a1 -copy_vectors: - move.l %a0@, %d0 - move.l %d0, %a1@ - move.l %a0@, %a1@ - addq.l #0x04, %a0 - addq.l #0x04, %a1 - cmp.l #_start, %a0 - blt copy_vectors - - move.l #_ramvec, %a1 - movec %a1, %vbr - - - /* Copy data segment from ROM to RAM */ - moveal #_etext, %a0 - moveal #_sdata, %a1 - moveal #_edata, %a2 - - /* Copy %a0 to %a1 until %a1 == %a2 */ -LD1: - move.l %a0@, %d0 - addq.l #0x04, %a0 - move.l %d0, %a1@ - addq.l #0x04, %a1 - cmp.l #_edata, %a1 - blt LD1 - - moveal #_sbss, %a0 - moveal #_ebss, %a1 - - /* Copy 0 to %a0 until %a0 == %a1 */ -L1: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi L1 - -load_quicc: - move.l #_dprbase, _quicc_base - -store_ram_size: - /* Set ram size information */ - move.l #_sdata, _rambase - move.l #_ebss, _ramstart - move.l #__ramend, %d0 - sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ - move.l %d0, _ramend /* Different from __ramend.*/ - -store_flash_size: - /* Set rom size information */ - move.l #__rom_end, %d0 - sub.l #__rom_start, %d0 - move.l %d0, rom_length - - pea 0 - pea env - pea %sp@(4) - pea 0 - - lea init_thread_union, %a2 - lea 0x2000(%a2), %sp - -lp: - jsr start_kernel - -_exit: - jmp _exit - - - .data - .align 4 -env: - .long 0 -_quicc_base: - .long 0 -_periph_base: - .long 0 -_ramvec: - .long 0 -_rambase: - .long 0 -_ramstart: - .long 0 -_ramend: - .long 0 -_dprbase: - .long 0xffffe000 - - - .text - - /* - * These are the exception vectors at boot up, they are copied into RAM - * and then overwritten as needed. - */ - -.section ".data.initvect","awx" - .long __ramend /* Reset: Initial Stack Pointer - 0. */ - .long _start /* Reset: Initial Program Counter - 1. */ - .long buserr /* Bus Error - 2. */ - .long trap /* Address Error - 3. */ - .long trap /* Illegal Instruction - 4. */ - .long trap /* Divide by zero - 5. */ - .long trap /* CHK, CHK2 Instructions - 6. */ - .long trap /* TRAPcc, TRAPV Instructions - 7. */ - .long trap /* Privilege Violation - 8. */ - .long trap /* Trace - 9. */ - .long trap /* Line 1010 Emulator - 10. */ - .long trap /* Line 1111 Emualtor - 11. */ - .long trap /* Harware Breakpoint - 12. */ - .long trap /* (Reserved for Coprocessor Protocol Violation)- 13. */ - .long trap /* Format Error - 14. */ - .long trap /* Uninitialized Interrupt - 15. */ - .long trap /* (Unassigned, Reserver) - 16. */ - .long trap /* (Unassigned, Reserver) - 17. */ - .long trap /* (Unassigned, Reserver) - 18. */ - .long trap /* (Unassigned, Reserver) - 19. */ - .long trap /* (Unassigned, Reserver) - 20. */ - .long trap /* (Unassigned, Reserver) - 21. */ - .long trap /* (Unassigned, Reserver) - 22. */ - .long trap /* (Unassigned, Reserver) - 23. */ - .long trap /* Spurious Interrupt - 24. */ - .long trap /* Level 1 Interrupt Autovector - 25. */ - .long trap /* Level 2 Interrupt Autovector - 26. */ - .long trap /* Level 3 Interrupt Autovector - 27. */ - .long trap /* Level 4 Interrupt Autovector - 28. */ - .long trap /* Level 5 Interrupt Autovector - 29. */ - .long trap /* Level 6 Interrupt Autovector - 30. */ - .long trap /* Level 7 Interrupt Autovector - 31. */ - .long system_call /* Trap Instruction Vectors 0 - 32. */ - .long trap /* Trap Instruction Vectors 1 - 33. */ - .long trap /* Trap Instruction Vectors 2 - 34. */ - .long trap /* Trap Instruction Vectors 3 - 35. */ - .long trap /* Trap Instruction Vectors 4 - 36. */ - .long trap /* Trap Instruction Vectors 5 - 37. */ - .long trap /* Trap Instruction Vectors 6 - 38. */ - .long trap /* Trap Instruction Vectors 7 - 39. */ - .long trap /* Trap Instruction Vectors 8 - 40. */ - .long trap /* Trap Instruction Vectors 9 - 41. */ - .long trap /* Trap Instruction Vectors 10 - 42. */ - .long trap /* Trap Instruction Vectors 11 - 43. */ - .long trap /* Trap Instruction Vectors 12 - 44. */ - .long trap /* Trap Instruction Vectors 13 - 45. */ - .long trap /* Trap Instruction Vectors 14 - 46. */ - .long trap /* Trap Instruction Vectors 15 - 47. */ - .long 0 /* (Reserved for Coprocessor) - 48. */ - .long 0 /* (Reserved for Coprocessor) - 49. */ - .long 0 /* (Reserved for Coprocessor) - 50. */ - .long 0 /* (Reserved for Coprocessor) - 51. */ - .long 0 /* (Reserved for Coprocessor) - 52. */ - .long 0 /* (Reserved for Coprocessor) - 53. */ - .long 0 /* (Reserved for Coprocessor) - 54. */ - .long 0 /* (Reserved for Coprocessor) - 55. */ - .long 0 /* (Reserved for Coprocessor) - 56. */ - .long 0 /* (Reserved for Coprocessor) - 57. */ - .long 0 /* (Reserved for Coprocessor) - 58. */ - .long 0 /* (Unassigned, Reserved) - 59. */ - .long 0 /* (Unassigned, Reserved) - 60. */ - .long 0 /* (Unassigned, Reserved) - 61. */ - .long 0 /* (Unassigned, Reserved) - 62. */ - .long 0 /* (Unassigned, Reserved) - 63. */ - /* The assignment of these vectors to the CPM is */ - /* dependent on the configuration of the CPM vba */ - /* fields. */ - .long 0 /* (User-Defined Vectors 1) CPM Error - 64. */ - .long 0 /* (User-Defined Vectors 2) CPM Parallel IO PC11- 65. */ - .long 0 /* (User-Defined Vectors 3) CPM Parallel IO PC10- 66. */ - .long 0 /* (User-Defined Vectors 4) CPM SMC2 / PIP - 67. */ - .long 0 /* (User-Defined Vectors 5) CPM SMC1 - 68. */ - .long 0 /* (User-Defined Vectors 6) CPM SPI - 69. */ - .long 0 /* (User-Defined Vectors 7) CPM Parallel IO PC9 - 70. */ - .long 0 /* (User-Defined Vectors 8) CPM Timer 4 - 71. */ - .long 0 /* (User-Defined Vectors 9) CPM Reserved - 72. */ - .long 0 /* (User-Defined Vectors 10) CPM Parallel IO PC8- 73. */ - .long 0 /* (User-Defined Vectors 11) CPM Parallel IO PC7- 74. */ - .long 0 /* (User-Defined Vectors 12) CPM Parallel IO PC6- 75. */ - .long 0 /* (User-Defined Vectors 13) CPM Timer 3 - 76. */ - .long 0 /* (User-Defined Vectors 14) CPM Reserved - 77. */ - .long 0 /* (User-Defined Vectors 15) CPM Parallel IO PC5- 78. */ - .long 0 /* (User-Defined Vectors 16) CPM Parallel IO PC4- 79. */ - .long 0 /* (User-Defined Vectors 17) CPM Reserved - 80. */ - .long 0 /* (User-Defined Vectors 18) CPM RISC Timer Tbl - 81. */ - .long 0 /* (User-Defined Vectors 19) CPM Timer 2 - 82. */ - .long 0 /* (User-Defined Vectors 21) CPM Reserved - 83. */ - .long 0 /* (User-Defined Vectors 22) CPM IDMA2 - 84. */ - .long 0 /* (User-Defined Vectors 23) CPM IDMA1 - 85. */ - .long 0 /* (User-Defined Vectors 24) CPM SDMA Bus Err - 86. */ - .long 0 /* (User-Defined Vectors 25) CPM Parallel IO PC3- 87. */ - .long 0 /* (User-Defined Vectors 26) CPM Parallel IO PC2- 88. */ - .long 0 /* (User-Defined Vectors 27) CPM Timer 1 - 89. */ - .long 0 /* (User-Defined Vectors 28) CPM Parallel IO PC1- 90. */ - .long 0 /* (User-Defined Vectors 29) CPM SCC 4 - 91. */ - .long 0 /* (User-Defined Vectors 30) CPM SCC 3 - 92. */ - .long 0 /* (User-Defined Vectors 31) CPM SCC 2 - 93. */ - .long 0 /* (User-Defined Vectors 32) CPM SCC 1 - 94. */ - .long 0 /* (User-Defined Vectors 33) CPM Parallel IO PC0- 95. */ - /* I don't think anything uses the vectors after here. */ - .long 0 /* (User-Defined Vectors 34) - 96. */ - .long 0,0,0,0,0 /* (User-Defined Vectors 35 - 39). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 40 - 49). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 50 - 59). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 60 - 69). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 70 - 79). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 80 - 89). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 90 - 99). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 100 - 109). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 110 - 119). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 120 - 129). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 130 - 139). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 140 - 149). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 150 - 159). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 160 - 169). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 170 - 179). */ - .long 0,0,0,0,0,0,0,0,0,0 /* (User-Defined Vectors 180 - 189). */ - .long 0,0,0 /* (User-Defined Vectors 190 - 192). */ -.text -ignore: rte diff -Nru a/arch/m68knommu/platform/68EZ328/Makefile b/arch/m68knommu/platform/68EZ328/Makefile --- a/arch/m68knommu/platform/68EZ328/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/m68knommu/platform/68EZ328/Makefile 2005-03-30 16:58:47 -08:00 @@ -4,9 +4,8 @@ obj-y := config.o -extra-y := $(BOARD)/bootlogo.rh $(BOARD)/crt0_$(MODEL).o +extra-y := bootlogo.rh -$(obj)/$(BOARD)/bootlogo.rh: $(src)/bootlogo.h +$(obj)/bootlogo.rh: $(src)/bootlogo.h perl $(src)/../68328/bootlogo.pl < $(src)/bootlogo.h \ - > $(obj)/$(BOARD)/bootlogo.rh - + > $(obj)/bootlogo.rh diff -Nru a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_fixed.S b/arch/m68knommu/platform/68EZ328/ucsimm/crt0_fixed.S --- a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_fixed.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,109 +0,0 @@ -#include - - .global _start - .global _stext - - .global _rambase - .global _ramvec - .global _ramstart - .global _ramend - -#ifdef CONFIG_INIT_LCD - .global splash_bits -#endif - - .data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -.align 4 -_ramvec: -.long 0 -_rambase: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -#ifdef CONFIG_INIT_LCD -splash_bits: -#include "bootlogo.rh" -#endif - - .text -_start: -_stext: movew #0x2700,%sr -#ifdef CONFIG_INIT_LCD - movel #splash_bits, 0xfffffA00 /* LSSA */ - moveb #0x28, 0xfffffA05 /* LVPW */ - movew #0x280, 0xFFFFFa08 /* LXMAX */ - movew #0x1df, 0xFFFFFa0a /* LYMAX */ - moveb #0, 0xfffffa29 /* LBAR */ - moveb #0, 0xfffffa25 /* LPXCD */ - moveb #0x08, 0xFFFFFa20 /* LPICF */ - moveb #0x01, 0xFFFFFA21 /* -ve pol */ - moveb #0x81, 0xfffffA27 /* LCKCON */ - movew #0xff00, 0xfffff412 /* LCD pins */ -#endif - moveal #__ramend-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp - movew #32767, %d0 /* PLL settle wait loop */ -1: subq #1, %d0 - bne 1b - - /* Copy data segment from ROM to RAM */ - moveal #_etext, %a0 - moveal #_sdata, %a1 - moveal #_edata, %a2 - - /* Copy %a0 to %a1 until %a1 == %a2 */ -1: movel %a0@+, %a1@+ - cmpal %a1, %a2 - bhi 1b - - moveal #_sbss, %a0 - moveal #_ebss, %a1 - /* Copy 0 to %a0 until %a0 == %a1 */ - -1: - clrl %a0@+ - cmpal %a0, %a1 - bhi 1b - - movel #_sdata, %d0 - movel %d0, _rambase - movel #_ebss, %d0 - movel %d0, _ramstart - movel #__ramend-CONFIG_MEMORY_RESERVE*0x100000, %d0 - movel %d0, _ramend - movel #__ramvec, %d0 - movel %d0, _ramvec - -/* - * load the current task pointer and stack - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - -1: jsr start_kernel - bra 1b -_exit: - - jmp _exit - - -putc: - moveb %d7,0xfffff907 -1: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq 1b - rts - - .data -env: - .long 0 - .text - diff -Nru a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_himem.S b/arch/m68knommu/platform/68EZ328/ucsimm/crt0_himem.S --- a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_himem.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1 +0,0 @@ -#include "crt0_fixed.S" diff -Nru a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_ram.S b/arch/m68knommu/platform/68EZ328/ucsimm/crt0_ram.S --- a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_ram.S 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,167 +0,0 @@ - .global __main - .global __ram_start - .global __ram_end - .global __rom_start - .global __rom_end - - .global _rambase - .global _ramstart - - .global splash_bits - .global _start - .global _stext - -#define DEBUG -#define ROM_OFFSET 0x10C00000 -#define STACK_GAURD 0x10 - - .text - -_start: -_stext: - movew #0x2700, %sr /* Exceptions off! */ - - /* Init chip registers. uCsimm specific */ - moveb #0x00, 0xfffffb0b /* Watchdog off */ - moveb #0x10, 0xfffff000 /* SCR */ - - movew #0x2400, 0xfffff200 /* PLLCR */ - movew #0x0123, 0xfffff202 /* PLLFSR */ - - moveb #0x00, 0xfffff40b /* enable chip select */ - moveb #0x00, 0xfffff423 /* enable /DWE */ - moveb #0x08, 0xfffffd0d /* disable hardmap */ - moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ - - movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ - movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ - - movew #0x8f00, 0xfffffc00 /* DRAM configuration */ - movew #0x9667, 0xfffffc02 /* DRAM control */ - movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ - movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ - - moveb #0x40, 0xfffff300 /* IVR */ - movel #0x007FFFFF, %d0 /* IMR */ - movel %d0, 0xfffff304 - - moveb 0xfffff42b, %d0 - andb #0xe0, %d0 - moveb %d0, 0xfffff42b - - moveb #0x08, 0xfffff907 /* Ignore CTS */ - movew #0x010b, 0xfffff902 /* BAUD to 9600 */ - movew #0xe100, 0xfffff900 /* enable */ - - movew #16384, %d0 /* PLL settle wait loop */ -L0: - subw #1, %d0 - bne L0 -#ifdef DEBUG - moveq #70, %d7 /* 'F' */ - moveb %d7,0xfffff907 /* No absolute addresses */ -pclp1: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp1 -#endif /* DEBUG */ - -#ifdef CONFIG_RELOCATE - /* Copy me to RAM */ - moveal #__rom_start, %a0 - moveal #__ram_start, %a1 - moveal #_edata, %a2 - - /* Copy %a0 to %a1 until %a1 == %a2 */ -LD1: - movel %a0@+, %d0 - movel %d0, %a1@+ - cmpal %a1, %a2 - bhi LD1 - -#ifdef DEBUG - moveq #74, %d7 /* 'J' */ - moveb %d7,0xfffff907 /* No absolute addresses */ -pclp2: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp2 -#endif /* DEBUG */ - /* jump into the RAM copy */ - jmp ram_jump -ram_jump: - -#endif /* CONFIG_RELOCATE */ - -#ifdef DEBUG - moveq #82, %d7 /* 'R' */ - moveb %d7,0xfffff907 /* No absolute addresses */ -pclp3: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp3 -#endif /* DEBUG */ - moveal #0x007ffff0, %ssp - moveal #_sbss, %a0 - moveal #_ebss, %a1 - - /* Copy 0 to %a0 until %a0 >= %a1 */ -L1: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi L1 - -#ifdef DEBUG - moveq #67, %d7 /* 'C' */ - jsr putc -#endif /* DEBUG */ - - pea 0 - pea env - pea %sp@(4) - pea 0 - -#ifdef DEBUG - moveq #70, %d7 /* 'F' */ - jsr putc -#endif /* DEBUG */ - -lp: - jsr start_kernel - jmp lp -_exit: - - jmp _exit - -__main: - /* nothing */ - rts - -#ifdef DEBUG -putc: - moveb %d7,0xfffff907 -pclp: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp - rts -#endif /* DEBUG */ - - .data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -.align 4 -_ramvec: -.long 0 -_rambase: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -env: - .long 0 diff -Nru a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S b/arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S --- a/arch/m68knommu/platform/68EZ328/ucsimm/crt0_rom.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1 +0,0 @@ -#include "crt0_fixed.S" diff -Nru a/arch/m68knommu/platform/68VZ328/Makefile b/arch/m68knommu/platform/68VZ328/Makefile --- a/arch/m68knommu/platform/68VZ328/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/m68knommu/platform/68VZ328/Makefile 2005-03-30 16:58:47 -08:00 @@ -2,5 +2,15 @@ # Makefile for arch/m68knommu/platform/68VZ328. # -obj-y := $(BOARD)/ +obj-y := config.o +logo-$(UCDIMM) := bootlogo.rh +logo-$(DRAGEN2) := screen.h +extra-y := $(logo-y) +$(obj)/bootlogo.rh: $(src)/../68EZ328/bootlogo.h + perl $(src)/bootlogo.pl < $(src)/../68328/bootlogo.h > $(obj)/bootlogo.rh + +$(obj)/screen.h: $(src)/screen.xbm $(src)/xbm2lcd.pl + perl $(src)/xbm2lcd.pl < $(src)/screen.xbm > $(obj)/screen.h + +clean-files := $(obj)/screen.h $(obj)/bootlogo.rh diff -Nru a/arch/m68knommu/platform/68VZ328/de2/Makefile b/arch/m68knommu/platform/68VZ328/de2/Makefile --- a/arch/m68knommu/platform/68VZ328/de2/Makefile 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,12 +0,0 @@ -# -# Makefile for arch/m68knommu/platform/68VZ328/de2. -# - -obj-y := config.o - -EXTRA_TARGETS := bootlogo.rh crt0_$(MODEL).o - -$(obj)/bootlogo.rh: $(src)/../../68EZ328/bootlogo.h - perl $(src)/../../68328/bootlogo.pl < $(src)/../../68EZ328/bootlogo.h \ - > $(obj)/bootlogo.rh - diff -Nru a/arch/m68knommu/platform/68VZ328/de2/crt0_ram.S b/arch/m68knommu/platform/68VZ328/de2/crt0_ram.S --- a/arch/m68knommu/platform/68VZ328/de2/crt0_ram.S 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,135 +0,0 @@ -#include - -#if defined(CONFIG_RAM32MB) -#define MEM_END 0x02000000 /* Memory size 32Mb */ -#elif defined(CONFIG_RAM16MB) -#define MEM_END 0x01000000 /* Memory size 16Mb */ -#else -#define MEM_END 0x00800000 /* Memory size 8Mb */ -#endif - -#undef CRT_DEBUG - -.macro PUTC CHAR -#ifdef CRT_DEBUG - moveq #\CHAR, %d7 - jsr putc -#endif -.endm - - .global _start - .global _rambase - .global _ramvec - .global _ramstart - .global _ramend - - .data - -/* - * Set up the usable of RAM stuff - */ -_rambase: - .long 0 -_ramvec: - .long 0 -_ramstart: - .long 0 -_ramend: - .long 0 - - .text - -_start: - -/* - * Setup initial stack - */ - /* disable all interrupts */ - movew #0x2700, %sr - movel #-1, 0xfffff304 - movel #MEM_END-4, %sp - - PUTC '\r' - PUTC '\n' - PUTC 'A' - PUTC 'B' - -/* - * Determine end of RAM - */ - - movel #MEM_END, %a0 - movel %a0, _ramend - - PUTC 'C' - -/* - * Move ROM filesystem above bss :-) - */ - - moveal #_sbss, %a0 /* romfs at the start of bss */ - moveal #_ebss, %a1 /* Set up destination */ - movel %a0, %a2 /* Copy of bss start */ - - movel 8(%a0), %d1 /* Get size of ROMFS */ - addql #8, %d1 /* Allow for rounding */ - andl #0xfffffffc, %d1 /* Whole words */ - - addl %d1, %a0 /* Copy from end */ - addl %d1, %a1 /* Copy from end */ - movel %a1, _ramstart /* Set start of ram */ - -1: - movel -(%a0), %d0 /* Copy dword */ - movel %d0, -(%a1) - cmpl %a0, %a2 /* Check if at end */ - bne 1b - - PUTC 'D' - -/* - * Initialize BSS segment to 0 - */ - - lea _sbss, %a0 - lea _ebss, %a1 - - /* Copy 0 to %a0 until %a0 == %a1 */ -2: cmpal %a0, %a1 - beq 1f - clrl (%a0)+ - bra 2b -1: - - PUTC 'E' - -/* - * Load the current task pointer and stack - */ - - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - - PUTC 'F' - PUTC '\r' - PUTC '\n' - -/* - * Go - */ - - jmp start_kernel - -/* - * Local functions - */ - -#ifdef CRT_DEBUG -putc: - moveb %d7, 0xfffff907 -1: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq 1b - rts -#endif diff -Nru a/arch/m68knommu/platform/68VZ328/ucdimm/Makefile b/arch/m68knommu/platform/68VZ328/ucdimm/Makefile --- a/arch/m68knommu/platform/68VZ328/ucdimm/Makefile 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,12 +0,0 @@ -# -# Makefile for arch/m68knommu/platform/68VZ328/ucdimm. -# - -obj-y := config.o - -EXTRA_TARGETS := bootlogo.rh crt0_$(MODEL).o - -$(obj)/bootlogo.rh: $(src)/../../68EZ328/bootlogo.h - perl $(src)/../../68328/bootlogo.pl < $(src)/../../68EZ328/bootlogo.h \ - > $(obj)/bootlogo.rh - diff -Nru a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_fixed.S b/arch/m68knommu/platform/68VZ328/ucdimm/crt0_fixed.S --- a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_fixed.S 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,109 +0,0 @@ -#include - - .global _start - .global _stext - - .global _rambase - .global _ramvec - .global _ramstart - .global _ramend - -#ifdef CONFIG_INIT_LCD - .global splash_bits -#endif - - .data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -.align 4 -_ramvec: -.long 0 -_rambase: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -#ifdef CONFIG_INIT_LCD -splash_bits: -#include "bootlogo.rh" -#endif - - .text -_start: -_stext: movew #0x2700,%sr -#ifdef CONFIG_INIT_LCD - movel #splash_bits, 0xfffffA00 /* LSSA */ - moveb #0x28, 0xfffffA05 /* LVPW */ - movew #0x280, 0xFFFFFa08 /* LXMAX */ - movew #0x1df, 0xFFFFFa0a /* LYMAX */ - moveb #0, 0xfffffa29 /* LBAR */ - moveb #0, 0xfffffa25 /* LPXCD */ - moveb #0x08, 0xFFFFFa20 /* LPICF */ - moveb #0x01, 0xFFFFFA21 /* -ve pol */ - moveb #0x81, 0xfffffA27 /* LCKCON */ - movew #0xff00, 0xfffff412 /* LCD pins */ -#endif - moveal #__ramend-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp - movew #32767, %d0 /* PLL settle wait loop */ -1: subq #1, %d0 - bne 1b - - /* Copy data segment from ROM to RAM */ - moveal #_etext, %a0 - moveal #_sdata, %a1 - moveal #_edata, %a2 - - /* Copy %a0 to %a1 until %a1 == %a2 */ -1: movel %a0@+, %a1@+ - cmpal %a1, %a2 - bhi 1b - - moveal #_sbss, %a0 - moveal #_ebss, %a1 - /* Copy 0 to %a0 until %a0 == %a1 */ - -1: - clrl %a0@+ - cmpal %a0, %a1 - bhi 1b - - movel #_sdata, %d0 - movel %d0, _rambase - movel #_ebss, %d0 - movel %d0, _ramstart - movel #__ramend-CONFIG_MEMORY_RESERVE*0x100000, %d0 - movel %d0, _ramend - movel #__ramvec, %d0 - movel %d0, _ramvec - -/* - * load the current task pointer and stack - */ - lea init_thread_union, %a0 - lea 0x2000(%a0), %sp - -1: jsr start_kernel - bra 1b -_exit: - - jmp _exit - - -putc: - moveb %d7,0xfffff907 -1: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq 1b - rts - - .data -env: - .long 0 - .text - diff -Nru a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_himem.S b/arch/m68knommu/platform/68VZ328/ucdimm/crt0_himem.S --- a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_himem.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1 +0,0 @@ -#include "crt0_fixed.S" diff -Nru a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_ram.S b/arch/m68knommu/platform/68VZ328/ucdimm/crt0_ram.S --- a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_ram.S 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,171 +0,0 @@ -#include - - .global __main - .global __ram_start - .global __ram_end - .global __rom_start - .global __rom_end - - .global _rambase - .global _ramstart - - .global splash_bits - .global _start - .global _stext - -#define DEBUG -#define ROM_OFFSET 0x10C00000 -#define STACK_GAURD 0x10 - - .text - -_start: -_stext: - movew #0x2700, %sr /* Exceptions off! */ - -#if 0 - /* Init chip registers. uCsimm specific */ - moveb #0x00, 0xfffffb0b /* Watchdog off */ - moveb #0x10, 0xfffff000 /* SCR */ - - movew #0x2400, 0xfffff200 /* PLLCR */ - movew #0x0123, 0xfffff202 /* PLLFSR */ - - moveb #0x00, 0xfffff40b /* enable chip select */ - moveb #0x00, 0xfffff423 /* enable /DWE */ - moveb #0x08, 0xfffffd0d /* disable hardmap */ - moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ - - movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ - movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ - - movew #0x8f00, 0xfffffc00 /* DRAM configuration */ - movew #0x9667, 0xfffffc02 /* DRAM control */ - movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ - movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ - - moveb #0x40, 0xfffff300 /* IVR */ - movel #0x007FFFFF, %d0 /* IMR */ - movel %d0, 0xfffff304 - - moveb 0xfffff42b, %d0 - andb #0xe0, %d0 - moveb %d0, 0xfffff42b - - moveb #0x08, 0xfffff907 /* Ignore CTS */ - movew #0x010b, 0xfffff902 /* BAUD to 9600 */ - movew #0xe100, 0xfffff900 /* enable */ -#endif - - movew #16384, %d0 /* PLL settle wait loop */ -L0: - subw #1, %d0 - bne L0 -#ifdef DEBUG - moveq #70, %d7 /* 'F' */ - moveb %d7,0xfffff907 /* No absolute addresses */ -pclp1: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp1 -#endif /* DEBUG */ - -#ifdef CONFIG_RELOCATE - /* Copy me to RAM */ - moveal #__rom_start, %a0 - moveal #__ram_start, %a1 - moveal #_edata, %a2 - - /* Copy %a0 to %a1 until %a1 == %a2 */ -LD1: - movel %a0@+, %d0 - movel %d0, %a1@+ - cmpal %a1, %a2 - bhi LD1 - -#ifdef DEBUG - moveq #74, %d7 /* 'J' */ - moveb %d7,0xfffff907 /* No absolute addresses */ -pclp2: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp2 -#endif /* DEBUG */ - /* jump into the RAM copy */ - jmp ram_jump -ram_jump: - -#endif /* CONFIG_RELOCATE */ - -#ifdef DEBUG - moveq #82, %d7 /* 'R' */ - moveb %d7,0xfffff907 /* No absolute addresses */ -pclp3: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp3 -#endif /* DEBUG */ - moveal #0x007ffff0, %ssp - moveal #_sbss, %a0 - moveal #_ebss, %a1 - - /* Copy 0 to %a0 until %a0 >= %a1 */ -L1: - movel #0, %a0@+ - cmpal %a0, %a1 - bhi L1 - -#ifdef DEBUG - moveq #67, %d7 /* 'C' */ - jsr putc -#endif /* DEBUG */ - - pea 0 - pea env - pea %sp@(4) - pea 0 - -#ifdef DEBUG - moveq #70, %d7 /* 'F' */ - jsr putc -#endif /* DEBUG */ - -lp: - jsr start_kernel - jmp lp -_exit: - - jmp _exit - -__main: - /* nothing */ - rts - -#ifdef DEBUG -putc: - moveb %d7,0xfffff907 -pclp: - movew 0xfffff906, %d7 - andw #0x2000, %d7 - beq pclp - rts -#endif /* DEBUG */ - - .data - -/* - * Set up the usable of RAM stuff. Size of RAM is determined then - * an initial stack set up at the end. - */ -.align 4 -_ramvec: -.long 0 -_rambase: -.long 0 -_ramstart: -.long 0 -_ramend: -.long 0 - -env: - .long 0 diff -Nru a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_rom.S b/arch/m68knommu/platform/68VZ328/ucdimm/crt0_rom.S --- a/arch/m68knommu/platform/68VZ328/ucdimm/crt0_rom.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1 +0,0 @@ -#include "crt0_fixed.S" diff -Nru a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c --- a/arch/mips/kernel/irixelf.c 2005-03-30 16:58:50 -08:00 +++ b/arch/mips/kernel/irixelf.c 2005-03-30 16:58:50 -08:00 @@ -692,7 +692,7 @@ /* Do this so that we can load the interpreter, if need be. We will * change some of these later. */ - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT); current->mm->start_stack = bprm->p; diff -Nru a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile --- a/arch/mips/lib/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/mips/lib/Makefile 2005-03-30 16:58:47 -08:00 @@ -2,7 +2,9 @@ # Makefile for MIPS-specific library files.. # -lib-y += csum_partial_copy.o dec_and_lock.o iomap.o memcpy.o promlib.o \ +lib-y += csum_partial_copy.o dec_and_lock.o memcpy.o promlib.o \ strlen_user.o strncpy_user.o strnlen_user.o + +obj-y += iomap.o EXTRA_AFLAGS := $(CFLAGS) diff -Nru a/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile --- a/arch/mips/vr41xx/common/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/mips/vr41xx/common/Makefile 2005-03-30 16:58:48 -08:00 @@ -2,7 +2,7 @@ # Makefile for common code of the NEC VR4100 series. # -obj-y += bcu.o cmu.o giu.o icu.o init.o int-handler.o ksyms.o pmu.o rtc.o +obj-y += bcu.o cmu.o giu.o icu.o init.o int-handler.o pmu.o obj-$(CONFIG_VRC4173) += vrc4173.o EXTRA_AFLAGS := $(CFLAGS) diff -Nru a/arch/mips/vr41xx/common/ksyms.c b/arch/mips/vr41xx/common/ksyms.c --- a/arch/mips/vr41xx/common/ksyms.c 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,30 +0,0 @@ -/* - * ksyms.c, Export NEC VR4100 series specific functions needed for loadable modules. - * - * Copyright (C) 2003 Yoichi Yuasa - * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include - -#include - -EXPORT_SYMBOL(vr41xx_set_rtclong1_cycle); -EXPORT_SYMBOL(vr41xx_read_rtclong1_counter); -EXPORT_SYMBOL(vr41xx_set_rtclong2_cycle); -EXPORT_SYMBOL(vr41xx_read_rtclong2_counter); -EXPORT_SYMBOL(vr41xx_set_tclock_cycle); -EXPORT_SYMBOL(vr41xx_read_tclock_counter); diff -Nru a/arch/mips/vr41xx/common/rtc.c b/arch/mips/vr41xx/common/rtc.c --- a/arch/mips/vr41xx/common/rtc.c 2005-03-30 16:58:51 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,321 +0,0 @@ -/* - * rtc.c, RTC(has only timer function) routines for NEC VR4100 series. - * - * Copyright (C) 2003-2004 Yoichi Yuasa - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include - -#include -#include -#include - -static uint32_t rtc1_base; -static uint32_t rtc2_base; - -static uint64_t previous_elapsedtime; -static unsigned int remainder_per_sec; -static unsigned int cycles_per_sec; -static unsigned int cycles_per_jiffy; -static unsigned long epoch_time; - -#define CYCLES_PER_JIFFY (CLOCK_TICK_RATE / HZ) -#define REMAINDER_PER_SEC (CLOCK_TICK_RATE - (CYCLES_PER_JIFFY * HZ)) -#define CYCLES_PER_100USEC ((CLOCK_TICK_RATE + (10000 / 2)) / 10000) - -#define ETIMELREG_TYPE1 KSEG1ADDR(0x0b0000c0) -#define TCLKLREG_TYPE1 KSEG1ADDR(0x0b0001c0) - -#define ETIMELREG_TYPE2 KSEG1ADDR(0x0f000100) -#define TCLKLREG_TYPE2 KSEG1ADDR(0x0f000120) - -/* RTC 1 registers */ -#define ETIMELREG 0x00 -#define ETIMEMREG 0x02 -#define ETIMEHREG 0x04 -/* RFU */ -#define ECMPLREG 0x08 -#define ECMPMREG 0x0a -#define ECMPHREG 0x0c -/* RFU */ -#define RTCL1LREG 0x10 -#define RTCL1HREG 0x12 -#define RTCL1CNTLREG 0x14 -#define RTCL1CNTHREG 0x16 -#define RTCL2LREG 0x18 -#define RTCL2HREG 0x1a -#define RTCL2CNTLREG 0x1c -#define RTCL2CNTHREG 0x1e - -/* RTC 2 registers */ -#define TCLKLREG 0x00 -#define TCLKHREG 0x02 -#define TCLKCNTLREG 0x04 -#define TCLKCNTHREG 0x06 -/* RFU */ -#define RTCINTREG 0x1e - #define TCLOCK_INT 0x08 - #define RTCLONG2_INT 0x04 - #define RTCLONG1_INT 0x02 - #define ELAPSEDTIME_INT 0x01 - -#define read_rtc1(offset) readw(rtc1_base + (offset)) -#define write_rtc1(val, offset) writew((val), rtc1_base + (offset)) - -#define read_rtc2(offset) readw(rtc2_base + (offset)) -#define write_rtc2(val, offset) writew((val), rtc2_base + (offset)) - -static inline uint64_t read_elapsedtime_counter(void) -{ - uint64_t first, second; - uint32_t first_mid, first_low; - uint32_t second_mid, second_low; - - do { - first_low = (uint32_t)read_rtc1(ETIMELREG); - first_mid = (uint32_t)read_rtc1(ETIMEMREG); - first = (uint64_t)read_rtc1(ETIMEHREG); - second_low = (uint32_t)read_rtc1(ETIMELREG); - second_mid = (uint32_t)read_rtc1(ETIMEMREG); - second = (uint64_t)read_rtc1(ETIMEHREG); - } while (first_low != second_low || first_mid != second_mid || - first != second); - - return (first << 32) | (uint64_t)((first_mid << 16) | first_low); -} - -static inline void write_elapsedtime_counter(uint64_t time) -{ - write_rtc1((uint16_t)time, ETIMELREG); - write_rtc1((uint16_t)(time >> 16), ETIMEMREG); - write_rtc1((uint16_t)(time >> 32), ETIMEHREG); -} - -static inline void write_elapsedtime_compare(uint64_t time) -{ - write_rtc1((uint16_t)time, ECMPLREG); - write_rtc1((uint16_t)(time >> 16), ECMPMREG); - write_rtc1((uint16_t)(time >> 32), ECMPHREG); -} - -void vr41xx_set_rtclong1_cycle(uint32_t cycles) -{ - write_rtc1((uint16_t)cycles, RTCL1LREG); - write_rtc1((uint16_t)(cycles >> 16), RTCL1HREG); -} - -uint32_t vr41xx_read_rtclong1_counter(void) -{ - uint32_t first_high, first_low; - uint32_t second_high, second_low; - - do { - first_low = (uint32_t)read_rtc1(RTCL1CNTLREG); - first_high = (uint32_t)read_rtc1(RTCL1CNTHREG); - second_low = (uint32_t)read_rtc1(RTCL1CNTLREG); - second_high = (uint32_t)read_rtc1(RTCL1CNTHREG); - } while (first_low != second_low || first_high != second_high); - - return (first_high << 16) | first_low; -} - -void vr41xx_set_rtclong2_cycle(uint32_t cycles) -{ - write_rtc1((uint16_t)cycles, RTCL2LREG); - write_rtc1((uint16_t)(cycles >> 16), RTCL2HREG); -} - -uint32_t vr41xx_read_rtclong2_counter(void) -{ - uint32_t first_high, first_low; - uint32_t second_high, second_low; - - do { - first_low = (uint32_t)read_rtc1(RTCL2CNTLREG); - first_high = (uint32_t)read_rtc1(RTCL2CNTHREG); - second_low = (uint32_t)read_rtc1(RTCL2CNTLREG); - second_high = (uint32_t)read_rtc1(RTCL2CNTHREG); - } while (first_low != second_low || first_high != second_high); - - return (first_high << 16) | first_low; -} - -void vr41xx_set_tclock_cycle(uint32_t cycles) -{ - write_rtc2((uint16_t)cycles, TCLKLREG); - write_rtc2((uint16_t)(cycles >> 16), TCLKHREG); -} - -uint32_t vr41xx_read_tclock_counter(void) -{ - uint32_t first_high, first_low; - uint32_t second_high, second_low; - - do { - first_low = (uint32_t)read_rtc2(TCLKCNTLREG); - first_high = (uint32_t)read_rtc2(TCLKCNTHREG); - second_low = (uint32_t)read_rtc2(TCLKCNTLREG); - second_high = (uint32_t)read_rtc2(TCLKCNTHREG); - } while (first_low != second_low || first_high != second_high); - - return (first_high << 16) | first_low; -} - -static void vr41xx_timer_ack(void) -{ - uint64_t cur; - - write_rtc2(ELAPSEDTIME_INT, RTCINTREG); - - previous_elapsedtime += (uint64_t)cycles_per_jiffy; - cycles_per_sec += cycles_per_jiffy; - - if (cycles_per_sec >= CLOCK_TICK_RATE) { - cycles_per_sec = 0; - remainder_per_sec = REMAINDER_PER_SEC; - } - - cycles_per_jiffy = 0; - - do { - cycles_per_jiffy += CYCLES_PER_JIFFY; - if (remainder_per_sec > 0) { - cycles_per_jiffy++; - remainder_per_sec--; - } - - cur = read_elapsedtime_counter(); - } while (cur >= previous_elapsedtime + (uint64_t)cycles_per_jiffy); - - write_elapsedtime_compare(previous_elapsedtime + (uint64_t)cycles_per_jiffy); -} - -static void vr41xx_hpt_init(unsigned int count) -{ -} - -static unsigned int vr41xx_hpt_read(void) -{ - uint64_t cur; - - cur = read_elapsedtime_counter(); - - return (unsigned int)cur; -} - -static unsigned long vr41xx_gettimeoffset(void) -{ - uint64_t cur; - unsigned long gap; - - cur = read_elapsedtime_counter(); - gap = (unsigned long)(cur - previous_elapsedtime); - gap = gap / CYCLES_PER_100USEC * 100; /* usec */ - - return gap; -} - -static unsigned long vr41xx_get_time(void) -{ - uint64_t counts; - - counts = read_elapsedtime_counter(); - counts >>= 15; - - return epoch_time + (unsigned long)counts; - -} - -static int vr41xx_set_time(unsigned long sec) -{ - if (sec < epoch_time) - return -EINVAL; - - sec -= epoch_time; - - write_elapsedtime_counter((uint64_t)sec << 15); - - return 0; -} - -void vr41xx_set_epoch_time(unsigned long time) -{ - epoch_time = time; -} - -static void __init vr41xx_time_init(void) -{ - switch (current_cpu_data.cputype) { - case CPU_VR4111: - case CPU_VR4121: - rtc1_base = ETIMELREG_TYPE1; - rtc2_base = TCLKLREG_TYPE1; - break; - case CPU_VR4122: - case CPU_VR4131: - case CPU_VR4133: - rtc1_base = ETIMELREG_TYPE2; - rtc2_base = TCLKLREG_TYPE2; - break; - default: - panic("Unexpected CPU of NEC VR4100 series"); - break; - } - - mips_timer_ack = vr41xx_timer_ack; - - mips_hpt_init = vr41xx_hpt_init; - mips_hpt_read = vr41xx_hpt_read; - mips_hpt_frequency = CLOCK_TICK_RATE; - - if (epoch_time == 0) - epoch_time = mktime(1970, 1, 1, 0, 0, 0); - - rtc_get_time = vr41xx_get_time; - rtc_set_time = vr41xx_set_time; -} - -static void __init vr41xx_timer_setup(struct irqaction *irq) -{ - do_gettimeoffset = vr41xx_gettimeoffset; - - remainder_per_sec = REMAINDER_PER_SEC; - cycles_per_jiffy = CYCLES_PER_JIFFY; - - if (remainder_per_sec > 0) { - cycles_per_jiffy++; - remainder_per_sec--; - } - - previous_elapsedtime = read_elapsedtime_counter(); - write_elapsedtime_compare(previous_elapsedtime + (uint64_t)cycles_per_jiffy); - write_rtc2(ELAPSEDTIME_INT, RTCINTREG); - - setup_irq(ELAPSEDTIME_IRQ, irq); -} - -static int __init vr41xx_rtc_init(void) -{ - board_time_init = vr41xx_time_init; - board_timer_setup = vr41xx_timer_setup; - - return 0; -} - -early_initcall(vr41xx_rtc_init); diff -Nru a/arch/ppc/8260_io/Kconfig b/arch/ppc/8260_io/Kconfig --- a/arch/ppc/8260_io/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/8260_io/Kconfig 2005-03-30 16:58:50 -08:00 @@ -42,7 +42,7 @@ choice prompt "Type of PHY" depends on 8260 && USE_MDIO - default FCC_LXT971 + default FCC_GENERIC_PHY config FCC_LXT970 bool "LXT970" @@ -53,6 +53,13 @@ config FCC_QS6612 bool "QS6612" +config FCC_DM9131 + bool "DM9131" + +config FCC_DM9161 + bool "DM9161" + +config FCC_GENERIC_PHY + bool "Generic" endchoice endmenu - diff -Nru a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c --- a/arch/ppc/8260_io/fcc_enet.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/8260_io/fcc_enet.c 2005-03-30 16:58:48 -08:00 @@ -16,6 +16,9 @@ * small packets. Since this is a cache coherent processor and CPM, * I could also preallocate SKB's and use them directly on the interface. * + * 2004-12 Leo Li (leoli@freescale.com) + * - Rework the FCC clock configuration part, make it easier to configure. + * */ #include @@ -34,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -41,6 +46,26 @@ #include #include #include +#include + +/* We can't use the PHY interrupt if we aren't using MDIO. */ +#if !defined(CONFIG_USE_MDIO) +#undef PHY_INTERRUPT +#endif + +/* If we have a PHY interrupt, we will advertise both full-duplex and half- + * duplex capabilities. If we don't have a PHY interrupt, then we will only + * advertise half-duplex capabilities. + */ +#define MII_ADVERTISE_HALF (ADVERTISE_100HALF | ADVERTISE_10HALF | \ + ADVERTISE_CSMA) +#define MII_ADVERTISE_ALL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ + MII_ADVERTISE_HALF) +#ifdef PHY_INTERRUPT +#define MII_ADVERTISE_DEFAULT MII_ADVERTISE_ALL +#else +#define MII_ADVERTISE_DEFAULT MII_ADVERTISE_HALF +#endif #include /* The transmitter timeout @@ -65,18 +90,6 @@ const phy_cmd_t *shutdown; } phy_info_t; -/* Register definitions for the PHY. */ - -#define MII_REG_CR 0 /* Control Register */ -#define MII_REG_SR 1 /* Status Register */ -#define MII_REG_PHYIR1 2 /* PHY Identification Register 1 */ -#define MII_REG_PHYIR2 3 /* PHY Identification Register 2 */ -#define MII_REG_ANAR 4 /* A-N Advertisement Register */ -#define MII_REG_ANLPAR 5 /* A-N Link Partner Ability Register */ -#define MII_REG_ANER 6 /* A-N Expansion Register */ -#define MII_REG_ANNPTR 7 /* A-N Next Page Transmit Register */ -#define MII_REG_ANLPRNPR 8 /* A-N Link Partner Received Next Page Reg. */ - /* values for phy_status */ #define PHY_CONF_ANE 0x0001 /* 1 auto-negotiation enabled */ @@ -111,13 +124,15 @@ #define TX_RING_MOD_MASK 15 /* for this to work */ /* The FCC stores dest/src/type, data, and checksum for receive packets. + * size includes support for VLAN */ -#define PKT_MAXBUF_SIZE 1518 +#define PKT_MAXBUF_SIZE 1522 #define PKT_MINBUF_SIZE 64 /* Maximum input DMA size. Must be a should(?) be a multiple of 4. -*/ -#define PKT_MAXDMA_SIZE 1520 + * size includes support for VLAN + */ +#define PKT_MAXDMA_SIZE 1524 /* Maximum input buffer size. Must be a multiple of 32. */ @@ -129,8 +144,9 @@ static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id, struct pt_regs *); static int fcc_enet_close(struct net_device *dev); static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev); -static void set_multicast_list(struct net_device *dev); +/* static void set_multicast_list(struct net_device *dev); */ static void fcc_restart(struct net_device *dev, int duplex); +static void fcc_stop(struct net_device *dev); static int fcc_enet_set_mac_address(struct net_device *dev, void *addr); /* These will be configurable for the FCC choice. @@ -141,6 +157,65 @@ * help show what pins are used for each device. */ +/* Since the CLK setting changes greatly from board to board, I changed + * it to a easy way. You just need to specify which CLK number to use. + * Note that only limited choices can be make on each port. + */ + +/* FCC1 Clock Source Configuration. There are board specific. + Can only choose from CLK9-12 */ +#ifdef CONFIG_SBC82xx +#define F1_RXCLK 9 +#define F1_TXCLK 10 +#elif defined(CONFIG_ADS8272) +#define F1_RXCLK 11 +#define F1_TXCLK 10 +#else +#define F1_RXCLK 12 +#define F1_TXCLK 11 +#endif + +/* FCC2 Clock Source Configuration. There are board specific. + Can only choose from CLK13-16 */ +#ifdef CONFIG_ADS8272 +#define F2_RXCLK 15 +#define F2_TXCLK 16 +#else +#define F2_RXCLK 13 +#define F2_TXCLK 14 +#endif + +/* FCC3 Clock Source Configuration. There are board specific. + Can only choose from CLK13-16 */ +#define F3_RXCLK 15 +#define F3_TXCLK 16 + +/* Automatically generates register configurations */ +#define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ + +#define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ +#define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ +#define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ +#define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ +#define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ +#define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ + +#define PC_F1RXCLK PC_CLK(F1_RXCLK) +#define PC_F1TXCLK PC_CLK(F1_TXCLK) +#define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) +#define CMX1_CLK_MASK ((uint)0xff000000) + +#define PC_F2RXCLK PC_CLK(F2_RXCLK) +#define PC_F2TXCLK PC_CLK(F2_TXCLK) +#define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) +#define CMX2_CLK_MASK ((uint)0x00ff0000) + +#define PC_F3RXCLK PC_CLK(F3_RXCLK) +#define PC_F3TXCLK PC_CLK(F3_TXCLK) +#define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) +#define CMX3_CLK_MASK ((uint)0x0000ff00) + + /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, * but there is little variation among the choices. */ @@ -152,30 +227,12 @@ #define PA1_RXER ((uint)0x00000020) #define PA1_TXDAT ((uint)0x00003c00) #define PA1_RXDAT ((uint)0x0003c000) -#define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) -#define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ +#define PA1_PSORA_BOUT (PA1_RXDAT | PA1_TXDAT) +#define PA1_PSORA_BIN (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ PA1_RXDV | PA1_RXER) -#define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) -#define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) +#define PA1_DIRA_BOUT (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) +#define PA1_DIRA_BIN (PA1_TXDAT | PA1_TXEN | PA1_TXER) -#ifdef CONFIG_SBC82xx -/* rx is clk9, tx is clk10 */ -#define PC_F1RXCLK ((uint)0x00000100) -#define PC_F1TXCLK ((uint)0x00000200) -#define CMX1_CLK_ROUTE ((uint)0x25000000) -#define CMX1_CLK_MASK ((uint)0xff000000) -#elif defined(CONFIG_ADS8272) -#define PC_F1RXCLK ((uint)0x00000400) -#define PC_F1TXCLK ((uint)0x00000200) -#define CMX1_CLK_ROUTE ((uint)0x36000000) -#define CMX1_CLK_MASK ((uint)0xff000000) -#else /* other boards */ -/* CLK12 is receive, CLK11 is transmit. These are board specific. */ -#define PC_F1RXCLK ((uint)0x00000800) -#define PC_F1TXCLK ((uint)0x00000400) -#define CMX1_CLK_ROUTE ((uint)0x3e000000) -#define CMX1_CLK_MASK ((uint)0xff000000) -#endif /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, * but there is little variation among the choices. @@ -188,25 +245,12 @@ #define PB2_CRS ((uint)0x00000020) #define PB2_TXDAT ((uint)0x000003c0) #define PB2_RXDAT ((uint)0x00003c00) -#define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ +#define PB2_PSORB_BOUT (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ PB2_RXER | PB2_RXDV | PB2_TXER) -#define PB2_PSORB1 (PB2_TXEN) -#define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) -#define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) +#define PB2_PSORB_BIN (PB2_TXEN) +#define PB2_DIRB_BOUT (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) +#define PB2_DIRB_BIN (PB2_TXDAT | PB2_TXEN | PB2_TXER) -/* CLK13 is receive, CLK14 is transmit. These are board dependent. -*/ -#ifdef CONFIG_ADS8272 -#define PC_F2RXCLK ((uint)0x00004000) -#define PC_F2TXCLK ((uint)0x00008000) -#define CMX2_CLK_ROUTE ((uint)0x00370000) -#define CMX2_CLK_MASK ((uint)0x00ff0000) -#else -#define PC_F2RXCLK ((uint)0x00001000) -#define PC_F2TXCLK ((uint)0x00002000) -#define CMX2_CLK_ROUTE ((uint)0x00250000) -#define CMX2_CLK_MASK ((uint)0x00ff0000) -#endif /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, * but there is little variation among the choices. @@ -217,35 +261,61 @@ #define PB3_TXEN ((uint)0x00020000) #define PB3_COL ((uint)0x00040000) #define PB3_CRS ((uint)0x00080000) +#ifndef CONFIG_RPX8260 #define PB3_TXDAT ((uint)0x0f000000) +#define PC3_TXDAT ((uint)0x00000000) +#else +#define PB3_TXDAT ((uint)0x0f000000) +#define PC3_TXDAT 0 +#endif #define PB3_RXDAT ((uint)0x00f00000) -#define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ +#define PB3_PSORB_BOUT (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) -#define PB3_PSORB1 (0) -#define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) -#define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) +#define PB3_PSORB_BIN (0) +#define PB3_DIRB_BOUT (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) +#define PB3_DIRB_BIN (PB3_TXDAT | PB3_TXEN | PB3_TXER) + +#define PC3_PSORC_BOUT (PC3_TXDAT) +#define PC3_PSORC_BIN (0) +#define PC3_DIRC_BOUT (0) +#define PC3_DIRC_BIN (PC3_TXDAT) -/* CLK15 is receive, CLK16 is transmit. These are board dependent. -*/ -#define PC_F3RXCLK ((uint)0x00004000) -#define PC_F3TXCLK ((uint)0x00008000) -#define CMX3_CLK_ROUTE ((uint)0x00003700) -#define CMX3_CLK_MASK ((uint)0x0000ff00) /* MII status/control serial interface. */ -#ifdef CONFIG_TQM8260 +#if defined(CONFIG_RPX8260) +/* The EP8260 doesn't use Port C for MDIO */ +#define PC_MDIO ((uint)0x00000000) +#define PC_MDCK ((uint)0x00000000) +#elif defined(CONFIG_TQM8260) /* TQM8260 has MDIO and MDCK on PC30 and PC31 respectively */ #define PC_MDIO ((uint)0x00000002) #define PC_MDCK ((uint)0x00000001) #elif defined(CONFIG_ADS8272) #define PC_MDIO ((uint)0x00002000) #define PC_MDCK ((uint)0x00001000) +#elif defined(CONFIG_EST8260) || defined(CONFIG_ADS8260) || defined(CONFIG_PQ2FADS) +#define PC_MDIO ((uint)0x00400000) +#define PC_MDCK ((uint)0x00200000) #else #define PC_MDIO ((uint)0x00000004) #define PC_MDCK ((uint)0x00000020) #endif +#if defined(CONFIG_USE_MDIO) && (!defined(PC_MDIO) || !defined(PC_MDCK)) +#error "Must define PC_MDIO and PC_MDCK if using MDIO" +#endif + +/* PHY addresses */ +/* default to dynamic config of phy addresses */ +#define FCC1_PHY_ADDR 0 +#ifdef CONFIG_PQ2FADS +#define FCC2_PHY_ADDR 0 +#else +#define FCC2_PHY_ADDR 2 +#endif +#define FCC3_PHY_ADDR 3 + /* A table of information for supporting FCCs. This does two things. * First, we know how many FCCs we have and they are always externally * numbered from zero. Second, it holds control register and I/O @@ -253,6 +323,7 @@ */ typedef struct fcc_info { uint fc_fccnum; + uint fc_phyaddr; uint fc_cpmblock; uint fc_cpmpage; uint fc_proff; @@ -266,33 +337,19 @@ static fcc_info_t fcc_ports[] = { #ifdef CONFIG_FCC1_ENET - { 0, CPM_CR_FCC1_SBLOCK, CPM_CR_FCC1_PAGE, PROFF_FCC1, SIU_INT_FCC1, + { 0, FCC1_PHY_ADDR, CPM_CR_FCC1_SBLOCK, CPM_CR_FCC1_PAGE, PROFF_FCC1, SIU_INT_FCC1, (PC_F1RXCLK | PC_F1TXCLK), CMX1_CLK_ROUTE, CMX1_CLK_MASK, -# if defined(CONFIG_TQM8260) || defined(CONFIG_ADS8272) PC_MDIO, PC_MDCK }, -# else - 0x00000004, 0x00000100 }, -# endif #endif #ifdef CONFIG_FCC2_ENET - { 1, CPM_CR_FCC2_SBLOCK, CPM_CR_FCC2_PAGE, PROFF_FCC2, SIU_INT_FCC2, + { 1, FCC2_PHY_ADDR, CPM_CR_FCC2_SBLOCK, CPM_CR_FCC2_PAGE, PROFF_FCC2, SIU_INT_FCC2, (PC_F2RXCLK | PC_F2TXCLK), CMX2_CLK_ROUTE, CMX2_CLK_MASK, -# if defined(CONFIG_TQM8260) || defined(CONFIG_ADS8272) PC_MDIO, PC_MDCK }, -# elif defined(CONFIG_EST8260) || defined(CONFIG_ADS8260) - 0x00400000, 0x00200000 }, -# else - 0x00000002, 0x00000080 }, -# endif #endif #ifdef CONFIG_FCC3_ENET - { 2, CPM_CR_FCC3_SBLOCK, CPM_CR_FCC3_PAGE, PROFF_FCC3, SIU_INT_FCC3, + { 2, FCC3_PHY_ADDR, CPM_CR_FCC3_SBLOCK, CPM_CR_FCC3_PAGE, PROFF_FCC3, SIU_INT_FCC3, (PC_F3RXCLK | PC_F3TXCLK), CMX3_CLK_ROUTE, CMX3_CLK_MASK, -# if defined(CONFIG_TQM8260) || defined(CONFIG_ADS8272) PC_MDIO, PC_MDCK }, -# else - 0x00000001, 0x00000040 }, -# endif #endif }; @@ -310,8 +367,6 @@ ushort skb_cur; ushort skb_dirty; - atomic_t n_pkts; /* Number of packets in tx ring */ - /* CPM dual port RAM relative addresses. */ cbd_t *rx_bd_base; /* Address of Rx and Tx buffers. */ @@ -321,7 +376,7 @@ volatile fcc_t *fccp; volatile fcc_enet_t *ep; struct net_device_stats stats; - uint tx_full; + uint tx_free; spinlock_t lock; #ifdef CONFIG_USE_MDIO @@ -329,7 +384,8 @@ uint phy_id_done; uint phy_status; phy_info_t *phy; - struct tq_struct phy_task; + struct work_struct phy_relink; + struct work_struct phy_display_config; uint sequence_done; @@ -354,14 +410,13 @@ #ifdef CONFIG_USE_MDIO static int mii_queue(struct net_device *dev, int request, void (*func)(uint, struct net_device *)); static uint mii_send_receive(fcc_info_t *fip, uint cmd); - -static void fcc_stop(struct net_device *dev); +static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c); /* Make MII read/write commands for the FCC. */ -#define mk_mii_read(REG) (0x60020000 | ((REG & 0x1f) << 18)) -#define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | \ - (VAL & 0xffff)) +#define mk_mii_read(REG) (0x60020000 | (((REG) & 0x1f) << 18)) +#define mk_mii_write(REG, VAL) (0x50020000 | (((REG) & 0x1f) << 18) | \ + ((VAL) & 0xffff)) #define mk_mii_end 0 #endif /* CONFIG_USE_MDIO */ @@ -371,20 +426,14 @@ { struct fcc_enet_private *cep = (struct fcc_enet_private *)dev->priv; volatile cbd_t *bdp; - int idx; - - if (!cep->link) { - /* Link is down or autonegotiation is in progress. */ - return 1; - } /* Fill in a Tx ring entry */ bdp = cep->cur_tx; #ifndef final_version - if (bdp->cbd_sc & BD_ENET_TX_READY) { + if (!cep->tx_free || (bdp->cbd_sc & BD_ENET_TX_READY)) { /* Ooops. All transmit buffers are full. Bail out. - * This should not happen, since cep->tx_full should be set. + * This should not happen, since the tx queue should be stopped. */ printk("%s: tx queue full!.\n", dev->name); return 1; @@ -407,21 +456,10 @@ spin_lock_irq(&cep->lock); /* Save skb pointer. */ - idx = cep->skb_cur & TX_RING_MOD_MASK; - if (cep->tx_skbuff[idx]) { - /* This should never happen (any more). - Leave the sanity check in for now... */ - printk(KERN_ERR "EEP. cep->tx_skbuff[%d] is %p not NULL in %s\n", - idx, cep->tx_skbuff[idx], __func__); - printk(KERN_ERR "Expect to lose %d bytes of sock space", - cep->tx_skbuff[idx]->truesize); - } - cep->tx_skbuff[idx] = skb; + cep->tx_skbuff[cep->skb_cur] = skb; cep->stats.tx_bytes += skb->len; - cep->skb_cur++; - - atomic_inc(&cep->n_pkts); + cep->skb_cur = (cep->skb_cur+1) & TX_RING_MOD_MASK; /* Send it on its way. Tell CPM its ready, interrupt when done, * its the last BD of the frame, and to put the CRC on the end. @@ -440,14 +478,8 @@ else bdp++; - - /* If the tx_ring is full, stop the queue */ - if (atomic_read(&cep->n_pkts) >= (TX_RING_SIZE-1)) { - if (!netif_queue_stopped(dev)) { - netif_stop_queue(dev); - cep->tx_full = 1; - } - } + if (!--cep->tx_free) + netif_stop_queue(dev); cep->cur_tx = (cbd_t *)bdp; @@ -468,8 +500,8 @@ { int i; cbd_t *bdp; - printk(" Ring data dump: cur_tx %p%s cur_rx %p.\n", - cep->cur_tx, cep->tx_full ? " (full)" : "", + printk(" Ring data dump: cur_tx %p tx_free %d cur_rx %p.\n", + cep->cur_tx, cep->tx_free, cep->cur_rx); bdp = cep->tx_bd_base; printk(" Tx @base %p :\n", bdp); @@ -487,7 +519,7 @@ bdp->cbd_bufaddr); } #endif - if (!cep->tx_full) + if (cep->tx_free) netif_wake_queue(dev); } @@ -500,16 +532,22 @@ volatile cbd_t *bdp; ushort int_events; int must_restart; - int idx; cep = (struct fcc_enet_private *)dev->priv; /* Get the interrupt events that caused us to be here. */ int_events = cep->fccp->fcc_fcce; - cep->fccp->fcc_fcce = int_events; + cep->fccp->fcc_fcce = (int_events & cep->fccp->fcc_fccm); must_restart = 0; +#ifdef PHY_INTERRUPT + /* We have to be careful here to make sure that we aren't + * interrupted by a PHY interrupt. + */ + disable_irq_nosync(PHY_INTERRUPT); +#endif + /* Handle receive event in its own function. */ if (int_events & FCC_ENET_RXF) @@ -530,7 +568,7 @@ spin_lock(&cep->lock); bdp = cep->dirty_tx; while ((bdp->cbd_sc&BD_ENET_TX_READY)==0) { - if ((bdp==cep->cur_tx) && (cep->tx_full == 0)) + if (cep->tx_free == TX_RING_SIZE) break; if (bdp->cbd_sc & BD_ENET_TX_HB) /* No heartbeat */ @@ -563,12 +601,9 @@ cep->stats.collisions++; /* Free the sk buffer associated with this last transmit. */ - idx = cep->skb_dirty & TX_RING_MOD_MASK; - dev_kfree_skb_irq(cep->tx_skbuff[idx]); - cep->tx_skbuff[idx] = NULL; - cep->skb_dirty++; - - atomic_dec(&cep->n_pkts); + dev_kfree_skb_irq(cep->tx_skbuff[cep->skb_dirty]); + cep->tx_skbuff[cep->skb_dirty] = NULL; + cep->skb_dirty = (cep->skb_dirty + 1) & TX_RING_MOD_MASK; /* Update pointer to next buffer descriptor to be transmitted. */ if (bdp->cbd_sc & BD_ENET_TX_WRAP) @@ -588,8 +623,7 @@ /* Since we have freed up a buffer, the ring is no longer * full. */ - if (cep->tx_full) { - cep->tx_full = 0; + if (!cep->tx_free++) { if (netif_queue_stopped(dev)) { netif_wake_queue(dev); } @@ -626,8 +660,13 @@ * put them. */ if (int_events & FCC_ENET_BSY) { + cep->fccp->fcc_fcce = FCC_ENET_BSY; cep->stats.rx_dropped++; } + +#ifdef PHY_INTERRUPT + enable_irq(PHY_INTERRUPT); +#endif return IRQ_HANDLED; } @@ -726,8 +765,16 @@ static int fcc_enet_close(struct net_device *dev) { - /* Don't know what to do yet. */ +#ifdef CONFIG_USE_MDIO + struct fcc_enet_private *fep = dev->priv; +#endif + netif_stop_queue(dev); + fcc_stop(dev); +#ifdef CONFIG_USE_MDIO + if (fep->phy) + mii_do_cmd(dev, fep->phy->shutdown); +#endif return 0; } @@ -784,15 +831,14 @@ s &= ~(PHY_STAT_LINK | PHY_STAT_FAULT | PHY_STAT_ANC); - if (mii_reg & 0x0004) + if (mii_reg & BMSR_LSTATUS) s |= PHY_STAT_LINK; - if (mii_reg & 0x0010) + if (mii_reg & BMSR_RFAULT) s |= PHY_STAT_FAULT; - if (mii_reg & 0x0020) + if (mii_reg & BMSR_ANEGCOMPLETE) s |= PHY_STAT_ANC; fep->phy_status = s; - fep->link = (s & PHY_STAT_LINK) ? 1 : 0; } static void mii_parse_cr(uint mii_reg, struct net_device *dev) @@ -802,9 +848,9 @@ s &= ~(PHY_CONF_ANE | PHY_CONF_LOOP); - if (mii_reg & 0x1000) + if (mii_reg & BMCR_ANENABLE) s |= PHY_CONF_ANE; - if (mii_reg & 0x4000) + if (mii_reg & BMCR_LOOPBACK) s |= PHY_CONF_LOOP; fep->phy_status = s; @@ -817,17 +863,59 @@ s &= ~(PHY_CONF_SPMASK); - if (mii_reg & 0x0020) + if (mii_reg & ADVERTISE_10HALF) s |= PHY_CONF_10HDX; - if (mii_reg & 0x0040) + if (mii_reg & ADVERTISE_10FULL) s |= PHY_CONF_10FDX; - if (mii_reg & 0x0080) + if (mii_reg & ADVERTISE_100HALF) s |= PHY_CONF_100HDX; - if (mii_reg & 0x00100) + if (mii_reg & ADVERTISE_100FULL) s |= PHY_CONF_100FDX; fep->phy_status = s; } + +/* ------------------------------------------------------------------------- */ +/* Generic PHY support. Should work for all PHYs, but does not support link + * change interrupts. + */ +#ifdef CONFIG_FCC_GENERIC_PHY + +static phy_info_t phy_info_generic = { + 0x00000000, /* 0-->match any PHY */ + "GENERIC", + + (const phy_cmd_t []) { /* config */ + /* advertise only half-duplex capabilities */ + { mk_mii_write(MII_ADVERTISE, MII_ADVERTISE_HALF), + mii_parse_anar }, + + /* enable auto-negotiation */ + { mk_mii_write(MII_BMCR, BMCR_ANENABLE), mii_parse_cr }, + { mk_mii_end, } + }, + (const phy_cmd_t []) { /* startup */ + /* restart auto-negotiation */ + { mk_mii_write(MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART), + NULL }, + { mk_mii_end, } + }, + (const phy_cmd_t []) { /* ack_int */ + /* We don't actually use the ack_int table with a generic + * PHY, but putting a reference to mii_parse_sr here keeps + * us from getting a compiler warning about unused static + * functions in the case where we only compile in generic + * PHY support. + */ + { mk_mii_read(MII_BMSR), mii_parse_sr }, + { mk_mii_end, } + }, + (const phy_cmd_t []) { /* shutdown */ + { mk_mii_end, } + }, +}; +#endif /* ifdef CONFIG_FCC_GENERIC_PHY */ + /* ------------------------------------------------------------------------- */ /* The Level one LXT970 is used by many boards */ @@ -867,26 +955,26 @@ (const phy_cmd_t []) { /* config */ #if 0 -// { mk_mii_write(MII_REG_ANAR, 0x0021), NULL }, +// { mk_mii_write(MII_ADVERTISE, 0x0021), NULL }, /* Set default operation of 100-TX....for some reason * some of these bits are set on power up, which is wrong. */ { mk_mii_write(MII_LXT970_CONFIG, 0), NULL }, #endif - { mk_mii_read(MII_REG_CR), mii_parse_cr }, - { mk_mii_read(MII_REG_ANAR), mii_parse_anar }, + { mk_mii_read(MII_BMCR), mii_parse_cr }, + { mk_mii_read(MII_ADVERTISE), mii_parse_anar }, { mk_mii_end, } }, (const phy_cmd_t []) { /* startup - enable interrupts */ { mk_mii_write(MII_LXT970_IER, 0x0002), NULL }, - { mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */ + { mk_mii_write(MII_BMCR, 0x1200), NULL }, /* autonegotiate */ { mk_mii_end, } }, (const phy_cmd_t []) { /* ack_int */ /* read SR and ISR to acknowledge */ - { mk_mii_read(MII_REG_SR), mii_parse_sr }, + { mk_mii_read(MII_BMSR), mii_parse_sr }, { mk_mii_read(MII_LXT970_ISR), NULL }, /* find out the current status */ @@ -951,30 +1039,29 @@ "LXT971", (const phy_cmd_t []) { /* config */ -// { mk_mii_write(MII_REG_ANAR, 0x021), NULL }, /* 10 Mbps, HD */ - { mk_mii_read(MII_REG_CR), mii_parse_cr }, - { mk_mii_read(MII_REG_ANAR), mii_parse_anar }, + /* configure link capabilities to advertise */ + { mk_mii_write(MII_ADVERTISE, MII_ADVERTISE_DEFAULT), + mii_parse_anar }, + + /* enable auto-negotiation */ + { mk_mii_write(MII_BMCR, BMCR_ANENABLE), mii_parse_cr }, { mk_mii_end, } }, (const phy_cmd_t []) { /* startup - enable interrupts */ { mk_mii_write(MII_LXT971_IER, 0x00f2), NULL }, - { mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */ - - /* Somehow does the 971 tell me that the link is down - * the first read after power-up. - * read here to get a valid value in ack_int */ - { mk_mii_read(MII_REG_SR), mii_parse_sr }, + /* restart auto-negotiation */ + { mk_mii_write(MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART), + NULL }, { mk_mii_end, } }, (const phy_cmd_t []) { /* ack_int */ /* find out the current status */ - - { mk_mii_read(MII_REG_SR), mii_parse_sr }, + { mk_mii_read(MII_BMSR), NULL }, + { mk_mii_read(MII_BMSR), mii_parse_sr }, { mk_mii_read(MII_LXT971_SR2), mii_parse_lxt971_sr2 }, /* we only need to read ISR to acknowledge */ - { mk_mii_read(MII_LXT971_ISR), NULL }, { mk_mii_end, } }, @@ -984,8 +1071,7 @@ }, }; -#endif /* CONFIG_FEC_LXT970 */ - +#endif /* CONFIG_FCC_LXT971 */ /* ------------------------------------------------------------------------- */ /* The Quality Semiconductor QS6612 is used on the RPX CLLF */ @@ -1023,7 +1109,7 @@ "QS6612", (const phy_cmd_t []) { /* config */ -// { mk_mii_write(MII_REG_ANAR, 0x061), NULL }, /* 10 Mbps */ +// { mk_mii_write(MII_ADVERTISE, 0x061), NULL }, /* 10 Mbps */ /* The PHY powers up isolated on the RPX, * so send a command to allow operation. @@ -1033,13 +1119,13 @@ /* parse cr and anar to get some info */ - { mk_mii_read(MII_REG_CR), mii_parse_cr }, - { mk_mii_read(MII_REG_ANAR), mii_parse_anar }, + { mk_mii_read(MII_BMCR), mii_parse_cr }, + { mk_mii_read(MII_ADVERTISE), mii_parse_anar }, { mk_mii_end, } }, (const phy_cmd_t []) { /* startup - enable interrupts */ { mk_mii_write(MII_QS6612_IMR, 0x003a), NULL }, - { mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */ + { mk_mii_write(MII_BMCR, 0x1200), NULL }, /* autonegotiate */ { mk_mii_end, } }, (const phy_cmd_t []) { /* ack_int */ @@ -1047,8 +1133,8 @@ /* we need to read ISR, SR and ANER to acknowledge */ { mk_mii_read(MII_QS6612_ISR), NULL }, - { mk_mii_read(MII_REG_SR), mii_parse_sr }, - { mk_mii_read(MII_REG_ANER), NULL }, + { mk_mii_read(MII_BMSR), mii_parse_sr }, + { mk_mii_read(MII_EXPANSION), NULL }, /* read pcr to get info */ @@ -1102,13 +1188,13 @@ (const phy_cmd_t []) { /* config */ /* parse cr and anar to get some info */ - { mk_mii_read(MII_REG_CR), mii_parse_cr }, - { mk_mii_read(MII_REG_ANAR), mii_parse_anar }, + { mk_mii_read(MII_BMCR), mii_parse_cr }, + { mk_mii_read(MII_ADVERTISE), mii_parse_anar }, { mk_mii_end, } }, (const phy_cmd_t []) { /* startup - enable interrupts */ { mk_mii_write(MII_DM9131_INTR, 0x0002), NULL }, - { mk_mii_write(MII_REG_CR, 0x1200), NULL }, /* autonegotiate */ + { mk_mii_write(MII_BMCR, 0x1200), NULL }, /* autonegotiate */ { mk_mii_end, } }, (const phy_cmd_t []) { /* ack_int */ @@ -1116,8 +1202,8 @@ /* we need to read INTR, SR and ANER to acknowledge */ { mk_mii_read(MII_DM9131_INTR), NULL }, - { mk_mii_read(MII_REG_SR), mii_parse_sr }, - { mk_mii_read(MII_REG_ANER), NULL }, + { mk_mii_read(MII_BMSR), mii_parse_sr }, + { mk_mii_read(MII_EXPANSION), NULL }, /* read acsr to get info */ @@ -1132,7 +1218,147 @@ #endif /* CONFIG_FEC_DM9131 */ +#ifdef CONFIG_FCC_DM9161 +/* ------------------------------------------------------------------------- */ +/* DM9161 Control register values */ +#define MIIM_DM9161_CR_STOP 0x0400 +#define MIIM_DM9161_CR_RSTAN 0x1200 + +#define MIIM_DM9161_SCR 0x10 +#define MIIM_DM9161_SCR_INIT 0x0610 + +/* DM9161 Specified Configuration and Status Register */ +#define MIIM_DM9161_SCSR 0x11 +#define MIIM_DM9161_SCSR_100F 0x8000 +#define MIIM_DM9161_SCSR_100H 0x4000 +#define MIIM_DM9161_SCSR_10F 0x2000 +#define MIIM_DM9161_SCSR_10H 0x1000 +/* DM9161 10BT register */ +#define MIIM_DM9161_10BTCSR 0x12 +#define MIIM_DM9161_10BTCSR_INIT 0x7800 +/* DM9161 Interrupt Register */ +#define MIIM_DM9161_INTR 0x15 +#define MIIM_DM9161_INTR_PEND 0x8000 +#define MIIM_DM9161_INTR_DPLX_MASK 0x0800 +#define MIIM_DM9161_INTR_SPD_MASK 0x0400 +#define MIIM_DM9161_INTR_LINK_MASK 0x0200 +#define MIIM_DM9161_INTR_MASK 0x0100 +#define MIIM_DM9161_INTR_DPLX_CHANGE 0x0010 +#define MIIM_DM9161_INTR_SPD_CHANGE 0x0008 +#define MIIM_DM9161_INTR_LINK_CHANGE 0x0004 +#define MIIM_DM9161_INTR_INIT 0x0000 +#define MIIM_DM9161_INTR_STOP \ +(MIIM_DM9161_INTR_DPLX_MASK | MIIM_DM9161_INTR_SPD_MASK \ + | MIIM_DM9161_INTR_LINK_MASK | MIIM_DM9161_INTR_MASK) + +static void mii_parse_dm9161_sr(uint mii_reg, struct net_device * dev) +{ + volatile struct fcc_enet_private *fep = dev->priv; + uint regstat, timeout=0xffff; + while(!(mii_reg & 0x0020) && timeout--) + { + regstat=mk_mii_read(MII_BMSR); + regstat |= fep->phy_addr <<23; + mii_reg = mii_send_receive(fep->fip,regstat); + } + + mii_parse_sr(mii_reg, dev); +} + +static void mii_parse_dm9161_scsr(uint mii_reg, struct net_device * dev) +{ + volatile struct fcc_enet_private *fep = dev->priv; + uint s = fep->phy_status; + + s &= ~(PHY_STAT_SPMASK); + switch((mii_reg >>12) & 0xf) { + case 1: + { + s |= PHY_STAT_10HDX; + printk("10BaseT Half Duplex\n"); + break; + } + case 2: + { + s |= PHY_STAT_10FDX; + printk("10BaseT Full Duplex\n"); + break; + } + case 4: + { + s |= PHY_STAT_100HDX; + printk("100BaseT Half Duplex\n"); + break; + } + case 8: + { + s |= PHY_STAT_100FDX; + printk("100BaseT Full Duplex\n"); + break; + } + } + + fep->phy_status = s; + +} + +static void mii_dm9161_wait(uint mii_reg, struct net_device *dev) +{ + int timeout = HZ; + + /* Davicom takes a bit to come up after a reset, + * so wait here for a bit */ + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(timeout); +} + +static phy_info_t phy_info_dm9161 = { + 0x00181b88, + "Davicom DM9161E", + (const phy_cmd_t[]) { /* config */ + { mk_mii_write(MII_BMCR, MIIM_DM9161_CR_STOP), NULL}, + /* Do not bypass the scrambler/descrambler */ + { mk_mii_write(MIIM_DM9161_SCR, MIIM_DM9161_SCR_INIT), NULL}, + /* Configure 10BTCSR register */ + { mk_mii_write(MIIM_DM9161_10BTCSR, MIIM_DM9161_10BTCSR_INIT),NULL}, + /* Configure some basic stuff */ + { mk_mii_write(MII_BMCR, 0x1000), NULL}, + { mk_mii_read(MII_BMCR), mii_parse_cr }, + { mk_mii_read(MII_ADVERTISE), mii_parse_anar }, + { mk_mii_end,} + }, + (const phy_cmd_t[]) { /* startup */ + /* Restart Auto Negotiation */ + { mk_mii_write(MII_BMCR, MIIM_DM9161_CR_RSTAN), NULL}, + /* Status is read once to clear old link state */ + { mk_mii_read(MII_BMSR), mii_dm9161_wait}, + /* Auto-negotiate */ + { mk_mii_read(MII_BMSR), mii_parse_dm9161_sr}, + /* Read the status */ + { mk_mii_read(MIIM_DM9161_SCSR), mii_parse_dm9161_scsr}, + /* Clear any pending interrupts */ + { mk_mii_read(MIIM_DM9161_INTR), NULL}, + /* Enable Interrupts */ + { mk_mii_write(MIIM_DM9161_INTR, MIIM_DM9161_INTR_INIT), NULL}, + { mk_mii_end,} + }, + (const phy_cmd_t[]) { /* ack_int */ + { mk_mii_read(MIIM_DM9161_INTR), NULL}, +#if 0 + { mk_mii_read(MII_BMSR), NULL}, + { mk_mii_read(MII_BMSR), mii_parse_dm9161_sr}, + { mk_mii_read(MIIM_DM9161_SCSR), mii_parse_dm9161_scsr}, +#endif + { mk_mii_end,} + }, + (const phy_cmd_t[]) { /* shutdown */ + { mk_mii_read(MIIM_DM9161_INTR),NULL}, + { mk_mii_write(MIIM_DM9161_INTR, MIIM_DM9161_INTR_STOP), NULL}, + { mk_mii_end,} + }, +}; +#endif /* CONFIG_FCC_DM9161 */ static phy_info_t *phy_info[] = { @@ -1152,11 +1378,24 @@ &phy_info_dm9131, #endif /* CONFIG_FEC_DM9131 */ +#ifdef CONFIG_FCC_DM9161 + &phy_info_dm9161, +#endif /* CONFIG_FCC_DM9161 */ + +#ifdef CONFIG_FCC_GENERIC_PHY + /* Generic PHY support. This must be the last PHY in the table. + * It will be used to support any PHY that doesn't match a previous + * entry in the table. + */ + &phy_info_generic, +#endif /* CONFIG_FCC_GENERIC_PHY */ + NULL }; -static void mii_display_status(struct net_device *dev) +static void mii_display_status(void *data) { + struct net_device *dev = data; volatile struct fcc_enet_private *fep = dev->priv; uint s = fep->phy_status; @@ -1191,8 +1430,9 @@ printk(".\n"); } -static void mii_display_config(struct net_device *dev) +static void mii_display_config(void *data) { + struct net_device *dev = data; volatile struct fcc_enet_private *fep = dev->priv; uint s = fep->phy_status; @@ -1225,20 +1465,23 @@ static void mii_relink(struct net_device *dev) { struct fcc_enet_private *fep = dev->priv; - int duplex; + int duplex = 0; - fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0; - mii_display_status(dev); fep->old_link = fep->link; + fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0; + +#ifdef MDIO_DEBUG + printk(" mii_relink: link=%d\n", fep->link); +#endif if (fep->link) { - duplex = 0; if (fep->phy_status & (PHY_STAT_100FDX | PHY_STAT_10FDX)) duplex = 1; fcc_restart(dev, duplex); - } else { - fcc_stop(dev); +#ifdef MDIO_DEBUG + printk(" mii_relink: duplex=%d\n", duplex); +#endif } } @@ -1246,25 +1489,21 @@ { struct fcc_enet_private *fep = dev->priv; - fep->phy_task.routine = (void *)mii_relink; - fep->phy_task.data = dev; - schedule_task(&fep->phy_task); + mii_relink(dev); + + schedule_work(&fep->phy_relink); } static void mii_queue_config(uint mii_reg, struct net_device *dev) { struct fcc_enet_private *fep = dev->priv; - fep->phy_task.routine = (void *)mii_display_config; - fep->phy_task.data = dev; - schedule_task(&fep->phy_task); + schedule_work(&fep->phy_display_config); } - - -phy_cmd_t phy_cmd_relink[] = { { mk_mii_read(MII_REG_CR), mii_queue_relink }, +phy_cmd_t phy_cmd_relink[] = { { mk_mii_read(MII_BMCR), mii_queue_relink }, { mk_mii_end, } }; -phy_cmd_t phy_cmd_config[] = { { mk_mii_read(MII_REG_CR), mii_queue_config }, +phy_cmd_t phy_cmd_config[] = { { mk_mii_read(MII_BMCR), mii_queue_config }, { mk_mii_end, } }; @@ -1277,10 +1516,11 @@ int i; fep = dev->priv; + printk("mii_reg: %08x\n", mii_reg); fep->phy_id |= (mii_reg & 0xffff); for(i = 0; phy_info[i]; i++) - if(phy_info[i]->id == (fep->phy_id >> 4)) + if((phy_info[i]->id == (fep->phy_id >> 4)) || !phy_info[i]->id) break; if(!phy_info[i]) @@ -1288,6 +1528,7 @@ dev->name, fep->phy_id); fep->phy = phy_info[i]; + fep->phy_id_done = 1; printk("%s: Phy @ 0x%x, type %s (0x%08x)\n", dev->name, fep->phy_addr, fep->phy->name, fep->phy_id); @@ -1304,36 +1545,49 @@ fep = dev->priv; - if ((phytype = (mii_reg & 0xfff)) != 0xfff) { + if ((phytype = (mii_reg & 0xffff)) != 0xffff) { /* Got first part of ID, now get remainder. */ fep->phy_id = phytype << 16; - mii_queue(dev, mk_mii_read(MII_REG_PHYIR2), mii_discover_phy3); + mii_queue(dev, mk_mii_read(MII_PHYSID2), mii_discover_phy3); } else { fep->phy_addr++; if (fep->phy_addr < 32) { - mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), + mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy); } else { printk("fec: No PHY device found.\n"); } } } +#endif /* CONFIG_USE_MDIO */ +#ifdef PHY_INTERRUPT /* This interrupt occurs when the PHY detects a link change. */ static irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; struct fcc_enet_private *fep = dev->priv; + fcc_info_t *fip = fep->fip; - mii_do_cmd(dev, fep->phy->ack_int); - mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */ + if (fep->phy) { + /* We don't want to be interrupted by an FCC + * interrupt here. + */ + disable_irq_nosync(fip->fc_interrupt); + + mii_do_cmd(dev, fep->phy->ack_int); + /* restart and display status */ + mii_do_cmd(dev, phy_cmd_relink); + + enable_irq(fip->fc_interrupt); + } return IRQ_HANDLED; } +#endif /* ifdef PHY_INTERRUPT */ -#endif /* CONFIG_USE_MDIO */ - +#if 0 /* This should be fixed someday */ /* Set or clear the multicast filter for this adaptor. * Skeleton taken from sunlance driver. * The CPM Ethernet implementation allows Multicast as well as individual @@ -1383,8 +1637,8 @@ dmi = dev->mc_list; - for (i=0; imc_count; i++) { - + for (i=0; imc_count; i++, dmi = dmi->next) { + /* Only support group multicast for now. */ if (!(dmi->dmi_addr[0] & 1)) @@ -1411,6 +1665,7 @@ } } } +#endif /* if 0 */ /* Set the individual MAC address. @@ -1482,7 +1737,7 @@ dev->watchdog_timeo = TX_TIMEOUT; dev->stop = fcc_enet_close; dev->get_stats = fcc_enet_get_stats; - dev->set_multicast_list = set_multicast_list; + /* dev->set_multicast_list = set_multicast_list; */ dev->set_mac_address = fcc_enet_set_mac_address; init_fcc_startup(fip, dev); @@ -1502,8 +1757,11 @@ /* Queue up command to detect the PHY and initialize the * remainder of the interface. */ - cep->phy_addr = 0; - mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy); + cep->phy_id_done = 0; + cep->phy_addr = fip->fc_phyaddr; + mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy); + INIT_WORK(&cep->phy_relink, mii_display_status, dev); + INIT_WORK(&cep->phy_display_config, mii_display_config, dev); #endif /* CONFIG_USE_MDIO */ fip++; @@ -1549,29 +1807,36 @@ if (fip->fc_proff == PROFF_FCC1) { /* Configure port A and C pins for FCC1 Ethernet. */ - io->iop_pdira &= ~PA1_DIRA0; - io->iop_pdira |= PA1_DIRA1; - io->iop_psora &= ~PA1_PSORA0; - io->iop_psora |= PA1_PSORA1; - io->iop_ppara |= (PA1_DIRA0 | PA1_DIRA1); + io->iop_pdira &= ~PA1_DIRA_BOUT; + io->iop_pdira |= PA1_DIRA_BIN; + io->iop_psora &= ~PA1_PSORA_BOUT; + io->iop_psora |= PA1_PSORA_BIN; + io->iop_ppara |= (PA1_DIRA_BOUT | PA1_DIRA_BIN); } if (fip->fc_proff == PROFF_FCC2) { /* Configure port B and C pins for FCC Ethernet. */ - io->iop_pdirb &= ~PB2_DIRB0; - io->iop_pdirb |= PB2_DIRB1; - io->iop_psorb &= ~PB2_PSORB0; - io->iop_psorb |= PB2_PSORB1; - io->iop_pparb |= (PB2_DIRB0 | PB2_DIRB1); + io->iop_pdirb &= ~PB2_DIRB_BOUT; + io->iop_pdirb |= PB2_DIRB_BIN; + io->iop_psorb &= ~PB2_PSORB_BOUT; + io->iop_psorb |= PB2_PSORB_BIN; + io->iop_pparb |= (PB2_DIRB_BOUT | PB2_DIRB_BIN); } if (fip->fc_proff == PROFF_FCC3) { /* Configure port B and C pins for FCC Ethernet. */ - io->iop_pdirb &= ~PB3_DIRB0; - io->iop_pdirb |= PB3_DIRB1; - io->iop_psorb &= ~PB3_PSORB0; - io->iop_psorb |= PB3_PSORB1; - io->iop_pparb |= (PB3_DIRB0 | PB3_DIRB1); + io->iop_pdirb &= ~PB3_DIRB_BOUT; + io->iop_pdirb |= PB3_DIRB_BIN; + io->iop_psorb &= ~PB3_PSORB_BOUT; + io->iop_psorb |= PB3_PSORB_BIN; + io->iop_pparb |= (PB3_DIRB_BOUT | PB3_DIRB_BIN); + + io->iop_pdirc &= ~PC3_DIRC_BOUT; + io->iop_pdirc |= PC3_DIRC_BIN; + io->iop_psorc &= ~PC3_PSORC_BOUT; + io->iop_psorc |= PC3_PSORC_BIN; + io->iop_pparc |= (PC3_DIRC_BOUT | PC3_DIRC_BIN); + } /* Port C has clocks...... @@ -1699,6 +1964,11 @@ */ eap = (unsigned char *)&(ep->fen_paddrh); for (i=5; i>=0; i--) { + +/* + * The EP8260 only uses FCC3, so we can safely give it the real + * MAC address. + */ #ifdef CONFIG_SBC82xx if (i == 5) { /* bd->bi_enetaddr holds the SCC0 address; the FCC @@ -1708,15 +1978,17 @@ *eap++ = dev->dev_addr[i]; } #else +#ifndef CONFIG_RPX8260 if (i == 3) { dev->dev_addr[i] = bd->bi_enetaddr[i]; dev->dev_addr[i] |= (1 << (7 - fip->fc_fccnum)); *eap++ = dev->dev_addr[i]; - } + } else #endif - else { + { *eap++ = dev->dev_addr[i] = bd->bi_enetaddr[i]; } +#endif } ep->fen_taddrh = 0; @@ -1798,7 +2070,6 @@ while (cp->cp_cpcr & CPM_CR_FLG); cep->skb_cur = cep->skb_dirty = 0; - atomic_set(&cep->n_pkts, 0); } /* Let 'er rip. @@ -1812,25 +2083,56 @@ cep = (struct fcc_enet_private *)(dev->priv); fccp = cep->fccp; +#ifdef CONFIG_RPX8260 +#ifdef PHY_INTERRUPT + /* Route PHY interrupt to IRQ. The following code only works for + * IRQ1 - IRQ7. It does not work for Port C interrupts. + */ + *((volatile u_char *) (RPX_CSR_ADDR + 13)) &= ~BCSR13_FETH_IRQMASK; + *((volatile u_char *) (RPX_CSR_ADDR + 13)) |= + ((PHY_INTERRUPT - SIU_INT_IRQ1 + 1) << 4); +#endif + /* Initialize MDIO pins. */ + *((volatile u_char *) (RPX_CSR_ADDR + 4)) &= ~BCSR4_MII_MDC; + *((volatile u_char *) (RPX_CSR_ADDR + 4)) |= + BCSR4_MII_READ | BCSR4_MII_MDIO; + /* Enable external LXT971 PHY. */ + *((volatile u_char *) (RPX_CSR_ADDR + 4)) |= BCSR4_EN_PHY; + udelay(1000); + *((volatile u_char *) (RPX_CSR_ADDR+ 4)) |= BCSR4_EN_MII; + udelay(1000); +#endif /* ifdef CONFIG_RPX8260 */ + fccp->fcc_fcce = 0xffff; /* Clear any pending events */ - /* Enable interrupts for transmit error, complete frame - * received, and any transmit buffer we have also set the - * interrupt flag. + /* Leave FCC interrupts masked for now. Will be unmasked by + * fcc_restart(). */ - fccp->fcc_fccm = (FCC_ENET_TXE | FCC_ENET_RXF | FCC_ENET_TXB); + fccp->fcc_fccm = 0; /* Install our interrupt handler. */ - if (request_irq(fip->fc_interrupt, fcc_enet_interrupt, 0, - "fenet", dev) < 0) + if (request_irq(fip->fc_interrupt, fcc_enet_interrupt, 0, "fenet", + dev) < 0) printk("Can't get FCC IRQ %d\n", fip->fc_interrupt); -#ifdef CONFIG_USE_MDIO +#ifdef PHY_INTERRUPT +#ifdef CONFIG_ADS8272 + if (request_irq(PHY_INTERRUPT, mii_link_interrupt, SA_SHIRQ, + "mii", dev) < 0) + printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT); +#else + /* Make IRQn edge triggered. This does not work if PHY_INTERRUPT is + * on Port C. + */ + ((volatile cpm2_map_t *) CPM_MAP_ADDR)->im_intctl.ic_siexr |= + (1 << (14 - (PHY_INTERRUPT - SIU_INT_IRQ1))); + if (request_irq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) < 0) - printk("Can't get MII IRQ %d\n", fip->fc_interrupt); -#endif /* CONFIG_USE_MDIO */ + printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT); +#endif +#endif /* PHY_INTERRUPT */ /* Set GFMR to enable Ethernet operating mode. */ @@ -1847,10 +2149,14 @@ fccp->fcc_fpsmr = FCC_PSMR_ENCRC; #ifdef CONFIG_PQ2ADS - /* Enable the PHY. - */ - *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_FETHIEN; - *(volatile uint *)(BCSR_ADDR + 4) |= BCSR1_FETH_RST; + /* Enable the PHY. */ + *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_FETHIEN; + *(volatile uint *)(BCSR_ADDR + 4) |= BCSR1_FETH_RST; +#endif +#if defined(CONFIG_PQ2ADS) || defined(CONFIG_PQ2FADS) + /* Enable the 2nd PHY. */ + *(volatile uint *)(BCSR_ADDR + 12) &= ~BCSR3_FETHIEN2; + *(volatile uint *)(BCSR_ADDR + 12) |= BCSR3_FETH2_RST; #endif #if defined(CONFIG_USE_MDIO) || defined(CONFIG_TQM8260) @@ -1872,54 +2178,74 @@ * I wonder what "they" were thinking (maybe weren't) when they leave * the I2C in the CPM but I have to toggle these bits...... */ - -#define FCC_PDATC_MDIO(bit) \ - if (bit) \ - io->iop_pdatc |= fip->fc_mdio; \ - else \ - io->iop_pdatc &= ~fip->fc_mdio; - -#define FCC_PDATC_MDC(bit) \ - if (bit) \ - io->iop_pdatc |= fip->fc_mdck; \ - else \ - io->iop_pdatc &= ~fip->fc_mdck; +#ifdef CONFIG_RPX8260 + /* The EP8260 has the MDIO pins in a BCSR instead of on Port C + * like most other boards. + */ +#define MDIO_ADDR ((volatile u_char *)(RPX_CSR_ADDR + 4)) +#define MAKE_MDIO_OUTPUT *MDIO_ADDR &= ~BCSR4_MII_READ +#define MAKE_MDIO_INPUT *MDIO_ADDR |= BCSR4_MII_READ | BCSR4_MII_MDIO +#define OUT_MDIO(bit) \ + if (bit) \ + *MDIO_ADDR |= BCSR4_MII_MDIO; \ + else \ + *MDIO_ADDR &= ~BCSR4_MII_MDIO; +#define IN_MDIO (*MDIO_ADDR & BCSR4_MII_MDIO) +#define OUT_MDC(bit) \ + if (bit) \ + *MDIO_ADDR |= BCSR4_MII_MDC; \ + else \ + *MDIO_ADDR &= ~BCSR4_MII_MDC; +#else /* ifdef CONFIG_RPX8260 */ + /* This is for the usual case where the MDIO pins are on Port C. + */ +#define MDIO_ADDR (((volatile cpm2_map_t *)CPM_MAP_ADDR)->im_ioport) +#define MAKE_MDIO_OUTPUT MDIO_ADDR.iop_pdirc |= fip->fc_mdio +#define MAKE_MDIO_INPUT MDIO_ADDR.iop_pdirc &= ~fip->fc_mdio +#define OUT_MDIO(bit) \ + if (bit) \ + MDIO_ADDR.iop_pdatc |= fip->fc_mdio; \ + else \ + MDIO_ADDR.iop_pdatc &= ~fip->fc_mdio; +#define IN_MDIO ((MDIO_ADDR.iop_pdatc) & fip->fc_mdio) +#define OUT_MDC(bit) \ + if (bit) \ + MDIO_ADDR.iop_pdatc |= fip->fc_mdck; \ + else \ + MDIO_ADDR.iop_pdatc &= ~fip->fc_mdck; +#endif /* ifdef CONFIG_RPX8260 */ static uint mii_send_receive(fcc_info_t *fip, uint cmd) { uint retval; int read_op, i, off; - volatile cpm2_map_t *immap; - volatile iop_cpm2_t *io; - - immap = (cpm2_map_t *)CPM_MAP_ADDR; - io = &immap->im_ioport; - - io->iop_pdirc |= (fip->fc_mdio | fip->fc_mdck); + const int us = 1; read_op = ((cmd & 0xf0000000) == 0x60000000); /* Write preamble */ + OUT_MDIO(1); + MAKE_MDIO_OUTPUT; + OUT_MDIO(1); for (i = 0; i < 32; i++) { - FCC_PDATC_MDC(0); - FCC_PDATC_MDIO(1); - udelay(1); - FCC_PDATC_MDC(1); - udelay(1); + udelay(us); + OUT_MDC(1); + udelay(us); + OUT_MDC(0); } /* Write data */ for (i = 0, off = 31; i < (read_op ? 14 : 32); i++, --off) { - FCC_PDATC_MDC(0); - FCC_PDATC_MDIO((cmd >> off) & 0x00000001); - udelay(1); - FCC_PDATC_MDC(1); - udelay(1); + OUT_MDIO((cmd >> off) & 0x00000001); + udelay(us); + OUT_MDC(1); + udelay(us); + OUT_MDC(0); } retval = cmd; @@ -1928,68 +2254,111 @@ { retval >>= 16; - FCC_PDATC_MDC(0); - io->iop_pdirc &= ~fip->fc_mdio; - udelay(1); - FCC_PDATC_MDC(1); - udelay(1); - FCC_PDATC_MDC(0); - udelay(1); + MAKE_MDIO_INPUT; + udelay(us); + OUT_MDC(1); + udelay(us); + OUT_MDC(0); - for (i = 0, off = 15; i < 16; i++, off--) + for (i = 0; i < 16; i++) { - FCC_PDATC_MDC(1); + udelay(us); + OUT_MDC(1); + udelay(us); retval <<= 1; - if (io->iop_pdatc & fip->fc_mdio) + if (IN_MDIO) retval++; - udelay(1); - FCC_PDATC_MDC(0); - udelay(1); + OUT_MDC(0); } } - io->iop_pdirc |= (fip->fc_mdio | fip->fc_mdck); - - for (i = 0; i < 32; i++) - { - FCC_PDATC_MDC(0); - FCC_PDATC_MDIO(1); - udelay(1); - FCC_PDATC_MDC(1); - udelay(1); - } + MAKE_MDIO_INPUT; + udelay(us); + OUT_MDC(1); + udelay(us); + OUT_MDC(0); return retval; } +#endif /* CONFIG_USE_MDIO */ static void fcc_stop(struct net_device *dev) { - volatile fcc_t *fccp; - struct fcc_enet_private *fcp; + struct fcc_enet_private *fep= (struct fcc_enet_private *)(dev->priv); + volatile fcc_t *fccp = fep->fccp; + fcc_info_t *fip = fep->fip; + volatile fcc_enet_t *ep = fep->ep; + volatile cpm_cpm2_t *cp = cpmp; + volatile cbd_t *bdp; + int i; + + if ((fccp->fcc_gfmr & (FCC_GFMR_ENR | FCC_GFMR_ENT)) == 0) + return; /* already down */ - fcp = (struct fcc_enet_private *)(dev->priv); - fccp = fcp->fccp; + fccp->fcc_fccm = 0; + + /* issue the graceful stop tx command */ + while (cp->cp_cpcr & CPM_CR_FLG); + cp->cp_cpcr = mk_cr_cmd(fip->fc_cpmpage, fip->fc_cpmblock, + 0x0c, CPM_CR_GRA_STOP_TX) | CPM_CR_FLG; + while (cp->cp_cpcr & CPM_CR_FLG); /* Disable transmit/receive */ fccp->fcc_gfmr &= ~(FCC_GFMR_ENR | FCC_GFMR_ENT); + + /* issue the restart tx command */ + fccp->fcc_fcce = FCC_ENET_GRA; + while (cp->cp_cpcr & CPM_CR_FLG); + cp->cp_cpcr = mk_cr_cmd(fip->fc_cpmpage, fip->fc_cpmblock, + 0x0c, CPM_CR_RESTART_TX) | CPM_CR_FLG; + while (cp->cp_cpcr & CPM_CR_FLG); + + /* free tx buffers */ + fep->skb_cur = fep->skb_dirty = 0; + for (i=0; i<=TX_RING_MOD_MASK; i++) { + if (fep->tx_skbuff[i] != NULL) { + dev_kfree_skb(fep->tx_skbuff[i]); + fep->tx_skbuff[i] = NULL; + } + } + fep->dirty_tx = fep->cur_tx = fep->tx_bd_base; + fep->tx_free = TX_RING_SIZE; + ep->fen_genfcc.fcc_tbptr = ep->fen_genfcc.fcc_tbase; + + /* Initialize the tx buffer descriptors. */ + bdp = fep->tx_bd_base; + for (i=0; icbd_sc = 0; + bdp->cbd_datlen = 0; + bdp->cbd_bufaddr = 0; + bdp++; + } + /* Set the last buffer to wrap. */ + bdp--; + bdp->cbd_sc |= BD_SC_WRAP; } -#endif /* CONFIG_USE_MDIO */ static void fcc_restart(struct net_device *dev, int duplex) { - volatile fcc_t *fccp; - struct fcc_enet_private *fcp; + struct fcc_enet_private *fep = (struct fcc_enet_private *)(dev->priv); + volatile fcc_t *fccp = fep->fccp; - fcp = (struct fcc_enet_private *)(dev->priv); - fccp = fcp->fccp; + /* stop any transmissions in progress */ + fcc_stop(dev); if (duplex) fccp->fcc_fpsmr |= FCC_PSMR_FDE | FCC_PSMR_LPB; else fccp->fcc_fpsmr &= ~(FCC_PSMR_FDE | FCC_PSMR_LPB); + /* Enable interrupts for transmit error, complete frame + * received, and any transmit buffer we have also set the + * interrupt flag. + */ + fccp->fcc_fccm = (FCC_ENET_TXE | FCC_ENET_RXF | FCC_ENET_TXB); + /* Enable transmit/receive */ fccp->fcc_gfmr |= FCC_GFMR_ENR | FCC_GFMR_ENT; } @@ -2004,6 +2373,7 @@ fep->link = 0; if (fep->phy) { + fcc_restart(dev, 0); /* always start in half-duplex */ mii_do_cmd(dev, fep->phy->ack_int); mii_do_cmd(dev, fep->phy->config); mii_do_cmd(dev, phy_cmd_config); /* display configuration */ @@ -2017,6 +2387,7 @@ return -ENODEV; /* No PHY we understand */ #else fep->link = 1; + fcc_restart(dev, 0); /* always start in half-duplex */ netif_start_queue(dev); return 0; /* Always succeed */ #endif /* CONFIG_USE_MDIO */ diff -Nru a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c --- a/arch/ppc/8xx_io/cs4218_tdm.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/8xx_io/cs4218_tdm.c 2005-03-30 16:58:47 -08:00 @@ -55,7 +55,7 @@ static char **sound_buffers = NULL; static char **sound_read_buffers = NULL; -static spinlock_t cs4218_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(cs4218_lock); /* Local copies of things we put in the control register. Output * volume, like most codecs is really attenuation. diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/Kconfig 2005-03-30 16:58:50 -08:00 @@ -538,6 +538,17 @@ config SPRUCE bool "IBM-Spruce" +config HDPU + bool "Sky-HDPU" + help + Select HDPU if configuring a Sky Computers Compute Blade. + +config HDPU_FEATURES + depends HDPU + tristate "HDPU-Features" + help + Select to enable HDPU enhanced features. + config EV64260 bool "Marvell-EV64260BP" help @@ -570,7 +581,6 @@ config RADSTONE_PPC7D bool "Radstone Technology PPC7D board" - select MV64360 config ADIR bool "SBS-Adirondack" @@ -733,7 +743,7 @@ depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || \ PRPMC750 || K2 || PRPMC800 || LOPEC || \ (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D || \ - MPC834x_SYS + 83xx default y config FORCE @@ -746,16 +756,11 @@ depends on EV64260 || CPCI690 default y -config MV64360 +config MV64360 # Really MV64360 & MV64460 bool - depends on KATANA || RADSTONE_PPC7D + depends on CHESTNUT || KATANA || RADSTONE_PPC7D || HDPU default y -config MV64360 - bool - depends on CHESTNUT - default y - config MV64X60 bool depends on (GT64260 || MV64360) @@ -1099,7 +1104,7 @@ bool config PCI - bool "PCI support" if 40x || CPM2 || 83xx || 85xx + bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS default PCI_QSPAN if !4xx && !CPM2 && 8xx diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/boot/simple/Makefile 2005-03-30 16:58:47 -08:00 @@ -49,7 +49,7 @@ #---------------------------------------------------------------------------- zimage-$(CONFIG_CPCI690) := zImage-STRIPELF zimageinitrd-$(CONFIG_CPCI690) := zImage.initrd-STRIPELF - extra.o-$(CONFIG_CPCI690) := misc-cpci690.o mv64x60_stub.o + extra.o-$(CONFIG_CPCI690) := misc-cpci690.o end-$(CONFIG_CPCI690) := cpci690 cacheflag-$(CONFIG_CPCI690) := -include $(clear_L2_L3) @@ -94,11 +94,11 @@ end-$(CONFIG_K2) := k2 cacheflag-$(CONFIG_K2) := -include $(clear_L2_L3) - extra.o-$(CONFIG_KATANA) := misc-katana.o mv64x60_stub.o + extra.o-$(CONFIG_KATANA) := misc-katana.o end-$(CONFIG_KATANA) := katana cacheflag-$(CONFIG_KATANA) := -include $(clear_L2_L3) - extra.o-$(CONFIG_RADSTONE_PPC7D) := misc-radstone_ppc7d.o mv64x60_stub.o + extra.o-$(CONFIG_RADSTONE_PPC7D) := misc-radstone_ppc7d.o end-$(CONFIG_RADSTONE_PPC7D) := radstone_ppc7d cacheflag-$(CONFIG_RADSTONE_PPC7D) := -include $(clear_L2_L3) diff -Nru a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S --- a/arch/ppc/boot/simple/head.S 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/boot/simple/head.S 2005-03-30 16:58:49 -08:00 @@ -135,11 +135,6 @@ */ #endif -#ifdef CONFIG_MV64X60 - /* mv64x60 specific hook to do things like moving register base, etc. */ - bl mv64x60_init -#endif - /* Get the load address. */ subi r3, r3, 4 /* Get the actual IP, not NIP */ diff -Nru a/arch/ppc/boot/simple/m8260_tty.c b/arch/ppc/boot/simple/m8260_tty.c --- a/arch/ppc/boot/simple/m8260_tty.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/boot/simple/m8260_tty.c 2005-03-30 16:58:48 -08:00 @@ -159,7 +159,7 @@ sccp->scc_sccm = 0; sccp->scc_scce = 0xffff; sccp->scc_dsr = 0x7e7e; - sccp->scc_pmsr = 0x3000; + sccp->scc_psmr = 0x3000; /* Wire BRG1 to SCC1. The console driver will take care of * others. diff -Nru a/arch/ppc/boot/simple/misc-chestnut.S b/arch/ppc/boot/simple/misc-chestnut.S --- a/arch/ppc/boot/simple/misc-chestnut.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,41 +0,0 @@ -/* - * arch/ppc/boot/simple/misc-chestnut.S - * - * Setup for the IBM Chestnut (ibm-750fxgx_eval) - * - * Author: - * - * <2004> (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - - -#include -#include -#include - - .globl mv64x60_board_init -mv64x60_board_init: - /* - * move UART to 0xffc00000 - */ - - li r23,16 - - addis r25,0,CONFIG_MV64X60_BASE@h - ori r25,r25,MV64x60_CPU2DEV_2_BASE - addis r26,0,CHESTNUT_UART_BASE@h - srw r26,r26,r23 - stwbrx r26,0,(r25) - sync - - addis r25,0,CONFIG_MV64X60_BASE@h - ori r25,r25,MV64x60_CPU2DEV_2_SIZE - addis r26,0,0x00100000@h - srw r26,r26,r23 - stwbrx r26,0,(r25) - sync - - blr diff -Nru a/arch/ppc/boot/simple/misc-chestnut.c b/arch/ppc/boot/simple/misc-chestnut.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/misc-chestnut.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,35 @@ +/* + * arch/ppc/boot/simple/misc-chestnut.c + * + * Setup for the IBM Chestnut (ibm-750fxgx_eval) + * + * Author: Mark A. Greer + * + * 2005 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include + +/* Not in the kernel so won't include kernel.h to get its 'max' definition */ +#define max(a,b) (((a) > (b)) ? (a) : (b)) + +void +mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) +{ +#ifdef CONFIG_SERIAL_8250_CONSOLE + /* + * Change device bus 2 window so that bootoader can do I/O thru + * 8250/16550 UART that's mapped in that window. + */ + out_le32(new_base + MV64x60_CPU2DEV_2_BASE, CHESTNUT_UART_BASE >> 16); + out_le32(new_base + MV64x60_CPU2DEV_2_SIZE, CHESTNUT_UART_SIZE >> 16); + __asm__ __volatile__("sync"); +#endif +} diff -Nru a/arch/ppc/boot/simple/misc-cpci690.c b/arch/ppc/boot/simple/misc-cpci690.c --- a/arch/ppc/boot/simple/misc-cpci690.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/boot/simple/misc-cpci690.c 2005-03-30 16:58:47 -08:00 @@ -12,4 +12,16 @@ */ #include -long mv64x60_mpsc_clk_freq = 133000000; +#include + +extern u32 mv64x60_console_baud; +extern u32 mv64x60_mpsc_clk_src; +extern u32 mv64x60_mpsc_clk_freq; + +void +mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) +{ + mv64x60_console_baud = CPCI690_MPSC_BAUD; + mv64x60_mpsc_clk_src = CPCI690_MPSC_CLK_SRC; + mv64x60_mpsc_clk_freq = CPCI690_BUS_FREQ; +} diff -Nru a/arch/ppc/boot/simple/misc-ev64260.S b/arch/ppc/boot/simple/misc-ev64260.S --- a/arch/ppc/boot/simple/misc-ev64260.S 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,68 +0,0 @@ -/* - * arch/ppc/boot/simple/misc-ev64260.S - * - * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board - * with a GT64260 onboard. - * - * Author: Mark Greer - * - * 2001 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include - - .globl mv64x60_board_init -mv64x60_board_init: - /* DINK doesn't enable 745x timebase, so enable here (Adrian Cox) */ - mfspr r25,SPRN_PVR - srwi r25,r25,16 - cmplwi r25,(PVR_7450 >> 16) - bne 1f - mfspr r25,SPRN_HID0 - oris r25,r25,(HID0_TBEN >> 16) - mtspr SPRN_HID0,r25 -1: -#if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE) - li r23,20 - - /* - * Change the CS2 window for the UART so that the bootloader - * can do I/O thru the UARTs. - */ - addis r25,0,CONFIG_MV64X60_NEW_BASE@h - ori r25,r25,MV64x60_CPU2DEV_2_BASE - addis r26,0,EV64260_UART_BASE@h - srw r26,r26,r23 - stwbrx r26,0,(r25) - sync - - addis r25,0,CONFIG_MV64X60_NEW_BASE@h - ori r25,r25,MV64x60_CPU2DEV_2_SIZE - addis r26,0,EV64260_UART_END@h - srw r26,r26,r23 - stwbrx r26,0,(r25) - sync -#endif - blr - -#if defined(CONFIG_SERIAL_MPSC_CONSOLE) -.data - .globl mv64x60_console_baud -mv64x60_console_baud: -.long EV64260_DEFAULT_BAUD - - .globl mv64x60_mpsc_clk_src -mv64x60_mpsc_clk_src: -.long EV64260_MPSC_CLK_SRC - - .globl mv64x60_mpsc_clk_freq -mv64x60_mpsc_clk_freq: -.long EV64260_MPSC_CLK_FREQ -#endif diff -Nru a/arch/ppc/boot/simple/misc-ev64260.c b/arch/ppc/boot/simple/misc-ev64260.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/misc-ev64260.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,57 @@ +/* + * arch/ppc/boot/simple/misc-ev64260.c + * + * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board + * with a GT64260 onboard. + * + * Author: Mark A. Greer + * + * 2001 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_SERIAL_MPSC_CONSOLE +extern u32 mv64x60_console_baud; +extern u32 mv64x60_mpsc_clk_src; +extern u32 mv64x60_mpsc_clk_freq; +#endif + +void +mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) +{ + u32 p, v; + + /* DINK doesn't enable 745x timebase, so enable here (Adrian Cox) */ + p = mfspr(SPRN_PVR); + p >>= 16; + + /* Reasonable SWAG at a 745x PVR value */ + if (((p & 0xfff0) == 0x8000) && (p != 0x800c)) { + v = mfspr(SPRN_HID0); + v |= HID0_TBEN; + mtspr(SPRN_HID0, v); + } + +#ifdef CONFIG_SERIAL_8250_CONSOLE + /* + * Change device bus 2 window so that bootoader can do I/O thru + * 8250/16550 UART that's mapped in that window. + */ + out_le32(new_base + MV64x60_CPU2DEV_2_BASE, EV64260_UART_BASE >> 20); + out_le32(new_base + MV64x60_CPU2DEV_2_SIZE, EV64260_UART_END >> 20); + __asm__ __volatile__("sync"); +#elif defined(CONFIG_SERIAL_MPSC_CONSOLE) + mv64x60_console_baud = EV64260_DEFAULT_BAUD; + mv64x60_mpsc_clk_src = EV64260_MPSC_CLK_SRC; + mv64x60_mpsc_clk_freq = EV64260_MPSC_CLK_FREQ; +#endif +} diff -Nru a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c --- a/arch/ppc/boot/simple/misc-katana.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/boot/simple/misc-katana.c 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,7 @@ /* * arch/ppc/boot/simple/misc-katana.c * - * Add birec data for Artesyn KATANA board. + * Set up MPSC values to bootwrapper can prompt user. * * Author: Mark A. Greer * @@ -11,5 +11,27 @@ * or implied. */ +#include #include -long mv64x60_mpsc_clk_freq = 133333333; +#include +#include +#include + +extern u32 mv64x60_console_baud; +extern u32 mv64x60_mpsc_clk_src; +extern u32 mv64x60_mpsc_clk_freq; + +/* Not in the kernel so won't include kernel.h to get its 'min' definition */ +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +void +mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) +{ + mv64x60_console_baud = KATANA_DEFAULT_BAUD; + mv64x60_mpsc_clk_src = KATANA_MPSC_CLK_SRC; + mv64x60_mpsc_clk_freq = + min(katana_bus_freq((void __iomem *)KATANA_CPLD_BASE), + MV64x60_TCLK_FREQ_MAX); +} diff -Nru a/arch/ppc/boot/simple/misc-mv64x60.S b/arch/ppc/boot/simple/misc-mv64x60.S --- a/arch/ppc/boot/simple/misc-mv64x60.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,61 +0,0 @@ -/* - * arch/ppc/boot/simple/misc-mv64x60.S - * - * Code to change the base address of the host bridges and call board specific - * init routine. - * - * Author: Mark Greer - * - * 2002 (c) MontaVista, Software, Inc. This file is licensed under the terms - * of the GNU General Public License version 2. This program is licensed - * "as is" without any warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include - - .globl mv64x60_init -mv64x60_init: - mflr r27 - -#if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE) - bl move_base -#endif - bl mv64x60_board_init - - mtlr r27 - blr - -#if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE) -move_base: - li r20,0 -#ifdef CONFIG_GT64260 - li r23,20 -#else /* Must be mv64[34]60 which uses top 16 bits */ - li r23,16 -#endif - - /* Relocate bridge's regs */ - addis r25,0,CONFIG_MV64X60_BASE@h - ori r25,r25,MV64x60_INTERNAL_SPACE_DECODE - lwbrx r26,0,(r25) - lis r24,0xffff - and r26,r26,r24 - addis r24,0,CONFIG_MV64X60_NEW_BASE@h - srw r24,r24,r23 - or r26,r26,r24 - stwbrx r26,0,(r25) - sync - - /* Wait for write to take effect */ - addis r25,0,CONFIG_MV64X60_NEW_BASE@h - ori r25,r25,MV64x60_INTERNAL_SPACE_DECODE -1: lwbrx r24,0,(r25) - cmpw r24,r26 - bne 1b - - blr -#endif diff -Nru a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/misc-mv64x60.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,61 @@ +/* + * arch/ppc/boot/simple/misc-mv64x60.c + * + * Relocate bridge's register base and call board specific routine. + * + * Author: Mark A. Greer + * + * 2005 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include + +extern struct bi_record *decompress_kernel(unsigned long load_addr, + int num_words, unsigned long cksum); + +void +mv64x60_move_base(void __iomem *old_base, void __iomem *new_base) +{ + u32 bits, mask, b; + + if (old_base != new_base) { +#ifdef CONFIG_GT64260 + bits = 12; + mask = 0x07000000; +#else /* Must be mv64[34]60 */ + bits = 16; + mask = 0x03000000; +#endif + b = in_le32(old_base + MV64x60_INTERNAL_SPACE_DECODE); + b &= mask; + b |= ((u32)new_base >> (32 - bits)); + out_le32(old_base + MV64x60_INTERNAL_SPACE_DECODE, b); + + __asm__ __volatile__("sync"); + + /* Wait for change to happen (in accordance with the manual) */ + while (in_le32(new_base + MV64x60_INTERNAL_SPACE_DECODE) != b); + } +} + +void __attribute__ ((weak)) +mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) +{ +} + +void * +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, + void *ign1, void *ign2) +{ + mv64x60_move_base((void __iomem *)CONFIG_MV64X60_BASE, + (void __iomem *)CONFIG_MV64X60_NEW_BASE); + mv64x60_board_init((void __iomem *)CONFIG_MV64X60_BASE, + (void __iomem *)CONFIG_MV64X60_NEW_BASE); + return decompress_kernel(load_addr, num_words, cksum); +} diff -Nru a/arch/ppc/boot/simple/misc-radstone_ppc7d.c b/arch/ppc/boot/simple/misc-radstone_ppc7d.c --- a/arch/ppc/boot/simple/misc-radstone_ppc7d.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/boot/simple/misc-radstone_ppc7d.c 2005-03-30 16:58:47 -08:00 @@ -7,13 +7,20 @@ */ #include -#include - -#include "../../platforms/radstone_ppc7d.h" +#include #if defined(CONFIG_SERIAL_MPSC_CONSOLE) -long mv64x60_mpsc_clk_freq = PPC7D_MPSC_CLK_FREQ;; -long mv64x60_mpsc_clk_src = PPC7D_MPSC_CLK_SRC; -long mv64x60_mpsc_console_baud = PPC7D_DEFAULT_BAUD; +extern u32 mv64x60_console_baud; +extern u32 mv64x60_mpsc_clk_src; +extern u32 mv64x60_mpsc_clk_freq; #endif +void +mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) +{ +#if defined(CONFIG_SERIAL_MPSC_CONSOLE) + mv64x60_console_baud = PPC7D_DEFAULT_BAUD; + mv64x60_mpsc_clk_src = PPC7D_MPSC_CLK_SRC; + mv64x60_mpsc_clk_freq = PPC7D_MPSC_CLK_FREQ; +#endif +} diff -Nru a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c --- a/arch/ppc/boot/simple/mpc52xx_tty.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/boot/simple/mpc52xx_tty.c 2005-03-30 16:58:50 -08:00 @@ -33,18 +33,19 @@ #error "MPC52xx_PF_CONSOLE_PORT not defined" #endif -static struct mpc52xx_psc *psc = (struct mpc52xx_psc *)MPC52xx_CONSOLE; +static struct mpc52xx_psc __iomem *psc = + (struct mpc52xx_psc __iomem *) MPC52xx_CONSOLE; /* The decrementer counts at the system bus clock frequency * divided by four. The most accurate time base is connected to the * rtc. We read the decrementer change during one rtc tick (one second) * and multiply by 4 to get the system bus clock frequency. */ -int +static int mpc52xx_ipbfreq(void) { - struct mpc52xx_rtc *rtc = (struct mpc52xx_rtc*)MPC52xx_RTC; - struct mpc52xx_cdm *cdm = (struct mpc52xx_cdm*)MPC52xx_CDM; + struct mpc52xx_rtc __iomem *rtc = (struct mpc52xx_rtc __iomem *)MPC52xx_RTC; + struct mpc52xx_cdm __iomem *cdm = (struct mpc52xx_cdm __iomem *)MPC52xx_CDM; int current_time, previous_time; int tbl_start, tbl_end; int xlbfreq, ipbfreq; @@ -67,7 +68,7 @@ unsigned long serial_init(int ignored, void *ignored2) { - struct mpc52xx_gpio *gpio = (struct mpc52xx_gpio *)MPC52xx_GPIO; + struct mpc52xx_gpio __iomem *gpio = (struct mpc52xx_gpio __iomem *)MPC52xx_GPIO; int divisor; int mode1; int mode2; @@ -117,7 +118,7 @@ void serial_putc(void *ignored, const char c) { - serial_init(0, 0); + serial_init(0, NULL); while (!(in_be16(&psc->mpc52xx_psc_status) & MPC52xx_PSC_SR_TXEMP)) ; out_8(&psc->mpc52xx_psc_buffer_8, c); diff -Nru a/arch/ppc/boot/simple/mv64x60_stub.c b/arch/ppc/boot/simple/mv64x60_stub.c --- a/arch/ppc/boot/simple/mv64x60_stub.c 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,24 +0,0 @@ -/* - * arch/ppc/boot/simple/mv64x60_stub.c - * - * Stub for board_init() routine called from mv64x60_init(). - * - * Author: Mark A. Greer - * - * 2002 (c) MontaVista, Software, Inc. This file is licensed under the terms - * of the GNU General Public License version 2. This program is licensed - * "as is" without any warranty of any kind, whether express or implied. - */ - -#include - -#if defined(CONFIG_SERIAL_MPSC_CONSOLE) -long __attribute__ ((weak)) mv64x60_console_baud = 9600; -long __attribute__ ((weak)) mv64x60_mpsc_clk_src = 8; /* TCLK */ -long __attribute__ ((weak)) mv64x60_mpsc_clk_freq = 100000000; -#endif - -void __attribute__ ((weak)) -mv64x60_board_init(void) -{ -} diff -Nru a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c --- a/arch/ppc/boot/simple/mv64x60_tty.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/boot/simple/mv64x60_tty.c 2005-03-30 16:58:49 -08:00 @@ -18,36 +18,18 @@ #include #include #include +#include #include #include +u32 mv64x60_console_baud = 9600; +u32 mv64x60_mpsc_clk_src = 8; /* TCLK */ +u32 mv64x60_mpsc_clk_freq = 100000000; + extern void udelay(long); static void stop_dma(int chan); -static u32 mv64x60_base = CONFIG_MV64X60_NEW_BASE; - -inline unsigned -mv64x60_in_le32(volatile unsigned *addr) -{ - unsigned ret; - - __asm__ __volatile__("lwbrx %0,0,%1; eieio" : "=r" (ret) : - "r" (addr), "m" (*addr)); - return ret; -} - -inline void -mv64x60_out_le32(volatile unsigned *addr, int val) -{ - __asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) : - "r" (val), "r" (addr)); -} - -#define MV64x60_REG_READ(offs) \ - (mv64x60_in_le32((volatile uint *)(mv64x60_base + (offs)))) -#define MV64x60_REG_WRITE(offs, d) \ - (mv64x60_out_le32((volatile uint *)(mv64x60_base + (offs)), (int)(d))) - +static void __iomem *mv64x60_base = (void __iomem *)CONFIG_MV64X60_NEW_BASE; struct sdma_regs { u32 sdc; @@ -142,9 +124,6 @@ { u32 mpsc_routing_base, sdma_base, brg_bcr, cdv; int i; - extern long mv64x60_console_baud; - extern long mv64x60_mpsc_clk_src; - extern long mv64x60_mpsc_clk_freq; chan = (chan == 1); /* default to chan 0 if anything but 1 */ @@ -157,8 +136,7 @@ sdma_base = MV64x60_SDMA_0_OFFSET; brg_bcr = MV64x60_BRG_0_OFFSET + BRG_BCR; SDMA_REGS_INIT(&sdma_regs[0], MV64x60_SDMA_0_OFFSET); - } - else { + } else { sdma_base = MV64x60_SDMA_1_OFFSET; brg_bcr = MV64x60_BRG_1_OFFSET + BRG_BCR; SDMA_REGS_INIT(&sdma_regs[0], MV64x60_SDMA_1_OFFSET); @@ -186,10 +164,10 @@ td[chan][TX_NUM_DESC - 1].next_desc_ptr = (u32)&td[chan][0]; /* Set MPSC Routing */ - MV64x60_REG_WRITE(mpsc_routing_base + MPSC_MRR, 0x3ffffe38); + out_le32(mv64x60_base + mpsc_routing_base + MPSC_MRR, 0x3ffffe38); #ifdef CONFIG_GT64260 - MV64x60_REG_WRITE(GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102); + out_le32(mv64x60_base + GT64260_MPP_SERIAL_PORTS_MULTIPLEX, 0x00001102); #else /* Must be MV64360 or MV64460 */ { u32 enables, prot_bits, v; @@ -197,68 +175,70 @@ /* Set up comm unit to memory mapping windows */ /* Note: Assumes MV64x60_CPU2MEM_WINDOWS == 4 */ - enables = MV64x60_REG_READ(MV64360_CPU_BAR_ENABLE) & 0xf; + enables = in_le32(mv64x60_base + MV64360_CPU_BAR_ENABLE) & 0xf; prot_bits = 0; for (i=0; icmd_stat = SDMA_DESC_CMDSTAT_L | SDMA_DESC_CMDSTAT_F | SDMA_DESC_CMDSTAT_O; - MV64x60_REG_WRITE(sdma_regs[com_port].sctdp, tdp); - MV64x60_REG_WRITE(sdma_regs[com_port].sftdp, tdp); - MV64x60_REG_WRITE(sdma_regs[com_port].sdcm, - MV64x60_REG_READ(sdma_regs[com_port].sdcm) | SDMA_SDCM_TXD); - - return; + out_le32(mv64x60_base + sdma_regs[com_port].sctdp, (int)tdp); + out_le32(mv64x60_base + sdma_regs[com_port].sftdp, (int)tdp); + out_le32(mv64x60_base + sdma_regs[com_port].sdcm, + in_le32(mv64x60_base + sdma_regs[com_port].sdcm) | + SDMA_SDCM_TXD); } unsigned char @@ -366,8 +344,7 @@ if (++cur_rd[com_port] >= RX_NUM_DESC) cur_rd[com_port] = 0; rdp = (struct mv64x60_rx_desc *)rdp->next_desc_ptr; - } - else { + } else { rc = 1; break; } @@ -380,5 +357,4 @@ serial_close(unsigned long com_port) { stop_dma(com_port); - return; } diff -Nru a/arch/ppc/configs/hdpu_defconfig b/arch/ppc/configs/hdpu_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/configs/hdpu_defconfig 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,890 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.11 +# Wed Mar 16 12:43:19 2005 +# +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +# CONFIG_CPUSETS is not set +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y + +# +# Processor +# +CONFIG_6xx=y +# CONFIG_40x is not set +# CONFIG_44x is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8xx is not set +# CONFIG_E500 is not set +CONFIG_ALTIVEC=y +# CONFIG_TAU is not set +# CONFIG_CPU_FREQ is not set +# CONFIG_PM is not set +CONFIG_PPC_STD_MMU=y +# CONFIG_NOT_COHERENT_CACHE is not set + +# +# Platform options +# +# CONFIG_PPC_MULTIPLATFORM is not set +# CONFIG_APUS is not set +# CONFIG_KATANA is not set +# CONFIG_WILLOW is not set +# CONFIG_CPCI690 is not set +# CONFIG_PCORE is not set +# CONFIG_POWERPMC250 is not set +# CONFIG_CHESTNUT is not set +# CONFIG_SPRUCE is not set +CONFIG_HDPU=y +# CONFIG_EV64260 is not set +# CONFIG_LOPEC is not set +# CONFIG_MCPN765 is not set +# CONFIG_MVME5100 is not set +# CONFIG_PPLUS is not set +# CONFIG_PRPMC750 is not set +# CONFIG_PRPMC800 is not set +# CONFIG_SANDPOINT is not set +# CONFIG_RADSTONE_PPC7D is not set +# CONFIG_ADIR is not set +# CONFIG_K2 is not set +# CONFIG_PAL4 is not set +# CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set +# CONFIG_SBC82xx is not set +# CONFIG_SBS8260 is not set +# CONFIG_RPX8260 is not set +# CONFIG_TQM8260 is not set +# CONFIG_ADS8272 is not set +# CONFIG_PQ2FADS is not set +# CONFIG_LITE5200 is not set +# CONFIG_MPC834x_SYS is not set +CONFIG_MV64360=y +CONFIG_MV64X60=y + +# +# Set bridge options +# +CONFIG_MV64X60_BASE=0xf1000000 +CONFIG_MV64X60_NEW_BASE=0xf1000000 +# CONFIG_SMP is not set +# CONFIG_IRQ_ALL_CPUS is not set +# CONFIG_NR_CPUS is not set +CONFIG_PREEMPT=y +CONFIG_HIGHMEM=y +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_MISC=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="root=/dev/nfs ip=auto" + +# +# Bus options +# +CONFIG_GENERIC_ISA_DMA=y +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Advanced setup +# +CONFIG_ADVANCED_OPTIONS=y +# CONFIG_HIGHMEM_START_BOOL is not set +CONFIG_HIGHMEM_START=0xfe000000 +# CONFIG_LOWMEM_SIZE_BOOL is not set +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_KERNEL_START_BOOL=y +CONFIG_KERNEL_START=0x80000000 +# CONFIG_TASK_SIZE_BOOL is not set +CONFIG_TASK_SIZE=0x80000000 +# CONFIG_BOOT_LOAD_BOOL is not set +CONFIG_BOOT_LOAD=0x00800000 + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0xfc000000 +CONFIG_MTD_PHYSMAP_LEN=0x04000000 +CONFIG_MTD_PHYSMAP_BANKWIDTH=4 + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=y +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +CONFIG_SCSI_AIC7XXX=y +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Macintosh device drivers +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_NET_PCI is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set +CONFIG_MV643XX_ETH=y +CONFIG_MV643XX_ETH_0=y +# CONFIG_MV643XX_ETH_1 is not set +# CONFIG_MV643XX_ETH_2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_MPSC=y +CONFIG_SERIAL_MPSC_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +CONFIG_GEN_RTC=y +# CONFIG_GEN_RTC_X is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +CONFIG_UDF_FS=y +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=15 +# CONFIG_SERIAL_TEXT_DEBUG is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# diff -Nru a/arch/ppc/configs/radstone_ppc7d_defconfig b/arch/ppc/configs/radstone_ppc7d_defconfig --- a/arch/ppc/configs/radstone_ppc7d_defconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/configs/radstone_ppc7d_defconfig 2005-03-30 16:58:48 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc4 -# Thu Feb 24 21:26:04 2005 +# Linux kernel version: 2.6.11 +# Tue Mar 15 14:31:19 2005 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y @@ -29,13 +29,13 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set @@ -45,6 +45,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -71,6 +72,7 @@ # CONFIG_TAU is not set # CONFIG_CPU_FREQ is not set CONFIG_PPC_GEN550=y +# CONFIG_PM is not set CONFIG_PPC_STD_MMU=y # CONFIG_NOT_COHERENT_CACHE is not set @@ -107,6 +109,7 @@ # CONFIG_ADS8272 is not set # CONFIG_PQ2FADS is not set # CONFIG_LITE5200 is not set +# CONFIG_MPC834x_SYS is not set CONFIG_MV64360=y CONFIG_MV64X60=y @@ -138,10 +141,6 @@ # CONFIG_PCCARD is not set # -# PC-card bridges -# - -# # Advanced setup # CONFIG_ADVANCED_OPTIONS=y @@ -171,8 +170,8 @@ # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set # CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_PARTITIONS is not set # # User Modules And Translation Layers @@ -490,7 +489,6 @@ # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set CONFIG_E100=y -# CONFIG_E100_NAPI is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set @@ -516,6 +514,10 @@ CONFIG_SK98LIN=y # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y +CONFIG_MV643XX_ETH=y +CONFIG_MV643XX_ETH_0=y +CONFIG_MV643XX_ETH_1=y +# CONFIG_MV643XX_ETH_2 is not set # # Ethernet (10000 Mbit) @@ -573,19 +575,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -600,6 +589,18 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -641,7 +642,6 @@ # Watchdog Device Drivers # # CONFIG_SOFT_WATCHDOG is not set -CONFIG_MV64X60_WDT=y # # PCI-based Watchdog Cards @@ -663,9 +663,97 @@ # CONFIG_RAW_DRIVER is not set # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # -# CONFIG_I2C is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_ISA is not set +# CONFIG_I2C_MPC is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set +CONFIG_I2C_MV64XXX=y + +# +# Hardware Sensors Chip support +# +CONFIG_I2C_SENSOR=y +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +CONFIG_SENSORS_LM90=y +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +# CONFIG_SENSORS_M41T00 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set # # Dallas's 1-wire bus @@ -705,13 +793,9 @@ # # USB support # -# CONFIG_USB is not set CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# +# CONFIG_USB is not set # # USB Gadget Support @@ -851,7 +935,9 @@ # # Kernel hacking # +# CONFIG_PRINTK_TIME is not set # CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SERIAL_TEXT_DEBUG is not set # diff -Nru a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S --- a/arch/ppc/kernel/head_8xx.S 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/kernel/head_8xx.S 2005-03-30 16:58:48 -08:00 @@ -307,7 +307,7 @@ stw r11, 4(r0) mfspr r10, SPRN_SRR0 /* Get effective address of fault */ DO_8xx_CPU6(0x3780, r3) - mtspr SPRN_MD_EPN, r1 /* Have to use MD_EPN for walk, MI_EPN can't */ + mtspr SPRN_MD_EPN, r10 /* Have to use MD_EPN for walk, MI_EPN can't */ mfspr r10, SPRN_M_TWB /* Get level 1 table entry address */ /* If we are faulting a kernel address, we have to use the diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c --- a/arch/ppc/kernel/pci.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/kernel/pci.c 2005-03-30 16:58:48 -08:00 @@ -1478,97 +1478,145 @@ return res->start; } -/* - * Platform support for /proc/bus/pci/X/Y mmap()s, - * modelled on the sparc64 implementation by Dave Miller. - * -- paulus. - */ -/* - * Adjust vm_pgoff of VMA such that it is the physical page offset - * corresponding to the 32-bit pci bus offset for DEV requested by the user. - * - * Basically, the user finds the base address for his device which he wishes - * to mmap. They read the 32-bit value from the config space base register, - * add whatever PAGE_SIZE multiple offset they wish, and feed this into the - * offset parameter of mmap on /proc/bus/pci/XXX for that device. - * - * Returns negative error code on failure, zero on success. - */ -static __inline__ int -__pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) +static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, + unsigned long *offset, + enum pci_mmap_state mmap_state) { - struct pci_controller *hose = (struct pci_controller *) dev->sysdata; - unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; - unsigned long size = vma->vm_end - vma->vm_start; - unsigned long base; - struct resource *res; - int i; - int ret = -EINVAL; + struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); + unsigned long io_offset = 0; + int i, res_bit; if (hose == 0) - return -EINVAL; /* should never happen */ - if (offset + size <= offset) - return -EINVAL; + return NULL; /* should never happen */ + /* If memory, add on the PCI bridge address offset */ if (mmap_state == pci_mmap_mem) { - /* PCI memory space */ - base = hose->pci_mem_offset; - for (i = 0; i < 3; ++i) { - res = &hose->mem_resources[i]; - if (res->flags == 0) - continue; - if (offset >= res->start - base - && offset + size - 1 <= res->end - base) { - ret = 0; - break; - } - } - offset += hose->pci_mem_offset; + *offset += hose->pci_mem_offset; + res_bit = IORESOURCE_MEM; } else { - /* PCI I/O space */ - base = (unsigned long)hose->io_base_virt - isa_io_base; - res = &hose->io_resource; - if (offset >= res->start - base - && offset + size - 1 <= res->end - base) - ret = 0; - offset += hose->io_base_phys; + io_offset = (unsigned long)hose->io_base_virt; + *offset += io_offset; + res_bit = IORESOURCE_IO; } - vma->vm_pgoff = offset >> PAGE_SHIFT; - return ret; -} + /* + * Check that the offset requested corresponds to one of the + * resources of the device. + */ + for (i = 0; i <= PCI_ROM_RESOURCE; i++) { + struct resource *rp = &dev->resource[i]; + int flags = rp->flags; + + /* treat ROM as memory (should be already) */ + if (i == PCI_ROM_RESOURCE) + flags |= IORESOURCE_MEM; + + /* Active and same type? */ + if ((flags & res_bit) == 0) + continue; + + /* In the range of this resource? */ + if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end) + continue; + + /* found it! construct the final physical address */ + if (mmap_state == pci_mmap_io) + *offset += hose->io_base_phys - _IO_BASE; + return rp; + } -/* - * Set vm_flags of VMA, as appropriate for this architecture, for a pci device - * mapping. - */ -static __inline__ void -__pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) -{ - vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; + return NULL; } /* * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci * device mapping. */ -static __inline__ void -__pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, int write_combine) +static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, + pgprot_t protection, + enum pci_mmap_state mmap_state, + int write_combine) { - int prot = pgprot_val(vma->vm_page_prot); + unsigned long prot = pgprot_val(protection); + + /* Write combine is always 0 on non-memory space mappings. On + * memory space, if the user didn't pass 1, we check for a + * "prefetchable" resource. This is a bit hackish, but we use + * this to workaround the inability of /sysfs to provide a write + * combine bit + */ + if (mmap_state != pci_mmap_mem) + write_combine = 0; + else if (write_combine == 0) { + if (rp->flags & IORESOURCE_PREFETCH) + write_combine = 1; + } /* XXX would be nice to have a way to ask for write-through */ prot |= _PAGE_NO_CACHE; - if (!write_combine) + if (write_combine) + prot &= ~_PAGE_GUARDED; + else prot |= _PAGE_GUARDED; - vma->vm_page_prot = __pgprot(prot); + + printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, + prot); + + return __pgprot(prot); } /* + * This one is used by /dev/mem and fbdev who have no clue about the + * PCI device, it tries to find the PCI device first and calls the + * above routine + */ +pgprot_t pci_phys_mem_access_prot(struct file *file, + unsigned long offset, + unsigned long size, + pgprot_t protection) +{ + struct pci_dev *pdev = NULL; + struct resource *found = NULL; + unsigned long prot = pgprot_val(protection); + int i; + + if (page_is_ram(offset >> PAGE_SHIFT)) + return prot; + + prot |= _PAGE_NO_CACHE | _PAGE_GUARDED; + + for_each_pci_dev(pdev) { + for (i = 0; i <= PCI_ROM_RESOURCE; i++) { + struct resource *rp = &pdev->resource[i]; + int flags = rp->flags; + + /* Active and same type? */ + if ((flags & IORESOURCE_MEM) == 0) + continue; + /* In the range of this resource? */ + if (offset < (rp->start & PAGE_MASK) || + offset > rp->end) + continue; + found = rp; + break; + } + if (found) + break; + } + if (found) { + if (found->flags & IORESOURCE_PREFETCH) + prot &= ~_PAGE_GUARDED; + pci_dev_put(pdev); + } + + DBG("non-PCI map for %lx, prot: %lx\n", offset, prot); + + return __pgprot(prot); +} + + +/* * Perform the actual remap of the pages for a PCI device mapping, as * appropriate for this architecture. The region in the process to map * is described by vm_start and vm_end members of VMA, the base physical @@ -1582,14 +1630,19 @@ enum pci_mmap_state mmap_state, int write_combine) { + unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; + struct resource *rp; int ret; - ret = __pci_mmap_make_offset(dev, vma, mmap_state); - if (ret < 0) - return ret; + rp = __pci_mmap_make_offset(dev, &offset, mmap_state); + if (rp == NULL) + return -EINVAL; - __pci_mmap_set_flags(dev, vma, mmap_state); - __pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine); + vma->vm_pgoff = offset >> PAGE_SHIFT; + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; + vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp, + vma->vm_page_prot, + mmap_state, write_combine); ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot); diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c --- a/arch/ppc/kernel/setup.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/kernel/setup.c 2005-03-30 16:58:50 -08:00 @@ -41,6 +41,10 @@ #include #include +#if defined(CONFIG_85xx) || defined(CONFIG_83xx) +#include +#endif + #if defined CONFIG_KGDB #include #endif @@ -246,6 +250,12 @@ seq_printf(m, "bogomips\t: %lu.%02lu\n", lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); +#if defined(CONFIG_85xx) || defined(CONFIG_83xx) + if (cur_ppc_sys_spec->ppc_sys_name) + seq_printf(m, "chipset\t\t: %s\n", + cur_ppc_sys_spec->ppc_sys_name); +#endif + #ifdef CONFIG_SMP seq_printf(m, "\n"); #endif @@ -338,14 +348,15 @@ of_show_percpuinfo(struct seq_file *m, int i) { struct device_node *cpu_node; - int *fp, s; + u32 *fp; + int s; cpu_node = find_type_devices("cpu"); if (!cpu_node) return 0; for (s = 0; s < i && cpu_node->next; s++) cpu_node = cpu_node->next; - fp = (int *) get_property(cpu_node, "clock-frequency", NULL); + fp = (u32 *)get_property(cpu_node, "clock-frequency", NULL); if (fp) seq_printf(m, "clock\t\t: %dMHz\n", *fp / 1000000); return 0; diff -Nru a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c --- a/arch/ppc/kernel/traps.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/kernel/traps.c 2005-03-30 16:58:47 -08:00 @@ -412,7 +412,7 @@ return -EINVAL; /* Early out if we are an invalid form of lswi */ - if ((instword & INST_STRING_MASK) == INST_LSWX) + if ((instword & INST_STRING_MASK) == INST_LSWI) if ((rA >= rT) || (rT == rA)) return -EINVAL; diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c --- a/arch/ppc/mm/init.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/mm/init.c 2005-03-30 16:58:47 -08:00 @@ -641,3 +641,27 @@ } #endif } + +/* + * This is called by /dev/mem to know if a given address has to + * be mapped non-cacheable or not + */ +int page_is_ram(unsigned long pfn) +{ + unsigned long paddr = (pfn << PAGE_SHIFT); + + return paddr < __pa(high_memory); +} + +pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, + unsigned long size, pgprot_t vma_prot) +{ + if (ppc_md.phys_mem_access_prot) + return ppc_md.phys_mem_access_prot(file, addr, size, vma_prot); + + if (!page_is_ram(addr >> PAGE_SHIFT)) + vma_prot = __pgprot(pgprot_val(vma_prot) + | _PAGE_GUARDED | _PAGE_NO_CACHE); + return vma_prot; +} +EXPORT_SYMBOL(phys_mem_access_prot); diff -Nru a/arch/ppc/platforms/83xx/Makefile b/arch/ppc/platforms/83xx/Makefile --- a/arch/ppc/platforms/83xx/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/83xx/Makefile 2005-03-30 16:58:50 -08:00 @@ -1,6 +1,4 @@ # # Makefile for the PowerPC 83xx linux kernel. # -obj-$(CONFIG_83xx) += mpc83xx_sys.o mpc83xx_devices.o - obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c --- a/arch/ppc/platforms/83xx/mpc834x_sys.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c 2005-03-30 16:58:49 -08:00 @@ -143,7 +143,6 @@ pvid = mfspr(SPRN_PVR); svid = mfspr(SPRN_SVR); - seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Freescale Inc.\n"); seq_printf(m, "Machine\t\t: mpc%s sys\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "core clock\t: %d MHz\n" @@ -243,14 +242,14 @@ memset(&p, 0, sizeof (p)); p.iotype = SERIAL_IO_MEM; - p.membase = (unsigned char __iomem *)immrbar + 0x4500; + p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4500); p.uartclk = binfo->bi_busfreq; gen550_init(0, &p); memset(&p, 0, sizeof (p)); p.iotype = SERIAL_IO_MEM; - p.membase = (unsigned char __iomem *)immrbar + 0x4500; + p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4600); p.uartclk = binfo->bi_busfreq; gen550_init(1, &p); diff -Nru a/arch/ppc/platforms/83xx/mpc83xx_devices.c b/arch/ppc/platforms/83xx/mpc83xx_devices.c --- a/arch/ppc/platforms/83xx/mpc83xx_devices.c 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,237 +0,0 @@ -/* - * arch/ppc/platforms/83xx/mpc83xx_devices.c - * - * MPC83xx Device descriptions - * - * Maintainer: Kumar Gala - * - * Copyright 2005 Freescale Semiconductor Inc. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* We use offsets for IORESOURCE_MEM since we do not know at compile time - * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup - */ - -static struct gianfar_platform_data mpc83xx_tsec1_pdata = { - .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | - FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | - FSL_GIANFAR_DEV_HAS_MULTI_INTR, - .phy_reg_addr = 0x24000, -}; - -static struct gianfar_platform_data mpc83xx_tsec2_pdata = { - .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | - FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | - FSL_GIANFAR_DEV_HAS_MULTI_INTR, - .phy_reg_addr = 0x24000, -}; - -static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { - .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, -}; - -static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = { - .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, -}; - -static struct plat_serial8250_port serial_platform_data[] = { - [0] = { - .mapbase = 0x4500, - .irq = MPC83xx_IRQ_UART1, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, - [1] = { - .mapbase = 0x4600, - .irq = MPC83xx_IRQ_UART2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, - }, -}; - -struct platform_device ppc_sys_platform_devices[] = { - [MPC83xx_TSEC1] = { - .name = "fsl-gianfar", - .id = 1, - .dev.platform_data = &mpc83xx_tsec1_pdata, - .num_resources = 4, - .resource = (struct resource[]) { - { - .start = 0x24000, - .end = 0x24fff, - .flags = IORESOURCE_MEM, - }, - { - .name = "tx", - .start = MPC83xx_IRQ_TSEC1_TX, - .end = MPC83xx_IRQ_TSEC1_TX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "rx", - .start = MPC83xx_IRQ_TSEC1_RX, - .end = MPC83xx_IRQ_TSEC1_RX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "error", - .start = MPC83xx_IRQ_TSEC1_ERROR, - .end = MPC83xx_IRQ_TSEC1_ERROR, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC83xx_TSEC2] = { - .name = "fsl-gianfar", - .id = 2, - .dev.platform_data = &mpc83xx_tsec2_pdata, - .num_resources = 4, - .resource = (struct resource[]) { - { - .start = 0x25000, - .end = 0x25fff, - .flags = IORESOURCE_MEM, - }, - { - .name = "tx", - .start = MPC83xx_IRQ_TSEC2_TX, - .end = MPC83xx_IRQ_TSEC2_TX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "rx", - .start = MPC83xx_IRQ_TSEC2_RX, - .end = MPC83xx_IRQ_TSEC2_RX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "error", - .start = MPC83xx_IRQ_TSEC2_ERROR, - .end = MPC83xx_IRQ_TSEC2_ERROR, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC83xx_IIC1] = { - .name = "fsl-i2c", - .id = 1, - .dev.platform_data = &mpc83xx_fsl_i2c1_pdata, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x3000, - .end = 0x30ff, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC83xx_IRQ_IIC1, - .end = MPC83xx_IRQ_IIC1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC83xx_IIC2] = { - .name = "fsl-i2c", - .id = 2, - .dev.platform_data = &mpc83xx_fsl_i2c2_pdata, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x3100, - .end = 0x31ff, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC83xx_IRQ_IIC2, - .end = MPC83xx_IRQ_IIC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC83xx_DUART] = { - .name = "serial8250", - .id = 0, - .dev.platform_data = serial_platform_data, - }, - [MPC83xx_SEC2] = { - .name = "fsl-sec2", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x30000, - .end = 0x3ffff, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC83xx_IRQ_SEC2, - .end = MPC83xx_IRQ_SEC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC83xx_USB2_DR] = { - .name = "fsl-usb2-dr", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x22000, - .end = 0x22fff, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC83xx_IRQ_USB2_DR, - .end = MPC83xx_IRQ_USB2_DR, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC83xx_USB2_MPH] = { - .name = "fsl-usb2-mph", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x23000, - .end = 0x23fff, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC83xx_IRQ_USB2_MPH, - .end = MPC83xx_IRQ_USB2_MPH, - .flags = IORESOURCE_IRQ, - }, - }, - }, -}; - -static int __init mach_mpc83xx_fixup(struct platform_device *pdev) -{ - ppc_sys_fixup_mem_resource(pdev, immrbar); - return 0; -} - -static int __init mach_mpc83xx_init(void) -{ - if (ppc_md.progress) - ppc_md.progress("mach_mpc83xx_init:enter", 0); - ppc_sys_device_fixup = mach_mpc83xx_fixup; - return 0; -} - -postcore_initcall(mach_mpc83xx_init); diff -Nru a/arch/ppc/platforms/83xx/mpc83xx_sys.c b/arch/ppc/platforms/83xx/mpc83xx_sys.c --- a/arch/ppc/platforms/83xx/mpc83xx_sys.c 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,100 +0,0 @@ -/* - * arch/ppc/platforms/83xx/mpc83xx_sys.c - * - * MPC83xx System descriptions - * - * Maintainer: Kumar Gala - * - * Copyright 2005 Freescale Semiconductor Inc. - * - * 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. - */ - -#include -#include -#include -#include - -struct ppc_sys_spec *cur_ppc_sys_spec; -struct ppc_sys_spec ppc_sys_specs[] = { - { - .ppc_sys_name = "8349E", - .mask = 0xFFFF0000, - .value = 0x80500000, - .num_devices = 8, - .device_list = (enum ppc_sys_devices[]) - { - MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, - MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, - MPC83xx_USB2_DR, MPC83xx_USB2_MPH - }, - }, - { - .ppc_sys_name = "8349", - .mask = 0xFFFF0000, - .value = 0x80510000, - .num_devices = 7, - .device_list = (enum ppc_sys_devices[]) - { - MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, - MPC83xx_IIC2, MPC83xx_DUART, - MPC83xx_USB2_DR, MPC83xx_USB2_MPH - }, - }, - { - .ppc_sys_name = "8347E", - .mask = 0xFFFF0000, - .value = 0x80520000, - .num_devices = 8, - .device_list = (enum ppc_sys_devices[]) - { - MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, - MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, - MPC83xx_USB2_DR, MPC83xx_USB2_MPH - }, - }, - { - .ppc_sys_name = "8347", - .mask = 0xFFFF0000, - .value = 0x80530000, - .num_devices = 7, - .device_list = (enum ppc_sys_devices[]) - { - MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, - MPC83xx_IIC2, MPC83xx_DUART, - MPC83xx_USB2_DR, MPC83xx_USB2_MPH - }, - }, - { - .ppc_sys_name = "8343E", - .mask = 0xFFFF0000, - .value = 0x80540000, - .num_devices = 7, - .device_list = (enum ppc_sys_devices[]) - { - MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, - MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, - MPC83xx_USB2_DR, - }, - }, - { - .ppc_sys_name = "8343", - .mask = 0xFFFF0000, - .value = 0x80550000, - .num_devices = 6, - .device_list = (enum ppc_sys_devices[]) - { - MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, - MPC83xx_IIC2, MPC83xx_DUART, - MPC83xx_USB2_DR, - }, - }, - { /* default match */ - .ppc_sys_name = "", - .mask = 0x00000000, - .value = 0x00000000, - }, -}; diff -Nru a/arch/ppc/platforms/85xx/Makefile b/arch/ppc/platforms/85xx/Makefile --- a/arch/ppc/platforms/85xx/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/platforms/85xx/Makefile 2005-03-30 16:58:47 -08:00 @@ -1,8 +1,6 @@ # # Makefile for the PowerPC 85xx linux kernel. # -obj-$(CONFIG_85xx) += mpc85xx_sys.o mpc85xx_devices.o - obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads_common.o mpc8540_ads.o obj-$(CONFIG_MPC8555_CDS) += mpc85xx_cds_common.o obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads_common.o mpc8560_ads.o diff -Nru a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c --- a/arch/ppc/platforms/85xx/mpc8540_ads.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c 2005-03-30 16:58:48 -08:00 @@ -109,7 +109,7 @@ memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); - pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; + pdata->board_flags = 0; pdata->interruptPHY = MPC85xx_IRQ_EXT5; pdata->phyid = 3; /* fixup phy address */ diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2005-03-30 16:58:50 -08:00 @@ -129,7 +129,6 @@ pvid = mfspr(SPRN_PVR); svid = mfspr(SPRN_SVR); - seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); seq_printf(m, "Machine\t\t: mpc%sads\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2005-03-30 16:58:50 -08:00 @@ -146,7 +146,6 @@ pvid = mfspr(SPRN_PVR); svid = mfspr(SPRN_SVR); - seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); seq_printf(m, "Machine\t\t: CDS - MPC%s (%x)\n", cur_ppc_sys_spec->ppc_sys_name, cadmus[CM_VER]); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_devices.c b/arch/ppc/platforms/85xx/mpc85xx_devices.c --- a/arch/ppc/platforms/85xx/mpc85xx_devices.c 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,552 +0,0 @@ -/* - * arch/ppc/platforms/85xx/mpc85xx_devices.c - * - * MPC85xx Device descriptions - * - * Maintainer: Kumar Gala - * - * Copyright 2005 Freescale Semiconductor Inc. - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* We use offsets for IORESOURCE_MEM since we do not know at compile time - * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup - */ - -static struct gianfar_platform_data mpc85xx_tsec1_pdata = { - .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | - FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | - FSL_GIANFAR_DEV_HAS_MULTI_INTR, - .phy_reg_addr = MPC85xx_ENET1_OFFSET, -}; - -static struct gianfar_platform_data mpc85xx_tsec2_pdata = { - .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | - FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | - FSL_GIANFAR_DEV_HAS_MULTI_INTR, - .phy_reg_addr = MPC85xx_ENET1_OFFSET, -}; - -static struct gianfar_platform_data mpc85xx_fec_pdata = { - .phy_reg_addr = MPC85xx_ENET1_OFFSET, -}; - -static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = { - .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, -}; - -static struct plat_serial8250_port serial_platform_data[] = { - [0] = { - .mapbase = 0x4500, - .irq = MPC85xx_IRQ_DUART, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ, - }, - [1] = { - .mapbase = 0x4600, - .irq = MPC85xx_IRQ_DUART, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ, - }, -}; - -struct platform_device ppc_sys_platform_devices[] = { - [MPC85xx_TSEC1] = { - .name = "fsl-gianfar", - .id = 1, - .dev.platform_data = &mpc85xx_tsec1_pdata, - .num_resources = 4, - .resource = (struct resource[]) { - { - .start = MPC85xx_ENET1_OFFSET, - .end = MPC85xx_ENET1_OFFSET + - MPC85xx_ENET1_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .name = "tx", - .start = MPC85xx_IRQ_TSEC1_TX, - .end = MPC85xx_IRQ_TSEC1_TX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "rx", - .start = MPC85xx_IRQ_TSEC1_RX, - .end = MPC85xx_IRQ_TSEC1_RX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "error", - .start = MPC85xx_IRQ_TSEC1_ERROR, - .end = MPC85xx_IRQ_TSEC1_ERROR, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_TSEC2] = { - .name = "fsl-gianfar", - .id = 2, - .dev.platform_data = &mpc85xx_tsec2_pdata, - .num_resources = 4, - .resource = (struct resource[]) { - { - .start = MPC85xx_ENET2_OFFSET, - .end = MPC85xx_ENET2_OFFSET + - MPC85xx_ENET2_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .name = "tx", - .start = MPC85xx_IRQ_TSEC2_TX, - .end = MPC85xx_IRQ_TSEC2_TX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "rx", - .start = MPC85xx_IRQ_TSEC2_RX, - .end = MPC85xx_IRQ_TSEC2_RX, - .flags = IORESOURCE_IRQ, - }, - { - .name = "error", - .start = MPC85xx_IRQ_TSEC2_ERROR, - .end = MPC85xx_IRQ_TSEC2_ERROR, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_FEC] = { - .name = "fsl-gianfar", - .id = 3, - .dev.platform_data = &mpc85xx_fec_pdata, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_ENET3_OFFSET, - .end = MPC85xx_ENET3_OFFSET + - MPC85xx_ENET3_SIZE - 1, - .flags = IORESOURCE_MEM, - - }, - { - .start = MPC85xx_IRQ_FEC, - .end = MPC85xx_IRQ_FEC, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_IIC1] = { - .name = "fsl-i2c", - .id = 1, - .dev.platform_data = &mpc85xx_fsl_i2c_pdata, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_IIC1_OFFSET, - .end = MPC85xx_IIC1_OFFSET + - MPC85xx_IIC1_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_IIC1, - .end = MPC85xx_IRQ_IIC1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_DMA0] = { - .name = "fsl-dma", - .id = 0, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_DMA0_OFFSET, - .end = MPC85xx_DMA0_OFFSET + - MPC85xx_DMA0_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_DMA0, - .end = MPC85xx_IRQ_DMA0, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_DMA1] = { - .name = "fsl-dma", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_DMA1_OFFSET, - .end = MPC85xx_DMA1_OFFSET + - MPC85xx_DMA1_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_DMA1, - .end = MPC85xx_IRQ_DMA1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_DMA2] = { - .name = "fsl-dma", - .id = 2, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_DMA2_OFFSET, - .end = MPC85xx_DMA2_OFFSET + - MPC85xx_DMA2_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_DMA2, - .end = MPC85xx_IRQ_DMA2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_DMA3] = { - .name = "fsl-dma", - .id = 3, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_DMA3_OFFSET, - .end = MPC85xx_DMA3_OFFSET + - MPC85xx_DMA3_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_DMA3, - .end = MPC85xx_IRQ_DMA3, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_DUART] = { - .name = "serial8250", - .id = 0, - .dev.platform_data = serial_platform_data, - }, - [MPC85xx_PERFMON] = { - .name = "fsl-perfmon", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_PERFMON_OFFSET, - .end = MPC85xx_PERFMON_OFFSET + - MPC85xx_PERFMON_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_PERFMON, - .end = MPC85xx_IRQ_PERFMON, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_SEC2] = { - .name = "fsl-sec2", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = MPC85xx_SEC2_OFFSET, - .end = MPC85xx_SEC2_OFFSET + - MPC85xx_SEC2_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - { - .start = MPC85xx_IRQ_SEC2, - .end = MPC85xx_IRQ_SEC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, -#ifdef CONFIG_CPM2 - [MPC85xx_CPM_FCC1] = { - .name = "fsl-cpm-fcc", - .id = 1, - .num_resources = 3, - .resource = (struct resource[]) { - { - .start = 0x91300, - .end = 0x9131F, - .flags = IORESOURCE_MEM, - }, - { - .start = 0x91380, - .end = 0x9139F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_FCC1, - .end = SIU_INT_FCC1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_FCC2] = { - .name = "fsl-cpm-fcc", - .id = 2, - .num_resources = 3, - .resource = (struct resource[]) { - { - .start = 0x91320, - .end = 0x9133F, - .flags = IORESOURCE_MEM, - }, - { - .start = 0x913A0, - .end = 0x913CF, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_FCC2, - .end = SIU_INT_FCC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_FCC3] = { - .name = "fsl-cpm-fcc", - .id = 3, - .num_resources = 3, - .resource = (struct resource[]) { - { - .start = 0x91340, - .end = 0x9135F, - .flags = IORESOURCE_MEM, - }, - { - .start = 0x913D0, - .end = 0x913FF, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_FCC3, - .end = SIU_INT_FCC3, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_I2C] = { - .name = "fsl-cpm-i2c", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91860, - .end = 0x918BF, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_I2C, - .end = SIU_INT_I2C, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SCC1] = { - .name = "fsl-cpm-scc", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91A00, - .end = 0x91A1F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SCC1, - .end = SIU_INT_SCC1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SCC2] = { - .name = "fsl-cpm-scc", - .id = 2, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91A20, - .end = 0x91A3F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SCC2, - .end = SIU_INT_SCC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SCC3] = { - .name = "fsl-cpm-scc", - .id = 3, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91A40, - .end = 0x91A5F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SCC3, - .end = SIU_INT_SCC3, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SCC4] = { - .name = "fsl-cpm-scc", - .id = 4, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91A60, - .end = 0x91A7F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SCC4, - .end = SIU_INT_SCC4, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SPI] = { - .name = "fsl-cpm-spi", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91AA0, - .end = 0x91AFF, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SPI, - .end = SIU_INT_SPI, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_MCC1] = { - .name = "fsl-cpm-mcc", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91B30, - .end = 0x91B3F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_MCC1, - .end = SIU_INT_MCC1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_MCC2] = { - .name = "fsl-cpm-mcc", - .id = 2, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91B50, - .end = 0x91B5F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_MCC2, - .end = SIU_INT_MCC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SMC1] = { - .name = "fsl-cpm-smc", - .id = 1, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91A80, - .end = 0x91A8F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SMC1, - .end = SIU_INT_SMC1, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_SMC2] = { - .name = "fsl-cpm-smc", - .id = 2, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91A90, - .end = 0x91A9F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_SMC2, - .end = SIU_INT_SMC2, - .flags = IORESOURCE_IRQ, - }, - }, - }, - [MPC85xx_CPM_USB] = { - .name = "fsl-cpm-usb", - .id = 2, - .num_resources = 2, - .resource = (struct resource[]) { - { - .start = 0x91B60, - .end = 0x91B7F, - .flags = IORESOURCE_MEM, - }, - { - .start = SIU_INT_USB, - .end = SIU_INT_USB, - .flags = IORESOURCE_IRQ, - }, - }, - }, -#endif /* CONFIG_CPM2 */ -}; - -static int __init mach_mpc85xx_fixup(struct platform_device *pdev) -{ - ppc_sys_fixup_mem_resource(pdev, CCSRBAR); - return 0; -} - -static int __init mach_mpc85xx_init(void) -{ - ppc_sys_device_fixup = mach_mpc85xx_fixup; - return 0; -} - -postcore_initcall(mach_mpc85xx_init); diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_sys.c b/arch/ppc/platforms/85xx/mpc85xx_sys.c --- a/arch/ppc/platforms/85xx/mpc85xx_sys.c 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,118 +0,0 @@ -/* - * arch/ppc/platforms/85xx/mpc85xx_sys.c - * - * MPC85xx System descriptions - * - * Maintainer: Kumar Gala - * - * Copyright 2005 Freescale Semiconductor Inc. - * - * 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. - */ - -#include -#include -#include -#include - -struct ppc_sys_spec *cur_ppc_sys_spec; -struct ppc_sys_spec ppc_sys_specs[] = { - { - .ppc_sys_name = "8540", - .mask = 0xFFFF0000, - .value = 0x80300000, - .num_devices = 10, - .device_list = (enum ppc_sys_devices[]) - { - MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1, - MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, - MPC85xx_PERFMON, MPC85xx_DUART, - }, - }, - { - .ppc_sys_name = "8560", - .mask = 0xFFFF0000, - .value = 0x80700000, - .num_devices = 19, - .device_list = (enum ppc_sys_devices[]) - { - MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, - MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, - MPC85xx_PERFMON, - MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1, - MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, MPC85xx_CPM_SCC4, - MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3, - MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2, - }, - }, - { - .ppc_sys_name = "8541", - .mask = 0xFFFF0000, - .value = 0x80720000, - .num_devices = 13, - .device_list = (enum ppc_sys_devices[]) - { - MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, - MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, - MPC85xx_PERFMON, MPC85xx_DUART, - MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, - MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, - }, - }, - { - .ppc_sys_name = "8541E", - .mask = 0xFFFF0000, - .value = 0x807A0000, - .num_devices = 14, - .device_list = (enum ppc_sys_devices[]) - { - MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, - MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, - MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, - MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, - MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, - }, - }, - { - .ppc_sys_name = "8555", - .mask = 0xFFFF0000, - .value = 0x80710000, - .num_devices = 20, - .device_list = (enum ppc_sys_devices[]) - { - MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, - MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, - MPC85xx_PERFMON, MPC85xx_DUART, - MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1, - MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, - MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3, - MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2, - MPC85xx_CPM_USB, - }, - }, - { - .ppc_sys_name = "8555E", - .mask = 0xFFFF0000, - .value = 0x80790000, - .num_devices = 21, - .device_list = (enum ppc_sys_devices[]) - { - MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, - MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, - MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, - MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1, - MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, - MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3, - MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2, - MPC85xx_CPM_USB, - }, - }, - { /* default match */ - .ppc_sys_name = "", - .mask = 0x00000000, - .value = 0x00000000, - }, -}; diff -Nru a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c --- a/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-30 16:58:49 -08:00 @@ -129,7 +129,6 @@ pvid = mfspr(SPRN_PVR); svid = mfspr(SPRN_SVR); - seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Wind River\n"); seq_printf(m, "Machine\t\t: SBC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); diff -Nru a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c --- a/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-30 16:58:49 -08:00 @@ -268,7 +268,6 @@ memsize = total_memory; - seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: RPC Electronics STx \n"); seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000, diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile --- a/arch/ppc/platforms/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/Makefile 2005-03-30 16:58:50 -08:00 @@ -12,7 +12,8 @@ obj-$(CONFIG_PPC_PMAC) += pmac_pic.o pmac_setup.o pmac_time.o \ pmac_feature.o pmac_pci.o pmac_sleep.o \ pmac_low_i2c.o pmac_cache.o -obj-$(CONFIG_PPC_CHRP) += chrp_setup.o chrp_time.o chrp_pci.o +obj-$(CONFIG_PPC_CHRP) += chrp_setup.o chrp_time.o chrp_pci.o \ + chrp_pegasos_eth.o obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o ifeq ($(CONFIG_PPC_PMAC),y) obj-$(CONFIG_NVRAM) += pmac_nvram.o @@ -30,6 +31,7 @@ obj-$(CONFIG_K2) += k2.o obj-$(CONFIG_LOPEC) += lopec.o obj-$(CONFIG_KATANA) += katana.o +obj-$(CONFIG_HDPU) += hdpu.o obj-$(CONFIG_MCPN765) += mcpn765.o obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o obj-$(CONFIG_MVME5100) += mvme5100.o diff -Nru a/arch/ppc/platforms/chestnut.h b/arch/ppc/platforms/chestnut.h --- a/arch/ppc/platforms/chestnut.h 2005-03-30 16:58:51 -08:00 +++ b/arch/ppc/platforms/chestnut.h 2005-03-30 16:58:51 -08:00 @@ -28,8 +28,8 @@ * 0xffd00000-0xffd00004 - CPLD * 0xffc00000-0xffc0000f - UART * 0xffb00000-0xffb07fff - FRAM - * 0xffa00000-0xffafffff - *** HOLE *** - * 0xff800000-0xff9fffff - MV64460 Integrated SRAM + * 0xff840000-0xffafffff - *** HOLE *** + * 0xff800000-0xff83ffff - MV64460 Integrated SRAM * 0xfe000000-0xff8fffff - *** HOLE *** * 0xfc000000-0xfdffffff - 32bit Flash * 0xf1010000-0xfbffffff - *** HOLE *** diff -Nru a/arch/ppc/platforms/chrp_pegasos_eth.c b/arch/ppc/platforms/chrp_pegasos_eth.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/chrp_pegasos_eth.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,101 @@ +/* + * arch/ppc/platforms/chrp_pegasos_eth.c + * + * Copyright (C) 2005 Sven Luther + * Thanks to : + * Dale Farnsworth + * Mark A. Greer + * Nicolas DET + * Benjamin Herrenschmidt + * And anyone else who helped me on this. + */ + +#include +#include +#include +#include +#include +#include + +/* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */ +static struct resource mv643xx_eth_shared_resources[] = { + [0] = { + .name = "ethernet shared base", + .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS, + .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS + + MV643XX_ETH_SHARED_REGS_SIZE - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device mv643xx_eth_shared_device = { + .name = MV643XX_ETH_SHARED_NAME, + .id = 0, + .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources), + .resource = mv643xx_eth_shared_resources, +}; + +static struct resource mv643xx_eth0_resources[] = { + [0] = { + .name = "eth0 irq", + .start = 9, + .end = 9, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct mv643xx_eth_platform_data eth0_pd; + +static struct platform_device eth0_device = { + .name = MV643XX_ETH_NAME, + .id = 0, + .num_resources = ARRAY_SIZE(mv643xx_eth0_resources), + .resource = mv643xx_eth0_resources, + .dev = { + .platform_data = ð0_pd, + }, +}; + +static struct resource mv643xx_eth1_resources[] = { + [0] = { + .name = "eth1 irq", + .start = 9, + .end = 9, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct mv643xx_eth_platform_data eth1_pd; + +static struct platform_device eth1_device = { + .name = MV643XX_ETH_NAME, + .id = 1, + .num_resources = ARRAY_SIZE(mv643xx_eth1_resources), + .resource = mv643xx_eth1_resources, + .dev = { + .platform_data = ð1_pd, + }, +}; + +static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { + &mv643xx_eth_shared_device, + ð0_device, + ð1_device, +}; + + +int +mv643xx_eth_add_pds(void) +{ + int ret = 0; + static struct pci_device_id pci_marvell_mv64360[] = { + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) }, + { } + }; + + if (pci_dev_present(pci_marvell_mv64360)) { + ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs)); + } + return ret; +} +device_initcall(mv643xx_eth_add_pds); diff -Nru a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c --- a/arch/ppc/platforms/chrp_setup.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/chrp_setup.c 2005-03-30 16:58:50 -08:00 @@ -527,6 +527,8 @@ ppc_md.init = chrp_init2; + ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; + ppc_md.restart = chrp_restart; ppc_md.power_off = chrp_power_off; ppc_md.halt = chrp_halt; diff -Nru a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c --- a/arch/ppc/platforms/cpci690.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/platforms/cpci690.c 2005-03-30 16:58:47 -08:00 @@ -60,8 +60,7 @@ const long min_idsel = 20, max_idsel = 20, irqs_per_slot = 4; return PCI_IRQ_TABLE_LOOKUP; - } - else { + } else { static char pci_irq_table[][4] = /* * PCI IDSEL/INTPIN->INTLINE @@ -79,18 +78,12 @@ } static int -cpci690_get_bus_speed(void) -{ - return 133333333; -} - -static int cpci690_get_cpu_speed(void) { unsigned long hid1; hid1 = mfspr(SPRN_HID1) >> 28; - return cpci690_get_bus_speed() * cpu_7xx[hid1]/2; + return CPCI690_BUS_FREQ * cpu_7xx[hid1]/2; } #define KB (1024UL) @@ -226,8 +219,6 @@ bh.hose_b->last_busno = 0xff; bh.hose_b->last_busno = pciauto_bus_scan(bh.hose_b, bh.hose_b->first_busno); - - return; } static void __init @@ -285,8 +276,6 @@ /* Route MPP interrupt inputs to GPP */ mv64x60_write(&bh, MV64x60_MPP_CNTL_2, 0x00000000); mv64x60_write(&bh, MV64x60_MPP_CNTL_3, 0x00000000); - - return; } static void __init @@ -326,8 +315,6 @@ if (ppc_md.progress) ppc_md.progress("cpci690_setup_arch: exit", 0); - - return; } /* Platform device data fixup routines. */ @@ -340,11 +327,9 @@ pdata = (struct mpsc_pdata *)pdev->dev.platform_data; pdata->max_idle = 40; - pdata->default_baud = 9600; - pdata->brg_clk_src = 8; - pdata->brg_clk_freq = 133000000; - - return; + pdata->default_baud = CPCI690_MPSC_BAUD; + pdata->brg_clk_src = CPCI690_MPSC_CLK_SRC; + pdata->brg_clk_freq = CPCI690_BUS_FREQ; } static int __init @@ -354,8 +339,8 @@ char *bus_id; void ((*rtn)(struct platform_device *pdev)); } dev_map[] = { - { MPSC_CTLR_NAME "0", cpci690_fixup_mpsc_pdata }, - { MPSC_CTLR_NAME "1", cpci690_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".0", cpci690_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".1", cpci690_fixup_mpsc_pdata }, }; struct platform_device *pdev; int i; @@ -412,7 +397,7 @@ seq_printf(m, "vendor\t\t: " BOARD_VENDOR "\n"); seq_printf(m, "machine\t\t: " BOARD_MACHINE "\n"); seq_printf(m, "cpu MHz\t\t: %d\n", cpci690_get_cpu_speed()/1000/1000); - seq_printf(m, "bus MHz\t\t: %d\n", cpci690_get_bus_speed()/1000/1000); + seq_printf(m, "bus MHz\t\t: %d\n", CPCI690_BUS_FREQ/1000/1000); return 0; } @@ -422,15 +407,13 @@ { ulong freq; - freq = cpci690_get_bus_speed()/4; + freq = CPCI690_BUS_FREQ / 4; printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", freq/1000000, freq%1000000); tb_ticks_per_jiffy = freq / HZ; tb_to_us = mulhwu_scale_factor(freq, 1000000); - - return; } static __inline__ void @@ -444,8 +427,6 @@ mtspr(SPRN_DBAT1U, addr | size | 0x2); /* Vs == 1; Vp == 0 */ mtspr(SPRN_DBAT1L, addr | 0x2a); /* WIMG bits == 0101; PP == r/w access */ mb(); - - return; } #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) @@ -507,6 +488,4 @@ #if defined(CONFIG_SERIAL_MPSC) platform_notify = cpci690_platform_notify; #endif - - return; } diff -Nru a/arch/ppc/platforms/cpci690.h b/arch/ppc/platforms/cpci690.h --- a/arch/ppc/platforms/cpci690.h 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/platforms/cpci690.h 2005-03-30 16:58:49 -08:00 @@ -70,4 +70,9 @@ #define CPCI690_IPMI_SIZE max(GT64260_WINDOW_SIZE_MIN, \ CPCI690_IPMI_SIZE_ACTUAL) +#define CPCI690_MPSC_BAUD 9600 +#define CPCI690_MPSC_CLK_SRC 8 /* TCLK */ + +#define CPCI690_BUS_FREQ 133333333 + #endif /* __PPC_PLATFORMS_CPCI690_H */ diff -Nru a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c --- a/arch/ppc/platforms/ev64260.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/platforms/ev64260.c 2005-03-30 16:58:48 -08:00 @@ -80,7 +80,7 @@ { unsigned long pvr, hid1, pll_ext; - pvr = SPRN_VER(mfspr(SPRN_PVR)); + pvr = PVR_VER(mfspr(SPRN_PVR)); if (pvr != PVR_VER(PVR_7450)) { hid1 = mfspr(SPRN_HID1) >> 28; @@ -422,8 +422,8 @@ char *bus_id; void ((*rtn)(struct platform_device *pdev)); } dev_map[] = { - { MPSC_CTLR_NAME "0", ev64260_fixup_mpsc_pdata }, - { MPSC_CTLR_NAME "1", ev64260_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".0", ev64260_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".1", ev64260_fixup_mpsc_pdata }, }; struct platform_device *pdev; int i; diff -Nru a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/hdpu.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,1062 @@ + +/* + * arch/ppc/platforms/hdpu_setup.c + * + * Board setup routines for the Sky Computers HDPU Compute Blade. + * + * Written by Brian Waite + * + * Based on code done by - Mark A. Greer + * Rabeeh Khoury - rabeeh@galileo.co.il + * + * 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. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BOARD_VENDOR "Sky Computers" +#define BOARD_MACHINE "HDPU-CB-A" + +bd_t ppcboot_bd; +int ppcboot_bd_valid = 0; + +static mv64x60_handle_t bh; + +extern char cmd_line[]; + +unsigned long hdpu_find_end_of_memory(void); +void hdpu_mpsc_progress(char *s, unsigned short hex); +void hdpu_heartbeat(void); + +static void parse_bootinfo(unsigned long r3, + unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7); +static void hdpu_set_l1pe(void); +static void hdpu_cpustate_set(unsigned char new_state); +#ifdef CONFIG_SMP +static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED; +static unsigned int timebase_upper = 0, timebase_lower = 0; +extern int smp_tb_synchronized; + +void __devinit hdpu_tben_give(void); +void __devinit hdpu_tben_take(void); +#endif + +static int __init +hdpu_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); + + if (hose->index == 0) { + static char pci_irq_table[][4] = { + {HDPU_PCI_0_IRQ, 0, 0, 0}, + {HDPU_PCI_0_IRQ, 0, 0, 0}, + }; + + const long min_idsel = 1, max_idsel = 2, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; + } else { + static char pci_irq_table[][4] = { + {HDPU_PCI_1_IRQ, 0, 0, 0}, + }; + + const long min_idsel = 1, max_idsel = 1, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; + } +} + +static void __init hdpu_intr_setup(void) +{ + mv64x60_write(&bh, MV64x60_GPP_IO_CNTL, + (1 | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | + (1 << 6) | (1 << 7) | (1 << 12) | (1 << 16) | + (1 << 18) | (1 << 19) | (1 << 20) | (1 << 21) | + (1 << 22) | (1 << 23) | (1 << 24) | (1 << 25) | + (1 << 26) | (1 << 27) | (1 << 28) | (1 << 29))); + + /* XXXX Erranum FEr PCI-#8 */ + mv64x60_clr_bits(&bh, MV64x60_PCI0_CMD, (1 << 5) | (1 << 9)); + mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, (1 << 5) | (1 << 9)); + + /* + * Dismiss and then enable interrupt on GPP interrupt cause + * for CPU #0 + */ + mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, ~((1 << 8) | (1 << 13))); + mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK, (1 << 8) | (1 << 13)); + + /* + * Dismiss and then enable interrupt on CPU #0 high cause reg + * BIT25 summarizes GPP interrupts 8-15 + */ + mv64x60_set_bits(&bh, MV64360_IC_CPU0_INTR_MASK_HI, (1 << 25)); +} + +static void __init hdpu_setup_peripherals(void) +{ + unsigned int val; + + mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, + HDPU_EMB_FLASH_BASE, HDPU_EMB_FLASH_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); + + mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, + HDPU_TBEN_BASE, HDPU_TBEN_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN); + + mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, + HDPU_NEXUS_ID_BASE, HDPU_NEXUS_ID_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); + + mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, + HDPU_INTERNAL_SRAM_BASE, + HDPU_INTERNAL_SRAM_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); + + bh.ci->disable_window_32bit(&bh, MV64x60_ENET2MEM_4_WIN); + mv64x60_set_32bit_window(&bh, MV64x60_ENET2MEM_4_WIN, 0, 0, 0); + + mv64x60_clr_bits(&bh, MV64x60_PCI0_PCI_DECODE_CNTL, (1 << 3)); + mv64x60_clr_bits(&bh, MV64x60_PCI1_PCI_DECODE_CNTL, (1 << 3)); + mv64x60_clr_bits(&bh, MV64x60_TIMR_CNTR_0_3_CNTL, + ((1 << 0) | (1 << 8) | (1 << 16) | (1 << 24))); + + /* Enable pipelining */ + mv64x60_set_bits(&bh, MV64x60_CPU_CONFIG, (1 << 13)); + /* Enable Snoop Pipelineing */ + mv64x60_set_bits(&bh, MV64360_D_UNIT_CONTROL_HIGH, (1 << 24)); + + /* + * Change DRAM read buffer assignment. + * Assign read buffer 0 dedicated only for CPU, + * and the rest read buffer 1. + */ + val = mv64x60_read(&bh, MV64360_SDRAM_CONFIG); + val = val & 0x03ffffff; + val = val | 0xf8000000; + mv64x60_write(&bh, MV64360_SDRAM_CONFIG, val); + + /* + * Configure internal SRAM - + * Cache coherent write back, if CONFIG_MV64360_SRAM_CACHE_COHERENT set + * Parity enabled. + * Parity error propagation + * Arbitration not parked for CPU only + * Other bits are reserved. + */ +#ifdef CONFIG_MV64360_SRAM_CACHE_COHERENT + mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x001600b2); +#else + mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x001600b0); +#endif + + hdpu_intr_setup(); +} + +static void __init hdpu_setup_bridge(void) +{ + struct mv64x60_setup_info si; + int i; + + memset(&si, 0, sizeof(si)); + + si.phys_reg_base = HDPU_BRIDGE_REG_BASE; + si.pci_0.enable_bus = 1; + si.pci_0.pci_io.cpu_base = HDPU_PCI0_IO_START_PROC_ADDR; + si.pci_0.pci_io.pci_base_hi = 0; + si.pci_0.pci_io.pci_base_lo = HDPU_PCI0_IO_START_PCI_ADDR; + si.pci_0.pci_io.size = HDPU_PCI0_IO_SIZE; + si.pci_0.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE; + si.pci_0.pci_mem[0].cpu_base = HDPU_PCI0_MEM_START_PROC_ADDR; + si.pci_0.pci_mem[0].pci_base_hi = HDPU_PCI0_MEM_START_PCI_HI_ADDR; + si.pci_0.pci_mem[0].pci_base_lo = HDPU_PCI0_MEM_START_PCI_LO_ADDR; + si.pci_0.pci_mem[0].size = HDPU_PCI0_MEM_SIZE; + si.pci_0.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE; + si.pci_0.pci_cmd_bits = 0; + si.pci_0.latency_timer = 0x80; + + si.pci_1.enable_bus = 1; + si.pci_1.pci_io.cpu_base = HDPU_PCI1_IO_START_PROC_ADDR; + si.pci_1.pci_io.pci_base_hi = 0; + si.pci_1.pci_io.pci_base_lo = HDPU_PCI1_IO_START_PCI_ADDR; + si.pci_1.pci_io.size = HDPU_PCI1_IO_SIZE; + si.pci_1.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE; + si.pci_1.pci_mem[0].cpu_base = HDPU_PCI1_MEM_START_PROC_ADDR; + si.pci_1.pci_mem[0].pci_base_hi = HDPU_PCI1_MEM_START_PCI_HI_ADDR; + si.pci_1.pci_mem[0].pci_base_lo = HDPU_PCI1_MEM_START_PCI_LO_ADDR; + si.pci_1.pci_mem[0].size = HDPU_PCI1_MEM_SIZE; + si.pci_1.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE; + si.pci_1.pci_cmd_bits = 0; + si.pci_1.latency_timer = 0x80; + + for (i = 0; i < MV64x60_CPU2MEM_WINDOWS; i++) { +#if defined(CONFIG_NOT_COHERENT_CACHE) + si.cpu_prot_options[i] = 0; + si.enet_options[i] = MV64360_ENET2MEM_SNOOP_NONE; + si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE; + si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; + + si.pci_1.acc_cntl_options[i] = + MV64360_PCI_ACC_CNTL_SNOOP_NONE | + MV64360_PCI_ACC_CNTL_SWAP_NONE | + MV64360_PCI_ACC_CNTL_MBURST_128_BYTES | + MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; + + si.pci_0.acc_cntl_options[i] = + MV64360_PCI_ACC_CNTL_SNOOP_NONE | + MV64360_PCI_ACC_CNTL_SWAP_NONE | + MV64360_PCI_ACC_CNTL_MBURST_128_BYTES | + MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; + +#else + si.cpu_prot_options[i] = 0; + si.enet_options[i] = MV64360_ENET2MEM_SNOOP_WB; /* errata */ + si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_WB; /* errata */ + si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_WB; /* errata */ + + si.pci_0.acc_cntl_options[i] = + MV64360_PCI_ACC_CNTL_SNOOP_WB | + MV64360_PCI_ACC_CNTL_SWAP_NONE | + MV64360_PCI_ACC_CNTL_MBURST_32_BYTES | + MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; + + si.pci_1.acc_cntl_options[i] = + MV64360_PCI_ACC_CNTL_SNOOP_WB | + MV64360_PCI_ACC_CNTL_SWAP_NONE | + MV64360_PCI_ACC_CNTL_MBURST_32_BYTES | + MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; +#endif + } + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | CPUSTATE_KERNEL_INIT_PCI); + + /* Lookup PCI host bridges */ + mv64x60_init(&bh, &si); + pci_dram_offset = 0; /* System mem at same addr on PCI & cpu bus */ + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = hdpu_map_irq; + + mv64x60_set_bus(&bh, 0, 0); + bh.hose_a->first_busno = 0; + bh.hose_a->last_busno = 0xff; + bh.hose_a->last_busno = pciauto_bus_scan(bh.hose_a, 0); + + bh.hose_b->first_busno = bh.hose_a->last_busno + 1; + mv64x60_set_bus(&bh, 1, bh.hose_b->first_busno); + bh.hose_b->last_busno = 0xff; + bh.hose_b->last_busno = pciauto_bus_scan(bh.hose_b, + bh.hose_b->first_busno); + + ppc_md.pci_exclude_device = mv64x60_pci_exclude_device; + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | CPUSTATE_KERNEL_INIT_REG); + /* + * Enabling of PCI internal-vs-external arbitration + * is a platform- and errata-dependent decision. + */ + return; +} + +#if defined(CONFIG_SERIAL_MPSC_CONSOLE) +static void __init hdpu_early_serial_map(void) +{ +#ifdef CONFIG_KGDB + static char first_time = 1; + +#if defined(CONFIG_KGDB_TTYS0) +#define KGDB_PORT 0 +#elif defined(CONFIG_KGDB_TTYS1) +#define KGDB_PORT 1 +#else +#error "Invalid kgdb_tty port" +#endif + + if (first_time) { + gt_early_mpsc_init(KGDB_PORT, + B9600 | CS8 | CREAD | HUPCL | CLOCAL); + first_time = 0; + } + + return; +#endif +} +#endif + +static void hdpu_init2(void) +{ + return; +} + +#if defined(CONFIG_MV643XX_ETH) +static void __init hdpu_fixup_eth_pdata(struct platform_device *pd) +{ + + struct mv643xx_eth_platform_data *eth_pd; + eth_pd = pd->dev.platform_data; + + eth_pd->port_serial_control = + mv64x60_read(&bh, MV643XX_ETH_PORT_SERIAL_CONTROL_REG(pd->id) & ~1); + + eth_pd->force_phy_addr = 1; + eth_pd->phy_addr = pd->id; + eth_pd->tx_queue_size = 400; + eth_pd->rx_queue_size = 800; +} +#endif + +static void __init hdpu_fixup_mpsc_pdata(struct platform_device *pd) +{ + + struct mpsc_pdata *pdata; + + pdata = (struct mpsc_pdata *)pd->dev.platform_data; + + pdata->max_idle = 40; + if (ppcboot_bd_valid) + pdata->default_baud = ppcboot_bd.bi_baudrate; + else + pdata->default_baud = HDPU_DEFAULT_BAUD; + pdata->brg_clk_src = HDPU_MPSC_CLK_SRC; + pdata->brg_clk_freq = HDPU_MPSC_CLK_FREQ; +} + +#if defined(CONFIG_HDPU_FEATURES) +static void __init hdpu_fixup_cpustate_pdata(struct platform_device *pd) +{ + struct platform_device *pds[1]; + pds[0] = pd; + mv64x60_pd_fixup(&bh, pds, 1); +} +#endif + +static int __init hdpu_platform_notify(struct device *dev) +{ + static struct { + char *bus_id; + void ((*rtn) (struct platform_device * pdev)); + } dev_map[] = { + { + MPSC_CTLR_NAME ".0", hdpu_fixup_mpsc_pdata}, +#if defined(CONFIG_MV643XX_ETH) + { + MV643XX_ETH_NAME ".0", hdpu_fixup_eth_pdata}, +#endif +#if defined(CONFIG_HDPU_FEATURES) + { + HDPU_CPUSTATE_NAME ".0", hdpu_fixup_cpustate_pdata}, +#endif + }; + struct platform_device *pdev; + int i; + + if (dev && dev->bus_id) + for (i = 0; i < ARRAY_SIZE(dev_map); i++) + if (!strncmp(dev->bus_id, dev_map[i].bus_id, + BUS_ID_SIZE)) { + + pdev = container_of(dev, + struct platform_device, + dev); + dev_map[i].rtn(pdev); + } + + return 0; +} + +static void __init hdpu_setup_arch(void) +{ + if (ppc_md.progress) + ppc_md.progress("hdpu_setup_arch: enter", 0); +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_SDA2; +#endif + + ppc_md.heartbeat = hdpu_heartbeat; + + ppc_md.heartbeat_reset = HZ; + ppc_md.heartbeat_count = 1; + + if (ppc_md.progress) + ppc_md.progress("hdpu_setup_arch: Enabling L2 cache", 0); + + /* Enable L1 Parity Bits */ + hdpu_set_l1pe(); + + /* Enable L2 and L3 caches (if 745x) */ + _set_L2CR(0x80080000); + + if (ppc_md.progress) + ppc_md.progress("hdpu_setup_arch: enter", 0); + + hdpu_setup_bridge(); + + hdpu_setup_peripherals(); + +#ifdef CONFIG_SERIAL_MPSC_CONSOLE + hdpu_early_serial_map(); +#endif + + printk("SKY HDPU Compute Blade \n"); + + if (ppc_md.progress) + ppc_md.progress("hdpu_setup_arch: exit", 0); + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | CPUSTATE_KERNEL_OK); + return; +} +static void __init hdpu_init_irq(void) +{ + mv64360_init_irq(); +} + +static void __init hdpu_set_l1pe() +{ + unsigned long ictrl; + asm volatile ("mfspr %0, 1011":"=r" (ictrl):); + ictrl |= ICTRL_EICE | ICTRL_EDC | ICTRL_EICP; + asm volatile ("mtspr 1011, %0"::"r" (ictrl)); +} + +/* + * Set BAT 1 to map 0xf1000000 to end of physical memory space. + */ +static __inline__ void hdpu_set_bat(void) +{ + mb(); + mtspr(SPRN_DBAT1U, 0xf10001fe); + mtspr(SPRN_DBAT1L, 0xf100002a); + mb(); + + return; +} + +unsigned long __init hdpu_find_end_of_memory(void) +{ + return mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE, + MV64x60_TYPE_MV64360); +} + +static void hdpu_reset_board(void) +{ + volatile int infinite = 1; + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | CPUSTATE_KERNEL_RESET); + + local_irq_disable(); + + /* Clear all the LEDs */ + mv64x60_write(&bh, MV64x60_GPP_VALUE_CLR, ((1 << 4) | + (1 << 5) | (1 << 6))); + + /* disable and invalidate the L2 cache */ + _set_L2CR(0); + _set_L2CR(0x200000); + + /* flush and disable L1 I/D cache */ + __asm__ __volatile__ + ("\n" + "mfspr 3,1008\n" + "ori 5,5,0xcc00\n" + "ori 4,3,0xc00\n" + "andc 5,3,5\n" + "sync\n" + "mtspr 1008,4\n" + "isync\n" "sync\n" "mtspr 1008,5\n" "isync\n" "sync\n"); + + /* Hit the reset bit */ + mv64x60_write(&bh, MV64x60_GPP_VALUE_CLR, (1 << 3)); + + while (infinite) + infinite = infinite; + + return; +} + +static void hdpu_restart(char *cmd) +{ + volatile ulong i = 10000000; + + hdpu_reset_board(); + + while (i-- > 0) ; + panic("restart failed\n"); +} + +static void hdpu_halt(void) +{ + local_irq_disable(); + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | CPUSTATE_KERNEL_HALT); + + /* Clear all the LEDs */ + mv64x60_write(&bh, MV64x60_GPP_VALUE_CLR, ((1 << 4) | (1 << 5) | + (1 << 6))); + while (1) ; + /* NOTREACHED */ +} + +static void hdpu_power_off(void) +{ + hdpu_halt(); + /* NOTREACHED */ +} + +static int hdpu_show_cpuinfo(struct seq_file *m) +{ + uint pvid; + + pvid = mfspr(SPRN_PVR); + seq_printf(m, "vendor\t\t: Sky Computers\n"); + seq_printf(m, "machine\t\t: HDPU Compute Blade\n"); + seq_printf(m, "PVID\t\t: 0x%x, vendor: %s\n", + pvid, (pvid & (1 << 15) ? "IBM" : "Motorola")); + + return 0; +} + +static void __init hdpu_calibrate_decr(void) +{ + ulong freq; + + if (ppcboot_bd_valid) + freq = ppcboot_bd.bi_busfreq / 4; + else + freq = 133000000; + + printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", + freq / 1000000, freq % 1000000); + + tb_ticks_per_jiffy = freq / HZ; + tb_to_us = mulhwu_scale_factor(freq, 1000000); + + return; +} + +static void parse_bootinfo(unsigned long r3, + unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + bd_t *bd = NULL; + char *cmdline_start = NULL; + int cmdline_len = 0; + + if (r3) { + if ((r3 & 0xf0000000) == 0) + r3 += KERNELBASE; + if ((r3 & 0xf0000000) == KERNELBASE) { + bd = (void *)r3; + + memcpy(&ppcboot_bd, bd, sizeof(ppcboot_bd)); + ppcboot_bd_valid = 1; + } + } +#ifdef CONFIG_BLK_DEV_INITRD + if (r4 && r5 && r5 > r4) { + if ((r4 & 0xf0000000) == 0) + r4 += KERNELBASE; + if ((r5 & 0xf0000000) == 0) + r5 += KERNELBASE; + if ((r4 & 0xf0000000) == KERNELBASE) { + initrd_start = r4; + initrd_end = r5; + initrd_below_start_ok = 1; + } + } +#endif /* CONFIG_BLK_DEV_INITRD */ + + if (r6 && r7 && r7 > r6) { + if ((r6 & 0xf0000000) == 0) + r6 += KERNELBASE; + if ((r7 & 0xf0000000) == 0) + r7 += KERNELBASE; + if ((r6 & 0xf0000000) == KERNELBASE) { + cmdline_start = (void *)r6; + cmdline_len = (r7 - r6); + strncpy(cmd_line, cmdline_start, cmdline_len); + } + } +} + +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +static int hdpu_ide_check_region(ide_ioreg_t from, unsigned int extent) +{ + return check_region(from, extent); +} + +static void +hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) +{ + request_region(from, extent, name); + return; +} + +static void hdpu_ide_release_region(ide_ioreg_t from, unsigned int extent) +{ + release_region(from, extent); + return; +} + +static void __init +hdpu_ide_pci_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port, + ide_ioreg_t ctrl_port, int *irq) +{ + struct pci_dev *dev; + + pci_for_each_dev(dev) { + if (((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) || + ((dev->class >> 8) == PCI_CLASS_STORAGE_RAID)) { + hw->irq = dev->irq; + + if (irq != NULL) { + *irq = dev->irq; + } + } + } + + return; +} +#endif + +void hdpu_heartbeat(void) +{ + if (mv64x60_read(&bh, MV64x60_GPP_VALUE) & (1 << 5)) + mv64x60_write(&bh, MV64x60_GPP_VALUE_CLR, (1 << 5)); + else + mv64x60_write(&bh, MV64x60_GPP_VALUE_SET, (1 << 5)); + + ppc_md.heartbeat_count = ppc_md.heartbeat_reset; + +} + +static void __init hdpu_map_io(void) +{ + io_block_mapping(0xf1000000, 0xf1000000, 0x20000, _PAGE_IO); +} + +#ifdef CONFIG_SMP +char hdpu_smp0[] = "SMP Cpu #0"; +char hdpu_smp1[] = "SMP Cpu #1"; + +static irqreturn_t hdpu_smp_cpu0_int_handler(int irq, void *dev_id, + struct pt_regs *regs) +{ + volatile unsigned int doorbell; + + doorbell = mv64x60_read(&bh, MV64360_CPU0_DOORBELL); + + /* Ack the doorbell interrupts */ + mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, doorbell); + + if (doorbell & 1) { + smp_message_recv(0, regs); + } + if (doorbell & 2) { + smp_message_recv(1, regs); + } + if (doorbell & 4) { + smp_message_recv(2, regs); + } + if (doorbell & 8) { + smp_message_recv(3, regs); + } + return IRQ_HANDLED; +} + +static irqreturn_t hdpu_smp_cpu1_int_handler(int irq, void *dev_id, + struct pt_regs *regs) +{ + volatile unsigned int doorbell; + + doorbell = mv64x60_read(&bh, MV64360_CPU1_DOORBELL); + + /* Ack the doorbell interrupts */ + mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, doorbell); + + if (doorbell & 1) { + smp_message_recv(0, regs); + } + if (doorbell & 2) { + smp_message_recv(1, regs); + } + if (doorbell & 4) { + smp_message_recv(2, regs); + } + if (doorbell & 8) { + smp_message_recv(3, regs); + } + return IRQ_HANDLED; +} + +static void smp_hdpu_CPU_two(void) +{ + __asm__ __volatile__ + ("\n" + "lis 3,0x0000\n" + "ori 3,3,0x00c0\n" + "mtspr 26, 3\n" "li 4,0\n" "mtspr 27,4\n" "rfi"); + +} + +static int smp_hdpu_probe(void) +{ + int *cpu_count_reg; + int num_cpus = 0; + + cpu_count_reg = ioremap(HDPU_NEXUS_ID_BASE, HDPU_NEXUS_ID_SIZE); + if (cpu_count_reg) { + num_cpus = (*cpu_count_reg >> 20) & 0x3; + iounmap(cpu_count_reg); + } + + /* Validate the bits in the CPLD. If we could not map the reg, return 2. + * If the register reported 0 or 3, return 2. + * Older CPLD revisions set these bits to all ones (val = 3). + */ + if ((num_cpus < 1) || (num_cpus > 2)) { + printk + ("Unable to determine the number of processors %d . deafulting to 2.\n", + num_cpus); + num_cpus = 2; + } + return num_cpus; +} + +static void +smp_hdpu_message_pass(int target, int msg, unsigned long data, int wait) +{ + if (msg > 0x3) { + printk("SMP %d: smp_message_pass: unknown msg %d\n", + smp_processor_id(), msg); + return; + } + switch (target) { + case MSG_ALL: + mv64x60_write(&bh, MV64360_CPU0_DOORBELL, 1 << msg); + mv64x60_write(&bh, MV64360_CPU1_DOORBELL, 1 << msg); + break; + case MSG_ALL_BUT_SELF: + if (smp_processor_id()) + mv64x60_write(&bh, MV64360_CPU0_DOORBELL, 1 << msg); + else + mv64x60_write(&bh, MV64360_CPU1_DOORBELL, 1 << msg); + break; + default: + if (target == 0) + mv64x60_write(&bh, MV64360_CPU0_DOORBELL, 1 << msg); + else + mv64x60_write(&bh, MV64360_CPU1_DOORBELL, 1 << msg); + break; + } +} + +static void smp_hdpu_kick_cpu(int nr) +{ + volatile unsigned int *bootaddr; + + if (ppc_md.progress) + ppc_md.progress("smp_hdpu_kick_cpu", 0); + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | CPUSTATE_KERNEL_CPU1_KICK); + + /* Disable BootCS. Must also reduce the windows size to zero. */ + bh.ci->disable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); + mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, 0, 0, 0); + + bootaddr = ioremap(HDPU_INTERNAL_SRAM_BASE, HDPU_INTERNAL_SRAM_SIZE); + if (!bootaddr) { + if (ppc_md.progress) + ppc_md.progress("smp_hdpu_kick_cpu: ioremap failed", 0); + return; + } + + memcpy((void *)(bootaddr + 0x40), (void *)&smp_hdpu_CPU_two, 0x20); + + /* map SRAM to 0xfff00000 */ + bh.ci->disable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); + + mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, + 0xfff00000, HDPU_INTERNAL_SRAM_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); + + /* Enable CPU1 arbitration */ + mv64x60_clr_bits(&bh, MV64x60_CPU_MASTER_CNTL, (1 << 9)); + + /* + * Wait 100mSecond until other CPU has reached __secondary_start. + * When it reaches, it is permittable to rever the SRAM mapping etc... + */ + mdelay(100); + *(unsigned long *)KERNELBASE = nr; + asm volatile ("dcbf 0,%0"::"r" (KERNELBASE):"memory"); + + iounmap(bootaddr); + + /* Set up window for internal sram (256KByte insize) */ + bh.ci->disable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); + mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, + HDPU_INTERNAL_SRAM_BASE, + HDPU_INTERNAL_SRAM_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); + /* + * Set up windows for embedded FLASH (using boot CS window). + */ + + bh.ci->disable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); + mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, + HDPU_EMB_FLASH_BASE, HDPU_EMB_FLASH_SIZE, 0); + bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); +} + +static void smp_hdpu_setup_cpu(int cpu_nr) +{ + if (cpu_nr == 0) { + if (ppc_md.progress) + ppc_md.progress("smp_hdpu_setup_cpu 0", 0); + mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, 0xff); + mv64x60_write(&bh, MV64360_CPU0_DOORBELL_MASK, 0xff); + request_irq(60, hdpu_smp_cpu0_int_handler, + SA_INTERRUPT, hdpu_smp0, 0); + } + + if (cpu_nr == 1) { + if (ppc_md.progress) + ppc_md.progress("smp_hdpu_setup_cpu 1", 0); + + hdpu_cpustate_set(CPUSTATE_KERNEL_MAJOR | + CPUSTATE_KERNEL_CPU1_OK); + + /* Enable L1 Parity Bits */ + hdpu_set_l1pe(); + + /* Enable L2 cache */ + _set_L2CR(0); + _set_L2CR(0x80080000); + + mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, 0x0); + mv64x60_write(&bh, MV64360_CPU1_DOORBELL_MASK, 0xff); + request_irq(28, hdpu_smp_cpu1_int_handler, + SA_INTERRUPT, hdpu_smp1, 0); + } + +} + +void __devinit hdpu_tben_give() +{ + volatile unsigned long *val = 0; + + /* By writing 0 to the TBEN_BASE, the timebases is frozen */ + val = ioremap(HDPU_TBEN_BASE, 4); + *val = 0; + mb(); + + spin_lock(&timebase_lock); + timebase_upper = get_tbu(); + timebase_lower = get_tbl(); + spin_unlock(&timebase_lock); + + while (timebase_upper || timebase_lower) + barrier(); + + /* By writing 1 to the TBEN_BASE, the timebases is thawed */ + *val = 1; + mb(); + + iounmap(val); + +} + +void __devinit hdpu_tben_take() +{ + while (!(timebase_upper || timebase_lower)) + barrier(); + + spin_lock(&timebase_lock); + set_tb(timebase_upper, timebase_lower); + timebase_upper = 0; + timebase_lower = 0; + spin_unlock(&timebase_lock); +} + +static struct smp_ops_t hdpu_smp_ops = { + .message_pass = smp_hdpu_message_pass, + .probe = smp_hdpu_probe, + .kick_cpu = smp_hdpu_kick_cpu, + .setup_cpu = smp_hdpu_setup_cpu, + .give_timebase = hdpu_tben_give, + .take_timebase = hdpu_tben_take, +}; +#endif /* CONFIG_SMP */ + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + parse_bootinfo(r3, r4, r5, r6, r7); + + isa_mem_base = 0; + + ppc_md.setup_arch = hdpu_setup_arch; + ppc_md.init = hdpu_init2; + ppc_md.show_cpuinfo = hdpu_show_cpuinfo; + ppc_md.init_IRQ = hdpu_init_irq; + ppc_md.get_irq = mv64360_get_irq; + ppc_md.restart = hdpu_restart; + ppc_md.power_off = hdpu_power_off; + ppc_md.halt = hdpu_halt; + ppc_md.find_end_of_memory = hdpu_find_end_of_memory; + ppc_md.calibrate_decr = hdpu_calibrate_decr; + ppc_md.setup_io_mappings = hdpu_map_io; + + bh.p_base = CONFIG_MV64X60_NEW_BASE; + bh.v_base = (unsigned long *)bh.p_base; + + hdpu_set_bat(); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) + ppc_md.progress = hdpu_mpsc_progress; /* embedded UART */ + mv64x60_progress_init(bh.p_base); +#endif /* CONFIG_SERIAL_TEXT_DEBUG */ + +#ifdef CONFIG_SMP + ppc_md.smp_ops = &hdpu_smp_ops; +#endif /* CONFIG_SMP */ + +#if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) + platform_notify = hdpu_platform_notify; +#endif + return; +} + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) +/* SMP safe version of the serial text debug routine. Uses Semaphore 0 */ +void hdpu_mpsc_progress(char *s, unsigned short hex) +{ + while (mv64x60_read(&bh, MV64360_WHO_AM_I) != + mv64x60_read(&bh, MV64360_SEMAPHORE_0)) { + } + mv64x60_mpsc_progress(s, hex); + mv64x60_write(&bh, MV64360_SEMAPHORE_0, 0xff); +} +#endif + +static void hdpu_cpustate_set(unsigned char new_state) +{ + unsigned int state = (new_state << 21); + mv64x60_write(&bh, MV64x60_GPP_VALUE_CLR, (0xff << 21)); + mv64x60_write(&bh, MV64x60_GPP_VALUE_CLR, state); +} + +#ifdef CONFIG_MTD_PHYSMAP +static struct mtd_partition hdpu_partitions[] = { + { + .name = "Root FS", + .size = 0x03400000, + .offset = 0, + .mask_flags = 0, + },{ + .name = "User FS", + .size = 0x00800000, + .offset = 0x03400000, + .mask_flags = 0, + },{ + .name = "Kernel Image", + .size = 0x002C0000, + .offset = 0x03C00000, + .mask_flags = 0, + },{ + .name = "bootEnv", + .size = 0x00040000, + .offset = 0x03EC0000, + .mask_flags = 0, + },{ + .name = "bootROM", + .size = 0x00100000, + .offset = 0x03F00000, + .mask_flags = 0, + } +}; + +static int __init hdpu_setup_mtd(void) +{ + + physmap_set_partitions(hdpu_partitions, 5); + return 0; +} + +arch_initcall(hdpu_setup_mtd); +#endif + +#ifdef CONFIG_HDPU_FEATURES + +static struct resource hdpu_cpustate_resources[] = { + [0] = { + .name = "addr base", + .start = MV64x60_GPP_VALUE_SET, + .end = MV64x60_GPP_VALUE_CLR + 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct resource hdpu_nexus_resources[] = { + [0] = { + .name = "nexus register", + .start = HDPU_NEXUS_ID_BASE, + .end = HDPU_NEXUS_ID_BASE + HDPU_NEXUS_ID_SIZE, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device hdpu_cpustate_device = { + .name = HDPU_CPUSTATE_NAME, + .id = 0, + .num_resources = ARRAY_SIZE(hdpu_cpustate_resources), + .resource = hdpu_cpustate_resources, +}; + +static struct platform_device hdpu_nexus_device = { + .name = HDPU_NEXUS_NAME, + .id = 0, + .num_resources = ARRAY_SIZE(hdpu_nexus_resources), + .resource = hdpu_nexus_resources, +}; + +static int __init hdpu_add_pds(void) +{ + platform_device_register(&hdpu_cpustate_device); + platform_device_register(&hdpu_nexus_device); + return 0; +} + +arch_initcall(hdpu_add_pds); +#endif diff -Nru a/arch/ppc/platforms/hdpu.h b/arch/ppc/platforms/hdpu.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/hdpu.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,82 @@ +/* + * arch/ppc/platforms/hdpu.h + * + * Definitions for Sky Computers HDPU board. + * + * Brian Waite + * + * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il + * Based on code done by Mark A. Greer + * Based on code done by Tim Montgomery + * + * + * 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. + */ + +/* + * The MV64360 has 2 PCI buses each with 1 window from the CPU bus to + * PCI I/O space and 4 windows from the CPU bus to PCI MEM space. + * We'll only use one PCI MEM window on each PCI bus. + * + * This is the CPU physical memory map (windows must be at least 64K and start + * on a boundary that is a multiple of the window size): + * + * 0x80000000-0x8fffffff - PCI 0 MEM + * 0xa0000000-0xafffffff - PCI 1 MEM + * 0xc0000000-0xc0ffffff - PCI 0 I/O + * 0xc1000000-0xc1ffffff - PCI 1 I/O + + * 0xf1000000-0xf100ffff - MV64360 Registers + * 0xf1010000-0xfb9fffff - HOLE + * 0xfbfa0000-0xfbfaffff - TBEN + * 0xfbf00000-0xfbfbffff - NEXUS + * 0xfbfc0000-0xfbffffff - Internal SRAM + * 0xfc000000-0xffffffff - Boot window + */ + +#ifndef __PPC_PLATFORMS_HDPU_H +#define __PPC_PLATFORMS_HDPU_H + +/* CPU Physical Memory Map setup. */ +#define HDPU_BRIDGE_REG_BASE 0xf1000000 + +#define HDPU_TBEN_BASE 0xfbfa0000 +#define HDPU_TBEN_SIZE 0x00010000 +#define HDPU_NEXUS_ID_BASE 0xfbfb0000 +#define HDPU_NEXUS_ID_SIZE 0x00010000 +#define HDPU_INTERNAL_SRAM_BASE 0xfbfc0000 +#define HDPU_INTERNAL_SRAM_SIZE 0x00040000 +#define HDPU_EMB_FLASH_BASE 0xfc000000 +#define HDPU_EMB_FLASH_SIZE 0x04000000 + +/* PCI Mappings */ + +#define HDPU_PCI0_MEM_START_PROC_ADDR 0x80000000 +#define HDPU_PCI0_MEM_START_PCI_HI_ADDR 0x00000000 +#define HDPU_PCI0_MEM_START_PCI_LO_ADDR HDPU_PCI0_MEM_START_PROC_ADDR +#define HDPU_PCI0_MEM_SIZE 0x10000000 + +#define HDPU_PCI1_MEM_START_PROC_ADDR 0xc0000000 +#define HDPU_PCI1_MEM_START_PCI_HI_ADDR 0x00000000 +#define HDPU_PCI1_MEM_START_PCI_LO_ADDR HDPU_PCI1_MEM_START_PROC_ADDR +#define HDPU_PCI1_MEM_SIZE 0x20000000 + +#define HDPU_PCI0_IO_START_PROC_ADDR 0xc0000000 +#define HDPU_PCI0_IO_START_PCI_ADDR 0x00000000 +#define HDPU_PCI0_IO_SIZE 0x01000000 + +#define HDPU_PCI1_IO_START_PROC_ADDR 0xc1000000 +#define HDPU_PCI1_IO_START_PCI_ADDR 0x01000000 +#define HDPU_PCI1_IO_SIZE 0x01000000 + +#define HDPU_DEFAULT_BAUD 115200 +#define HDPU_MPSC_CLK_SRC 8 /* TCLK */ +#define HDPU_MPSC_CLK_FREQ 133000000 /* 133 Mhz */ + +#define HDPU_PCI_0_IRQ (8+64) +#define HDPU_PCI_1_IRQ (13+64) + +#endif /* __PPC_PLATFORMS_HDPU_H */ diff -Nru a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c --- a/arch/ppc/platforms/katana.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/katana.c 2005-03-30 16:58:50 -08:00 @@ -521,13 +521,13 @@ void ((*rtn)(struct platform_device *pdev)); } dev_map[] = { #if defined(CONFIG_SERIAL_MPSC) - { MPSC_CTLR_NAME "0", katana_fixup_mpsc_pdata }, - { MPSC_CTLR_NAME "1", katana_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".0", katana_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".1", katana_fixup_mpsc_pdata }, #endif #if defined(CONFIG_MV643XX_ETH) - { MV643XX_ETH_NAME "0", katana_fixup_eth_pdata }, - { MV643XX_ETH_NAME "1", katana_fixup_eth_pdata }, - { MV643XX_ETH_NAME "2", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME ".0", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME ".1", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME ".2", katana_fixup_eth_pdata }, #endif }; struct platform_device *pdev; diff -Nru a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h --- a/arch/ppc/platforms/katana.h 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/katana.h 2005-03-30 16:58:50 -08:00 @@ -24,7 +24,7 @@ * on a boundary that is a multiple of the window size): * * 0xff800000-0xffffffff - Boot window - * 0xf8400000-0xf85fffff - Internal SRAM + * 0xf8400000-0xf843ffff - Internal SRAM * 0xf8200000-0xf83fffff - CPLD * 0xf8100000-0xf810ffff - MV64360 Registers (CONFIG_MV64X60_NEW_BASE) * 0xf8000000-0xf80fffff - Socketed FLASH diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c --- a/arch/ppc/platforms/lite5200.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/platforms/lite5200.c 2005-03-30 16:58:47 -08:00 @@ -35,6 +35,8 @@ #include #include +#include + extern int powersave_nap; @@ -53,7 +55,7 @@ * driver ( eg drivers/serial/mpc52xx_uart.c for the PSC in uart mode ) */ -struct ocp_def board_ocp[] = { +static struct ocp_def board_ocp[] = { { .vendor = OCP_VENDOR_FREESCALE, .function = OCP_FUNC_PSC_UART, @@ -79,22 +81,40 @@ return 0; } +#ifdef CONFIG_PCI +static int +lite5200_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + return (pin == 1) && (idsel==24) ? MPC52xx_IRQ0 : -1; +} +#endif + static void __init lite5200_setup_cpu(void) { - struct mpc52xx_intr *intr; + struct mpc52xx_intr __iomem *intr; + struct mpc52xx_xlb __iomem *xlb; u32 intr_ctrl; /* Map zones */ - intr = (struct mpc52xx_intr *) - ioremap(MPC52xx_INTR,sizeof(struct mpc52xx_intr)); + xlb = ioremap(MPC52xx_XLB,sizeof(struct mpc52xx_xlb)); + intr = ioremap(MPC52xx_INTR,sizeof(struct mpc52xx_intr)); - if (!intr) { - printk("lite5200.c: Error while mapping INTR during lite5200_setup_cpu\n"); + if (!xlb || !intr) { + printk("lite5200.c: Error while mapping XLB/INTR during " + "lite5200_setup_cpu\n"); goto unmap_regs; } + /* Configure the XLB Arbiter */ + out_be32(&xlb->master_pri_enable, 0xff); + out_be32(&xlb->master_priority, 0x11111111); + + /* Enable ram snooping for 1GB window */ + out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_SNOOP); + out_be32(&xlb->snoop_window, MPC52xx_PCI_TARGET_MEM | 0x1d); + /* IRQ[0-3] setup : IRQ0 - Level Active Low */ /* IRQ[1-3] - Level Active High */ intr_ctrl = in_be32(&intr->ctrl); @@ -104,6 +124,7 @@ /* Unmap reg zone */ unmap_regs: + if (xlb) iounmap(xlb); if (intr) iounmap(intr); } @@ -115,6 +136,11 @@ /* CPU & Port mux setup */ lite5200_setup_cpu(); + +#ifdef CONFIG_PCI + /* PCI Bridge setup */ + mpc52xx_find_bridges(); +#endif } void __init @@ -153,7 +179,7 @@ /* BAT setup */ mpc52xx_set_bat(); - /* No ISA bus AFAIK */ + /* No ISA bus by default */ isa_io_base = 0; isa_mem_base = 0; @@ -166,6 +192,10 @@ ppc_md.show_percpuinfo = NULL; ppc_md.init_IRQ = mpc52xx_init_irq; ppc_md.get_irq = mpc52xx_get_irq; + +#ifdef CONFIG_PCI + ppc_md.pci_map_irq = lite5200_map_irq; +#endif ppc_md.find_end_of_memory = mpc52xx_find_end_of_memory; ppc_md.setup_io_mappings = mpc52xx_map_io; diff -Nru a/arch/ppc/platforms/mpc5200.c b/arch/ppc/platforms/mpc5200.c --- a/arch/ppc/platforms/mpc5200.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/platforms/mpc5200.c 2005-03-30 16:58:47 -08:00 @@ -17,7 +17,7 @@ #include -struct ocp_fs_i2c_data mpc5200_i2c_def = { +static struct ocp_fs_i2c_data mpc5200_i2c_def = { .flags = FS_I2C_CLOCK_5200, }; diff -Nru a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c --- a/arch/ppc/platforms/pmac_cpufreq.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/platforms/pmac_cpufreq.c 2005-03-30 16:58:49 -08:00 @@ -464,20 +464,22 @@ u32 *reg; struct cpufreq_driver *driver = &pmac_cpufreq_driver; - /* OF only reports the high frequency */ - hi_freq = cur_freq; - low_freq = cur_freq/2; - driver->get = dfs_get_cpu_speed; - cur_freq = driver->get(0); - + /* Look for voltage GPIO */ volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select"); + reg = (u32 *)get_property(volt_gpio_np, "reg", NULL); + voltage_gpio = *reg; if (!volt_gpio_np){ printk(KERN_ERR "cpufreq: missing cpu-vcore-select gpio\n"); return 1; } - reg = (u32 *)get_property(volt_gpio_np, "reg", NULL); - voltage_gpio = *reg; + /* OF only reports the high frequency */ + hi_freq = cur_freq; + low_freq = cur_freq/2; + + /* Read actual frequency from CPU */ + driver->get = dfs_get_cpu_speed; + cur_freq = driver->get(0); set_speed_proc = dfs_set_cpu_speed; return 0; @@ -492,7 +494,7 @@ * - iBook2 500/600 (PMU based, 400Mhz & 500/600Mhz) * - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage) * - Recent MacRISC3 laptops - * - iBook G4s and PowerBook G4s with 7447A CPUs + * - All new machines with 7447A CPUs */ static int __init pmac_cpufreq_setup(void) { @@ -513,11 +515,10 @@ goto out; cur_freq = (*value) / 1000; - /* Check for 7447A based iBook G4 or PowerBook */ - if (machine_is_compatible("PowerBook6,5") || - machine_is_compatible("PowerBook6,4") || - machine_is_compatible("PowerBook5,5") || - machine_is_compatible("PowerBook5,4")) { + /* Check for 7447A based MacRISC3 */ + if (machine_is_compatible("MacRISC3") && + get_property(cpunode, "dynamic-power-step", NULL) && + PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { pmac_cpufreq_init_7447A(cpunode); /* Check for other MacRISC3 machines */ } else if (machine_is_compatible("PowerBook3,4") || diff -Nru a/arch/ppc/platforms/pmac_feature.c b/arch/ppc/platforms/pmac_feature.c --- a/arch/ppc/platforms/pmac_feature.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/pmac_feature.c 2005-03-30 16:58:50 -08:00 @@ -2022,10 +2022,11 @@ #endif /* CONFIG_POWER4 */ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { - /* Warning: ordering is important as some models may claim - * beeing compatible with several types - */ #ifndef CONFIG_POWER4 + /* + * Desktops + */ + { "AAPL,8500", "PowerMac 8500/8600", PMAC_TYPE_PSURGE, NULL, 0 @@ -2058,14 +2059,6 @@ PMAC_TYPE_GAZELLE, NULL, 0 }, - { "AAPL,3400/2400", "PowerBook 3400", - PMAC_TYPE_HOOPER, ohare_features, - PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE - }, - { "AAPL,3500", "PowerBook 3500", - PMAC_TYPE_KANGA, ohare_features, - PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE - }, { "AAPL,Gossamer", "PowerMac G3 (Gossamer)", PMAC_TYPE_GOSSAMER, heathrow_desktop_features, 0 @@ -2074,42 +2067,6 @@ PMAC_TYPE_SILK, heathrow_desktop_features, 0 }, - { "AAPL,PowerBook1998", "PowerBook Wallstreet", - PMAC_TYPE_WALLSTREET, heathrow_laptop_features, - PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE - }, - { "PowerBook1,1", "PowerBook 101 (Lombard)", - PMAC_TYPE_101_PBOOK, paddington_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_MOBILE - }, - { "iMac,1", "iMac (first generation)", - PMAC_TYPE_ORIG_IMAC, paddington_features, - 0 - }, - { "PowerMac4,1", "iMac \"Flower Power\"", - PMAC_TYPE_PANGEA_IMAC, pangea_features, - PMAC_MB_MAY_SLEEP - }, - { "PowerBook4,3", "iBook 2 rev. 2", - PMAC_TYPE_IBOOK2, pangea_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE - }, - { "PowerBook4,2", "iBook 2", - PMAC_TYPE_IBOOK2, pangea_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE - }, - { "PowerBook4,1", "iBook 2", - PMAC_TYPE_IBOOK2, pangea_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE - }, - { "PowerMac4,4", "eMac", - PMAC_TYPE_EMAC, core99_features, - PMAC_MB_MAY_SLEEP - }, - { "PowerMac4,2", "Flat panel iMac", - PMAC_TYPE_FLAT_PANEL_IMAC, pangea_features, - PMAC_MB_CAN_SLEEP - }, { "PowerMac1,1", "Blue&White G3", PMAC_TYPE_YOSEMITE, paddington_features, 0 @@ -2118,9 +2075,13 @@ PMAC_TYPE_YIKES, paddington_features, 0 }, - { "PowerBook2,1", "iBook (first generation)", - PMAC_TYPE_ORIG_IBOOK, core99_features, - PMAC_MB_CAN_SLEEP | PMAC_MB_OLD_CORE99 | PMAC_MB_MOBILE + { "PowerMac2,1", "iMac FireWire", + PMAC_TYPE_FW_IMAC, core99_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99 + }, + { "PowerMac2,2", "iMac FireWire", + PMAC_TYPE_FW_IMAC, core99_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99 }, { "PowerMac3,1", "PowerMac G4 AGP Graphics", PMAC_TYPE_SAWTOOTH, core99_features, @@ -2134,30 +2095,96 @@ PMAC_TYPE_SAWTOOTH, core99_features, PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99 }, - { "PowerMac2,1", "iMac FireWire", - PMAC_TYPE_FW_IMAC, core99_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99 + { "PowerMac3,4", "PowerMac G4 Silver", + PMAC_TYPE_QUICKSILVER, core99_features, + PMAC_MB_MAY_SLEEP }, - { "PowerMac2,2", "iMac FireWire", - PMAC_TYPE_FW_IMAC, core99_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99 + { "PowerMac3,5", "PowerMac G4 Silver", + PMAC_TYPE_QUICKSILVER, core99_features, + PMAC_MB_MAY_SLEEP }, - { "PowerBook2,2", "iBook FireWire", - PMAC_TYPE_FW_IBOOK, core99_features, - PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | - PMAC_MB_OLD_CORE99 | PMAC_MB_MOBILE + { "PowerMac3,6", "PowerMac G4 Windtunnel", + PMAC_TYPE_WINDTUNNEL, core99_features, + PMAC_MB_MAY_SLEEP, + }, + { "PowerMac4,1", "iMac \"Flower Power\"", + PMAC_TYPE_PANGEA_IMAC, pangea_features, + PMAC_MB_MAY_SLEEP + }, + { "PowerMac4,2", "Flat panel iMac", + PMAC_TYPE_FLAT_PANEL_IMAC, pangea_features, + PMAC_MB_CAN_SLEEP + }, + { "PowerMac4,4", "eMac", + PMAC_TYPE_EMAC, core99_features, + PMAC_MB_MAY_SLEEP }, { "PowerMac5,1", "PowerMac G4 Cube", PMAC_TYPE_CUBE, core99_features, PMAC_MB_MAY_SLEEP | PMAC_MB_OLD_CORE99 }, - { "PowerMac3,4", "PowerMac G4 Silver", - PMAC_TYPE_QUICKSILVER, core99_features, - PMAC_MB_MAY_SLEEP + { "PowerMac6,1", "Flat panel iMac", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP, }, - { "PowerMac3,5", "PowerMac G4 Silver", - PMAC_TYPE_QUICKSILVER, core99_features, - PMAC_MB_MAY_SLEEP + { "PowerMac6,3", "Flat panel iMac", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP, + }, + { "PowerMac6,4", "eMac", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP, + }, + { "PowerMac10,1", "Mac mini", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER, + }, + { "iMac,1", "iMac (first generation)", + PMAC_TYPE_ORIG_IMAC, paddington_features, + 0 + }, + + /* + * Xserve's + */ + + { "RackMac1,1", "XServe", + PMAC_TYPE_RACKMAC, rackmac_features, + 0, + }, + { "RackMac1,2", "XServe rev. 2", + PMAC_TYPE_RACKMAC, rackmac_features, + 0, + }, + + /* + * Laptops + */ + + { "AAPL,3400/2400", "PowerBook 3400", + PMAC_TYPE_HOOPER, ohare_features, + PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE + }, + { "AAPL,3500", "PowerBook 3500", + PMAC_TYPE_KANGA, ohare_features, + PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE + }, + { "AAPL,PowerBook1998", "PowerBook Wallstreet", + PMAC_TYPE_WALLSTREET, heathrow_laptop_features, + PMAC_MB_CAN_SLEEP | PMAC_MB_MOBILE + }, + { "PowerBook1,1", "PowerBook 101 (Lombard)", + PMAC_TYPE_101_PBOOK, paddington_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_MOBILE + }, + { "PowerBook2,1", "iBook (first generation)", + PMAC_TYPE_ORIG_IBOOK, core99_features, + PMAC_MB_CAN_SLEEP | PMAC_MB_OLD_CORE99 | PMAC_MB_MOBILE + }, + { "PowerBook2,2", "iBook FireWire", + PMAC_TYPE_FW_IBOOK, core99_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | + PMAC_MB_OLD_CORE99 | PMAC_MB_MOBILE }, { "PowerBook3,1", "PowerBook Pismo", PMAC_TYPE_PISMO, core99_features, @@ -2180,17 +2207,17 @@ PMAC_TYPE_TITANIUM4, core99_features, PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE }, - { "RackMac1,1", "XServe", - PMAC_TYPE_RACKMAC, rackmac_features, - 0, + { "PowerBook4,1", "iBook 2", + PMAC_TYPE_IBOOK2, pangea_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE }, - { "RackMac1,2", "XServe rev. 2", - PMAC_TYPE_RACKMAC, rackmac_features, - 0, + { "PowerBook4,2", "iBook 2", + PMAC_TYPE_IBOOK2, pangea_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE }, - { "PowerMac3,6", "PowerMac G4 Windtunnel", - PMAC_TYPE_WINDTUNNEL, core99_features, - PMAC_MB_MAY_SLEEP, + { "PowerBook4,3", "iBook 2 rev. 2", + PMAC_TYPE_IBOOK2, pangea_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE }, { "PowerBook5,1", "PowerBook G4 17\"", PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, @@ -2212,6 +2239,14 @@ PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, }, + { "PowerBook5,6", "PowerBook G4 15\"", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, + }, + { "PowerBook5,7", "PowerBook G4 17\"", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, + }, { "PowerBook6,1", "PowerBook G4 12\"", PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, @@ -2229,6 +2264,10 @@ PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, }, { "PowerBook6,5", "iBook G4", + PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, + PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, + }, + { "PowerBook6,8", "PowerBook G4 12\"", PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_MB_MAY_SLEEP | PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, }, diff -Nru a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c --- a/arch/ppc/platforms/pmac_setup.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc/platforms/pmac_setup.c 2005-03-30 16:58:49 -08:00 @@ -669,6 +669,7 @@ ppc_md.pcibios_fixup = pmac_pcibios_fixup; ppc_md.pcibios_enable_device_hook = pmac_pci_enable_device_hook; ppc_md.pcibios_after_init = pmac_pcibios_after_init; + ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; ppc_md.restart = pmac_restart; ppc_md.power_off = pmac_power_off; diff -Nru a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c --- a/arch/ppc/platforms/prep_setup.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/prep_setup.c 2005-03-30 16:58:50 -08:00 @@ -1144,6 +1144,8 @@ /* this gets changed later on if we have an OpenPIC -- Cort */ ppc_md.get_irq = i8259_irq; + ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; + ppc_md.restart = prep_restart; ppc_md.power_off = NULL; /* set in prep_setup_arch() */ ppc_md.halt = prep_halt; diff -Nru a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c --- a/arch/ppc/platforms/radstone_ppc7d.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/radstone_ppc7d.c 2005-03-30 16:58:50 -08:00 @@ -669,6 +669,42 @@ } #endif +#if defined(CONFIG_I2C_MV64XXX) +static void __init +ppc7d_fixup_i2c_pdata(struct platform_device *pdev) +{ + struct mv64xxx_i2c_pdata *pdata; + int i; + + pdata = pdev->dev.platform_data; + if (pdata == NULL) { + pdata = kmalloc(sizeof(*pdata), GFP_KERNEL); + if (pdata == NULL) + return; + + memset(pdata, 0, sizeof(*pdata)); + pdev->dev.platform_data = pdata; + } + + /* divisors M=8, N=3 for 100kHz I2C from 133MHz system clock */ + pdata->freq_m = 8; + pdata->freq_n = 3; + pdata->timeout = 500; + pdata->retries = 3; + + /* Adjust IRQ by mv64360_irq_base */ + for (i = 0; i < pdev->num_resources; i++) { + struct resource *r = &pdev->resource[i]; + + if (r->flags & IORESOURCE_IRQ) { + r->start += mv64360_irq_base; + r->end += mv64360_irq_base; + pr_debug("%s, uses IRQ %d\n", pdev->name, (int) r->start); + } + } +} +#endif + static int __init ppc7d_platform_notify(struct device *dev) { static struct { @@ -676,13 +712,16 @@ void ((*rtn) (struct platform_device * pdev)); } dev_map[] = { #if defined(CONFIG_SERIAL_MPSC) - { MPSC_CTLR_NAME "0", ppc7d_fixup_mpsc_pdata }, - { MPSC_CTLR_NAME "1", ppc7d_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".0", ppc7d_fixup_mpsc_pdata }, + { MPSC_CTLR_NAME ".1", ppc7d_fixup_mpsc_pdata }, #endif #if defined(CONFIG_MV643XX_ETH) - { MV643XX_ETH_NAME "0", ppc7d_fixup_eth_pdata }, - { MV643XX_ETH_NAME "1", ppc7d_fixup_eth_pdata }, - { MV643XX_ETH_NAME "2", ppc7d_fixup_eth_pdata }, + { MV643XX_ETH_NAME ".0", ppc7d_fixup_eth_pdata }, + { MV643XX_ETH_NAME ".1", ppc7d_fixup_eth_pdata }, + { MV643XX_ETH_NAME ".2", ppc7d_fixup_eth_pdata }, +#endif +#if defined(CONFIG_I2C_MV64XXX) + { MV64XXX_I2C_CTLR_NAME ".0", ppc7d_fixup_i2c_pdata }, #endif }; struct platform_device *pdev; @@ -1162,7 +1201,7 @@ /* Disable ethernet. It might have been setup by the bootrom */ for (port = 0; port < 3; port++) - mv64x60_write(&bh, MV64340_ETH_RECEIVE_QUEUE_COMMAND_REG(port), + mv64x60_write(&bh, MV643XX_ETH_RECEIVE_QUEUE_COMMAND_REG(port), 0x0000ff00); /* Clear queue pointers to ensure they are all initialized, @@ -1172,25 +1211,25 @@ */ for (port = 0; port < 3; port++) { mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_1(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_1(port), 0x00000000); mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_2(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_2(port), 0x00000000); mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_3(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_3(port), 0x00000000); mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_4(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_4(port), 0x00000000); mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_5(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_5(port), 0x00000000); mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_6(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_6(port), 0x00000000); mv64x60_write(&bh, - MV64340_ETH_RX_CURRENT_QUEUE_DESC_PTR_7(port), + MV643XX_ETH_RX_CURRENT_QUEUE_DESC_PTR_7(port), 0x00000000); } @@ -1363,7 +1402,8 @@ ppc_md.pcibios_fixup_bus = ppc7d_pci_fixup_bus; -#if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) +#if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) || \ + defined(CONFIG_I2C_MV64XXX) platform_notify = ppc7d_platform_notify; #endif @@ -1405,4 +1445,8 @@ rev_num = (val8 & PPC7D_CPLD_BOARD_REVISION_NUMBER_MASK) >> 5; if (rev_num <= 1) ppc7d_has_alma = 1; + +#ifdef DEBUG + console_printk[0] = 8; +#endif } diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/platforms/sandpoint.c 2005-03-30 16:58:50 -08:00 @@ -202,13 +202,6 @@ 0x48, /* ISA-to-PCI Addr Decoder Control */ 0xf0); - /* Enable RTC and Keyboard address locations. */ - early_write_config_byte(hose, - 0, - devfn, - 0x4d, /* Chip Select Control Register */ - 0x00); - /* Enable Port 92. */ early_write_config_byte(hose, 0, diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile --- a/arch/ppc/syslib/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc/syslib/Makefile 2005-03-30 16:58:47 -08:00 @@ -53,6 +53,7 @@ obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \ pci_auto.o obj-$(CONFIG_LOPEC) += i8259.o pci_auto.o todc_time.o +obj-$(CONFIG_HDPU) += pci_auto.o obj-$(CONFIG_LUAN) += indirect_pci.o pci_auto.o todc_time.o obj-$(CONFIG_KATANA) += pci_auto.o obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \ @@ -96,13 +97,18 @@ obj-$(CONFIG_40x) += dcr.o obj-$(CONFIG_BOOKE) += dcr.o obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \ - ppc_sys.o + ppc_sys.o mpc85xx_sys.o \ + mpc85xx_devices.o ifeq ($(CONFIG_85xx),y) obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o endif -obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o +obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o \ + mpc83xx_sys.o mpc83xx_devices.o ifeq ($(CONFIG_83xx),y) obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o endif obj-$(CONFIG_MPC8555_CDS) += todc_time.o obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o +ifeq ($(CONFIG_PPC_MPC52xx),y) +obj-$(CONFIG_PCI) += mpc52xx_pci.o +endif diff -Nru a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h --- a/arch/ppc/syslib/cpc700.h 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc/syslib/cpc700.h 2005-03-30 16:58:48 -08:00 @@ -17,13 +17,14 @@ * memory controller, PIC, UARTs, IIC, and Timers. */ -#ifndef _ASMPPC_CPC700_H -#define _ASMPPC_CPC700_H +#ifndef __PPC_SYSLIB_CPC700_H__ +#define __PPC_SYSLIB_CPC700_H__ #include #include #include +/* XXX no barriers? not even any volatiles? -- paulus */ #define CPC700_OUT_32(a,d) (*(u_int *)a = d) #define CPC700_IN_32(a) (*(u_int *)a) @@ -33,21 +34,26 @@ #define CPC700_PCI_CONFIG_ADDR 0xfec00000 #define CPC700_PCI_CONFIG_DATA 0xfec00004 -#define CPC700_PMM0_LOCAL 0xff400000 -#define CPC700_PMM0_MASK_ATTR 0xff400004 -#define CPC700_PMM0_PCI_LOW 0xff400008 -#define CPC700_PMM0_PCI_HIGH 0xff40000c +/* CPU -> PCI memory window 0 */ +#define CPC700_PMM0_LOCAL 0xff400000 /* CPU physical addr */ +#define CPC700_PMM0_MASK_ATTR 0xff400004 /* size and attrs */ +#define CPC700_PMM0_PCI_LOW 0xff400008 /* PCI addr, low word */ +#define CPC700_PMM0_PCI_HIGH 0xff40000c /* PCI addr, high wd */ +/* CPU -> PCI memory window 1 */ #define CPC700_PMM1_LOCAL 0xff400010 #define CPC700_PMM1_MASK_ATTR 0xff400014 #define CPC700_PMM1_PCI_LOW 0xff400018 #define CPC700_PMM1_PCI_HIGH 0xff40001c +/* CPU -> PCI memory window 2 */ #define CPC700_PMM2_LOCAL 0xff400020 #define CPC700_PMM2_MASK_ATTR 0xff400024 #define CPC700_PMM2_PCI_LOW 0xff400028 #define CPC700_PMM2_PCI_HIGH 0xff40002c -#define CPC700_PTM1_MEMSIZE 0xff400030 -#define CPC700_PTM1_LOCAL 0xff400034 -#define CPC700_PTM2_MEMSIZE 0xff400038 +/* PCI memory -> CPU window 1 */ +#define CPC700_PTM1_MEMSIZE 0xff400030 /* window size */ +#define CPC700_PTM1_LOCAL 0xff400034 /* CPU phys addr */ +/* PCI memory -> CPU window 2 */ +#define CPC700_PTM2_MEMSIZE 0xff400038 /* size and enable */ #define CPC700_PTM2_LOCAL 0xff40003c /* @@ -89,4 +95,4 @@ extern void __init cpc700_init_IRQ(void); extern int cpc700_get_irq(struct pt_regs *); -#endif /* _ASMPPC_CPC700_H */ +#endif /* __PPC_SYSLIB_CPC700_H__ */ diff -Nru a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/mpc52xx_pci.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,235 @@ +/* + * arch/ppc/syslib/mpc52xx_pci.c + * + * PCI code for the Freescale MPC52xx embedded CPU. + * + * + * Maintainer : Sylvain Munaut + * + * Copyright (C) 2004 Sylvain Munaut + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#include + +#include + +#include +#include "mpc52xx_pci.h" + +#include + + +static int +mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 *val) +{ + struct pci_controller *hose = bus->sysdata; + u32 value; + + if (ppc_md.pci_exclude_device) + if (ppc_md.pci_exclude_device(bus->number, devfn)) + return PCIBIOS_DEVICE_NOT_FOUND; + + out_be32(hose->cfg_addr, + (1 << 31) | + ((bus->number - hose->bus_offset) << 16) | + (devfn << 8) | + (offset & 0xfc)); + + value = in_le32(hose->cfg_data); + + if (len != 4) { + value >>= ((offset & 0x3) << 3); + value &= 0xffffffff >> (32 - (len << 3)); + } + + *val = value; + + out_be32(hose->cfg_addr, 0); + + return PCIBIOS_SUCCESSFUL; +} + +static int +mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, + int offset, int len, u32 val) +{ + struct pci_controller *hose = bus->sysdata; + u32 value, mask; + + if (ppc_md.pci_exclude_device) + if (ppc_md.pci_exclude_device(bus->number, devfn)) + return PCIBIOS_DEVICE_NOT_FOUND; + + out_be32(hose->cfg_addr, + (1 << 31) | + ((bus->number - hose->bus_offset) << 16) | + (devfn << 8) | + (offset & 0xfc)); + + if (len != 4) { + value = in_le32(hose->cfg_data); + + offset = (offset & 0x3) << 3; + mask = (0xffffffff >> (32 - (len << 3))); + mask <<= offset; + + value &= ~mask; + val = value | ((val << offset) & mask); + } + + out_le32(hose->cfg_data, val); + + out_be32(hose->cfg_addr, 0); + + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops mpc52xx_pci_ops = { + .read = mpc52xx_pci_read_config, + .write = mpc52xx_pci_write_config +}; + + +static void __init +mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs) +{ + + /* Setup control regs */ + /* Nothing to do afaik */ + + /* Setup windows */ + out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION( + MPC52xx_PCI_MEM_START + MPC52xx_PCI_MEM_OFFSET, + MPC52xx_PCI_MEM_START, + MPC52xx_PCI_MEM_SIZE )); + + out_be32(&pci_regs->iw1btar, MPC52xx_PCI_IWBTAR_TRANSLATION( + MPC52xx_PCI_MMIO_START + MPC52xx_PCI_MEM_OFFSET, + MPC52xx_PCI_MMIO_START, + MPC52xx_PCI_MMIO_SIZE )); + + out_be32(&pci_regs->iw2btar, MPC52xx_PCI_IWBTAR_TRANSLATION( + MPC52xx_PCI_IO_BASE, + MPC52xx_PCI_IO_START, + MPC52xx_PCI_IO_SIZE )); + + out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK( + ( MPC52xx_PCI_IWCR_ENABLE | /* iw0btar */ + MPC52xx_PCI_IWCR_READ_MULTI | + MPC52xx_PCI_IWCR_MEM ), + ( MPC52xx_PCI_IWCR_ENABLE | /* iw1btar */ + MPC52xx_PCI_IWCR_READ | + MPC52xx_PCI_IWCR_MEM ), + ( MPC52xx_PCI_IWCR_ENABLE | /* iw2btar */ + MPC52xx_PCI_IWCR_IO ) + )); + + + out_be32(&pci_regs->tbatr0, + MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_IO ); + out_be32(&pci_regs->tbatr1, + MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM ); + + out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD); + + /* Reset the exteral bus ( internal PCI controller is NOT resetted ) */ + /* Not necessary and can be a bad thing if for example the bootloader + is displaying a splash screen or ... Just left here for + documentation purpose if anyone need it */ +#if 0 + u32 tmp; + tmp = in_be32(&pci_regs->gscr); + out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR); + udelay(50); + out_be32(&pci_regs->gscr, tmp); +#endif +} + +static void __init +mpc52xx_pci_fixup_resources(struct pci_dev *dev) +{ + int i; + + /* We don't rely on boot loader for PCI and resets all + devices */ + for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { + struct resource *res = &dev->resource[i]; + if (res->end > res->start) { /* Only valid resources */ + res->end -= res->start; + res->start = 0; + res->flags |= IORESOURCE_UNSET; + } + } + + /* The PCI Host bridge of MPC52xx has a prefetch memory resource + fixed to 1Gb. Doesn't fit in the resource system so we remove it */ + if ( (dev->vendor == PCI_VENDOR_ID_MOTOROLA) && + (dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200) ) { + struct resource *res = &dev->resource[1]; + res->start = res->end = res->flags = 0; + } +} + +void __init +mpc52xx_find_bridges(void) +{ + struct mpc52xx_pci __iomem *pci_regs; + struct pci_controller *hose; + + pci_assign_all_busses = 1; + + pci_regs = ioremap(MPC52xx_PCI, sizeof(struct mpc52xx_pci)); + if (!pci_regs) + return; + + hose = pcibios_alloc_controller(); + if (!hose) { + iounmap(pci_regs); + return; + } + + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pcibios_fixup_resources = mpc52xx_pci_fixup_resources; + + hose->first_busno = 0; + hose->last_busno = 0xff; + hose->bus_offset = 0; + hose->ops = &mpc52xx_pci_ops; + + mpc52xx_pci_setup(pci_regs); + + hose->pci_mem_offset = MPC52xx_PCI_MEM_OFFSET; + + isa_io_base = + (unsigned long) ioremap(MPC52xx_PCI_IO_BASE, + MPC52xx_PCI_IO_SIZE); + hose->io_base_virt = (void *) isa_io_base; + + hose->cfg_addr = &pci_regs->car; + hose->cfg_data = (void __iomem *) isa_io_base; + + /* Setup resources */ + pci_init_resource(&hose->mem_resources[0], + MPC52xx_PCI_MEM_START, + MPC52xx_PCI_MEM_STOP, + IORESOURCE_MEM|IORESOURCE_PREFETCH, + "PCI prefetchable memory"); + + pci_init_resource(&hose->mem_resources[1], + MPC52xx_PCI_MMIO_START, + MPC52xx_PCI_MMIO_STOP, + IORESOURCE_MEM, + "PCI memory"); + + pci_init_resource(&hose->io_resource, + MPC52xx_PCI_IO_START, + MPC52xx_PCI_IO_STOP, + IORESOURCE_IO, + "PCI I/O"); + +} diff -Nru a/arch/ppc/syslib/mpc52xx_pci.h b/arch/ppc/syslib/mpc52xx_pci.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/mpc52xx_pci.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,139 @@ +/* + * arch/ppc/syslib/mpc52xx_pci.h + * + * PCI Include file the Freescale MPC52xx embedded cpu chips + * + * + * Maintainer : Sylvain Munaut + * + * Inspired from code written by Dale Farnsworth + * for the 2.4 kernel. + * + * Copyright (C) 2004 Sylvain Munaut + * Copyright (C) 2003 MontaVista, Software, Inc. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#ifndef __SYSLIB_MPC52xx_PCI_H__ +#define __SYSLIB_MPC52xx_PCI_H__ + +/* ======================================================================== */ +/* PCI windows config */ +/* ======================================================================== */ + +/* + * Master windows : MPC52xx -> PCI + * + * 0x80000000 -> 0x9FFFFFFF PCI Mem prefetchable IW0BTAR + * 0xA0000000 -> 0xAFFFFFFF PCI Mem IW1BTAR + * 0xB0000000 -> 0xB0FFFFFF PCI IO IW2BTAR + * + * Slave windows : PCI -> MPC52xx + * + * 0xF0000000 -> 0xF003FFFF MPC52xx MBAR TBATR0 + * 0x00000000 -> 0x3FFFFFFF MPC52xx local memory TBATR1 + */ + +#define MPC52xx_PCI_MEM_OFFSET 0x00000000 /* Offset for MEM MMIO */ + +#define MPC52xx_PCI_MEM_START 0x80000000 +#define MPC52xx_PCI_MEM_SIZE 0x20000000 +#define MPC52xx_PCI_MEM_STOP (MPC52xx_PCI_MEM_START+MPC52xx_PCI_MEM_SIZE-1) + +#define MPC52xx_PCI_MMIO_START 0xa0000000 +#define MPC52xx_PCI_MMIO_SIZE 0x10000000 +#define MPC52xx_PCI_MMIO_STOP (MPC52xx_PCI_MMIO_START+MPC52xx_PCI_MMIO_SIZE-1) + +#define MPC52xx_PCI_IO_BASE 0xb0000000 + +#define MPC52xx_PCI_IO_START 0x00000000 +#define MPC52xx_PCI_IO_SIZE 0x01000000 +#define MPC52xx_PCI_IO_STOP (MPC52xx_PCI_IO_START+MPC52xx_PCI_IO_SIZE-1) + + +#define MPC52xx_PCI_TARGET_IO MPC52xx_MBAR +#define MPC52xx_PCI_TARGET_MEM 0x00000000 + + +/* ======================================================================== */ +/* Structures mapping & Defines for PCI Unit */ +/* ======================================================================== */ + +#define MPC52xx_PCI_GSCR_BM 0x40000000 +#define MPC52xx_PCI_GSCR_PE 0x20000000 +#define MPC52xx_PCI_GSCR_SE 0x10000000 +#define MPC52xx_PCI_GSCR_XLB2PCI_MASK 0x07000000 +#define MPC52xx_PCI_GSCR_XLB2PCI_SHIFT 24 +#define MPC52xx_PCI_GSCR_IPG2PCI_MASK 0x00070000 +#define MPC52xx_PCI_GSCR_IPG2PCI_SHIFT 16 +#define MPC52xx_PCI_GSCR_BME 0x00004000 +#define MPC52xx_PCI_GSCR_PEE 0x00002000 +#define MPC52xx_PCI_GSCR_SEE 0x00001000 +#define MPC52xx_PCI_GSCR_PR 0x00000001 + + +#define MPC52xx_PCI_IWBTAR_TRANSLATION(proc_ad,pci_ad,size) \ + ( ( (proc_ad) & 0xff000000 ) | \ + ( (((size) - 1) >> 8) & 0x00ff0000 ) | \ + ( ((pci_ad) >> 16) & 0x0000ff00 ) ) + +#define MPC52xx_PCI_IWCR_PACK(win0,win1,win2) (((win0) << 24) | \ + ((win1) << 16) | \ + ((win2) << 8)) + +#define MPC52xx_PCI_IWCR_DISABLE 0x0 +#define MPC52xx_PCI_IWCR_ENABLE 0x1 +#define MPC52xx_PCI_IWCR_READ 0x0 +#define MPC52xx_PCI_IWCR_READ_LINE 0x2 +#define MPC52xx_PCI_IWCR_READ_MULTI 0x4 +#define MPC52xx_PCI_IWCR_MEM 0x0 +#define MPC52xx_PCI_IWCR_IO 0x8 + +#define MPC52xx_PCI_TCR_P 0x01000000 +#define MPC52xx_PCI_TCR_LD 0x00010000 + +#define MPC52xx_PCI_TBATR_DISABLE 0x0 +#define MPC52xx_PCI_TBATR_ENABLE 0x1 + + +#ifndef __ASSEMBLY__ + +struct mpc52xx_pci { + u32 idr; /* PCI + 0x00 */ + u32 scr; /* PCI + 0x04 */ + u32 ccrir; /* PCI + 0x08 */ + u32 cr1; /* PCI + 0x0C */ + u32 bar0; /* PCI + 0x10 */ + u32 bar1; /* PCI + 0x14 */ + u8 reserved1[16]; /* PCI + 0x18 */ + u32 ccpr; /* PCI + 0x28 */ + u32 sid; /* PCI + 0x2C */ + u32 erbar; /* PCI + 0x30 */ + u32 cpr; /* PCI + 0x34 */ + u8 reserved2[4]; /* PCI + 0x38 */ + u32 cr2; /* PCI + 0x3C */ + u8 reserved3[32]; /* PCI + 0x40 */ + u32 gscr; /* PCI + 0x60 */ + u32 tbatr0; /* PCI + 0x64 */ + u32 tbatr1; /* PCI + 0x68 */ + u32 tcr; /* PCI + 0x6C */ + u32 iw0btar; /* PCI + 0x70 */ + u32 iw1btar; /* PCI + 0x74 */ + u32 iw2btar; /* PCI + 0x78 */ + u8 reserved4[4]; /* PCI + 0x7C */ + u32 iwcr; /* PCI + 0x80 */ + u32 icr; /* PCI + 0x84 */ + u32 isr; /* PCI + 0x88 */ + u32 arb; /* PCI + 0x8C */ + u8 reserved5[104]; /* PCI + 0x90 */ + u32 car; /* PCI + 0xF8 */ + u8 reserved6[4]; /* PCI + 0xFC */ +}; + +#endif /* __ASSEMBLY__ */ + + +#endif /* __SYSLIB_MPC52xx_PCI_H__ */ diff -Nru a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c --- a/arch/ppc/syslib/mpc52xx_pic.c 2005-03-30 16:58:51 -08:00 +++ b/arch/ppc/syslib/mpc52xx_pic.c 2005-03-30 16:58:51 -08:00 @@ -33,8 +33,8 @@ #include -static struct mpc52xx_intr *intr; -static struct mpc52xx_sdma *sdma; +static struct mpc52xx_intr __iomem *intr; +static struct mpc52xx_sdma __iomem *sdma; static void mpc52xx_ic_disable(unsigned int irq) @@ -166,14 +166,11 @@ } static struct hw_interrupt_type mpc52xx_ic = { - "MPC52xx", - NULL, /* startup(irq) */ - NULL, /* shutdown(irq) */ - mpc52xx_ic_enable, /* enable(irq) */ - mpc52xx_ic_disable, /* disable(irq) */ - mpc52xx_ic_disable_and_ack, /* disable_and_ack(irq) */ - mpc52xx_ic_end, /* end(irq) */ - 0 /* set_affinity(irq, cpumask) SMP. */ + .typename = " MPC52xx ", + .enable = mpc52xx_ic_enable, + .disable = mpc52xx_ic_disable, + .ack = mpc52xx_ic_disable_and_ack, + .end = mpc52xx_ic_end, }; void __init @@ -183,10 +180,8 @@ u32 intr_ctrl; /* Remap the necessary zones */ - intr = (struct mpc52xx_intr *) - ioremap(MPC52xx_INTR, sizeof(struct mpc52xx_intr)); - sdma = (struct mpc52xx_sdma *) - ioremap(MPC52xx_SDMA, sizeof(struct mpc52xx_sdma)); + intr = ioremap(MPC52xx_INTR, sizeof(struct mpc52xx_intr)); + sdma = ioremap(MPC52xx_SDMA, sizeof(struct mpc52xx_sdma)); if ((intr==NULL) || (sdma==NULL)) panic("Can't ioremap PIC/SDMA register for init_irq !"); diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c --- a/arch/ppc/syslib/mpc52xx_setup.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc/syslib/mpc52xx_setup.c 2005-03-30 16:58:50 -08:00 @@ -39,7 +39,8 @@ void mpc52xx_restart(char *cmd) { - struct mpc52xx_gpt* gpt0 = (struct mpc52xx_gpt*) MPC52xx_GPTx(0); + struct mpc52xx_gpt __iomem *gpt0 = + (struct mpc52xx_gpt __iomem *) MPC52xx_GPTx(0); local_irq_disable(); @@ -102,7 +103,7 @@ #endif static void -mpc52xx_psc_putc(struct mpc52xx_psc * psc, unsigned char c) +mpc52xx_psc_putc(struct mpc52xx_psc __iomem *psc, unsigned char c) { while (!(in_be16(&psc->mpc52xx_psc_status) & MPC52xx_PSC_SR_TXRDY)); @@ -112,8 +113,9 @@ void mpc52xx_progress(char *s, unsigned short hex) { - struct mpc52xx_psc *psc = (struct mpc52xx_psc *)MPC52xx_CONSOLE; char c; + struct mpc52xx_psc __iomem *psc = + (struct mpc52xx_psc __iomem *)MPC52xx_CONSOLE; while ((c = *s++) != 0) { if (c == '\n') @@ -138,11 +140,11 @@ * else get size from sdram config registers */ if (ramsize == 0) { - struct mpc52xx_mmap_ctl *mmap_ctl; + struct mpc52xx_mmap_ctl __iomem *mmap_ctl; u32 sdram_config_0, sdram_config_1; /* Temp BAT2 mapping active when this is called ! */ - mmap_ctl = (struct mpc52xx_mmap_ctl*) MPC52xx_MMAP_CTL; + mmap_ctl = (struct mpc52xx_mmap_ctl __iomem *) MPC52xx_MMAP_CTL; sdram_config_0 = in_be32(&mmap_ctl->sdram0); sdram_config_1 = in_be32(&mmap_ctl->sdram1); @@ -169,13 +171,11 @@ /* if bootloader didn't pass bus frequencies, calculate them */ if (xlbfreq == 0) { /* Get RTC & Clock manager modules */ - struct mpc52xx_rtc *rtc; - struct mpc52xx_cdm *cdm; + struct mpc52xx_rtc __iomem *rtc; + struct mpc52xx_cdm __iomem *cdm; - rtc = (struct mpc52xx_rtc*) - ioremap(MPC52xx_RTC, sizeof(struct mpc52xx_rtc)); - cdm = (struct mpc52xx_cdm*) - ioremap(MPC52xx_CDM, sizeof(struct mpc52xx_cdm)); + rtc = ioremap(MPC52xx_RTC, sizeof(struct mpc52xx_rtc)); + cdm = ioremap(MPC52xx_CDM, sizeof(struct mpc52xx_cdm)); if ((rtc==NULL) || (cdm==NULL)) panic("Can't ioremap RTC/CDM while computing bus freq"); @@ -212,8 +212,8 @@ __res.bi_pcifreq = pcifreq; /* Release mapping */ - iounmap((void*)rtc); - iounmap((void*)cdm); + iounmap(rtc); + iounmap(cdm); } divisor = 4; diff -Nru a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/mpc83xx_devices.c 2005-03-30 16:58:48 -08:00 @@ -0,0 +1,237 @@ +/* + * arch/ppc/platforms/83xx/mpc83xx_devices.c + * + * MPC83xx Device descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* We use offsets for IORESOURCE_MEM since we do not know at compile time + * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup + */ + +static struct gianfar_platform_data mpc83xx_tsec1_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = 0x24000, +}; + +static struct gianfar_platform_data mpc83xx_tsec2_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = 0x24000, +}; + +static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct plat_serial8250_port serial_platform_data[] = { + [0] = { + .mapbase = 0x4500, + .irq = MPC83xx_IRQ_UART1, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + [1] = { + .mapbase = 0x4600, + .irq = MPC83xx_IRQ_UART2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, +}; + +struct platform_device ppc_sys_platform_devices[] = { + [MPC83xx_TSEC1] = { + .name = "fsl-gianfar", + .id = 1, + .dev.platform_data = &mpc83xx_tsec1_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = 0x24000, + .end = 0x24fff, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC83xx_IRQ_TSEC1_TX, + .end = MPC83xx_IRQ_TSEC1_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC83xx_IRQ_TSEC1_RX, + .end = MPC83xx_IRQ_TSEC1_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC83xx_IRQ_TSEC1_ERROR, + .end = MPC83xx_IRQ_TSEC1_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_TSEC2] = { + .name = "fsl-gianfar", + .id = 2, + .dev.platform_data = &mpc83xx_tsec2_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = 0x25000, + .end = 0x25fff, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC83xx_IRQ_TSEC2_TX, + .end = MPC83xx_IRQ_TSEC2_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC83xx_IRQ_TSEC2_RX, + .end = MPC83xx_IRQ_TSEC2_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC83xx_IRQ_TSEC2_ERROR, + .end = MPC83xx_IRQ_TSEC2_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_IIC1] = { + .name = "fsl-i2c", + .id = 1, + .dev.platform_data = &mpc83xx_fsl_i2c1_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x3000, + .end = 0x30ff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_IIC1, + .end = MPC83xx_IRQ_IIC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_IIC2] = { + .name = "fsl-i2c", + .id = 2, + .dev.platform_data = &mpc83xx_fsl_i2c2_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x3100, + .end = 0x31ff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_IIC2, + .end = MPC83xx_IRQ_IIC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_DUART] = { + .name = "serial8250", + .id = 0, + .dev.platform_data = serial_platform_data, + }, + [MPC83xx_SEC2] = { + .name = "fsl-sec2", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x30000, + .end = 0x3ffff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_SEC2, + .end = MPC83xx_IRQ_SEC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_USB2_DR] = { + .name = "fsl-usb2-dr", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x22000, + .end = 0x22fff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_USB2_DR, + .end = MPC83xx_IRQ_USB2_DR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_USB2_MPH] = { + .name = "fsl-usb2-mph", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x23000, + .end = 0x23fff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_USB2_MPH, + .end = MPC83xx_IRQ_USB2_MPH, + .flags = IORESOURCE_IRQ, + }, + }, + }, +}; + +static int __init mach_mpc83xx_fixup(struct platform_device *pdev) +{ + ppc_sys_fixup_mem_resource(pdev, immrbar); + return 0; +} + +static int __init mach_mpc83xx_init(void) +{ + if (ppc_md.progress) + ppc_md.progress("mach_mpc83xx_init:enter", 0); + ppc_sys_device_fixup = mach_mpc83xx_fixup; + return 0; +} + +postcore_initcall(mach_mpc83xx_init); diff -Nru a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/mpc83xx_sys.c 2005-03-30 16:58:48 -08:00 @@ -0,0 +1,100 @@ +/* + * arch/ppc/platforms/83xx/mpc83xx_sys.c + * + * MPC83xx System descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * 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. + */ + +#include +#include +#include +#include + +struct ppc_sys_spec *cur_ppc_sys_spec; +struct ppc_sys_spec ppc_sys_specs[] = { + { + .ppc_sys_name = "8349E", + .mask = 0xFFFF0000, + .value = 0x80500000, + .num_devices = 8, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8349", + .mask = 0xFFFF0000, + .value = 0x80510000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8347E", + .mask = 0xFFFF0000, + .value = 0x80520000, + .num_devices = 8, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8347", + .mask = 0xFFFF0000, + .value = 0x80530000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8343E", + .mask = 0xFFFF0000, + .value = 0x80540000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, + }, + }, + { + .ppc_sys_name = "8343", + .mask = 0xFFFF0000, + .value = 0x80550000, + .num_devices = 6, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, + }, + }, + { /* default match */ + .ppc_sys_name = "", + .mask = 0x00000000, + .value = 0x00000000, + }, +}; diff -Nru a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/mpc85xx_devices.c 2005-03-30 16:58:47 -08:00 @@ -0,0 +1,552 @@ +/* + * arch/ppc/platforms/85xx/mpc85xx_devices.c + * + * MPC85xx Device descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* We use offsets for IORESOURCE_MEM since we do not know at compile time + * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup + */ + +static struct gianfar_platform_data mpc85xx_tsec1_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = MPC85xx_ENET1_OFFSET, +}; + +static struct gianfar_platform_data mpc85xx_tsec2_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = MPC85xx_ENET1_OFFSET, +}; + +static struct gianfar_platform_data mpc85xx_fec_pdata = { + .phy_reg_addr = MPC85xx_ENET1_OFFSET, +}; + +static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct plat_serial8250_port serial_platform_data[] = { + [0] = { + .mapbase = 0x4500, + .irq = MPC85xx_IRQ_DUART, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ, + }, + [1] = { + .mapbase = 0x4600, + .irq = MPC85xx_IRQ_DUART, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ, + }, +}; + +struct platform_device ppc_sys_platform_devices[] = { + [MPC85xx_TSEC1] = { + .name = "fsl-gianfar", + .id = 1, + .dev.platform_data = &mpc85xx_tsec1_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = MPC85xx_ENET1_OFFSET, + .end = MPC85xx_ENET1_OFFSET + + MPC85xx_ENET1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC85xx_IRQ_TSEC1_TX, + .end = MPC85xx_IRQ_TSEC1_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC85xx_IRQ_TSEC1_RX, + .end = MPC85xx_IRQ_TSEC1_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC85xx_IRQ_TSEC1_ERROR, + .end = MPC85xx_IRQ_TSEC1_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_TSEC2] = { + .name = "fsl-gianfar", + .id = 2, + .dev.platform_data = &mpc85xx_tsec2_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = MPC85xx_ENET2_OFFSET, + .end = MPC85xx_ENET2_OFFSET + + MPC85xx_ENET2_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC85xx_IRQ_TSEC2_TX, + .end = MPC85xx_IRQ_TSEC2_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC85xx_IRQ_TSEC2_RX, + .end = MPC85xx_IRQ_TSEC2_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC85xx_IRQ_TSEC2_ERROR, + .end = MPC85xx_IRQ_TSEC2_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_FEC] = { + .name = "fsl-gianfar", + .id = 3, + .dev.platform_data = &mpc85xx_fec_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_ENET3_OFFSET, + .end = MPC85xx_ENET3_OFFSET + + MPC85xx_ENET3_SIZE - 1, + .flags = IORESOURCE_MEM, + + }, + { + .start = MPC85xx_IRQ_FEC, + .end = MPC85xx_IRQ_FEC, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_IIC1] = { + .name = "fsl-i2c", + .id = 1, + .dev.platform_data = &mpc85xx_fsl_i2c_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_IIC1_OFFSET, + .end = MPC85xx_IIC1_OFFSET + + MPC85xx_IIC1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_IIC1, + .end = MPC85xx_IRQ_IIC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_DMA0] = { + .name = "fsl-dma", + .id = 0, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_DMA0_OFFSET, + .end = MPC85xx_DMA0_OFFSET + + MPC85xx_DMA0_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_DMA0, + .end = MPC85xx_IRQ_DMA0, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_DMA1] = { + .name = "fsl-dma", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_DMA1_OFFSET, + .end = MPC85xx_DMA1_OFFSET + + MPC85xx_DMA1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_DMA1, + .end = MPC85xx_IRQ_DMA1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_DMA2] = { + .name = "fsl-dma", + .id = 2, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_DMA2_OFFSET, + .end = MPC85xx_DMA2_OFFSET + + MPC85xx_DMA2_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_DMA2, + .end = MPC85xx_IRQ_DMA2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_DMA3] = { + .name = "fsl-dma", + .id = 3, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_DMA3_OFFSET, + .end = MPC85xx_DMA3_OFFSET + + MPC85xx_DMA3_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_DMA3, + .end = MPC85xx_IRQ_DMA3, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_DUART] = { + .name = "serial8250", + .id = 0, + .dev.platform_data = serial_platform_data, + }, + [MPC85xx_PERFMON] = { + .name = "fsl-perfmon", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_PERFMON_OFFSET, + .end = MPC85xx_PERFMON_OFFSET + + MPC85xx_PERFMON_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_PERFMON, + .end = MPC85xx_IRQ_PERFMON, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_SEC2] = { + .name = "fsl-sec2", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = MPC85xx_SEC2_OFFSET, + .end = MPC85xx_SEC2_OFFSET + + MPC85xx_SEC2_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC85xx_IRQ_SEC2, + .end = MPC85xx_IRQ_SEC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, +#ifdef CONFIG_CPM2 + [MPC85xx_CPM_FCC1] = { + .name = "fsl-cpm-fcc", + .id = 1, + .num_resources = 3, + .resource = (struct resource[]) { + { + .start = 0x91300, + .end = 0x9131F, + .flags = IORESOURCE_MEM, + }, + { + .start = 0x91380, + .end = 0x9139F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_FCC1, + .end = SIU_INT_FCC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_FCC2] = { + .name = "fsl-cpm-fcc", + .id = 2, + .num_resources = 3, + .resource = (struct resource[]) { + { + .start = 0x91320, + .end = 0x9133F, + .flags = IORESOURCE_MEM, + }, + { + .start = 0x913A0, + .end = 0x913CF, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_FCC2, + .end = SIU_INT_FCC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_FCC3] = { + .name = "fsl-cpm-fcc", + .id = 3, + .num_resources = 3, + .resource = (struct resource[]) { + { + .start = 0x91340, + .end = 0x9135F, + .flags = IORESOURCE_MEM, + }, + { + .start = 0x913D0, + .end = 0x913FF, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_FCC3, + .end = SIU_INT_FCC3, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_I2C] = { + .name = "fsl-cpm-i2c", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91860, + .end = 0x918BF, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_I2C, + .end = SIU_INT_I2C, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SCC1] = { + .name = "fsl-cpm-scc", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91A00, + .end = 0x91A1F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SCC1, + .end = SIU_INT_SCC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SCC2] = { + .name = "fsl-cpm-scc", + .id = 2, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91A20, + .end = 0x91A3F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SCC2, + .end = SIU_INT_SCC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SCC3] = { + .name = "fsl-cpm-scc", + .id = 3, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91A40, + .end = 0x91A5F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SCC3, + .end = SIU_INT_SCC3, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SCC4] = { + .name = "fsl-cpm-scc", + .id = 4, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91A60, + .end = 0x91A7F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SCC4, + .end = SIU_INT_SCC4, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SPI] = { + .name = "fsl-cpm-spi", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91AA0, + .end = 0x91AFF, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SPI, + .end = SIU_INT_SPI, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_MCC1] = { + .name = "fsl-cpm-mcc", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91B30, + .end = 0x91B3F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_MCC1, + .end = SIU_INT_MCC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_MCC2] = { + .name = "fsl-cpm-mcc", + .id = 2, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91B50, + .end = 0x91B5F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_MCC2, + .end = SIU_INT_MCC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SMC1] = { + .name = "fsl-cpm-smc", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91A80, + .end = 0x91A8F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SMC1, + .end = SIU_INT_SMC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_SMC2] = { + .name = "fsl-cpm-smc", + .id = 2, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91A90, + .end = 0x91A9F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_SMC2, + .end = SIU_INT_SMC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC85xx_CPM_USB] = { + .name = "fsl-cpm-usb", + .id = 2, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x91B60, + .end = 0x91B7F, + .flags = IORESOURCE_MEM, + }, + { + .start = SIU_INT_USB, + .end = SIU_INT_USB, + .flags = IORESOURCE_IRQ, + }, + }, + }, +#endif /* CONFIG_CPM2 */ +}; + +static int __init mach_mpc85xx_fixup(struct platform_device *pdev) +{ + ppc_sys_fixup_mem_resource(pdev, CCSRBAR); + return 0; +} + +static int __init mach_mpc85xx_init(void) +{ + ppc_sys_device_fixup = mach_mpc85xx_fixup; + return 0; +} + +postcore_initcall(mach_mpc85xx_init); diff -Nru a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/mpc85xx_sys.c 2005-03-30 16:58:48 -08:00 @@ -0,0 +1,118 @@ +/* + * arch/ppc/platforms/85xx/mpc85xx_sys.c + * + * MPC85xx System descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 Freescale Semiconductor Inc. + * + * 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. + */ + +#include +#include +#include +#include + +struct ppc_sys_spec *cur_ppc_sys_spec; +struct ppc_sys_spec ppc_sys_specs[] = { + { + .ppc_sys_name = "8540", + .mask = 0xFFFF0000, + .value = 0x80300000, + .num_devices = 10, + .device_list = (enum ppc_sys_devices[]) + { + MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1, + MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, + MPC85xx_PERFMON, MPC85xx_DUART, + }, + }, + { + .ppc_sys_name = "8560", + .mask = 0xFFFF0000, + .value = 0x80700000, + .num_devices = 19, + .device_list = (enum ppc_sys_devices[]) + { + MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, + MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, + MPC85xx_PERFMON, + MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1, + MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, MPC85xx_CPM_SCC4, + MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3, + MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2, + }, + }, + { + .ppc_sys_name = "8541", + .mask = 0xFFFF0000, + .value = 0x80720000, + .num_devices = 13, + .device_list = (enum ppc_sys_devices[]) + { + MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, + MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, + MPC85xx_PERFMON, MPC85xx_DUART, + MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, + MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, + }, + }, + { + .ppc_sys_name = "8541E", + .mask = 0xFFFF0000, + .value = 0x807A0000, + .num_devices = 14, + .device_list = (enum ppc_sys_devices[]) + { + MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, + MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, + MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, + MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, + MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, + }, + }, + { + .ppc_sys_name = "8555", + .mask = 0xFFFF0000, + .value = 0x80710000, + .num_devices = 20, + .device_list = (enum ppc_sys_devices[]) + { + MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, + MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, + MPC85xx_PERFMON, MPC85xx_DUART, + MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1, + MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, + MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3, + MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2, + MPC85xx_CPM_USB, + }, + }, + { + .ppc_sys_name = "8555E", + .mask = 0xFFFF0000, + .value = 0x80790000, + .num_devices = 21, + .device_list = (enum ppc_sys_devices[]) + { + MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1, + MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3, + MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2, + MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1, + MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, + MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3, + MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2, + MPC85xx_CPM_USB, + }, + }, + { /* default match */ + .ppc_sys_name = "", + .mask = 0x00000000, + .value = 0x00000000, + }, +}; diff -Nru a/arch/ppc/syslib/ppc4xx_serial.c b/arch/ppc/syslib/ppc4xx_serial.c --- a/arch/ppc/syslib/ppc4xx_serial.c 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,171 +0,0 @@ -/* - * arch/ppc/syslib/ppc405_serial.c - * - * Author: MontaVista Software, Inc. - * frank_rowand@mvista.com or source@mvista.com - * debbie_chu@mvista.com - * - * This is a fairly standard 165xx type device that will eventually - * be merged with other similar processor/boards. -- Dan - * - * 2000 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - * - * Console I/O support for Early kernel bringup. - */ - -#include - -#if defined(CONFIG_IBM405GP) || defined(CONFIG_IBM405CR) - -#ifdef CONFIG_KGDB -#include -#include -#endif - -#ifdef CONFIG_DEBUG_BRINGUP - -#include - -extern void ftr_reset_preferred_console(void); - - -static int ppc405_sercons_setup(struct console *co, char *options) -{ -#ifdef CONFIG_UART0_DEBUG_CONSOLE - volatile unsigned char *uart_dll = (char *)0xef600300; - volatile unsigned char *uart_fcr = (char *)0xef600302; - volatile unsigned char *uart_lcr = (char *)0xef600303; -#endif - -#ifdef CONFIG_UART1_DEBUG_CONSOLE - volatile unsigned char *uart_dll = (char *)0xef600400; - volatile unsigned char *uart_fcr = (char *)0xef600402; - volatile unsigned char *uart_lcr = (char *)0xef600403; -#endif - - *uart_lcr = *uart_lcr | 0x80; /* DLAB on */ - -/* ftr revisit - there is no config option for this -** also see include/asm-ppc/ppc405_serial.h -** -** #define CONFIG_IBM405GP_INTERNAL_CLOCK -*/ - - -#ifdef CONFIG_IBM405GP_INTERNAL_CLOCK - /* ftr revisit - ** why is bit 19 of chcr0 (0x1000) being set? - */ - /* 0x2a results in data corruption, kgdb works with 0x28 */ - *uart_dll = 0x28; /* 9600 baud */ - _put_CHCR0((_get_CHCR0() & 0xffffe000) | 0x103e); -#else - *uart_dll = 0x48; /* 9600 baud */ -#endif - *uart_lcr = *uart_lcr & 0x7f; /* DLAB off */ - - return 0; -} - - -/* - * This is a bringup hack, writing directly to uart0 or uart1 - */ - -static void -ppc405_sercons_write(struct console *co, const char *ptr, - unsigned nb) -{ - int i; - -#ifdef CONFIG_UART0_DEBUG_CONSOLE - volatile unsigned char *uart_xmit = (char *)0xef600300; - volatile unsigned char *uart_lsr = (char *)0xef600305; -#endif - -#ifdef CONFIG_UART1_DEBUG_CONSOLE - volatile unsigned char *uart_xmit = (char *)0xef600400; - volatile unsigned char *uart_lsr = (char *)0xef600405; -#endif - - for (i = 0; i < nb; ++i) { - - /* wait for transmit reg (possibly fifo) to empty */ - while ((*uart_lsr & 0x40) == 0) - ; - - *uart_xmit = (ptr[i] & 0xff); - - if (ptr[i] == '\n') { - - /* add a carriage return */ - - /* wait for transmit reg (possibly fifo) to empty */ - while ((*uart_lsr & 0x40) == 0) - ; - - *uart_xmit = '\r'; - } - } - - return; -} - - -static int -ppc405_sercons_read(struct console *co, char *ptr, unsigned nb) -{ -#ifdef CONFIG_UART0_DEBUG_CONSOLE - volatile unsigned char *uart_rcv = (char *)0xef600300; - volatile unsigned char *uart_lsr = (char *)0xef600305; -#endif - -#ifdef CONFIG_UART1_DEBUG_CONSOLE - volatile unsigned char *uart_rcv = (char *)0xef600400; - volatile unsigned char *uart_lsr = (char *)0xef600405; -#endif - - - /* ftr revisit: not tested */ - - if (nb == 0) - return(0); - - if (!ptr) - return(-1); - - /* wait for receive reg (possibly fifo) to contain data */ - while ((*uart_lsr & 0x01) == 0) - ; - - *ptr = *uart_rcv; - - return(1); -} - -static struct console ppc405_sercons = { - .name = "dbg_cons", - .write = ppc405_console_write, - .setup = ppc405_console_setup, - .flags = CON_PRINTBUFFER, - .index = -1, -}; - -void -register_debug_console(void) -{ - register_console(&ppc405_sercons); -} - -void -unregister_debug_console(void) -{ - unregister_console(&ppc405_sercons); -} - -#endif /* CONFIG_DEBUG_BRINGUP */ - -#endif /* #if defined(CONFIG_IBM405GP) || defined(CONFIG_IBM405CR) */ diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig --- a/arch/ppc64/Kconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/Kconfig 2005-03-30 16:58:49 -08:00 @@ -255,16 +255,21 @@ config PPC_RTAS - bool "Proc interface to RTAS" + bool depends on PPC_PSERIES + default y + +config RTAS_PROC + bool "Proc interface to RTAS" + depends on PPC_RTAS config RTAS_FLASH tristate "Firmware flash interface" - depends on PPC_RTAS + depends on RTAS_PROC config SCANLOG tristate "Scanlog dump interface" - depends on PPC_RTAS + depends on RTAS_PROC && PPC_PSERIES config LPARCFG tristate "LPAR Configuration Data" diff -Nru a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c --- a/arch/ppc64/boot/main.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/boot/main.c 2005-03-30 16:58:50 -08:00 @@ -112,7 +112,7 @@ if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4) exit(); - printf("zImage starting: loaded at 0x%x\n\r", (unsigned)_start); + printf("\n\rzImage starting: loaded at 0x%x\n\r", (unsigned)_start); /* * Now we try to claim some memory for the kernel itself @@ -151,7 +151,7 @@ printf("initial ramdisk moving 0x%lx <- 0x%lx (%lx bytes)\n\r", initrd.addr, (unsigned long)_initrd_start, initrd.size); memmove((void *)initrd.addr, (void *)_initrd_start, initrd.size); - printf("initrd head: 0x%lx\n", *((u32 *)initrd.addr)); + printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr)); } /* Eventually gunzip the kernel */ diff -Nru a/arch/ppc64/boot/no_initrd.c b/arch/ppc64/boot/no_initrd.c --- a/arch/ppc64/boot/no_initrd.c 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,2 +0,0 @@ -char initrd_data[1]; -int initrd_len = 0; diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile --- a/arch/ppc64/kernel/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/Makefile 2005-03-30 16:58:50 -08:00 @@ -31,7 +31,7 @@ obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o prom.o mpic.o obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \ - pSeries_nvram.o rtasd.o ras.o \ + pSeries_nvram.o rtasd.o ras.o pSeries_reconfig.o \ xics.o rtas.o pSeries_setup.o pSeries_iommu.o obj-$(CONFIG_EEH) += eeh.o @@ -39,7 +39,7 @@ obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o -obj-$(CONFIG_PPC_RTAS) += rtas-proc.o +obj-$(CONFIG_RTAS_PROC) += rtas-proc.o obj-$(CONFIG_SCANLOG) += scanlog.o obj-$(CONFIG_VIOPATH) += viopath.o obj-$(CONFIG_LPARCFG) += lparcfg.o diff -Nru a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c --- a/arch/ppc64/kernel/dma.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/dma.c 2005-03-30 16:58:47 -08:00 @@ -49,7 +49,7 @@ EXPORT_SYMBOL(dma_set_mask); void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int flag) + dma_addr_t *dma_handle, unsigned int __nocast flag) { struct dma_mapping_ops *dma_ops = get_dma_ops(dev); diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S --- a/arch/ppc64/kernel/entry.S 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/entry.S 2005-03-30 16:58:47 -08:00 @@ -616,7 +616,7 @@ bl .unrecoverable_exception b unrecov_restore -#ifdef CONFIG_PPC_PSERIES +#ifdef CONFIG_PPC_RTAS /* * On CHRP, the Run-Time Abstraction Services (RTAS) have to be * called with the MMU off. @@ -753,7 +753,7 @@ mtlr r0 blr /* return to caller */ -#endif /* CONFIG_PPC_PSERIES */ +#endif /* CONFIG_PPC_RTAS */ #ifdef CONFIG_PPC_MULTIPLATFORM diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc64/kernel/head.S 2005-03-30 16:58:48 -08:00 @@ -37,6 +37,7 @@ #include #include #include +#include #ifdef CONFIG_PPC_ISERIES #define DO_SOFT_DISABLE @@ -45,7 +46,6 @@ /* * hcall interface to pSeries LPAR */ -#define HVSC .long 0x44000022 #define H_SET_ASR 0x30 /* diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c --- a/arch/ppc64/kernel/iSeries_setup.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/iSeries_setup.c 2005-03-30 16:58:49 -08:00 @@ -15,7 +15,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - + #undef DEBUG #include @@ -39,6 +39,7 @@ #include #include #include +#include #include #include "iSeries_setup.h" @@ -57,6 +58,7 @@ #include #include #include +#include extern void hvlog(char *fmt, ...); @@ -72,7 +74,6 @@ static void build_iSeries_Memory_Map(void); static void setup_iSeries_cache_sizes(void); static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); -extern void iSeries_setup_arch(void); extern void iSeries_pci_final_fixup(void); /* Global Variables */ @@ -108,8 +109,8 @@ * and return the number of physical blocks and fill in the array of * block data. */ -unsigned long iSeries_process_Condor_mainstore_vpd(struct MemoryBlock *mb_array, - unsigned long max_entries) +static unsigned long iSeries_process_Condor_mainstore_vpd( + struct MemoryBlock *mb_array, unsigned long max_entries) { unsigned long holeFirstChunk, holeSizeChunks; unsigned long numMemoryBlocks = 1; @@ -154,7 +155,7 @@ #define MaxSegmentAdrRangeBlocks 128 #define MaxAreaRangeBlocks 4 -unsigned long iSeries_process_Regatta_mainstore_vpd( +static unsigned long iSeries_process_Regatta_mainstore_vpd( struct MemoryBlock *mb_array, unsigned long max_entries) { struct IoHriMainStoreSegment5 *msVpdP = @@ -246,7 +247,7 @@ printk(" Bitmap range: %016lx - %016lx\n" " Absolute range: %016lx - %016lx\n", mb_array[i].logicalStart, - mb_array[i].logicalEnd, + mb_array[i].logicalEnd, mb_array[i].absStart, mb_array[i].absEnd); mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart & 0x000fffffffffffff); @@ -261,7 +262,7 @@ return numSegmentBlocks; } -unsigned long iSeries_process_mainstore_vpd(struct MemoryBlock *mb_array, +static unsigned long iSeries_process_mainstore_vpd(struct MemoryBlock *mb_array, unsigned long max_entries) { unsigned long i; @@ -302,7 +303,7 @@ *p = 0; } -/*static*/ void __init iSeries_init_early(void) +static void __init iSeries_init_early(void) { DBG(" -> iSeries_init_early()\n"); @@ -355,7 +356,7 @@ #ifdef CONFIG_SMP smp_init_iSeries(); #endif - if (itLpNaca.xPirEnvironMode == 0) + if (itLpNaca.xPirEnvironMode == 0) piranha_simulator = 1; /* Associate Lp Event Queue 0 with processor 0 */ @@ -385,21 +386,21 @@ /* * The iSeries may have very large memories ( > 128 GB ) and a partition * may get memory in "chunks" that may be anywhere in the 2**52 real - * address space. The chunks are 256K in size. To map this to the - * memory model Linux expects, the AS/400 specific code builds a + * address space. The chunks are 256K in size. To map this to the + * memory model Linux expects, the AS/400 specific code builds a * translation table to translate what Linux thinks are "physical" - * addresses to the actual real addresses. This allows us to make + * addresses to the actual real addresses. This allows us to make * it appear to Linux that we have contiguous memory starting at * physical address zero while in fact this could be far from the truth. - * To avoid confusion, I'll let the words physical and/or real address - * apply to the Linux addresses while I'll use "absolute address" to + * To avoid confusion, I'll let the words physical and/or real address + * apply to the Linux addresses while I'll use "absolute address" to * refer to the actual hardware real address. * - * build_iSeries_Memory_Map gets information from the Hypervisor and + * build_iSeries_Memory_Map gets information from the Hypervisor and * looks at the Main Store VPD to determine the absolute addresses * of the memory that has been assigned to our partition and builds * a table used to translate Linux's physical addresses to these - * absolute addresses. Absolute addresses are needed when + * absolute addresses. Absolute addresses are needed when * communicating with the hypervisor (e.g. to build HPT entries) */ @@ -428,13 +429,13 @@ * otherwise, it might not be returned by PLIC as the first * chunks */ - + loadAreaFirstChunk = (u32)addr_to_chunk(itLpNaca.xLoadAreaAddr); loadAreaSize = itLpNaca.xLoadAreaChunks; /* - * Only add the pages already mapped here. - * Otherwise we might add the hpt pages + * Only add the pages already mapped here. + * Otherwise we might add the hpt pages * The rest of the pages of the load area * aren't in the HPT yet and can still * be assigned an arbitrary physical address @@ -446,7 +447,7 @@ /* * TODO Do we need to do something if the HPT is in the 64MB load area? - * This would be required if the itLpNaca.xLoadAreaChunks includes + * This would be required if the itLpNaca.xLoadAreaChunks includes * the HPT size */ @@ -454,11 +455,11 @@ " absolute addr = %016lx\n", chunk_to_addr(loadAreaFirstChunk)); printk("Load area size %dK\n", loadAreaSize * 256); - + for (nextPhysChunk = 0; nextPhysChunk < loadAreaSize; ++nextPhysChunk) msChunks.abs[nextPhysChunk] = loadAreaFirstChunk + nextPhysChunk; - + /* * Get absolute address of our HPT and remember it so * we won't map it to any physical address @@ -475,7 +476,7 @@ num_ptegs = hptSizePages * (PAGE_SIZE / (sizeof(HPTE) * HPTES_PER_GROUP)); htab_hash_mask = num_ptegs - 1; - + /* * The actual hashed page table is in the hypervisor, * we have no direct access @@ -533,9 +534,9 @@ } /* - * main store size (in chunks) is + * main store size (in chunks) is * totalChunks - hptSizeChunks - * which should be equal to + * which should be equal to * nextPhysChunk */ systemcfg->physicalMemorySize = chunk_to_addr(nextPhysChunk); @@ -654,7 +655,7 @@ /* * Document me. */ -void __init iSeries_setup_arch(void) +static void __init iSeries_setup_arch(void) { void *eventStack; unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index; @@ -673,14 +674,14 @@ */ eventStack = alloc_bootmem_pages(LpEventStackSize); memset(eventStack, 0, LpEventStackSize); - + /* Invoke the hypervisor to initialize the event stack */ HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize); /* Initialize fields in our Lp Event Queue */ xItLpQueue.xSlicEventStackPtr = (char *)eventStack; xItLpQueue.xSlicCurEventPtr = (char *)eventStack; - xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack + + xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack + (LpEventStackSize - LpEventMaxSize); xItLpQueue.xIndex = 0; @@ -698,7 +699,7 @@ tbFreqMhzHundreths = (tbFreqHz / 10000) - (tbFreqMhz * 100); ppc_tb_freq = tbFreqHz; - printk("Max logical processors = %d\n", + printk("Max logical processors = %d\n", itVpdAreas.xSlicMaxLogicalProcs); printk("Max physical processors = %d\n", itVpdAreas.xSlicMaxPhysicalProcs); @@ -710,7 +711,7 @@ printk("Processor version = %x\n", systemcfg->processor); } -void iSeries_get_cpuinfo(struct seq_file *m) +static void iSeries_get_cpuinfo(struct seq_file *m) { seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); } @@ -719,7 +720,7 @@ * Document me. * and Implement me. */ -int iSeries_get_irq(struct pt_regs *regs) +static int iSeries_get_irq(struct pt_regs *regs) { /* -2 means ignore this interrupt */ return -2; @@ -728,7 +729,7 @@ /* * Document me. */ -void iSeries_restart(char *cmd) +static void iSeries_restart(char *cmd) { mf_reboot(); } @@ -736,7 +737,7 @@ /* * Document me. */ -void iSeries_power_off(void) +static void iSeries_power_off(void) { mf_power_off(); } @@ -744,14 +745,11 @@ /* * Document me. */ -void iSeries_halt(void) +static void iSeries_halt(void) { mf_power_off(); } -/* JDH Hack */ -unsigned long jdh_time = 0; - extern void setup_default_decr(void); /* @@ -762,17 +760,17 @@ * and sets up the kernel timer decrementer based on that value. * */ -void __init iSeries_calibrate_decr(void) +static void __init iSeries_calibrate_decr(void) { unsigned long cyclesPerUsec; struct div_result divres; - + /* Compute decrementer (and TB) frequency in cycles/sec */ cyclesPerUsec = ppc_tb_freq / 1000000; /* * Set the amount to refresh the decrementer by. This - * is the number of decrementer ticks it takes for + * is the number of decrementer ticks it takes for * 1/HZ seconds. */ tb_ticks_per_jiffy = ppc_tb_freq / HZ; @@ -797,7 +795,7 @@ setup_default_decr(); } -void __init iSeries_progress(char * st, unsigned short code) +static void __init iSeries_progress(char * st, unsigned short code) { printk("Progress: [%04x] - %s\n", (unsigned)code, st); if (!piranha_simulator && mf_initialized) { @@ -829,7 +827,7 @@ } } -int __init iSeries_src_init(void) +static int __init iSeries_src_init(void) { /* clear the progress line */ ppc_md.progress(" ", 0xffff); diff -Nru a/arch/ppc64/kernel/iSeries_setup.h b/arch/ppc64/kernel/iSeries_setup.h --- a/arch/ppc64/kernel/iSeries_setup.h 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/iSeries_setup.h 2005-03-30 16:58:49 -08:00 @@ -19,19 +19,8 @@ #ifndef __ISERIES_SETUP_H__ #define __ISERIES_SETUP_H__ -extern void iSeries_setup_arch(void); -extern void iSeries_setup_residual(struct seq_file *m, int cpu_id); -extern void iSeries_get_cpuinfo(struct seq_file *m); -extern void iSeries_init_IRQ(void); -extern int iSeries_get_irq(struct pt_regs *regs); -extern void iSeries_restart(char *cmd); -extern void iSeries_power_off(void); -extern void iSeries_halt(void); -extern void iSeries_time_init(void); extern void iSeries_get_boot_time(struct rtc_time *tm); extern int iSeries_set_rtc_time(struct rtc_time *tm); extern void iSeries_get_rtc_time(struct rtc_time *tm); -extern void iSeries_calibrate_decr(void); -extern void iSeries_progress( char *, unsigned short ); #endif /* __ISERIES_SETUP_H__ */ diff -Nru a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c --- a/arch/ppc64/kernel/iommu.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/iommu.c 2005-03-30 16:58:50 -08:00 @@ -514,7 +514,7 @@ * to the dma address (mapping) of the first page. */ void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, - dma_addr_t *dma_handle, int flag) + dma_addr_t *dma_handle, unsigned int __nocast flag) { void *ret = NULL; dma_addr_t mapping; diff -Nru a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c --- a/arch/ppc64/kernel/kprobes.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/kprobes.c 2005-03-30 16:58:50 -08:00 @@ -80,9 +80,6 @@ int ret = 0; unsigned int *addr = (unsigned int *)regs->nip; - /* We're in an interrupt, but this is clear and BUG()-safe. */ - preempt_disable(); - /* Check we're not actually recursing */ if (kprobe_running()) { /* We *are* holding lock here, so this is safe. @@ -139,10 +136,14 @@ ss_probe: prepare_singlestep(p, regs); kprobe_status = KPROBE_HIT_SS; + /* + * This preempt_disable() matches the preempt_enable_no_resched() + * in post_kprobe_handler(). + */ + preempt_disable(); return 1; no_kprobe: - preempt_enable_no_resched(); return ret; } @@ -215,27 +216,35 @@ void *data) { struct die_args *args = (struct die_args *)data; + int ret = NOTIFY_DONE; + + /* + * Interrupts are not disabled here. We need to disable + * preemption, because kprobe_running() uses smp_processor_id(). + */ + preempt_disable(); switch (val) { case DIE_IABR_MATCH: case DIE_DABR_MATCH: case DIE_BPT: if (kprobe_handler(args->regs)) - return NOTIFY_STOP; + ret = NOTIFY_STOP; break; case DIE_SSTEP: if (post_kprobe_handler(args->regs)) - return NOTIFY_STOP; + ret = NOTIFY_STOP; break; case DIE_GPF: case DIE_PAGE_FAULT: if (kprobe_running() && kprobe_fault_handler(args->regs, args->trapnr)) - return NOTIFY_STOP; + ret = NOTIFY_STOP; break; default: break; } - return NOTIFY_DONE; + preempt_enable(); + return ret; } int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) @@ -253,7 +262,6 @@ void jprobe_return(void) { - preempt_enable_no_resched(); asm volatile("trap" ::: "memory"); } diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/misc.S 2005-03-30 16:58:50 -08:00 @@ -680,10 +680,6 @@ ld r30,-16(r1) blr -#ifndef CONFIG_PPC_PSERIES /* hack hack hack */ -#define ppc_rtas sys_ni_syscall -#endif - /* Why isn't this a) automatic, b) written in 'C'? */ .balign 8 _GLOBAL(sys_call_table32) diff -Nru a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c --- a/arch/ppc64/kernel/nvram.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/nvram.c 2005-03-30 16:58:47 -08:00 @@ -507,8 +507,8 @@ struct nvram_partition * tmp_part; unsigned char c_sum; char * header; - long size; int total_size; + int err; if (ppc_md.nvram_size == NULL) return -ENODEV; @@ -522,29 +522,37 @@ while (cur_index < total_size) { - size = ppc_md.nvram_read(header, NVRAM_HEADER_LEN, &cur_index); - if (size != NVRAM_HEADER_LEN) { + err = ppc_md.nvram_read(header, NVRAM_HEADER_LEN, &cur_index); + if (err != NVRAM_HEADER_LEN) { printk(KERN_ERR "nvram_scan_partitions: Error parsing " "nvram partitions\n"); - kfree(header); - return size; + goto out; } cur_index -= NVRAM_HEADER_LEN; /* nvram_read will advance us */ memcpy(&phead, header, NVRAM_HEADER_LEN); + err = 0; c_sum = nvram_checksum(&phead); - if (c_sum != phead.checksum) - printk(KERN_WARNING "WARNING: nvram partition checksum " - "was %02x, should be %02x!\n", phead.checksum, c_sum); - + if (c_sum != phead.checksum) { + printk(KERN_WARNING "WARNING: nvram partition checksum" + " was %02x, should be %02x!\n", + phead.checksum, c_sum); + printk(KERN_WARNING "Terminating nvram partition scan\n"); + goto out; + } + if (!phead.length) { + printk(KERN_WARNING "WARNING: nvram corruption " + "detected: 0-length partition\n"); + goto out; + } tmp_part = (struct nvram_partition *) kmalloc(sizeof(struct nvram_partition), GFP_KERNEL); + err = -ENOMEM; if (!tmp_part) { printk(KERN_ERR "nvram_scan_partitions: kmalloc failed\n"); - kfree(header); - return -ENOMEM; + goto out; } memcpy(&tmp_part->header, &phead, NVRAM_HEADER_LEN); @@ -553,9 +561,11 @@ cur_index += phead.length * NVRAM_BLOCK_LEN; } + err = 0; + out: kfree(header); - return 0; + return err; } static int __init nvram_init(void) diff -Nru a/arch/ppc64/kernel/pSeries_hvCall.S b/arch/ppc64/kernel/pSeries_hvCall.S --- a/arch/ppc64/kernel/pSeries_hvCall.S 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/pSeries_hvCall.S 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,6 @@ /* * arch/ppc64/kernel/pSeries_hvCall.S * - * * This file contains the generic code to perform a call to the * pSeries LPAR hypervisor. * NOTE: this file will go away when we move to inline this work. @@ -11,133 +10,114 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include -#include -#include +#include #include -#include -#include #include -/* - * hcall interface to pSeries LPAR - */ -#define HVSC .long 0x44000022 - -/* long plpar_hcall(unsigned long opcode, R3 - unsigned long arg1, R4 - unsigned long arg2, R5 - unsigned long arg3, R6 - unsigned long arg4, R7 - unsigned long *out1, R8 - unsigned long *out2, R9 - unsigned long *out3); R10 - */ +#define STK_PARM(i) (48 + ((i)-3)*8) .text + +/* long plpar_hcall(unsigned long opcode, R3 + unsigned long arg1, R4 + unsigned long arg2, R5 + unsigned long arg3, R6 + unsigned long arg4, R7 + unsigned long *out1, R8 + unsigned long *out2, R9 + unsigned long *out3); R10 + */ _GLOBAL(plpar_hcall) mfcr r0 - std r0,-8(r1) - stdu r1,-32(r1) - - std r8,-8(r1) /* Save out ptrs. */ - std r9,-16(r1) - std r10,-24(r1) - - HVSC /* invoke the hypervisor */ - ld r10,-8(r1) /* Fetch r4-r7 ret args. */ - std r4,0(r10) - ld r10,-16(r1) - std r5,0(r10) - ld r10,-24(r1) - std r6,0(r10) + std r8,STK_PARM(r8)(r1) /* Save out ptrs */ + std r9,STK_PARM(r9)(r1) + std r10,STK_PARM(r10)(r1) + + stw r0,8(r1) + + HVSC /* invoke the hypervisor */ + + lwz r0,8(r1) + + ld r8,STK_PARM(r8)(r1) /* Fetch r4-r6 ret args */ + ld r9,STK_PARM(r9)(r1) + ld r10,STK_PARM(r10)(r1) + std r4,0(r8) + std r5,0(r9) + std r6,0(r10) - ld r1,0(r1) - ld r0,-8(r1) mtcrf 0xff,r0 - blr /* return r3 = status */ + blr /* return r3 = status */ /* Simple interface with no output values (other than status) */ _GLOBAL(plpar_hcall_norets) mfcr r0 - std r0,-8(r1) - HVSC /* invoke the hypervisor */ - ld r0,-8(r1) - mtcrf 0xff,r0 - blr /* return r3 = status */ + stw r0,8(r1) + HVSC /* invoke the hypervisor */ -/* long plpar_hcall_8arg_2ret(unsigned long opcode, R3 - unsigned long arg1, R4 - unsigned long arg2, R5 - unsigned long arg3, R6 - unsigned long arg4, R7 - unsigned long arg5, R8 - unsigned long arg6, R9 - unsigned long arg7, R10 - unsigned long arg8, 112(R1) - unsigned long *out1); 120(R1) + lwz r0,8(r1) + mtcrf 0xff,r0 + blr /* return r3 = status */ - */ - .text +/* long plpar_hcall_8arg_2ret(unsigned long opcode, R3 + unsigned long arg1, R4 + unsigned long arg2, R5 + unsigned long arg3, R6 + unsigned long arg4, R7 + unsigned long arg5, R8 + unsigned long arg6, R9 + unsigned long arg7, R10 + unsigned long arg8, 112(R1) + unsigned long *out1); 120(R1) + */ _GLOBAL(plpar_hcall_8arg_2ret) mfcr r0 + ld r11,STK_PARM(r11)(r1) /* put arg8 in R11 */ + stw r0,8(r1) - ld r11, 112(r1) /* put arg8 and out1 in R11 and R12 */ - ld r12, 120(r1) - - std r0,-8(r1) - stdu r1,-32(r1) + HVSC /* invoke the hypervisor */ - std r12,-8(r1) /* Save out ptr */ - - HVSC /* invoke the hypervisor */ - - ld r10,-8(r1) /* Fetch r4 ret arg */ - std r4,0(r10) - - ld r1,0(r1) - ld r0,-8(r1) + lwz r0,8(r1) + ld r10,STK_PARM(r12)(r1) /* Fetch r4 ret arg */ + std r4,0(r10) mtcrf 0xff,r0 - blr /* return r3 = status */ + blr /* return r3 = status */ -/* long plpar_hcall_4out(unsigned long opcode, R3 - unsigned long arg1, R4 - unsigned long arg2, R5 - unsigned long arg3, R6 - unsigned long arg4, R7 - unsigned long *out1, (r4) R8 - unsigned long *out2, (r5) R9 - unsigned long *out3, (r6) R10 - unsigned long *out4); (r7) 112(R1). From Parameter save area. +/* long plpar_hcall_4out(unsigned long opcode, R3 + unsigned long arg1, R4 + unsigned long arg2, R5 + unsigned long arg3, R6 + unsigned long arg4, R7 + unsigned long *out1, R8 + unsigned long *out2, R9 + unsigned long *out3, R10 + unsigned long *out4); 112(R1) */ _GLOBAL(plpar_hcall_4out) mfcr r0 - std r0,-8(r1) - ld r14,112(r1) - stdu r1,-48(r1) - - std r8,32(r1) /* Save out ptrs. */ - std r9,24(r1) - std r10,16(r1) - std r14,8(r1) - - HVSC /* invoke the hypervisor */ + stw r0,8(r1) - ld r14,32(r1) /* Fetch r4-r7 ret args. */ - std r4,0(r14) - ld r14,24(r1) - std r5,0(r14) - ld r14,16(r1) - std r6,0(r14) - ld r14,8(r1) - std r7,0(r14) + std r8,STK_PARM(r8)(r1) /* Save out ptrs */ + std r9,STK_PARM(r9)(r1) + std r10,STK_PARM(r10)(r1) + + HVSC /* invoke the hypervisor */ + + lwz r0,8(r1) + + ld r8,STK_PARM(r8)(r1) /* Fetch r4-r7 ret args */ + ld r9,STK_PARM(r9)(r1) + ld r10,STK_PARM(r10)(r1) + ld r11,STK_PARM(r11)(r1) + std r4,0(r8) + std r5,0(r9) + std r6,0(r10) + std r7,0(r11) - ld r1,0(r1) - ld r0,-8(r1) mtcrf 0xff,r0 - blr /* return r3 = status */ + blr /* return r3 = status */ diff -Nru a/arch/ppc64/kernel/pSeries_iommu.c b/arch/ppc64/kernel/pSeries_iommu.c --- a/arch/ppc64/kernel/pSeries_iommu.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/pSeries_iommu.c 2005-03-30 16:58:47 -08:00 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include "pci.h" @@ -401,6 +402,8 @@ struct device_node *dn, *pdn; unsigned int *dma_window = NULL; + DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self); + dn = pci_bus_to_OF_node(bus); /* Find nearest ibm,dma-window, walking up the device tree */ @@ -455,6 +458,78 @@ } } +static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) +{ + int err = NOTIFY_OK; + struct device_node *np = node; + + switch (action) { + case PSERIES_RECONFIG_REMOVE: + if (np->iommu_table && + get_property(np, "ibm,dma-window", NULL)) + iommu_free_table(np); + break; + default: + err = NOTIFY_DONE; + break; + } + return err; +} + +static struct notifier_block iommu_reconfig_nb = { + .notifier_call = iommu_reconfig_notifier, +}; + +static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) +{ + struct device_node *pdn, *dn; + struct iommu_table *tbl; + int *dma_window = NULL; + + DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, dev->pretty_name); + + /* dev setup for LPAR is a little tricky, since the device tree might + * contain the dma-window properties per-device and not neccesarily + * for the bus. So we need to search upwards in the tree until we + * either hit a dma-window property, OR find a parent with a table + * already allocated. + */ + dn = pci_device_to_OF_node(dev); + + for (pdn = dn; pdn && !pdn->iommu_table; pdn = pdn->parent) { + dma_window = (unsigned int *)get_property(pdn, "ibm,dma-window", NULL); + if (dma_window) + break; + } + + /* Check for parent == NULL so we don't try to setup the empty EADS + * slots on POWER4 machines. + */ + if (dma_window == NULL || pdn->parent == NULL) { + /* Fall back to regular (non-LPAR) dev setup */ + DBG("No dma window for device, falling back to regular setup\n"); + iommu_dev_setup_pSeries(dev); + return; + } else { + DBG("Found DMA window, allocating table\n"); + } + + if (!pdn->iommu_table) { + /* iommu_table_setparms_lpar needs bussubno. */ + pdn->bussubno = pdn->phb->bus->number; + + tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), + GFP_KERNEL); + + iommu_table_setparms_lpar(pdn->phb, pdn, tbl, dma_window); + + pdn->iommu_table = iommu_init_table(tbl); + } + + if (pdn != dn) + dn->iommu_table = pdn->iommu_table; +} + static void iommu_bus_setup_null(struct pci_bus *b) { } static void iommu_dev_setup_null(struct pci_dev *d) { } @@ -479,13 +554,16 @@ ppc_md.tce_free = tce_free_pSeriesLP; } ppc_md.iommu_bus_setup = iommu_bus_setup_pSeriesLP; + ppc_md.iommu_dev_setup = iommu_dev_setup_pSeriesLP; } else { ppc_md.tce_build = tce_build_pSeries; ppc_md.tce_free = tce_free_pSeries; ppc_md.iommu_bus_setup = iommu_bus_setup_pSeries; + ppc_md.iommu_dev_setup = iommu_dev_setup_pSeries; } - ppc_md.iommu_dev_setup = iommu_dev_setup_pSeries; + + pSeries_reconfig_notifier_register(&iommu_reconfig_nb); pci_iommu_init(); } diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c --- a/arch/ppc64/kernel/pSeries_pci.c 2005-03-30 16:58:51 -08:00 +++ b/arch/ppc64/kernel/pSeries_pci.c 2005-03-30 16:58:51 -08:00 @@ -540,6 +540,9 @@ static void __init pSeries_request_regions(void) { + if (!isa_io_base) + return; + request_region(0x20,0x20,"pic1"); request_region(0xa0,0x20,"pic2"); request_region(0x00,0x20,"dma1"); diff -Nru a/arch/ppc64/kernel/pSeries_reconfig.c b/arch/ppc64/kernel/pSeries_reconfig.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/pSeries_reconfig.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,434 @@ +/* + * pSeries_reconfig.c - support for dynamic reconfiguration (including PCI + * Hotplug and Dynamic Logical Partitioning on RPA platforms). + * + * Copyright (C) 2005 Nathan Lynch + * Copyright (C) 2005 IBM Corporation + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version + * 2 as published by the Free Software Foundation. + */ + +#include +#include +#include +#include + +#include +#include +#include + + + +/* + * Routines for "runtime" addition and removal of device tree nodes. + */ +#ifdef CONFIG_PROC_DEVICETREE +/* + * Add a node to /proc/device-tree. + */ +static void add_node_proc_entries(struct device_node *np) +{ + struct proc_dir_entry *ent; + + ent = proc_mkdir(strrchr(np->full_name, '/') + 1, np->parent->pde); + if (ent) + proc_device_tree_add_node(np, ent); +} + +static void remove_node_proc_entries(struct device_node *np) +{ + struct property *pp = np->properties; + struct device_node *parent = np->parent; + + while (pp) { + remove_proc_entry(pp->name, np->pde); + pp = pp->next; + } + + /* Assuming that symlinks have the same parent directory as + * np->pde. + */ + if (np->name_link) + remove_proc_entry(np->name_link->name, parent->pde); + if (np->addr_link) + remove_proc_entry(np->addr_link->name, parent->pde); + if (np->pde) + remove_proc_entry(np->pde->name, parent->pde); +} +#else /* !CONFIG_PROC_DEVICETREE */ +static void add_node_proc_entries(struct device_node *np) +{ + return; +} + +static void remove_node_proc_entries(struct device_node *np) +{ + return; +} +#endif /* CONFIG_PROC_DEVICETREE */ + +/** + * derive_parent - basically like dirname(1) + * @path: the full_name of a node to be added to the tree + * + * Returns the node which should be the parent of the node + * described by path. E.g., for path = "/foo/bar", returns + * the node with full_name = "/foo". + */ +static struct device_node *derive_parent(const char *path) +{ + struct device_node *parent = NULL; + char *parent_path = "/"; + size_t parent_path_len = strrchr(path, '/') - path + 1; + + /* reject if path is "/" */ + if (!strcmp(path, "/")) + return ERR_PTR(-EINVAL); + + if (strrchr(path, '/') != path) { + parent_path = kmalloc(parent_path_len, GFP_KERNEL); + if (!parent_path) + return ERR_PTR(-ENOMEM); + strlcpy(parent_path, path, parent_path_len); + } + parent = of_find_node_by_path(parent_path); + if (!parent) + return ERR_PTR(-EINVAL); + if (strcmp(parent_path, "/")) + kfree(parent_path); + return parent; +} + +static struct notifier_block *pSeries_reconfig_chain; + +int pSeries_reconfig_notifier_register(struct notifier_block *nb) +{ + return notifier_chain_register(&pSeries_reconfig_chain, nb); +} + +void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) +{ + notifier_chain_unregister(&pSeries_reconfig_chain, nb); +} + +static int pSeries_reconfig_add_node(const char *path, struct property *proplist) +{ + struct device_node *np; + int err = -ENOMEM; + + np = kcalloc(1, sizeof(*np), GFP_KERNEL); + if (!np) + goto out_err; + + np->full_name = kmalloc(strlen(path) + 1, GFP_KERNEL); + if (!np->full_name) + goto out_err; + + strcpy(np->full_name, path); + + np->properties = proplist; + OF_MARK_DYNAMIC(np); + kref_init(&np->kref); + + np->parent = derive_parent(path); + if (IS_ERR(np->parent)) { + err = PTR_ERR(np->parent); + goto out_err; + } + + err = notifier_call_chain(&pSeries_reconfig_chain, + PSERIES_RECONFIG_ADD, np); + if (err == NOTIFY_BAD) { + printk(KERN_ERR "Failed to add device node %s\n", path); + err = -ENOMEM; /* For now, safe to assume kmalloc failure */ + goto out_err; + } + + of_attach_node(np); + + add_node_proc_entries(np); + + of_node_put(np->parent); + + return 0; + +out_err: + if (np) { + of_node_put(np->parent); + kfree(np->full_name); + kfree(np); + } + return err; +} + +static int pSeries_reconfig_remove_node(struct device_node *np) +{ + struct device_node *parent, *child; + + parent = of_get_parent(np); + if (!parent) + return -EINVAL; + + if ((child = of_get_next_child(np, NULL))) { + of_node_put(child); + return -EBUSY; + } + + remove_node_proc_entries(np); + + notifier_call_chain(&pSeries_reconfig_chain, + PSERIES_RECONFIG_REMOVE, np); + of_detach_node(np); + + of_node_put(parent); + of_node_put(np); /* Must decrement the refcount */ + return 0; +} + +/* + * /proc/ppc64/ofdt - yucky binary interface for adding and removing + * OF device nodes. Should be deprecated as soon as we get an + * in-kernel wrapper for the RTAS ibm,configure-connector call. + */ + +static void release_prop_list(const struct property *prop) +{ + struct property *next; + for (; prop; prop = next) { + next = prop->next; + kfree(prop->name); + kfree(prop->value); + kfree(prop); + } + +} + +/** + * parse_next_property - process the next property from raw input buffer + * @buf: input buffer, must be nul-terminated + * @end: end of the input buffer + 1, for validation + * @name: return value; set to property name in buf + * @length: return value; set to length of value + * @value: return value; set to the property value in buf + * + * Note that the caller must make copies of the name and value returned, + * this function does no allocation or copying of the data. Return value + * is set to the next name in buf, or NULL on error. + */ +static char * parse_next_property(char *buf, char *end, char **name, int *length, + unsigned char **value) +{ + char *tmp; + + *name = buf; + + tmp = strchr(buf, ' '); + if (!tmp) { + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); + return NULL; + } + *tmp = '\0'; + + if (++tmp >= end) { + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); + return NULL; + } + + /* now we're on the length */ + *length = -1; + *length = simple_strtoul(tmp, &tmp, 10); + if (*length == -1) { + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); + return NULL; + } + if (*tmp != ' ' || ++tmp >= end) { + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); + return NULL; + } + + /* now we're on the value */ + *value = tmp; + tmp += *length; + if (tmp > end) { + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); + return NULL; + } + else if (tmp < end && *tmp != ' ' && *tmp != '\0') { + printk(KERN_ERR "property parse failed in %s at line %d\n", + __FUNCTION__, __LINE__); + return NULL; + } + tmp++; + + /* and now we should be on the next name, or the end */ + return tmp; +} + +static struct property *new_property(const char *name, const int length, + const unsigned char *value, struct property *last) +{ + struct property *new = kmalloc(sizeof(*new), GFP_KERNEL); + + if (!new) + return NULL; + memset(new, 0, sizeof(*new)); + + if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL))) + goto cleanup; + if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) + goto cleanup; + + strcpy(new->name, name); + memcpy(new->value, value, length); + *(((char *)new->value) + length) = 0; + new->length = length; + new->next = last; + return new; + +cleanup: + if (new->name) + kfree(new->name); + if (new->value) + kfree(new->value); + kfree(new); + return NULL; +} + +static int do_add_node(char *buf, size_t bufsize) +{ + char *path, *end, *name; + struct device_node *np; + struct property *prop = NULL; + unsigned char* value; + int length, rv = 0; + + end = buf + bufsize; + path = buf; + buf = strchr(buf, ' '); + if (!buf) + return -EINVAL; + *buf = '\0'; + buf++; + + if ((np = of_find_node_by_path(path))) { + of_node_put(np); + return -EINVAL; + } + + /* rv = build_prop_list(tmp, bufsize - (tmp - buf), &proplist); */ + while (buf < end && + (buf = parse_next_property(buf, end, &name, &length, &value))) { + struct property *last = prop; + + prop = new_property(name, length, value, last); + if (!prop) { + rv = -ENOMEM; + prop = last; + goto out; + } + } + if (!buf) { + rv = -EINVAL; + goto out; + } + + rv = pSeries_reconfig_add_node(path, prop); + +out: + if (rv) + release_prop_list(prop); + return rv; +} + +static int do_remove_node(char *buf) +{ + struct device_node *node; + int rv = -ENODEV; + + if ((node = of_find_node_by_path(buf))) + rv = pSeries_reconfig_remove_node(node); + + of_node_put(node); + return rv; +} + +/** + * ofdt_write - perform operations on the Open Firmware device tree + * + * @file: not used + * @buf: command and arguments + * @count: size of the command buffer + * @off: not used + * + * Operations supported at this time are addition and removal of + * whole nodes along with their properties. Operations on individual + * properties are not implemented (yet). + */ +static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, + loff_t *off) +{ + int rv = 0; + char *kbuf; + char *tmp; + + if (!(kbuf = kmalloc(count + 1, GFP_KERNEL))) { + rv = -ENOMEM; + goto out; + } + if (copy_from_user(kbuf, buf, count)) { + rv = -EFAULT; + goto out; + } + + kbuf[count] = '\0'; + + tmp = strchr(kbuf, ' '); + if (!tmp) { + rv = -EINVAL; + goto out; + } + *tmp = '\0'; + tmp++; + + if (!strcmp(kbuf, "add_node")) + rv = do_add_node(tmp, count - (tmp - kbuf)); + else if (!strcmp(kbuf, "remove_node")) + rv = do_remove_node(tmp); + else + rv = -EINVAL; +out: + kfree(kbuf); + return rv ? rv : count; +} + +static struct file_operations ofdt_fops = { + .write = ofdt_write +}; + +/* create /proc/ppc64/ofdt write-only by root */ +static int proc_ppc64_create_ofdt(void) +{ + struct proc_dir_entry *ent; + + if (!(systemcfg->platform & PLATFORM_PSERIES)) + return 0; + + ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); + if (ent) { + ent->nlink = 1; + ent->data = NULL; + ent->size = 0; + ent->proc_fops = &ofdt_fops; + } + + return 0; +} +__initcall(proc_ppc64_create_ofdt); diff -Nru a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c --- a/arch/ppc64/kernel/pSeries_smp.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/pSeries_smp.c 2005-03-30 16:58:49 -08:00 @@ -44,6 +44,7 @@ #include #include #include +#include #include "mpic.h" @@ -53,8 +54,16 @@ #define DBG(fmt...) #endif +/* + * The primary thread of each non-boot processor is recorded here before + * smp init. + */ +static cpumask_t of_spin_map; + extern void pSeries_secondary_smp_init(unsigned long); +#ifdef CONFIG_HOTPLUG_CPU + /* Get state of physical CPU. * Return codes: * 0 - The processor is in the RTAS stopped state @@ -81,9 +90,6 @@ return cpu_status; } - -#ifdef CONFIG_HOTPLUG_CPU - int pSeries_cpu_disable(void) { systemcfg->processorCount--; @@ -122,60 +128,134 @@ paca[cpu].cpu_start = 0; } -/* Search all cpu device nodes for an offline logical cpu. If a - * device node has a "ibm,my-drc-index" property (meaning this is an - * LPAR), paranoid-check whether we own the cpu. For each "thread" - * of a cpu, if it is offline and has the same hw index as before, - * grab that in preference. +/* + * Update cpu_present_map and paca(s) for a new cpu node. The wrinkle + * here is that a cpu device node may represent up to two logical cpus + * in the SMT case. We must honor the assumption in other code that + * the logical ids for sibling SMT threads x and y are adjacent, such + * that x^1 == y and y^1 == x. */ -static unsigned int find_physical_cpu_to_start(unsigned int old_hwindex) +static int pSeries_add_processor(struct device_node *np) { - struct device_node *np = NULL; - unsigned int best = -1U; + unsigned int cpu; + cpumask_t candidate_map, tmp = CPU_MASK_NONE; + int err = -ENOSPC, len, nthreads, i; + u32 *intserv; - while ((np = of_find_node_by_type(np, "cpu"))) { - int nr_threads, len; - u32 *index = (u32 *)get_property(np, "ibm,my-drc-index", NULL); - u32 *tid = (u32 *) - get_property(np, "ibm,ppc-interrupt-server#s", &len); + intserv = (u32 *)get_property(np, "ibm,ppc-interrupt-server#s", &len); + if (!intserv) + return 0; - if (!tid) - tid = (u32 *)get_property(np, "reg", &len); + nthreads = len / sizeof(u32); + for (i = 0; i < nthreads; i++) + cpu_set(i, tmp); + + lock_cpu_hotplug(); + + BUG_ON(!cpus_subset(cpu_present_map, cpu_possible_map)); + + /* Get a bitmap of unoccupied slots. */ + cpus_xor(candidate_map, cpu_possible_map, cpu_present_map); + if (cpus_empty(candidate_map)) { + /* If we get here, it most likely means that NR_CPUS is + * less than the partition's max processors setting. + */ + printk(KERN_ERR "Cannot add cpu %s; this system configuration" + " supports %d logical cpus.\n", np->full_name, + cpus_weight(cpu_possible_map)); + goto out_unlock; + } - if (!tid) - continue; + while (!cpus_empty(tmp)) + if (cpus_subset(tmp, candidate_map)) + /* Found a range where we can insert the new cpu(s) */ + break; + else + cpus_shift_left(tmp, tmp, nthreads); - /* If there is a drc-index, make sure that we own - * the cpu. - */ - if (index) { - int state; - int rc = rtas_get_sensor(9003, *index, &state); - if (rc < 0 || state != 1) + if (cpus_empty(tmp)) { + printk(KERN_ERR "Unable to find space in cpu_present_map for" + " processor %s with %d thread(s)\n", np->name, + nthreads); + goto out_unlock; + } + + for_each_cpu_mask(cpu, tmp) { + BUG_ON(cpu_isset(cpu, cpu_present_map)); + cpu_set(cpu, cpu_present_map); + set_hard_smp_processor_id(cpu, *intserv++); + } + err = 0; +out_unlock: + unlock_cpu_hotplug(); + return err; +} + +/* + * Update the present map for a cpu node which is going away, and set + * the hard id in the paca(s) to -1 to be consistent with boot time + * convention for non-present cpus. + */ +static void pSeries_remove_processor(struct device_node *np) +{ + unsigned int cpu; + int len, nthreads, i; + u32 *intserv; + + intserv = (u32 *)get_property(np, "ibm,ppc-interrupt-server#s", &len); + if (!intserv) + return; + + nthreads = len / sizeof(u32); + + lock_cpu_hotplug(); + for (i = 0; i < nthreads; i++) { + for_each_present_cpu(cpu) { + if (get_hard_smp_processor_id(cpu) != intserv[i]) continue; + BUG_ON(cpu_online(cpu)); + cpu_clear(cpu, cpu_present_map); + set_hard_smp_processor_id(cpu, -1); + break; } + if (cpu == NR_CPUS) + printk(KERN_WARNING "Could not find cpu to remove " + "with physical id 0x%x\n", intserv[i]); + } + unlock_cpu_hotplug(); +} - nr_threads = len / sizeof(u32); +static int pSeries_smp_notifier(struct notifier_block *nb, unsigned long action, void *node) +{ + int err = NOTIFY_OK; - while (nr_threads--) { - if (0 == query_cpu_stopped(tid[nr_threads])) { - best = tid[nr_threads]; - if (best == old_hwindex) - goto out; - } - } + switch (action) { + case PSERIES_RECONFIG_ADD: + if (pSeries_add_processor(node)) + err = NOTIFY_BAD; + break; + case PSERIES_RECONFIG_REMOVE: + pSeries_remove_processor(node); + break; + default: + err = NOTIFY_DONE; + break; } -out: - of_node_put(np); - return best; + return err; } +static struct notifier_block pSeries_smp_nb = { + .notifier_call = pSeries_smp_notifier, +}; + +#endif /* CONFIG_HOTPLUG_CPU */ + /** * smp_startup_cpu() - start the given cpu * - * At boot time, there is nothing to do. At run-time, call RTAS with - * the appropriate start location, if the cpu is in the RTAS stopped - * state. + * At boot time, there is nothing to do for primary threads which were + * started from Open Firmware. For anything else, call RTAS with the + * appropriate start location. * * Returns: * 0 - failure @@ -188,23 +268,15 @@ pSeries_secondary_smp_init)); unsigned int pcpu; - /* At boot time the cpus are already spinning in hold - * loops, so nothing to do. */ - if (system_state < SYSTEM_RUNNING) + if (cpu_isset(lcpu, of_spin_map)) + /* Already started by OF and sitting in spin loop */ return 1; - pcpu = find_physical_cpu_to_start(get_hard_smp_processor_id(lcpu)); - if (pcpu == -1U) { - printk(KERN_INFO "No more cpus available, failing\n"); - return 0; - } + pcpu = get_hard_smp_processor_id(lcpu); /* Fixup atomic count: it exited inside IRQ handler. */ paca[lcpu].__current->thread_info->preempt_count = 0; - /* At boot this is done in prom.c. */ - paca[lcpu].hw_cpu_id = pcpu; - status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, pcpu, start_here, lcpu); if (status != 0) { @@ -213,12 +285,6 @@ } return 1; } -#else /* ... CONFIG_HOTPLUG_CPU */ -static inline int __devinit smp_startup_cpu(unsigned int lcpu) -{ - return 1; -} -#endif /* CONFIG_HOTPLUG_CPU */ static inline void smp_xics_do_message(int cpu, int msg) { @@ -258,6 +324,8 @@ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) vpa_init(cpu); + cpu_clear(cpu, of_spin_map); + /* * Put the calling processor into the GIQ. This is really only * necessary from a secondary thread as the OF start-cpu interface @@ -307,6 +375,20 @@ paca[nr].cpu_start = 1; } +static int smp_pSeries_cpu_bootable(unsigned int nr) +{ + /* Special case - we inhibit secondary thread startup + * during boot if the user requests it. Odd-numbered + * cpus are assumed to be secondary threads. + */ + if (system_state < SYSTEM_RUNNING && + cur_cpu_spec->cpu_features & CPU_FTR_SMT && + !smt_enabled_at_boot && nr % 2 != 0) + return 0; + + return 1; +} + static struct smp_ops_t pSeries_mpic_smp_ops = { .message_pass = smp_mpic_message_pass, .probe = smp_mpic_probe, @@ -319,12 +401,13 @@ .probe = smp_xics_probe, .kick_cpu = smp_pSeries_kick_cpu, .setup_cpu = smp_xics_setup_cpu, + .cpu_bootable = smp_pSeries_cpu_bootable, }; /* This is called very early */ void __init smp_init_pSeries(void) { - int ret, i; + int i; DBG(" -> smp_init_pSeries()\n"); @@ -336,22 +419,26 @@ #ifdef CONFIG_HOTPLUG_CPU smp_ops->cpu_disable = pSeries_cpu_disable; smp_ops->cpu_die = pSeries_cpu_die; + + /* Processors can be added/removed only on LPAR */ + if (systemcfg->platform == PLATFORM_PSERIES_LPAR) + pSeries_reconfig_notifier_register(&pSeries_smp_nb); #endif - /* Start secondary threads on SMT systems; primary threads - * are already in the running state. - */ - for_each_present_cpu(i) { - if (query_cpu_stopped(get_hard_smp_processor_id(i)) == 0) { - printk("%16.16x : starting thread\n", i); - DBG("%16.16x : starting thread\n", i); - rtas_call(rtas_token("start-cpu"), 3, 1, &ret, - get_hard_smp_processor_id(i), - __pa((u32)*((unsigned long *) - pSeries_secondary_smp_init)), - i); + /* Mark threads which are still spinning in hold loops. */ + if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + for_each_present_cpu(i) { + if (i % 2 == 0) + /* + * Even-numbered logical cpus correspond to + * primary threads. + */ + cpu_set(i, of_spin_map); } - } + else + of_spin_map = cpu_present_map; + + cpu_clear(boot_cpuid, of_spin_map); /* Non-lpar has additional take/give timebase */ if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/pci.c 2005-03-30 16:58:50 -08:00 @@ -210,6 +210,11 @@ struct pci_controller *hose, *tmp; struct pci_bus *bus; + /* For now, override phys_mem_access_prot. If we need it, + * later, we may move that initialization to each ppc_md + */ + ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; + #ifdef CONFIG_PPC_ISERIES iSeries_pcibios_init(); #endif @@ -330,25 +335,24 @@ * * Returns negative error code on failure, zero on success. */ -static __inline__ int __pci_mmap_make_offset(struct pci_dev *dev, - struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) +static struct resource *__pci_mmap_make_offset(struct pci_dev *dev, + unsigned long *offset, + enum pci_mmap_state mmap_state) { struct pci_controller *hose = pci_bus_to_host(dev->bus); - unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; unsigned long io_offset = 0; int i, res_bit; if (hose == 0) - return -EINVAL; /* should never happen */ + return NULL; /* should never happen */ /* If memory, add on the PCI bridge address offset */ if (mmap_state == pci_mmap_mem) { - offset += hose->pci_mem_offset; + *offset += hose->pci_mem_offset; res_bit = IORESOURCE_MEM; } else { io_offset = (unsigned long)hose->io_base_virt; - offset += io_offset; + *offset += io_offset; res_bit = IORESOURCE_IO; } @@ -369,50 +373,106 @@ continue; /* In the range of this resource? */ - if (offset < (rp->start & PAGE_MASK) || offset > rp->end) + if (*offset < (rp->start & PAGE_MASK) || *offset > rp->end) continue; /* found it! construct the final physical address */ if (mmap_state == pci_mmap_io) - offset += hose->io_base_phys - io_offset; - - vma->vm_pgoff = offset >> PAGE_SHIFT; - return 0; + *offset += hose->io_base_phys - io_offset; + return rp; } - return -EINVAL; -} - -/* - * Set vm_flags of VMA, as appropriate for this architecture, for a pci device - * mapping. - */ -static __inline__ void __pci_mmap_set_flags(struct pci_dev *dev, - struct vm_area_struct *vma, - enum pci_mmap_state mmap_state) -{ - vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; + return NULL; } /* * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci * device mapping. */ -static __inline__ void __pci_mmap_set_pgprot(struct pci_dev *dev, - struct vm_area_struct *vma, - enum pci_mmap_state mmap_state, - int write_combine) +static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, + pgprot_t protection, + enum pci_mmap_state mmap_state, + int write_combine) { - long prot = pgprot_val(vma->vm_page_prot); + unsigned long prot = pgprot_val(protection); + + /* Write combine is always 0 on non-memory space mappings. On + * memory space, if the user didn't pass 1, we check for a + * "prefetchable" resource. This is a bit hackish, but we use + * this to workaround the inability of /sysfs to provide a write + * combine bit + */ + if (mmap_state != pci_mmap_mem) + write_combine = 0; + else if (write_combine == 0) { + if (rp->flags & IORESOURCE_PREFETCH) + write_combine = 1; + } /* XXX would be nice to have a way to ask for write-through */ prot |= _PAGE_NO_CACHE; - if (!write_combine) + if (write_combine) + prot &= ~_PAGE_GUARDED; + else prot |= _PAGE_GUARDED; - vma->vm_page_prot = __pgprot(prot); + + printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, + prot); + + return __pgprot(prot); } /* + * This one is used by /dev/mem and fbdev who have no clue about the + * PCI device, it tries to find the PCI device first and calls the + * above routine + */ +pgprot_t pci_phys_mem_access_prot(struct file *file, + unsigned long offset, + unsigned long size, + pgprot_t protection) +{ + struct pci_dev *pdev = NULL; + struct resource *found = NULL; + unsigned long prot = pgprot_val(protection); + int i; + + if (page_is_ram(offset >> PAGE_SHIFT)) + return prot; + + prot |= _PAGE_NO_CACHE | _PAGE_GUARDED; + + for_each_pci_dev(pdev) { + for (i = 0; i <= PCI_ROM_RESOURCE; i++) { + struct resource *rp = &pdev->resource[i]; + int flags = rp->flags; + + /* Active and same type? */ + if ((flags & IORESOURCE_MEM) == 0) + continue; + /* In the range of this resource? */ + if (offset < (rp->start & PAGE_MASK) || + offset > rp->end) + continue; + found = rp; + break; + } + if (found) + break; + } + if (found) { + if (found->flags & IORESOURCE_PREFETCH) + prot &= ~_PAGE_GUARDED; + pci_dev_put(pdev); + } + + DBG("non-PCI map for %lx, prot: %lx\n", offset, prot); + + return __pgprot(prot); +} + + +/* * Perform the actual remap of the pages for a PCI device mapping, as * appropriate for this architecture. The region in the process to map * is described by vm_start and vm_end members of VMA, the base physical @@ -426,14 +486,19 @@ enum pci_mmap_state mmap_state, int write_combine) { + unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; + struct resource *rp; int ret; - ret = __pci_mmap_make_offset(dev, vma, mmap_state); - if (ret < 0) - return ret; + rp = __pci_mmap_make_offset(dev, &offset, mmap_state); + if (rp == NULL) + return -EINVAL; - __pci_mmap_set_flags(dev, vma, mmap_state); - __pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine); + vma->vm_pgoff = offset >> PAGE_SHIFT; + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; + vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp, + vma->vm_page_prot, + mmap_state, write_combine); ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot); diff -Nru a/arch/ppc64/kernel/pci_direct_iommu.c b/arch/ppc64/kernel/pci_direct_iommu.c --- a/arch/ppc64/kernel/pci_direct_iommu.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/pci_direct_iommu.c 2005-03-30 16:58:47 -08:00 @@ -31,7 +31,7 @@ #include "pci.h" static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size, - dma_addr_t *dma_handle, int flag) + dma_addr_t *dma_handle, unsigned int __nocast flag) { void *ret; diff -Nru a/arch/ppc64/kernel/pci_dn.c b/arch/ppc64/kernel/pci_dn.c --- a/arch/ppc64/kernel/pci_dn.c 2005-03-30 16:58:50 -08:00 +++ b/arch/ppc64/kernel/pci_dn.c 2005-03-30 16:58:50 -08:00 @@ -27,6 +27,7 @@ #include #include #include +#include #include "pci.h" @@ -161,6 +162,25 @@ } EXPORT_SYMBOL(fetch_dev_dn); +static int pci_dn_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) +{ + struct device_node *np = node; + int err = NOTIFY_OK; + + switch (action) { + case PSERIES_RECONFIG_ADD: + update_dn_pci_info(np, np->parent->phb); + break; + default: + err = NOTIFY_DONE; + break; + } + return err; +} + +static struct notifier_block pci_dn_reconfig_nb = { + .notifier_call = pci_dn_reconfig_notifier, +}; /* * Actually initialize the phbs. @@ -173,4 +193,6 @@ /* This must be done first so the device nodes have valid pci info! */ list_for_each_entry_safe(phb, tmp, &hose_list, list_node) pci_devs_phb_init_dynamic(phb); + + pSeries_reconfig_notifier_register(&pci_dn_reconfig_nb); } diff -Nru a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c --- a/arch/ppc64/kernel/pci_iommu.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/pci_iommu.c 2005-03-30 16:58:49 -08:00 @@ -76,7 +76,7 @@ * to the dma address (mapping) of the first page. */ static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size, - dma_addr_t *dma_handle, int flag) + dma_addr_t *dma_handle, unsigned int __nocast flag) { return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle, flag); diff -Nru a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c --- a/arch/ppc64/kernel/pmac_feature.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/pmac_feature.c 2005-03-30 16:58:49 -08:00 @@ -220,6 +220,36 @@ return 0; } +static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long value) +{ + struct macio_chip* macio = &macio_chips[0]; + struct device_node *phy; + int need_reset; + + /* + * We must not reset the combo PHYs, only the BCM5221 found in + * the iMac G5. + */ + phy = of_get_next_child(node, NULL); + if (!phy) + return -ENODEV; + need_reset = device_is_compatible(phy, "B5221"); + of_node_put(phy); + if (!need_reset) + return 0; + + /* PHY reset is GPIO 29, not in device-tree unfortunately */ + MACIO_OUT8(K2_GPIO_EXTINT_0 + 29, + KEYLARGO_GPIO_OUTPUT_ENABLE | KEYLARGO_GPIO_OUTOUT_DATA); + /* Thankfully, this is now always called at a time when we can + * schedule by sungem. + */ + msleep(10); + MACIO_OUT8(K2_GPIO_EXTINT_0 + 29, 0); + + return 0; +} + #ifdef CONFIG_SMP static long __pmac g5_reset_cpu(struct device_node* node, long param, long value) { @@ -306,6 +336,7 @@ { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable }, { PMAC_FTR_READ_GPIO, g5_read_gpio }, { PMAC_FTR_WRITE_GPIO, g5_write_gpio }, + { PMAC_FTR_GMAC_PHY_RESET, g5_eth_phy_reset }, #ifdef CONFIG_SMP { PMAC_FTR_RESET_CPU, g5_reset_cpu }, #endif /* CONFIG_SMP */ diff -Nru a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c --- a/arch/ppc64/kernel/proc_ppc64.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/proc_ppc64.c 2005-03-30 16:58:49 -08:00 @@ -41,20 +41,6 @@ .mmap = page_map_mmap }; -#ifdef CONFIG_PPC_PSERIES -/* routines for /proc/ppc64/ofdt */ -static ssize_t ofdt_write(struct file *, const char __user *, size_t, loff_t *); -static void proc_ppc64_create_ofdt(void); -static int do_remove_node(char *); -static int do_add_node(char *, size_t); -static void release_prop_list(const struct property *); -static struct property *new_property(const char *, const int, const unsigned char *, struct property *); -static char * parse_next_property(char *, char *, char **, int *, unsigned char**); -static struct file_operations ofdt_fops = { - .write = ofdt_write -}; -#endif - /* * Create the ppc64 and ppc64/rtas directories early. This allows us to * assume that they have been previously created in drivers. @@ -92,11 +78,6 @@ pde->size = PAGE_SIZE; pde->proc_fops = &page_map_fops; -#ifdef CONFIG_PPC_PSERIES - if ((systemcfg->platform & PLATFORM_PSERIES)) - proc_ppc64_create_ofdt(); -#endif - return 0; } __initcall(proc_ppc64_init); @@ -145,233 +126,3 @@ return 0; } -#ifdef CONFIG_PPC_PSERIES -/* create /proc/ppc64/ofdt write-only by root */ -static void proc_ppc64_create_ofdt(void) -{ - struct proc_dir_entry *ent; - - ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); - if (ent) { - ent->nlink = 1; - ent->data = NULL; - ent->size = 0; - ent->proc_fops = &ofdt_fops; - } -} - -/** - * ofdt_write - perform operations on the Open Firmware device tree - * - * @file: not used - * @buf: command and arguments - * @count: size of the command buffer - * @off: not used - * - * Operations supported at this time are addition and removal of - * whole nodes along with their properties. Operations on individual - * properties are not implemented (yet). - */ -static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, - loff_t *off) -{ - int rv = 0; - char *kbuf; - char *tmp; - - if (!(kbuf = kmalloc(count + 1, GFP_KERNEL))) { - rv = -ENOMEM; - goto out; - } - if (copy_from_user(kbuf, buf, count)) { - rv = -EFAULT; - goto out; - } - - kbuf[count] = '\0'; - - tmp = strchr(kbuf, ' '); - if (!tmp) { - rv = -EINVAL; - goto out; - } - *tmp = '\0'; - tmp++; - - if (!strcmp(kbuf, "add_node")) - rv = do_add_node(tmp, count - (tmp - kbuf)); - else if (!strcmp(kbuf, "remove_node")) - rv = do_remove_node(tmp); - else - rv = -EINVAL; -out: - kfree(kbuf); - return rv ? rv : count; -} - -static int do_remove_node(char *buf) -{ - struct device_node *node; - int rv = -ENODEV; - - if ((node = of_find_node_by_path(buf))) - rv = of_remove_node(node); - - of_node_put(node); - return rv; -} - -static int do_add_node(char *buf, size_t bufsize) -{ - char *path, *end, *name; - struct device_node *np; - struct property *prop = NULL; - unsigned char* value; - int length, rv = 0; - - end = buf + bufsize; - path = buf; - buf = strchr(buf, ' '); - if (!buf) - return -EINVAL; - *buf = '\0'; - buf++; - - if ((np = of_find_node_by_path(path))) { - of_node_put(np); - return -EINVAL; - } - - /* rv = build_prop_list(tmp, bufsize - (tmp - buf), &proplist); */ - while (buf < end && - (buf = parse_next_property(buf, end, &name, &length, &value))) { - struct property *last = prop; - - prop = new_property(name, length, value, last); - if (!prop) { - rv = -ENOMEM; - prop = last; - goto out; - } - } - if (!buf) { - rv = -EINVAL; - goto out; - } - - rv = of_add_node(path, prop); - -out: - if (rv) - release_prop_list(prop); - return rv; -} - -static struct property *new_property(const char *name, const int length, - const unsigned char *value, struct property *last) -{ - struct property *new = kmalloc(sizeof(*new), GFP_KERNEL); - - if (!new) - return NULL; - memset(new, 0, sizeof(*new)); - - if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL))) - goto cleanup; - if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) - goto cleanup; - - strcpy(new->name, name); - memcpy(new->value, value, length); - *(((char *)new->value) + length) = 0; - new->length = length; - new->next = last; - return new; - -cleanup: - if (new->name) - kfree(new->name); - if (new->value) - kfree(new->value); - kfree(new); - return NULL; -} - -/** - * parse_next_property - process the next property from raw input buffer - * @buf: input buffer, must be nul-terminated - * @end: end of the input buffer + 1, for validation - * @name: return value; set to property name in buf - * @length: return value; set to length of value - * @value: return value; set to the property value in buf - * - * Note that the caller must make copies of the name and value returned, - * this function does no allocation or copying of the data. Return value - * is set to the next name in buf, or NULL on error. - */ -static char * parse_next_property(char *buf, char *end, char **name, int *length, - unsigned char **value) -{ - char *tmp; - - *name = buf; - - tmp = strchr(buf, ' '); - if (!tmp) { - printk(KERN_ERR "property parse failed in %s at line %d\n", - __FUNCTION__, __LINE__); - return NULL; - } - *tmp = '\0'; - - if (++tmp >= end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", - __FUNCTION__, __LINE__); - return NULL; - } - - /* now we're on the length */ - *length = -1; - *length = simple_strtoul(tmp, &tmp, 10); - if (*length == -1) { - printk(KERN_ERR "property parse failed in %s at line %d\n", - __FUNCTION__, __LINE__); - return NULL; - } - if (*tmp != ' ' || ++tmp >= end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", - __FUNCTION__, __LINE__); - return NULL; - } - - /* now we're on the value */ - *value = tmp; - tmp += *length; - if (tmp > end) { - printk(KERN_ERR "property parse failed in %s at line %d\n", - __FUNCTION__, __LINE__); - return NULL; - } - else if (tmp < end && *tmp != ' ' && *tmp != '\0') { - printk(KERN_ERR "property parse failed in %s at line %d\n", - __FUNCTION__, __LINE__); - return NULL; - } - tmp++; - - /* and now we should be on the next name, or the end */ - return tmp; -} - -static void release_prop_list(const struct property *prop) -{ - struct property *next; - for (; prop; prop = next) { - next = prop->next; - kfree(prop->name); - kfree(prop->value); - kfree(prop); - } - -} -#endif /* defined(CONFIG_PPC_PSERIES) */ diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/prom.c 2005-03-30 16:58:49 -08:00 @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -53,6 +52,7 @@ #include #include #include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -73,8 +73,8 @@ }; -typedef unsigned long interpret_func(struct device_node *, unsigned long, - int, int, int); +typedef int interpret_func(struct device_node *, unsigned long *, + int, int, int); extern struct rtas_t rtas; extern struct lmb lmb; @@ -103,6 +103,25 @@ struct device_node *of_chosen; /* + * Wrapper for allocating memory for various data that needs to be + * attached to device nodes as they are processed at boot or when + * added to the device tree later (e.g. DLPAR). At boot there is + * already a region reserved so we just increment *mem_start by size; + * otherwise we call kmalloc. + */ +static void * prom_alloc(unsigned long size, unsigned long *mem_start) +{ + unsigned long tmp; + + if (!mem_start) + return kmalloc(size, GFP_KERNEL); + + tmp = *mem_start; + *mem_start += size; + return (void *)tmp; +} + +/* * Find the device_node with a given phandle. */ static struct device_node * find_phandle(phandle ph) @@ -255,9 +274,9 @@ return nintrc; } -static unsigned long __init finish_node_interrupts(struct device_node *np, - unsigned long mem_start, - int measure_only) +static int __devinit finish_node_interrupts(struct device_node *np, + unsigned long *mem_start, + int measure_only) { unsigned int *ints; int intlen, intrcells, intrcount; @@ -267,14 +286,16 @@ ints = (unsigned int *) get_property(np, "interrupts", &intlen); if (ints == NULL) - return mem_start; + return 0; intrcells = prom_n_intr_cells(np); intlen /= intrcells * sizeof(unsigned int); - np->intrs = (struct interrupt_info *) mem_start; - mem_start += intlen * sizeof(struct interrupt_info); + + np->intrs = prom_alloc(intlen * sizeof(*(np->intrs)), mem_start); + if (!np->intrs) + return -ENOMEM; if (measure_only) - return mem_start; + return 0; intrcount = 0; for (i = 0; i < intlen; ++i, ints += intrcells) { @@ -315,43 +336,49 @@ } np->n_intrs = intrcount; - return mem_start; + return 0; } -static unsigned long __init interpret_pci_props(struct device_node *np, - unsigned long mem_start, - int naddrc, int nsizec, - int measure_only) +static int __devinit interpret_pci_props(struct device_node *np, + unsigned long *mem_start, + int naddrc, int nsizec, + int measure_only) { struct address_range *adr; struct pci_reg_property *pci_addrs; - int i, l; + int i, l, n_addrs; pci_addrs = (struct pci_reg_property *) get_property(np, "assigned-addresses", &l); - if (pci_addrs != 0 && l >= sizeof(struct pci_reg_property)) { - i = 0; - adr = (struct address_range *) mem_start; - while ((l -= sizeof(struct pci_reg_property)) >= 0) { - if (!measure_only) { - adr[i].space = pci_addrs[i].addr.a_hi; - adr[i].address = pci_addrs[i].addr.a_lo | - ((u64)pci_addrs[i].addr.a_mid << 32); - adr[i].size = pci_addrs[i].size_lo; - } - ++i; - } - np->addrs = adr; - np->n_addrs = i; - mem_start += i * sizeof(struct address_range); + if (!pci_addrs) + return 0; + + n_addrs = l / sizeof(*pci_addrs); + + adr = prom_alloc(n_addrs * sizeof(*adr), mem_start); + if (!adr) + return -ENOMEM; + + if (measure_only) + return 0; + + np->addrs = adr; + np->n_addrs = n_addrs; + + for (i = 0; i < n_addrs; i++) { + adr[i].space = pci_addrs[i].addr.a_hi; + adr[i].address = pci_addrs[i].addr.a_lo | + ((u64)pci_addrs[i].addr.a_mid << 32); + adr[i].size = pci_addrs[i].size_lo; } - return mem_start; + + return 0; } -static unsigned long __init interpret_dbdma_props(struct device_node *np, - unsigned long mem_start, - int naddrc, int nsizec, - int measure_only) +static int __init interpret_dbdma_props(struct device_node *np, + unsigned long *mem_start, + int naddrc, int nsizec, + int measure_only) { struct reg_property32 *rp; struct address_range *adr; @@ -372,7 +399,7 @@ rp = (struct reg_property32 *) get_property(np, "reg", &l); if (rp != 0 && l >= sizeof(struct reg_property32)) { i = 0; - adr = (struct address_range *) mem_start; + adr = (struct address_range *) (*mem_start); while ((l -= sizeof(struct reg_property32)) >= 0) { if (!measure_only) { adr[i].space = 2; @@ -383,16 +410,16 @@ } np->addrs = adr; np->n_addrs = i; - mem_start += i * sizeof(struct address_range); + (*mem_start) += i * sizeof(struct address_range); } - return mem_start; + return 0; } -static unsigned long __init interpret_macio_props(struct device_node *np, - unsigned long mem_start, - int naddrc, int nsizec, - int measure_only) +static int __init interpret_macio_props(struct device_node *np, + unsigned long *mem_start, + int naddrc, int nsizec, + int measure_only) { struct reg_property32 *rp; struct address_range *adr; @@ -413,7 +440,7 @@ rp = (struct reg_property32 *) get_property(np, "reg", &l); if (rp != 0 && l >= sizeof(struct reg_property32)) { i = 0; - adr = (struct address_range *) mem_start; + adr = (struct address_range *) (*mem_start); while ((l -= sizeof(struct reg_property32)) >= 0) { if (!measure_only) { adr[i].space = 2; @@ -424,16 +451,16 @@ } np->addrs = adr; np->n_addrs = i; - mem_start += i * sizeof(struct address_range); + (*mem_start) += i * sizeof(struct address_range); } - return mem_start; + return 0; } -static unsigned long __init interpret_isa_props(struct device_node *np, - unsigned long mem_start, - int naddrc, int nsizec, - int measure_only) +static int __init interpret_isa_props(struct device_node *np, + unsigned long *mem_start, + int naddrc, int nsizec, + int measure_only) { struct isa_reg_property *rp; struct address_range *adr; @@ -442,7 +469,7 @@ rp = (struct isa_reg_property *) get_property(np, "reg", &l); if (rp != 0 && l >= sizeof(struct isa_reg_property)) { i = 0; - adr = (struct address_range *) mem_start; + adr = (struct address_range *) (*mem_start); while ((l -= sizeof(struct isa_reg_property)) >= 0) { if (!measure_only) { adr[i].space = rp[i].space; @@ -453,16 +480,16 @@ } np->addrs = adr; np->n_addrs = i; - mem_start += i * sizeof(struct address_range); + (*mem_start) += i * sizeof(struct address_range); } - return mem_start; + return 0; } -static unsigned long __init interpret_root_props(struct device_node *np, - unsigned long mem_start, - int naddrc, int nsizec, - int measure_only) +static int __init interpret_root_props(struct device_node *np, + unsigned long *mem_start, + int naddrc, int nsizec, + int measure_only) { struct address_range *adr; int i, l; @@ -472,7 +499,7 @@ rp = (unsigned int *) get_property(np, "reg", &l); if (rp != 0 && l >= rpsize) { i = 0; - adr = (struct address_range *) mem_start; + adr = (struct address_range *) (*mem_start); while ((l -= rpsize) >= 0) { if (!measure_only) { adr[i].space = 0; @@ -484,26 +511,30 @@ } np->addrs = adr; np->n_addrs = i; - mem_start += i * sizeof(struct address_range); + (*mem_start) += i * sizeof(struct address_range); } - return mem_start; + return 0; } -static unsigned long __init finish_node(struct device_node *np, - unsigned long mem_start, - interpret_func *ifunc, - int naddrc, int nsizec, - int measure_only) +static int __devinit finish_node(struct device_node *np, + unsigned long *mem_start, + interpret_func *ifunc, + int naddrc, int nsizec, + int measure_only) { struct device_node *child; - int *ip; + int *ip, rc = 0; /* get the device addresses and interrupts */ if (ifunc != NULL) - mem_start = ifunc(np, mem_start, naddrc, nsizec, measure_only); + rc = ifunc(np, mem_start, naddrc, nsizec, measure_only); + if (rc) + goto out; - mem_start = finish_node_interrupts(np, mem_start, measure_only); + rc = finish_node_interrupts(np, mem_start, measure_only); + if (rc) + goto out; /* Look for #address-cells and #size-cells properties. */ ip = (int *) get_property(np, "#address-cells", NULL); @@ -539,11 +570,14 @@ || !strcmp(np->type, "media-bay")))) ifunc = NULL; - for (child = np->child; child != NULL; child = child->sibling) - mem_start = finish_node(child, mem_start, ifunc, - naddrc, nsizec, measure_only); - - return mem_start; + for (child = np->child; child != NULL; child = child->sibling) { + rc = finish_node(child, mem_start, ifunc, + naddrc, nsizec, measure_only); + if (rc) + goto out; + } +out: + return rc; } /** @@ -555,7 +589,7 @@ */ void __init finish_device_tree(void) { - unsigned long mem, size; + unsigned long start, end, size = 0; DBG(" -> finish_device_tree\n"); @@ -568,10 +602,10 @@ virt_irq_init(); /* Finish device-tree (pre-parsing some properties etc...) */ - size = finish_node(allnodes, 0, NULL, 0, 0, 1); - mem = (unsigned long)abs_to_virt(lmb_alloc(size, 128)); - if (finish_node(allnodes, mem, NULL, 0, 0, 0) != mem + size) - BUG(); + finish_node(allnodes, &size, NULL, 0, 0, 1); + end = start = (unsigned long)abs_to_virt(lmb_alloc(size, 128)); + finish_node(allnodes, &end, NULL, 0, 0, 0); + BUG_ON(end != start + size); DBG(" <- finish_device_tree\n"); } @@ -894,7 +928,7 @@ if (get_flat_dt_prop(node, "linux,iommu-force-on", NULL) != NULL) iommu_force_on = 1; -#ifdef CONFIG_PPC_PSERIES +#ifdef CONFIG_PPC_RTAS /* To help early debugging via the front panel, we retreive a minimal * set of RTAS infos now if available */ @@ -910,7 +944,7 @@ rtas.size = *prop; } } -#endif /* CONFIG_PPC_PSERIES */ +#endif /* CONFIG_PPC_RTAS */ /* break now */ return 1; @@ -1541,132 +1575,6 @@ } EXPORT_SYMBOL(of_node_put); -/** - * derive_parent - basically like dirname(1) - * @path: the full_name of a node to be added to the tree - * - * Returns the node which should be the parent of the node - * described by path. E.g., for path = "/foo/bar", returns - * the node with full_name = "/foo". - */ -static struct device_node *derive_parent(const char *path) -{ - struct device_node *parent = NULL; - char *parent_path = "/"; - size_t parent_path_len = strrchr(path, '/') - path + 1; - - /* reject if path is "/" */ - if (!strcmp(path, "/")) - return NULL; - - if (strrchr(path, '/') != path) { - parent_path = kmalloc(parent_path_len, GFP_KERNEL); - if (!parent_path) - return NULL; - strlcpy(parent_path, path, parent_path_len); - } - parent = of_find_node_by_path(parent_path); - if (strcmp(parent_path, "/")) - kfree(parent_path); - return parent; -} - -/* - * Routines for "runtime" addition and removal of device tree nodes. - */ -#ifdef CONFIG_PROC_DEVICETREE -/* - * Add a node to /proc/device-tree. - */ -static void add_node_proc_entries(struct device_node *np) -{ - struct proc_dir_entry *ent; - - ent = proc_mkdir(strrchr(np->full_name, '/') + 1, np->parent->pde); - if (ent) - proc_device_tree_add_node(np, ent); -} - -static void remove_node_proc_entries(struct device_node *np) -{ - struct property *pp = np->properties; - struct device_node *parent = np->parent; - - while (pp) { - remove_proc_entry(pp->name, np->pde); - pp = pp->next; - } - - /* Assuming that symlinks have the same parent directory as - * np->pde. - */ - if (np->name_link) - remove_proc_entry(np->name_link->name, parent->pde); - if (np->addr_link) - remove_proc_entry(np->addr_link->name, parent->pde); - if (np->pde) - remove_proc_entry(np->pde->name, parent->pde); -} -#else /* !CONFIG_PROC_DEVICETREE */ -static void add_node_proc_entries(struct device_node *np) -{ - return; -} - -static void remove_node_proc_entries(struct device_node *np) -{ - return; -} -#endif /* CONFIG_PROC_DEVICETREE */ - -/* - * Fix up n_intrs and intrs fields in a new device node - * - */ -static int of_finish_dynamic_node_interrupts(struct device_node *node) -{ - int intrcells, intlen, i; - unsigned *irq, *ints, virq; - struct device_node *ic; - - ints = (unsigned int *)get_property(node, "interrupts", &intlen); - intrcells = prom_n_intr_cells(node); - intlen /= intrcells * sizeof(unsigned int); - node->n_intrs = intlen; - node->intrs = kmalloc(sizeof(struct interrupt_info) * intlen, - GFP_KERNEL); - if (!node->intrs) - return -ENOMEM; - - for (i = 0; i < intlen; ++i) { - int n, j; - node->intrs[i].line = 0; - node->intrs[i].sense = 1; - n = map_interrupt(&irq, &ic, node, ints, intrcells); - if (n <= 0) - continue; - virq = virt_irq_create_mapping(irq[0]); - if (virq == NO_IRQ) { - printk(KERN_CRIT "Could not allocate interrupt " - "number for %s\n", node->full_name); - return -ENOMEM; - } - node->intrs[i].line = irq_offset_up(virq); - if (n > 1) - node->intrs[i].sense = irq[1]; - if (n > 2) { - printk(KERN_DEBUG "hmmm, got %d intr cells for %s:", n, - node->full_name); - for (j = 0; j < n; ++j) - printk(" %d", irq[j]); - printk("\n"); - } - ints += intrcells; - } - return 0; -} - - /* * Fix up the uninitialized fields in a new device node: * name, type, n_addrs, addrs, n_intrs, intrs, and pci-specific fields @@ -1678,10 +1586,11 @@ * This should probably be split up into smaller chunks. */ -static int of_finish_dynamic_node(struct device_node *node) +static int of_finish_dynamic_node(struct device_node *node, + unsigned long *unused1, int unused2, + int unused3, int unused4) { struct device_node *parent = of_get_parent(node); - u32 *regs; int err = 0; phandle *ibm_phandle; @@ -1703,118 +1612,22 @@ if ((ibm_phandle = (unsigned int *)get_property(node, "ibm,phandle", NULL))) node->linux_phandle = *ibm_phandle; - /* do the work of interpret_pci_props */ - if (parent->type && !strcmp(parent->type, "pci")) { - struct address_range *adr; - struct pci_reg_property *pci_addrs; - int i, l; - - pci_addrs = (struct pci_reg_property *) - get_property(node, "assigned-addresses", &l); - if (pci_addrs != 0 && l >= sizeof(struct pci_reg_property)) { - i = 0; - adr = kmalloc(sizeof(struct address_range) * - (l / sizeof(struct pci_reg_property)), - GFP_KERNEL); - if (!adr) { - err = -ENOMEM; - goto out; - } - while ((l -= sizeof(struct pci_reg_property)) >= 0) { - adr[i].space = pci_addrs[i].addr.a_hi; - adr[i].address = pci_addrs[i].addr.a_lo | - ((u64)pci_addrs[i].addr.a_mid << 32); - adr[i].size = pci_addrs[i].size_lo; - ++i; - } - node->addrs = adr; - node->n_addrs = i; - } - } - - /* now do the work of finish_node_interrupts */ - if (get_property(node, "interrupts", NULL)) { - err = of_finish_dynamic_node_interrupts(node); - if (err) goto out; - } - - /* now do the rough equivalent of update_dn_pci_info, this - * probably is not correct for phb's, but should work for - * IOAs and slots. - */ - - node->phb = parent->phb; - - regs = (u32 *)get_property(node, "reg", NULL); - if (regs) { - node->busno = (regs[0] >> 16) & 0xff; - node->devfn = (regs[0] >> 8) & 0xff; - } - out: of_node_put(parent); return err; } /* - * Given a path and a property list, construct an OF device node, add - * it to the device tree and global list, and place it in - * /proc/device-tree. This function may sleep. + * Plug a device node into the tree and global list. */ -int of_add_node(const char *path, struct property *proplist) +void of_attach_node(struct device_node *np) { - struct device_node *np; - int err = 0; - - np = kmalloc(sizeof(struct device_node), GFP_KERNEL); - if (!np) - return -ENOMEM; - - memset(np, 0, sizeof(*np)); - - np->full_name = kmalloc(strlen(path) + 1, GFP_KERNEL); - if (!np->full_name) { - kfree(np); - return -ENOMEM; - } - strcpy(np->full_name, path); - - np->properties = proplist; - OF_MARK_DYNAMIC(np); - kref_init(&np->kref); - of_node_get(np); - np->parent = derive_parent(path); - if (!np->parent) { - kfree(np); - return -EINVAL; /* could also be ENOMEM, though */ - } - - if (0 != (err = of_finish_dynamic_node(np))) { - kfree(np); - return err; - } - write_lock(&devtree_lock); np->sibling = np->parent->child; np->allnext = allnodes; np->parent->child = np; allnodes = np; write_unlock(&devtree_lock); - - add_node_proc_entries(np); - - of_node_put(np->parent); - of_node_put(np); - return 0; -} - -/* - * Prepare an OF node for removal from system - */ -static void of_cleanup_node(struct device_node *np) -{ - if (np->iommu_table && get_property(np, "ibm,dma-window", NULL)) - iommu_free_table(np); } /* @@ -1822,23 +1635,14 @@ * a reference to the node. The memory associated with the node * is not freed until its refcount goes to zero. */ -int of_remove_node(struct device_node *np) +void of_detach_node(const struct device_node *np) { - struct device_node *parent, *child; + struct device_node *parent; - parent = of_get_parent(np); - if (!parent) - return -EINVAL; - - if ((child = of_get_next_child(np, NULL))) { - of_node_put(child); - return -EBUSY; - } + write_lock(&devtree_lock); - of_cleanup_node(np); + parent = np->parent; - write_lock(&devtree_lock); - remove_node_proc_entries(np); if (allnodes == np) allnodes = np->allnext; else { @@ -1860,11 +1664,39 @@ ; prevsib->sibling = np->sibling; } + write_unlock(&devtree_lock); - of_node_put(parent); - of_node_put(np); /* Must decrement the refcount */ - return 0; } + +static int prom_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) +{ + int err; + + switch (action) { + case PSERIES_RECONFIG_ADD: + err = finish_node(node, NULL, of_finish_dynamic_node, 0, 0, 0); + if (err < 0) { + printk(KERN_ERR "finish_node returned %d\n", err); + err = NOTIFY_BAD; + } + break; + default: + err = NOTIFY_DONE; + break; + } + return err; +} + +static struct notifier_block prom_reconfig_nb = { + .notifier_call = prom_reconfig_notifier, + .priority = 10, /* This one needs to run first */ +}; + +static int __init prom_reconfig_setup(void) +{ + return pSeries_reconfig_notifier_register(&prom_reconfig_nb); +} +__initcall(prom_reconfig_setup); /* * Find a property with a given name for a given node diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c --- a/arch/ppc64/kernel/rtasd.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc64/kernel/rtasd.c 2005-03-30 16:58:48 -08:00 @@ -399,10 +399,33 @@ } while(error == 0); } +static void do_event_scan_all_cpus(long delay) +{ + int cpu; + + lock_cpu_hotplug(); + cpu = first_cpu(cpu_online_map); + for (;;) { + set_cpus_allowed(current, cpumask_of_cpu(cpu)); + do_event_scan(rtas_token("event-scan")); + set_cpus_allowed(current, CPU_MASK_ALL); + + /* Drop hotplug lock, and sleep for the specified delay */ + unlock_cpu_hotplug(); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(delay); + lock_cpu_hotplug(); + + cpu = next_cpu(cpu, cpu_online_map); + if (cpu == NR_CPUS) + break; + } + unlock_cpu_hotplug(); +} + static int rtasd(void *unused) { unsigned int err_type; - int cpu = 0; int event_scan = rtas_token("event-scan"); int rc; @@ -436,17 +459,7 @@ } /* First pass. */ - lock_cpu_hotplug(); - for_each_online_cpu(cpu) { - DEBUG("scheduling on %d\n", cpu); - set_cpus_allowed(current, cpumask_of_cpu(cpu)); - DEBUG("watchdog scheduled on cpu %d\n", smp_processor_id()); - - do_event_scan(event_scan); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - } - unlock_cpu_hotplug(); + do_event_scan_all_cpus(HZ); if (surveillance_timeout != -1) { DEBUG("enabling surveillance\n"); @@ -454,25 +467,11 @@ DEBUG("surveillance enabled\n"); } - lock_cpu_hotplug(); - cpu = first_cpu(cpu_online_map); - for (;;) { - set_cpus_allowed(current, cpumask_of_cpu(cpu)); - do_event_scan(event_scan); - set_cpus_allowed(current, CPU_MASK_ALL); - - /* Drop hotplug lock, and sleep for a bit (at least - * one second since some machines have problems if we - * call event-scan too quickly). */ - unlock_cpu_hotplug(); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout((HZ*60/rtas_event_scan_rate) / 2); - lock_cpu_hotplug(); - - cpu = next_cpu(cpu, cpu_online_map); - if (cpu == NR_CPUS) - cpu = first_cpu(cpu_online_map); - } + /* Delay should be at least one second since some + * machines have problems if we call event-scan too + * quickly. */ + for (;;) + do_event_scan_all_cpus((HZ*60/rtas_event_scan_rate) / 2); error: /* Should delete proc entries */ diff -Nru a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c --- a/arch/ppc64/kernel/rtc.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/rtc.c 2005-03-30 16:58:49 -08:00 @@ -337,7 +337,7 @@ } #endif -#ifdef CONFIG_PPC_PSERIES +#ifdef CONFIG_PPC_RTAS #define MAX_RTC_WAIT 5000 /* 5 sec */ #define RTAS_CLOCK_BUSY (-2) void pSeries_get_boot_time(struct rtc_time *rtc_tm) diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc64/kernel/setup.c 2005-03-30 16:58:48 -08:00 @@ -269,15 +269,9 @@ nthreads = len / sizeof(u32); for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { - /* - * Only spin up secondary threads if SMT is enabled. - * We must leave space in the logical map for the - * threads. - */ - if (j == 0 || smt_enabled_at_boot) { - cpu_set(cpu, cpu_present_map); - set_hard_smp_processor_id(cpu, intserv[j]); - } + cpu_set(cpu, cpu_present_map); + set_hard_smp_processor_id(cpu, intserv[j]); + if (intserv[j] == boot_cpuid_phys) swap_cpuid = cpu; cpu_set(cpu, cpu_possible_map); @@ -605,12 +599,12 @@ */ initialize_cache_info(); -#ifdef CONFIG_PPC_PSERIES +#ifdef CONFIG_PPC_RTAS /* * Initialize RTAS if available */ rtas_initialize(); -#endif /* CONFIG_PPC_PSERIES */ +#endif /* CONFIG_PPC_RTAS */ /* * Check if we have an initrd provided via the device-tree @@ -1367,6 +1361,12 @@ static int __init early_xmon(char *p) { /* ensure xmon is enabled */ + if (p) { + if (strncmp(p, "on", 2) == 0) + xmon_init(); + if (strncmp(p, "early", 5) != 0) + return 0; + } xmon_init(); debugger(NULL); diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/smp.c 2005-03-30 16:58:49 -08:00 @@ -488,9 +488,8 @@ if (!cpu_enable(cpu)) return 0; - /* At boot, don't bother with non-present cpus -JSCHOPP */ - if (system_state < SYSTEM_RUNNING && !cpu_present(cpu)) - return -ENOENT; + if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) + return -EINVAL; paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock; @@ -604,14 +603,6 @@ smp_ops->setup_cpu(boot_cpuid); set_cpus_allowed(current, old_mask); - - /* - * We know at boot the maximum number of cpus we can add to - * a partition and set cpu_possible_map accordingly. cpu_present_map - * needs to match for the hotplug code to allow us to hot add - * any offline cpus. - */ - cpu_present_map = cpu_possible_map; } #ifdef CONFIG_HOTPLUG_CPU diff -Nru a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c --- a/arch/ppc64/kernel/sys_ppc32.c 2005-03-30 16:58:51 -08:00 +++ b/arch/ppc64/kernel/sys_ppc32.c 2005-03-30 16:58:51 -08:00 @@ -504,11 +504,11 @@ switch (call) { case SEMTIMEDOP: - if (third) + if (fifth) /* sign extend semid */ return compat_sys_semtimedop((int)first, compat_ptr(ptr), second, - compat_ptr(third)); + compat_ptr(fifth)); /* else fall through for normal semop() */ case SEMOP: /* struct sembuf is the same on 32 and 64bit :)) */ diff -Nru a/arch/ppc64/kernel/syscalls.c b/arch/ppc64/kernel/syscalls.c --- a/arch/ppc64/kernel/syscalls.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/kernel/syscalls.c 2005-03-30 16:58:49 -08:00 @@ -256,6 +256,3 @@ { printk(" -> %lx, current=%p cpu=%d\n", r3, current, smp_processor_id()); } - -/* Only exists on P-series. */ -cond_syscall(ppc_rtas); diff -Nru a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c --- a/arch/ppc64/kernel/vio.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/vio.c 2005-03-30 16:58:47 -08:00 @@ -585,7 +585,7 @@ } static void *vio_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int flag) + dma_addr_t *dma_handle, unsigned int __nocast flag) { return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size, dma_handle, flag); diff -Nru a/arch/ppc64/kernel/viopath.c b/arch/ppc64/kernel/viopath.c --- a/arch/ppc64/kernel/viopath.c 2005-03-30 16:58:47 -08:00 +++ b/arch/ppc64/kernel/viopath.c 2005-03-30 16:58:47 -08:00 @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -56,8 +57,8 @@ * But this allows for other support in the future. */ static struct viopathStatus { - int isOpen:1; /* Did we open the path? */ - int isActive:1; /* Do we have a mon msg outstanding */ + int isOpen; /* Did we open the path? */ + int isActive; /* Do we have a mon msg outstanding */ int users[VIO_MAX_SUBTYPES]; HvLpInstanceId mSourceInst; HvLpInstanceId mTargetInst; @@ -81,10 +82,10 @@ * blocks on the semaphore and the handler posts the semaphore. However, * if system_state is not SYSTEM_RUNNING, then wait_atomic is used ... */ -struct doneAllocParms_t { - struct semaphore *sem; +struct alloc_parms { + struct semaphore sem; int number; - atomic_t *wait_atomic; + atomic_t wait_atomic; int used_wait_atomic; }; @@ -97,9 +98,9 @@ /* Our hosting logical partition. We get this at startup * time, and different modules access this variable directly. */ -HvLpIndex viopath_hostLp = 0xff; /* HvLpIndexInvalid */ +HvLpIndex viopath_hostLp = HvLpIndexInvalid; EXPORT_SYMBOL(viopath_hostLp); -HvLpIndex viopath_ourLp = 0xff; +HvLpIndex viopath_ourLp = HvLpIndexInvalid; EXPORT_SYMBOL(viopath_ourLp); /* For each kind of incoming event we set a pointer to a @@ -200,7 +201,7 @@ /* * We cache the source and target instance ids for each - * partition. + * partition. */ HvLpInstanceId viopath_sourceinst(HvLpIndex lp) { @@ -450,36 +451,33 @@ static void viopath_donealloc(void *parm, int number) { - struct doneAllocParms_t *parmsp = (struct doneAllocParms_t *)parm; + struct alloc_parms *parmsp = parm; parmsp->number = number; if (parmsp->used_wait_atomic) - atomic_set(parmsp->wait_atomic, 0); + atomic_set(&parmsp->wait_atomic, 0); else - up(parmsp->sem); + up(&parmsp->sem); } static int allocateEvents(HvLpIndex remoteLp, int numEvents) { - struct doneAllocParms_t parms; - DECLARE_MUTEX_LOCKED(Semaphore); - atomic_t wait_atomic; + struct alloc_parms parms; if (system_state != SYSTEM_RUNNING) { parms.used_wait_atomic = 1; - atomic_set(&wait_atomic, 1); - parms.wait_atomic = &wait_atomic; + atomic_set(&parms.wait_atomic, 1); } else { parms.used_wait_atomic = 0; - parms.sem = &Semaphore; + init_MUTEX_LOCKED(&parms.sem); } mf_allocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo, 250, /* It would be nice to put a real number here! */ numEvents, &viopath_donealloc, &parms); if (system_state != SYSTEM_RUNNING) { - while (atomic_read(&wait_atomic)) + while (atomic_read(&parms.wait_atomic)) mb(); } else - down(&Semaphore); + down(&parms.sem); return parms.number; } @@ -558,8 +556,7 @@ unsigned long flags; int i; int numOpen; - struct doneAllocParms_t doneAllocParms; - DECLARE_MUTEX_LOCKED(Semaphore); + struct alloc_parms parms; if ((remoteLp >= HvMaxArchitectedLps) || (remoteLp == HvLpIndexInvalid)) return -EINVAL; @@ -580,11 +577,11 @@ spin_unlock_irqrestore(&statuslock, flags); - doneAllocParms.used_wait_atomic = 0; - doneAllocParms.sem = &Semaphore; + parms.used_wait_atomic = 0; + init_MUTEX_LOCKED(&parms.sem); mf_deallocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo, - numReq, &viopath_donealloc, &doneAllocParms); - down(&Semaphore); + numReq, &viopath_donealloc, &parms); + down(&parms.sem); spin_lock_irqsave(&statuslock, flags); for (i = 0, numOpen = 0; i < VIO_MAX_SUBTYPES; i++) diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2005-03-30 16:58:48 -08:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2005-03-30 16:58:48 -08:00 @@ -154,7 +154,7 @@ { pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); if (write_access) { entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); @@ -316,7 +316,7 @@ ptepage = pte_page(entry); get_page(ptepage); - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); set_pte_at(dst, addr, dst_pte, entry); addr += HPAGE_SIZE; @@ -426,7 +426,7 @@ put_page(page); } - mm->rss -= (end - start) >> PAGE_SHIFT; + add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); flush_tlb_pending(); } @@ -513,7 +513,7 @@ vma = find_vma(mm, addr); if (((TASK_SIZE - len) >= addr) && (!vma || (addr+len) <= vma->vm_start) - && !is_hugepage_only_range(addr,len)) + && !is_hugepage_only_range(mm, addr,len)) return addr; } start_addr = addr = mm->free_area_cache; @@ -523,7 +523,7 @@ while (TASK_SIZE - len >= addr) { BUG_ON(vma && (addr >= vma->vm_end)); - if (touches_hugepage_low_range(addr, len)) { + if (touches_hugepage_low_range(mm, addr, len)) { addr = ALIGN(addr+1, 1<= addr && (!vma || addr + len <= vma->vm_start) - && !is_hugepage_only_range(addr,len)) + && !is_hugepage_only_range(mm, addr,len)) return addr; } @@ -597,7 +597,7 @@ addr = (mm->free_area_cache - len) & PAGE_MASK; do { hugepage_recheck: - if (touches_hugepage_low_range(addr, len)) { + if (touches_hugepage_low_range(mm, addr, len)) { addr = (addr & ((~0) << SID_SHIFT)) - len; goto hugepage_recheck; } else if (touches_hugepage_high_range(addr, len)) { diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/mm/init.c 2005-03-30 16:58:49 -08:00 @@ -912,3 +912,16 @@ if (!zero_cache) panic("pgtable_cache_init(): could not create zero_cache!\n"); } + +pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, + unsigned long size, pgprot_t vma_prot) +{ + if (ppc_md.phys_mem_access_prot) + return ppc_md.phys_mem_access_prot(file, addr, size, vma_prot); + + if (!page_is_ram(addr >> PAGE_SHIFT)) + vma_prot = __pgprot(pgprot_val(vma_prot) + | _PAGE_GUARDED | _PAGE_NO_CACHE); + return vma_prot; +} +EXPORT_SYMBOL(phys_mem_access_prot); diff -Nru a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c --- a/arch/ppc64/mm/numa.c 2005-03-30 16:58:51 -08:00 +++ b/arch/ppc64/mm/numa.c 2005-03-30 16:58:51 -08:00 @@ -40,7 +40,6 @@ struct pglist_data *node_data[MAX_NUMNODES]; bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; -static unsigned long node0_io_hole_size; static int min_common_depth; /* @@ -49,7 +48,8 @@ */ static struct { unsigned long node_start_pfn; - unsigned long node_spanned_pages; + unsigned long node_end_pfn; + unsigned long node_present_pages; } init_node_data[MAX_NUMNODES] __initdata; EXPORT_SYMBOL(node_data); @@ -186,14 +186,36 @@ return depth; } -static unsigned long read_cell_ul(struct device_node *device, unsigned int **buf) +static int __init get_mem_addr_cells(void) +{ + struct device_node *memory = NULL; + int rc; + + memory = of_find_node_by_type(memory, "memory"); + if (!memory) + return 0; /* it won't matter */ + + rc = prom_n_addr_cells(memory); + return rc; +} + +static int __init get_mem_size_cells(void) +{ + struct device_node *memory = NULL; + int rc; + + memory = of_find_node_by_type(memory, "memory"); + if (!memory) + return 0; /* it won't matter */ + rc = prom_n_size_cells(memory); + return rc; +} + +static unsigned long read_n_cells(int n, unsigned int **buf) { - int i; unsigned long result = 0; - i = prom_n_size_cells(device); - /* bug on i>2 ?? */ - while (i--) { + while (n--) { result = (result << 32) | **buf; (*buf)++; } @@ -267,6 +289,7 @@ { struct device_node *cpu = NULL; struct device_node *memory = NULL; + int addr_cells, size_cells; int max_domain = 0; long entries = lmb_end_of_DRAM() >> MEMORY_INCREMENT_SHIFT; unsigned long i; @@ -313,6 +336,8 @@ } } + addr_cells = get_mem_addr_cells(); + size_cells = get_mem_size_cells(); memory = NULL; while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { unsigned long start; @@ -329,8 +354,8 @@ ranges = memory->n_addrs; new_range: /* these are order-sensitive, and modify the buffer pointer */ - start = read_cell_ul(memory, &memcell_buf); - size = read_cell_ul(memory, &memcell_buf); + start = read_n_cells(addr_cells, &memcell_buf); + size = read_n_cells(size_cells, &memcell_buf); start = _ALIGN_DOWN(start, MEMORY_INCREMENT); size = _ALIGN_UP(size, MEMORY_INCREMENT); @@ -348,33 +373,31 @@ if (max_domain < numa_domain) max_domain = numa_domain; - /* - * For backwards compatibility, OF splits the first node - * into two regions (the first being 0-4GB). Check for - * this simple case and complain if there is a gap in - * memory + /* + * Initialize new node struct, or add to an existing one. */ - if (init_node_data[numa_domain].node_spanned_pages) { - unsigned long shouldstart = - init_node_data[numa_domain].node_start_pfn + - init_node_data[numa_domain].node_spanned_pages; - if (shouldstart != (start / PAGE_SIZE)) { - /* Revert to non-numa for now */ - printk(KERN_ERR - "WARNING: Unexpected node layout: " - "region start %lx length %lx\n", - start, size); - printk(KERN_ERR "NUMA is disabled\n"); - goto err; - } - init_node_data[numa_domain].node_spanned_pages += + if (init_node_data[numa_domain].node_end_pfn) { + if ((start / PAGE_SIZE) < + init_node_data[numa_domain].node_start_pfn) + init_node_data[numa_domain].node_start_pfn = + start / PAGE_SIZE; + if (((start / PAGE_SIZE) + (size / PAGE_SIZE)) > + init_node_data[numa_domain].node_end_pfn) + init_node_data[numa_domain].node_end_pfn = + (start / PAGE_SIZE) + + (size / PAGE_SIZE); + + init_node_data[numa_domain].node_present_pages += size / PAGE_SIZE; } else { node_set_online(numa_domain); init_node_data[numa_domain].node_start_pfn = start / PAGE_SIZE; - init_node_data[numa_domain].node_spanned_pages = + init_node_data[numa_domain].node_end_pfn = + init_node_data[numa_domain].node_start_pfn + + size / PAGE_SIZE; + init_node_data[numa_domain].node_present_pages = size / PAGE_SIZE; } @@ -391,14 +414,6 @@ node_set_online(i); return 0; -err: - /* Something has gone wrong; revert any setup we've done */ - for_each_node(i) { - node_set_offline(i); - init_node_data[i].node_start_pfn = 0; - init_node_data[i].node_spanned_pages = 0; - } - return -1; } static void __init setup_nonnuma(void) @@ -426,12 +441,11 @@ node_set_online(0); init_node_data[0].node_start_pfn = 0; - init_node_data[0].node_spanned_pages = lmb_end_of_DRAM() / PAGE_SIZE; + init_node_data[0].node_end_pfn = lmb_end_of_DRAM() / PAGE_SIZE; + init_node_data[0].node_present_pages = total_ram / PAGE_SIZE; for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT) numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0; - - node0_io_hole_size = top_of_ram - total_ram; } static void __init dump_numa_topology(void) @@ -512,6 +526,8 @@ void __init do_init_bootmem(void) { int nid; + int addr_cells, size_cells; + struct device_node *memory = NULL; static struct notifier_block ppc64_numa_nb = { .notifier_call = cpu_numa_callback, .priority = 1 /* Must run before sched domains notifier. */ @@ -535,7 +551,7 @@ unsigned long bootmap_pages; start_paddr = init_node_data[nid].node_start_pfn * PAGE_SIZE; - end_paddr = start_paddr + (init_node_data[nid].node_spanned_pages * PAGE_SIZE); + end_paddr = init_node_data[nid].node_end_pfn * PAGE_SIZE; /* Allocate the node structure node local if possible */ NODE_DATA(nid) = (struct pglist_data *)careful_allocation(nid, @@ -551,9 +567,9 @@ NODE_DATA(nid)->node_start_pfn = init_node_data[nid].node_start_pfn; NODE_DATA(nid)->node_spanned_pages = - init_node_data[nid].node_spanned_pages; + end_paddr - start_paddr; - if (init_node_data[nid].node_spanned_pages == 0) + if (NODE_DATA(nid)->node_spanned_pages == 0) continue; dbg("start_paddr = %lx\n", start_paddr); @@ -572,33 +588,50 @@ start_paddr >> PAGE_SHIFT, end_paddr >> PAGE_SHIFT); - for (i = 0; i < lmb.memory.cnt; i++) { - unsigned long physbase, size; + /* + * We need to do another scan of all memory sections to + * associate memory with the correct node. + */ + addr_cells = get_mem_addr_cells(); + size_cells = get_mem_size_cells(); + memory = NULL; + while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { + unsigned long mem_start, mem_size; + int numa_domain, ranges; + unsigned int *memcell_buf; + unsigned int len; + + memcell_buf = (unsigned int *)get_property(memory, "reg", &len); + if (!memcell_buf || len <= 0) + continue; - physbase = lmb.memory.region[i].physbase; - size = lmb.memory.region[i].size; + ranges = memory->n_addrs; /* ranges in cell */ +new_range: + mem_start = read_n_cells(addr_cells, &memcell_buf); + mem_size = read_n_cells(size_cells, &memcell_buf); + numa_domain = numa_enabled ? of_node_numa_domain(memory) : 0; - if (physbase < end_paddr && - (physbase+size) > start_paddr) { - /* overlaps */ - if (physbase < start_paddr) { - size -= start_paddr - physbase; - physbase = start_paddr; - } + if (numa_domain != nid) + continue; - if (size > end_paddr - physbase) - size = end_paddr - physbase; + dbg("free_bootmem %lx %lx\n", mem_start, mem_size); + free_bootmem_node(NODE_DATA(nid), mem_start, mem_size); - dbg("free_bootmem %lx %lx\n", physbase, size); - free_bootmem_node(NODE_DATA(nid), physbase, - size); - } + if (--ranges) /* process all ranges in cell */ + goto new_range; } + /* + * Mark reserved regions on this node + */ for (i = 0; i < lmb.reserved.cnt; i++) { unsigned long physbase = lmb.reserved.region[i].physbase; unsigned long size = lmb.reserved.region[i].size; + if (pa_to_nid(physbase) != nid && + pa_to_nid(physbase+size-1) != nid) + continue; + if (physbase < end_paddr && (physbase+size) > start_paddr) { /* overlaps */ @@ -632,13 +665,12 @@ unsigned long start_pfn; unsigned long end_pfn; - start_pfn = plat_node_bdata[nid].node_boot_start >> PAGE_SHIFT; - end_pfn = plat_node_bdata[nid].node_low_pfn; + start_pfn = init_node_data[nid].node_start_pfn; + end_pfn = init_node_data[nid].node_end_pfn; zones_size[ZONE_DMA] = end_pfn - start_pfn; - zholes_size[ZONE_DMA] = 0; - if (nid == 0) - zholes_size[ZONE_DMA] = node0_io_hole_size >> PAGE_SHIFT; + zholes_size[ZONE_DMA] = zones_size[ZONE_DMA] - + init_node_data[nid].node_present_pages; dbg("free_area_init node %d %lx %lx (hole: %lx)\n", nid, zones_size[ZONE_DMA], start_pfn, zholes_size[ZONE_DMA]); diff -Nru a/arch/ppc64/oprofile/op_model_power4.c b/arch/ppc64/oprofile/op_model_power4.c --- a/arch/ppc64/oprofile/op_model_power4.c 2005-03-30 16:58:49 -08:00 +++ b/arch/ppc64/oprofile/op_model_power4.c 2005-03-30 16:58:49 -08:00 @@ -224,7 +224,7 @@ if (mmcra & MMCRA_SIPR) return pc; -#ifdef CONFIG_PPC_PSERIES +#ifdef CONFIG_PPC_RTAS /* Were we in RTAS? */ if (pc >= rtas.base && pc < (rtas.base + rtas.size)) /* function descriptor madness */ diff -Nru a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S --- a/arch/s390/kernel/compat_wrapper.S 2005-03-30 16:58:50 -08:00 +++ b/arch/s390/kernel/compat_wrapper.S 2005-03-30 16:58:50 -08:00 @@ -1407,8 +1407,8 @@ llgtr %r4,%r4 # struct compat_mq_attr * jg compat_sys_mq_getsetattr - .globl compat_sys_add_key -compat_sys_add_key: + .globl compat_sys_add_key_wrapper +compat_sys_add_key_wrapper: llgtr %r2,%r2 # const char * llgtr %r3,%r3 # const char * llgtr %r4,%r4 # const void * @@ -1416,10 +1416,28 @@ llgfr %r6,%r6 # (key_serial_t) u32 jg sys_add_key - .globl compat_sys_request_key -compat_sys_request_key: + .globl compat_sys_request_key_wrapper +compat_sys_request_key_wrapper: llgtr %r2,%r2 # const char * llgtr %r3,%r3 # const char * llgtr %r4,%r4 # const void * llgfr %r5,%r5 # (key_serial_t) u32 jg sys_request_key + + .globl sys32_remap_file_pages_wrapper +sys32_remap_file_pages_wrapper: + llgfr %r2,%r2 # unsigned long + llgfr %r3,%r3 # unsigned long + llgfr %r4,%r4 # unsigned long + llgfr %r5,%r5 # unsigned long + llgfr %r6,%r6 # unsigned long + jg sys_remap_file_pages + + .globl compat_sys_waitid_wrapper +compat_sys_waitid_wrapper: + lgfr %r2,%r2 # int + lgfr %r3,%r3 # pid_t + llgtr %r4,%r4 # siginfo_emu31_t * + lgfr %r5,%r5 # int + llgtr %r6,%r6 # struct rusage_emu31 * + jg compat_sys_waitid diff -Nru a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c --- a/arch/s390/kernel/debug.c 2005-03-30 16:58:47 -08:00 +++ b/arch/s390/kernel/debug.c 2005-03-30 16:58:47 -08:00 @@ -931,11 +931,15 @@ int rc = 0; int i; unsigned long flags; - mode_t mode = S_IFREG | S_IRUSR | S_IWUSR; + mode_t mode = S_IFREG; struct proc_dir_entry *pde; if (!id) goto out; + if (view->prolog_proc || view->format_proc || view->header_proc) + mode |= S_IRUSR; + if (view->input_proc) + mode |= S_IWUSR; pde = create_proc_entry(view->name, mode, id->proc_root_entry); if (!pde){ printk(KERN_WARNING "debug: create_proc_entry() failed! Cannot register view %s/%s\n", id->name,view->name); @@ -958,10 +962,6 @@ } else { id->views[i] = view; - if (view->prolog_proc || view->format_proc || view->header_proc) - mode |= S_IRUSR; - if (view->input_proc) - mode |= S_IWUSR; pde->proc_fops = &debug_file_ops; id->proc_entries[i] = pde; } diff -Nru a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c --- a/arch/s390/kernel/s390_ext.c 2005-03-30 16:58:48 -08:00 +++ b/arch/s390/kernel/s390_ext.c 2005-03-30 16:58:48 -08:00 @@ -114,6 +114,10 @@ irq_enter(); asm volatile ("mc 0,0"); if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) + /** + * Make sure that the i/o interrupt did not "overtake" + * the last HZ timer interrupt. + */ account_ticks(regs); kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; index = code & 0xff; diff -Nru a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c --- a/arch/s390/kernel/signal.c 2005-03-30 16:58:49 -08:00 +++ b/arch/s390/kernel/signal.c 2005-03-30 16:58:49 -08:00 @@ -282,7 +282,7 @@ /* This is the X/Open sanctioned signal stack switching. */ if (ka->sa.sa_flags & SA_ONSTACK) { - if (! on_sig_stack(sp)) + if (! sas_ss_flags(sp)) sp = current->sas_ss_sp + current->sas_ss_size; } diff -Nru a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S --- a/arch/s390/kernel/syscalls.S 2005-03-30 16:58:47 -08:00 +++ b/arch/s390/kernel/syscalls.S 2005-03-30 16:58:47 -08:00 @@ -275,7 +275,7 @@ SYSCALL(s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper) SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper) SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper) -NI_SYSCALL /* 267 new sys_remap_file_pages */ +SYSCALL(sys_remap_file_pages,sys_remap_file_pages,sys32_remap_file_pages_wrapper) NI_SYSCALL /* 268 sys_mbind */ NI_SYSCALL /* 269 sys_get_mempolicy */ NI_SYSCALL /* 270 sys_set_mempolicy */ @@ -286,6 +286,7 @@ SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify_wrapper) /* 275 */ SYSCALL(sys_mq_getsetattr,sys_mq_getsetattr,compat_sys_mq_getsetattr_wrapper) NI_SYSCALL /* reserved for kexec */ -SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key) -SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key) +SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper) +SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper) SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl) /* 280 */ +SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper) diff -Nru a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c --- a/arch/s390/kernel/time.c 2005-03-30 16:58:47 -08:00 +++ b/arch/s390/kernel/time.c 2005-03-30 16:58:47 -08:00 @@ -168,8 +168,17 @@ __u32 ticks, xticks; /* Calculate how many ticks have passed. */ - if (S390_lowcore.int_clock < S390_lowcore.jiffy_timer) + if (S390_lowcore.int_clock < S390_lowcore.jiffy_timer) { + /* + * We have to program the clock comparator even if + * no tick has passed. That happens if e.g. an i/o + * interrupt wakes up an idle processor that has + * switched off its hz timer. + */ + tmp = S390_lowcore.jiffy_timer + CPU_DEVIATION; + asm volatile ("SCKC %0" : : "m" (tmp)); return; + } tmp = S390_lowcore.int_clock - S390_lowcore.jiffy_timer; if (tmp >= 2*CLK_TICKS_PER_JIFFY) { /* more than two ticks ? */ ticks = __div(tmp, CLK_TICKS_PER_JIFFY) + 1; diff -Nru a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c --- a/arch/s390/kernel/vtime.c 2005-03-30 16:58:50 -08:00 +++ b/arch/s390/kernel/vtime.c 2005-03-30 16:58:50 -08:00 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -69,6 +70,7 @@ if (rcu_pending(smp_processor_id())) rcu_check_callbacks(smp_processor_id(), rcu_user_flag); scheduler_tick(); + run_posix_cpu_timers(tsk); } /* diff -Nru a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c --- a/arch/s390/mm/fault.c 2005-03-30 16:58:51 -08:00 +++ b/arch/s390/mm/fault.c 2005-03-30 16:58:51 -08:00 @@ -87,6 +87,7 @@ if (areg == 0) /* Access via access register 0 -> kernel address */ return 0; + save_access_regs(current->thread.acrs); if (regs && areg < NUM_ACRS && current->thread.acrs[areg] <= 1) /* * access register contains 0 -> kernel address, @@ -115,11 +116,11 @@ * 3: Home Segment Table Descriptor */ int descriptor = S390_lowcore.trans_exc_code & 3; - if (descriptor == 1) { - save_access_regs(current->thread.acrs); + if (unlikely(descriptor == 1)) return __check_access_register(regs, error_code); - } - return descriptor >> 1; + if (descriptor == 2) + return current->thread.mm_segment.ar4; + return descriptor != 0; } /* diff -Nru a/arch/s390/oprofile/Kconfig b/arch/s390/oprofile/Kconfig --- a/arch/s390/oprofile/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/s390/oprofile/Kconfig 2005-03-30 16:58:50 -08:00 @@ -1,16 +1,15 @@ menu "Profiling support" - depends on EXPERIMENTAL config PROFILING - bool "Profiling support (EXPERIMENTAL)" + bool "Profiling support" help Say Y here to enable profiling support mechanisms used by profilers such as readprofile or OProfile. config OPROFILE - tristate "OProfile system profiling (EXPERIMENTAL)" + tristate "OProfile system profiling" depends on PROFILING help OProfile is a profiling system capable of profiling the diff -Nru a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c --- a/arch/sh/kernel/cpu/sh4/sq.c 2005-03-30 16:58:48 -08:00 +++ b/arch/sh/kernel/cpu/sh4/sq.c 2005-03-30 16:58:48 -08:00 @@ -379,7 +379,7 @@ map = __sq_alloc_mapping(vma->vm_start, offset, size, "Userspace"); - if (io_remap_page_range(vma, map->sq_addr, map->addr, + if (io_remap_pfn_range(vma, map->sq_addr, map->addr >> PAGE_SHIFT, size, vma->vm_page_prot)) return -EAGAIN; diff -Nru a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c --- a/arch/sh/mm/hugetlbpage.c 2005-03-30 16:58:49 -08:00 +++ b/arch/sh/mm/hugetlbpage.c 2005-03-30 16:58:49 -08:00 @@ -62,7 +62,7 @@ unsigned long i; pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); if (write_access) entry = pte_mkwrite(pte_mkdirty(mk_pte(page, @@ -115,7 +115,7 @@ pte_val(entry) += PAGE_SIZE; dst_pte++; } - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); addr += HPAGE_SIZE; } return 0; @@ -206,7 +206,7 @@ pte++; } } - mm->rss -= (end - start) >> PAGE_SHIFT; + add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); flush_tlb_range(vma, start, end); } diff -Nru a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c --- a/arch/sh64/mm/hugetlbpage.c 2005-03-30 16:58:48 -08:00 +++ b/arch/sh64/mm/hugetlbpage.c 2005-03-30 16:58:48 -08:00 @@ -62,7 +62,7 @@ unsigned long i; pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); if (write_access) entry = pte_mkwrite(pte_mkdirty(mk_pte(page, @@ -115,7 +115,7 @@ pte_val(entry) += PAGE_SIZE; dst_pte++; } - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); addr += HPAGE_SIZE; } return 0; @@ -206,7 +206,7 @@ pte++; } } - mm->rss -= (end - start) >> PAGE_SHIFT; + add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); flush_tlb_range(vma, start, end); } diff -Nru a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c --- a/arch/sparc/kernel/sparc_ksyms.c 2005-03-30 16:58:47 -08:00 +++ b/arch/sparc/kernel/sparc_ksyms.c 2005-03-30 16:58:47 -08:00 @@ -164,6 +164,7 @@ #endif EXPORT_SYMBOL(request_fast_irq); EXPORT_SYMBOL(io_remap_page_range); +EXPORT_SYMBOL(io_remap_pfn_range); /* P3: iounit_xxx may be needed, sun4d users */ /* EXPORT_SYMBOL(iounit_map_dma_init); */ /* EXPORT_SYMBOL(iounit_map_dma_page); */ diff -Nru a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c --- a/arch/sparc/mm/generic.c 2005-03-30 16:58:50 -08:00 +++ b/arch/sparc/mm/generic.c 2005-03-30 16:58:50 -08:00 @@ -118,3 +118,37 @@ flush_tlb_range(vma, beg, end); return error; } + +int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, + unsigned long pfn, unsigned long size, pgprot_t prot) +{ + int error = 0; + pgd_t * dir; + unsigned long beg = from; + unsigned long end = from + size; + struct mm_struct *mm = vma->vm_mm; + int space = GET_IOSPACE(pfn); + unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; + + prot = __pgprot(pg_iobits); + offset -= from; + dir = pgd_offset(mm, from); + flush_cache_range(vma, beg, end); + + spin_lock(&mm->page_table_lock); + while (from < end) { + pmd_t *pmd = pmd_alloc(current->mm, dir, from); + error = -ENOMEM; + if (!pmd) + break; + error = io_remap_pmd_range(mm, pmd, from, end - from, offset + from, prot, space); + if (error) + break; + from = (from + PGDIR_SIZE) & PGDIR_MASK; + dir++; + } + spin_unlock(&mm->page_table_lock); + + flush_tlb_range(vma, beg, end); + return error; +} diff -Nru a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c --- a/arch/sparc64/kernel/binfmt_aout32.c 2005-03-30 16:58:48 -08:00 +++ b/arch/sparc64/kernel/binfmt_aout32.c 2005-03-30 16:58:48 -08:00 @@ -241,7 +241,7 @@ current->mm->brk = ex.a_bss + (current->mm->start_brk = N_BSSADDR(ex)); - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); current->mm->mmap = NULL; compute_creds(bprm); current->flags &= ~PF_FORKNOEXEC; diff -Nru a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c --- a/arch/sparc64/kernel/pci.c 2005-03-30 16:58:47 -08:00 +++ b/arch/sparc64/kernel/pci.c 2005-03-30 16:58:47 -08:00 @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -734,12 +735,10 @@ static void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, enum pci_mmap_state mmap_state) { - /* Our io_remap_page_range takes care of this, do nothing. */ + /* Our io_remap_page_range/io_remap_pfn_range takes care of this, + do nothing. */ } -extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, - unsigned long size, pgprot_t prot, int space); - /* Perform the actual remap of the pages for a PCI device mapping, as appropriate * for this architecture. The region in the process to map is described by vm_start * and vm_end members of VMA, the base physical address is found in vm_pgoff. @@ -761,10 +760,10 @@ __pci_mmap_set_flags(dev, vma, mmap_state); __pci_mmap_set_pgprot(dev, vma, mmap_state); - ret = io_remap_page_range(vma, vma->vm_start, - (vma->vm_pgoff << PAGE_SHIFT | - (write_combine ? 0x1UL : 0x0UL)), - vma->vm_end - vma->vm_start, vma->vm_page_prot, 0); + ret = io_remap_pfn_range(vma, vma->vm_start, + vma->vm_pgoff, + vma->vm_end - vma->vm_start, + vma->vm_page_prot); if (ret) return ret; diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c --- a/arch/sparc64/kernel/sparc64_ksyms.c 2005-03-30 16:58:50 -08:00 +++ b/arch/sparc64/kernel/sparc64_ksyms.c 2005-03-30 16:58:50 -08:00 @@ -87,7 +87,10 @@ extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); extern long sparc32_open(const char __user * filename, int flags, int mode); -extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space); +extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, + unsigned long offset, unsigned long size, pgprot_t prot, int space); +extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, + unsigned long pfn, unsigned long size, pgprot_t prot); extern void (*prom_palette)(int); extern int __ashrdi3(int, int); @@ -254,6 +257,7 @@ /* I/O device mmaping on Sparc64. */ EXPORT_SYMBOL(io_remap_page_range); +EXPORT_SYMBOL(io_remap_pfn_range); /* Solaris/SunOS binary compatibility */ EXPORT_SYMBOL(_sigpause_common); diff -Nru a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c --- a/arch/sparc64/mm/generic.c 2005-03-30 16:58:50 -08:00 +++ b/arch/sparc64/mm/generic.c 2005-03-30 16:58:50 -08:00 @@ -20,10 +20,6 @@ * * They use a pgprot that sets PAGE_IO and does not check the * mem_map table as this is independent of normal memory. - * - * As a special hack if the lowest bit of offset is set the - * side-effect bit will be turned off. This is used as a - * performance improvement on FFB/AFB. -DaveM */ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigned long address, @@ -33,6 +29,8 @@ { unsigned long end; + /* clear hack bit that was used as a write_combine side-effect flag */ + offset &= ~0x1UL; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) @@ -41,22 +39,22 @@ pte_t entry; unsigned long curend = address + PAGE_SIZE; - entry = mk_pte_io((offset & ~(0x1UL)), prot, space); + entry = mk_pte_io(offset, prot, space); if (!(address & 0xffff)) { if (!(address & 0x3fffff) && !(offset & 0x3ffffe) && end >= address + 0x400000) { - entry = mk_pte_io((offset & ~(0x1UL)), + entry = mk_pte_io(offset, __pgprot(pgprot_val (prot) | _PAGE_SZ4MB), space); curend = address + 0x400000; offset += 0x400000; } else if (!(address & 0x7ffff) && !(offset & 0x7fffe) && end >= address + 0x80000) { - entry = mk_pte_io((offset & ~(0x1UL)), + entry = mk_pte_io(offset, __pgprot(pgprot_val (prot) | _PAGE_SZ512K), space); curend = address + 0x80000; offset += 0x80000; } else if (!(offset & 0xfffe) && end >= address + 0x10000) { - entry = mk_pte_io((offset & ~(0x1UL)), + entry = mk_pte_io(offset, __pgprot(pgprot_val (prot) | _PAGE_SZ64K), space); curend = address + 0x10000; @@ -66,8 +64,6 @@ } else offset += PAGE_SIZE; - if (offset & 0x1UL) - pte_val(entry) &= ~(_PAGE_E); do { BUG_ON(!pte_none(*pte)); set_pte_at(mm, address, pte, entry); @@ -136,6 +132,40 @@ spin_lock(&mm->page_table_lock); while (from < end) { pud_t *pud = pud_alloc(mm, dir, from); + error = -ENOMEM; + if (!pud) + break; + error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space); + if (error) + break; + from = (from + PGDIR_SIZE) & PGDIR_MASK; + dir++; + } + flush_tlb_range(vma, beg, end); + spin_unlock(&mm->page_table_lock); + + return error; +} + +int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, + unsigned long pfn, unsigned long size, pgprot_t prot) +{ + int error = 0; + pgd_t * dir; + unsigned long beg = from; + unsigned long end = from + size; + struct mm_struct *mm = vma->vm_mm; + int space = GET_IOSPACE(pfn); + unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; + + prot = __pgprot(pg_iobits); + offset -= from; + dir = pgd_offset(mm, from); + flush_cache_range(vma, beg, end); + + spin_lock(&mm->page_table_lock); + while (from < end) { + pud_t *pud = pud_alloc(current->mm, dir, from); error = -ENOMEM; if (!pud) break; diff -Nru a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c --- a/arch/sparc64/mm/hugetlbpage.c 2005-03-30 16:58:49 -08:00 +++ b/arch/sparc64/mm/hugetlbpage.c 2005-03-30 16:58:49 -08:00 @@ -68,7 +68,7 @@ unsigned long i; pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE); if (write_access) entry = pte_mkwrite(pte_mkdirty(mk_pte(page, @@ -123,7 +123,7 @@ dst_pte++; addr += PAGE_SIZE; } - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); } return 0; @@ -213,7 +213,7 @@ pte++; } } - mm->rss -= (end - start) >> PAGE_SHIFT; + add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT)); flush_tlb_range(vma, start, end); } diff -Nru a/arch/um/Kconfig b/arch/um/Kconfig --- a/arch/um/Kconfig 2005-03-30 16:58:48 -08:00 +++ b/arch/um/Kconfig 2005-03-30 16:58:48 -08:00 @@ -3,7 +3,7 @@ bool default y -config USERMODE +config UML bool default y @@ -244,7 +244,6 @@ config HIGHMEM bool "Highmem support" - depends on BROKEN config KERNEL_STACK_ORDER int "Kernel stack size order" diff -Nru a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug --- a/arch/um/Kconfig.debug 2005-03-30 16:58:48 -08:00 +++ b/arch/um/Kconfig.debug 2005-03-30 16:58:48 -08:00 @@ -8,7 +8,7 @@ config PT_PROXY bool "Enable ptrace proxy" - depends on XTERM_CHAN && DEBUG_INFO + depends on XTERM_CHAN && DEBUG_INFO && MODE_TT help This option enables a debugging interface which allows gdb to debug the kernel without needing to actually attach to kernel threads. @@ -16,7 +16,7 @@ config GPROF bool "Enable gprof support" - depends on DEBUG_INFO + depends on DEBUG_INFO && MODE_SKAS help This allows profiling of a User-Mode Linux kernel with the gprof utility. @@ -29,7 +29,7 @@ config GCOV bool "Enable gcov support" - depends on DEBUG_INFO + depends on DEBUG_INFO && MODE_SKAS help This option allows developers to retrieve coverage data from a UML session. diff -Nru a/arch/um/Makefile-skas b/arch/um/Makefile-skas --- a/arch/um/Makefile-skas 2005-03-30 16:58:48 -08:00 +++ b/arch/um/Makefile-skas 2005-03-30 16:58:48 -08:00 @@ -3,10 +3,12 @@ # Licensed under the GPL # -PROFILE += -pg +GPROF_OPT += -pg +GCOV_OPT += -fprofile-arcs -ftest-coverage -CFLAGS-$(CONFIG_GCOV) += -fprofile-arcs -ftest-coverage -CFLAGS-$(CONFIG_GPROF) += $(PROFILE) -LINK-$(CONFIG_GPROF) += $(PROFILE) +CFLAGS-$(CONFIG_GCOV) += $(GCOV_OPT) +CFLAGS-$(CONFIG_GPROF) += $(GPROF_OPT) +LINK-$(CONFIG_GCOV) += $(GCOV_OPT) +LINK-$(CONFIG_GPROF) += $(GPROF_OPT) GEN_HEADERS += $(ARCH_DIR)/include/skas_ptregs.h diff -Nru a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 --- a/arch/um/Makefile-x86_64 2005-03-30 16:58:50 -08:00 +++ b/arch/um/Makefile-x86_64 2005-03-30 16:58:50 -08:00 @@ -30,7 +30,3 @@ $(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@ CLEAN_FILES += $(SYS_HEADERS) - -LIBC_DIR := /usr/lib64 - -export LIBC_DIR diff -Nru a/arch/um/defconfig b/arch/um/defconfig --- a/arch/um/defconfig 2005-03-30 16:58:51 -08:00 +++ b/arch/um/defconfig 2005-03-30 16:58:51 -08:00 @@ -1,10 +1,10 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11 -# Fri Mar 4 15:38:53 2005 +# Linux kernel version: 2.6.12-rc1-bk1 +# Sun Mar 20 16:53:00 2005 # CONFIG_GENERIC_HARDIRQS=y -CONFIG_USERMODE=y +CONFIG_UML=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -31,6 +31,7 @@ # CONFIG_SMP is not set CONFIG_NEST_LEVEL=0 CONFIG_KERNEL_HALF_GIGS=1 +# CONFIG_HIGHMEM is not set CONFIG_KERNEL_STACK_ORDER=2 CONFIG_UML_REAL_TIME_CLOCK=y @@ -61,7 +62,6 @@ # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_BASE_FULL=y -CONFIG_BASE_SMALL=0 CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y @@ -70,6 +70,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -215,38 +216,6 @@ CONFIG_TUN=m # -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# # Wan interfaces # # CONFIG_WAN is not set @@ -431,7 +400,9 @@ # # Kernel hacking # +# CONFIG_PRINTK_TIME is not set CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set diff -Nru a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile --- a/arch/um/drivers/Makefile 2005-03-30 16:58:51 -08:00 +++ b/arch/um/drivers/Makefile 2005-03-30 16:58:51 -08:00 @@ -41,11 +41,6 @@ obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o obj-$(CONFIG_UML_RANDOM) += random.o -USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) +USER_OBJS := fd.o null.o pty.o tty.o xterm.o -USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) fd.o \ - null.o pty.o tty.o xterm.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c --- a/arch/um/drivers/net_kern.c 2005-03-30 16:58:48 -08:00 +++ b/arch/um/drivers/net_kern.c 2005-03-30 16:58:48 -08:00 @@ -383,7 +383,6 @@ save = lp->user[0]; *lp = ((struct uml_net_private) { .list = LIST_HEAD_INIT(lp->list), - .lock = SPIN_LOCK_UNLOCKED, .dev = dev, .fd = -1, .mac = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0}, @@ -400,6 +399,7 @@ .user = { save } }); init_timer(&lp->tl); + spin_lock_init(&lp->lock); lp->tl.function = uml_net_user_timer_expire; if (lp->have_mac) memcpy(lp->mac, device->mac, sizeof(lp->mac)); diff -Nru a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c --- a/arch/um/drivers/slip_user.c 2005-03-30 16:58:50 -08:00 +++ b/arch/um/drivers/slip_user.c 2005-03-30 16:58:50 -08:00 @@ -108,6 +108,9 @@ err = -EINVAL; } } + + os_close_file(fds[0]); + return(err); } @@ -128,6 +131,7 @@ sfd = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0); if(sfd < 0){ printk("Couldn't open tty for slip line, err = %d\n", -sfd); + os_close_file(mfd); return(sfd); } if(set_up_tty(sfd)) return(-1); @@ -175,7 +179,7 @@ sprintf(version_buf, "%d", UML_NET_VERSION); - err = slip_tramp(argv, -1); + err = slip_tramp(argv, pri->slave); if(err != 0) printk("slip_tramp failed - errno = %d\n", -err); diff -Nru a/arch/um/include/choose-mode.h b/arch/um/include/choose-mode.h --- a/arch/um/include/choose-mode.h 2005-03-30 16:58:49 -08:00 +++ b/arch/um/include/choose-mode.h 2005-03-30 16:58:49 -08:00 @@ -21,6 +21,13 @@ #define CHOOSE_MODE_PROC(tt, skas, args...) \ CHOOSE_MODE(tt(args), skas(args)) +extern int mode_tt; +static inline void *__choose_mode(void *tt, void *skas) { + return mode_tt ? tt : skas; +} + +#define __CHOOSE_MODE(tt, skas) (*( (typeof(tt) *) __choose_mode(&(tt), &(skas)))) + #endif /* diff -Nru a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h --- a/arch/um/include/sysdep-i386/ptrace.h 2005-03-30 16:58:47 -08:00 +++ b/arch/um/include/sysdep-i386/ptrace.h 2005-03-30 16:58:47 -08:00 @@ -93,39 +93,39 @@ #define UPT_SC(r) ((r)->tt.sc) #define UPT_IP(r) \ - CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs)) + __CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs)) #define UPT_SP(r) \ - CHOOSE_MODE(SC_SP(UPT_SC(r)), REGS_SP((r)->skas.regs)) + __CHOOSE_MODE(SC_SP(UPT_SC(r)), REGS_SP((r)->skas.regs)) #define UPT_EFLAGS(r) \ - CHOOSE_MODE(SC_EFLAGS(UPT_SC(r)), REGS_EFLAGS((r)->skas.regs)) + __CHOOSE_MODE(SC_EFLAGS(UPT_SC(r)), REGS_EFLAGS((r)->skas.regs)) #define UPT_EAX(r) \ - CHOOSE_MODE(SC_EAX(UPT_SC(r)), REGS_EAX((r)->skas.regs)) + __CHOOSE_MODE(SC_EAX(UPT_SC(r)), REGS_EAX((r)->skas.regs)) #define UPT_EBX(r) \ - CHOOSE_MODE(SC_EBX(UPT_SC(r)), REGS_EBX((r)->skas.regs)) + __CHOOSE_MODE(SC_EBX(UPT_SC(r)), REGS_EBX((r)->skas.regs)) #define UPT_ECX(r) \ - CHOOSE_MODE(SC_ECX(UPT_SC(r)), REGS_ECX((r)->skas.regs)) + __CHOOSE_MODE(SC_ECX(UPT_SC(r)), REGS_ECX((r)->skas.regs)) #define UPT_EDX(r) \ - CHOOSE_MODE(SC_EDX(UPT_SC(r)), REGS_EDX((r)->skas.regs)) + __CHOOSE_MODE(SC_EDX(UPT_SC(r)), REGS_EDX((r)->skas.regs)) #define UPT_ESI(r) \ - CHOOSE_MODE(SC_ESI(UPT_SC(r)), REGS_ESI((r)->skas.regs)) + __CHOOSE_MODE(SC_ESI(UPT_SC(r)), REGS_ESI((r)->skas.regs)) #define UPT_EDI(r) \ - CHOOSE_MODE(SC_EDI(UPT_SC(r)), REGS_EDI((r)->skas.regs)) + __CHOOSE_MODE(SC_EDI(UPT_SC(r)), REGS_EDI((r)->skas.regs)) #define UPT_EBP(r) \ - CHOOSE_MODE(SC_EBP(UPT_SC(r)), REGS_EBP((r)->skas.regs)) + __CHOOSE_MODE(SC_EBP(UPT_SC(r)), REGS_EBP((r)->skas.regs)) #define UPT_ORIG_EAX(r) \ - CHOOSE_MODE((r)->tt.syscall, (r)->skas.syscall) + __CHOOSE_MODE((r)->tt.syscall, (r)->skas.syscall) #define UPT_CS(r) \ - CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) + __CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) #define UPT_SS(r) \ - CHOOSE_MODE(SC_SS(UPT_SC(r)), REGS_SS((r)->skas.regs)) + __CHOOSE_MODE(SC_SS(UPT_SC(r)), REGS_SS((r)->skas.regs)) #define UPT_DS(r) \ - CHOOSE_MODE(SC_DS(UPT_SC(r)), REGS_DS((r)->skas.regs)) + __CHOOSE_MODE(SC_DS(UPT_SC(r)), REGS_DS((r)->skas.regs)) #define UPT_ES(r) \ - CHOOSE_MODE(SC_ES(UPT_SC(r)), REGS_ES((r)->skas.regs)) + __CHOOSE_MODE(SC_ES(UPT_SC(r)), REGS_ES((r)->skas.regs)) #define UPT_FS(r) \ - CHOOSE_MODE(SC_FS(UPT_SC(r)), REGS_FS((r)->skas.regs)) + __CHOOSE_MODE(SC_FS(UPT_SC(r)), REGS_FS((r)->skas.regs)) #define UPT_GS(r) \ - CHOOSE_MODE(SC_GS(UPT_SC(r)), REGS_GS((r)->skas.regs)) + __CHOOSE_MODE(SC_GS(UPT_SC(r)), REGS_GS((r)->skas.regs)) #define UPT_SYSCALL_ARG1(r) UPT_EBX(r) #define UPT_SYSCALL_ARG2(r) UPT_ECX(r) @@ -222,7 +222,7 @@ REGS_SEGV_IS_FIXABLE(&r->skas)) #define UPT_FAULT_ADDR(r) \ - CHOOSE_MODE(SC_FAULT_ADDR(UPT_SC(r)), REGS_FAULT_ADDR(&r->skas)) + __CHOOSE_MODE(SC_FAULT_ADDR(UPT_SC(r)), REGS_FAULT_ADDR(&r->skas)) #define UPT_FAULT_WRITE(r) \ CHOOSE_MODE(SC_FAULT_WRITE(UPT_SC(r)), REGS_FAULT_WRITE(&r->skas)) diff -Nru a/arch/um/include/sysdep-i386/sigcontext.h b/arch/um/include/sysdep-i386/sigcontext.h --- a/arch/um/include/sysdep-i386/sigcontext.h 2005-03-30 16:58:49 -08:00 +++ b/arch/um/include/sysdep-i386/sigcontext.h 2005-03-30 16:58:49 -08:00 @@ -6,7 +6,7 @@ #ifndef __SYS_SIGCONTEXT_I386_H #define __SYS_SIGCONTEXT_I386_H -#include "sc.h" +#include #define IP_RESTART_SYSCALL(ip) ((ip) -= 2) diff -Nru a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h --- a/arch/um/include/sysdep-x86_64/ptrace.h 2005-03-30 16:58:50 -08:00 +++ b/arch/um/include/sysdep-x86_64/ptrace.h 2005-03-30 16:58:50 -08:00 @@ -104,37 +104,37 @@ /* XXX */ extern int mode_tt; -#define UPT_RBX(r) CHOOSE_MODE(SC_RBX(UPT_SC(r)), REGS_RBX((r)->skas.regs)) -#define UPT_RCX(r) CHOOSE_MODE(SC_RCX(UPT_SC(r)), REGS_RCX((r)->skas.regs)) -#define UPT_RDX(r) CHOOSE_MODE(SC_RDX(UPT_SC(r)), REGS_RDX((r)->skas.regs)) -#define UPT_RSI(r) CHOOSE_MODE(SC_RSI(UPT_SC(r)), REGS_RSI((r)->skas.regs)) -#define UPT_RDI(r) CHOOSE_MODE(SC_RDI(UPT_SC(r)), REGS_RDI((r)->skas.regs)) -#define UPT_RBP(r) CHOOSE_MODE(SC_RBP(UPT_SC(r)), REGS_RBP((r)->skas.regs)) -#define UPT_RAX(r) CHOOSE_MODE(SC_RAX(UPT_SC(r)), REGS_RAX((r)->skas.regs)) -#define UPT_R8(r) CHOOSE_MODE(SC_R8(UPT_SC(r)), REGS_R8((r)->skas.regs)) -#define UPT_R9(r) CHOOSE_MODE(SC_R9(UPT_SC(r)), REGS_R9((r)->skas.regs)) -#define UPT_R10(r) CHOOSE_MODE(SC_R10(UPT_SC(r)), REGS_R10((r)->skas.regs)) -#define UPT_R11(r) CHOOSE_MODE(SC_R11(UPT_SC(r)), REGS_R11((r)->skas.regs)) -#define UPT_R12(r) CHOOSE_MODE(SC_R12(UPT_SC(r)), REGS_R12((r)->skas.regs)) -#define UPT_R13(r) CHOOSE_MODE(SC_R13(UPT_SC(r)), REGS_R13((r)->skas.regs)) -#define UPT_R14(r) CHOOSE_MODE(SC_R14(UPT_SC(r)), REGS_R14((r)->skas.regs)) -#define UPT_R15(r) CHOOSE_MODE(SC_R15(UPT_SC(r)), REGS_R15((r)->skas.regs)) -#define UPT_CS(r) CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) -#define UPT_FS(r) CHOOSE_MODE(SC_FS(UPT_SC(r)), REGS_FS((r)->skas.regs)) -#define UPT_GS(r) CHOOSE_MODE(SC_GS(UPT_SC(r)), REGS_GS((r)->skas.regs)) -#define UPT_DS(r) CHOOSE_MODE(SC_DS(UPT_SC(r)), REGS_DS((r)->skas.regs)) -#define UPT_ES(r) CHOOSE_MODE(SC_ES(UPT_SC(r)), REGS_ES((r)->skas.regs)) -#define UPT_CS(r) CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) +#define UPT_RBX(r) __CHOOSE_MODE(SC_RBX(UPT_SC(r)), REGS_RBX((r)->skas.regs)) +#define UPT_RCX(r) __CHOOSE_MODE(SC_RCX(UPT_SC(r)), REGS_RCX((r)->skas.regs)) +#define UPT_RDX(r) __CHOOSE_MODE(SC_RDX(UPT_SC(r)), REGS_RDX((r)->skas.regs)) +#define UPT_RSI(r) __CHOOSE_MODE(SC_RSI(UPT_SC(r)), REGS_RSI((r)->skas.regs)) +#define UPT_RDI(r) __CHOOSE_MODE(SC_RDI(UPT_SC(r)), REGS_RDI((r)->skas.regs)) +#define UPT_RBP(r) __CHOOSE_MODE(SC_RBP(UPT_SC(r)), REGS_RBP((r)->skas.regs)) +#define UPT_RAX(r) __CHOOSE_MODE(SC_RAX(UPT_SC(r)), REGS_RAX((r)->skas.regs)) +#define UPT_R8(r) __CHOOSE_MODE(SC_R8(UPT_SC(r)), REGS_R8((r)->skas.regs)) +#define UPT_R9(r) __CHOOSE_MODE(SC_R9(UPT_SC(r)), REGS_R9((r)->skas.regs)) +#define UPT_R10(r) __CHOOSE_MODE(SC_R10(UPT_SC(r)), REGS_R10((r)->skas.regs)) +#define UPT_R11(r) __CHOOSE_MODE(SC_R11(UPT_SC(r)), REGS_R11((r)->skas.regs)) +#define UPT_R12(r) __CHOOSE_MODE(SC_R12(UPT_SC(r)), REGS_R12((r)->skas.regs)) +#define UPT_R13(r) __CHOOSE_MODE(SC_R13(UPT_SC(r)), REGS_R13((r)->skas.regs)) +#define UPT_R14(r) __CHOOSE_MODE(SC_R14(UPT_SC(r)), REGS_R14((r)->skas.regs)) +#define UPT_R15(r) __CHOOSE_MODE(SC_R15(UPT_SC(r)), REGS_R15((r)->skas.regs)) +#define UPT_CS(r) __CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) +#define UPT_FS(r) __CHOOSE_MODE(SC_FS(UPT_SC(r)), REGS_FS((r)->skas.regs)) +#define UPT_GS(r) __CHOOSE_MODE(SC_GS(UPT_SC(r)), REGS_GS((r)->skas.regs)) +#define UPT_DS(r) __CHOOSE_MODE(SC_DS(UPT_SC(r)), REGS_DS((r)->skas.regs)) +#define UPT_ES(r) __CHOOSE_MODE(SC_ES(UPT_SC(r)), REGS_ES((r)->skas.regs)) +#define UPT_CS(r) __CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) #define UPT_ORIG_RAX(r) \ - CHOOSE_MODE((r)->tt.orig_rax, REGS_ORIG_RAX((r)->skas.regs)) + __CHOOSE_MODE((r)->tt.orig_rax, REGS_ORIG_RAX((r)->skas.regs)) -#define UPT_IP(r) CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs)) -#define UPT_SP(r) CHOOSE_MODE(SC_SP(UPT_SC(r)), REGS_SP((r)->skas.regs)) +#define UPT_IP(r) __CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs)) +#define UPT_SP(r) __CHOOSE_MODE(SC_SP(UPT_SC(r)), REGS_SP((r)->skas.regs)) #define UPT_EFLAGS(r) \ - CHOOSE_MODE(SC_EFLAGS(UPT_SC(r)), REGS_EFLAGS((r)->skas.regs)) + __CHOOSE_MODE(SC_EFLAGS(UPT_SC(r)), REGS_EFLAGS((r)->skas.regs)) #define UPT_SC(r) ((r)->tt.sc) -#define UPT_SYSCALL_NR(r) CHOOSE_MODE((r)->tt.syscall, (r)->skas.syscall) +#define UPT_SYSCALL_NR(r) __CHOOSE_MODE((r)->tt.syscall, (r)->skas.syscall) extern int user_context(unsigned long sp); @@ -242,13 +242,13 @@ REGS_SEGV_IS_FIXABLE(&r->skas)) #define UPT_FAULT_ADDR(r) \ - CHOOSE_MODE(SC_FAULT_ADDR(UPT_SC(r)), REGS_FAULT_ADDR(&r->skas)) + __CHOOSE_MODE(SC_FAULT_ADDR(UPT_SC(r)), REGS_FAULT_ADDR(&r->skas)) #define UPT_FAULT_WRITE(r) \ CHOOSE_MODE(SC_FAULT_WRITE(UPT_SC(r)), REGS_FAULT_WRITE(&r->skas)) -#define UPT_TRAP(r) CHOOSE_MODE(SC_TRAP_TYPE(UPT_SC(r)), REGS_TRAP(&r->skas)) -#define UPT_ERR(r) CHOOSE_MODE(SC_FAULT_TYPE(UPT_SC(r)), REGS_ERR(&r->skas)) +#define UPT_TRAP(r) __CHOOSE_MODE(SC_TRAP_TYPE(UPT_SC(r)), REGS_TRAP(&r->skas)) +#define UPT_ERR(r) __CHOOSE_MODE(SC_FAULT_TYPE(UPT_SC(r)), REGS_ERR(&r->skas)) #endif diff -Nru a/arch/um/include/sysdep-x86_64/sigcontext.h b/arch/um/include/sysdep-x86_64/sigcontext.h --- a/arch/um/include/sysdep-x86_64/sigcontext.h 2005-03-30 16:58:49 -08:00 +++ b/arch/um/include/sysdep-x86_64/sigcontext.h 2005-03-30 16:58:49 -08:00 @@ -7,7 +7,7 @@ #ifndef __SYSDEP_X86_64_SIGCONTEXT_H #define __SYSDEP_X86_64_SIGCONTEXT_H -#include "sc.h" +#include #define IP_RESTART_SYSCALL(ip) ((ip) -= 2) diff -Nru a/arch/um/include/user_util.h b/arch/um/include/user_util.h --- a/arch/um/include/user_util.h 2005-03-30 16:58:47 -08:00 +++ b/arch/um/include/user_util.h 2005-03-30 16:58:47 -08:00 @@ -67,7 +67,7 @@ extern int switcheroo(int fd, int prot, void *from, void *to, int size); extern void setup_machinename(char *machine_out); extern void setup_hostinfo(void); -extern void add_arg(char *cmd_line, char *arg); +extern void add_arg(char *arg); extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); extern void init_new_thread_signals(int altstack); extern void do_exec(int old_pid, int new_pid); diff -Nru a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile --- a/arch/um/kernel/Makefile 2005-03-30 16:58:49 -08:00 +++ b/arch/um/kernel/Makefile 2005-03-30 16:58:49 -08:00 @@ -23,16 +23,16 @@ obj-$(CONFIG_MODE_TT) += tt/ obj-$(CONFIG_MODE_SKAS) += skas/ -user-objs-$(CONFIG_TTY_LOG) += tty_log.o +# This needs be compiled with frame pointers regardless of how the rest of the +# kernel is built. +CFLAGS_frame.o := -fno-omit-frame-pointer -USER_OBJS := $(filter %_user.o,$(obj-y)) $(user-objs-y) config.o helper.o \ - main.o process.o tempfile.o time.o tty_log.o umid.o user_util.o frame.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) +user-objs-$(CONFIG_TTY_LOG) += tty_log.o -CFLAGS_frame.o := -fno-omit-frame-pointer +USER_OBJS := $(user-objs-y) config.o helper.o main.o process.o tempfile.o \ + time.o tty_log.o umid.o user_util.o frame.o -$(USER_OBJS) : %.o: %.c - $(CC) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) -c -o $@ $< +include arch/um/scripts/Makefile.rules targets += config.c diff -Nru a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c --- a/arch/um/kernel/gmon_syms.c 2005-03-30 16:58:50 -08:00 +++ b/arch/um/kernel/gmon_syms.c 2005-03-30 16:58:50 -08:00 @@ -5,14 +5,22 @@ #include "linux/module.h" -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4) -extern void __gcov_init(void *); -EXPORT_SYMBOL(__gcov_init); -#else extern void __bb_init_func(void *); EXPORT_SYMBOL(__bb_init_func); -#endif + +/* This is defined (and referred to in profiling stub code) only by some GCC + * versions in libgcov. + * + * Since SuSE backported the fix, we cannot handle it depending on GCC version. + * So, unconditinally export it. But also give it a weak declaration, which will + * be overriden by any other one. + */ + +extern void __gcov_init(void *) __attribute__((weak)); +EXPORT_SYMBOL(__gcov_init); + +extern void __gcov_merge_add(void *) __attribute__((weak)); +EXPORT_SYMBOL(__gcov_merge_add); /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile --- a/arch/um/kernel/skas/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/um/kernel/skas/Makefile 2005-03-30 16:58:48 -08:00 @@ -6,10 +6,8 @@ obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \ -USER_OBJS = $(filter %_user.o,$(obj-y)) process.o time.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) +subdir- := util -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +USER_OBJS := process.o time.o -subdir- := util +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/kernel/syscall_user.c b/arch/um/kernel/syscall_user.c --- a/arch/um/kernel/syscall_user.c 2005-03-30 16:58:49 -08:00 +++ b/arch/um/kernel/syscall_user.c 2005-03-30 16:58:49 -08:00 @@ -46,51 +46,3 @@ * c-file-style: "linux" * End: */ -/* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#include -#include -#include "kern_util.h" -#include "syscall_user.h" - -struct { - int syscall; - int pid; - long result; - struct timeval start; - struct timeval end; -} syscall_record[1024]; - -int record_syscall_start(int syscall) -{ - int max, index; - - max = sizeof(syscall_record)/sizeof(syscall_record[0]); - index = next_syscall_index(max); - - syscall_record[index].syscall = syscall; - syscall_record[index].pid = current_pid(); - syscall_record[index].result = 0xdeadbeef; - gettimeofday(&syscall_record[index].start, NULL); - return(index); -} - -void record_syscall_end(int index, long result) -{ - syscall_record[index].result = result; - gettimeofday(&syscall_record[index].end, NULL); -} - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile --- a/arch/um/kernel/tt/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/um/kernel/tt/Makefile 2005-03-30 16:58:48 -08:00 @@ -12,21 +12,17 @@ obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ -USER_OBJS := $(filter %_user.o,$(obj-y)) gdb.o time.o tracer.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) +USER_OBJS := gdb.o time.o tracer.o + +include arch/um/scripts/Makefile.rules UNMAP_CFLAGS := $(patsubst -pg -DPROFILING,,$(USER_CFLAGS)) UNMAP_CFLAGS := $(patsubst -fprofile-arcs -ftest-coverage,,$(UNMAP_CFLAGS)) -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -$(obj)/unmap.o: $(src)/unmap.c - $(CC) $(UNMAP_CFLAGS) -c -o $@ $< - -LIBC_DIR ?= /usr/lib +#XXX: partially copied from arch/um/scripts/Makefile.rules +$(obj)/unmap.o: c_flags = -Wp,-MD,$(depfile) $(UNMAP_CFLAGS) $(obj)/unmap_fin.o : $(obj)/unmap.o - ld -r -o $(obj)/unmap_tmp.o $< -lc -L$(LIBC_DIR) - objcopy $(obj)/unmap_tmp.o $@ -G switcheroo + $(LD) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) -print-file-name=libc.a) + $(OBJCOPY) $(obj)/unmap_tmp.o $@ -G switcheroo diff -Nru a/arch/um/kernel/tt/ptproxy/Makefile b/arch/um/kernel/tt/ptproxy/Makefile --- a/arch/um/kernel/tt/ptproxy/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/um/kernel/tt/ptproxy/Makefile 2005-03-30 16:58:48 -08:00 @@ -5,7 +5,6 @@ obj-y = proxy.o ptrace.o sysdep.o wait.o -USER_OBJS := $(foreach file,$(obj-y),$(src)/$(file)) +USER_OBJS := $(obj-y) -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c --- a/arch/um/kernel/um_arch.c 2005-03-30 16:58:50 -08:00 +++ b/arch/um/kernel/um_arch.c 2005-03-30 16:58:50 -08:00 @@ -25,6 +25,7 @@ #include "asm/user.h" #include "ubd_user.h" #include "asm/current.h" +#include "asm/setup.h" #include "user_util.h" #include "kern_util.h" #include "kern.h" @@ -40,6 +41,20 @@ #define DEFAULT_COMMAND_LINE "root=98:0" +/* Changed in linux_main and setup_arch, which run before SMP is started */ +char command_line[COMMAND_LINE_SIZE] = { 0 }; + +void add_arg(char *arg) +{ + if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) { + printf("add_arg: Too much command line!\n"); + exit(1); + } + if(strlen(command_line) > 0) + strcat(command_line, " "); + strcat(command_line, arg); +} + struct cpuinfo_um boot_cpu_data = { .loops_per_jiffy = 0, .ipi_pipe = { -1, -1 } @@ -314,9 +329,11 @@ if((i == 1) && (argv[i][0] == ' ')) continue; add = 1; uml_checksetup(argv[i], &add); - if(add) add_arg(saved_command_line, argv[i]); + if (add) + add_arg(argv[i]); } - if(have_root == 0) add_arg(saved_command_line, DEFAULT_COMMAND_LINE); + if(have_root == 0) + add_arg(DEFAULT_COMMAND_LINE); mode_tt = force_tt ? 1 : !can_do_skas(); #ifndef CONFIG_MODE_TT @@ -432,7 +449,7 @@ { notifier_chain_register(&panic_notifier_list, &panic_exit_notifier); paging_init(); - strcpy(command_line, saved_command_line); + strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); *cmdline_p = command_line; setup_hostinfo(); } @@ -448,14 +465,3 @@ void apply_alternatives(void *start, void *end) { } - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c --- a/arch/um/kernel/user_util.c 2005-03-30 16:58:47 -08:00 +++ b/arch/um/kernel/user_util.c 2005-03-30 16:58:47 -08:00 @@ -31,21 +31,6 @@ #include "ptrace_user.h" #include "uml-config.h" -#define COMMAND_LINE_SIZE _POSIX_ARG_MAX - -/* Changed in linux_main and setup_arch, which run before SMP is started */ -char command_line[COMMAND_LINE_SIZE] = { 0 }; - -void add_arg(char *cmd_line, char *arg) -{ - if (strlen(cmd_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) { - printf("add_arg: Too much command line!\n"); - exit(1); - } - if(strlen(cmd_line) > 0) strcat(cmd_line, " "); - strcat(cmd_line, arg); -} - void stop(void) { while(1) sleep(1000000); diff -Nru a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile --- a/arch/um/os-Linux/Makefile 2005-03-30 16:58:49 -08:00 +++ b/arch/um/os-Linux/Makefile 2005-03-30 16:58:49 -08:00 @@ -7,9 +7,7 @@ sys-$(SUBARCH)/ USER_OBJS := elf_aux.o file.o process.o signal.o time.o tty.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< CFLAGS_user_syms.o += -DSUBARCH_$(SUBARCH) + +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/os-Linux/drivers/Makefile b/arch/um/os-Linux/drivers/Makefile --- a/arch/um/os-Linux/drivers/Makefile 2005-03-30 16:58:48 -08:00 +++ b/arch/um/os-Linux/drivers/Makefile 2005-03-30 16:58:48 -08:00 @@ -10,10 +10,4 @@ obj-$(CONFIG_UML_NET_ETHERTAP) += ethertap.o obj-$(CONFIG_UML_NET_TUNTAP) += tuntap.o -USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y)),$($(f)-objs)) - -USER_OBJS = $(filter %_user.o,$(obj-y) $(USER_SINGLE_OBJS)) -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/os-Linux/sys-i386/Makefile b/arch/um/os-Linux/sys-i386/Makefile --- a/arch/um/os-Linux/sys-i386/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/um/os-Linux/sys-i386/Makefile 2005-03-30 16:58:47 -08:00 @@ -5,7 +5,6 @@ obj-$(CONFIG_MODE_SKAS) = registers.o -USER_OBJS := $(foreach file,$(obj-y),$(obj)/$(file)) +USER_OBJS := $(obj-y) -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/os-Linux/sys-x86_64/Makefile b/arch/um/os-Linux/sys-x86_64/Makefile --- a/arch/um/os-Linux/sys-x86_64/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/um/os-Linux/sys-x86_64/Makefile 2005-03-30 16:58:50 -08:00 @@ -5,7 +5,6 @@ obj-$(CONFIG_MODE_SKAS) = registers.o -USER_OBJS := $(foreach file,$(obj-y),$(obj)/$(file)) +USER_OBJS := $(obj-y) -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +include arch/um/scripts/Makefile.rules diff -Nru a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/scripts/Makefile.rules 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,13 @@ +# =========================================================================== +# arch/um: Generic definitions +# =========================================================================== + +USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) +USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) + +USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) + +$(USER_OBJS): c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) + +quiet_cmd_make_link = SYMLINK $@ +cmd_make_link = rm -f $@; ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@ diff -Nru a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile --- a/arch/um/sys-i386/Makefile 2005-03-30 16:58:47 -08:00 +++ b/arch/um/sys-i386/Makefile 2005-03-30 16:58:47 -08:00 @@ -5,7 +5,8 @@ obj-$(CONFIG_MODULES) += module.o USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) + +include arch/um/scripts/Makefile.rules SYMLINKS = bitops.c semaphore.c highmem.c module.c @@ -13,22 +14,16 @@ # complete paths like $(src)/$f. clean-files := $(SYMLINKS) -SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) +targets += $(SYMLINKS) + +SYMLINKS := $(foreach f,$(SYMLINKS),$(obj)/$f) bitops.c-dir = lib semaphore.c-dir = kernel highmem.c-dir = mm module.c-dir = kernel -define make_link - -rm -f $1 - ln -sf $(TOPDIR)/arch/i386/$($(notdir $1)-dir)/$(notdir $1) $1 -endef - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -$(SYMLINKS): - $(call make_link,$@) +$(SYMLINKS): FORCE + $(call if_changed,make_link) subdir- := util diff -Nru a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile --- a/arch/um/sys-x86_64/Makefile 2005-03-30 16:58:50 -08:00 +++ b/arch/um/sys-x86_64/Makefile 2005-03-30 16:58:50 -08:00 @@ -9,14 +9,20 @@ syscalls.o sysrq.o thunk.o USER_OBJS := ptrace_user.o sigcontext.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) + +include arch/um/scripts/Makefile.rules SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c memcpy.S \ semaphore.c thunk.S -SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) +# this needs to be before the foreach, because clean-files does not accept +# complete paths like $(src)/$f. clean-files := $(SYMLINKS) +targets += $(SYMLINKS) + +SYMLINKS := $(foreach f,$(SYMLINKS),$(obj)/$f) + bitops.c-dir = lib csum-copy.S-dir = lib csum-partial.c-dir = lib @@ -25,15 +31,7 @@ semaphore.c-dir = kernel thunk.S-dir = lib -define make_link - -rm -f $1 - ln -sf $(TOPDIR)/arch/x86_64/$($(notdir $1)-dir)/$(notdir $1) $1 -endef - -$(SYMLINKS): - $(call make_link,$@) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +$(SYMLINKS): FORCE + $(call if_changed,make_link) CFLAGS_csum-partial.o := -Dcsum_partial=arch_csum_partial diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig --- a/arch/x86_64/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/Kconfig 2005-03-30 16:58:50 -08:00 @@ -53,23 +53,6 @@ bool default y -config HPET_TIMER - bool - default y - help - Use the IA-PC HPET (High Precision Event Timer) to manage - time in preference to the PIT and RTC, if a HPET is - present. The HPET provides a stable time base on SMP - systems, unlike the RTC, but it is more expensive to access, - as it is off-chip. You can find the HPET spec at - . - - If unsure, say Y. - -config HPET_EMULATE_RTC - bool "Provide RTC interrupt" - depends on HPET_TIMER && RTC=y - config GENERIC_ISA_DMA bool default y @@ -254,7 +237,7 @@ config SCHED_SMT bool "SMT (Hyperthreading) scheduler support" depends on SMP - default off + default n help SMT scheduler support improves the CPU scheduler's decision making when dealing with Intel Pentium 4 chips with HyperThreading at a @@ -309,6 +292,21 @@ This is purely to save memory - each supported CPU requires memory in the static kernel configuration. +config HPET_TIMER + bool + default y + help + Use the IA-PC HPET (High Precision Event Timer) to manage + time in preference to the PIT and RTC, if a HPET is + present. The HPET provides a stable time base on SMP + systems, unlike the TSC, but it is more expensive to access, + as it is off-chip. You can find the HPET spec at + . + +config HPET_EMULATE_RTC + bool "Provide RTC interrupt" + depends on HPET_TIMER && RTC=y + config GART_IOMMU bool "IOMMU support" depends on PCI @@ -416,6 +414,8 @@ work with this option, but it makes the drivers behave differently from i386. Requires that the driver writer used memory barriers properly. + +source "drivers/pci/pcie/Kconfig" source "drivers/pci/Kconfig" diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig 2005-03-30 16:58:49 -08:00 +++ b/arch/x86_64/defconfig 2005-03-30 16:58:49 -08:00 @@ -1,13 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-bk7 -# Fri Jan 7 06:27:52 2005 +# Linux kernel version: 2.6.11-bk7 +# Sat Mar 12 23:43:44 2005 # CONFIG_X86_64=y CONFIG_64BIT=y CONFIG_X86=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_CMPXCHG=y CONFIG_EARLY_PRINTK=y CONFIG_HPET_TIMER=y @@ -37,10 +38,12 @@ CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y +# CONFIG_CPUSETS is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set @@ -50,6 +53,7 @@ CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 # # Loadable module support @@ -93,6 +97,7 @@ CONFIG_SWIOTLB=y CONFIG_X86_MCE=y CONFIG_X86_MCE_INTEL=y +CONFIG_SECCOMP=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -137,13 +142,13 @@ # CONFIG_CPU_FREQ=y # CONFIG_CPU_FREQ_DEBUG is not set -CONFIG_CPU_FREQ_PROC_INTF=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_24_API=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_TABLE=y @@ -172,6 +177,20 @@ # CONFIG_PCI_NAMES is not set # +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y @@ -191,6 +210,7 @@ # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set # @@ -216,6 +236,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set @@ -236,6 +257,7 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -352,6 +374,7 @@ CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_NV is not set # CONFIG_SCSI_SATA_PROMISE is not set +# CONFIG_SCSI_SATA_QSTOR is not set # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set # CONFIG_SCSI_SATA_SIS is not set @@ -514,7 +537,7 @@ # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set CONFIG_8139CP=m -CONFIG_8139TOO=m +CONFIG_8139TOO=y # CONFIG_8139TOO_PIO is not set # CONFIG_8139TOO_TUNE_TWISTER is not set # CONFIG_8139TOO_8129 is not set @@ -597,18 +620,6 @@ # CONFIG_INPUT_EVBUG is not set # -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set -# CONFIG_SERIO_RAW is not set - -# # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y @@ -626,6 +637,19 @@ # CONFIG_INPUT_MISC is not set # +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y + +# # Character devices # CONFIG_VT=y @@ -682,6 +706,11 @@ CONFIG_HANGCHECK_TIMER=y # +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# # I2C support # # CONFIG_I2C is not set @@ -710,7 +739,7 @@ # Graphics support # # CONFIG_FB is not set -# CONFIG_VIDEO_SELECT is not set +CONFIG_VIDEO_SELECT=y # # Console display driver support @@ -778,6 +807,8 @@ # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_UHCI_HCD=y # CONFIG_USB_SL811_HCD is not set @@ -800,7 +831,7 @@ # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_USBAT is not set # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set @@ -826,7 +857,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -845,6 +875,7 @@ # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set +CONFIG_USB_MON=y # # USB port drivers @@ -860,7 +891,6 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set @@ -869,6 +899,8 @@ # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_TEST is not set # @@ -917,6 +949,10 @@ # CONFIG_REISERFS_FS_SECURITY is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -1058,12 +1094,14 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_PRINTK_TIME is not set # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_INIT_DEBUG=y # CONFIG_IOMMU_DEBUG is not set CONFIG_KPROBES=y diff -Nru a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c --- a/arch/x86_64/ia32/ia32_aout.c 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/ia32/ia32_aout.c 2005-03-30 16:58:50 -08:00 @@ -313,7 +313,7 @@ (current->mm->start_brk = N_BSSADDR(ex)); current->mm->free_area_cache = TASK_UNMAPPED_BASE; - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); current->mm->mmap = NULL; compute_creds(bprm); current->flags &= ~PF_FORKNOEXEC; diff -Nru a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c --- a/arch/x86_64/ia32/ia32_signal.c 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/ia32/ia32_signal.c 2005-03-30 16:58:50 -08:00 @@ -49,12 +49,12 @@ return -EFAULT; /* If you change siginfo_t structure, please make sure that - this code is fixed accordingly. - It should never copy any pad contained in the structure - to avoid security leaks, but must copy the generic - 3 ints plus the relevant union member. */ - err = __put_user(from->si_signo, &to->si_signo); - err |= __put_user(from->si_errno, &to->si_errno); + this code is fixed accordingly. + It should never copy any pad contained in the structure + to avoid security leaks, but must copy the generic + 3 ints plus the relevant union member. */ + err = __put_user(from->si_signo, &to->si_signo); + err |= __put_user(from->si_errno, &to->si_errno); err |= __put_user((short)from->si_code, &to->si_code); if (from->si_code < 0) { @@ -72,6 +72,7 @@ err |= __put_user(from->si_utime, &to->si_utime); err |= __put_user(from->si_stime, &to->si_stime); err |= __put_user(from->si_status, &to->si_status); + /* FALL THROUGH */ default: case __SI_KILL >> 16: err |= __put_user(from->si_uid, &to->si_uid); @@ -81,7 +82,8 @@ break; case __SI_TIMER >> 16: err |= __put_user(from->si_overrun, &to->si_overrun); - err |= __put_user(ptr_to_compat(from->si_ptr), &to->si_ptr); + err |= __put_user(ptr_to_compat(from->si_ptr), + &to->si_ptr); break; case __SI_RT >> 16: /* This is not generated by the kernel as of now. */ case __SI_MESGQ >> 16: @@ -205,14 +207,14 @@ sc, sc->err, sc->eip, sc->cs, sc->eflags); #endif #define COPY(x) { \ - unsigned int reg; \ + unsigned int reg; \ err |= __get_user(reg, &sc->e ##x); \ regs->r ## x = reg; \ } #define RELOAD_SEG(seg,mask) \ - { unsigned int cur; \ - unsigned short pre; \ + { unsigned int cur; \ + unsigned short pre; \ err |= __get_user(pre, &sc->seg); \ asm volatile("movl %%" #seg ",%0" : "=r" (cur)); \ pre |= mask; \ @@ -377,19 +379,19 @@ err |= __put_user(current->thread.error_code, &sc->err); err |= __put_user((u32)regs->rip, &sc->eip); eflags = regs->eflags; - if (current->ptrace & PT_PTRACED) { + if (current->ptrace & PT_PTRACED) eflags &= ~TF_MASK; - } err |= __put_user((u32)eflags, &sc->eflags); err |= __put_user((u32)regs->rsp, &sc->esp_at_signal); tmp = save_i387_ia32(current, fpstate, regs, 0); if (tmp < 0) - err = -EFAULT; + err = -EFAULT; else { clear_used_math(); stts(); - err |= __put_user(ptr_to_compat(tmp ? fpstate : NULL), &sc->fpstate); + err |= __put_user(ptr_to_compat(tmp ? fpstate : NULL), + &sc->fpstate); } /* non-iBCS2 extensions.. */ @@ -439,7 +441,7 @@ { struct exec_domain *ed = current_thread_info()->exec_domain; - err |= __put_user((ed + err |= __put_user((ed && ed->signal_invmap && sig < 32 ? ed->signal_invmap[sig] @@ -449,7 +451,8 @@ if (err) goto give_sigsegv; - err |= ia32_setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]); + err |= ia32_setup_sigcontext(&frame->sc, &frame->fpstate, regs, + set->sig[0]); if (err) goto give_sigsegv; @@ -528,10 +531,9 @@ if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - { struct exec_domain *ed = current_thread_info()->exec_domain; - err |= __put_user((ed + err |= __put_user((ed && ed->signal_invmap && sig < 32 ? ed->signal_invmap[sig] diff -Nru a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c --- a/arch/x86_64/kernel/e820.c 2005-03-30 16:58:48 -08:00 +++ b/arch/x86_64/kernel/e820.c 2005-03-30 16:58:48 -08:00 @@ -507,21 +507,7 @@ void __init parse_memopt(char *p, char **from) { - /* - * mem=XXX[kKmM] limits kernel memory to XXX+1MB - * - * It would be more logical to count from 0 instead of from - * HIGH_MEMORY, but we keep that for now for i386 compatibility. - * - * No support for custom mapping like i386. The reason is - * that we need to read the e820 map anyways to handle the - * ACPI mappings in the direct map. Also on x86-64 there - * should be always a good e820 map. This is only an upper - * limit, you cannot force usage of memory not in e820. - * - * -AK - */ - end_user_pfn = memparse(p, from) + HIGH_MEMORY; + end_user_pfn = memparse(p, from); end_user_pfn >>= PAGE_SHIFT; } diff -Nru a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S --- a/arch/x86_64/kernel/entry.S 2005-03-30 16:58:48 -08:00 +++ b/arch/x86_64/kernel/entry.S 2005-03-30 16:58:48 -08:00 @@ -516,13 +516,8 @@ bt $TIF_NEED_RESCHED,threadinfo_flags(%rcx) jnc retint_restore_args bt $9,EFLAGS-ARGOFFSET(%rsp) /* interrupts off? */ - jc retint_restore_args - movl $PREEMPT_ACTIVE,threadinfo_preempt_count(%rcx) - sti - call schedule - cli - GET_THREAD_INFO(%rcx) - movl $0,threadinfo_preempt_count(%rcx) + jnc retint_restore_args + call preempt_schedule_irq jmp exit_intr #endif CFI_ENDPROC diff -Nru a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S --- a/arch/x86_64/kernel/head.S 2005-03-30 16:58:49 -08:00 +++ b/arch/x86_64/kernel/head.S 2005-03-30 16:58:49 -08:00 @@ -26,6 +26,7 @@ .text .code32 + .globl startup_32 /* %bx: 1 if coming from smp trampoline on secondary cpu */ startup_32: @@ -37,11 +38,13 @@ * There is no stack until we set one up. */ - movl %ebx,%ebp /* Save trampoline flag */ - + /* Initialize the %ds segment register */ movl $__KERNEL_DS,%eax movl %eax,%ds - + + /* Load new GDT with the 64bit segments using 32bit descriptor */ + lgdt pGDT32 - __START_KERNEL_map + /* If the CPU doesn't support CPUID this will double fault. * Unfortunately it is hard to check for CPUID without a stack. */ @@ -57,16 +60,13 @@ btl $29, %edx jnc no_long_mode - movl %edx,%edi - /* * Prepare for entering 64bits mode */ - /* Enable PAE mode and PGE */ + /* Enable PAE mode */ xorl %eax, %eax btsl $5, %eax - btsl $7, %eax movl %eax, %cr4 /* Setup early boot stage 4 level pagetables */ @@ -79,14 +79,6 @@ /* Enable Long Mode */ btsl $_EFER_LME, %eax - /* Enable System Call */ - btsl $_EFER_SCE, %eax - - /* No Execute supported? */ - btl $20,%edi - jnc 1f - btsl $_EFER_NX, %eax -1: /* Make changes effective */ wrmsr @@ -94,38 +86,69 @@ xorl %eax, %eax btsl $31, %eax /* Enable paging and in turn activate Long Mode */ btsl $0, %eax /* Enable protected mode */ - btsl $1, %eax /* Enable MP */ - btsl $4, %eax /* Enable ET */ - btsl $5, %eax /* Enable NE */ - btsl $16, %eax /* Enable WP */ - btsl $18, %eax /* Enable AM */ /* Make changes effective */ movl %eax, %cr0 - jmp reach_compatibility_mode -reach_compatibility_mode: - /* * At this point we're in long mode but in 32bit compatibility mode * with EFER.LME = 1, CS.L = 0, CS.D = 1 (and in turn - * EFER.LMA = 1). Now we want to jump in 64bit mode, to do that we load + * EFER.LMA = 1). Now we want to jump in 64bit mode, to do that we use * the new gdt/idt that has __KERNEL_CS with CS.L = 1. */ - - testw %bp,%bp /* secondary CPU? */ - jnz second - - /* Load new GDT with the 64bit segment using 32bit descriptor */ - movl $(pGDT32 - __START_KERNEL_map), %eax - lgdt (%eax) - -second: - movl $(ljumpvector - __START_KERNEL_map), %eax - /* Finally jump in 64bit mode */ - ljmp *(%eax) + ljmp $__KERNEL_CS, $(startup_64 - __START_KERNEL_map) .code64 .org 0x100 -reach_long64: + .globl startup_64 +startup_64: + /* We come here either from startup_32 + * or directly from a 64bit bootloader. + * Since we may have come directly from a bootloader we + * reload the page tables here. + */ + + /* Enable PAE mode and PGE */ + xorq %rax, %rax + btsq $5, %rax + btsq $7, %rax + movq %rax, %cr4 + + /* Setup early boot stage 4 level pagetables. */ + movq $(init_level4_pgt - __START_KERNEL_map), %rax + movq %rax, %cr3 + + /* Check if nx is implemented */ + movl $0x80000001, %eax + cpuid + movl %edx,%edi + + /* Setup EFER (Extended Feature Enable Register) */ + movl $MSR_EFER, %ecx + rdmsr + + /* Enable System Call */ + btsl $_EFER_SCE, %eax + + /* No Execute supported? */ + btl $20,%edi + jnc 1f + btsl $_EFER_NX, %eax +1: + /* Make changes effective */ + wrmsr + + /* Setup cr0 */ + xorq %rax, %rax + btsq $31, %rax /* Enable paging */ + btsq $0, %rax /* Enable protected mode */ + btsq $1, %rax /* Enable MP */ + btsq $4, %rax /* Enable ET */ + btsq $5, %rax /* Enable NE */ + btsq $16, %rax /* Enable WP */ + btsq $18, %rax /* Enable AM */ + /* Make changes effective */ + movq %rax, %cr0 + + /* Setup a boot time stack */ movq init_rsp(%rip),%rsp /* zero EFLAGS after setting rsp */ @@ -198,12 +221,12 @@ .org 0xf00 .globl pGDT32 pGDT32: - .word gdt32_end-gdt_table32 - .long gdt_table32-__START_KERNEL_map + .word gdt_end-cpu_gdt_table + .long cpu_gdt_table-__START_KERNEL_map .org 0xf10 ljumpvector: - .long reach_long64-__START_KERNEL_map + .long startup_64-__START_KERNEL_map .word __KERNEL_CS ENTRY(stext) @@ -334,12 +357,6 @@ .endr #endif -ENTRY(gdt_table32) - .quad 0x0000000000000000 /* This one is magic */ - .quad 0x0000000000000000 /* unused */ - .quad 0x00af9a000000ffff /* __KERNEL_CS */ -gdt32_end: - /* We need valid kernel segments for data and code in long mode too * IRET will check the segment types kkeil 2000/10/28 * Also sysret mandates a special GDT layout @@ -360,9 +377,8 @@ .quad 0x00affa000000ffff /* __USER_CS */ .quad 0x00cf9a000000ffff /* __KERNEL32_CS */ .quad 0,0 /* TSS */ - .quad 0 /* LDT */ + .quad 0,0 /* LDT */ .quad 0,0,0 /* three TLS descriptors */ - .quad 0 /* unused now */ .quad 0x00009a000000ffff /* __KERNEL16_CS - 16bit PM for S3 wakeup. */ /* base must be patched for real base address. */ gdt_end: diff -Nru a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c --- a/arch/x86_64/kernel/i8259.c 2005-03-30 16:58:47 -08:00 +++ b/arch/x86_64/kernel/i8259.c 2005-03-30 16:58:47 -08:00 @@ -477,6 +477,7 @@ void call_function_interrupt(void); void invalidate_interrupt(void); void thermal_interrupt(void); +void i8254_timer_resume(void); static void setup_timer(void) { @@ -491,6 +492,11 @@ { setup_timer(); return 0; +} + +void i8254_timer_resume(void) +{ + setup_timer(); } static struct sysdev_class timer_sysclass = { diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c --- a/arch/x86_64/kernel/pci-gart.c 2005-03-30 16:58:48 -08:00 +++ b/arch/x86_64/kernel/pci-gart.c 2005-03-30 16:58:48 -08:00 @@ -720,6 +720,7 @@ unsigned aper_base, new_aper_base; unsigned aper_size, gatt_size, new_aper_size; + printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); aper_size = aper_base = info->aper_size = 0; for_all_nb(dev) { new_aper_base = read_aperture(dev, &new_aper_size); @@ -798,25 +799,14 @@ return -1; } - if (no_iommu || (!force_iommu && end_pfn < 0xffffffff>>PAGE_SHIFT) || - !iommu_aperture) { + if (no_iommu || + (!force_iommu && end_pfn < 0xffffffff>>PAGE_SHIFT) || + !iommu_aperture || + (no_agp && init_k8_gatt(&info) < 0)) { printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); no_iommu = 1; return -1; } - - if (no_agp) { - int err = -1; - printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); - no_agp = 1; - if (force_iommu || end_pfn >= 0xffffffff>>PAGE_SHIFT) - err = init_k8_gatt(&info); - if (err < 0) { - printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); - no_iommu = 1; - return -1; - } - } aper_size = info.aper_size * 1024 * 1024; iommu_size = check_iommu_size(info.aper_base, aper_size); diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c 2005-03-30 16:58:47 -08:00 +++ b/arch/x86_64/kernel/setup.c 2005-03-30 16:58:47 -08:00 @@ -1077,6 +1077,8 @@ "fid", /* frequency id control */ "vid", /* voltage id control */ "ttp", /* thermal trip */ + "tm", + "stc" }; diff -Nru a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c --- a/arch/x86_64/kernel/signal.c 2005-03-30 16:58:49 -08:00 +++ b/arch/x86_64/kernel/signal.c 2005-03-30 16:58:49 -08:00 @@ -160,9 +160,8 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax)) { + if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax)) goto badframe; - } #ifdef DEBUG_SIG printk("%d sigreturn rip:%lx rsp:%lx frame:%p rax:%lx\n",current->pid,regs.rip,regs.rsp,frame,eax); @@ -253,28 +252,25 @@ if (used_math()) { fp = get_stack(ka, regs, sizeof(struct _fpstate)); - frame = (void __user *)round_down((unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8; + frame = (void __user *)round_down( + (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8; - if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) { - goto give_sigsegv; - } + if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) + goto give_sigsegv; if (save_i387(fp) < 0) err |= -1; - } else { + } else frame = get_stack(ka, regs, sizeof(struct rt_sigframe)) - 8; - } - if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) { + if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - } if (ka->sa.sa_flags & SA_SIGINFO) { err |= copy_siginfo_to_user(&frame->info, info); - if (err) { + if (err) goto give_sigsegv; } - } /* Create the ucontext. */ err |= __put_user(0, &frame->uc.uc_flags); @@ -288,9 +284,8 @@ if (sizeof(*set) == 16) { __put_user(set->sig[0], &frame->uc.uc_sigmask.sig[0]); __put_user(set->sig[1], &frame->uc.uc_sigmask.sig[1]); - } else { - err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); - } + } else + err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); /* Set up to return from userspace. If provided, use a stub already in userspace. */ @@ -302,9 +297,8 @@ goto give_sigsegv; } - if (err) { + if (err) goto give_sigsegv; - } #ifdef DEBUG_SIG printk("%d old rip %lx old rsp %lx old rax %lx\n", current->pid,regs->rip,regs->rsp,regs->rax); @@ -357,7 +351,8 @@ sigset_t *oldset, struct pt_regs *regs) { #ifdef DEBUG_SIG - printk("handle_signal pid:%d sig:%lu rip:%lx rsp:%lx regs=%p\n", current->pid, sig, + printk("handle_signal pid:%d sig:%lu rip:%lx rsp:%lx regs=%p\n", + current->pid, sig, regs->rip, regs->rsp, regs); #endif @@ -375,10 +370,11 @@ regs->rax = -EINTR; break; } - /* fallthrough */ + /* fallthrough */ case -ERESTARTNOINTR: regs->rax = regs->orig_rax; regs->rip -= 2; + break; } } @@ -418,9 +414,8 @@ * kernel mode. Just return without doing anything * if so. */ - if ((regs->cs & 3) != 3) { + if ((regs->cs & 3) != 3) return 1; - } if (try_to_freeze(0)) goto no_signal; diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c --- a/arch/x86_64/kernel/smp.c 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/kernel/smp.c 2005-03-30 16:58:50 -08:00 @@ -25,6 +25,7 @@ #include #include #include +#include #include /* @@ -41,7 +42,7 @@ static struct mm_struct * flush_mm; static unsigned long flush_va; static DEFINE_SPINLOCK(tlbstate_lock); -#define FLUSH_ALL 0xffffffff +#define FLUSH_ALL -1ULL /* * We cannot call mmdrop() because we are in interrupt context, @@ -52,7 +53,7 @@ if (read_pda(mmu_state) == TLBSTATE_OK) BUG(); clear_bit(cpu, &read_pda(active_mm)->cpu_vm_mask); - __flush_tlb(); + load_cr3(swapper_pg_dir); } /* diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c --- a/arch/x86_64/kernel/smpboot.c 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/kernel/smpboot.c 2005-03-30 16:58:50 -08:00 @@ -88,8 +88,6 @@ static unsigned long __init setup_trampoline(void) { void *tramp = __va(SMP_TRAMPOLINE_BASE); - extern volatile __u32 tramp_gdt_ptr; - tramp_gdt_ptr = __pa_symbol(&cpu_gdt_table); memcpy(tramp, trampoline_data, trampoline_end - trampoline_data); return virt_to_phys(tramp); } @@ -718,6 +716,7 @@ printk(KERN_NOTICE "SMP motherboard not detected.\n"); io_apic_irqs = 0; cpu_online_map = cpumask_of_cpu(0); + cpu_set(0, cpu_sibling_map[0]); phys_cpu_present_map = physid_mask_of_physid(0); if (APIC_init_uniprocessor()) printk(KERN_NOTICE "Local APIC not detected." @@ -744,6 +743,7 @@ printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); io_apic_irqs = 0; cpu_online_map = cpumask_of_cpu(0); + cpu_set(0, cpu_sibling_map[0]); phys_cpu_present_map = physid_mask_of_physid(0); disable_apic = 1; goto smp_done; @@ -759,6 +759,7 @@ printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n"); io_apic_irqs = 0; cpu_online_map = cpumask_of_cpu(0); + cpu_set(0, cpu_sibling_map[0]); phys_cpu_present_map = physid_mask_of_physid(0); disable_apic = 1; goto smp_done; diff -Nru a/arch/x86_64/kernel/suspend_asm.S b/arch/x86_64/kernel/suspend_asm.S --- a/arch/x86_64/kernel/suspend_asm.S 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/kernel/suspend_asm.S 2005-03-30 16:58:50 -08:00 @@ -69,12 +69,21 @@ movq pbe_next(%rdx), %rdx jmp loop done: + /* Flush TLB, including "global" things (vmalloc) */ + movq mmu_cr4_features(%rip), %rax + movq %rax, %rdx + andq $~(1<<7), %rdx; # PGE + movq %rdx, %cr4; # turn off PGE + movq %cr3, %rcx; # flush TLB + movq %rcx, %cr3 + movq %rax, %cr4; # turn PGE back on + movl $24, %eax movl %eax, %ds movq saved_context_esp(%rip), %rsp movq saved_context_ebp(%rip), %rbp - movq saved_context_eax(%rip), %rax + /* Don't restore %rax, it must be 0 anyway */ movq saved_context_ebx(%rip), %rbx movq saved_context_ecx(%rip), %rcx movq saved_context_edx(%rip), %rdx @@ -89,5 +98,7 @@ movq saved_context_r14(%rip), %r14 movq saved_context_r15(%rip), %r15 pushq saved_context_eflags(%rip) ; popfq - call swsusp_restore + + xorq %rax, %rax + ret diff -Nru a/arch/x86_64/kernel/sys_x86_64.c b/arch/x86_64/kernel/sys_x86_64.c --- a/arch/x86_64/kernel/sys_x86_64.c 2005-03-30 16:58:49 -08:00 +++ b/arch/x86_64/kernel/sys_x86_64.c 2005-03-30 16:58:49 -08:00 @@ -38,7 +38,7 @@ return error; } -long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, +asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off) { long error; diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c --- a/arch/x86_64/kernel/time.c 2005-03-30 16:58:51 -08:00 +++ b/arch/x86_64/kernel/time.c 2005-03-30 16:58:51 -08:00 @@ -46,7 +46,7 @@ #ifdef CONFIG_CPU_FREQ static void cpufreq_delayed_get(void); #endif - +extern void i8254_timer_resume(void); extern int using_apic_timer; DEFINE_SPINLOCK(rtc_lock); @@ -551,11 +551,10 @@ BCD_TO_BIN(year); /* - * This will work up to Dec 31, 2069. + * x86-64 systems only exists since 2002. + * This will work up to Dec 31, 2100 */ - - if ((year += 1900) < 1970) - year += 100; + year += 2000; return mktime(year, mon, day, hour, min, sec); } @@ -980,6 +979,8 @@ if (vxtime.hpet_address) hpet_reenable(); + else + i8254_timer_resume(); sec = ctime + clock_cmos_diff; write_seqlock_irqsave(&xtime_lock,flags); diff -Nru a/arch/x86_64/kernel/trampoline.S b/arch/x86_64/kernel/trampoline.S --- a/arch/x86_64/kernel/trampoline.S 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/kernel/trampoline.S 2005-03-30 16:58:50 -08:00 @@ -37,7 +37,6 @@ mov %cs, %ax # Code and data in the same place mov %ax, %ds - mov $1, %bx # Flag an SMP trampoline cli # We should be safe anyway movl $0xA5A5A5A5, trampoline_data - r_base @@ -46,31 +45,20 @@ lidt idt_48 - r_base # load idt with 0, 0 lgdt gdt_48 - r_base # load gdt with whatever is appropriate - movw $__KERNEL_DS,%ax - movw %ax,%ds - movw %ax,%es - xor %ax, %ax inc %ax # protected mode (PE) bit lmsw %ax # into protected mode - jmp flush_instr -flush_instr: - ljmpl $__KERNEL32_CS, $0x00100000 - # jump to startup_32 in arch/x86_64/kernel/head.S + # flaush prefetch and jump to startup_32 in arch/x86_64/kernel/head.S + ljmpl $__KERNEL32_CS, $(startup_32-__START_KERNEL_map) + # Careful these need to be in the same 64K segment as the above; idt_48: .word 0 # idt limit = 0 .word 0, 0 # idt base = 0L gdt_48: - .short 0x0800 # gdt limit = 2048, 256 GDT entries - .globl tramp_gdt_ptr -tramp_gdt_ptr: - .long 0 # gdt base = gdt (first SMP CPU) - # this is filled in by C because the 64bit - # linker doesn't support absolute 32bit - # relocations. - + .short __KERNEL32_CS + 7 # gdt limit + .long cpu_gdt_table-__START_KERNEL_map .globl trampoline_end trampoline_end: diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c --- a/arch/x86_64/kernel/traps.c 2005-03-30 16:58:47 -08:00 +++ b/arch/x86_64/kernel/traps.c 2005-03-30 16:58:47 -08:00 @@ -124,10 +124,10 @@ int k; for (k = 0; k < N_EXCEPTION_STACKS; k++) { struct tss_struct *tss = &per_cpu(init_tss, cpu); - unsigned long end = tss->ist[k] + EXCEPTION_STKSZ; + unsigned long start = tss->ist[k] - EXCEPTION_STKSZ; - if (stack >= tss->ist[k] && stack <= end) - return (unsigned long *)end; + if (stack >= start && stack < tss->ist[k]) + return (unsigned long *)tss->ist[k]; } return NULL; } @@ -348,7 +348,6 @@ die_owner = -1; bust_spinlocks(0); spin_unlock(&die_lock); - local_irq_enable(); /* make sure back scroll still works */ if (panic_on_oops) panic("Oops"); } @@ -617,15 +616,6 @@ mem_parity_error(reason, regs); if (reason & 0x40) io_check_error(reason, regs); - - /* - * Reassert NMI in case it became active meanwhile - * as it's edge-triggered. - */ - outb(0x8f, 0x70); - inb(0x71); /* dummy */ - outb(0x0f, 0x70); - inb(0x71); /* dummy */ } asmlinkage void do_int3(struct pt_regs * regs, long error_code) diff -Nru a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S --- a/arch/x86_64/kernel/vmlinux.lds.S 2005-03-30 16:58:47 -08:00 +++ b/arch/x86_64/kernel/vmlinux.lds.S 2005-03-30 16:58:47 -08:00 @@ -7,11 +7,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") OUTPUT_ARCH(i386:x86-64) -ENTRY(_start) +ENTRY(phys_startup_64) jiffies_64 = jiffies; SECTIONS { . = 0xffffffff80100000; + phys_startup_64 = startup_64 - LOAD_OFFSET; _text = .; /* Text and read-only data */ .text : { *(.text) diff -Nru a/arch/x86_64/kernel/vsyscall.S b/arch/x86_64/kernel/vsyscall.S --- a/arch/x86_64/kernel/vsyscall.S 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,169 +0,0 @@ -/* - * Code for the vsyscall page. This version uses the syscall instruction. - */ - -#include -#include - - .text - .globl __kernel_vsyscall - .type __kernel_vsyscall,@function -__kernel_vsyscall: -.LSTART_vsyscall: - push %ebp -.Lpush_ebp: - movl %ecx, %ebp - syscall - popl %ebp -.Lpop_ebp: - ret -.LEND_vsyscall: - .size __kernel_vsyscall,.-.LSTART_vsyscall - - .balign 32 - .globl __kernel_sigreturn - .type __kernel_sigreturn,@function -__kernel_sigreturn: -.LSTART_sigreturn: - popl %eax - movl $__NR_ia32_sigreturn, %eax - syscall -.LEND_sigreturn: - .size __kernel_sigreturn,.-.LSTART_sigreturn - - .balign 32 - .globl __kernel_rt_sigreturn - .type __kernel_rt_sigreturn,@function -__kernel_rt_sigreturn: -.LSTART_rt_sigreturn: - movl $__NR_ia32_rt_sigreturn, %eax - syscall -.LEND_rt_sigreturn: - .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn - - .section .eh_frame,"a",@progbits -.LSTARTFRAME: - .long .LENDCIE-.LSTARTCIE -.LSTARTCIE: - .long 0 /* CIE ID */ - .byte 1 /* Version number */ - .string "zR" /* NUL-terminated augmentation string */ - .uleb128 1 /* Code alignment factor */ - .sleb128 -4 /* Data alignment factor */ - .byte 8 /* Return address register column */ - .uleb128 1 /* Augmentation value length */ - .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ - .byte 0x0c /* DW_CFA_def_cfa */ - .uleb128 4 - .uleb128 4 - .byte 0x88 /* DW_CFA_offset, column 0x8 */ - .uleb128 1 - .align 4 -.LENDCIE: - - .long .LENDFDE1-.LSTARTFDE1 /* Length FDE */ -.LSTARTFDE1: - .long .LSTARTFDE1-.LSTARTFRAME /* CIE pointer */ - .long .LSTART_vsyscall-. /* PC-relative start address */ - .long .LEND_vsyscall-.LSTART_vsyscall - .uleb128 0 /* Augmentation length */ - /* What follows are the instructions for the table generation. - We have to record all changes of the stack pointer. */ - .byte 0x40 + .Lpush_ebp-.LSTART_vsyscall /* DW_CFA_advance_loc */ - .byte 0x0e /* DW_CFA_def_cfa_offset */ - .uleb128 8 - .byte 0x85, 0x02 /* DW_CFA_offset %ebp -8 */ - .byte 0x40 + .Lpop_ebp-.Lpush_ebp /* DW_CFA_advance_loc */ - .byte 0xc5 /* DW_CFA_restore %ebp */ - .byte 0x0e /* DW_CFA_def_cfa_offset */ - .uleb128 4 - .align 4 -.LENDFDE1: - - .long .LENDFDE2-.LSTARTFDE2 /* Length FDE */ -.LSTARTFDE2: - .long .LSTARTFDE2-.LSTARTFRAME /* CIE pointer */ - /* HACK: The dwarf2 unwind routines will subtract 1 from the - return address to get an address in the middle of the - presumed call instruction. Since we didn't get here via - a call, we need to include the nop before the real start - to make up for it. */ - .long .LSTART_sigreturn-1-. /* PC-relative start address */ - .long .LEND_sigreturn-.LSTART_sigreturn+1 - .uleb128 0 /* Augmentation length */ - /* What follows are the instructions for the table generation. - We record the locations of each register saved. This is - complicated by the fact that the "CFA" is always assumed to - be the value of the stack pointer in the caller. This means - that we must define the CFA of this body of code to be the - saved value of the stack pointer in the sigcontext. Which - also means that there is no fixed relation to the other - saved registers, which means that we must use DW_CFA_expression - to compute their addresses. It also means that when we - adjust the stack with the popl, we have to do it all over again. */ - -#define do_cfa_expr(offset) \ - .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ - .uleb128 1f-0f; /* length */ \ -0: .byte 0x74; /* DW_OP_breg4 */ \ - .sleb128 offset; /* offset */ \ - .byte 0x06; /* DW_OP_deref */ \ -1: - -#define do_expr(regno, offset) \ - .byte 0x10; /* DW_CFA_expression */ \ - .uleb128 regno; /* regno */ \ - .uleb128 1f-0f; /* length */ \ -0: .byte 0x74; /* DW_OP_breg4 */ \ - .sleb128 offset; /* offset */ \ -1: - - do_cfa_expr(IA32_SIGCONTEXT_esp+4) - do_expr(0, IA32_SIGCONTEXT_eax+4) - do_expr(1, IA32_SIGCONTEXT_ecx+4) - do_expr(2, IA32_SIGCONTEXT_edx+4) - do_expr(3, IA32_SIGCONTEXT_ebx+4) - do_expr(5, IA32_SIGCONTEXT_ebp+4) - do_expr(6, IA32_SIGCONTEXT_esi+4) - do_expr(7, IA32_SIGCONTEXT_edi+4) - do_expr(8, IA32_SIGCONTEXT_eip+4) - - .byte 0x42 /* DW_CFA_advance_loc 2 -- nop; popl eax. */ - - do_cfa_expr(IA32_SIGCONTEXT_esp) - do_expr(0, IA32_SIGCONTEXT_eax) - do_expr(1, IA32_SIGCONTEXT_ecx) - do_expr(2, IA32_SIGCONTEXT_edx) - do_expr(3, IA32_SIGCONTEXT_ebx) - do_expr(5, IA32_SIGCONTEXT_ebp) - do_expr(6, IA32_SIGCONTEXT_esi) - do_expr(7, IA32_SIGCONTEXT_edi) - do_expr(8, IA32_SIGCONTEXT_eip) - - .align 4 -.LENDFDE2: - - .long .LENDFDE3-.LSTARTFDE3 /* Length FDE */ -.LSTARTFDE3: - .long .LSTARTFDE3-.LSTARTFRAME /* CIE pointer */ - /* HACK: See above wrt unwind library assumptions. */ - .long .LSTART_rt_sigreturn-1-. /* PC-relative start address */ - .long .LEND_rt_sigreturn-.LSTART_rt_sigreturn+1 - .uleb128 0 /* Augmentation */ - /* What follows are the instructions for the table generation. - We record the locations of each register saved. This is - slightly less complicated than the above, since we don't - modify the stack pointer in the process. */ - - do_cfa_expr(IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_esp) - do_expr(0, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_eax) - do_expr(1, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_ecx) - do_expr(2, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_edx) - do_expr(3, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_ebx) - do_expr(5, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_ebp) - do_expr(6, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_esi) - do_expr(7, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_edi) - do_expr(8, IA32_RT_SIGFRAME_sigcontext-4 + IA32_SIGCONTEXT_eip) - - .align 4 -.LENDFDE3: diff -Nru a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c --- a/arch/x86_64/kernel/vsyscall.c 2005-03-30 16:58:49 -08:00 +++ b/arch/x86_64/kernel/vsyscall.c 2005-03-30 16:58:49 -08:00 @@ -9,30 +9,14 @@ * a different vsyscall implementation for Linux/IA32 and for the name. * * vsyscall 1 is located at -10Mbyte, vsyscall 2 is located - * at virtual address -10Mbyte+1024bytes etc... There are at max 8192 + * at virtual address -10Mbyte+1024bytes etc... There are at max 4 * vsyscalls. One vsyscall can reserve more than 1 slot to avoid - * jumping out of line if necessary. + * jumping out of line if necessary. We cannot add more with this + * mechanism because older kernels won't return -ENOSYS. + * If we want more than four we need a vDSO. * - * Note: the concept clashes with user mode linux. If you use UML just - * set the kernel.vsyscall sysctl to 0. - */ - -/* - * TODO 2001-03-20: - * - * 1) make page fault handler detect faults on page1-page-last of the vsyscall - * virtual space, and make it increase %rip and write -ENOSYS in %rax (so - * we'll be able to upgrade to a new glibc without upgrading kernel after - * we add more vsyscalls. - * 2) Possibly we need a fixmap table for the vsyscalls too if we want - * to avoid SIGSEGV and we want to return -EFAULT from the vsyscalls as well. - * Can we segfault inside a "syscall"? We can fix this anytime and those fixes - * won't be visible for userspace. Not fixing this is a noop for correct programs, - * broken programs will segfault and there's no security risk until we choose to - * fix it. - * - * These are not urgent things that we need to address only before shipping the first - * production binary kernels. + * Note: the concept clashes with user mode linux. If you use UML and + * want per guest time just set the kernel.vsyscall64 sysctl to 0. */ #include @@ -41,6 +25,7 @@ #include #include #include +#include #include #include @@ -62,8 +47,7 @@ time_t __sec; __sec = tv->tv_usec / 1000000; - if (__sec) - { + if (__sec) { tv->tv_usec %= 1000000; tv->tv_sec += __sec; } @@ -84,10 +68,11 @@ if (__vxtime.mode == VXTIME_TSC) { sync_core(); rdtscll(t); - if (t < __vxtime.last_tsc) t = __vxtime.last_tsc; + if (t < __vxtime.last_tsc) + t = __vxtime.last_tsc; usec += ((t - __vxtime.last_tsc) * __vxtime.tsc_quot) >> 32; - /* See comment in x86_64 do_gettimeofday. */ + /* See comment in x86_64 do_gettimeofday. */ } else { usec += ((readl((void *)fix_to_virt(VSYSCALL_HPET) + 0xf0) - __vxtime.last) * __vxtime.quot) >> 32; @@ -101,14 +86,13 @@ /* RED-PEN may want to readd seq locking, but then the variable should be write-once. */ static force_inline void do_get_tz(struct timezone * tz) { - *tz = __sys_tz; + *tz = __sys_tz; } - static force_inline int gettimeofday(struct timeval *tv, struct timezone *tz) { int ret; - asm volatile("syscall" + asm volatile("vsysc2: syscall" : "=a" (ret) : "0" (__NR_gettimeofday),"D" (tv),"S" (tz) : __syscall_clobber ); return ret; @@ -117,7 +101,7 @@ static force_inline long time_syscall(long *t) { long secs; - asm volatile("syscall" + asm volatile("vsysc1: syscall" : "=a" (secs) : "0" (__NR_time),"D" (t) : __syscall_clobber); return secs; @@ -126,7 +110,7 @@ static int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) { if (unlikely(!__sysctl_vsyscall)) - return gettimeofday(tv,tz); + return gettimeofday(tv,tz); if (tv) do_vgettimeofday(tv); if (tz) @@ -153,9 +137,71 @@ static long __vsyscall(3) venosys_1(void) { return -ENOSYS; +} + +#ifdef CONFIG_SYSCTL + +#define SYSCALL 0x050f +#define NOP2 0x9090 + +/* + * NOP out syscall in vsyscall page when not needed. + */ +static int vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + extern u16 vsysc1, vsysc2; + u16 *map1, *map2; + int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); + if (!write) + return ret; + /* gcc has some trouble with __va(__pa()), so just do it this + way. */ + map1 = ioremap(__pa_symbol(&vsysc1), 2); + if (!map1) + return -ENOMEM; + map2 = ioremap(__pa_symbol(&vsysc2), 2); + if (!map2) { + ret = -ENOMEM; + goto out; + } + if (!sysctl_vsyscall) { + *map1 = SYSCALL; + *map2 = SYSCALL; + } else { + *map1 = NOP2; + *map2 = NOP2; + } + iounmap(map2); +out: + iounmap(map1); + return ret; +} +static int vsyscall_sysctl_nostrat(ctl_table *t, int __user *name, int nlen, + void __user *oldval, size_t __user *oldlenp, + void __user *newval, size_t newlen, + void **context) +{ + return -ENOSYS; } +static ctl_table kernel_table2[] = { + { .ctl_name = 99, .procname = "vsyscall64", + .data = &sysctl_vsyscall, .maxlen = sizeof(int), .mode = 0644, + .strategy = vsyscall_sysctl_nostrat, + .proc_handler = vsyscall_sysctl_change }, + { 0, } +}; + +static ctl_table kernel_root_table2[] = { + { .ctl_name = CTL_KERN, .procname = "kernel", .mode = 0555, + .child = kernel_table2 }, + { 0 }, +}; + +#endif + static void __init map_vsyscall(void) { extern char __vsyscall_0; @@ -166,13 +212,13 @@ static int __init vsyscall_init(void) { - BUG_ON(((unsigned long) &vgettimeofday != - VSYSCALL_ADDR(__NR_vgettimeofday))); + BUG_ON(((unsigned long) &vgettimeofday != + VSYSCALL_ADDR(__NR_vgettimeofday))); BUG_ON((unsigned long) &vtime != VSYSCALL_ADDR(__NR_vtime)); BUG_ON((VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE))); map_vsyscall(); - sysctl_vsyscall = 1; - + sysctl_vsyscall = 1; + register_sysctl_table(kernel_root_table2, 0); return 0; } diff -Nru a/arch/x86_64/lib/bitops.c b/arch/x86_64/lib/bitops.c --- a/arch/x86_64/lib/bitops.c 2005-03-30 16:58:47 -08:00 +++ b/arch/x86_64/lib/bitops.c 2005-03-30 16:58:47 -08:00 @@ -1,4 +1,3 @@ -#include #include #undef find_first_zero_bit @@ -133,6 +132,8 @@ res = __find_first_bit (p, size - 64 * (p - addr)); return (offset + set + res); } + +#include EXPORT_SYMBOL(find_next_bit); EXPORT_SYMBOL(find_first_bit); diff -Nru a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c --- a/arch/x86_64/lib/delay.c 2005-03-30 16:58:51 -08:00 +++ b/arch/x86_64/lib/delay.c 2005-03-30 16:58:51 -08:00 @@ -21,7 +21,7 @@ void __delay(unsigned long loops) { - unsigned long bclock, now; + unsigned bclock, now; rdtscl(bclock); do diff -Nru a/arch/x86_64/lib/getuser.S b/arch/x86_64/lib/getuser.S --- a/arch/x86_64/lib/getuser.S 2005-03-30 16:58:47 -08:00 +++ b/arch/x86_64/lib/getuser.S 2005-03-30 16:58:47 -08:00 @@ -2,6 +2,7 @@ * __get_user functions. * * (C) Copyright 1998 Linus Torvalds + * (C) Copyright 2005 Andi Kleen * * These functions have a non-standard call interface * to make them more efficient, especially as they @@ -12,12 +13,14 @@ /* * __get_user_X * - * Inputs: %rax contains the address + * Inputs: %rcx contains the address. + * The register is modified, but all changes are undone + * before returning because the C code doesn't know about it. * * Outputs: %rax is error code (0 or -EFAULT) * %rdx contains zero-extended value * - * %rbx is destroyed. + * %r8 is destroyed. * * These functions should not modify any other registers, * as they get called from within inline assembly. @@ -33,52 +36,60 @@ .p2align 4 .globl __get_user_1 __get_user_1: - GET_THREAD_INFO(%rbx) - cmpq threadinfo_addr_limit(%rbx),%rax + GET_THREAD_INFO(%r8) + cmpq threadinfo_addr_limit(%r8),%rcx jae bad_get_user -1: movzb (%rax),%edx - xorq %rax,%rax +1: movzb (%rcx),%edx + xorl %eax,%eax ret .p2align 4 .globl __get_user_2 __get_user_2: - GET_THREAD_INFO(%rbx) - addq $1,%rax - jc bad_get_user - cmpq threadinfo_addr_limit(%rbx),%rax - jae bad_get_user -2: movzwl -1(%rax),%edx - xorq %rax,%rax + GET_THREAD_INFO(%r8) + addq $1,%rcx + jc 20f + cmpq threadinfo_addr_limit(%r8),%rcx + jae 20f + decq %rcx +2: movzwl (%rcx),%edx + xorl %eax,%eax ret +20: decq %rcx + jmp bad_get_user .p2align 4 .globl __get_user_4 __get_user_4: - GET_THREAD_INFO(%rbx) - addq $3,%rax - jc bad_get_user - cmpq threadinfo_addr_limit(%rbx),%rax - jae bad_get_user -3: movl -3(%rax),%edx - xorq %rax,%rax + GET_THREAD_INFO(%r8) + addq $3,%rcx + jc 30f + cmpq threadinfo_addr_limit(%r8),%rcx + jae 30f + subq $3,%rcx +3: movl (%rcx),%edx + xorl %eax,%eax ret +30: subq $3,%rcx + jmp bad_get_user .p2align 4 .globl __get_user_8 __get_user_8: - GET_THREAD_INFO(%rbx) - addq $7,%rax + GET_THREAD_INFO(%r8) + addq $7,%rcx jc bad_get_user - cmpq threadinfo_addr_limit(%rbx),%rax + cmpq threadinfo_addr_limit(%r8),%rcx jae bad_get_user -4: movq -7(%rax),%rdx - xorq %rax,%rax + subq $7,%rcx +4: movq (%rcx),%rdx + xorl %eax,%eax ret +40: subq $7,%rcx + jmp bad_get_user -ENTRY(bad_get_user) bad_get_user: - xorq %rdx,%rdx + xorl %edx,%edx movq $(-EFAULT),%rax ret diff -Nru a/arch/x86_64/lib/putuser.S b/arch/x86_64/lib/putuser.S --- a/arch/x86_64/lib/putuser.S 2005-03-30 16:58:48 -08:00 +++ b/arch/x86_64/lib/putuser.S 2005-03-30 16:58:51 -08:00 @@ -2,80 +2,81 @@ * __put_user functions. * * (C) Copyright 1998 Linus Torvalds + * (C) Copyright 2005 Andi Kleen * * These functions have a non-standard call interface - * to make them more efficient. + * to make them more efficient, especially as they + * return an error value in addition to the "real" + * return value. */ /* * __put_user_X * - * Inputs: %rax contains the address - * %rdx contains the value + * Inputs: %rcx contains the address + * %rdx contains new value * * Outputs: %rax is error code (0 or -EFAULT) - * %rbx is corrupted (will contain "current_task"). + * + * %r8 is destroyed. * * These functions should not modify any other registers, * as they get called from within inline assembly. */ -/* FIXME: putuser.S should be really merged with getuser.S, and preprocessor should be used to keep code duplication lower */ - #include #include #include #include #include -.text -.p2align + .text + .p2align 4 .globl __put_user_1 __put_user_1: - GET_THREAD_INFO(%rbx) - cmpq threadinfo_addr_limit(%rbx),%rax + GET_THREAD_INFO(%r8) + cmpq threadinfo_addr_limit(%r8),%rcx jae bad_put_user -1: movb %dl,(%rax) - xorq %rax,%rax +1: movb %dl,(%rcx) + xorl %eax,%eax ret -.p2align + .p2align 4 .globl __put_user_2 __put_user_2: - GET_THREAD_INFO(%rbx) - addq $1,%rax - jc bad_put_user - cmpq threadinfo_addr_limit(%rbx),%rax - jae bad_put_user -2: movw %dx,-1(%rax) - xorq %rax,%rax + GET_THREAD_INFO(%r8) + addq $1,%rcx + jc bad_put_user + cmpq threadinfo_addr_limit(%r8),%rcx + jae bad_put_user +2: movw %dx,-1(%rcx) + xorl %eax,%eax ret -.p2align + .p2align 4 .globl __put_user_4 __put_user_4: - GET_THREAD_INFO(%rbx) - addq $3,%rax - jc bad_put_user - cmpq threadinfo_addr_limit(%rbx),%rax - jae bad_put_user -3: movl %edx,-3(%rax) - xorq %rax,%rax + GET_THREAD_INFO(%r8) + addq $3,%rcx + jc bad_put_user + cmpq threadinfo_addr_limit(%r8),%rcx + jae bad_put_user +3: movl %edx,-3(%rcx) + xorl %eax,%eax ret -.p2align + .p2align 4 .globl __put_user_8 __put_user_8: - GET_THREAD_INFO(%rbx) - addq $7,%rax - jc bad_put_user - cmpq threadinfo_addr_limit(%rbx),%rax - jae bad_put_user -4: movq %rdx,-7(%rax) - xorq %rax,%rax + GET_THREAD_INFO(%r8) + addq $7,%rcx + jc bad_put_user + cmpq threadinfo_addr_limit(%r8),%rcx + jae bad_put_user +4: movq %rdx,-7(%rcx) + xorl %eax,%eax ret -ENTRY(bad_put_user) bad_put_user: movq $(-EFAULT),%rax ret @@ -84,5 +85,5 @@ .quad 1b,bad_put_user .quad 2b,bad_put_user .quad 3b,bad_put_user - .quad 4b,bad_put_user + .quad 4b,bad_put_user .previous diff -Nru a/arch/x86_64/mm/ioremap.c b/arch/x86_64/mm/ioremap.c --- a/arch/x86_64/mm/ioremap.c 2005-03-30 16:58:50 -08:00 +++ b/arch/x86_64/mm/ioremap.c 2005-03-30 16:58:50 -08:00 @@ -18,6 +18,9 @@ #include #include +#define ISA_START_ADDRESS 0xa0000 +#define ISA_END_ADDRESS 0x100000 + static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, unsigned long phys_addr, unsigned long flags) { @@ -172,7 +175,7 @@ /* * Don't remap the low PCI/ISA area, it's always mapped.. */ - if (phys_addr >= 0xA0000 && last_addr < 0x100000) + if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS) return (__force void __iomem *)phys_to_virt(phys_addr); #ifndef CONFIG_DISCONTIGMEM @@ -252,6 +255,9 @@ if (addr <= high_memory) return; + if (addr >= phys_to_virt(ISA_START_ADDRESS) && + addr < phys_to_virt(ISA_END_ADDRESS)) + return; write_lock(&vmlist_lock); for (p = vmlist, pprev = &vmlist; p != NULL; pprev = &p->next, p = *pprev) diff -Nru a/arch/x86_64/pci/k8-bus.c b/arch/x86_64/pci/k8-bus.c --- a/arch/x86_64/pci/k8-bus.c 2005-03-30 16:58:49 -08:00 +++ b/arch/x86_64/pci/k8-bus.c 2005-03-30 16:58:49 -08:00 @@ -29,7 +29,7 @@ fill_mp_bus_to_cpumask(void) { struct pci_dev *nb_dev = NULL; - int i, j; + int i, j, printed; u32 ldtbus, nid; static int lbnr[3] = { LDT_BUS_NUMBER_REGISTER_0, @@ -60,11 +60,15 @@ } /* quick sanity check */ + printed = 0; for (i = 0; i < 256; i++) { if (cpus_empty(pci_bus_to_cpumask[i])) { - printk(KERN_ERR - "k8-bus.c: bus %i has empty cpu mask\n", i); pci_bus_to_cpumask[i] = CPU_MASK_ALL; + if (printed) + continue; + printk(KERN_ERR + "k8-bus.c: some busses have empty cpu mask\n"); + printed = 1; } } diff -Nru a/crypto/blowfish.c b/crypto/blowfish.c --- a/crypto/blowfish.c 2005-03-30 16:58:47 -08:00 +++ b/crypto/blowfish.c 2005-03-30 16:58:47 -08:00 @@ -349,8 +349,8 @@ static void bf_encrypt(void *ctx, u8 *dst, const u8 *src) { - const u32 *in_blk = (const u32 *)src; - u32 *const out_blk = (u32 *)dst; + const __be32 *in_blk = (const __be32 *)src; + __be32 *const out_blk = (__be32 *)dst; u32 in32[2], out32[2]; in32[0] = be32_to_cpu(in_blk[0]); @@ -362,8 +362,8 @@ static void bf_decrypt(void *ctx, u8 *dst, const u8 *src) { - const u32 *in_blk = (const u32 *)src; - u32 *const out_blk = (u32 *)dst; + const __be32 *in_blk = (const __be32 *)src; + __be32 *const out_blk = (__be32 *)dst; const u32 *P = ((struct bf_ctx *)ctx)->p; const u32 *S = ((struct bf_ctx *)ctx)->s; u32 yl = be32_to_cpu(in_blk[0]); diff -Nru a/crypto/cipher.c b/crypto/cipher.c --- a/crypto/cipher.c 2005-03-30 16:58:48 -08:00 +++ b/crypto/cipher.c 2005-03-30 16:58:48 -08:00 @@ -11,18 +11,20 @@ * any later version. * */ +#include #include #include #include #include #include +#include #include #include "internal.h" #include "scatterwalk.h" typedef void (cryptfn_t)(void *, u8 *, const u8 *); typedef void (procfn_t)(struct crypto_tfm *, u8 *, - u8*, cryptfn_t, int enc, void *, int); + u8*, cryptfn_t, void *); static inline void xor_64(u8 *a, const u8 *b) { @@ -37,7 +39,47 @@ ((u32 *)a)[2] ^= ((u32 *)b)[2]; ((u32 *)a)[3] ^= ((u32 *)b)[3]; } + +static inline void *prepare_src(struct scatter_walk *walk, int bsize, + void *tmp, int in_place) +{ + void *src = walk->data; + int n = bsize; + + if (unlikely(scatterwalk_across_pages(walk, bsize))) { + src = tmp; + n = scatterwalk_copychunks(src, walk, bsize, 0); + } + scatterwalk_advance(walk, n); + return src; +} + +static inline void *prepare_dst(struct scatter_walk *walk, int bsize, + void *tmp, int in_place) +{ + void *dst = walk->data; + + if (unlikely(scatterwalk_across_pages(walk, bsize)) || in_place) + dst = tmp; + return dst; +} +static inline void complete_src(struct scatter_walk *walk, int bsize, + void *src, int in_place) +{ +} + +static inline void complete_dst(struct scatter_walk *walk, int bsize, + void *dst, int in_place) +{ + int n = bsize; + + if (unlikely(scatterwalk_across_pages(walk, bsize))) + n = scatterwalk_copychunks(dst, walk, bsize, 1); + else if (in_place) + memcpy(walk->data, dst, bsize); + scatterwalk_advance(walk, n); +} /* * Generic encrypt/decrypt wrapper for ciphers, handles operations across @@ -48,7 +90,7 @@ struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, cryptfn_t crfn, - procfn_t prfn, int enc, void *info) + procfn_t prfn, void *info) { struct scatter_walk walk_in, walk_out; const unsigned int bsize = crypto_tfm_alg_blocksize(tfm); @@ -72,20 +114,26 @@ scatterwalk_map(&walk_in, 0); scatterwalk_map(&walk_out, 1); - src_p = scatterwalk_whichbuf(&walk_in, bsize, tmp_src); - dst_p = scatterwalk_whichbuf(&walk_out, bsize, tmp_dst); - in_place = scatterwalk_samebuf(&walk_in, &walk_out, - src_p, dst_p); - nbytes -= bsize; + in_place = scatterwalk_samebuf(&walk_in, &walk_out); - scatterwalk_copychunks(src_p, &walk_in, bsize, 0); - - prfn(tfm, dst_p, src_p, crfn, enc, info, in_place); + do { + src_p = prepare_src(&walk_in, bsize, tmp_src, + in_place); + dst_p = prepare_dst(&walk_out, bsize, tmp_dst, + in_place); + + prfn(tfm, dst_p, src_p, crfn, info); + + complete_src(&walk_in, bsize, src_p, in_place); + complete_dst(&walk_out, bsize, dst_p, in_place); + + nbytes -= bsize; + } while (nbytes && + !scatterwalk_across_pages(&walk_in, bsize) && + !scatterwalk_across_pages(&walk_out, bsize)); scatterwalk_done(&walk_in, 0, nbytes); - - scatterwalk_copychunks(dst_p, &walk_out, bsize, 1); scatterwalk_done(&walk_out, 1, nbytes); if (!nbytes) @@ -95,33 +143,28 @@ } } -static void cbc_process(struct crypto_tfm *tfm, u8 *dst, u8 *src, - cryptfn_t fn, int enc, void *info, int in_place) +static void cbc_process_encrypt(struct crypto_tfm *tfm, u8 *dst, u8 *src, + cryptfn_t fn, void *info) { u8 *iv = info; - - /* Null encryption */ - if (!iv) - return; - - if (enc) { - tfm->crt_u.cipher.cit_xor_block(iv, src); - fn(crypto_tfm_ctx(tfm), dst, iv); - memcpy(iv, dst, crypto_tfm_alg_blocksize(tfm)); - } else { - u8 stack[in_place ? crypto_tfm_alg_blocksize(tfm) : 0]; - u8 *buf = in_place ? stack : dst; - - fn(crypto_tfm_ctx(tfm), buf, src); - tfm->crt_u.cipher.cit_xor_block(buf, iv); - memcpy(iv, src, crypto_tfm_alg_blocksize(tfm)); - if (buf != dst) - memcpy(dst, buf, crypto_tfm_alg_blocksize(tfm)); - } + + tfm->crt_u.cipher.cit_xor_block(iv, src); + fn(crypto_tfm_ctx(tfm), dst, iv); + memcpy(iv, dst, crypto_tfm_alg_blocksize(tfm)); +} + +static void cbc_process_decrypt(struct crypto_tfm *tfm, u8 *dst, u8 *src, + cryptfn_t fn, void *info) +{ + u8 *iv = info; + + fn(crypto_tfm_ctx(tfm), dst, src); + tfm->crt_u.cipher.cit_xor_block(dst, iv); + memcpy(iv, src, crypto_tfm_alg_blocksize(tfm)); } static void ecb_process(struct crypto_tfm *tfm, u8 *dst, u8 *src, - cryptfn_t fn, int enc, void *info, int in_place) + cryptfn_t fn, void *info) { fn(crypto_tfm_ctx(tfm), dst, src); } @@ -144,7 +187,7 @@ { return crypt(tfm, dst, src, nbytes, tfm->__crt_alg->cra_cipher.cia_encrypt, - ecb_process, 1, NULL); + ecb_process, NULL); } static int ecb_decrypt(struct crypto_tfm *tfm, @@ -154,7 +197,7 @@ { return crypt(tfm, dst, src, nbytes, tfm->__crt_alg->cra_cipher.cia_decrypt, - ecb_process, 1, NULL); + ecb_process, NULL); } static int cbc_encrypt(struct crypto_tfm *tfm, @@ -164,7 +207,7 @@ { return crypt(tfm, dst, src, nbytes, tfm->__crt_alg->cra_cipher.cia_encrypt, - cbc_process, 1, tfm->crt_cipher.cit_iv); + cbc_process_encrypt, tfm->crt_cipher.cit_iv); } static int cbc_encrypt_iv(struct crypto_tfm *tfm, @@ -174,7 +217,7 @@ { return crypt(tfm, dst, src, nbytes, tfm->__crt_alg->cra_cipher.cia_encrypt, - cbc_process, 1, iv); + cbc_process_encrypt, iv); } static int cbc_decrypt(struct crypto_tfm *tfm, @@ -184,7 +227,7 @@ { return crypt(tfm, dst, src, nbytes, tfm->__crt_alg->cra_cipher.cia_decrypt, - cbc_process, 0, tfm->crt_cipher.cit_iv); + cbc_process_decrypt, tfm->crt_cipher.cit_iv); } static int cbc_decrypt_iv(struct crypto_tfm *tfm, @@ -194,7 +237,7 @@ { return crypt(tfm, dst, src, nbytes, tfm->__crt_alg->cra_cipher.cia_decrypt, - cbc_process, 0, iv); + cbc_process_decrypt, iv); } static int nocrypt(struct crypto_tfm *tfm, diff -Nru a/crypto/scatterwalk.c b/crypto/scatterwalk.c --- a/crypto/scatterwalk.c 2005-03-30 16:58:49 -08:00 +++ b/crypto/scatterwalk.c 2005-03-30 16:58:49 -08:00 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "internal.h" #include "scatterwalk.h" @@ -28,16 +29,6 @@ KM_SOFTIRQ1, }; -void *scatterwalk_whichbuf(struct scatter_walk *walk, unsigned int nbytes, void *scratch) -{ - if (nbytes <= walk->len_this_page && - (((unsigned long)walk->data) & (PAGE_CACHE_SIZE - 1)) + nbytes <= - PAGE_CACHE_SIZE) - return walk->data; - else - return scratch; -} - static void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) { if (out) @@ -55,6 +46,8 @@ walk->page = sg->page; walk->len_this_segment = sg->length; + BUG_ON(!sg->length); + rest_of_page = PAGE_CACHE_SIZE - (sg->offset & (PAGE_CACHE_SIZE - 1)); walk->len_this_page = min(sg->length, rest_of_page); walk->offset = sg->offset; @@ -65,13 +58,17 @@ walk->data = crypto_kmap(walk->page, out) + walk->offset; } -static void scatterwalk_pagedone(struct scatter_walk *walk, int out, - unsigned int more) +static inline void scatterwalk_unmap(struct scatter_walk *walk, int out) { /* walk->data may be pointing the first byte of the next page; however, we know we transfered at least one byte. So, walk->data - 1 will be a virtual address in the mapped page. */ + crypto_kunmap(walk->data - 1, out); +} +static void scatterwalk_pagedone(struct scatter_walk *walk, int out, + unsigned int more) +{ if (out) flush_dcache_page(walk->page); @@ -91,7 +88,7 @@ void scatterwalk_done(struct scatter_walk *walk, int out, int more) { - crypto_kunmap(walk->data, out); + scatterwalk_unmap(walk, out); if (walk->len_this_page == 0 || !more) scatterwalk_pagedone(walk, out, more); } @@ -103,22 +100,16 @@ int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out) { - if (buf != walk->data) { - while (nbytes > walk->len_this_page) { - memcpy_dir(buf, walk->data, walk->len_this_page, out); - buf += walk->len_this_page; - nbytes -= walk->len_this_page; - - crypto_kunmap(walk->data, out); - scatterwalk_pagedone(walk, out, 1); - scatterwalk_map(walk, out); - } - - memcpy_dir(buf, walk->data, nbytes, out); - } + do { + memcpy_dir(buf, walk->data, walk->len_this_page, out); + buf += walk->len_this_page; + nbytes -= walk->len_this_page; + + scatterwalk_unmap(walk, out); + scatterwalk_pagedone(walk, out, 1); + scatterwalk_map(walk, out); + } while (nbytes > walk->len_this_page); - walk->offset += nbytes; - walk->len_this_page -= nbytes; - walk->len_this_segment -= nbytes; - return 0; + memcpy_dir(buf, walk->data, nbytes, out); + return nbytes; } diff -Nru a/crypto/scatterwalk.h b/crypto/scatterwalk.h --- a/crypto/scatterwalk.h 2005-03-30 16:58:50 -08:00 +++ b/crypto/scatterwalk.h 2005-03-30 16:58:50 -08:00 @@ -34,15 +34,27 @@ } static inline int scatterwalk_samebuf(struct scatter_walk *walk_in, - struct scatter_walk *walk_out, - void *src_p, void *dst_p) + struct scatter_walk *walk_out) { return walk_in->page == walk_out->page && - walk_in->offset == walk_out->offset && - walk_in->data == src_p && walk_out->data == dst_p; + walk_in->offset == walk_out->offset; +} + +static inline int scatterwalk_across_pages(struct scatter_walk *walk, + unsigned int nbytes) +{ + return nbytes > walk->len_this_page; +} + +static inline void scatterwalk_advance(struct scatter_walk *walk, + unsigned int nbytes) +{ + walk->data += nbytes; + walk->offset += nbytes; + walk->len_this_page -= nbytes; + walk->len_this_segment -= nbytes; } -void *scatterwalk_whichbuf(struct scatter_walk *walk, unsigned int nbytes, void *scratch); void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg); int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out); void scatterwalk_map(struct scatter_walk *walk, int out); diff -Nru a/crypto/sha256.c b/crypto/sha256.c --- a/crypto/sha256.c 2005-03-30 16:58:48 -08:00 +++ b/crypto/sha256.c 2005-03-30 16:58:48 -08:00 @@ -58,7 +58,7 @@ static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - W[I] = __be32_to_cpu( ((u32*)(input))[I] ); + W[I] = __be32_to_cpu( ((__be32*)(input))[I] ); } static inline void BLEND_OP(int I, u32 *W) diff -Nru a/crypto/sha512.c b/crypto/sha512.c --- a/crypto/sha512.c 2005-03-30 16:58:50 -08:00 +++ b/crypto/sha512.c 2005-03-30 16:58:50 -08:00 @@ -105,7 +105,7 @@ static inline void LOAD_OP(int I, u64 *W, const u8 *input) { - W[I] = __be64_to_cpu( ((u64*)(input))[I] ); + W[I] = __be64_to_cpu( ((__be64*)(input))[I] ); } static inline void BLEND_OP(int I, u64 *W) diff -Nru a/crypto/tea.c b/crypto/tea.c --- a/crypto/tea.c 2005-03-30 16:58:50 -08:00 +++ b/crypto/tea.c 2005-03-30 16:58:50 -08:00 @@ -31,8 +31,8 @@ #define XTEA_ROUNDS 32 #define XTEA_DELTA 0x9e3779b9 -#define u32_in(x) le32_to_cpu(*(const u32 *)(x)) -#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from)) +#define u32_in(x) le32_to_cpu(*(const __le32 *)(x)) +#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from)) struct tea_ctx { u32 KEY[4]; diff -Nru a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c --- a/drivers/acpi/sleep/proc.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/acpi/sleep/proc.c 2005-03-30 16:58:49 -08:00 @@ -84,10 +84,11 @@ u32 sec, min, hr; u32 day, mo, yr; unsigned char rtc_control = 0; + unsigned long flags; ACPI_FUNCTION_TRACE("acpi_system_alarm_seq_show"); - spin_lock(&rtc_lock); + spin_lock_irqsave(&rtc_lock, flags); sec = CMOS_READ(RTC_SECONDS_ALARM); min = CMOS_READ(RTC_MINUTES_ALARM); @@ -109,7 +110,7 @@ else yr = CMOS_READ(RTC_YEAR); - spin_unlock(&rtc_lock); + spin_unlock_irqrestore(&rtc_lock, flags); if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { BCD_TO_BIN(sec); diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c --- a/drivers/atm/ambassador.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/atm/ambassador.c 2005-03-30 16:58:47 -08:00 @@ -345,7 +345,7 @@ } static inline void wr_mem (const amb_dev * dev, size_t addr, u32 data) { - u32 be = cpu_to_be32 (data); + __be32 be = cpu_to_be32 (data); PRINTD (DBG_FLOW|DBG_REGS, "wr: %08zx <- %08x b[%08x]", addr, data, be); #ifdef AMB_MMIO dev->membase[addr / sizeof(u32)] = be; @@ -356,9 +356,9 @@ static inline u32 rd_mem (const amb_dev * dev, size_t addr) { #ifdef AMB_MMIO - u32 be = dev->membase[addr / sizeof(u32)]; + __be32 be = dev->membase[addr / sizeof(u32)]; #else - u32 be = inl (dev->iobase + addr); + __be32 be = inl (dev->iobase + addr); #endif u32 data = be32_to_cpu (be); PRINTD (DBG_FLOW|DBG_REGS, "rd: %08zx -> %08x b[%08x]", addr, data, be); @@ -2007,7 +2007,7 @@ /********** give adapter parameters **********/ -static inline u32 bus_addr(void * addr) { +static inline __be32 bus_addr(void * addr) { return cpu_to_be32 (virt_to_bus (addr)); } diff -Nru a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h --- a/drivers/atm/ambassador.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/atm/ambassador.h 2005-03-30 16:58:50 -08:00 @@ -342,21 +342,21 @@ #define MAX_TRANSFER_DATA 11 typedef struct { - u32 address; - u32 count; - u32 data[MAX_TRANSFER_DATA]; + __be32 address; + __be32 count; + __be32 data[MAX_TRANSFER_DATA]; } transfer_block; typedef struct { - u32 result; - u32 command; + __be32 result; + __be32 command; union { transfer_block transfer; - u32 version; - u32 start; - u32 data[MAX_COMMAND_DATA]; + __be32 version; + __be32 start; + __be32 data[MAX_COMMAND_DATA]; } payload; - u32 valid; + __be32 valid; } loader_block; /* command queue */ @@ -366,46 +366,46 @@ typedef struct { union { struct { - u32 vc; - u32 flags; - u32 rate; + __be32 vc; + __be32 flags; + __be32 rate; } open; struct { - u32 vc; - u32 rate; + __be32 vc; + __be32 rate; } modify_rate; struct { - u32 vc; - u32 flags; + __be32 vc; + __be32 flags; } modify_flags; struct { - u32 vc; + __be32 vc; } close; struct { - u32 lower4; - u32 upper2; + __be32 lower4; + __be32 upper2; } bia; struct { - u32 address; + __be32 address; } suni; struct { - u32 major; - u32 minor; + __be32 major; + __be32 minor; } version; struct { - u32 read; - u32 write; + __be32 read; + __be32 write; } speed; struct { - u32 flags; + __be32 flags; } flush; struct { - u32 address; - u32 data; + __be32 address; + __be32 data; } memory; - u32 par[3]; + __be32 par[3]; } args; - u32 request; + __be32 request; } command; /* transmit queues and associated structures */ @@ -417,8 +417,8 @@ /* TX is described by 1+ tx_frags followed by a tx_frag_end */ typedef struct { - u32 bytes; - u32 address; + __be32 bytes; + __be32 address; } tx_frag; /* apart from handle the fields here are for the adapter to play with @@ -452,9 +452,9 @@ /* this "points" to the sequence of fragments and trailer */ typedef struct { - u16 vc; - u16 tx_descr_length; - u32 tx_descr_addr; + __be16 vc; + __be16 tx_descr_length; + __be32 tx_descr_addr; } tx_in; /* handle is the handle from tx_in */ @@ -471,17 +471,17 @@ typedef struct { u32 handle; - u16 vc; - u16 lec_id; // unused - u16 status; - u16 length; + __be16 vc; + __be16 lec_id; // unused + __be16 status; + __be16 length; } rx_out; /* buffer supply structure */ typedef struct { u32 handle; - u32 host_address; + __be32 host_address; } rx_in; /* This first structure is the area in host memory where the adapter @@ -495,22 +495,22 @@ adapter. */ typedef struct { - u32 command_start; /* SRB commands completions */ - u32 command_end; /* SRB commands completions */ - u32 tx_start; - u32 tx_end; - u32 txcom_start; /* tx completions */ - u32 txcom_end; /* tx completions */ + __be32 command_start; /* SRB commands completions */ + __be32 command_end; /* SRB commands completions */ + __be32 tx_start; + __be32 tx_end; + __be32 txcom_start; /* tx completions */ + __be32 txcom_end; /* tx completions */ struct { - u32 buffer_start; - u32 buffer_end; + __be32 buffer_start; + __be32 buffer_end; u32 buffer_q_get; u32 buffer_q_end; u32 buffer_aptr; - u32 rx_start; /* rx completions */ - u32 rx_end; + __be32 rx_start; /* rx completions */ + __be32 rx_end; u32 rx_ptr; - u32 buffer_size; /* size of host buffer */ + __be32 buffer_size; /* size of host buffer */ } rec_struct[NUM_RX_POOLS]; #ifdef AMB_NEW_MICROCODE u16 init_flags; diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c --- a/drivers/atm/lanai.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/atm/lanai.c 2005-03-30 16:58:47 -08:00 @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff -Nru a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c --- a/drivers/atm/nicstar.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/atm/nicstar.c 2005-03-30 16:58:47 -08:00 @@ -350,7 +350,7 @@ kfree(card->rsq.org); kfree(card->tsq.org); free_irq(card->pcidev->irq, card); - iounmap((void *) card->membase); + iounmap(card->membase); kfree(card); } @@ -976,7 +976,7 @@ } if (error >= 4) { - iounmap((void *) card->membase); + iounmap(card->membase); } if (error >= 3) { diff -Nru a/drivers/atm/nicstar.h b/drivers/atm/nicstar.h --- a/drivers/atm/nicstar.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/atm/nicstar.h 2005-03-30 16:58:48 -08:00 @@ -739,8 +739,8 @@ typedef struct vc_map { - volatile int tx:1; /* TX vc? */ - volatile int rx:1; /* RX vc? */ + volatile unsigned int tx:1; /* TX vc? */ + volatile unsigned int rx:1; /* RX vc? */ struct atm_vcc *tx_vcc, *rx_vcc; struct sk_buff *rx_iov; /* RX iovector skb */ scq_info *scq; /* To keep track of the SCQ */ diff -Nru a/drivers/atm/zatm.c b/drivers/atm/zatm.c --- a/drivers/atm/zatm.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/atm/zatm.c 2005-03-30 16:58:47 -08:00 @@ -411,7 +411,7 @@ #if 0 printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]); #endif - size = error ? 0 : ntohs(((u16 *) skb->data)[cells* + size = error ? 0 : ntohs(((__be16 *) skb->data)[cells* ATM_CELL_PAYLOAD/sizeof(u16)-3]); EVENT("got skb 0x%lx, size %d\n",(unsigned long) skb,size); chan = (here[3] & uPD98401_AAL5_CHAN) >> diff -Nru a/drivers/base/dmapool.c b/drivers/base/dmapool.c --- a/drivers/base/dmapool.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/base/dmapool.c 2005-03-30 16:58:50 -08:00 @@ -156,7 +156,7 @@ static struct dma_page * -pool_alloc_page (struct dma_pool *pool, int mem_flags) +pool_alloc_page (struct dma_pool *pool, unsigned int __nocast mem_flags) { struct dma_page *page; int mapsize; diff -Nru a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c --- a/drivers/base/power/suspend.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/base/power/suspend.c 2005-03-30 16:58:50 -08:00 @@ -134,6 +134,8 @@ Done: return error; Error: + printk(KERN_ERR "Could not power down device %s: " + "error %d\n", kobject_name(&dev->kobj), error); dpm_power_up(); goto Done; } diff -Nru a/drivers/block/DAC960.c b/drivers/block/DAC960.c --- a/drivers/block/DAC960.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/block/DAC960.c 2005-03-30 16:58:49 -08:00 @@ -2700,10 +2700,8 @@ Controller->PCIDevice = PCI_Device; strcpy(Controller->FullModelName, "DAC960"); - if (pci_enable_device(PCI_Device)) { - kfree(Controller); + if (pci_enable_device(PCI_Device)) goto Failure; - } switch (Controller->HardwareType) { diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig --- a/drivers/block/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/drivers/block/Kconfig 2005-03-30 16:58:47 -08:00 @@ -6,7 +6,7 @@ config BLK_DEV_FD tristate "Normal floppy disk support" - depends on (!ARCH_S390 && !M68K && !IA64 && !USERMODE) || Q40 || (SUN3X && BROKEN) + depends on (!ARCH_S390 && !M68K && !IA64 && !UML) || Q40 || (SUN3X && BROKEN) ---help--- If you want to use the floppy disk drive(s) of your PC under Linux, say Y. Information about this driver, especially important for IBM @@ -210,7 +210,7 @@ config BLK_DEV_UBD bool "Virtual block device" - depends on USERMODE + depends on UML ---help--- The User-Mode Linux port includes a driver called UBD which will let you access arbitrary files on the host computer as block devices. @@ -243,7 +243,7 @@ config MMAPPER tristate "Example IO memory driver (BROKEN)" - depends on USERMODE && BROKEN + depends on UML && BROKEN ---help--- The User-Mode Linux port can provide support for IO Memory emulation with this option. This allows a host file to be @@ -455,7 +455,7 @@ #for instance. config LBD bool "Support for Large Block Devices" - depends on X86 || MIPS32 || PPC32 || ARCH_S390_31 || SUPERH || USERMODE + depends on X86 || MIPS32 || PPC32 || ARCH_S390_31 || SUPERH || UML help Say Y here if you want to attach large (bigger than 2TB) discs to your machine, or if you want to have a raid or loopback device @@ -463,7 +463,7 @@ config CDROM_PKTCDVD tristate "Packet writing on CD/DVD media" - depends on !USERMODE + depends on !UML help If you have a CDROM drive that supports packet writing, say Y to include preliminary support. It should work with any MMC/Mt Fuji diff -Nru a/drivers/block/cciss.c b/drivers/block/cciss.c --- a/drivers/block/cciss.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/block/cciss.c 2005-03-30 16:58:50 -08:00 @@ -304,7 +304,7 @@ if (copy_from_user(cmd, buffer, count)) return -EFAULT; cmd[count] = '\0'; len = strlen(cmd); // above 3 lines ensure safety - if (cmd[len-1] == '\n') + if (len && cmd[len-1] == '\n') cmd[--len] = '\0'; # ifdef CONFIG_CISS_SCSI_TAPE if (strcmp("engage scsi", cmd)==0) { diff -Nru a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c --- a/drivers/block/pktcdvd.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/block/pktcdvd.c 2005-03-30 16:58:47 -08:00 @@ -219,7 +219,7 @@ return 1; } -static void *pkt_rb_alloc(int gfp_mask, void *data) +static void *pkt_rb_alloc(unsigned int __nocast gfp_mask, void *data) { return kmalloc(sizeof(struct pkt_rb_node), gfp_mask); } @@ -1421,8 +1421,8 @@ char buffer[128]; int ret, size; - /* doesn't apply to DVD+RW */ - if (pd->mmc3_profile == 0x1a) + /* doesn't apply to DVD+RW or DVD-RAM */ + if ((pd->mmc3_profile == 0x1a) || (pd->mmc3_profile == 0x12)) return 0; memset(buffer, 0, sizeof(buffer)); @@ -1536,6 +1536,7 @@ break; case 0x1a: /* DVD+RW */ case 0x13: /* DVD-RW */ + case 0x12: /* DVD-RAM */ return 0; default: printk("pktcdvd: Wrong disc profile (%x)\n", pd->mmc3_profile); @@ -1601,6 +1602,9 @@ case 0x13: /* DVD-RW */ printk("pktcdvd: inserted media is DVD-RW\n"); break; + case 0x12: /* DVD-RAM */ + printk("pktcdvd: inserted media is DVD-RAM\n"); + break; default: printk("pktcdvd: inserted media is CD-R%s\n", di.erasable ? "W" : ""); break; @@ -1893,6 +1897,7 @@ switch (pd->mmc3_profile) { case 0x13: /* DVD-RW */ case 0x1a: /* DVD+RW */ + case 0x12: /* DVD-RAM */ DPRINTK("pktcdvd: write speed %ukB/s\n", write_speed); break; default: @@ -2054,7 +2059,7 @@ } -static void *psd_pool_alloc(int gfp_mask, void *data) +static void *psd_pool_alloc(unsigned int __nocast gfp_mask, void *data) { return kmalloc(sizeof(struct packet_stacked_data), gfp_mask); } @@ -2624,7 +2629,7 @@ .fops = &pkt_ctl_fops }; -static int pkt_init(void) +static int __init pkt_init(void) { int ret; @@ -2660,7 +2665,7 @@ return ret; } -static void pkt_exit(void) +static void __exit pkt_exit(void) { remove_proc_entry("pktcdvd", proc_root_driver); misc_deregister(&pkt_misc); diff -Nru a/drivers/block/ub.c b/drivers/block/ub.c --- a/drivers/block/ub.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/block/ub.c 2005-03-30 16:58:50 -08:00 @@ -300,6 +300,7 @@ /* */ +static void ub_cleanup(struct ub_dev *sc); static int ub_bd_rq_fn_1(struct ub_dev *sc, struct request *rq); static int ub_cmd_build_block(struct ub_dev *sc, struct ub_scsi_cmd *cmd, struct request *rq); @@ -478,24 +479,55 @@ static void ub_id_put(int id) { + unsigned long flags; if (id < 0 || id >= UB_MAX_HOSTS) { printk(KERN_ERR DRV_NAME ": bad host ID %d\n", id); return; } + + spin_lock_irqsave(&ub_lock, flags); if (ub_hostv[id] == 0) { + spin_unlock_irqrestore(&ub_lock, flags); printk(KERN_ERR DRV_NAME ": freeing free host ID %d\n", id); return; } ub_hostv[id] = 0; + spin_unlock_irqrestore(&ub_lock, flags); +} + +/* + * Downcount for deallocation. This rides on two assumptions: + * - once something is poisoned, its refcount cannot grow + * - opens cannot happen at this time (del_gendisk was done) + * If the above is true, we can drop the lock, which we need for + * blk_cleanup_queue(): the silly thing may attempt to sleep. + * [Actually, it never needs to sleep for us, but it calls might_sleep()] + */ +static void ub_put(struct ub_dev *sc) +{ + unsigned long flags; + + spin_lock_irqsave(&ub_lock, flags); + --sc->openc; + if (sc->openc == 0 && atomic_read(&sc->poison)) { + spin_unlock_irqrestore(&ub_lock, flags); + ub_cleanup(sc); + } else { + spin_unlock_irqrestore(&ub_lock, flags); + } } /* * Final cleanup and deallocation. - * This must be called with ub_lock taken. */ static void ub_cleanup(struct ub_dev *sc) { + request_queue_t *q; + + /* I don't think queue can be NULL. But... Stolen from sx8.c */ + if ((q = sc->disk->queue) != NULL) + blk_cleanup_queue(q); /* * If we zero disk->private_data BEFORE put_disk, we have to check @@ -1526,11 +1558,7 @@ return 0; err_open: - spin_lock_irqsave(&ub_lock, flags); - --sc->openc; - if (sc->openc == 0 && atomic_read(&sc->poison)) - ub_cleanup(sc); - spin_unlock_irqrestore(&ub_lock, flags); + ub_put(sc); return rc; } @@ -1540,15 +1568,8 @@ { struct gendisk *disk = inode->i_bdev->bd_disk; struct ub_dev *sc = disk->private_data; - unsigned long flags; - spin_lock_irqsave(&ub_lock, flags); - --sc->openc; - if (sc->openc == 0) - sc->first_open = 0; - if (sc->openc == 0 && atomic_read(&sc->poison)) - ub_cleanup(sc); - spin_unlock_irqrestore(&ub_lock, flags); + ub_put(sc); return 0; } @@ -2043,9 +2064,7 @@ usb_set_intfdata(intf, NULL); // usb_put_intf(sc->intf); usb_put_dev(sc->dev); - spin_lock_irq(&ub_lock); ub_id_put(sc->id); - spin_unlock_irq(&ub_lock); err_id: kfree(sc); err_core: @@ -2056,10 +2075,18 @@ { struct ub_dev *sc = usb_get_intfdata(intf); struct gendisk *disk = sc->disk; - request_queue_t *q = disk->queue; unsigned long flags; /* + * Prevent ub_bd_release from pulling the rug from under us. + * XXX This is starting to look like a kref. + * XXX Why not to take this ref at probe time? + */ + spin_lock_irqsave(&ub_lock, flags); + sc->openc++; + spin_unlock_irqrestore(&ub_lock, flags); + + /* * Fence stall clearnings, operations triggered by unlinkings and so on. * We do not attempt to unlink any URBs, because we do not trust the * unlink paths in HC drivers. Also, we get -84 upon disconnect anyway. @@ -2095,17 +2122,18 @@ spin_unlock_irqrestore(&sc->lock, flags); /* - * Unregister the upper layer, this waits for all commands to end. + * Unregister the upper layer. */ if (disk->flags & GENHD_FL_UP) del_gendisk(disk); - if (q) - blk_cleanup_queue(q); + /* + * I wish I could do: + * set_bit(QUEUE_FLAG_DEAD, &q->queue_flags); + * As it is, we rely on our internal poisoning and let + * the upper levels to spin furiously failing all the I/O. + */ /* - * We really expect blk_cleanup_queue() to wait, so no amount - * of paranoya is too much. - * * Taking a lock on a structure which is about to be freed * is very nonsensual. Here it is largely a way to do a debug freeze, * and a bracket which shows where the nonsensual code segment ends. @@ -2139,13 +2167,10 @@ usb_put_dev(sc->dev); sc->dev = NULL; - spin_lock_irqsave(&ub_lock, flags); - if (sc->openc == 0) - ub_cleanup(sc); - spin_unlock_irqrestore(&ub_lock, flags); + ub_put(sc); } -struct usb_driver ub_driver = { +static struct usb_driver ub_driver = { .owner = THIS_MODULE, .name = "ub", .probe = ub_probe, diff -Nru a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c --- a/drivers/bluetooth/hci_bcsp.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/bluetooth/hci_bcsp.c 2005-03-30 16:58:50 -08:00 @@ -28,7 +28,7 @@ * $Id: hci_bcsp.c,v 1.2 2002/09/26 05:05:14 maxk Exp $ */ -#define VERSION "0.1" +#define VERSION "0.2" #include #include @@ -62,6 +62,8 @@ #define BT_DMP( A... ) #endif +static int hciextn = 1; + /* ---- BCSP CRC calculation ---- */ /* Table for calculating CRC for polynomial 0x1021, LSB processed first, @@ -158,12 +160,13 @@ case HCI_SCODATA_PKT: skb_queue_tail(&bcsp->unrel, skb); break; - + default: BT_ERR("Unknown packet type"); kfree_skb(skb); break; } + return 0; } @@ -171,7 +174,7 @@ int len, int pkt_type) { struct sk_buff *nskb; - u8 hdr[4], chan; + u8 hdr[4], chan; int rel, i; #ifdef CONFIG_BT_HCIUART_BCSP_TXCRC @@ -204,6 +207,19 @@ return NULL; } + if (hciextn && chan == 5) { + struct hci_command_hdr *hdr = (struct hci_command_hdr *) data; + + if (hci_opcode_ogf(__le16_to_cpu(hdr->opcode)) == OGF_VENDOR_CMD) { + u8 desc = *(data + HCI_COMMAND_HDR_SIZE); + if ((desc & 0xf0) == 0xc0) { + data += HCI_COMMAND_HDR_SIZE + 1; + len -= HCI_COMMAND_HDR_SIZE + 1; + chan = desc & 0x0f; + } + } + } + /* Max len of packet: (original len +4(bcsp hdr) +2(crc))*2 (because bytes 0xc0 and 0xdb are escaped, worst case is when the packet is all made of 0xc0 and 0xdb :) ) @@ -226,19 +242,18 @@ BT_DBG("Sending packet with seqno %u", bcsp->msgq_txseq); bcsp->msgq_txseq = ++(bcsp->msgq_txseq) & 0x07; } -#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC +#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC hdr[0] |= 0x40; #endif - hdr[1] = (len << 4) & 0xFF; - hdr[1] |= chan; - hdr[2] = len >> 4; - hdr[3] = ~(hdr[0] + hdr[1] + hdr[2]); + hdr[1] = ((len << 4) & 0xff) | chan; + hdr[2] = len >> 4; + hdr[3] = ~(hdr[0] + hdr[1] + hdr[2]); /* Put BCSP header */ for (i = 0; i < 4; i++) { bcsp_slip_one_byte(nskb, hdr[i]); -#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC +#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC bcsp_crc_update(&bcsp_txmsg_crc, hdr[i]); #endif } @@ -246,7 +261,7 @@ /* Put payload */ for (i = 0; i < len; i++) { bcsp_slip_one_byte(nskb, data[i]); -#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC +#ifdef CONFIG_BT_HCIUART_BCSP_TXCRC bcsp_crc_update(&bcsp_txmsg_crc, data[i]); #endif } @@ -487,14 +502,30 @@ pass_up = 0; if (!pass_up) { - if ((bcsp->rx_skb->data[1] & 0x0f) != 0 && - (bcsp->rx_skb->data[1] & 0x0f) != 1) { - BT_ERR ("Packet for unknown channel (%u %s)", - bcsp->rx_skb->data[1] & 0x0f, - bcsp->rx_skb->data[0] & 0x80 ? - "reliable" : "unreliable"); - } - kfree_skb(bcsp->rx_skb); + struct hci_event_hdr hdr; + u8 desc = (bcsp->rx_skb->data[1] & 0x0f); + + if (desc != 0 && desc != 1) { + if (hciextn) { + desc |= 0xc0; + skb_pull(bcsp->rx_skb, 4); + memcpy(skb_push(bcsp->rx_skb, 1), &desc, 1); + + hdr.evt = 0xff; + hdr.plen = bcsp->rx_skb->len; + memcpy(skb_push(bcsp->rx_skb, HCI_EVENT_HDR_SIZE), &hdr, HCI_EVENT_HDR_SIZE); + bcsp->rx_skb->pkt_type = HCI_EVENT_PKT; + + hci_recv_frame(bcsp->rx_skb); + } else { + BT_ERR ("Packet for unknown channel (%u %s)", + bcsp->rx_skb->data[1] & 0x0f, + bcsp->rx_skb->data[0] & 0x80 ? + "reliable" : "unreliable"); + kfree_skb(bcsp->rx_skb); + } + } else + kfree_skb(bcsp->rx_skb); } else { /* Pull out BCSP hdr */ skb_pull(bcsp->rx_skb, 4); @@ -713,3 +744,6 @@ { return hci_uart_unregister_proto(&bcsp); } + +module_param(hciextn, bool, 0644); +MODULE_PARM_DESC(hciextn, "Convert HCI Extensions into BCSP packets"); diff -Nru a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c --- a/drivers/bluetooth/hci_vhci.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/bluetooth/hci_vhci.c 2005-03-30 16:58:50 -08:00 @@ -308,12 +308,13 @@ static int hci_vhci_chr_close(struct inode *inode, struct file *file) { struct hci_vhci_struct *hci_vhci = (struct hci_vhci_struct *) file->private_data; + struct hci_dev *hdev = hci_vhci->hdev; - if (hci_unregister_dev(hci_vhci->hdev) < 0) { - BT_ERR("Can't unregister HCI device %s", hci_vhci->hdev->name); + if (hci_unregister_dev(hdev) < 0) { + BT_ERR("Can't unregister HCI device %s", hdev->name); } - hci_free_dev(hci_vhci->hdev); + hci_free_dev(hdev); file->private_data = NULL; return 0; diff -Nru a/drivers/cdrom/Kconfig b/drivers/cdrom/Kconfig --- a/drivers/cdrom/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/cdrom/Kconfig 2005-03-30 16:58:50 -08:00 @@ -103,60 +103,14 @@ To compile this driver as a module, choose M here: the module will be called sbpcd. -config MCD - tristate "Mitsumi (standard) [no XA/Multisession] CDROM support" - depends on CD_NO_IDESCSI && BROKEN - ---help--- - This is the older of the two drivers for the older Mitsumi models - LU-005, FX-001 and FX-001D. This is not the right driver for the - FX-001DE and the triple or quad speed models (all these are - IDE/ATAPI models). Please also the file - . - - With the old LU-005 model, the whole drive chassis slides out for cd - insertion. The FX-xxx models use a motorized tray type mechanism. - Note that this driver does not support XA or MultiSession CDs - (PhotoCDs). There is a new driver (next question) which can do - this. If you want that one, say N here. - - If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM - file system support" below, because that's the file system used on - CD-ROMs. - - To compile this driver as a module, choose M here: the - module will be called mcd. - -config MCD_IRQ - int "MCD IRQ" - depends on MCD - default "11" - help - This allows you to specify the default value of the IRQ used by the - driver. This setting can be overridden by passing the "mcd=" - parameter to the kernel at boot time (or at module load time if you - said M to "Standard Mitsumi CD-ROM support"). - -config MCD_BASE - hex "MCD I/O base" - depends on MCD - default "300" - help - This allows you to specify the default value of the I/O base address - used by the driver. This setting can be overridden by passing the - "mcd=" parameter to the kernel at boot time (or at module load time - if you said M to "Standard Mitsumi CD-ROM support"). - config MCDX - tristate "Mitsumi [XA/MultiSession] CDROM support" + tristate "Mitsumi CDROM support" depends on CD_NO_IDESCSI ---help--- - Use this driver if you want to be able to read XA or MultiSession - CDs (PhotoCDs) as well as ordinary CDs with your Mitsumi LU-005, - FX-001 or FX-001D CD-ROM drive. In addition, this driver uses much - less kernel memory than the old one, if that is a concern. This - driver is able to support more than one drive, but each drive needs - a separate interface card. Please read the file - . + Use this driver if you want to be able to use your Mitsumi LU-005, + FX-001 or FX-001D CD-ROM drive. + + Please read the file . If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM file system support" below, because that's the file system used on diff -Nru a/drivers/cdrom/Makefile b/drivers/cdrom/Makefile --- a/drivers/cdrom/Makefile 2005-03-30 16:58:48 -08:00 +++ b/drivers/cdrom/Makefile 2005-03-30 16:58:48 -08:00 @@ -15,7 +15,6 @@ obj-$(CONFIG_CM206) += cm206.o cdrom.o obj-$(CONFIG_GSCD) += gscd.o obj-$(CONFIG_ISP16_CDI) += isp16.o -obj-$(CONFIG_MCD) += mcd.o cdrom.o obj-$(CONFIG_MCDX) += mcdx.o cdrom.o obj-$(CONFIG_OPTCD) += optcd.o obj-$(CONFIG_SBPCD) += sbpcd.o cdrom.o diff -Nru a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c --- a/drivers/cdrom/cdu31a.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/cdrom/cdu31a.c 2005-03-30 16:58:49 -08:00 @@ -148,10 +148,10 @@ * Ondrej Zary */ -#include +#define DEBUG 1 +#include #include - #include #include #include @@ -166,13 +166,13 @@ #include #include #include +#include #include #include #include #include -#include #include "cdu31a.h" #define MAJOR_NR CDU31A_CDROM_MAJOR @@ -180,10 +180,7 @@ #define CDU31A_MAX_CONSECUTIVE_ATTENTIONS 10 -#define DEBUG 1 - -/* Define the following if you have data corruption problems. */ -#undef SONY_POLL_EACH_BYTE +#define PFX "CDU31A: " /* ** Edit the following data to change interrupts, DMA channels, etc. @@ -267,14 +264,7 @@ static struct s_sony_subcode last_sony_subcode; /* Points to the last subcode address read */ -static volatile int sony_inuse = 0; /* Is the drive in use? Only one operation - at a time allowed */ - -static DECLARE_WAIT_QUEUE_HEAD(sony_wait); /* Things waiting for the drive */ - -static struct task_struct *has_cd_task = NULL; /* The task that is currently - using the CDROM drive, or - NULL if none. */ +static DECLARE_MUTEX(sony_sem); /* Semaphore for drive hardware access */ static int is_double_speed = 0; /* does the drive support double speed ? */ @@ -303,6 +293,7 @@ /* The interrupt handler will wake this queue up when it gets an interrupts. */ DECLARE_WAIT_QUEUE_HEAD(cdu31a_irq_wait); +static int irq_flag = 0; static int curr_control_reg = 0; /* Current value of the control register */ @@ -344,13 +335,16 @@ */ static int scd_drive_status(struct cdrom_device_info *cdi, int slot_nr) { - if (CDSL_CURRENT != slot_nr) { + if (CDSL_CURRENT != slot_nr) /* we have no changer support */ return -EINVAL; - } - if (scd_spinup() == 0) { + if (sony_spun_up) + return CDS_DISC_OK; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; + if (scd_spinup() == 0) sony_spun_up = 1; - } + up(&sony_sem); return sony_spun_up ? CDS_DISC_OK : CDS_DRIVE_NOT_READY; } @@ -376,17 +370,31 @@ */ static inline void sony_sleep(void) { - unsigned long flags; - if (cdu31a_irq <= 0) { yield(); } else { /* Interrupt driven */ + DEFINE_WAIT(w); + int first = 1; - save_flags(flags); - cli(); - enable_interrupts(); - interruptible_sleep_on(&cdu31a_irq_wait); - restore_flags(flags); + while (1) { + prepare_to_wait(&cdu31a_irq_wait, &w, + TASK_INTERRUPTIBLE); + if (first) { + enable_interrupts(); + first = 0; + } + + if (irq_flag != 0) + break; + if (!signal_pending(current)) { + schedule(); + continue; + } else + disable_interrupts(); + break; + } + finish_wait(&cdu31a_irq_wait, &w); + irq_flag = 0; } } @@ -397,37 +405,37 @@ */ static inline int is_attention(void) { - return ((inb(sony_cd_status_reg) & SONY_ATTN_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_ATTN_BIT) != 0; } static inline int is_busy(void) { - return ((inb(sony_cd_status_reg) & SONY_BUSY_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_BUSY_BIT) != 0; } static inline int is_data_ready(void) { - return ((inb(sony_cd_status_reg) & SONY_DATA_RDY_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_DATA_RDY_BIT) != 0; } static inline int is_data_requested(void) { - return ((inb(sony_cd_status_reg) & SONY_DATA_REQUEST_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_DATA_REQUEST_BIT) != 0; } static inline int is_result_ready(void) { - return ((inb(sony_cd_status_reg) & SONY_RES_RDY_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_RES_RDY_BIT) != 0; } static inline int is_param_write_rdy(void) { - return ((inb(sony_cd_fifost_reg) & SONY_PARAM_WRITE_RDY_BIT) != 0); + return (inb(sony_cd_fifost_reg) & SONY_PARAM_WRITE_RDY_BIT) != 0; } static inline int is_result_reg_not_empty(void) { - return ((inb(sony_cd_fifost_reg) & SONY_RES_REG_NOT_EMP_BIT) != 0); + return (inb(sony_cd_fifost_reg) & SONY_RES_REG_NOT_EMP_BIT) != 0; } static inline void reset_drive(void) @@ -445,6 +453,8 @@ { unsigned long retry_count; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; reset_drive(); retry_count = jiffies + SONY_RESET_TIMEOUT; @@ -452,6 +462,7 @@ sony_sleep(); } + up(&sony_sem); return 0; } @@ -478,17 +489,17 @@ static inline unsigned char read_status_register(void) { - return (inb(sony_cd_status_reg)); + return inb(sony_cd_status_reg); } static inline unsigned char read_result_register(void) { - return (inb(sony_cd_result_reg)); + return inb(sony_cd_result_reg); } static inline unsigned char read_data_register(void) { - return (inb(sony_cd_read_reg)); + return inb(sony_cd_read_reg); } static inline void write_param(unsigned char param) @@ -527,15 +538,17 @@ /* If something was waiting, wake it up now. */ if (waitqueue_active(&cdu31a_irq_wait)) { disable_interrupts(); - wake_up(&cdu31a_irq_wait); + irq_flag = 1; + wake_up_interruptible(&cdu31a_irq_wait); } } else if (waitqueue_active(&cdu31a_irq_wait)) { disable_interrupts(); - wake_up(&cdu31a_irq_wait); + irq_flag = 1; + wake_up_interruptible(&cdu31a_irq_wait); } else { disable_interrupts(); - printk - ("CDU31A: Got an interrupt but nothing was waiting\n"); + printk(KERN_NOTICE PFX + "Got an interrupt but nothing was waiting\n"); } return IRQ_HANDLED; } @@ -610,8 +623,8 @@ do_sony_cd_cmd(SONY_SET_DRIVE_PARAM_CMD, params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk(" Unable to set spin-down time: 0x%2.2x\n", - res_reg[1]); + printk(KERN_NOTICE PFX + "Unable to set spin-down time: 0x%2.2x\n", res_reg[1]); } params[0] = SONY_SD_MECH_CONTROL; @@ -627,8 +640,8 @@ do_sony_cd_cmd(SONY_SET_DRIVE_PARAM_CMD, params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk(" Unable to set mechanical parameters: 0x%2.2x\n", - res_reg[1]); + printk(KERN_NOTICE PFX "Unable to set mechanical " + "parameters: 0x%2.2x\n", res_reg[1]); } } @@ -643,7 +656,10 @@ else sony_speed = speed - 1; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; set_drive_params(sony_speed); + up(&sony_sem); return 0; } @@ -658,7 +674,10 @@ } else { is_auto_eject = 0; } + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; set_drive_params(sony_speed); + up(&sony_sem); return 0; } @@ -672,7 +691,7 @@ unsigned long retry_count; - printk("cdu31a: Resetting drive on error\n"); + printk(KERN_NOTICE PFX "Resetting drive on error\n"); reset_drive(); retry_count = jiffies + SONY_RESET_TIMEOUT; while (time_before(jiffies, retry_count) && (!is_attention())) { @@ -681,7 +700,7 @@ set_drive_params(sony_speed); do_sony_cd_cmd(SONY_SPIN_UP_CMD, NULL, 0, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk("cdu31a: Unable to spin up drive: 0x%2.2x\n", + printk(KERN_NOTICE PFX "Unable to spin up drive: 0x%2.2x\n", res_reg[1]); } @@ -741,9 +760,7 @@ while (handle_sony_cd_attention()); } if (is_busy() || (!(is_result_ready()))) { -#if DEBUG - printk("CDU31A timeout out %d\n", __LINE__); -#endif + pr_debug(PFX "timeout out %d\n", __LINE__); result_buffer[0] = 0x20; result_buffer[1] = SONY_TIMEOUT_OP_ERR; *result_size = 2; @@ -794,10 +811,8 @@ retry_count--; } if (!is_result_ready()) { -#if DEBUG - printk("CDU31A timeout out %d\n", + pr_debug(PFX "timeout out %d\n", __LINE__); -#endif result_buffer[0] = 0x20; result_buffer[1] = SONY_TIMEOUT_OP_ERR; @@ -823,10 +838,8 @@ retry_count--; } if (!is_result_ready()) { -#if DEBUG - printk("CDU31A timeout out %d\n", + pr_debug(PFX "timeout out %d\n", __LINE__); -#endif result_buffer[0] = 0x20; result_buffer[1] = SONY_TIMEOUT_OP_ERR; @@ -857,38 +870,12 @@ unsigned char *result_buffer, unsigned int *result_size) { unsigned long retry_count; - int num_retries; - int recursive_call; - unsigned long flags; - + int num_retries = 0; - save_flags(flags); - cli(); - if (current != has_cd_task) { /* Allow recursive calls to this routine */ - while (sony_inuse) { - interruptible_sleep_on(&sony_wait); - if (signal_pending(current)) { - result_buffer[0] = 0x20; - result_buffer[1] = SONY_SIGNAL_OP_ERR; - *result_size = 2; - restore_flags(flags); - return; - } - } - sony_inuse = 1; - has_cd_task = current; - recursive_call = 0; - } else { - recursive_call = 1; - } - - num_retries = 0; retry_cd_operation: while (handle_sony_cd_attention()); - sti(); - retry_count = jiffies + SONY_JIFFIES_TIMEOUT; while (time_before(jiffies, retry_count) && (is_busy())) { sony_sleep(); @@ -896,9 +883,7 @@ while (handle_sony_cd_attention()); } if (is_busy()) { -#if DEBUG - printk("CDU31A timeout out %d\n", __LINE__); -#endif + pr_debug(PFX "timeout out %d\n", __LINE__); result_buffer[0] = 0x20; result_buffer[1] = SONY_TIMEOUT_OP_ERR; *result_size = 2; @@ -918,14 +903,6 @@ msleep(100); goto retry_cd_operation; } - - if (!recursive_call) { - has_cd_task = NULL; - sony_inuse = 0; - wake_up_interruptible(&sony_wait); - } - - restore_flags(flags); } @@ -945,21 +922,18 @@ volatile int val; -#if 0*DEBUG - printk("Entering handle_sony_cd_attention\n"); +#if 0 + pr_debug(PFX "Entering %s\n", __FUNCTION__); #endif if (is_attention()) { if (num_consecutive_attentions > CDU31A_MAX_CONSECUTIVE_ATTENTIONS) { - printk - ("cdu31a: Too many consecutive attentions: %d\n", - num_consecutive_attentions); + printk(KERN_NOTICE PFX "Too many consecutive " + "attentions: %d\n", num_consecutive_attentions); num_consecutive_attentions = 0; -#if DEBUG - printk("Leaving handle_sony_cd_attention at %d\n", + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); -#endif - return (0); + return 0; } clear_attention(); @@ -999,11 +973,8 @@ } num_consecutive_attentions++; -#if DEBUG - printk("Leaving handle_sony_cd_attention at %d\n", - __LINE__); -#endif - return (1); + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); + return 1; } else if (abort_read_started) { while (is_result_reg_not_empty()) { val = read_result_register(); @@ -1015,18 +986,15 @@ val = read_data_register(); } abort_read_started = 0; -#if DEBUG - printk("Leaving handle_sony_cd_attention at %d\n", - __LINE__); -#endif - return (1); + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); + return 1; } num_consecutive_attentions = 0; -#if 0*DEBUG - printk("Leaving handle_sony_cd_attention at %d\n", __LINE__); +#if 0 + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); #endif - return (0); + return 0; } @@ -1038,14 +1006,14 @@ retval = (val / 10) << 4; retval = retval | val % 10; - return (retval); + return retval; } /* Convert from BCD to an integer from 0-99 */ static unsigned int bcd_to_int(unsigned int bcd) { - return ((((bcd >> 4) & 0x0f) * 10) + (bcd & 0x0f)); + return (((bcd >> 4) & 0x0f) * 10) + (bcd & 0x0f); } @@ -1105,9 +1073,7 @@ unsigned long retry_count; -#if DEBUG - printk("Entering start_request\n"); -#endif + pr_debug(PFX "Entering %s\n", __FUNCTION__); log_to_msf(sector, params); size_to_buf(nsect, ¶ms[3]); @@ -1125,11 +1091,10 @@ } if (is_busy()) { - printk("CDU31A: Timeout while waiting to issue command\n"); -#if DEBUG - printk("Leaving start_request at %d\n", __LINE__); -#endif - return (1); + printk(KERN_NOTICE PFX "Timeout while waiting " + "to issue command\n"); + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); + return 1; } else { /* Issue the command */ clear_result_ready(); @@ -1140,14 +1105,10 @@ sony_blocks_left = nsect * 4; sony_next_block = sector * 4; -#if DEBUG - printk("Leaving start_request at %d\n", __LINE__); -#endif - return (0); + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); + return 0; } -#if DEBUG - printk("Leaving start_request at %d\n", __LINE__); -#endif + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); } /* Abort a pending read operation. Clear all the drive status variables. */ @@ -1160,7 +1121,7 @@ do_sony_cd_cmd(SONY_ABORT_CMD, NULL, 0, result_reg, &result_size); if ((result_reg[0] & 0xf0) == 0x20) { - printk("CDU31A: Error aborting read, %s error\n", + printk(KERN_ERR PFX "Aborting read, %s error\n", translate_error(result_reg[1])); } @@ -1181,15 +1142,9 @@ pending read operation. */ static void handle_abort_timeout(unsigned long data) { - unsigned long flags; - -#if DEBUG - printk("Entering handle_abort_timeout\n"); -#endif - save_flags(flags); - cli(); + pr_debug(PFX "Entering %s\n", __FUNCTION__); /* If it is in use, ignore it. */ - if (!sony_inuse) { + if (down_trylock(&sony_sem) == 0) { /* We can't use abort_read(), because it will sleep or schedule in the timer interrupt. Just start the operation, finish it on the next access to @@ -1200,20 +1155,16 @@ sony_blocks_left = 0; abort_read_started = 1; + up(&sony_sem); } - restore_flags(flags); -#if DEBUG - printk("Leaving handle_abort_timeout\n"); -#endif + pr_debug(PFX "Leaving %s\n", __FUNCTION__); } /* Actually get one sector of data from the drive. */ static void input_data_sector(char *buffer) { -#if DEBUG - printk("Entering input_data_sector\n"); -#endif + pr_debug(PFX "Entering %s\n", __FUNCTION__); /* If an XA disk on a CDU31A, skip the first 12 bytes of data from the disk. The real data is after that. We can use audio_buffer. */ @@ -1229,9 +1180,7 @@ if (sony_xa_mode) insb(sony_cd_read_reg, audio_buffer, CD_XA_TAIL); -#if DEBUG - printk("Leaving input_data_sector\n"); -#endif + pr_debug(PFX "Leaving %s\n", __FUNCTION__); } /* read data from the drive. Note the nsect must be <= 4. */ @@ -1243,9 +1192,7 @@ { unsigned long retry_count; -#if DEBUG - printk("Entering read_data_block\n"); -#endif + pr_debug(PFX "Entering %s\n", __FUNCTION__); res_reg[0] = 0; res_reg[1] = 0; @@ -1262,18 +1209,15 @@ if (is_result_ready()) { get_result(res_reg, res_size); if ((res_reg[0] & 0xf0) != 0x20) { - printk - ("CDU31A: Got result that should have been error: %d\n", - res_reg[0]); + printk(KERN_NOTICE PFX "Got result that should" + " have been error: %d\n", res_reg[0]); res_reg[0] = 0x20; res_reg[1] = SONY_BAD_DATA_ERR; *res_size = 2; } abort_read(); } else { -#if DEBUG - printk("CDU31A timeout out %d\n", __LINE__); -#endif + pr_debug(PFX "timeout out %d\n", __LINE__); res_reg[0] = 0x20; res_reg[1] = SONY_TIMEOUT_OP_ERR; *res_size = 2; @@ -1294,9 +1238,7 @@ } if (!is_result_ready()) { -#if DEBUG - printk("CDU31A timeout out %d\n", __LINE__); -#endif + pr_debug(PFX "timeout out %d\n", __LINE__); res_reg[0] = 0x20; res_reg[1] = SONY_TIMEOUT_OP_ERR; *res_size = 2; @@ -1315,9 +1257,8 @@ SONY_RECOV_LECC_ERR_BLK_STAT)) { /* nothing here */ } else { - printk - ("CDU31A: Data block error: 0x%x\n", - res_reg[0]); + printk(KERN_ERR PFX "Data block " + "error: 0x%x\n", res_reg[0]); res_reg[0] = 0x20; res_reg[1] = SONY_BAD_DATA_ERR; *res_size = 2; @@ -1330,9 +1271,8 @@ } else if ((res_reg[0] & 0xf0) != 0x20) { /* The drive gave me bad status, I don't know what to do. Reset the driver and return an error. */ - printk - ("CDU31A: Invalid block status: 0x%x\n", - res_reg[0]); + printk(KERN_ERR PFX "Invalid block " + "status: 0x%x\n", res_reg[0]); restart_on_error(); res_reg[0] = 0x20; res_reg[1] = SONY_BAD_DATA_ERR; @@ -1340,9 +1280,7 @@ } } } -#if DEBUG - printk("Leaving read_data_block at %d\n", __LINE__); -#endif + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); } @@ -1359,32 +1297,14 @@ int block, nblock, num_retries; unsigned char res_reg[12]; unsigned int res_size; - unsigned long flags; + pr_debug(PFX "Entering %s\n", __FUNCTION__); -#if DEBUG - printk("Entering do_cdu31a_request\n"); -#endif - - /* - * Make sure no one else is using the driver; wait for them - * to finish if it is so. - */ - save_flags(flags); - cli(); - while (sony_inuse) { - interruptible_sleep_on(&sony_wait); - if (signal_pending(current)) { - restore_flags(flags); -#if DEBUG - printk("Leaving do_cdu31a_request at %d\n", - __LINE__); -#endif - return; - } + spin_unlock_irq(q->queue_lock); + if (down_interruptible(&sony_sem)) { + spin_lock_irq(q->queue_lock); + return; } - sony_inuse = 1; - has_cd_task = current; /* Get drive status before doing anything. */ while (handle_sony_cd_attention()); @@ -1392,10 +1312,6 @@ /* Make sure we have a valid TOC. */ sony_get_toc(); - /* - * jens: driver has lots of races - */ - spin_unlock_irq(q->queue_lock); /* Make sure the timer is cancelled. */ del_timer(&cdu31a_abort_timer); @@ -1414,12 +1330,10 @@ block = req->sector; nblock = req->nr_sectors; -#if DEBUG - printk("CDU31A: request at block %d, length %d blocks\n", + pr_debug(PFX "request at block %d, length %d blocks\n", block, nblock); -#endif if (!sony_toc_read) { - printk("CDU31A: TOC not read\n"); + printk(KERN_NOTICE PFX "TOC not read\n"); end_request(req, 0); continue; } @@ -1431,14 +1345,13 @@ end_request(req, 0); continue; } - if (rq_data_dir(req) != READ) - panic("CDU31A: Unknown cmd"); + /* * If the block address is invalid or the request goes beyond the end of * the media, return an error. */ if (((block + nblock) / 4) >= sony_toc.lead_out_start_lba) { - printk("CDU31A: Request past end of media\n"); + printk(KERN_NOTICE PFX "Request past end of media\n"); end_request(req, 0); continue; } @@ -1451,7 +1364,7 @@ while (handle_sony_cd_attention()); if (!sony_toc_read) { - printk("CDU31A: TOC not read\n"); + printk(KERN_NOTICE PFX "TOC not read\n"); end_request(req, 0); continue; } @@ -1468,18 +1381,16 @@ the driver, abort the current operation and start a new one. */ else if (block != sony_next_block) { -#if DEBUG - printk("CDU31A Warning: Read for block %d, expected %d\n", + pr_debug(PFX "Read for block %d, expected %d\n", block, sony_next_block); -#endif abort_read(); if (!sony_toc_read) { - printk("CDU31A: TOC not read\n"); + printk(KERN_NOTICE PFX "TOC not read\n"); end_request(req, 0); continue; } if (start_request(block / 4, nblock / 4)) { - printk("CDU31a: start request failed\n"); + printk(KERN_NOTICE PFX "start request failed\n"); end_request(req, 0); continue; } @@ -1507,13 +1418,12 @@ do_sony_cd_cmd(SONY_SPIN_UP_CMD, NULL, 0, res_reg, &res_size); } else { - printk("CDU31A: %s error for block %d, nblock %d\n", + printk(KERN_NOTICE PFX "%s error for block %d, nblock %d\n", translate_error(res_reg[1]), block, nblock); } goto try_read_again; } end_do_cdu31a_request: - spin_lock_irq(q->queue_lock); #if 0 /* After finished, cancel any pending operations. */ abort_read(); @@ -1524,13 +1434,9 @@ add_timer(&cdu31a_abort_timer); #endif - has_cd_task = NULL; - sony_inuse = 0; - wake_up_interruptible(&sony_wait); - restore_flags(flags); -#if DEBUG - printk("Leaving do_cdu31a_request at %d\n", __LINE__); -#endif + up(&sony_sem); + spin_lock_irq(q->queue_lock); + pr_debug(PFX "Leaving %s at %d\n", __FUNCTION__, __LINE__); } @@ -1549,9 +1455,7 @@ int mint = 99; int maxt = 0; -#if DEBUG - printk("Entering sony_get_toc\n"); -#endif + pr_debug(PFX "Entering %s\n", __FUNCTION__); num_spin_ups = 0; if (!sony_toc_read) { @@ -1602,16 +1506,12 @@ /* This seems to slow things down enough to make it work. This * appears to be a problem in do_sony_cd_cmd. This printk seems * to address the symptoms... -Erik */ -#if DEBUG - printk("cdu31a: Trying session %d\n", session); -#endif + pr_debug(PFX "Trying session %d\n", session); parms[0] = session; do_sony_cd_cmd(SONY_READ_TOC_SPEC_CMD, parms, 1, res_reg, &res_size); -#if DEBUG - printk("%2.2x %2.2x\n", res_reg[0], res_reg[1]); -#endif + pr_debug(PFX "%2.2x %2.2x\n", res_reg[0], res_reg[1]); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { @@ -1621,9 +1521,7 @@ ("Yikes! Couldn't read any sessions!"); break; } -#if DEBUG - printk("Reading session %d\n", session); -#endif + pr_debug(PFX "Reading session %d\n", session); parms[0] = session; do_sony_cd_cmd(SONY_REQ_TOC_DATA_SPEC_CMD, @@ -1634,8 +1532,8 @@ if ((res_size < 2) || ((single_toc.exec_status[0] & 0xf0) == 0x20)) { - printk - ("cdu31a: Error reading session %d: %x %s\n", + printk(KERN_ERR PFX "Error reading " + "session %d: %x %s\n", session, single_toc.exec_status[0], translate_error(single_toc. exec_status[1])); @@ -1643,29 +1541,27 @@ set. */ return; } -#if DEBUG - printk - ("add0 %01x, con0 %01x, poi0 %02x, 1st trk %d, dsktyp %x, dum0 %x\n", + pr_debug(PFX "add0 %01x, con0 %01x, poi0 %02x, " + "1st trk %d, dsktyp %x, dum0 %x\n", single_toc.address0, single_toc.control0, single_toc.point0, bcd_to_int(single_toc.first_track_num), single_toc.disk_type, single_toc.dummy0); - printk - ("add1 %01x, con1 %01x, poi1 %02x, lst trk %d, dummy1 %x, dum2 %x\n", + pr_debug(PFX "add1 %01x, con1 %01x, poi1 %02x, " + "lst trk %d, dummy1 %x, dum2 %x\n", single_toc.address1, single_toc.control1, single_toc.point1, bcd_to_int(single_toc.last_track_num), single_toc.dummy1, single_toc.dummy2); - printk - ("add2 %01x, con2 %01x, poi2 %02x leadout start min %d, sec %d, frame %d\n", + pr_debug(PFX "add2 %01x, con2 %01x, poi2 %02x " + "leadout start min %d, sec %d, frame %d\n", single_toc.address2, single_toc.control2, single_toc.point2, bcd_to_int(single_toc.lead_out_start_msf[0]), bcd_to_int(single_toc.lead_out_start_msf[1]), bcd_to_int(single_toc.lead_out_start_msf[2])); if (res_size > 18 && single_toc.pointb0 > 0xaf) - printk - ("addb0 %01x, conb0 %01x, poib0 %02x, nextsession min %d, sec %d, frame %d\n" + pr_debug(PFX "addb0 %01x, conb0 %01x, poib0 %02x, nextsession min %d, sec %d, frame %d\n" "#mode5_ptrs %02d, max_start_outer_leadout_msf min %d, sec %d, frame %d\n", single_toc.addressb0, single_toc.controlb0, @@ -1690,8 +1586,7 @@ max_start_outer_leadout_msf [2])); if (res_size > 27 && single_toc.pointb1 > 0xaf) - printk - ("addb1 %01x, conb1 %01x, poib1 %02x, %x %x %x %x #skipint_ptrs %d, #skiptrkassign %d %x\n", + pr_debug(PFX "addb1 %01x, conb1 %01x, poib1 %02x, %x %x %x %x #skipint_ptrs %d, #skiptrkassign %d %x\n", single_toc.addressb1, single_toc.controlb1, single_toc.pointb1, @@ -1703,8 +1598,7 @@ single_toc.num_skip_track_assignments, single_toc.dummyb0_2); if (res_size > 36 && single_toc.pointb2 > 0xaf) - printk - ("addb2 %01x, conb2 %01x, poib2 %02x, %02x %02x %02x %02x %02x %02x %02x\n", + pr_debug(PFX "addb2 %01x, conb2 %01x, poib2 %02x, %02x %02x %02x %02x %02x %02x %02x\n", single_toc.addressb2, single_toc.controlb2, single_toc.pointb2, @@ -1716,8 +1610,7 @@ single_toc.tracksb2[5], single_toc.tracksb2[6]); if (res_size > 45 && single_toc.pointb3 > 0xaf) - printk - ("addb3 %01x, conb3 %01x, poib3 %02x, %02x %02x %02x %02x %02x %02x %02x\n", + pr_debug(PFX "addb3 %01x, conb3 %01x, poib3 %02x, %02x %02x %02x %02x %02x %02x %02x\n", single_toc.addressb3, single_toc.controlb3, single_toc.pointb3, @@ -1729,8 +1622,7 @@ single_toc.tracksb3[5], single_toc.tracksb3[6]); if (res_size > 54 && single_toc.pointb4 > 0xaf) - printk - ("addb4 %01x, conb4 %01x, poib4 %02x, %02x %02x %02x %02x %02x %02x %02x\n", + pr_debug(PFX "addb4 %01x, conb4 %01x, poib4 %02x, %02x %02x %02x %02x %02x %02x %02x\n", single_toc.addressb4, single_toc.controlb4, single_toc.pointb4, @@ -1742,8 +1634,7 @@ single_toc.tracksb4[5], single_toc.tracksb4[6]); if (res_size > 63 && single_toc.pointc0 > 0xaf) - printk - ("addc0 %01x, conc0 %01x, poic0 %02x, %02x %02x %02x %02x %02x %02x %02x\n", + pr_debug(PFX "addc0 %01x, conc0 %01x, poic0 %02x, %02x %02x %02x %02x %02x %02x %02x\n", single_toc.addressc0, single_toc.controlc0, single_toc.pointc0, @@ -1754,7 +1645,6 @@ single_toc.dummyc0[4], single_toc.dummyc0[5], single_toc.dummyc0[6]); -#endif #undef DEBUG #define DEBUG 0 @@ -1823,8 +1713,8 @@ res_size += 9; } #if DEBUG - printk - ("start track lba %u, leadout start lba %u\n", + printk(PRINT_INFO PFX "start track lba %u, " + "leadout start lba %u\n", single_toc.start_track_lba, single_toc.lead_out_start_lba); { @@ -1836,8 +1726,7 @@ - bcd_to_int(single_toc. first_track_num); i++) { - printk - ("trk %02d: add 0x%01x, con 0x%01x, track %02d, start min %02d, sec %02d, frame %02d\n", + printk(KERN_INFO PFX "trk %02d: add 0x%01x, con 0x%01x, track %02d, start min %02d, sec %02d, frame %02d\n", i, single_toc.tracks[i].address, single_toc.tracks[i].control, @@ -1870,8 +1759,8 @@ tracks[i]. track); } - printk - ("min track number %d, max track number %d\n", + printk(KERN_INFO PFX "min track number %d, " + "max track number %d\n", mint, maxt); } #endif @@ -1976,8 +1865,8 @@ /* Let's not get carried away... */ if (session > 40) { - printk("cdu31a: too many sessions: %d\n", - session); + printk(KERN_NOTICE PFX "too many sessions: " + "%d\n", session); break; } session++; @@ -1995,17 +1884,13 @@ sony_toc.lead_out_start_msf[2]; sony_toc_read = 1; -#undef DEBUG -#if DEBUG - printk - ("Disk session %d, start track: %d, stop track: %d\n", + + pr_debug(PFX "Disk session %d, start track: %d, " + "stop track: %d\n", session, single_toc.start_track_lba, single_toc.lead_out_start_lba); -#endif } -#if DEBUG - printk("Leaving sony_get_toc\n"); -#endif + pr_debug(PFX "Leaving %s\n", __FUNCTION__); } @@ -2019,8 +1904,12 @@ if (ms_info == NULL) return 1; - if (!sony_toc_read) + if (!sony_toc_read) { + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; sony_get_toc(); + up(&sony_sem); + } ms_info->addr_format = CDROM_LBA; ms_info->addr.lba = sony_toc.start_track_lba; @@ -2060,7 +1949,7 @@ 0, (unsigned char *) &last_sony_subcode, &res_size); if ((res_size < 2) || ((last_sony_subcode.exec_status[0] & 0xf0) == 0x20)) { - printk("Sony CDROM error %s (read_subcode)\n", + printk(KERN_ERR PFX "Sony CDROM error %s (read_subcode)\n", translate_error(last_sony_subcode.exec_status[1])); return -EIO; } @@ -2098,8 +1987,11 @@ unsigned int res_size; memset(mcn->medium_catalog_number, 0, 14); + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; do_sony_cd_cmd(SONY_REQ_UPC_EAN_CMD, NULL, 0, resbuffer, &res_size); + up(&sony_sem); if ((res_size < 2) || ((resbuffer[0] & 0xf0) == 0x20)); else { /* packed bcd to single ASCII digits */ @@ -2228,8 +2120,8 @@ } /* Invalid data from the drive. Shut down the operation. */ else if ((res_reg[0] & 0xf0) != 0x20) { - printk - ("CDU31A: Got result that should have been error: %d\n", + printk(KERN_WARNING PFX "Got result that " + "should have been error: %d\n", res_reg[0]); res_reg[0] = 0x20; res_reg[1] = SONY_BAD_DATA_ERR; @@ -2237,9 +2129,7 @@ } abort_read(); } else { -#if DEBUG - printk("CDU31A timeout out %d\n", __LINE__); -#endif + pr_debug(PFX "timeout out %d\n", __LINE__); res_reg[0] = 0x20; res_reg[1] = SONY_TIMEOUT_OP_ERR; *res_size = 2; @@ -2269,10 +2159,7 @@ } if (!is_result_ready()) { -#if DEBUG - printk("CDU31A timeout out %d\n", - __LINE__); -#endif + pr_debug(PFX "timeout out %d\n", __LINE__); res_reg[0] = 0x20; res_reg[1] = SONY_TIMEOUT_OP_ERR; *res_size = 2; @@ -2290,7 +2177,7 @@ || (res_reg[0] == SONY_NO_ERR_DETECTION_STAT)) { /* Ok, nothing to do. */ } else { - printk("CDU31A: Data block error: 0x%x\n", + printk(KERN_ERR PFX "Data block error: 0x%x\n", res_reg[0]); res_reg[0] = 0x20; res_reg[1] = SONY_BAD_DATA_ERR; @@ -2299,7 +2186,7 @@ } else if ((res_reg[0] & 0xf0) != 0x20) { /* The drive gave me bad status, I don't know what to do. Reset the driver and return an error. */ - printk("CDU31A: Invalid block status: 0x%x\n", + printk(KERN_NOTICE PFX "Invalid block status: 0x%x\n", res_reg[0]); restart_on_error(); res_reg[0] = 0x20; @@ -2318,28 +2205,11 @@ unsigned char res_reg[12]; unsigned int res_size; unsigned int cframe; - unsigned long flags; - /* - * Make sure no one else is using the driver; wait for them - * to finish if it is so. - */ - save_flags(flags); - cli(); - while (sony_inuse) { - interruptible_sleep_on(&sony_wait); - if (signal_pending(current)) { - restore_flags(flags); - return -EAGAIN; - } - } - sony_inuse = 1; - has_cd_task = current; - restore_flags(flags); - - if (!sony_spun_up) { + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; + if (!sony_spun_up) scd_spinup(); - } /* Set the drive to do raw operations. */ params[0] = SONY_SD_DECODE_PARAM; @@ -2347,9 +2217,10 @@ do_sony_cd_cmd(SONY_SET_DRIVE_PARAM_CMD, params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk("CDU31A: Unable to set decode params: 0x%2.2x\n", + printk(KERN_ERR PFX "Unable to set decode params: 0x%2.2x\n", res_reg[1]); - return -EIO; + retval = -EIO; + goto out_up; } /* From here down, we have to goto exit_read_audio instead of returning @@ -2368,8 +2239,8 @@ read_audio_data(audio_buffer, res_reg, &res_size); if ((res_reg[0] & 0xf0) == 0x20) { if (res_reg[1] == SONY_BAD_DATA_ERR) { - printk - ("CDU31A: Data error on audio sector %d\n", + printk(KERN_ERR PFX "Data error on audio " + "sector %d\n", ra->addr.lba + cframe); } else if (res_reg[1] == SONY_ILL_TRACK_R_ERR) { /* Illegal track type, change track types and start over. */ @@ -2384,8 +2255,8 @@ 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk - ("CDU31A: Unable to set decode params: 0x%2.2x\n", + printk(KERN_ERR PFX "Unable to set " + "decode params: 0x%2.2x\n", res_reg[1]); retval = -EIO; goto exit_read_audio; @@ -2407,13 +2278,12 @@ if ((res_reg[0] & 0xf0) == 0x20) { if (res_reg[1] == SONY_BAD_DATA_ERR) { - printk - ("CDU31A: Data error on audio sector %d\n", + printk(KERN_ERR PFX "Data error" + " on audio sector %d\n", ra->addr.lba + cframe); } else { - printk - ("CDU31A: Error reading audio data on sector %d: %s\n", + printk(KERN_ERR PFX "Error reading audio data on sector %d: %s\n", ra->addr.lba + cframe, translate_error (res_reg[1])); @@ -2429,8 +2299,8 @@ goto exit_read_audio; } } else { - printk - ("CDU31A: Error reading audio data on sector %d: %s\n", + printk(KERN_ERR PFX "Error reading audio " + "data on sector %d: %s\n", ra->addr.lba + cframe, translate_error(res_reg[1])); retval = -EIO; @@ -2448,7 +2318,7 @@ get_result(res_reg, &res_size); if ((res_reg[0] & 0xf0) == 0x20) { - printk("CDU31A: Error return from audio read: %s\n", + printk(KERN_ERR PFX "Error return from audio read: %s\n", translate_error(res_reg[1])); retval = -EIO; goto exit_read_audio; @@ -2466,16 +2336,15 @@ do_sony_cd_cmd(SONY_SET_DRIVE_PARAM_CMD, params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk("CDU31A: Unable to reset decode params: 0x%2.2x\n", + printk(KERN_ERR PFX "Unable to reset decode params: 0x%2.2x\n", res_reg[1]); - return -EIO; + retval = -EIO; } - has_cd_task = NULL; - sony_inuse = 0; - wake_up_interruptible(&sony_wait); + out_up: + up(&sony_sem); - return (retval); + return retval; } static int @@ -2488,7 +2357,7 @@ do_sony_cd_cmd(cmd, params, num_params, result_buffer, result_size); if ((*result_size < 2) || ((result_buffer[0] & 0xf0) == 0x20)) { - printk("Sony CDROM error %s (CDROM%s)\n", + printk(KERN_ERR PFX "Error %s (CDROM%s)\n", translate_error(result_buffer[1]), name); return -EIO; } @@ -2501,6 +2370,10 @@ */ static int scd_tray_move(struct cdrom_device_info *cdi, int position) { + int retval; + + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; if (position == 1 /* open tray */ ) { unsigned char res_reg[12]; unsigned int res_size; @@ -2511,13 +2384,15 @@ &res_size); sony_audio_status = CDROM_AUDIO_INVALID; - return do_sony_cd_cmd_chk("EJECT", SONY_EJECT_CMD, NULL, 0, + retval = do_sony_cd_cmd_chk("EJECT", SONY_EJECT_CMD, NULL, 0, res_reg, &res_size); } else { if (0 == scd_spinup()) sony_spun_up = 1; - return 0; + retval = 0; } + up(&sony_sem); + return retval; } /* @@ -2529,12 +2404,13 @@ unsigned char res_reg[12]; unsigned int res_size; unsigned char params[7]; - int i; - + int i, retval; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; switch (cmd) { case CDROMSTART: /* Spin up the drive */ - return do_sony_cd_cmd_chk("START", SONY_SPIN_UP_CMD, NULL, + retval = do_sony_cd_cmd_chk("START", SONY_SPIN_UP_CMD, NULL, 0, res_reg, &res_size); break; @@ -2547,28 +2423,33 @@ * already not spinning. */ sony_audio_status = CDROM_AUDIO_NO_STATUS; - return do_sony_cd_cmd_chk("STOP", SONY_SPIN_DOWN_CMD, NULL, + retval = do_sony_cd_cmd_chk("STOP", SONY_SPIN_DOWN_CMD, NULL, 0, res_reg, &res_size); + break; case CDROMPAUSE: /* Pause the drive */ if (do_sony_cd_cmd_chk ("PAUSE", SONY_AUDIO_STOP_CMD, NULL, 0, res_reg, - &res_size)) - return -EIO; + &res_size)) { + retval = -EIO; + break; + } /* Get the current position and save it for resuming */ if (read_subcode() < 0) { - return -EIO; + retval = -EIO; + break; } cur_pos_msf[0] = last_sony_subcode.abs_msf[0]; cur_pos_msf[1] = last_sony_subcode.abs_msf[1]; cur_pos_msf[2] = last_sony_subcode.abs_msf[2]; sony_audio_status = CDROM_AUDIO_PAUSED; - return 0; + retval = 0; break; case CDROMRESUME: /* Start the drive after being paused */ if (sony_audio_status != CDROM_AUDIO_PAUSED) { - return -EINVAL; + retval = -EINVAL; + break; } do_sony_cd_cmd(SONY_SPIN_UP_CMD, NULL, 0, res_reg, @@ -2584,10 +2465,13 @@ params[0] = 0x03; if (do_sony_cd_cmd_chk ("RESUME", SONY_AUDIO_PLAYBACK_CMD, params, 7, res_reg, - &res_size) < 0) - return -EIO; + &res_size) < 0) { + retval = -EIO; + break; + } sony_audio_status = CDROM_AUDIO_PLAY; - return 0; + retval = 0; + break; case CDROMPLAYMSF: /* Play starting at the given MSF address. */ do_sony_cd_cmd(SONY_SPIN_UP_CMD, NULL, 0, res_reg, @@ -2601,15 +2485,18 @@ params[0] = 0x03; if (do_sony_cd_cmd_chk ("PLAYMSF", SONY_AUDIO_PLAYBACK_CMD, params, 7, - res_reg, &res_size) < 0) - return -EIO; + res_reg, &res_size) < 0) { + retval = -EIO; + break; + } /* Save the final position for pauses and resumes */ final_pos_msf[0] = bcd_to_int(params[4]); final_pos_msf[1] = bcd_to_int(params[5]); final_pos_msf[2] = bcd_to_int(params[6]); sony_audio_status = CDROM_AUDIO_PLAY; - return 0; + retval = 0; + break; case CDROMREADTOCHDR: /* Read the table of contents header */ { @@ -2617,14 +2504,16 @@ sony_get_toc(); if (!sony_toc_read) { - return -EIO; + retval = -EIO; + break; } hdr = (struct cdrom_tochdr *) arg; hdr->cdth_trk0 = sony_toc.first_track_num; hdr->cdth_trk1 = sony_toc.last_track_num; } - return 0; + retval = 0; + break; case CDROMREADTOCENTRY: /* Read a given table of contents entry */ { @@ -2634,14 +2523,16 @@ sony_get_toc(); if (!sony_toc_read) { - return -EIO; + retval = -EIO; + break; } entry = (struct cdrom_tocentry *) arg; track_idx = find_track(entry->cdte_track); if (track_idx < 0) { - return -EINVAL; + retval = -EINVAL; + break; } entry->cdte_adr = @@ -2662,7 +2553,7 @@ *(msf_val + 2); } } - return 0; + retval = 0; break; case CDROMPLAYTRKIND: /* Play a track. This currently ignores index. */ @@ -2672,18 +2563,21 @@ sony_get_toc(); if (!sony_toc_read) { - return -EIO; + retval = -EIO; + break; } if ((ti->cdti_trk0 < sony_toc.first_track_num) || (ti->cdti_trk0 > sony_toc.last_track_num) || (ti->cdti_trk1 < ti->cdti_trk0)) { - return -EINVAL; + retval = -EINVAL; + break; } track_idx = find_track(ti->cdti_trk0); if (track_idx < 0) { - return -EINVAL; + retval = -EINVAL; + break; } params[1] = int_to_bcd(sony_toc.tracks[track_idx]. @@ -2705,7 +2599,8 @@ track_idx = find_track(ti->cdti_trk1 + 1); } if (track_idx < 0) { - return -EINVAL; + retval = -EINVAL; + break; } params[4] = int_to_bcd(sony_toc.tracks[track_idx]. @@ -2726,14 +2621,16 @@ if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk("Params: %x %x %x %x %x %x %x\n", + printk(KERN_ERR PFX + "Params: %x %x %x %x %x %x %x\n", params[0], params[1], params[2], params[3], params[4], params[5], params[6]); - printk - ("Sony CDROM error %s (CDROMPLAYTRKIND)\n", + printk(KERN_ERR PFX + "Error %s (CDROMPLAYTRKIND)\n", translate_error(res_reg[1])); - return -EIO; + retval = -EIO; + break; } /* Save the final position for pauses and resumes */ @@ -2741,7 +2638,8 @@ final_pos_msf[1] = bcd_to_int(params[5]); final_pos_msf[2] = bcd_to_int(params[6]); sony_audio_status = CDROM_AUDIO_PLAY; - return 0; + retval = 0; + break; } case CDROMVOLCTRL: /* Volume control. What volume does this change, anyway? */ @@ -2752,24 +2650,32 @@ params[0] = SONY_SD_AUDIO_VOLUME; params[1] = volctrl->channel0; params[2] = volctrl->channel1; - return do_sony_cd_cmd_chk("VOLCTRL", + retval = do_sony_cd_cmd_chk("VOLCTRL", SONY_SET_DRIVE_PARAM_CMD, params, 3, res_reg, &res_size); + break; } case CDROMSUBCHNL: /* Get subchannel info */ - return sony_get_subchnl_info((struct cdrom_subchnl *) arg); + retval = sony_get_subchnl_info((struct cdrom_subchnl *) arg); + break; default: - return -EINVAL; + retval = -EINVAL; + break; } + up(&sony_sem); + return retval; } static int scd_dev_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; + int retval; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; switch (cmd) { case CDROMREADAUDIO: /* Read 2352 byte audio tracks and 2340 byte raw data tracks. */ @@ -2779,14 +2685,18 @@ sony_get_toc(); if (!sony_toc_read) { - return -EIO; + retval = -EIO; + break; } - if (copy_from_user(&ra, argp, sizeof(ra))) - return -EFAULT; + if (copy_from_user(&ra, argp, sizeof(ra))) { + retval = -EFAULT; + break; + } if (ra.nframes == 0) { - return 0; + retval = 0; + break; } if (!access_ok(VERIFY_WRITE, ra.buf, @@ -2798,13 +2708,15 @@ sony_toc.lead_out_start_lba) || (ra.addr.lba + ra.nframes >= sony_toc.lead_out_start_lba)) { - return -EINVAL; + retval = -EINVAL; + break; } } else if (ra.addr_format == CDROM_MSF) { if ((ra.addr.msf.minute >= 75) || (ra.addr.msf.second >= 60) || (ra.addr.msf.frame >= 75)) { - return -EINVAL; + retval = -EINVAL; + break; } ra.addr.lba = ((ra.addr.msf.minute * 4500) @@ -2814,7 +2726,8 @@ sony_toc.lead_out_start_lba) || (ra.addr.lba + ra.nframes >= sony_toc.lead_out_start_lba)) { - return -EINVAL; + retval = -EINVAL; + break; } /* I know, this can go negative on an unsigned. However, @@ -2822,17 +2735,21 @@ so this should compensate and allow direct msf access. */ ra.addr.lba -= LOG_START_OFFSET; } else { - return -EINVAL; + retval = -EINVAL; + break; } - return (read_audio(&ra)); + retval = read_audio(&ra); + break; } - return 0; + retval = 0; break; default: - return -EINVAL; + retval = -EINVAL; } + up(&sony_sem); + return retval; } static int scd_spinup(void) @@ -2849,7 +2766,7 @@ /* The drive sometimes returns error 0. I don't know why, but ignore it. It seems to mean the drive has already done the operation. */ if ((res_size < 2) || ((res_reg[0] != 0) && (res_reg[1] != 0))) { - printk("Sony CDROM %s error (scd_open, spin up)\n", + printk(KERN_ERR PFX "%s error (scd_open, spin up)\n", translate_error(res_reg[1])); return 1; } @@ -2873,7 +2790,7 @@ goto respinup_on_open; } - printk("Sony CDROM error %s (scd_open, read toc)\n", + printk(KERN_ERR PFX "Error %s (scd_open, read toc)\n", translate_error(res_reg[1])); do_sony_cd_cmd(SONY_SPIN_DOWN_CMD, NULL, 0, res_reg, &res_size); @@ -2919,9 +2836,8 @@ params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk - ("CDU31A: Unable to set XA params: 0x%2.2x\n", - res_reg[1]); + printk(KERN_WARNING PFX "Unable to set " + "XA params: 0x%2.2x\n", res_reg[1]); } sony_xa_mode = 1; } @@ -2933,9 +2849,8 @@ params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk - ("CDU31A: Unable to reset XA params: 0x%2.2x\n", - res_reg[1]); + printk(KERN_WARNING PFX "Unable to reset " + "XA params: 0x%2.2x\n", res_reg[1]); } sony_xa_mode = 0; } @@ -3007,6 +2922,8 @@ static int scd_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, unsigned long arg) { + int retval; + /* The eject and close commands should be handled by Uniform CD-ROM * driver - but I always got hard lockup instead of eject * until I put this here. @@ -3014,12 +2931,15 @@ switch (cmd) { case CDROMEJECT: scd_lock_door(&scd_info, 0); - return scd_tray_move(&scd_info, 1); + retval = scd_tray_move(&scd_info, 1); + break; case CDROMCLOSETRAY: - return scd_tray_move(&scd_info, 0); + retval = scd_tray_move(&scd_info, 0); + break; default: - return cdrom_ioctl(file, &scd_info, inode, cmd, arg); + retval = cdrom_ioctl(file, &scd_info, inode, cmd, arg); } + return retval; } static int scd_block_media_changed(struct gendisk *disk) @@ -3112,7 +3032,6 @@ #ifndef MODULE /* * Set up base I/O and interrupts, called from main.c. - */ static int __init cdu31a_setup(char *strings) @@ -3131,7 +3050,7 @@ if (strcmp(strings, "PAS") == 0) { sony_pas_init = 1; } else { - printk("CDU31A: Unknown interface type: %s\n", + printk(KERN_NOTICE PFX "Unknown interface type: %s\n", strings); } } @@ -3223,9 +3142,8 @@ if (request_irq (cdu31a_irq, cdu31a_interrupt, SA_INTERRUPT, "cdu31a", NULL)) { - printk - ("Unable to grab IRQ%d for the CDU31A driver\n", - cdu31a_irq); + printk(KERN_WARNING PFX "Unable to grab IRQ%d for " + "the CDU31A driver\n", cdu31a_irq); cdu31a_irq = 0; } } @@ -3260,8 +3178,8 @@ strcat(msg, buf); } strcat(msg, "\n"); - printk("%s",msg); - + printk(KERN_INFO PFX "%s",msg); + cdu31a_queue = blk_init_queue(do_cdu31a_request, &cdu31a_lock); if (!cdu31a_queue) goto errout0; @@ -3278,18 +3196,18 @@ add_disk(disk); disk_changed = 1; - return (0); + return 0; err: blk_cleanup_queue(cdu31a_queue); errout0: if (cdu31a_irq) free_irq(cdu31a_irq, NULL); - printk("Unable to register CDU-31a with Uniform cdrom driver\n"); + printk(KERN_ERR PFX "Unable to register with Uniform cdrom driver\n"); put_disk(disk); errout1: if (unregister_blkdev(MAJOR_NR, "cdu31a")) { - printk("Can't unregister block device for cdu31a\n"); + printk(KERN_WARNING PFX "Can't unregister block device\n"); } errout2: release_region(cdu31a_port, 4); @@ -3303,12 +3221,12 @@ del_gendisk(scd_gendisk); put_disk(scd_gendisk); if (unregister_cdrom(&scd_info)) { - printk - ("Can't unregister cdu31a from Uniform cdrom driver\n"); + printk(KERN_WARNING PFX "Can't unregister from Uniform " + "cdrom driver\n"); return; } if ((unregister_blkdev(MAJOR_NR, "cdu31a") == -EINVAL)) { - printk("Can't unregister cdu31a\n"); + printk(KERN_WARNING PFX "Can't unregister\n"); return; } @@ -3318,7 +3236,7 @@ free_irq(cdu31a_irq, NULL); release_region(cdu31a_port, 4); - printk(KERN_INFO "cdu31a module released.\n"); + printk(KERN_INFO PFX "module released.\n"); } #ifdef MODULE diff -Nru a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c --- a/drivers/cdrom/mcd.c 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,1565 +0,0 @@ -/* - linux/kernel/blk_drv/mcd.c - Mitsumi CDROM driver - - Copyright (C) 1992 Martin Harriss - Portions Copyright (C) 2001 Red Hat - - martin@bdsi.com (no longer valid - where are you now, Martin?) - - 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, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - HISTORY - - 0.1 First attempt - internal use only - 0.2 Cleaned up delays and use of timer - alpha release - 0.3 Audio support added - 0.3.1 Changes for mitsumi CRMC LU005S march version - (stud11@cc4.kuleuven.ac.be) - 0.3.2 bug fixes to the ioctls and merged with ALPHA0.99-pl12 - (Jon Tombs ) - 0.3.3 Added more #defines and mcd_setup() - (Jon Tombs ) - - October 1993 Bernd Huebner and Ruediger Helsch, Unifix Software GmbH, - Braunschweig, Germany: rework to speed up data read operation. - Also enabled definition of irq and address from bootstrap, using the - environment. - November 93 added code for FX001 S,D (single & double speed). - February 94 added code for broken M 5/6 series of 16-bit single speed. - - - 0.4 - Added support for loadable MODULEs, so mcd can now also be loaded by - insmod and removed by rmmod during runtime. - Werner Zimmermann (zimmerma@rz.fht-esslingen.de), Mar. 26, 95 - - 0.5 - I added code for FX001 D to drop from double speed to single speed - when encountering errors... this helps with some "problematic" CD's - that are supposedly "OUT OF TOLERANCE" (but are really shitty presses!) - severely scratched, or possibly slightly warped! I have noticed that - the Mitsumi 2x/4x drives are just less tolerant and the firmware is - not smart enough to drop speed, so let's just kludge it with software! - ****** THE 4X SPEED MITSUMI DRIVES HAVE THE SAME PROBLEM!!!!!! ****** - Anyone want to "DONATE" one to me?! ;) I hear sometimes they are - even WORSE! ;) - ** HINT... HINT... TAKE NOTES MITSUMI This could save some hassles with - certain "large" CD's that have data on the outside edge in your - DOS DRIVERS .... Accuracy counts... speed is secondary ;) - 17 June 95 Modifications By Andrew J. Kroll - 07 July 1995 Modifications by Andrew J. Kroll - - Bjorn Ekwall added unregister_blkdev to mcd_init() - - Michael K. Johnson added retries on open - for slow drives which take a while to recognize that they contain - a CD. - - November 1997 -- ported to the Uniform CD-ROM driver by Erik Andersen. - March 1999 -- made io base and irq CONFIG_ options (Tigran Aivazian). - - November 1999 -- Make kernel-parameter implementation work with 2.3.x - Removed init_module & cleanup_module in favor of - module_init & module_exit. - Torben Mathiasen - - September 2001 - Reformatted and cleaned up the code - Alan Cox -*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* #define REALLY_SLOW_IO */ -#include -#include -#include -#include -#include - -#include "mcd.h" - -/* I added A flag to drop to 1x speed if too many errors 0 = 1X ; 1 = 2X */ -static int mcdDouble; - -/* How many sectors to hold at 1x speed counter */ -static int mcd1xhold; - -/* Is the drive connected properly and responding?? */ -static int mcdPresent; -static struct request_queue *mcd_queue; - -#define MAJOR_NR MITSUMI_CDROM_MAJOR -#define QUEUE (mcd_queue) -#define CURRENT elv_next_request(mcd_queue) - -#define QUICK_LOOP_DELAY udelay(45) /* use udelay */ -#define QUICK_LOOP_COUNT 20 - -static int current_valid(void) -{ - return CURRENT && - CURRENT->cmd == READ && - CURRENT->sector != -1; -} - -#define MFL_STATUSorDATA (MFL_STATUS | MFL_DATA) -#define MCD_BUF_SIZ 16 -static volatile int mcd_transfer_is_active; -static char mcd_buf[2048 * MCD_BUF_SIZ]; /* buffer for block size conversion */ -static volatile int mcd_buf_bn[MCD_BUF_SIZ], mcd_next_bn; -static volatile int mcd_buf_in, mcd_buf_out = -1; -static volatile int mcd_error; -static int mcd_open_count; -enum mcd_state_e { - MCD_S_IDLE, /* 0 */ - MCD_S_START, /* 1 */ - MCD_S_MODE, /* 2 */ - MCD_S_READ, /* 3 */ - MCD_S_DATA, /* 4 */ - MCD_S_STOP, /* 5 */ - MCD_S_STOPPING /* 6 */ -}; -static volatile enum mcd_state_e mcd_state = MCD_S_IDLE; -static int mcd_mode = -1; -static int MCMD_DATA_READ = MCMD_PLAY_READ; - -#define READ_TIMEOUT 3000 - -int mitsumi_bug_93_wait; - -static short mcd_port = CONFIG_MCD_BASE; /* used as "mcd" by "insmod" */ -static int mcd_irq = CONFIG_MCD_IRQ; /* must directly follow mcd_port */ - -static int McdTimeout, McdTries; -static DECLARE_WAIT_QUEUE_HEAD(mcd_waitq); - -static struct mcd_DiskInfo DiskInfo; -static struct mcd_Toc Toc[MAX_TRACKS]; -static struct mcd_Play_msf mcd_Play; - -static int audioStatus; -static char mcdDiskChanged; -static char tocUpToDate; -static char mcdVersion; - -static void mcd_transfer(void); -static void mcd_poll(unsigned long dummy); -static void mcd_invalidate_buffers(void); -static void hsg2msf(long hsg, struct msf *msf); -static void bin2bcd(unsigned char *p); -static int bcd2bin(unsigned char bcd); -static int mcdStatus(void); -static void sendMcdCmd(int cmd, struct mcd_Play_msf *params); -static int getMcdStatus(int timeout); -static int GetQChannelInfo(struct mcd_Toc *qp); -static int updateToc(void); -static int GetDiskInfo(void); -static int GetToc(void); -static int getValue(unsigned char *result); -static int mcd_open(struct cdrom_device_info *cdi, int purpose); -static void mcd_release(struct cdrom_device_info *cdi); -static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr); -static int mcd_tray_move(struct cdrom_device_info *cdi, int position); -static DEFINE_SPINLOCK(mcd_spinlock); -static int mcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, - void *arg); -static int mcd_drive_status(struct cdrom_device_info *cdi, int slot_nr); - -static struct timer_list mcd_timer = TIMER_INITIALIZER(NULL, 0, 0); - -static struct cdrom_device_ops mcd_dops = { - .open = mcd_open, - .release = mcd_release, - .drive_status = mcd_drive_status, - .media_changed = mcd_media_changed, - .tray_move = mcd_tray_move, - .audio_ioctl = mcd_audio_ioctl, - .capability = CDC_OPEN_TRAY | CDC_MEDIA_CHANGED | - CDC_PLAY_AUDIO | CDC_DRIVE_STATUS, -}; - -static struct cdrom_device_info mcd_info = { - .ops = &mcd_dops, - .speed = 2, - .capacity = 1, - .name = "mcd", -}; - -static int mcd_block_open(struct inode *inode, struct file *file) -{ - return cdrom_open(&mcd_info, inode, file); -} - -static int mcd_block_release(struct inode *inode, struct file *file) -{ - return cdrom_release(&mcd_info, file); -} - -static int mcd_block_ioctl(struct inode *inode, struct file *file, - unsigned cmd, unsigned long arg) -{ - return cdrom_ioctl(file, &mcd_info, inode, cmd, arg); -} - -static int mcd_block_media_changed(struct gendisk *disk) -{ - return cdrom_media_changed(&mcd_info); -} - -static struct block_device_operations mcd_bdops = -{ - .owner = THIS_MODULE, - .open = mcd_block_open, - .release = mcd_block_release, - .ioctl = mcd_block_ioctl, - .media_changed = mcd_block_media_changed, -}; - -static struct gendisk *mcd_gendisk; - -static int __init mcd_setup(const char *str) -{ - int ints[9]; - - (void) get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - mcd_port = ints[1]; - if (ints[0] > 1) - mcd_irq = ints[2]; - if (ints[0] > 2) - mitsumi_bug_93_wait = ints[3]; - - return 1; -} - -__setup("mcd=", mcd_setup); - -#ifdef MODULE -static int __init param_set_mcd(const char *val, struct kernel_param *kp) -{ - mcd_setup(val); - return 0; -} -module_param_call(mcd, param_set_mcd, NULL, NULL, 0); -#endif - -static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr) -{ - return 0; -} - - -/* - * Do a 'get status' command and get the result. Only use from the top half - * because it calls 'getMcdStatus' which sleeps. - */ - -static int statusCmd(void) -{ - int st = -1, retry; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - /* send get-status cmd */ - outb(MCMD_GET_STATUS, MCDPORT(0)); - - st = getMcdStatus(MCD_STATUS_DELAY); - if (st != -1) - break; - } - - return st; -} - - -/* - * Send a 'Play' command and get the status. Use only from the top half. - */ - -static int mcdPlay(struct mcd_Play_msf *arg) -{ - int retry, st = -1; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - sendMcdCmd(MCMD_PLAY_READ, arg); - st = getMcdStatus(2 * MCD_STATUS_DELAY); - if (st != -1) - break; - } - - return st; -} - - -static int mcd_tray_move(struct cdrom_device_info *cdi, int position) -{ - int i; - if (position) { - /* Eject */ - /* all drives can at least stop! */ - if (audioStatus == CDROM_AUDIO_PLAY) { - outb(MCMD_STOP, MCDPORT(0)); - i = getMcdStatus(MCD_STATUS_DELAY); - } - - audioStatus = CDROM_AUDIO_NO_STATUS; - - outb(MCMD_EJECT, MCDPORT(0)); - /* - * the status (i) shows failure on all but the FX drives. - * But nothing we can do about that in software! - * So just read the status and forget it. - Jon. - */ - i = getMcdStatus(MCD_STATUS_DELAY); - return 0; - } else - return -EINVAL; -} - -long msf2hsg(struct msf *mp) -{ - return bcd2bin(mp->frame) + bcd2bin(mp->sec) * 75 + bcd2bin(mp->min) * 4500 - 150; -} - - -int mcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, - void *arg) -{ - int i, st; - struct mcd_Toc qInfo; - struct cdrom_ti *ti; - struct cdrom_tochdr *tocHdr; - struct cdrom_msf *msf; - struct cdrom_subchnl *subchnl; - struct cdrom_tocentry *entry; - struct mcd_Toc *tocPtr; - struct cdrom_volctrl *volctrl; - - st = statusCmd(); - if (st < 0) - return -EIO; - - if (!tocUpToDate) { - i = updateToc(); - if (i < 0) - return i; /* error reading TOC */ - } - - switch (cmd) { - case CDROMSTART: /* Spin up the drive */ - /* Don't think we can do this. Even if we could, - * I think the drive times out and stops after a while - * anyway. For now, ignore it. - */ - - return 0; - - case CDROMSTOP: /* Spin down the drive */ - outb(MCMD_STOP, MCDPORT(0)); - i = getMcdStatus(MCD_STATUS_DELAY); - - /* should we do anything if it fails? */ - - audioStatus = CDROM_AUDIO_NO_STATUS; - return 0; - - case CDROMPAUSE: /* Pause the drive */ - if (audioStatus != CDROM_AUDIO_PLAY) - return -EINVAL; - - outb(MCMD_STOP, MCDPORT(0)); - i = getMcdStatus(MCD_STATUS_DELAY); - - if (GetQChannelInfo(&qInfo) < 0) { - /* didn't get q channel info */ - - audioStatus = CDROM_AUDIO_NO_STATUS; - return 0; - } - - mcd_Play.start = qInfo.diskTime; /* remember restart point */ - - audioStatus = CDROM_AUDIO_PAUSED; - return 0; - - case CDROMRESUME: /* Play it again, Sam */ - if (audioStatus != CDROM_AUDIO_PAUSED) - return -EINVAL; - - /* restart the drive at the saved position. */ - - i = mcdPlay(&mcd_Play); - if (i < 0) { - audioStatus = CDROM_AUDIO_ERROR; - return -EIO; - } - - audioStatus = CDROM_AUDIO_PLAY; - return 0; - - case CDROMPLAYTRKIND: /* Play a track. This currently ignores index. */ - - ti = (struct cdrom_ti *) arg; - - if (ti->cdti_trk0 < DiskInfo.first - || ti->cdti_trk0 > DiskInfo.last - || ti->cdti_trk1 < ti->cdti_trk0) { - return -EINVAL; - } - - if (ti->cdti_trk1 > DiskInfo.last) - ti->cdti_trk1 = DiskInfo.last; - - mcd_Play.start = Toc[ti->cdti_trk0].diskTime; - mcd_Play.end = Toc[ti->cdti_trk1 + 1].diskTime; - -#ifdef MCD_DEBUG - printk("play: %02x:%02x.%02x to %02x:%02x.%02x\n", - mcd_Play.start.min, mcd_Play.start.sec, - mcd_Play.start.frame, mcd_Play.end.min, - mcd_Play.end.sec, mcd_Play.end.frame); -#endif - - i = mcdPlay(&mcd_Play); - if (i < 0) { - audioStatus = CDROM_AUDIO_ERROR; - return -EIO; - } - - audioStatus = CDROM_AUDIO_PLAY; - return 0; - - case CDROMPLAYMSF: /* Play starting at the given MSF address. */ - - if (audioStatus == CDROM_AUDIO_PLAY) { - outb(MCMD_STOP, MCDPORT(0)); - i = getMcdStatus(MCD_STATUS_DELAY); - audioStatus = CDROM_AUDIO_NO_STATUS; - } - - msf = (struct cdrom_msf *) arg; - - /* convert to bcd */ - - bin2bcd(&msf->cdmsf_min0); - bin2bcd(&msf->cdmsf_sec0); - bin2bcd(&msf->cdmsf_frame0); - bin2bcd(&msf->cdmsf_min1); - bin2bcd(&msf->cdmsf_sec1); - bin2bcd(&msf->cdmsf_frame1); - - mcd_Play.start.min = msf->cdmsf_min0; - mcd_Play.start.sec = msf->cdmsf_sec0; - mcd_Play.start.frame = msf->cdmsf_frame0; - mcd_Play.end.min = msf->cdmsf_min1; - mcd_Play.end.sec = msf->cdmsf_sec1; - mcd_Play.end.frame = msf->cdmsf_frame1; - -#ifdef MCD_DEBUG - printk("play: %02x:%02x.%02x to %02x:%02x.%02x\n", - mcd_Play.start.min, mcd_Play.start.sec, - mcd_Play.start.frame, mcd_Play.end.min, - mcd_Play.end.sec, mcd_Play.end.frame); -#endif - - i = mcdPlay(&mcd_Play); - if (i < 0) { - audioStatus = CDROM_AUDIO_ERROR; - return -EIO; - } - - audioStatus = CDROM_AUDIO_PLAY; - return 0; - - case CDROMREADTOCHDR: /* Read the table of contents header */ - tocHdr = (struct cdrom_tochdr *) arg; - tocHdr->cdth_trk0 = DiskInfo.first; - tocHdr->cdth_trk1 = DiskInfo.last; - return 0; - - case CDROMREADTOCENTRY: /* Read an entry in the table of contents */ - entry = (struct cdrom_tocentry *) arg; - if (entry->cdte_track == CDROM_LEADOUT) - tocPtr = &Toc[DiskInfo.last - DiskInfo.first + 1]; - - else if (entry->cdte_track > DiskInfo.last - || entry->cdte_track < DiskInfo.first) - return -EINVAL; - - else - tocPtr = &Toc[entry->cdte_track]; - - entry->cdte_adr = tocPtr->ctrl_addr; - entry->cdte_ctrl = tocPtr->ctrl_addr >> 4; - - if (entry->cdte_format == CDROM_LBA) - entry->cdte_addr.lba = msf2hsg(&tocPtr->diskTime); - - else if (entry->cdte_format == CDROM_MSF) { - entry->cdte_addr.msf.minute = - bcd2bin(tocPtr->diskTime.min); - entry->cdte_addr.msf.second = - bcd2bin(tocPtr->diskTime.sec); - entry->cdte_addr.msf.frame = - bcd2bin(tocPtr->diskTime.frame); - } - - else - return -EINVAL; - - return 0; - - case CDROMSUBCHNL: /* Get subchannel info */ - - subchnl = (struct cdrom_subchnl *) arg; - if (GetQChannelInfo(&qInfo) < 0) - return -EIO; - - subchnl->cdsc_audiostatus = audioStatus; - subchnl->cdsc_adr = qInfo.ctrl_addr; - subchnl->cdsc_ctrl = qInfo.ctrl_addr >> 4; - subchnl->cdsc_trk = bcd2bin(qInfo.track); - subchnl->cdsc_ind = bcd2bin(qInfo.pointIndex); - subchnl->cdsc_absaddr.msf.minute = bcd2bin(qInfo.diskTime.min); - subchnl->cdsc_absaddr.msf.second = bcd2bin(qInfo.diskTime.sec); - subchnl->cdsc_absaddr.msf.frame = bcd2bin(qInfo.diskTime.frame); - subchnl->cdsc_reladdr.msf.minute = bcd2bin(qInfo.trackTime.min); - subchnl->cdsc_reladdr.msf.second = bcd2bin(qInfo.trackTime.sec); - subchnl->cdsc_reladdr.msf.frame = bcd2bin(qInfo.trackTime.frame); - return (0); - - case CDROMVOLCTRL: /* Volume control */ - volctrl = (struct cdrom_volctrl *) arg; - outb(MCMD_SET_VOLUME, MCDPORT(0)); - outb(volctrl->channel0, MCDPORT(0)); - outb(255, MCDPORT(0)); - outb(volctrl->channel1, MCDPORT(0)); - outb(255, MCDPORT(0)); - - i = getMcdStatus(MCD_STATUS_DELAY); - if (i < 0) - return -EIO; - - { - char a, b, c, d; - - getValue(&a); - getValue(&b); - getValue(&c); - getValue(&d); - } - - return 0; - - default: - return -EINVAL; - } -} - -/* - * Take care of the different block sizes between cdrom and Linux. - * When Linux gets variable block sizes this will probably go away. - */ - -static void mcd_transfer(void) -{ - if (!current_valid()) - return; - - while (CURRENT->nr_sectors) { - int bn = CURRENT->sector / 4; - int i; - for (i = 0; i < MCD_BUF_SIZ && mcd_buf_bn[i] != bn; ++i) - ; - if (i < MCD_BUF_SIZ) { - int offs =(i * 4 + (CURRENT->sector & 3)) * 512; - int nr_sectors = 4 - (CURRENT->sector & 3); - if (mcd_buf_out != i) { - mcd_buf_out = i; - if (mcd_buf_bn[i] != bn) { - mcd_buf_out = -1; - continue; - } - } - if (nr_sectors > CURRENT->nr_sectors) - nr_sectors = CURRENT->nr_sectors; - memcpy(CURRENT->buffer, mcd_buf + offs, nr_sectors * 512); - CURRENT->nr_sectors -= nr_sectors; - CURRENT->sector += nr_sectors; - CURRENT->buffer += nr_sectors * 512; - } else { - mcd_buf_out = -1; - break; - } - } -} - - -/* - * We only seem to get interrupts after an error. - * Just take the interrupt and clear out the status reg. - */ - -static irqreturn_t mcd_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - int st; - - st = inb(MCDPORT(1)) & 0xFF; - test1(printk("", st)); - if (!(st & MFL_STATUS)) { - st = inb(MCDPORT(0)) & 0xFF; - test1(printk("", st)); - if ((st & 0xFF) != 0xFF) - mcd_error = st ? st & 0xFF : -1; - } - return IRQ_HANDLED; -} - - -static void do_mcd_request(request_queue_t * q) -{ - test2(printk(" do_mcd_request(%ld+%ld)\n", CURRENT->sector, - CURRENT->nr_sectors)); - - mcd_transfer_is_active = 1; - while (current_valid()) { - mcd_transfer(); - if (CURRENT->nr_sectors == 0) { - end_request(CURRENT, 1); - } else { - mcd_buf_out = -1; /* Want to read a block not in buffer */ - if (mcd_state == MCD_S_IDLE) { - if (!tocUpToDate) { - if (updateToc() < 0) { - while (current_valid()) - end_request(CURRENT, 0); - break; - } - } - mcd_state = MCD_S_START; - McdTries = 5; - mcd_timer.function = mcd_poll; - mod_timer(&mcd_timer, jiffies + 1); - } - break; - } - } - mcd_transfer_is_active = 0; - test2(printk(" do_mcd_request ends\n")); -} - - - -static void mcd_poll(unsigned long dummy) -{ - int st; - - - if (mcd_error) { - if (mcd_error & 0xA5) { - printk(KERN_ERR "mcd: I/O error 0x%02x", mcd_error); - if (mcd_error & 0x80) - printk(" (Door open)"); - if (mcd_error & 0x20) - printk(" (Disk changed)"); - if (mcd_error & 0x04) { - printk(" (Read error)"); /* Bitch about the problem. */ - - /* Time to get fancy! If at 2x speed and 1 error, drop to 1x speed! */ - /* Interesting how it STAYS at MCD_RETRY_ATTEMPTS on first error! */ - /* But I find that rather HANDY!!! */ - /* Neat! it REALLY WORKS on those LOW QUALITY CD's!!! Smile! :) */ - /* AJK [06/17/95] */ - - /* Slap the CD down to single speed! */ - if (mcdDouble == 1 - && McdTries == MCD_RETRY_ATTEMPTS - && MCMD_DATA_READ == MCMD_2X_READ) { - MCMD_DATA_READ = MCMD_PLAY_READ; /* Uhhh, Ummmm, muhuh-huh! */ - mcd1xhold = SINGLE_HOLD_SECTORS; /* Hey Beavis! */ - printk(" Speed now 1x"); /* Pull my finger! */ - } - } - printk("\n"); - mcd_invalidate_buffers(); -#ifdef WARN_IF_READ_FAILURE - if (McdTries == MCD_RETRY_ATTEMPTS) - printk(KERN_ERR "mcd: read of block %d failed\n", - mcd_next_bn); -#endif - if (!McdTries--) { - /* Nuts! This cd is ready for recycling! */ - /* When WAS the last time YOU cleaned it CORRECTLY?! */ - printk(KERN_ERR "mcd: read of block %d failed, giving up\n", - mcd_next_bn); - if (mcd_transfer_is_active) { - McdTries = 0; - goto ret; - } - if (current_valid()) - end_request(CURRENT, 0); - McdTries = MCD_RETRY_ATTEMPTS; - } - } - mcd_error = 0; - mcd_state = MCD_S_STOP; - } - /* Switch back to Double speed if enough GOOD sectors were read! */ - - /* Are we a double speed with a crappy CD?! */ - if (mcdDouble == 1 && McdTries == MCD_RETRY_ATTEMPTS - && MCMD_DATA_READ == MCMD_PLAY_READ) { - /* We ARE a double speed and we ARE bitching! */ - if (mcd1xhold == 0) { /* Okay, Like are we STILL at single speed? *//* We need to switch back to double speed now... */ - MCMD_DATA_READ = MCMD_2X_READ; /* Uhhh... BACK You GO! */ - printk(KERN_INFO "mcd: Switching back to 2X speed!\n"); /* Tell 'em! */ - } else - mcd1xhold--; /* No?! Count down the good reads some more... */ - /* and try, try again! */ - } - -immediately: - switch (mcd_state) { - case MCD_S_IDLE: - test3(printk("MCD_S_IDLE\n")); - goto out; - - case MCD_S_START: - test3(printk("MCD_S_START\n")); - outb(MCMD_GET_STATUS, MCDPORT(0)); - mcd_state = mcd_mode == 1 ? MCD_S_READ : MCD_S_MODE; - McdTimeout = 3000; - break; - - case MCD_S_MODE: - test3(printk("MCD_S_MODE\n")); - if ((st = mcdStatus()) != -1) { - if (st & MST_DSK_CHG) { - mcdDiskChanged = 1; - tocUpToDate = 0; - mcd_invalidate_buffers(); - } - -set_mode_immediately: - if ((st & MST_DOOR_OPEN) || !(st & MST_READY)) { - mcdDiskChanged = 1; - tocUpToDate = 0; - if (mcd_transfer_is_active) { - mcd_state = MCD_S_START; - goto immediately; - } - printk(KERN_INFO); - printk((st & MST_DOOR_OPEN) ? - "mcd: door open\n" : - "mcd: disk removed\n"); - mcd_state = MCD_S_IDLE; - while (current_valid()) - end_request(CURRENT, 0); - goto out; - } - outb(MCMD_SET_MODE, MCDPORT(0)); - outb(1, MCDPORT(0)); - mcd_mode = 1; - mcd_state = MCD_S_READ; - McdTimeout = 3000; - } - break; - - case MCD_S_READ: - test3(printk("MCD_S_READ\n")); - if ((st = mcdStatus()) != -1) { - if (st & MST_DSK_CHG) { - mcdDiskChanged = 1; - tocUpToDate = 0; - mcd_invalidate_buffers(); - } - -read_immediately: - if ((st & MST_DOOR_OPEN) || !(st & MST_READY)) { - mcdDiskChanged = 1; - tocUpToDate = 0; - if (mcd_transfer_is_active) { - mcd_state = MCD_S_START; - goto immediately; - } - printk(KERN_INFO); - printk((st & MST_DOOR_OPEN) ? - "mcd: door open\n" : - "mcd: disk removed\n"); - mcd_state = MCD_S_IDLE; - while (current_valid()) - end_request(CURRENT, 0); - goto out; - } - - if (current_valid()) { - struct mcd_Play_msf msf; - mcd_next_bn = CURRENT->sector / 4; - hsg2msf(mcd_next_bn, &msf.start); - msf.end.min = ~0; - msf.end.sec = ~0; - msf.end.frame = ~0; - sendMcdCmd(MCMD_DATA_READ, &msf); - mcd_state = MCD_S_DATA; - McdTimeout = READ_TIMEOUT; - } else { - mcd_state = MCD_S_STOP; - goto immediately; - } - - } - break; - - case MCD_S_DATA: - test3(printk("MCD_S_DATA\n")); - st = inb(MCDPORT(1)) & (MFL_STATUSorDATA); -data_immediately: - test5(printk("Status %02x\n", st)) - switch (st) { - case MFL_DATA: -#ifdef WARN_IF_READ_FAILURE - if (McdTries == 5) - printk(KERN_WARNING "mcd: read of block %d failed\n", - mcd_next_bn); -#endif - if (!McdTries--) { - printk(KERN_ERR "mcd: read of block %d failed, giving up\n", mcd_next_bn); - if (mcd_transfer_is_active) { - McdTries = 0; - break; - } - if (current_valid()) - end_request(CURRENT, 0); - McdTries = 5; - } - mcd_state = MCD_S_START; - McdTimeout = READ_TIMEOUT; - goto immediately; - - case MFL_STATUSorDATA: - break; - - default: - McdTries = 5; - if (!current_valid() && mcd_buf_in == mcd_buf_out) { - mcd_state = MCD_S_STOP; - goto immediately; - } - mcd_buf_bn[mcd_buf_in] = -1; - insb(MCDPORT(0), mcd_buf + 2048 * mcd_buf_in, - 2048); - mcd_buf_bn[mcd_buf_in] = mcd_next_bn++; - if (mcd_buf_out == -1) - mcd_buf_out = mcd_buf_in; - mcd_buf_in = mcd_buf_in + 1 == MCD_BUF_SIZ ? 0 : mcd_buf_in + 1; - if (!mcd_transfer_is_active) { - while (current_valid()) { - mcd_transfer(); - if (CURRENT->nr_sectors == 0) - end_request(CURRENT, 1); - else - break; - } - } - - if (current_valid() - && (CURRENT->sector / 4 < mcd_next_bn || - CURRENT->sector / 4 > mcd_next_bn + 16)) { - mcd_state = MCD_S_STOP; - goto immediately; - } - McdTimeout = READ_TIMEOUT; - { - int count = QUICK_LOOP_COUNT; - while (count--) { - QUICK_LOOP_DELAY; - if ((st = (inb(MCDPORT(1))) & (MFL_STATUSorDATA)) != (MFL_STATUSorDATA)) { - test4(printk(" %d ", QUICK_LOOP_COUNT - count)); - goto data_immediately; - } - } - test4(printk("ended ")); - } - break; - } - break; - - case MCD_S_STOP: - test3(printk("MCD_S_STOP\n")); - if (!mitsumi_bug_93_wait) - goto do_not_work_around_mitsumi_bug_93_1; - - McdTimeout = mitsumi_bug_93_wait; - mcd_state = 9 + 3 + 1; - break; - - case 9 + 3 + 1: - if (McdTimeout) - break; - -do_not_work_around_mitsumi_bug_93_1: - outb(MCMD_STOP, MCDPORT(0)); - if ((inb(MCDPORT(1)) & MFL_STATUSorDATA) == MFL_STATUS) { - int i = 4096; - do { - inb(MCDPORT(0)); - } while ((inb(MCDPORT(1)) & MFL_STATUSorDATA) == MFL_STATUS && --i); - outb(MCMD_STOP, MCDPORT(0)); - if ((inb(MCDPORT(1)) & MFL_STATUSorDATA) == MFL_STATUS) { - i = 4096; - do { - inb(MCDPORT(0)); - } while ((inb(MCDPORT(1)) & MFL_STATUSorDATA) == MFL_STATUS && --i); - outb(MCMD_STOP, MCDPORT(0)); - } - } - - mcd_state = MCD_S_STOPPING; - McdTimeout = 1000; - break; - - case MCD_S_STOPPING: - test3(printk("MCD_S_STOPPING\n")); - if ((st = mcdStatus()) == -1 && McdTimeout) - break; - - if ((st != -1) && (st & MST_DSK_CHG)) { - mcdDiskChanged = 1; - tocUpToDate = 0; - mcd_invalidate_buffers(); - } - if (!mitsumi_bug_93_wait) - goto do_not_work_around_mitsumi_bug_93_2; - - McdTimeout = mitsumi_bug_93_wait; - mcd_state = 9 + 3 + 2; - break; - - case 9 + 3 + 2: - if (McdTimeout) - break; - st = -1; - -do_not_work_around_mitsumi_bug_93_2: - test3(printk("CURRENT_VALID %d mcd_mode %d\n", current_valid(), - mcd_mode)); - if (current_valid()) { - if (st != -1) { - if (mcd_mode == 1) - goto read_immediately; - else - goto set_mode_immediately; - } else { - mcd_state = MCD_S_START; - McdTimeout = 1; - } - } else { - mcd_state = MCD_S_IDLE; - goto out; - } - break; - default: - printk(KERN_ERR "mcd: invalid state %d\n", mcd_state); - goto out; - } -ret: - if (!McdTimeout--) { - printk(KERN_WARNING "mcd: timeout in state %d\n", mcd_state); - mcd_state = MCD_S_STOP; - } - mcd_timer.function = mcd_poll; - mod_timer(&mcd_timer, jiffies + 1); -out: - return; -} - -static void mcd_invalidate_buffers(void) -{ - int i; - for (i = 0; i < MCD_BUF_SIZ; ++i) - mcd_buf_bn[i] = -1; - mcd_buf_out = -1; -} - -/* - * Open the device special file. Check that a disk is in. - */ -static int mcd_open(struct cdrom_device_info *cdi, int purpose) -{ - int st, count = 0; - if (mcdPresent == 0) - return -ENXIO; /* no hardware */ - - if (mcd_open_count || mcd_state != MCD_S_IDLE) - goto bump_count; - - mcd_invalidate_buffers(); - do { - st = statusCmd(); /* check drive status */ - if (st == -1) - goto err_out; /* drive doesn't respond */ - if ((st & MST_READY) == 0) /* no disk? wait a sec... */ - msleep(1000); - - } while (((st & MST_READY) == 0) && count++ < MCD_RETRY_ATTEMPTS); - - if (updateToc() < 0) - goto err_out; - -bump_count: - ++mcd_open_count; - return 0; - -err_out: - return -EIO; -} - - -/* - * On close, we flush all mcd blocks from the buffer cache. - */ -static void mcd_release(struct cdrom_device_info *cdi) -{ - if (!--mcd_open_count) { - mcd_invalidate_buffers(); - } -} - -/* - * Test for presence of drive and initialize it. Called at boot time. - */ - -int __init mcd_init(void) -{ - struct gendisk *disk = alloc_disk(1); - int count; - unsigned char result[3]; - char msg[80]; - - if (!disk) { - printk(KERN_INFO "mcd: can't allocated disk.\n"); - return -ENOMEM; - } - if (mcd_port <= 0 || mcd_irq <= 0) { - printk(KERN_INFO "mcd: not probing.\n"); - put_disk(disk); - return -EIO; - } - if (register_blkdev(MAJOR_NR, "mcd")) { - put_disk(disk); - return -EIO; - } - if (!request_region(mcd_port, 4, "mcd")) { - printk(KERN_ERR "mcd: Initialization failed, I/O port (%X) already in use\n", mcd_port); - goto out_region; - } - - mcd_queue = blk_init_queue(do_mcd_request, &mcd_spinlock); - if (!mcd_queue) - goto out_queue; - - /* check for card */ - - outb(0, MCDPORT(1)); /* send reset */ - for (count = 0; count < 2000000; count++) - (void) inb(MCDPORT(1)); /* delay a bit */ - - outb(0x40, MCDPORT(0)); /* send get-stat cmd */ - for (count = 0; count < 2000000; count++) - if (!(inb(MCDPORT(1)) & MFL_STATUS)) - break; - - if (count >= 2000000) { - printk(KERN_INFO "mcd: initialisation failed - No mcd device at 0x%x irq %d\n", - mcd_port, mcd_irq); - goto out_probe; - } - count = inb(MCDPORT(0)); /* pick up the status */ - - outb(MCMD_GET_VERSION, MCDPORT(0)); - for (count = 0; count < 3; count++) - if (getValue(result + count)) { - printk(KERN_ERR "mcd: mitsumi get version failed at 0x%x\n", - mcd_port); - goto out_probe; - } - - if (result[0] == result[1] && result[1] == result[2]) - goto out_probe; - - mcdVersion = result[2]; - - if (mcdVersion >= 4) - outb(4, MCDPORT(2)); /* magic happens */ - - /* don't get the IRQ until we know for sure the drive is there */ - - if (request_irq(mcd_irq, mcd_interrupt, SA_INTERRUPT, "Mitsumi CD", NULL)) { - printk(KERN_ERR "mcd: Unable to get IRQ%d for Mitsumi CD-ROM\n", mcd_irq); - goto out_probe; - } - - if (result[1] == 'D') { - MCMD_DATA_READ = MCMD_2X_READ; - /* Added flag to drop to 1x speed if too many errors */ - mcdDouble = 1; - } else - mcd_info.speed = 1; - sprintf(msg, " mcd: Mitsumi %s Speed CD-ROM at port=0x%x," - " irq=%d\n", mcd_info.speed == 1 ? "Single" : "Double", - mcd_port, mcd_irq); - - outb(MCMD_CONFIG_DRIVE, MCDPORT(0)); - outb(0x02, MCDPORT(0)); - outb(0x00, MCDPORT(0)); - getValue(result); - - outb(MCMD_CONFIG_DRIVE, MCDPORT(0)); - outb(0x10, MCDPORT(0)); - outb(0x04, MCDPORT(0)); - getValue(result); - - mcd_invalidate_buffers(); - mcdPresent = 1; - - disk->major = MAJOR_NR; - disk->first_minor = 0; - sprintf(disk->disk_name, "mcd"); - disk->fops = &mcd_bdops; - disk->flags = GENHD_FL_CD; - mcd_gendisk = disk; - - if (register_cdrom(&mcd_info) != 0) { - printk(KERN_ERR "mcd: Unable to register Mitsumi CD-ROM.\n"); - goto out_cdrom; - } - disk->queue = mcd_queue; - add_disk(disk); - printk(msg); - return 0; - -out_cdrom: - free_irq(mcd_irq, NULL); -out_queue: - release_region(mcd_port, 4); -out_probe: - blk_cleanup_queue(mcd_queue); -out_region: - unregister_blkdev(MAJOR_NR, "mcd"); - put_disk(disk); - return -EIO; -} - - -static void hsg2msf(long hsg, struct msf *msf) -{ - hsg += 150; - msf->min = hsg / 4500; - hsg %= 4500; - msf->sec = hsg / 75; - msf->frame = hsg % 75; - - bin2bcd(&msf->min); /* convert to BCD */ - bin2bcd(&msf->sec); - bin2bcd(&msf->frame); -} - - -static void bin2bcd(unsigned char *p) -{ - int u, t; - - u = *p % 10; - t = *p / 10; - *p = u | (t << 4); -} - -static int bcd2bin(unsigned char bcd) -{ - return (bcd >> 4) * 10 + (bcd & 0xF); -} - - -/* - * See if a status is ready from the drive and return it - * if it is ready. - */ - -static int mcdStatus(void) -{ - int i; - int st; - - st = inb(MCDPORT(1)) & MFL_STATUS; - if (!st) { - i = inb(MCDPORT(0)) & 0xFF; - return i; - } else - return -1; -} - - -/* - * Send a play or read command to the drive - */ - -static void sendMcdCmd(int cmd, struct mcd_Play_msf *params) -{ - outb(cmd, MCDPORT(0)); - outb(params->start.min, MCDPORT(0)); - outb(params->start.sec, MCDPORT(0)); - outb(params->start.frame, MCDPORT(0)); - outb(params->end.min, MCDPORT(0)); - outb(params->end.sec, MCDPORT(0)); - outb(params->end.frame, MCDPORT(0)); -} - - -/* - * Timer interrupt routine to test for status ready from the drive. - * (see the next routine) - */ - -static void mcdStatTimer(unsigned long dummy) -{ - if (!(inb(MCDPORT(1)) & MFL_STATUS)) { - wake_up(&mcd_waitq); - return; - } - - McdTimeout--; - if (McdTimeout <= 0) { - wake_up(&mcd_waitq); - return; - } - mcd_timer.function = mcdStatTimer; - mod_timer(&mcd_timer, jiffies + 1); -} - - -/* - * Wait for a status to be returned from the drive. The actual test - * (see routine above) is done by the timer interrupt to avoid - * excessive rescheduling. - */ - -static int getMcdStatus(int timeout) -{ - int st; - - McdTimeout = timeout; - mcd_timer.function = mcdStatTimer; - mod_timer(&mcd_timer, jiffies + 1); - sleep_on(&mcd_waitq); - if (McdTimeout <= 0) - return -1; - - st = inb(MCDPORT(0)) & 0xFF; - if (st == 0xFF) - return -1; - - if ((st & MST_BUSY) == 0 && audioStatus == CDROM_AUDIO_PLAY) - /* XXX might be an error? look at q-channel? */ - audioStatus = CDROM_AUDIO_COMPLETED; - - if (st & MST_DSK_CHG) { - mcdDiskChanged = 1; - tocUpToDate = 0; - audioStatus = CDROM_AUDIO_NO_STATUS; - } - - return st; -} - - -/* gives current state of the drive This function is quite unreliable, - and should probably be rewritten by someone, eventually... */ - -int mcd_drive_status(struct cdrom_device_info *cdi, int slot_nr) -{ - int st; - - st = statusCmd(); /* check drive status */ - if (st == -1) - return -EIO; /* drive doesn't respond */ - if ((st & MST_READY)) - return CDS_DISC_OK; - if ((st & MST_DOOR_OPEN)) - return CDS_TRAY_OPEN; - if ((st & MST_DSK_CHG)) - return CDS_NO_DISC; - if ((st & MST_BUSY)) - return CDS_DRIVE_NOT_READY; - return -EIO; -} - - -/* - * Read a value from the drive. - */ - -static int getValue(unsigned char *result) -{ - int count; - int s; - - for (count = 0; count < 2000; count++) - if (!(inb(MCDPORT(1)) & MFL_STATUS)) - break; - - if (count >= 2000) { - printk("mcd: getValue timeout\n"); - return -1; - } - - s = inb(MCDPORT(0)) & 0xFF; - *result = (unsigned char) s; - return 0; -} - -/* - * Read the current Q-channel info. Also used for reading the - * table of contents. - */ - -int GetQChannelInfo(struct mcd_Toc *qp) -{ - unsigned char notUsed; - int retry; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - outb(MCMD_GET_Q_CHANNEL, MCDPORT(0)); - if (getMcdStatus(MCD_STATUS_DELAY) != -1) - break; - } - - if (retry >= MCD_RETRY_ATTEMPTS) - return -1; - - if (getValue(&qp->ctrl_addr) < 0) - return -1; - if (getValue(&qp->track) < 0) - return -1; - if (getValue(&qp->pointIndex) < 0) - return -1; - if (getValue(&qp->trackTime.min) < 0) - return -1; - if (getValue(&qp->trackTime.sec) < 0) - return -1; - if (getValue(&qp->trackTime.frame) < 0) - return -1; - if (getValue(¬Used) < 0) - return -1; - if (getValue(&qp->diskTime.min) < 0) - return -1; - if (getValue(&qp->diskTime.sec) < 0) - return -1; - if (getValue(&qp->diskTime.frame) < 0) - return -1; - - return 0; -} - -/* - * Read the table of contents (TOC) and TOC header if necessary - */ - -static int updateToc(void) -{ - if (tocUpToDate) - return 0; - - if (GetDiskInfo() < 0) - return -EIO; - - if (GetToc() < 0) - return -EIO; - - tocUpToDate = 1; - return 0; -} - -/* - * Read the table of contents header - */ - -static int GetDiskInfo(void) -{ - int retry; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - outb(MCMD_GET_DISK_INFO, MCDPORT(0)); - if (getMcdStatus(MCD_STATUS_DELAY) != -1) - break; - } - - if (retry >= MCD_RETRY_ATTEMPTS) - return -1; - - if (getValue(&DiskInfo.first) < 0) - return -1; - if (getValue(&DiskInfo.last) < 0) - return -1; - - DiskInfo.first = bcd2bin(DiskInfo.first); - DiskInfo.last = bcd2bin(DiskInfo.last); - -#ifdef MCD_DEBUG - printk - ("Disk Info: first %d last %d length %02x:%02x.%02x first %02x:%02x.%02x\n", - DiskInfo.first, DiskInfo.last, DiskInfo.diskLength.min, - DiskInfo.diskLength.sec, DiskInfo.diskLength.frame, - DiskInfo.firstTrack.min, DiskInfo.firstTrack.sec, - DiskInfo.firstTrack.frame); -#endif - - if (getValue(&DiskInfo.diskLength.min) < 0) - return -1; - if (getValue(&DiskInfo.diskLength.sec) < 0) - return -1; - if (getValue(&DiskInfo.diskLength.frame) < 0) - return -1; - if (getValue(&DiskInfo.firstTrack.min) < 0) - return -1; - if (getValue(&DiskInfo.firstTrack.sec) < 0) - return -1; - if (getValue(&DiskInfo.firstTrack.frame) < 0) - return -1; - - return 0; -} - -/* - * Read the table of contents (TOC) - */ - -static int GetToc(void) -{ - int i, px; - int limit; - int retry; - struct mcd_Toc qInfo; - - for (i = 0; i < MAX_TRACKS; i++) - Toc[i].pointIndex = 0; - - i = DiskInfo.last + 3; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - outb(MCMD_STOP, MCDPORT(0)); - if (getMcdStatus(MCD_STATUS_DELAY) != -1) - break; - } - - if (retry >= MCD_RETRY_ATTEMPTS) - return -1; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - outb(MCMD_SET_MODE, MCDPORT(0)); - outb(0x05, MCDPORT(0)); /* mode: toc */ - mcd_mode = 0x05; - if (getMcdStatus(MCD_STATUS_DELAY) != -1) - break; - } - - if (retry >= MCD_RETRY_ATTEMPTS) - return -1; - - for (limit = 300; limit > 0; limit--) { - if (GetQChannelInfo(&qInfo) < 0) - break; - - px = bcd2bin(qInfo.pointIndex); - if (px > 0 && px < MAX_TRACKS && qInfo.track == 0) - if (Toc[px].pointIndex == 0) { - Toc[px] = qInfo; - i--; - } - - if (i <= 0) - break; - } - - Toc[DiskInfo.last + 1].diskTime = DiskInfo.diskLength; - - for (retry = 0; retry < MCD_RETRY_ATTEMPTS; retry++) { - outb(MCMD_SET_MODE, MCDPORT(0)); - outb(0x01, MCDPORT(0)); - mcd_mode = 1; - if (getMcdStatus(MCD_STATUS_DELAY) != -1) - break; - } - -#ifdef MCD_DEBUG - for (i = 1; i <= DiskInfo.last; i++) - printk - ("i = %2d ctl-adr = %02X track %2d px %02X %02X:%02X.%02X %02X:%02X.%02X\n", - i, Toc[i].ctrl_addr, Toc[i].track, Toc[i].pointIndex, - Toc[i].trackTime.min, Toc[i].trackTime.sec, - Toc[i].trackTime.frame, Toc[i].diskTime.min, - Toc[i].diskTime.sec, Toc[i].diskTime.frame); - for (i = 100; i < 103; i++) - printk - ("i = %2d ctl-adr = %02X track %2d px %02X %02X:%02X.%02X %02X:%02X.%02X\n", - i, Toc[i].ctrl_addr, Toc[i].track, Toc[i].pointIndex, - Toc[i].trackTime.min, Toc[i].trackTime.sec, - Toc[i].trackTime.frame, Toc[i].diskTime.min, - Toc[i].diskTime.sec, Toc[i].diskTime.frame); -#endif - - return limit > 0 ? 0 : -1; -} - -void __exit mcd_exit(void) -{ - del_gendisk(mcd_gendisk); - put_disk(mcd_gendisk); - if (unregister_cdrom(&mcd_info)) { - printk(KERN_WARNING "Can't unregister cdrom mcd\n"); - return; - } - free_irq(mcd_irq, NULL); - release_region(mcd_port, 4); - if (unregister_blkdev(MAJOR_NR, "mcd")) { - printk(KERN_WARNING "Can't unregister major mcd\n"); - return; - } - blk_cleanup_queue(mcd_queue); - del_timer_sync(&mcd_timer); -} - -#ifdef MODULE -module_init(mcd_init); -#endif -module_exit(mcd_exit); - -MODULE_AUTHOR("Martin Harriss"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_BLOCKDEV_MAJOR(MITSUMI_CDROM_MAJOR); diff -Nru a/drivers/cdrom/mcd.h b/drivers/cdrom/mcd.h --- a/drivers/cdrom/mcd.h 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,106 +0,0 @@ -/* - * Definitions for a Mitsumi CD-ROM interface - * - * Copyright (C) 1992 Martin Harriss - * - * martin@bdsi.com - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -/* Increase this if you get lots of timeouts */ -#define MCD_STATUS_DELAY 1000 - -/* number of times to retry a command before giving up */ -#define MCD_RETRY_ATTEMPTS 10 - -/* port access macro */ -#define MCDPORT(x) (mcd_port + (x)) - -/* How many sectors to read at 1x when an error at 2x speed occurs. */ -/* You can change this to anything from 2 to 32767, but 30 seems to */ -/* work best for me. I have found that when the drive has problems */ -/* reading one sector, it will have troubles reading the next few. */ -#define SINGLE_HOLD_SECTORS 30 - -#define MCMD_2X_READ 0xC1 /* Double Speed Read DON'T TOUCH! */ - -/* status bits */ - -#define MST_CMD_CHECK 0x01 /* command error */ -#define MST_BUSY 0x02 /* now playing */ -#define MST_READ_ERR 0x04 /* read error */ -#define MST_DSK_TYPE 0x08 -#define MST_SERVO_CHECK 0x10 -#define MST_DSK_CHG 0x20 /* disk removed or changed */ -#define MST_READY 0x40 /* disk in the drive */ -#define MST_DOOR_OPEN 0x80 /* door is open */ - -/* flag bits */ - -#define MFL_DATA 0x02 /* data available */ -#define MFL_STATUS 0x04 /* status available */ - -/* commands */ - -#define MCMD_GET_DISK_INFO 0x10 /* read info from disk */ -#define MCMD_GET_Q_CHANNEL 0x20 /* read info from q channel */ -#define MCMD_GET_STATUS 0x40 -#define MCMD_SET_MODE 0x50 -#define MCMD_SOFT_RESET 0x60 -#define MCMD_STOP 0x70 /* stop play */ -#define MCMD_CONFIG_DRIVE 0x90 -#define MCMD_SET_VOLUME 0xAE /* set audio level */ -#define MCMD_PLAY_READ 0xC0 /* play or read data */ -#define MCMD_GET_VERSION 0xDC -#define MCMD_EJECT 0xF6 /* eject (FX drive) */ - -/* borrowed from hd.c */ - -#define MAX_TRACKS 104 - -struct msf { - unsigned char min; - unsigned char sec; - unsigned char frame; -}; - -struct mcd_Play_msf { - struct msf start; - struct msf end; -}; - -struct mcd_DiskInfo { - unsigned char first; - unsigned char last; - struct msf diskLength; - struct msf firstTrack; -}; - -struct mcd_Toc { - unsigned char ctrl_addr; - unsigned char track; - unsigned char pointIndex; - struct msf trackTime; - struct msf diskTime; -}; - -#define test1(x) -#define test2(x) -#define test3(x) -#define test4(x) -#define test5(x) - diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig --- a/drivers/char/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/Kconfig 2005-03-30 16:58:50 -08:00 @@ -59,7 +59,7 @@ config HW_CONSOLE bool - depends on VT && !S390 && !USERMODE + depends on VT && !S390 && !UML default y config SERIAL_NONSTANDARD @@ -247,7 +247,7 @@ config SPECIALIX tristate "Specialix IO8+ card support" - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD help This is a driver for the Specialix IO8+ multiport card (both the ISA and the PCI version) which gives you many serial ports. You @@ -764,6 +764,10 @@ RTC (Realtime Clock) driver for the clock inbuilt into the Samsung S3C2410. This can provide periodic interrupt rates from 1Hz to 64Hz for user programs, and wakeup from Alarm. + +config RTC_VR41XX + tristate "NEC VR4100 series Real Time Clock Support" + depends on CPU_VR41XX config COBALT_LCD bool "Support for Cobalt LCD" diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile --- a/drivers/char/Makefile 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/Makefile 2005-03-30 16:58:50 -08:00 @@ -63,6 +63,7 @@ obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o obj-$(CONFIG_DS1302) += ds1302.o obj-$(CONFIG_S3C2410_RTC) += s3c2410-rtc.o +obj-$(CONFIG_RTC_VR41XX) += vr41xx_rtc.o ifeq ($(CONFIG_GENERIC_NVRAM),y) obj-$(CONFIG_NVRAM) += generic_nvram.o else diff -Nru a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c --- a/drivers/char/agp/backend.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/char/agp/backend.c 2005-03-30 16:58:49 -08:00 @@ -57,6 +57,7 @@ LIST_HEAD(agp_bridges); EXPORT_SYMBOL(agp_bridge); EXPORT_SYMBOL(agp_bridges); +EXPORT_SYMBOL(agp_find_bridge); /** * agp_backend_acquire - attempt to acquire an agp backend. diff -Nru a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c --- a/drivers/char/agp/frontend.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/agp/frontend.c 2005-03-30 16:58:47 -08:00 @@ -628,7 +628,7 @@ DBG("client vm_ops=%p", kerninfo.vm_ops); if (kerninfo.vm_ops) { vma->vm_ops = kerninfo.vm_ops; - } else if (remap_pfn_range(vma, vma->vm_start, + } else if (io_remap_pfn_range(vma, vma->vm_start, (kerninfo.aper_base + offset) >> PAGE_SHIFT, size, vma->vm_page_prot)) { goto out_again; @@ -644,7 +644,7 @@ DBG("controller vm_ops=%p", kerninfo.vm_ops); if (kerninfo.vm_ops) { vma->vm_ops = kerninfo.vm_ops; - } else if (remap_pfn_range(vma, vma->vm_start, + } else if (io_remap_pfn_range(vma, vma->vm_start, kerninfo.aper_base >> PAGE_SHIFT, size, vma->vm_page_prot)) { goto out_again; diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c --- a/drivers/char/agp/generic.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/agp/generic.c 2005-03-30 16:58:48 -08:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff -Nru a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c --- a/drivers/char/agp/via-agp.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/char/agp/via-agp.c 2005-03-30 16:58:51 -08:00 @@ -83,10 +83,8 @@ pci_read_config_dword(agp_bridge->dev, VIA_GARTCTRL, &temp); temp |= (1<<7); - temp &= ~0x7f; pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, temp); temp &= ~(1<<7); - temp &= ~0x7f; pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, temp); } @@ -450,10 +448,10 @@ #ifdef CONFIG_PM -static int agp_via_suspend(struct pci_dev *pdev, u32 state) +static int agp_via_suspend(struct pci_dev *pdev, pm_message_t state) { pci_save_state (pdev); - pci_set_power_state (pdev, 3); + pci_set_power_state (pdev, PCI_D3hot); return 0; } @@ -462,7 +460,7 @@ { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); - pci_set_power_state (pdev, 0); + pci_set_power_state (pdev, PCI_D0); pci_restore_state(pdev); if (bridge->driver == &via_agp3_driver) diff -Nru a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig --- a/drivers/char/drm/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/drm/Kconfig 2005-03-30 16:58:50 -08:00 @@ -18,7 +18,7 @@ config DRM_TDFX tristate "3dfx Banshee/Voodoo3+" - depends on DRM + depends on DRM && PCI help Choose this option if you have a 3dfx Banshee or Voodoo3 (or later), graphics card. If M is selected, the module will be called tdfx. diff -Nru a/drivers/char/drm/drm_agpsupport.c b/drivers/char/drm/drm_agpsupport.c --- a/drivers/char/drm/drm_agpsupport.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/drm/drm_agpsupport.c 2005-03-30 16:58:47 -08:00 @@ -387,12 +387,17 @@ if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) return NULL; memset((void *)head, 0, sizeof(*head)); - if (!(head->bridge = agp_backend_acquire(dev->pdev))) { - drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); - return NULL; + head->bridge = agp_find_bridge(dev->pdev); + if (!head->bridge) { + if (!(head->bridge = agp_backend_acquire(dev->pdev))) { + drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); + return NULL; + } + agp_copy_info(head->bridge, &head->agp_info); + agp_backend_release(head->bridge); + } else { + agp_copy_info(head->bridge, &head->agp_info); } - agp_copy_info(head->bridge, &head->agp_info); - agp_backend_release(head->bridge); if (head->agp_info.chipset == NOT_SUPPORTED) { drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); return NULL; diff -Nru a/drivers/char/drm/drm_core.h b/drivers/char/drm/drm_core.h --- a/drivers/char/drm/drm_core.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/drm/drm_core.h 2005-03-30 16:58:48 -08:00 @@ -20,15 +20,15 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#define DRIVER_AUTHOR "Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl" +#define CORE_AUTHOR "Gareth Hughes, Leif Delgass, José Fonseca, Jon Smirl" -#define DRIVER_NAME "drm" -#define DRIVER_DESC "DRM shared core routines" -#define DRIVER_DATE "20040925" +#define CORE_NAME "drm" +#define CORE_DESC "DRM shared core routines" +#define CORE_DATE "20040925" #define DRM_IF_MAJOR 1 #define DRM_IF_MINOR 2 -#define DRIVER_MAJOR 1 -#define DRIVER_MINOR 0 -#define DRIVER_PATCHLEVEL 0 +#define CORE_MAJOR 1 +#define CORE_MINOR 0 +#define CORE_PATCHLEVEL 0 diff -Nru a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c --- a/drivers/char/drm/drm_drv.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/drm/drm_drv.c 2005-03-30 16:58:50 -08:00 @@ -15,10 +15,6 @@ * #define DRIVER_DESC "Matrox G200/G400" * #define DRIVER_DATE "20001127" * - * #define DRIVER_MAJOR 2 - * #define DRIVER_MINOR 0 - * #define DRIVER_PATCHLEVEL 2 - * * #define DRIVER_IOCTL_COUNT DRM_ARRAY_SIZE( mga_ioctls ) * * #define drm_x mga_##x @@ -144,6 +140,12 @@ if (dev->driver->pretakedown) dev->driver->pretakedown(dev); + if (dev->unique) { + drm_free(dev->unique, strlen(dev->unique) + 1, DRM_MEM_DRIVER); + dev->unique = NULL; + dev->unique_len = 0; + } + if ( dev->irq_enabled ) drm_irq_uninstall( dev ); down( &dev->struct_sem ); @@ -406,12 +408,8 @@ } DRM_INFO( "Initialized %s %d.%d.%d %s\n", - DRIVER_NAME, - DRIVER_MAJOR, - DRIVER_MINOR, - DRIVER_PATCHLEVEL, - DRIVER_DATE - ); + CORE_NAME, CORE_MAJOR, CORE_MINOR, CORE_PATCHLEVEL, + CORE_DATE); return 0; err_p3: drm_sysfs_destroy(drm_class); diff -Nru a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h --- a/drivers/char/drm/drm_os_linux.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/drm/drm_os_linux.h 2005-03-30 16:58:50 -08:00 @@ -89,7 +89,7 @@ copy_to_user(arg1, arg2, arg3) /* Macros for copyfrom user, but checking readability only once */ #define DRM_VERIFYAREA_READ( uaddr, size ) \ - verify_area( VERIFY_READ, uaddr, size ) + (access_ok( VERIFY_READ, uaddr, size ) ? 0 : -EFAULT) #define DRM_COPY_FROM_USER_UNCHECKED(arg1, arg2, arg3) \ __copy_from_user(arg1, arg2, arg3) #define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \ diff -Nru a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h --- a/drivers/char/drm/drm_pciids.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/drm/drm_pciids.h 2005-03-30 16:58:48 -08:00 @@ -50,6 +50,7 @@ {0x1002, 0x5158, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV200}, \ {0x1002, 0x5159, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ {0x1002, 0x515A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ + {0x1002, 0x515E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ {0x1002, 0x5168, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ {0x1002, 0x5169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ {0x1002, 0x516A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R200}, \ @@ -218,6 +219,6 @@ {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x8086, 0x2982, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ + {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ {0, 0, 0} diff -Nru a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c --- a/drivers/char/drm/drm_stub.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/char/drm/drm_stub.c 2005-03-30 16:58:51 -08:00 @@ -40,11 +40,11 @@ unsigned int drm_debug = 0; /* 1 to enable debug output */ EXPORT_SYMBOL(drm_debug); -MODULE_AUTHOR( DRIVER_AUTHOR ); -MODULE_DESCRIPTION( DRIVER_DESC ); +MODULE_AUTHOR( CORE_AUTHOR ); +MODULE_DESCRIPTION( CORE_DESC ); MODULE_LICENSE("GPL and additional rights"); -MODULE_PARM_DESC(drm_cards_limit, "Maximum number of graphics cards"); -MODULE_PARM_DESC(drm_debug, "Enable debug output"); +MODULE_PARM_DESC(cards_limit, "Maximum number of graphics cards"); +MODULE_PARM_DESC(debug, "Enable debug output"); module_param_named(cards_limit, drm_cards_limit, int, 0444); module_param_named(debug, drm_debug, int, 0666); diff -Nru a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c --- a/drivers/char/drm/drm_sysfs.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/char/drm/drm_sysfs.c 2005-03-30 16:58:49 -08:00 @@ -55,8 +55,8 @@ /* Display the version of drm_core. This doesn't work right in current design */ static ssize_t version_show(struct class *dev, char *buf) { - return sprintf(buf, "%s %d.%d.%d %s\n", DRIVER_NAME, DRIVER_MAJOR, - DRIVER_MINOR, DRIVER_PATCHLEVEL, DRIVER_DATE); + return sprintf(buf, "%s %d.%d.%d %s\n", CORE_NAME, CORE_MAJOR, + CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE); } static CLASS_ATTR(version, S_IRUGO, version_show, NULL); diff -Nru a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c --- a/drivers/char/drm/drm_vm.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/char/drm/drm_vm.c 2005-03-30 16:58:51 -08:00 @@ -625,12 +625,12 @@ #endif offset = dev->driver->get_reg_ofs(dev); #ifdef __sparc__ - if (io_remap_page_range(DRM_RPR_ARG(vma) vma->vm_start, - VM_OFFSET(vma) + offset, + if (io_remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, + (VM_OFFSET(vma) + offset) >> PAGE_SHIFT, vma->vm_end - vma->vm_start, - vma->vm_page_prot, 0)) + vma->vm_page_prot)) #else - if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, + if (io_remap_pfn_range(vma, vma->vm_start, (VM_OFFSET(vma) + offset) >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) diff -Nru a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c --- a/drivers/char/drm/i810_dma.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/drm/i810_dma.c 2005-03-30 16:58:48 -08:00 @@ -119,7 +119,7 @@ buf_priv->currently_mapped = I810_BUF_MAPPED; unlock_kernel(); - if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, + if (io_remap_pfn_range(vma, vma->vm_start, VM_OFFSET(vma) >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; diff -Nru a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c --- a/drivers/char/drm/i830_dma.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/drm/i830_dma.c 2005-03-30 16:58:47 -08:00 @@ -121,7 +121,7 @@ buf_priv->currently_mapped = I830_BUF_MAPPED; unlock_kernel(); - if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, + if (io_remap_pfn_range(vma, vma->vm_start, VM_OFFSET(vma) >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; diff -Nru a/drivers/char/drm/radeon_drm.h b/drivers/char/drm/radeon_drm.h --- a/drivers/char/drm/radeon_drm.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/char/drm/radeon_drm.h 2005-03-30 16:58:49 -08:00 @@ -152,7 +152,8 @@ #define RADEON_EMIT_PP_CUBIC_OFFSETS_T1 81 #define RADEON_EMIT_PP_CUBIC_FACES_2 82 #define RADEON_EMIT_PP_CUBIC_OFFSETS_T2 83 -#define RADEON_MAX_STATE_PACKETS 84 +#define R200_EMIT_PP_TRI_PERF_CNTL 84 +#define RADEON_MAX_STATE_PACKETS 85 /* Commands understood by cmd_buffer ioctl. More can be added but * obviously these can't be removed or changed: diff -Nru a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h --- a/drivers/char/drm/radeon_drv.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/drm/radeon_drv.h 2005-03-30 16:58:48 -08:00 @@ -38,7 +38,7 @@ #define DRIVER_NAME "radeon" #define DRIVER_DESC "ATI Radeon" -#define DRIVER_DATE "20050125" +#define DRIVER_DATE "20050311" /* Interface history: * @@ -80,9 +80,11 @@ * - Add R100/R200 surface allocation/free support * 1.15- Add support for texture micro tiling * - Add support for r100 cube maps + * 1.16- Add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear + * texture filtering on r200 */ #define DRIVER_MAJOR 1 -#define DRIVER_MINOR 15 +#define DRIVER_MINOR 16 #define DRIVER_PATCHLEVEL 0 #define GET_RING_HEAD(dev_priv) DRM_READ32( (dev_priv)->ring_rptr, 0 ) @@ -652,6 +654,8 @@ # define RADEON_3D_DRAW_IMMD 0x00002900 # define RADEON_3D_DRAW_INDX 0x00002A00 # define RADEON_3D_LOAD_VBPNTR 0x00002F00 +# define RADEON_MPEG_IDCT_MACROBLOCK 0x00003000 +# define RADEON_MPEG_IDCT_MACROBLOCK_REV 0x00003100 # define RADEON_3D_CLEAR_ZMASK 0x00003200 # define RADEON_3D_CLEAR_HIZ 0x00003700 # define RADEON_CNTL_HOSTDATA_BLT 0x00009400 @@ -819,6 +823,8 @@ #define R200_RB3D_BLENDCOLOR 0x3218 #define R200_SE_TCL_POINT_SPRITE_CNTL 0x22c4 + +#define R200_PP_TRI_PERF 0x2cf8 /* Constants */ #define RADEON_MAX_USEC_TIMEOUT 100000 /* 100 ms */ diff -Nru a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c --- a/drivers/char/drm/radeon_state.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/drm/radeon_state.c 2005-03-30 16:58:50 -08:00 @@ -203,6 +203,10 @@ case RADEON_EMIT_PP_TEX_SIZE_2: case R200_EMIT_RB3D_BLENDCOLOR: case R200_EMIT_TCL_POINT_SPRITE_CNTL: + case RADEON_EMIT_PP_CUBIC_FACES_0: + case RADEON_EMIT_PP_CUBIC_FACES_1: + case RADEON_EMIT_PP_CUBIC_FACES_2: + case R200_EMIT_PP_TRI_PERF_CNTL: /* These packets don't contain memory offsets */ break; @@ -557,6 +561,13 @@ { RADEON_PP_TEX_SIZE_2, 2, "RADEON_PP_TEX_SIZE_2" }, { R200_RB3D_BLENDCOLOR, 3, "R200_RB3D_BLENDCOLOR" }, { R200_SE_TCL_POINT_SPRITE_CNTL, 1, "R200_SE_TCL_POINT_SPRITE_CNTL" }, + { RADEON_PP_CUBIC_FACES_0, 1, "RADEON_PP_CUBIC_FACES_0"}, + { RADEON_PP_CUBIC_OFFSET_T0_0, 5, "RADEON_PP_CUBIC_OFFSET_T0_0"}, + { RADEON_PP_CUBIC_FACES_1, 1, "RADEON_PP_CUBIC_FACES_1"}, + { RADEON_PP_CUBIC_OFFSET_T1_0, 5, "RADEON_PP_CUBIC_OFFSET_T1_0"}, + { RADEON_PP_CUBIC_FACES_2, 1, "RADEON_PP_CUBIC_FACES_2"}, + { RADEON_PP_CUBIC_OFFSET_T2_0, 5, "RADEON_PP_CUBIC_OFFSET_T2_0"}, + { R200_PP_TRI_PERF, 2, "R200_PP_TRI_PERF"}, }; @@ -1917,7 +1928,7 @@ dev_priv->surfaces[s->surface_index].refcount--; if (dev_priv->surfaces[s->surface_index].refcount == 0) dev_priv->surfaces[s->surface_index].flags = 0; - s->filp = 0; + s->filp = NULL; radeon_apply_surface_regs(s->surface_index, dev_priv); return 0; } @@ -2777,8 +2788,10 @@ kbuf = drm_alloc(cmdbuf.bufsz, DRM_MEM_DRIVER); if (kbuf == NULL) return DRM_ERR(ENOMEM); - if (DRM_COPY_FROM_USER(kbuf, cmdbuf.buf, cmdbuf.bufsz)) + if (DRM_COPY_FROM_USER(kbuf, cmdbuf.buf, cmdbuf.bufsz)) { + drm_free(kbuf, orig_bufsz, DRM_MEM_DRIVER); return DRM_ERR(EFAULT); + } cmdbuf.buf = kbuf; } diff -Nru a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c --- a/drivers/char/generic_serial.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/generic_serial.c 2005-03-30 16:58:48 -08:00 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -45,8 +46,8 @@ #define func_enter() gs_dprintk (GS_DEBUG_FLOW, "gs: enter %s\n", __FUNCTION__) #define func_exit() gs_dprintk (GS_DEBUG_FLOW, "gs: exit %s\n", __FUNCTION__) - -#ifdef NEW_WRITE_LOCKING +#define NEW_WRITE_LOCKING 1 +#if NEW_WRITE_LOCKING #define DECL /* Nothing */ #define LOCKIT down (& port->port_write_sem); #define RELEASEIT up (&port->port_write_sem); @@ -208,7 +209,7 @@ if (!port || !port->xmit_buf || !tmp_buf) return -EIO; - save_flags(flags); + local_save_flags(flags); while (1) { cli(); c = count; @@ -227,14 +228,14 @@ /* Can't copy more? break out! */ if (c <= 0) { - restore_flags(flags); + local_restore_flags(flags); break; } memcpy(port->xmit_buf + port->xmit_head, buf, c); port->xmit_head = ((port->xmit_head + c) & (SERIAL_XMIT_SIZE-1)); port->xmit_cnt += c; - restore_flags(flags); + local_restore_flags(flags); buf += c; count -= c; total += c; @@ -380,9 +381,9 @@ if (!port) return; /* XXX Would the write semaphore do? */ - save_flags(flags); cli(); + spin_lock_irqsave (&port->driver_lock, flags); port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; - restore_flags(flags); + spin_unlock_irqrestore (&port->driver_lock, flags); wake_up_interruptible(&tty->write_wait); tty_wakeup(tty); @@ -468,8 +469,7 @@ if (!(port->flags & ASYNC_INITIALIZED)) return; - save_flags (flags); - cli (); + spin_lock_irqsave(&port->driver_lock, flags); if (port->xmit_buf) { free_page((unsigned long) port->xmit_buf); @@ -482,7 +482,7 @@ port->rd->shutdown_port (port); port->flags &= ~ASYNC_INITIALIZED; - restore_flags (flags); + spin_unlock_irqrestore(&port->driver_lock, flags); func_exit(); } @@ -519,6 +519,7 @@ int do_clocal = 0; int CD; struct tty_struct *tty; + unsigned long flags; func_enter (); @@ -570,10 +571,11 @@ add_wait_queue(&port->open_wait, &wait); gs_dprintk (GS_DEBUG_BTR, "after add waitq.\n"); - cli(); - if (!tty_hung_up_p(filp)) + spin_lock_irqsave(&port->driver_lock, flags); + if (!tty_hung_up_p(filp)) { port->count--; - sti(); + } + spin_unlock_irqrestore(&port->driver_lock, flags); port->blocked_open++; while (1) { CD = port->rd->get_CD (port); @@ -602,8 +604,9 @@ port->blocked_open); set_current_state (TASK_RUNNING); remove_wait_queue(&port->open_wait, &wait); - if (!tty_hung_up_p(filp)) + if (!tty_hung_up_p(filp)) { port->count++; + } port->blocked_open--; if (retval) return retval; @@ -633,27 +636,29 @@ port->tty = tty; } - save_flags(flags); cli(); + spin_lock_irqsave(&port->driver_lock, flags); if (tty_hung_up_p(filp)) { - restore_flags(flags); - port->rd->hungup (port); + spin_unlock_irqrestore(&port->driver_lock, flags); + if (port->rd->hungup) + port->rd->hungup (port); func_exit (); return; } if ((tty->count == 1) && (port->count != 1)) { - printk(KERN_ERR "gs: gs_close: bad port count;" - " tty->count is 1, port count is %d\n", port->count); + printk(KERN_ERR "gs: gs_close port %p: bad port count;" + " tty->count is 1, port count is %d\n", port, port->count); port->count = 1; } if (--port->count < 0) { - printk(KERN_ERR "gs: gs_close: bad port count: %d\n", port->count); + printk(KERN_ERR "gs: gs_close port %p: bad port count: %d\n", port, port->count); port->count = 0; } + if (port->count) { - gs_dprintk(GS_DEBUG_CLOSE, "gs_close: count: %d\n", port->count); - restore_flags(flags); + gs_dprintk(GS_DEBUG_CLOSE, "gs_close port %p: count: %d\n", port, port->count); + spin_unlock_irqrestore(&port->driver_lock, flags); func_exit (); return; } @@ -675,16 +680,17 @@ */ port->rd->disable_rx_interrupts (port); + spin_unlock_irqrestore(&port->driver_lock, flags); /* close has no way of returning "EINTR", so discard return value */ if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE) - gs_wait_tx_flushed (port, port->closing_wait); + gs_wait_tx_flushed (port, port->closing_wait); port->flags &= ~GS_ACTIVE; if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); - + tty_ldisc_flush(tty); tty->closing = 0; @@ -695,14 +701,15 @@ if (port->blocked_open) { if (port->close_delay) { + spin_unlock_irqrestore(&port->driver_lock, flags); msleep_interruptible(jiffies_to_msecs(port->close_delay)); + spin_lock_irqsave(&port->driver_lock, flags); } wake_up_interruptible(&port->open_wait); } port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING | ASYNC_INITIALIZED); wake_up_interruptible(&port->close_wait); - restore_flags(flags); func_exit (); } @@ -727,6 +734,12 @@ port = tty->driver_data; if (!port) return; + if (!port->tty) { + /* This seems to happen when this is called after gs_close. */ + gs_dprintk (GS_DEBUG_TERMIOS, "gs: Odd: port->tty is NULL\n"); + port->tty = tty; + } + tiosp = tty->termios; @@ -821,7 +834,7 @@ if (!(old_termios->c_cflag & CLOCAL) && (tty->termios->c_cflag & CLOCAL)) - wake_up_interruptible(&info->open_wait); + wake_up_interruptible(&port->gs.open_wait); #endif func_exit(); @@ -836,56 +849,56 @@ unsigned long flags; unsigned long page; - save_flags (flags); - if (!tmp_buf) { - page = get_zeroed_page(GFP_KERNEL); + func_enter (); - cli (); /* Don't expect this to make a difference. */ + if (!tmp_buf) { + page = get_zeroed_page(GFP_KERNEL); + spin_lock_irqsave (&port->driver_lock, flags); /* Don't expect this to make a difference. */ if (tmp_buf) free_page(page); else tmp_buf = (unsigned char *) page; - restore_flags (flags); - + spin_unlock_irqrestore (&port->driver_lock, flags); if (!tmp_buf) { + func_exit (); return -ENOMEM; } } - if (port->flags & ASYNC_INITIALIZED) + if (port->flags & ASYNC_INITIALIZED) { + func_exit (); return 0; - + } if (!port->xmit_buf) { /* We may sleep in get_zeroed_page() */ unsigned long tmp; tmp = get_zeroed_page(GFP_KERNEL); - - /* Spinlock? */ - cli (); + spin_lock_irqsave (&port->driver_lock, flags); if (port->xmit_buf) free_page (tmp); else port->xmit_buf = (unsigned char *) tmp; - restore_flags (flags); - - if (!port->xmit_buf) + spin_unlock_irqrestore(&port->driver_lock, flags); + if (!port->xmit_buf) { + func_exit (); return -ENOMEM; + } } - cli(); - + spin_lock_irqsave (&port->driver_lock, flags); if (port->tty) clear_bit(TTY_IO_ERROR, &port->tty->flags); - + init_MUTEX(&port->port_write_sem); port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; - + spin_unlock_irqrestore(&port->driver_lock, flags); gs_set_termios(port->tty, NULL); - + spin_lock_irqsave (&port->driver_lock, flags); port->flags |= ASYNC_INITIALIZED; port->flags &= ~GS_TX_INTEN; - restore_flags(flags); + spin_unlock_irqrestore(&port->driver_lock, flags); + func_exit (); return 0; } @@ -956,13 +969,15 @@ void gs_got_break(struct gs_port *port) { + func_enter (); + + tty_insert_flip_char(port->tty, 0, TTY_BREAK); + tty_schedule_flip(port->tty); if (port->flags & ASYNC_SAK) { do_SAK (port->tty); } - *(port->tty->flip.flag_buf_ptr) = TTY_BREAK; - port->tty->flip.flag_buf_ptr++; - port->tty->flip.char_buf_ptr++; - port->tty->flip.count++; + + func_exit (); } diff -Nru a/drivers/char/hpet.c b/drivers/char/hpet.c --- a/drivers/char/hpet.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/char/hpet.c 2005-03-30 16:58:49 -08:00 @@ -76,6 +76,7 @@ struct hpets { struct hpets *hp_next; struct hpet __iomem *hp_hpet; + unsigned long hp_hpet_phys; struct time_interpolator *hp_interpolator; unsigned long hp_period; unsigned long hp_delta; @@ -265,7 +266,7 @@ return -EINVAL; devp = file->private_data; - addr = (unsigned long)devp->hd_hpet; + addr = devp->hd_hpets->hp_hpet_phys; if (addr & (PAGE_SIZE - 1)) return -ENOSYS; @@ -274,7 +275,7 @@ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); addr = __pa(addr); - if (remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, + if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, PAGE_SIZE, vma->vm_page_prot)) { printk(KERN_ERR "remap_pfn_range failed in hpet.c\n"); return -EAGAIN; @@ -795,6 +796,7 @@ hpetp->hp_which = hpet_nhpet++; hpetp->hp_hpet = hdp->hd_address; + hpetp->hp_hpet_phys = hdp->hd_phys_address; hpetp->hp_ntimer = hdp->hd_nirqs; diff -Nru a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c --- a/drivers/char/ipmi/ipmi_si_intf.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/ipmi/ipmi_si_intf.c 2005-03-30 16:58:47 -08:00 @@ -1477,6 +1477,11 @@ if (!is_new_interface(-1, addr_space, spmi->addr.address)) return -ENODEV; + if (!spmi->addr.register_bit_width) { + acpi_failure = 1; + return -ENODEV; + } + /* Figure out the interface type. */ switch (spmi->InterfaceType) { diff -Nru a/drivers/char/isicom.c b/drivers/char/isicom.c --- a/drivers/char/isicom.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/isicom.c 2005-03-30 16:58:47 -08:00 @@ -151,9 +151,6 @@ static int prev_card = 3; /* start servicing isi_card[0] */ static struct tty_driver *isicom_normal; -static struct isi_board isi_card[BOARD_COUNT]; -static struct isi_port isi_ports[PORT_COUNT]; - static struct timer_list tx; static char re_schedule = 1; #ifdef ISICOM_DEBUG @@ -209,6 +206,9 @@ int xmit_tail; int xmit_cnt; }; + +static struct isi_board isi_card[BOARD_COUNT]; +static struct isi_port isi_ports[PORT_COUNT]; /* * Locking functions for card level locking. We need to own both diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c --- a/drivers/char/mem.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/char/mem.c 2005-03-30 16:58:48 -08:00 @@ -76,14 +76,6 @@ * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. */ return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); -#elif defined(CONFIG_PPC64) - /* On PPC64, we always do non-cacheable access to the IO hole and - * cacheable elsewhere. Cache paradox can checkstop the CPU and - * the high_memory heuristic below is wrong on machines with memory - * above the IO hole... Ah, and of course, XFree86 doesn't pass - * O_SYNC when mapping us to tap IO space. Surprised ? - */ - return !page_is_ram(addr >> PAGE_SHIFT); #else /* * Accessing memory above the top the kernel knows about or through a file pointer @@ -238,7 +230,13 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma) { -#ifdef pgprot_noncached +#if defined(__HAVE_PHYS_MEM_ACCESS_PROT) + unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; + + vma->vm_page_prot = phys_mem_access_prot(file, offset, + vma->vm_end - vma->vm_start, + vma->vm_page_prot); +#elif defined(pgprot_noncached) unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; int uncached; @@ -257,6 +255,23 @@ return 0; } +static int mmap_kmem(struct file * file, struct vm_area_struct * vma) +{ + unsigned long long val; + /* + * RED-PEN: on some architectures there is more mapped memory + * than available in mem_map which pfn_valid checks + * for. Perhaps should add a new macro here. + * + * RED-PEN: vmalloc is not supported right now. + */ + if (!pfn_valid(vma->vm_pgoff)) + return -EIO; + val = (u64)vma->vm_pgoff << PAGE_SHIFT; + vma->vm_pgoff = __pa(val) >> PAGE_SHIFT; + return mmap_mem(file, vma); +} + extern long vread(char *buf, char *addr, unsigned long count); extern long vwrite(char *buf, char *addr, unsigned long count); @@ -698,7 +713,6 @@ return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; } -#define mmap_kmem mmap_mem #define zero_lseek null_lseek #define full_lseek null_lseek #define write_zero write_null diff -Nru a/drivers/char/n_tty.c b/drivers/char/n_tty.c --- a/drivers/char/n_tty.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/n_tty.c 2005-03-30 16:58:47 -08:00 @@ -606,9 +606,11 @@ char buf[64]; tty->num_overrun++; - if (time_before(tty->overrun_time, jiffies - HZ)) { - printk(KERN_WARNING "%s: %d input overrun(s)\n", tty_name(tty, buf), - tty->num_overrun); + if (time_before(tty->overrun_time, jiffies - HZ) || + time_after(tty->overrun_time, jiffies)) { + printk(KERN_WARNING "%s: %d input overrun(s)\n", + tty_name(tty, buf), + tty->num_overrun); tty->overrun_time = jiffies; tty->num_overrun = 0; } diff -Nru a/drivers/char/specialix.c b/drivers/char/specialix.c --- a/drivers/char/specialix.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/specialix.c 2005-03-30 16:58:50 -08:00 @@ -66,7 +66,7 @@ * */ -#define VERSION "1.10" +#define VERSION "1.11" /* @@ -99,6 +99,44 @@ #include "cd1865.h" +/* + This driver can spew a whole lot of debugging output at you. If you + need maximum performance, you should disable the DEBUG define. To + aid in debugging in the field, I'm leaving the compile-time debug + features enabled, and disable them "runtime". That allows me to + instruct people with problems to enable debugging without requiring + them to recompile... +*/ +#define DEBUG + +static int sx_debug; +static int sx_rxfifo = SPECIALIX_RXFIFO; + +#ifdef DEBUG +#define dprintk(f, str...) if (sx_debug & f) printk (str) +#else +#define dprintk(f, str...) /* nothing */ +#endif + +#define SX_DEBUG_FLOW 0x0001 +#define SX_DEBUG_DATA 0x0002 +#define SX_DEBUG_PROBE 0x0004 +#define SX_DEBUG_CHAN 0x0008 +#define SX_DEBUG_INIT 0x0010 +#define SX_DEBUG_RX 0x0020 +#define SX_DEBUG_TX 0x0040 +#define SX_DEBUG_IRQ 0x0080 +#define SX_DEBUG_OPEN 0x0100 +#define SX_DEBUG_TERMIOS 0x0200 +#define SX_DEBUG_SIGNALS 0x0400 +#define SX_DEBUG_FIFO 0x0800 + + +#define func_enter() dprintk (SX_DEBUG_FLOW, "io8: enter %s\n",__FUNCTION__) +#define func_exit() dprintk (SX_DEBUG_FLOW, "io8: exit %s\n", __FUNCTION__) + +#define jiffies_from_ms(a) ((((a) * HZ)/1000)+1) + /* Configurable options: */ @@ -110,6 +148,12 @@ requiring attention, the timer doesn't help either. */ #undef SPECIALIX_TIMER +#ifdef SPECIALIX_TIMER +static int sx_poll = HZ; +#endif + + + /* * The following defines are mostly for testing purposes. But if you need * some nice reporting in your syslog, you can define them also. @@ -254,11 +298,17 @@ /* Wait for Channel Command Register ready */ static inline void sx_wait_CCR(struct specialix_board * bp) { - unsigned long delay; + unsigned long delay, flags; + unsigned char ccr; - for (delay = SX_CCR_TIMEOUT; delay; delay--) - if (!sx_in(bp, CD186x_CCR)) + for (delay = SX_CCR_TIMEOUT; delay; delay--) { + spin_lock_irqsave(&bp->lock, flags); + ccr = sx_in(bp, CD186x_CCR); + spin_unlock_irqrestore(&bp->lock, flags); + if (!ccr) return; + udelay (1); + } printk(KERN_ERR "sx%d: Timeout waiting for CCR.\n", board_No(bp)); } @@ -268,10 +318,17 @@ static inline void sx_wait_CCR_off(struct specialix_board * bp) { unsigned long delay; + unsigned char crr; + unsigned long flags; - for (delay = SX_CCR_TIMEOUT; delay; delay--) - if (!sx_in_off(bp, CD186x_CCR)) + for (delay = SX_CCR_TIMEOUT; delay; delay--) { + spin_lock_irqsave(&bp->lock, flags); + crr = sx_in_off(bp, CD186x_CCR); + spin_unlock_irqrestore(&bp->lock, flags); + if (!crr) return; + udelay (1); + } printk(KERN_ERR "sx%d: Timeout waiting for CCR.\n", board_No(bp)); } @@ -319,6 +376,7 @@ { int virq; int i; + unsigned long flags; if (bp->flags & SX_BOARD_IS_PCI) return 1; @@ -331,11 +389,12 @@ default: printk (KERN_ERR "Speclialix: cannot set irq to %d.\n", bp->irq); return 0; } - + spin_lock_irqsave(&bp->lock, flags); for (i=0;i<2;i++) { sx_out(bp, CD186x_CAR, i); sx_out(bp, CD186x_MSVRTS, ((virq >> i) & 0x1)? MSVR_RTS:0); } + spin_unlock_irqrestore(&bp->lock, flags); return 1; } @@ -346,14 +405,14 @@ unsigned long flags; int scaler; int rv = 1; - - save_flags(flags); cli(); + func_enter(); sx_wait_CCR_off(bp); /* Wait for CCR ready */ + spin_lock_irqsave(&bp->lock, flags); sx_out_off(bp, CD186x_CCR, CCR_HARDRESET); /* Reset CD186x chip */ - sti(); + spin_unlock_irqrestore(&bp->lock, flags); sx_long_delay(HZ/20); /* Delay 0.05 sec */ - cli(); + spin_lock_irqsave(&bp->lock, flags); sx_out_off(bp, CD186x_GIVR, SX_ID); /* Set ID for this chip */ sx_out_off(bp, CD186x_GICR, 0); /* Clear all bits */ sx_out_off(bp, CD186x_PILR1, SX_ACK_MINT); /* Prio for modem intr */ @@ -367,6 +426,7 @@ sx_out_off(bp, CD186x_PPRH, scaler >> 8); sx_out_off(bp, CD186x_PPRL, scaler & 0xff); + spin_unlock_irqrestore(&bp->lock, flags); if (!sx_set_irq (bp)) { /* Figure out how to pass this along... */ @@ -374,7 +434,7 @@ rv = 0; } - restore_flags(flags); + func_exit(); return rv; } @@ -383,12 +443,16 @@ { int i; int t; + unsigned long flags; + spin_lock_irqsave(&bp->lock, flags); for (i=0, t=0;i<8;i++) { sx_out_off (bp, CD186x_CAR, i); if (sx_in_off (bp, reg) & bit) t |= 1 << i; } + spin_unlock_irqrestore(&bp->lock, flags); + return t; } @@ -396,15 +460,22 @@ #ifdef SPECIALIX_TIMER void missed_irq (unsigned long data) { - if (sx_in ((struct specialix_board *)data, CD186x_SRSR) & + unsigned char irq; + unsigned long flags; + struct specialix_board *bp = (struct specialix_board *)data; + + spin_lock_irqsave(&bp->lock, flags); + irq = sx_in ((struct specialix_board *)data, CD186x_SRSR) & (SRSR_RREQint | SRSR_TREQint | - SRSR_MREQint)) { + SRSR_MREQint); + spin_unlock_irqrestore(&bp->lock, flags); + if (irq) { printk (KERN_INFO "Missed interrupt... Calling int from timer. \n"); sx_interrupt (((struct specialix_board *)data)->irq, - NULL, NULL); + (void*)data, NULL); } - missed_irq_timer.expires = jiffies + HZ; + missed_irq_timer.expires = jiffies + sx_poll; add_timer (&missed_irq_timer); } #endif @@ -422,8 +493,12 @@ int rev; int chip; - if (sx_check_io_range(bp)) + func_enter(); + + if (sx_check_io_range(bp)) { + func_exit(); return 1; + } /* Are the I/O ports here ? */ sx_out_off(bp, CD186x_PPRL, 0x5a); @@ -438,6 +513,7 @@ if ((val1 != 0x5a) || (val2 != 0xa5)) { printk(KERN_INFO "sx%d: specialix IO8+ Board at 0x%03x not found.\n", board_No(bp), bp->base); + func_exit(); return 1; } @@ -445,10 +521,9 @@ identification */ val1 = read_cross_byte (bp, CD186x_MSVR, MSVR_DSR); val2 = read_cross_byte (bp, CD186x_MSVR, MSVR_RTS); -#ifdef SPECIALIX_DEBUG - printk (KERN_DEBUG "sx%d: DSR lines are: %02x, rts lines are: %02x\n", + dprintk (SX_DEBUG_INIT, "sx%d: DSR lines are: %02x, rts lines are: %02x\n", board_No(bp), val1, val2); -#endif + /* They managed to switch the bit order between the docs and the IO8+ card. The new PCI card now conforms to old docs. They changed the PCI docs to reflect the situation on the @@ -457,6 +532,7 @@ if (val1 != val2) { printk(KERN_INFO "sx%d: specialix IO8+ ID %02x at 0x%03x not found (%02x).\n", board_No(bp), val2, bp->base, val1); + func_exit(); return 1; } @@ -473,21 +549,19 @@ sx_long_delay(HZ/20); irqs = probe_irq_off(irqs); -#if SPECIALIX_DEBUG > 2 - printk (KERN_DEBUG "SRSR = %02x, ", sx_in(bp, CD186x_SRSR)); - printk ( "TRAR = %02x, ", sx_in(bp, CD186x_TRAR)); - printk ( "GIVR = %02x, ", sx_in(bp, CD186x_GIVR)); - printk ( "GICR = %02x, ", sx_in(bp, CD186x_GICR)); - printk ( "\n"); -#endif + dprintk (SX_DEBUG_INIT, "SRSR = %02x, ", sx_in(bp, CD186x_SRSR)); + dprintk (SX_DEBUG_INIT, "TRAR = %02x, ", sx_in(bp, CD186x_TRAR)); + dprintk (SX_DEBUG_INIT, "GIVR = %02x, ", sx_in(bp, CD186x_GIVR)); + dprintk (SX_DEBUG_INIT, "GICR = %02x, ", sx_in(bp, CD186x_GICR)); + dprintk (SX_DEBUG_INIT, "\n"); + /* Reset CD186x again */ if (!sx_init_CD186x(bp)) { /* Hmmm. This is dead code anyway. */ } -#if SPECIALIX_DEBUG > 2 - printk (KERN_DEBUG "val1 = %02x, val2 = %02x, val3 = %02x.\n", + + dprintk (SX_DEBUG_INIT "val1 = %02x, val2 = %02x, val3 = %02x.\n", val1, val2, val3); -#endif } @@ -495,6 +569,7 @@ if (irqs <= 0) { printk(KERN_ERR "sx%d: Can't find IRQ for specialix IO8+ board at 0x%03x.\n", board_No(bp), bp->base); + func_exit(); return 1; } #endif @@ -504,6 +579,7 @@ #endif /* Reset CD186x again */ if (!sx_init_CD186x(bp)) { + func_exit(); return -EIO; } @@ -528,15 +604,13 @@ default:chip=-1;rev='x'; } -#if SPECIALIX_DEBUG > 2 - printk (KERN_DEBUG " GFCR = 0x%02x\n", sx_in_off(bp, CD186x_GFRCR) ); -#endif + dprintk (SX_DEBUG_INIT, " GFCR = 0x%02x\n", sx_in_off(bp, CD186x_GFRCR) ); #ifdef SPECIALIX_TIMER init_timer (&missed_irq_timer); missed_irq_timer.function = missed_irq; missed_irq_timer.data = (unsigned long) bp; - missed_irq_timer.expires = jiffies + HZ; + missed_irq_timer.expires = jiffies + sx_poll; add_timer (&missed_irq_timer); #endif @@ -545,6 +619,7 @@ bp->base, bp->irq, chip, rev); + func_exit(); return 0; } @@ -555,8 +630,12 @@ static inline void sx_mark_event(struct specialix_port * port, int event) { + func_enter(); + set_bit(event, &port->event); schedule_work(&port->tqueue); + + func_exit(); } @@ -564,12 +643,17 @@ unsigned char const * what) { unsigned char channel; - struct specialix_port * port; - + struct specialix_port * port = NULL; + channel = sx_in(bp, CD186x_GICR) >> GICR_CHAN_OFF; + dprintk (SX_DEBUG_CHAN, "channel: %d\n", channel); if (channel < CD186x_NCH) { port = &sx_port[board_No(bp) * SX_NPORT + channel]; + dprintk (SX_DEBUG_CHAN, "port: %d %p flags: 0x%x\n",board_No(bp) * SX_NPORT + channel, port, port->flags & ASYNC_INITIALIZED); + if (port->flags & ASYNC_INITIALIZED) { + dprintk (SX_DEBUG_CHAN, "port: %d %p\n", channel, port); + func_exit(); return port; } } @@ -586,43 +670,51 @@ unsigned char status; unsigned char ch; - if (!(port = sx_get_port(bp, "Receive"))) - return; + func_enter(); - tty = port->tty; - if (tty->flip.count >= TTY_FLIPBUF_SIZE) { - printk(KERN_INFO "sx%d: port %d: Working around flip buffer overflow.\n", - board_No(bp), port_No(port)); + port = sx_get_port(bp, "Receive"); + if (!port) { + dprintk (SX_DEBUG_RX, "Hmm, couldn't find port.\n"); + func_exit(); return; } + tty = port->tty; + dprintk (SX_DEBUG_RX, "port: %p count: %d BUFF_SIZE: %d\n", + port, tty->flip.count, TTY_FLIPBUF_SIZE); -#ifdef SX_REPORT_OVERRUN status = sx_in(bp, CD186x_RCSR); + + dprintk (SX_DEBUG_RX, "status: 0x%x\n", status); if (status & RCSR_OE) { port->overrun++; -#if SPECIALIX_DEBUG - printk(KERN_DEBUG "sx%d: port %d: Overrun. Total %ld overruns.\n", + dprintk(SX_DEBUG_FIFO, "sx%d: port %d: Overrun. Total %ld overruns.\n", board_No(bp), port_No(port), port->overrun); -#endif } status &= port->mark_mask; -#else - status = sx_in(bp, CD186x_RCSR) & port->mark_mask; -#endif + + /* This flip buffer check needs to be below the reading of the + status register to reset the chip's IRQ.... */ + if (tty->flip.count >= TTY_FLIPBUF_SIZE) { + dprintk(SX_DEBUG_FIFO, "sx%d: port %d: Working around flip buffer overflow.\n", + board_No(bp), port_No(port)); + func_exit(); + return; + } + ch = sx_in(bp, CD186x_RDR); if (!status) { + func_exit(); return; } if (status & RCSR_TOUT) { printk(KERN_INFO "sx%d: port %d: Receiver timeout. Hardware problems ?\n", board_No(bp), port_No(port)); + func_exit(); return; } else if (status & RCSR_BREAK) { -#ifdef SPECIALIX_DEBUG - printk(KERN_DEBUG "sx%d: port %d: Handling break...\n", + dprintk(SX_DEBUG_RX, "sx%d: port %d: Handling break...\n", board_No(bp), port_No(port)); -#endif *tty->flip.flag_buf_ptr++ = TTY_BREAK; if (port->flags & ASYNC_SAK) do_SAK(tty); @@ -642,6 +734,8 @@ *tty->flip.char_buf_ptr++ = ch; tty->flip.count++; schedule_delayed_work(&tty->flip.work, 1); + + func_exit(); } @@ -650,17 +744,19 @@ struct specialix_port *port; struct tty_struct *tty; unsigned char count; + + func_enter(); - if (!(port = sx_get_port(bp, "Receive"))) + if (!(port = sx_get_port(bp, "Receive"))) { + dprintk (SX_DEBUG_RX, "Hmm, couldn't find port.\n"); + func_exit(); return; - + } tty = port->tty; count = sx_in(bp, CD186x_RDCR); - -#ifdef SX_REPORT_FIFO + dprintk (SX_DEBUG_RX, "port: %p: count: %d\n", port, count); port->hits[count > 8 ? 9 : count]++; -#endif while (count--) { if (tty->flip.count >= TTY_FLIPBUF_SIZE) { @@ -673,6 +769,8 @@ tty->flip.count++; } schedule_delayed_work(&tty->flip.work, 1); + + func_exit(); } @@ -681,11 +779,13 @@ struct specialix_port *port; struct tty_struct *tty; unsigned char count; - - - if (!(port = sx_get_port(bp, "Transmit"))) + + func_enter(); + if (!(port = sx_get_port(bp, "Transmit"))) { + func_exit(); return; - + } + dprintk (SX_DEBUG_TX, "port: %p\n", port); tty = port->tty; if (port->IER & IER_TXEMPTY) { @@ -693,6 +793,7 @@ sx_out(bp, CD186x_CAR, port_No(port)); port->IER &= ~IER_TXEMPTY; sx_out(bp, CD186x_IER, port->IER); + func_exit(); return; } @@ -701,6 +802,7 @@ sx_out(bp, CD186x_CAR, port_No(port)); port->IER &= ~IER_TXRDY; sx_out(bp, CD186x_IER, port->IER); + func_exit(); return; } @@ -725,6 +827,8 @@ sx_out(bp, CD186x_CCR, CCR_CORCHG2); port->break_length = 0; } + + func_exit(); return; } @@ -743,6 +847,8 @@ } if (port->xmit_cnt <= port->wakeup_chars) sx_mark_event(port, RS_EVENT_WRITE_WAKEUP); + + func_exit(); } @@ -751,10 +857,9 @@ struct specialix_port *port; struct tty_struct *tty; unsigned char mcr; + int msvr_cd; -#ifdef SPECIALIX_DEBUG - printk (KERN_DEBUG "Modem intr. "); -#endif + dprintk (SX_DEBUG_SIGNALS, "Modem intr. "); if (!(port = sx_get_port(bp, "Modem"))) return; @@ -764,18 +869,13 @@ printk ("mcr = %02x.\n", mcr); if ((mcr & MCR_CDCHG)) { -#ifdef SPECIALIX_DEBUG - printk (KERN_DEBUG "CD just changed... "); -#endif - if (sx_in(bp, CD186x_MSVR) & MSVR_CD) { -#ifdef SPECIALIX_DEBUG - printk ( "Waking up guys in open.\n"); -#endif + dprintk (SX_DEBUG_SIGNALS, "CD just changed... "); + msvr_cd = sx_in(bp, CD186x_MSVR) & MSVR_CD; + if (msvr_cd) { + dprintk (SX_DEBUG_SIGNALS, "Waking up guys in open.\n"); wake_up_interruptible(&port->open_wait); } else { -#ifdef SPECIALIX_DEBUG - printk ( "Sending HUP.\n"); -#endif + dprintk (SX_DEBUG_SIGNALS, "Sending HUP.\n"); schedule_work(&port->tqueue_hangup); } } @@ -820,13 +920,18 @@ struct specialix_board *bp; unsigned long loop = 0; int saved_reg; + unsigned long flags; + + func_enter(); bp = dev_id; - + spin_lock_irqsave(&bp->lock, flags); + + dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); if (!bp || !(bp->flags & SX_BOARD_ACTIVE)) { -#ifdef SPECIALIX_DEBUG - printk (KERN_DEBUG "sx: False interrupt. irq %d.\n", irq); -#endif + dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); + spin_unlock_irqrestore(&bp->lock, flags); + func_exit(); return IRQ_NONE; } @@ -844,8 +949,8 @@ else if (ack == (SX_ID | GIVR_IT_REXC)) sx_receive_exc(bp); else - printk(KERN_ERR "sx%d: Bad receive ack 0x%02x.\n", - board_No(bp), ack); + printk(KERN_ERR "sx%d: status: 0x%x Bad receive ack 0x%02x.\n", + board_No(bp), status, ack); } else if (status & SRSR_TREQint) { ack = sx_in(bp, CD186x_TRAR); @@ -853,16 +958,16 @@ if (ack == (SX_ID | GIVR_IT_TX)) sx_transmit(bp); else - printk(KERN_ERR "sx%d: Bad transmit ack 0x%02x.\n", - board_No(bp), ack); + printk(KERN_ERR "sx%d: status: 0x%x Bad transmit ack 0x%02x. port: %d\n", + board_No(bp), status, ack, port_No (sx_get_port (bp, "Int"))); } else if (status & SRSR_MREQint) { ack = sx_in(bp, CD186x_MRAR); if (ack == (SX_ID | GIVR_IT_MODEM)) sx_check_modem(bp); else - printk(KERN_ERR "sx%d: Bad modem ack 0x%02x.\n", - board_No(bp), ack); + printk(KERN_ERR "sx%d: status: 0x%x Bad modem ack 0x%02x.\n", + board_No(bp), status, ack); } @@ -870,6 +975,8 @@ } bp->reg = saved_reg; outb (bp->reg, bp->base + SX_ADDR_REG); + spin_unlock_irqrestore(&bp->lock, flags); + func_exit(); return IRQ_HANDLED; } @@ -880,21 +987,37 @@ static void turn_ints_off (struct specialix_board *bp) { + unsigned long flags; + + func_enter(); if (bp->flags & SX_BOARD_IS_PCI) { /* This was intended for enabeling the interrupt on the * PCI card. However it seems that it's already enabled * and as PCI interrupts can be shared, there is no real * reason to have to turn it off. */ } + + spin_lock_irqsave(&bp->lock, flags); (void) sx_in_off (bp, 0); /* Turn off interrupts. */ + spin_unlock_irqrestore(&bp->lock, flags); + + func_exit(); } static void turn_ints_on (struct specialix_board *bp) { + unsigned long flags; + + func_enter(); + if (bp->flags & SX_BOARD_IS_PCI) { /* play with the PCI chip. See comment above. */ } + spin_lock_irqsave(&bp->lock, flags); (void) sx_in (bp, 0); /* Turn ON interrupts. */ + spin_unlock_irqrestore(&bp->lock, flags); + + func_exit(); } @@ -924,18 +1047,23 @@ /* Called with disabled interrupts */ static inline void sx_shutdown_board(struct specialix_board *bp) { - if (!(bp->flags & SX_BOARD_ACTIVE)) + func_enter(); + + if (!(bp->flags & SX_BOARD_ACTIVE)) { + func_exit(); return; - + } + bp->flags &= ~SX_BOARD_ACTIVE; -#if SPECIALIX_DEBUG > 2 - printk ("Freeing IRQ%d for board %d.\n", bp->irq, board_No (bp)); -#endif + dprintk (SX_DEBUG_IRQ, "Freeing IRQ%d for board %d.\n", + bp->irq, board_No (bp)); free_irq(bp->irq, bp); turn_ints_off (bp); + + func_exit(); } @@ -951,13 +1079,19 @@ unsigned char cor1 = 0, cor3 = 0; unsigned char mcor1 = 0, mcor2 = 0; static unsigned long again; - - if (!(tty = port->tty) || !tty->termios) + unsigned long flags; + + func_enter(); + + if (!(tty = port->tty) || !tty->termios) { + func_exit(); return; + } port->IER = 0; port->COR2 = 0; /* Select port on the board */ + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); /* The Specialix board doens't implement the RTS lines. @@ -966,9 +1100,8 @@ port->MSVR = MSVR_DTR | (sx_in(bp, CD186x_MSVR) & MSVR_RTS); else port->MSVR = (sx_in(bp, CD186x_MSVR) & MSVR_RTS); -#ifdef DEBUG_SPECIALIX - printk (KERN_DEBUG "sx: got MSVR=%02x.\n", port->MSVR); -#endif + spin_unlock_irqrestore(&bp->lock, flags); + dprintk (SX_DEBUG_TERMIOS, "sx: got MSVR=%02x.\n", port->MSVR); baud = C_BAUD(tty); if (baud & CBAUDEX) { @@ -988,17 +1121,15 @@ if (!baud_table[baud]) { /* Drop DTR & exit */ -#ifdef SPECIALIX_DEBUG - printk (KERN_DEBUG "Dropping DTR... Hmm....\n"); -#endif + dprintk (SX_DEBUG_TERMIOS, "Dropping DTR... Hmm....\n"); if (!SX_CRTSCTS (tty)) { port -> MSVR &= ~ MSVR_DTR; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_MSVR, port->MSVR ); + spin_unlock_irqrestore(&bp->lock, flags); } -#ifdef DEBUG_SPECIALIX else - printk (KERN_DEBUG "Can't drop DTR: no DTR.\n"); -#endif + dprintk (SX_DEBUG_TERMIOS, "Can't drop DTR: no DTR.\n"); return; } else { /* Set DTR on */ @@ -1037,12 +1168,12 @@ port_No (port), tmp); } } - + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_RBPRH, (tmp >> 8) & 0xff); sx_out(bp, CD186x_TBPRH, (tmp >> 8) & 0xff); sx_out(bp, CD186x_RBPRL, tmp & 0xff); sx_out(bp, CD186x_TBPRL, tmp & 0xff); - + spin_unlock_irqrestore(&bp->lock, flags); if (port->custom_divisor) { baud = (SX_OSCFREQ + port->custom_divisor/2) / port->custom_divisor; baud = ( baud + 5 ) / 10; @@ -1057,8 +1188,9 @@ /* Receiver timeout will be transmission time for 1.5 chars */ tmp = (SPECIALIX_TPS + SPECIALIX_TPS/2 + baud/2) / baud; tmp = (tmp > 0xff) ? 0xff : tmp; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_RTPR, tmp); - + spin_unlock_irqrestore(&bp->lock, flags); switch (C_CSIZE(tty)) { case CS5: cor1 |= COR1_5BITS; @@ -1105,7 +1237,9 @@ port->IER |= IER_DSR | IER_CTS; mcor1 |= MCOR1_DSRZD | MCOR1_CTSZD; mcor2 |= MCOR2_DSROD | MCOR2_CTSOD; + spin_lock_irqsave(&bp->lock, flags); tty->hw_stopped = !(sx_in(bp, CD186x_MSVR) & (MSVR_CTS|MSVR_DSR)); + spin_unlock_irqrestore(&bp->lock, flags); #else port->COR2 |= COR2_CTSAE; #endif @@ -1117,10 +1251,12 @@ cor3 |= (COR3_FCT | COR3_SCDE); if (I_IXANY(tty)) port->COR2 |= COR2_IXM; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_SCHR1, START_CHAR(tty)); sx_out(bp, CD186x_SCHR2, STOP_CHAR(tty)); sx_out(bp, CD186x_SCHR3, START_CHAR(tty)); sx_out(bp, CD186x_SCHR4, STOP_CHAR(tty)); + spin_unlock_irqrestore(&bp->lock, flags); } if (!C_CLOCAL(tty)) { /* Enable CD check */ @@ -1134,27 +1270,33 @@ port->IER |= IER_RXD; /* Set input FIFO size (1-8 bytes) */ - cor3 |= SPECIALIX_RXFIFO; + cor3 |= sx_rxfifo; /* Setting up CD186x channel registers */ + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_COR1, cor1); sx_out(bp, CD186x_COR2, port->COR2); sx_out(bp, CD186x_COR3, cor3); + spin_unlock_irqrestore(&bp->lock, flags); /* Make CD186x know about registers change */ sx_wait_CCR(bp); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CCR, CCR_CORCHG1 | CCR_CORCHG2 | CCR_CORCHG3); /* Setting up modem option registers */ -#ifdef DEBUG_SPECIALIX - printk ("Mcor1 = %02x, mcor2 = %02x.\n", mcor1, mcor2); -#endif + dprintk (SX_DEBUG_TERMIOS, "Mcor1 = %02x, mcor2 = %02x.\n", mcor1, mcor2); sx_out(bp, CD186x_MCOR1, mcor1); sx_out(bp, CD186x_MCOR2, mcor2); + spin_unlock_irqrestore(&bp->lock, flags); /* Enable CD186x transmitter & receiver */ sx_wait_CCR(bp); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CCR, CCR_TXEN | CCR_RXEN); /* Enable interrupts */ sx_out(bp, CD186x_IER, port->IER); /* And finally set the modem lines... */ sx_out(bp, CD186x_MSVR, port->MSVR); + spin_unlock_irqrestore(&bp->lock, flags); + + func_exit(); } @@ -1162,37 +1304,44 @@ static int sx_setup_port(struct specialix_board *bp, struct specialix_port *port) { unsigned long flags; - - if (port->flags & ASYNC_INITIALIZED) + + func_enter(); + + if (port->flags & ASYNC_INITIALIZED) { + func_exit(); return 0; + } if (!port->xmit_buf) { /* We may sleep in get_zeroed_page() */ unsigned long tmp; - if (!(tmp = get_zeroed_page(GFP_KERNEL))) + if (!(tmp = get_zeroed_page(GFP_KERNEL))) { + func_exit(); return -ENOMEM; + } if (port->xmit_buf) { free_page(tmp); + func_exit(); return -ERESTARTSYS; } port->xmit_buf = (unsigned char *) tmp; } - save_flags(flags); cli(); - + spin_lock_irqsave(&port->lock, flags); + if (port->tty) clear_bit(TTY_IO_ERROR, &port->tty->flags); - - if (port->count == 1) - bp->count++; - + port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; sx_change_speed(bp, port); port->flags |= ASYNC_INITIALIZED; + + spin_unlock_irqrestore(&port->lock, flags); + - restore_flags(flags); + func_exit(); return 0; } @@ -1201,62 +1350,54 @@ static void sx_shutdown_port(struct specialix_board *bp, struct specialix_port *port) { struct tty_struct *tty; + int i; + unsigned long flags; - if (!(port->flags & ASYNC_INITIALIZED)) + func_enter(); + + if (!(port->flags & ASYNC_INITIALIZED)) { + func_exit(); return; + } -#ifdef SX_REPORT_OVERRUN - printk(KERN_INFO "sx%d: port %d: Total %ld overruns were detected.\n", - board_No(bp), port_No(port), port->overrun); -#endif -#ifdef SX_REPORT_FIFO - { - int i; - - printk(KERN_INFO "sx%d: port %d: FIFO hits [ ", - board_No(bp), port_No(port)); + if (sx_debug & SX_DEBUG_FIFO) { + dprintk(SX_DEBUG_FIFO, "sx%d: port %d: %ld overruns, FIFO hits [ ", + board_No(bp), port_No(port), port->overrun); for (i = 0; i < 10; i++) { - printk("%ld ", port->hits[i]); + dprintk(SX_DEBUG_FIFO, "%ld ", port->hits[i]); } - printk("].\n"); + dprintk(SX_DEBUG_FIFO, "].\n"); } -#endif + if (port->xmit_buf) { free_page((unsigned long) port->xmit_buf); port->xmit_buf = NULL; } /* Select port */ + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); if (!(tty = port->tty) || C_HUPCL(tty)) { /* Drop DTR */ sx_out(bp, CD186x_MSVDTR, 0); } - + spin_unlock_irqrestore(&bp->lock, flags); /* Reset port */ sx_wait_CCR(bp); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CCR, CCR_SOFTRESET); /* Disable all interrupts from this port */ port->IER = 0; sx_out(bp, CD186x_IER, port->IER); - + spin_unlock_irqrestore(&bp->lock, flags); if (tty) set_bit(TTY_IO_ERROR, &tty->flags); port->flags &= ~ASYNC_INITIALIZED; - if (--bp->count < 0) { - printk(KERN_ERR "sx%d: sx_shutdown_port: bad board count: %d\n", - board_No(bp), bp->count); - bp->count = 0; - } - - /* - * If this is the last opened port on the board - * shutdown whole board - */ if (!bp->count) sx_shutdown_board(bp); + func_exit(); } @@ -1268,6 +1409,9 @@ int retval; int do_clocal = 0; int CD; + unsigned long flags; + + func_enter(); /* * If the device is in the middle of being closed, then block @@ -1275,10 +1419,13 @@ */ if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) { interruptible_sleep_on(&port->close_wait); - if (port->flags & ASYNC_HUP_NOTIFY) + if (port->flags & ASYNC_HUP_NOTIFY) { + func_exit(); return -EAGAIN; - else + } else { + func_exit(); return -ERESTARTSYS; + } } /* @@ -1288,6 +1435,7 @@ if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) { port->flags |= ASYNC_NORMAL_ACTIVE; + func_exit(); return 0; } @@ -1303,13 +1451,14 @@ */ retval = 0; add_wait_queue(&port->open_wait, &wait); - cli(); - if (!tty_hung_up_p(filp)) + spin_lock_irqsave(&port->lock, flags); + if (!tty_hung_up_p(filp)) { port->count--; - sti(); + } + spin_unlock_irqrestore(&port->lock, flags); port->blocked_open++; while (1) { - cli(); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); CD = sx_in(bp, CD186x_MSVR) & MSVR_CD; if (SX_CRTSCTS (tty)) { @@ -1320,8 +1469,8 @@ /* Activate DTR */ port->MSVR |= MSVR_DTR; sx_out (bp, CD186x_MSVR, port->MSVR); - } - sti(); + } + spin_unlock_irqrestore(&bp->lock, flags); set_current_state(TASK_INTERRUPTIBLE); if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)) { @@ -1340,15 +1489,22 @@ } schedule(); } - current->state = TASK_RUNNING; + + set_current_state(TASK_RUNNING); remove_wait_queue(&port->open_wait, &wait); - if (!tty_hung_up_p(filp)) + spin_lock_irqsave(&port->lock, flags); + if (!tty_hung_up_p(filp)) { port->count++; + } port->blocked_open--; - if (retval) + spin_unlock_irqrestore(&port->lock, flags); + if (retval) { + func_exit(); return retval; - + } + port->flags |= ASYNC_NORMAL_ACTIVE; + func_exit(); return 0; } @@ -1359,36 +1515,55 @@ int error; struct specialix_port * port; struct specialix_board * bp; - + int i; + unsigned long flags; + + func_enter(); + board = SX_BOARD(tty->index); - if (board >= SX_NBOARD || !(sx_board[board].flags & SX_BOARD_PRESENT)) + if (board >= SX_NBOARD || !(sx_board[board].flags & SX_BOARD_PRESENT)) { + func_exit(); return -ENODEV; + } bp = &sx_board[board]; port = sx_port + board * SX_NPORT + SX_PORT(tty->index); + port->overrun = 0; + for (i = 0; i < 10; i++) + port->hits[i]=0; -#ifdef DEBUG_SPECIALIX - printk (KERN_DEBUG "Board = %d, bp = %p, port = %p, portno = %d.\n", + dprintk (SX_DEBUG_OPEN, "Board = %d, bp = %p, port = %p, portno = %d.\n", board, bp, port, SX_PORT(tty->index)); -#endif - if (sx_paranoia_check(port, tty->name, "sx_open")) + if (sx_paranoia_check(port, tty->name, "sx_open")) { + func_enter(); return -ENODEV; + } - if ((error = sx_setup_board(bp))) + if ((error = sx_setup_board(bp))) { + func_exit(); return error; + } + spin_lock_irqsave(&bp->lock, flags); port->count++; + bp->count++; tty->driver_data = port; port->tty = tty; + spin_unlock_irqrestore(&bp->lock, flags); - if ((error = sx_setup_port(bp, port))) + if ((error = sx_setup_port(bp, port))) { + func_enter(); return error; + } - if ((error = block_til_ready(tty, filp, port))) + if ((error = block_til_ready(tty, filp, port))) { + func_enter(); return error; + } + func_exit(); return 0; } @@ -1400,12 +1575,16 @@ unsigned long flags; unsigned long timeout; - if (!port || sx_paranoia_check(port, tty->name, "close")) + func_enter(); + if (!port || sx_paranoia_check(port, tty->name, "close")) { + func_exit(); return; - - save_flags(flags); cli(); + } + spin_lock_irqsave(&port->lock, flags); + if (tty_hung_up_p(filp)) { - restore_flags(flags); + spin_unlock_irqrestore(&port->lock, flags); + func_exit(); return; } @@ -1416,13 +1595,14 @@ board_No(bp), port->count); port->count = 1; } - if (--port->count < 0) { - printk(KERN_ERR "sx%d: sx_close: bad port count for tty%d: %d\n", - board_No(bp), port_No(port), port->count); - port->count = 0; - } - if (port->count) { - restore_flags(flags); + + if (port->count > 1) { + port->count--; + bp->count--; + + spin_unlock_irqrestore(&port->lock, flags); + + func_exit(); return; } port->flags |= ASYNC_CLOSING; @@ -1431,20 +1611,26 @@ * the line discipline to only process XON/XOFF characters. */ tty->closing = 1; - if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE) + spin_unlock_irqrestore(&port->lock, flags); + dprintk (SX_DEBUG_OPEN, "Closing\n"); + if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE) { tty_wait_until_sent(tty, port->closing_wait); + } /* * At this point we stop accepting input. To do this, we * disable the receive line status interrupts, and tell the * interrupt driver to stop checking the data ready bit in the * line status register. */ + dprintk (SX_DEBUG_OPEN, "Closed\n"); port->IER &= ~IER_RXD; if (port->flags & ASYNC_INITIALIZED) { port->IER &= ~IER_TXRDY; port->IER |= IER_TXEMPTY; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); sx_out(bp, CD186x_IER, port->IER); + spin_unlock_irqrestore(&bp->lock, flags); /* * Before we drop DTR, make sure the UART transmitter * has completely drained; this is especially @@ -1452,6 +1638,7 @@ */ timeout = jiffies+HZ; while(port->IER & IER_TXEMPTY) { + set_current_state (TASK_INTERRUPTIBLE); msleep_interruptible(jiffies_to_msecs(port->timeout)); if (time_after(jiffies, timeout)) { printk (KERN_INFO "Timeout waiting for close\n"); @@ -1460,13 +1647,27 @@ } } + + if (--bp->count < 0) { + printk(KERN_ERR "sx%d: sx_shutdown_port: bad board count: %d port: %d\n", + board_No(bp), bp->count, tty->index); + bp->count = 0; + } + if (--port->count < 0) { + printk(KERN_ERR "sx%d: sx_close: bad port count for tty%d: %d\n", + board_No(bp), port_No(port), port->count); + port->count = 0; + } + sx_shutdown_port(bp, port); if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); tty_ldisc_flush(tty); + spin_lock_irqsave(&port->lock, flags); tty->closing = 0; port->event = 0; port->tty = NULL; + spin_unlock_irqrestore(&port->lock, flags); if (port->blocked_open) { if (port->close_delay) { msleep_interruptible(jiffies_to_msecs(port->close_delay)); @@ -1475,7 +1676,8 @@ } port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); wake_up_interruptible(&port->close_wait); - restore_flags(flags); + + func_exit(); } @@ -1486,42 +1688,48 @@ struct specialix_board *bp; int c, total = 0; unsigned long flags; - - if (sx_paranoia_check(port, tty->name, "sx_write")) + + func_enter(); + if (sx_paranoia_check(port, tty->name, "sx_write")) { + func_exit(); return 0; + } bp = port_Board(port); - if (!tty || !port->xmit_buf || !tmp_buf) + if (!tty || !port->xmit_buf || !tmp_buf) { + func_exit(); return 0; + } - save_flags(flags); while (1) { - cli(); + spin_lock_irqsave(&port->lock, flags); c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, SERIAL_XMIT_SIZE - port->xmit_head)); if (c <= 0) { - restore_flags(flags); + spin_unlock_irqrestore(&port->lock, flags); break; } memcpy(port->xmit_buf + port->xmit_head, buf, c); port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1); port->xmit_cnt += c; - restore_flags(flags); + spin_unlock_irqrestore(&port->lock, flags); buf += c; count -= c; total += c; } - cli(); + spin_lock_irqsave(&bp->lock, flags); if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped && !(port->IER & IER_TXRDY)) { port->IER |= IER_TXRDY; sx_out(bp, CD186x_CAR, port_No(port)); sx_out(bp, CD186x_IER, port->IER); } - restore_flags(flags); + spin_unlock_irqrestore(&bp->lock, flags); + func_exit(); + return total; } @@ -1530,24 +1738,36 @@ { struct specialix_port *port = (struct specialix_port *)tty->driver_data; unsigned long flags; + struct specialix_board * bp; - if (sx_paranoia_check(port, tty->name, "sx_put_char")) - return; + func_enter(); - if (!tty || !port->xmit_buf) + if (sx_paranoia_check(port, tty->name, "sx_put_char")) { + func_exit(); return; - - save_flags(flags); cli(); - - if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) { - restore_flags(flags); + } + dprintk (SX_DEBUG_TX, "check tty: %p %p\n", tty, port->xmit_buf); + if (!tty || !port->xmit_buf) { + func_exit(); return; } + bp = port_Board(port); + spin_lock_irqsave(&port->lock, flags); + dprintk (SX_DEBUG_TX, "xmit_cnt: %d xmit_buf: %p\n", port->xmit_cnt, port->xmit_buf); + if ((port->xmit_cnt >= SERIAL_XMIT_SIZE - 1) || (!port->xmit_buf)) { + spin_unlock_irqrestore(&port->lock, flags); + dprintk (SX_DEBUG_TX, "Exit size\n"); + func_exit(); + return; + } + dprintk (SX_DEBUG_TX, "Handle xmit: %p %p\n", port, port->xmit_buf); port->xmit_buf[port->xmit_head++] = ch; port->xmit_head &= SERIAL_XMIT_SIZE - 1; port->xmit_cnt++; - restore_flags(flags); + spin_unlock_irqrestore(&port->lock, flags); + + func_exit(); } @@ -1555,19 +1775,26 @@ { struct specialix_port *port = (struct specialix_port *)tty->driver_data; unsigned long flags; - - if (sx_paranoia_check(port, tty->name, "sx_flush_chars")) + struct specialix_board * bp = port_Board(port); + + func_enter(); + + if (sx_paranoia_check(port, tty->name, "sx_flush_chars")) { + func_exit(); return; - + } if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || - !port->xmit_buf) + !port->xmit_buf) { + func_exit(); return; - - save_flags(flags); cli(); + } + spin_lock_irqsave(&bp->lock, flags); port->IER |= IER_TXRDY; sx_out(port_Board(port), CD186x_CAR, port_No(port)); sx_out(port_Board(port), CD186x_IER, port->IER); - restore_flags(flags); + spin_unlock_irqrestore(&bp->lock, flags); + + func_exit(); } @@ -1575,13 +1802,19 @@ { struct specialix_port *port = (struct specialix_port *)tty->driver_data; int ret; - - if (sx_paranoia_check(port, tty->name, "sx_write_room")) + + func_enter(); + + if (sx_paranoia_check(port, tty->name, "sx_write_room")) { + func_exit(); return 0; + } ret = SERIAL_XMIT_SIZE - port->xmit_cnt - 1; if (ret < 0) ret = 0; + + func_exit(); return ret; } @@ -1589,10 +1822,14 @@ static int sx_chars_in_buffer(struct tty_struct *tty) { struct specialix_port *port = (struct specialix_port *)tty->driver_data; - - if (sx_paranoia_check(port, tty->name, "sx_chars_in_buffer")) - return 0; + + func_enter(); + if (sx_paranoia_check(port, tty->name, "sx_chars_in_buffer")) { + func_exit(); + return 0; + } + func_exit(); return port->xmit_cnt; } @@ -1601,16 +1838,22 @@ { struct specialix_port *port = (struct specialix_port *)tty->driver_data; unsigned long flags; - - if (sx_paranoia_check(port, tty->name, "sx_flush_buffer")) + struct specialix_board * bp; + + func_enter(); + + if (sx_paranoia_check(port, tty->name, "sx_flush_buffer")) { + func_exit(); return; + } - save_flags(flags); cli(); + bp = port_Board(port); + spin_lock_irqsave(&port->lock, flags); port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; - restore_flags(flags); - + spin_unlock_irqrestore(&port->lock, flags); tty_wakeup(tty); - wake_up_interruptible(&tty->write_wait); + + func_exit(); } @@ -1622,19 +1865,21 @@ unsigned int result; unsigned long flags; - if (sx_paranoia_check(port, tty->name, __FUNCTION__)) + func_enter(); + + if (sx_paranoia_check(port, tty->name, __FUNCTION__)) { + func_exit(); return -ENODEV; + } bp = port_Board(port); - save_flags(flags); cli(); + spin_lock_irqsave (&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); status = sx_in(bp, CD186x_MSVR); - restore_flags(flags); -#ifdef DEBUG_SPECIALIX - printk (KERN_DEBUG "Got msvr[%d] = %02x, car = %d.\n", + spin_unlock_irqrestore(&bp->lock, flags); + dprintk (SX_DEBUG_INIT, "Got msvr[%d] = %02x, car = %d.\n", port_No(port), status, sx_in (bp, CD186x_CAR)); - printk (KERN_DEBUG "sx_port = %p, port = %p\n", sx_port, port); -#endif + dprintk (SX_DEBUG_INIT, "sx_port = %p, port = %p\n", sx_port, port); if (SX_CRTSCTS(port->tty)) { result = /* (status & MSVR_RTS) ? */ TIOCM_DTR /* : 0) */ | ((status & MSVR_DTR) ? TIOCM_RTS : 0) @@ -1649,6 +1894,8 @@ | ((status & MSVR_CTS) ? TIOCM_CTS : 0); } + func_exit(); + return result; } @@ -1660,12 +1907,16 @@ unsigned long flags; struct specialix_board *bp; - if (sx_paranoia_check(port, tty->name, __FUNCTION__)) + func_enter(); + + if (sx_paranoia_check(port, tty->name, __FUNCTION__)) { + func_exit(); return -ENODEV; + } bp = port_Board(port); - save_flags(flags); cli(); + spin_lock_irqsave(&port->lock, flags); /* if (set & TIOCM_RTS) port->MSVR |= MSVR_RTS; */ /* if (set & TIOCM_DTR) @@ -1690,10 +1941,12 @@ if (clear & TIOCM_DTR) port->MSVR &= ~MSVR_DTR; } - + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); sx_out(bp, CD186x_MSVR, port->MSVR); - restore_flags(flags); + spin_unlock_irqrestore(&bp->lock, flags); + spin_unlock_irqrestore(&port->lock, flags); + func_exit(); return 0; } @@ -1703,17 +1956,25 @@ struct specialix_board *bp = port_Board(port); unsigned long flags; - save_flags(flags); cli(); + func_enter(); + + spin_lock_irqsave (&port->lock, flags); port->break_length = SPECIALIX_TPS / HZ * length; port->COR2 |= COR2_ETC; port->IER |= IER_TXRDY; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); sx_out(bp, CD186x_COR2, port->COR2); sx_out(bp, CD186x_IER, port->IER); + spin_unlock_irqrestore(&bp->lock, flags); + spin_unlock_irqrestore (&port->lock, flags); sx_wait_CCR(bp); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CCR, CCR_CORCHG2); + spin_unlock_irqrestore(&bp->lock, flags); sx_wait_CCR(bp); - restore_flags(flags); + + func_exit(); } @@ -1723,10 +1984,19 @@ struct serial_struct tmp; struct specialix_board *bp = port_Board(port); int change_speed; - unsigned long flags; - - if (copy_from_user(&tmp, newinfo, sizeof(tmp))) + + func_enter(); + /* + error = verify_area(VERIFY_READ, (void *) newinfo, sizeof(tmp)); + if (error) { + func_exit(); + return error; + } + */ + if (copy_from_user(&tmp, newinfo, sizeof(tmp))) { + func_enter(); return -EFAULT; + } #if 0 if ((tmp.irq != bp->irq) || @@ -1735,8 +2005,10 @@ (tmp.baud_base != (SX_OSCFREQ + CD186x_TPC/2) / CD186x_TPC) || (tmp.custom_divisor != 0) || (tmp.xmit_fifo_size != CD186x_NFIFO) || - (tmp.flags & ~SPECIALIX_LEGAL_FLAGS)) + (tmp.flags & ~SPECIALIX_LEGAL_FLAGS)) { + func_exit(); return -EINVAL; + } #endif change_speed = ((port->flags & ASYNC_SPD_MASK) != @@ -1747,8 +2019,10 @@ if ((tmp.close_delay != port->close_delay) || (tmp.closing_wait != port->closing_wait) || ((tmp.flags & ~ASYNC_USR_MASK) != - (port->flags & ~ASYNC_USR_MASK))) + (port->flags & ~ASYNC_USR_MASK))) { + func_exit(); return -EPERM; + } port->flags = ((port->flags & ~ASYNC_USR_MASK) | (tmp.flags & ASYNC_USR_MASK)); port->custom_divisor = tmp.custom_divisor; @@ -1760,10 +2034,9 @@ port->custom_divisor = tmp.custom_divisor; } if (change_speed) { - save_flags(flags); cli(); sx_change_speed(bp, port); - restore_flags(flags); } + func_exit(); return 0; } @@ -1773,7 +2046,16 @@ { struct serial_struct tmp; struct specialix_board *bp = port_Board(port); + // int error; + func_enter(); + + /* + error = verify_area(VERIFY_WRITE, (void *) retinfo, sizeof(tmp)); + if (error) + return error; + */ + memset(&tmp, 0, sizeof(tmp)); tmp.type = PORT_CIRRUS; tmp.line = port - sx_port; @@ -1785,8 +2067,12 @@ tmp.closing_wait = port->closing_wait * HZ/100; tmp.custom_divisor = port->custom_divisor; tmp.xmit_fifo_size = CD186x_NFIFO; - if (copy_to_user(retinfo, &tmp, sizeof(tmp))) + if (copy_to_user(retinfo, &tmp, sizeof(tmp))) { + func_exit(); return -EFAULT; + } + + func_exit(); return 0; } @@ -1797,44 +2083,63 @@ struct specialix_port *port = (struct specialix_port *)tty->driver_data; int retval; void __user *argp = (void __user *)arg; - - if (sx_paranoia_check(port, tty->name, "sx_ioctl")) + + func_enter(); + + if (sx_paranoia_check(port, tty->name, "sx_ioctl")) { + func_exit(); return -ENODEV; + } switch (cmd) { case TCSBRK: /* SVID version: non-zero arg --> no break */ retval = tty_check_change(tty); - if (retval) + if (retval) { + func_exit(); return retval; + } tty_wait_until_sent(tty, 0); if (!arg) sx_send_break(port, HZ/4); /* 1/4 second */ return 0; case TCSBRKP: /* support for POSIX tcsendbreak() */ retval = tty_check_change(tty); - if (retval) + if (retval) { + func_exit(); return retval; + } tty_wait_until_sent(tty, 0); sx_send_break(port, arg ? arg*(HZ/10) : HZ/4); + func_exit(); return 0; case TIOCGSOFTCAR: - if (put_user(C_CLOCAL(tty)?1:0, (unsigned long __user *)argp)) - return -EFAULT; + if (put_user(C_CLOCAL(tty)?1:0, (unsigned long __user *)argp)) { + func_exit(); + return -EFAULT; + } + func_exit(); return 0; case TIOCSSOFTCAR: - if (get_user(arg, (unsigned long __user *) argp)) - return -EFAULT; + if (get_user(arg, (unsigned long __user *) argp)) { + func_exit(); + return -EFAULT; + } tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); + func_exit(); return 0; - case TIOCGSERIAL: + case TIOCGSERIAL: + func_exit(); return sx_get_serial_info(port, argp); case TIOCSSERIAL: + func_exit(); return sx_set_serial_info(port, argp); default: + func_exit(); return -ENOIOCTLCMD; } + func_exit(); return 0; } @@ -1844,14 +2149,16 @@ struct specialix_port *port = (struct specialix_port *)tty->driver_data; struct specialix_board *bp; unsigned long flags; - - if (sx_paranoia_check(port, tty->name, "sx_throttle")) + + func_enter(); + + if (sx_paranoia_check(port, tty->name, "sx_throttle")) { + func_exit(); return; + } bp = port_Board(port); - save_flags(flags); cli(); - /* Use DTR instead of RTS ! */ if (SX_CRTSCTS (tty)) port->MSVR &= ~MSVR_DTR; @@ -1863,14 +2170,22 @@ printk (KERN_ERR "sx%d: Need to throttle, but can't (hardware hs is off)\n", port_No (port)); } + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); + spin_unlock_irqrestore(&bp->lock, flags); if (I_IXOFF(tty)) { + spin_unlock_irqrestore(&bp->lock, flags); sx_wait_CCR(bp); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CCR, CCR_SSCH2); + spin_unlock_irqrestore(&bp->lock, flags); sx_wait_CCR(bp); } + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_MSVR, port->MSVR); - restore_flags(flags); + spin_unlock_irqrestore(&bp->lock, flags); + + func_exit(); } @@ -1879,26 +2194,39 @@ struct specialix_port *port = (struct specialix_port *)tty->driver_data; struct specialix_board *bp; unsigned long flags; + + func_enter(); - if (sx_paranoia_check(port, tty->name, "sx_unthrottle")) + if (sx_paranoia_check(port, tty->name, "sx_unthrottle")) { + func_exit(); return; + } bp = port_Board(port); - save_flags(flags); cli(); + spin_lock_irqsave(&port->lock, flags); /* XXXX Use DTR INSTEAD???? */ if (SX_CRTSCTS(tty)) { port->MSVR |= MSVR_DTR; } /* Else clause: see remark in "sx_throttle"... */ - + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); + spin_unlock_irqrestore(&bp->lock, flags); if (I_IXOFF(tty)) { + spin_unlock_irqrestore(&port->lock, flags); sx_wait_CCR(bp); + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CCR, CCR_SSCH1); + spin_unlock_irqrestore(&bp->lock, flags); sx_wait_CCR(bp); + spin_lock_irqsave(&port->lock, flags); } + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_MSVR, port->MSVR); - restore_flags(flags); + spin_unlock_irqrestore(&bp->lock, flags); + spin_unlock_irqrestore(&port->lock, flags); + + func_exit(); } @@ -1907,17 +2235,25 @@ struct specialix_port *port = (struct specialix_port *)tty->driver_data; struct specialix_board *bp; unsigned long flags; - - if (sx_paranoia_check(port, tty->name, "sx_stop")) - return; + + func_enter(); + if (sx_paranoia_check(port, tty->name, "sx_stop")) { + func_exit(); + return; + } + bp = port_Board(port); - save_flags(flags); cli(); + spin_lock_irqsave(&port->lock, flags); port->IER &= ~IER_TXRDY; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); sx_out(bp, CD186x_IER, port->IER); - restore_flags(flags); + spin_unlock_irqrestore(&bp->lock, flags); + spin_unlock_irqrestore(&port->lock, flags); + + func_exit(); } @@ -1926,19 +2262,27 @@ struct specialix_port *port = (struct specialix_port *)tty->driver_data; struct specialix_board *bp; unsigned long flags; + + func_enter(); - if (sx_paranoia_check(port, tty->name, "sx_start")) + if (sx_paranoia_check(port, tty->name, "sx_start")) { + func_exit(); return; + } bp = port_Board(port); - save_flags(flags); cli(); + spin_lock_irqsave(&port->lock, flags); if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) { port->IER |= IER_TXRDY; + spin_lock_irqsave(&bp->lock, flags); sx_out(bp, CD186x_CAR, port_No(port)); sx_out(bp, CD186x_IER, port->IER); + spin_unlock_irqrestore(&bp->lock, flags); } - restore_flags(flags); + spin_unlock_irqrestore(&port->lock, flags); + + func_exit(); } @@ -1956,9 +2300,13 @@ struct specialix_port *port = (struct specialix_port *) private_; struct tty_struct *tty; + func_enter(); + tty = port->tty; if (tty) tty_hangup(tty); /* FIXME: module removal race here */ + + func_exit(); } @@ -1966,18 +2314,33 @@ { struct specialix_port *port = (struct specialix_port *)tty->driver_data; struct specialix_board *bp; - - if (sx_paranoia_check(port, tty->name, "sx_hangup")) + unsigned long flags; + + func_enter(); + + if (sx_paranoia_check(port, tty->name, "sx_hangup")) { + func_exit(); return; + } bp = port_Board(port); sx_shutdown_port(bp, port); + spin_lock_irqsave(&port->lock, flags); port->event = 0; + bp->count -= port->count; + if (bp->count < 0) { + printk(KERN_ERR "sx%d: sx_hangup: bad board count: %d port: %d\n", + board_No(bp), bp->count, tty->index); + bp->count = 0; + } port->count = 0; port->flags &= ~ASYNC_NORMAL_ACTIVE; port->tty = NULL; + spin_unlock_irqrestore(&port->lock, flags); wake_up_interruptible(&port->open_wait); + + func_exit(); } @@ -1985,6 +2348,7 @@ { struct specialix_port *port = (struct specialix_port *)tty->driver_data; unsigned long flags; + struct specialix_board * bp; if (sx_paranoia_check(port, tty->name, "sx_set_termios")) return; @@ -1993,9 +2357,10 @@ tty->termios->c_iflag == old_termios->c_iflag) return; - save_flags(flags); cli(); + bp = port_Board(port); + spin_lock_irqsave(&port->lock, flags); sx_change_speed(port_Board(port), port); - restore_flags(flags); + spin_unlock_irqrestore(&port->lock, flags); if ((old_termios->c_cflag & CRTSCTS) && !(tty->termios->c_cflag & CRTSCTS)) { @@ -2009,12 +2374,20 @@ { struct specialix_port *port = (struct specialix_port *) private_; struct tty_struct *tty; - - if(!(tty = port->tty)) + + func_enter(); + + if(!(tty = port->tty)) { + func_exit(); return; + } + + if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) { + tty_wakeup(tty); + //wake_up_interruptible(&tty->write_wait); + } - if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) - tty_wakeup(tty); + func_exit(); } static struct tty_operations sx_ops = { @@ -2042,15 +2415,19 @@ int error; int i; + func_enter(); + specialix_driver = alloc_tty_driver(SX_NBOARD * SX_NPORT); if (!specialix_driver) { printk(KERN_ERR "sx: Couldn't allocate tty_driver.\n"); + func_exit(); return 1; } if (!(tmp_buf = (unsigned char *) get_zeroed_page(GFP_KERNEL))) { printk(KERN_ERR "sx: Couldn't get free page.\n"); put_tty_driver(specialix_driver); + func_exit(); return 1; } specialix_driver->owner = THIS_MODULE; @@ -2069,6 +2446,7 @@ free_page((unsigned long)tmp_buf); printk(KERN_ERR "sx: Couldn't register specialix IO8+ driver, error = %d\n", error); + func_exit(); return 1; } memset(sx_port, 0, sizeof(sx_port)); @@ -2080,16 +2458,21 @@ sx_port[i].closing_wait = 3000 * HZ/100; init_waitqueue_head(&sx_port[i].open_wait); init_waitqueue_head(&sx_port[i].close_wait); + spin_lock_init(&sx_port[i].lock); } + func_exit(); return 0; } static void sx_release_drivers(void) { + func_enter(); + free_page((unsigned long)tmp_buf); tty_unregister_driver(specialix_driver); put_tty_driver(specialix_driver); + func_exit(); } /* @@ -2100,6 +2483,8 @@ int i; int found = 0; + func_enter(); + printk(KERN_INFO "sx: Specialix IO8+ driver v" VERSION ", (c) R.E.Wolff 1997/1998.\n"); printk(KERN_INFO "sx: derived from work (c) D.Gorodchanin 1994-1996.\n"); #ifdef CONFIG_SPECIALIX_RTSCTS @@ -2108,8 +2493,13 @@ printk (KERN_INFO "sx: DTR/RTS pin is RTS when CRTSCTS is on.\n"); #endif - if (sx_init_drivers()) + for (i = 0; i < SX_NBOARD; i++) + sx_board[i].lock = SPIN_LOCK_UNLOCKED; + + if (sx_init_drivers()) { + func_exit(); return -EIO; + } for (i = 0; i < SX_NBOARD; i++) if (sx_board[i].base && !sx_probe(&sx_board[i])) @@ -2147,9 +2537,11 @@ if (!found) { sx_release_drivers(); printk(KERN_INFO "sx: No specialix IO8+ boards detected.\n"); + func_exit(); return -EIO; } + func_exit(); return 0; } @@ -2159,6 +2551,11 @@ module_param_array(iobase, int, NULL, 0); module_param_array(irq, int, NULL, 0); +module_param(sx_debug, int, 0); +module_param(sx_rxfifo, int, 0); +#ifdef SPECIALIX_TIMER +module_param(sx_poll, int, 0); +#endif /* * You can setup up to 4 boards. @@ -2173,13 +2570,20 @@ { int i; + func_enter(); + + init_MUTEX(&tmp_buf_sem); /* Init de the semaphore - pvdl */ + if (iobase[0] || iobase[1] || iobase[2] || iobase[3]) { for(i = 0; i < SX_NBOARD; i++) { sx_board[i].base = iobase[i]; sx_board[i].irq = irq[i]; + sx_board[i].count= 0; } } + func_exit(); + return specialix_init(); } @@ -2187,6 +2591,8 @@ { int i; + func_enter(); + sx_release_drivers(); for (i = 0; i < SX_NBOARD; i++) if (sx_board[i].flags & SX_BOARD_PRESENT) @@ -2194,7 +2600,8 @@ #ifdef SPECIALIX_TIMER del_timer (&missed_irq_timer); #endif - + + func_exit(); } module_init(specialix_init_module); diff -Nru a/drivers/char/specialix_io8.h b/drivers/char/specialix_io8.h --- a/drivers/char/specialix_io8.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/specialix_io8.h 2005-03-30 16:58:50 -08:00 @@ -93,9 +93,11 @@ unsigned long flags; unsigned short base; unsigned char irq; - signed char count; + //signed char count; + int count; unsigned char DTR; int reg; + spinlock_t lock; }; #define SX_BOARD_PRESENT 0x00000001 @@ -129,12 +131,9 @@ unsigned char IER; unsigned char MSVR; unsigned char COR2; -#ifdef SX_REPORT_OVERRUN unsigned long overrun; -#endif -#ifdef SX_REPORT_FIFO unsigned long hits[10]; -#endif + spinlock_t lock; }; #endif /* __KERNEL__ */ diff -Nru a/drivers/char/stallion.c b/drivers/char/stallion.c --- a/drivers/char/stallion.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/char/stallion.c 2005-03-30 16:58:49 -08:00 @@ -232,13 +232,12 @@ /*****************************************************************************/ -#ifdef MODULE /* * Define some string labels for arguments passed from the module * load line. These allow for easy board definitions, and easy * modification of the io, memory and irq resoucres. */ - +static int stl_nargs = 0; static char *board0[4]; static char *board1[4]; static char *board2[4]; @@ -299,17 +298,15 @@ MODULE_DESCRIPTION("Stallion Multiport Serial Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(board0, "1-4s"); +module_param_array(board0, charp, &stl_nargs, 0); MODULE_PARM_DESC(board0, "Board 0 config -> name[,ioaddr[,ioaddr2][,irq]]"); -MODULE_PARM(board1, "1-4s"); +module_param_array(board1, charp, &stl_nargs, 0); MODULE_PARM_DESC(board1, "Board 1 config -> name[,ioaddr[,ioaddr2][,irq]]"); -MODULE_PARM(board2, "1-4s"); +module_param_array(board2, charp, &stl_nargs, 0); MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,ioaddr2][,irq]]"); -MODULE_PARM(board3, "1-4s"); +module_param_array(board3, charp, &stl_nargs, 0); MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,ioaddr2][,irq]]"); -#endif - /*****************************************************************************/ /* @@ -464,12 +461,10 @@ * Declare all those functions in this driver! */ -#ifdef MODULE static void stl_argbrds(void); static int stl_parsebrd(stlconf_t *confp, char **argp); static unsigned long stl_atol(char *str); -#endif int stl_init(void); static int stl_open(struct tty_struct *tty, struct file *filp); @@ -726,8 +721,6 @@ static struct class_simple *stallion_class; -#ifdef MODULE - /* * Loadable module initialization stuff. */ @@ -842,15 +835,13 @@ { stlconf_t conf; stlbrd_t *brdp; - int nrargs, i; + int i; #ifdef DEBUG printk("stl_argbrds()\n"); #endif - nrargs = sizeof(stl_brdsp) / sizeof(char **); - - for (i = stl_nrbrds; (i < nrargs); i++) { + for (i = stl_nrbrds; (i < stl_nargs); i++) { memset(&conf, 0, sizeof(conf)); if (stl_parsebrd(&conf, stl_brdsp[i]) == 0) continue; @@ -950,8 +941,6 @@ return(1); } -#endif - /*****************************************************************************/ /* @@ -2787,9 +2776,7 @@ */ for (i = 0; (i < stl_nrbrds); i++) { confp = &stl_brdconf[i]; -#ifdef MODULE stl_parsebrd(confp, stl_brdsp[i]); -#endif if ((brdp = stl_allocbrd()) == (stlbrd_t *) NULL) return(-ENOMEM); brdp->brdnr = i; @@ -2805,9 +2792,7 @@ * Find any dynamically supported boards. That is via module load * line options or auto-detected on the PCI bus. */ -#ifdef MODULE stl_argbrds(); -#endif #ifdef CONFIG_PCI stl_findpcibrds(); #endif diff -Nru a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig --- a/drivers/char/tpm/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/drivers/char/tpm/Kconfig 2005-03-30 16:58:47 -08:00 @@ -6,7 +6,7 @@ config TCG_TPM tristate "TPM Hardware Support" - depends on EXPERIMENTAL + depends on EXPERIMENTAL && PCI ---help--- If you have a TPM security chip in your system, which implements the Trusted Computing Group's specification, diff -Nru a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c --- a/drivers/char/tpm/tpm.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/tpm/tpm.c 2005-03-30 16:58:50 -08:00 @@ -39,7 +39,7 @@ #define PCI_GEN2_DEC 0xEC static LIST_HEAD(tpm_chip_list); -static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(driver_lock); static int dev_mask[32]; static void user_reader_timeout(unsigned long ptr) diff -Nru a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h --- a/drivers/char/tpm/tpm.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/tpm/tpm.h 2005-03-30 16:58:50 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #define TPM_TIMEOUT msecs_to_jiffies(5) diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/char/tty_io.c 2005-03-30 16:58:49 -08:00 @@ -2630,6 +2630,7 @@ tty->magic = TTY_MAGIC; tty_ldisc_assign(tty, tty_ldisc_get(N_TTY)); tty->pgrp = -1; + tty->overrun_time = jiffies; tty->flip.char_buf_ptr = tty->flip.char_buf; tty->flip.flag_buf_ptr = tty->flip.flag_buf; INIT_WORK(&tty->flip.work, flush_to_ldisc, tty); diff -Nru a/drivers/char/vr41xx_rtc.c b/drivers/char/vr41xx_rtc.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/vr41xx_rtc.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,709 @@ +/* + * Driver for NEC VR4100 series Real Time Clock unit. + * + * Copyright (C) 2003-2005 Yoichi Yuasa + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +MODULE_AUTHOR("Yoichi Yuasa "); +MODULE_DESCRIPTION("NEC VR4100 series RTC driver"); +MODULE_LICENSE("GPL"); + +#define RTC1_TYPE1_START 0x0b0000c0UL +#define RTC1_TYPE1_END 0x0b0000dfUL +#define RTC2_TYPE1_START 0x0b0001c0UL +#define RTC2_TYPE1_END 0x0b0001dfUL + +#define RTC1_TYPE2_START 0x0f000100UL +#define RTC1_TYPE2_END 0x0f00011fUL +#define RTC2_TYPE2_START 0x0f000120UL +#define RTC2_TYPE2_END 0x0f00013fUL + +#define RTC1_SIZE 0x20 +#define RTC2_SIZE 0x20 + +/* RTC 1 registers */ +#define ETIMELREG 0x00 +#define ETIMEMREG 0x02 +#define ETIMEHREG 0x04 +/* RFU */ +#define ECMPLREG 0x08 +#define ECMPMREG 0x0a +#define ECMPHREG 0x0c +/* RFU */ +#define RTCL1LREG 0x10 +#define RTCL1HREG 0x12 +#define RTCL1CNTLREG 0x14 +#define RTCL1CNTHREG 0x16 +#define RTCL2LREG 0x18 +#define RTCL2HREG 0x1a +#define RTCL2CNTLREG 0x1c +#define RTCL2CNTHREG 0x1e + +/* RTC 2 registers */ +#define TCLKLREG 0x00 +#define TCLKHREG 0x02 +#define TCLKCNTLREG 0x04 +#define TCLKCNTHREG 0x06 +/* RFU */ +#define RTCINTREG 0x1e + #define TCLOCK_INT 0x08 + #define RTCLONG2_INT 0x04 + #define RTCLONG1_INT 0x02 + #define ELAPSEDTIME_INT 0x01 + +#define RTC_FREQUENCY 32768 +#define MAX_PERIODIC_RATE 6553 +#define MAX_USER_PERIODIC_RATE 64 + +static void __iomem *rtc1_base; +static void __iomem *rtc2_base; + +#define rtc1_read(offset) readw(rtc1_base + (offset)) +#define rtc1_write(offset, value) writew((value), rtc1_base + (offset)) + +#define rtc2_read(offset) readw(rtc2_base + (offset)) +#define rtc2_write(offset, value) writew((value), rtc2_base + (offset)) + +static unsigned long epoch = 1970; /* Jan 1 1970 00:00:00 */ + +static spinlock_t rtc_task_lock; +static wait_queue_head_t rtc_wait; +static unsigned long rtc_irq_data; +static struct fasync_struct *rtc_async_queue; +static rtc_task_t *rtc_callback; +static char rtc_name[] = "RTC"; +static unsigned long periodic_frequency; +static unsigned long periodic_count; + +typedef enum { + RTC_RELEASE, + RTC_OPEN, +} rtc_status_t; + +static rtc_status_t rtc_status; + +typedef enum { + FUNCTION_RTC_IOCTL, + FUNCTION_RTC_CONTROL, +} rtc_callfrom_t; + +struct resource rtc_resource[2] = { + { .name = rtc_name, + .flags = IORESOURCE_MEM, }, + { .name = rtc_name, + .flags = IORESOURCE_MEM, }, +}; + +#define RTC_NUM_RESOURCES sizeof(rtc_resource) / sizeof(struct resource) + +static inline unsigned long read_elapsed_second(void) +{ + unsigned long first_low, first_mid, first_high; + unsigned long second_low, second_mid, second_high; + + do { + first_low = rtc1_read(ETIMELREG); + first_mid = rtc1_read(ETIMEMREG); + first_high = rtc1_read(ETIMEHREG); + second_low = rtc1_read(ETIMELREG); + second_mid = rtc1_read(ETIMEMREG); + second_high = rtc1_read(ETIMEHREG); + } while (first_low != second_low || first_mid != second_mid || + first_high != second_high); + + return (first_high << 17) | (first_mid << 1) | (first_low >> 15); +} + +static inline void write_elapsed_second(unsigned long sec) +{ + spin_lock_irq(&rtc_lock); + + rtc1_write(ETIMELREG, (uint16_t)(sec << 15)); + rtc1_write(ETIMEMREG, (uint16_t)(sec >> 1)); + rtc1_write(ETIMEHREG, (uint16_t)(sec >> 17)); + + spin_unlock_irq(&rtc_lock); +} + +static void set_alarm(struct rtc_time *time) +{ + unsigned long alarm_sec; + + alarm_sec = mktime(time->tm_year + 1900, time->tm_mon + 1, time->tm_mday, + time->tm_hour, time->tm_min, time->tm_sec); + + spin_lock_irq(&rtc_lock); + + rtc1_write(ECMPLREG, (uint16_t)(alarm_sec << 15)); + rtc1_write(ECMPMREG, (uint16_t)(alarm_sec >> 1)); + rtc1_write(ECMPHREG, (uint16_t)(alarm_sec >> 17)); + + spin_unlock_irq(&rtc_lock); +} + +static void read_alarm(struct rtc_time *time) +{ + unsigned long low, mid, high; + + spin_lock_irq(&rtc_lock); + + low = rtc1_read(ECMPLREG); + mid = rtc1_read(ECMPMREG); + high = rtc1_read(ECMPHREG); + + spin_unlock_irq(&rtc_lock); + + to_tm((high << 17) | (mid << 1) | (low >> 15), time); + time->tm_year -= 1900; +} + +static void read_time(struct rtc_time *time) +{ + unsigned long epoch_sec, elapsed_sec; + + epoch_sec = mktime(epoch, 1, 1, 0, 0, 0); + elapsed_sec = read_elapsed_second(); + + to_tm(epoch_sec + elapsed_sec, time); + time->tm_year -= 1900; +} + +static void set_time(struct rtc_time *time) +{ + unsigned long epoch_sec, current_sec; + + epoch_sec = mktime(epoch, 1, 1, 0, 0, 0); + current_sec = mktime(time->tm_year + 1900, time->tm_mon + 1, time->tm_mday, + time->tm_hour, time->tm_min, time->tm_sec); + + write_elapsed_second(current_sec - epoch_sec); +} + +static ssize_t rtc_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) +{ + DECLARE_WAITQUEUE(wait, current); + unsigned long irq_data; + int retval = 0; + + if (count != sizeof(unsigned int) && count != sizeof(unsigned long)) + return -EINVAL; + + add_wait_queue(&rtc_wait, &wait); + + do { + __set_current_state(TASK_INTERRUPTIBLE); + + spin_lock_irq(&rtc_lock); + irq_data = rtc_irq_data; + rtc_irq_data = 0; + spin_unlock_irq(&rtc_lock); + + if (irq_data != 0) + break; + + if (file->f_flags & O_NONBLOCK) { + retval = -EAGAIN; + break; + } + + if (signal_pending(current)) { + retval = -ERESTARTSYS; + break; + } + } while (1); + + if (retval == 0) { + if (count == sizeof(unsigned int)) { + retval = put_user(irq_data, (unsigned int __user *)buf); + if (retval == 0) + retval = sizeof(unsigned int); + } else { + retval = put_user(irq_data, (unsigned long __user *)buf); + if (retval == 0) + retval = sizeof(unsigned long); + } + + } + + __set_current_state(TASK_RUNNING); + remove_wait_queue(&rtc_wait, &wait); + + return retval; +} + +static unsigned int rtc_poll(struct file *file, struct poll_table_struct *table) +{ + poll_wait(file, &rtc_wait, table); + + if (rtc_irq_data != 0) + return POLLIN | POLLRDNORM; + + return 0; +} + +static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, rtc_callfrom_t from) +{ + struct rtc_time time; + unsigned long count; + + switch (cmd) { + case RTC_AIE_ON: + enable_irq(ELAPSEDTIME_IRQ); + break; + case RTC_AIE_OFF: + disable_irq(ELAPSEDTIME_IRQ); + break; + case RTC_PIE_ON: + enable_irq(RTCLONG1_IRQ); + break; + case RTC_PIE_OFF: + disable_irq(RTCLONG1_IRQ); + break; + case RTC_ALM_SET: + if (copy_from_user(&time, (struct rtc_time __user *)arg, + sizeof(struct rtc_time))) + return -EFAULT; + + set_alarm(&time); + break; + case RTC_ALM_READ: + memset(&time, 0, sizeof(struct rtc_time)); + read_alarm(&time); + break; + case RTC_RD_TIME: + memset(&time, 0, sizeof(struct rtc_time)); + read_time(&time); + if (copy_to_user((void __user *)arg, &time, sizeof(struct rtc_time))) + return -EFAULT; + break; + case RTC_SET_TIME: + if (capable(CAP_SYS_TIME) == 0) + return -EACCES; + + if (copy_from_user(&time, (struct rtc_time __user *)arg, + sizeof(struct rtc_time))) + return -EFAULT; + + set_time(&time); + break; + case RTC_IRQP_READ: + return put_user(periodic_frequency, (unsigned long __user *)arg); + break; + case RTC_IRQP_SET: + if (arg > MAX_PERIODIC_RATE) + return -EINVAL; + + if (from == FUNCTION_RTC_IOCTL && arg > MAX_USER_PERIODIC_RATE && + capable(CAP_SYS_RESOURCE) == 0) + return -EACCES; + + periodic_frequency = arg; + + count = RTC_FREQUENCY; + do_div(count, arg); + + periodic_count = count; + + spin_lock_irq(&rtc_lock); + + rtc1_write(RTCL1LREG, count); + rtc1_write(RTCL1HREG, count >> 16); + + spin_unlock_irq(&rtc_lock); + break; + case RTC_EPOCH_READ: + return put_user(epoch, (unsigned long __user *)arg); + case RTC_EPOCH_SET: + /* Doesn't support before 1900 */ + if (arg < 1900) + return -EINVAL; + + if (capable(CAP_SYS_TIME) == 0) + return -EACCES; + + epoch = arg; + break; + default: + return -EINVAL; + } + + return 0; +} + +static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg) +{ + return rtc_do_ioctl(cmd, arg, FUNCTION_RTC_IOCTL); +} + +static int rtc_open(struct inode *inode, struct file *file) +{ + spin_lock_irq(&rtc_lock); + + if (rtc_status == RTC_OPEN) { + spin_unlock_irq(&rtc_lock); + return -EBUSY; + } + + rtc_status = RTC_OPEN; + rtc_irq_data = 0; + + spin_unlock_irq(&rtc_lock); + + return 0; +} + +static int rtc_release(struct inode *inode, struct file *file) +{ + if (file->f_flags & FASYNC) + (void)fasync_helper(-1, file, 0, &rtc_async_queue); + + spin_lock_irq(&rtc_lock); + + rtc1_write(ECMPLREG, 0); + rtc1_write(ECMPMREG, 0); + rtc1_write(ECMPHREG, 0); + rtc1_write(RTCL1LREG, 0); + rtc1_write(RTCL1HREG, 0); + + rtc_status = RTC_RELEASE; + + spin_unlock_irq(&rtc_lock); + + disable_irq(ELAPSEDTIME_IRQ); + disable_irq(RTCLONG1_IRQ); + + return 0; +} + +static int rtc_fasync(int fd, struct file *file, int on) +{ + return fasync_helper(fd, file, on, &rtc_async_queue); +} + +static struct file_operations rtc_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .read = rtc_read, + .poll = rtc_poll, + .ioctl = rtc_ioctl, + .open = rtc_open, + .release = rtc_release, + .fasync = rtc_fasync, +}; + +static irqreturn_t elapsedtime_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + spin_lock(&rtc_lock); + rtc2_write(RTCINTREG, ELAPSEDTIME_INT); + + rtc_irq_data += 0x100; + rtc_irq_data &= ~0xff; + rtc_irq_data |= RTC_AF; + spin_unlock(&rtc_lock); + + spin_lock(&rtc_lock); + if (rtc_callback) + rtc_callback->func(rtc_callback->private_data); + spin_unlock(&rtc_lock); + + wake_up_interruptible(&rtc_wait); + + kill_fasync(&rtc_async_queue, SIGIO, POLL_IN); + + return IRQ_HANDLED; +} + +static irqreturn_t rtclong1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long count = periodic_count; + + spin_lock(&rtc_lock); + rtc2_write(RTCINTREG, RTCLONG1_INT); + + rtc1_write(RTCL1LREG, count); + rtc1_write(RTCL1HREG, count >> 16); + + rtc_irq_data += 0x100; + rtc_irq_data &= ~0xff; + rtc_irq_data |= RTC_PF; + spin_unlock(&rtc_lock); + + spin_lock(&rtc_task_lock); + if (rtc_callback) + rtc_callback->func(rtc_callback->private_data); + spin_unlock(&rtc_task_lock); + + wake_up_interruptible(&rtc_wait); + + kill_fasync(&rtc_async_queue, SIGIO, POLL_IN); + + return IRQ_HANDLED; +} + +int rtc_register(rtc_task_t *task) +{ + if (task == NULL || task->func == NULL) + return -EINVAL; + + spin_lock_irq(&rtc_lock); + if (rtc_status == RTC_OPEN) { + spin_unlock_irq(&rtc_lock); + return -EBUSY; + } + + spin_lock(&rtc_task_lock); + if (rtc_callback != NULL) { + spin_unlock(&rtc_task_lock); + spin_unlock_irq(&rtc_task_lock); + return -EBUSY; + } + + rtc_callback = task; + spin_unlock(&rtc_task_lock); + + rtc_status = RTC_OPEN; + + spin_unlock_irq(&rtc_lock); + + return 0; +} + +EXPORT_SYMBOL_GPL(rtc_register); + +int rtc_unregister(rtc_task_t *task) +{ + spin_lock_irq(&rtc_task_lock); + if (task == NULL || rtc_callback != task) { + spin_unlock_irq(&rtc_task_lock); + return -ENXIO; + } + + spin_lock(&rtc_lock); + + rtc1_write(ECMPLREG, 0); + rtc1_write(ECMPMREG, 0); + rtc1_write(ECMPHREG, 0); + rtc1_write(RTCL1LREG, 0); + rtc1_write(RTCL1HREG, 0); + + rtc_status = RTC_RELEASE; + + spin_unlock(&rtc_lock); + + rtc_callback = NULL; + + spin_unlock_irq(&rtc_task_lock); + + disable_irq(ELAPSEDTIME_IRQ); + disable_irq(RTCLONG1_IRQ); + + return 0; +} + +EXPORT_SYMBOL_GPL(rtc_unregister); + +int rtc_control(rtc_task_t *task, unsigned int cmd, unsigned long arg) +{ + int retval = 0; + + spin_lock_irq(&rtc_task_lock); + + if (rtc_callback != task) + retval = -ENXIO; + else + rtc_do_ioctl(cmd, arg, FUNCTION_RTC_CONTROL); + + spin_unlock_irq(&rtc_task_lock); + + return retval; +} + +EXPORT_SYMBOL_GPL(rtc_control); + +static struct miscdevice rtc_miscdevice = { + .minor = RTC_MINOR, + .name = rtc_name, + .fops = &rtc_fops, +}; + +static int rtc_probe(struct device *dev) +{ + struct platform_device *pdev; + unsigned int irq; + int retval; + + pdev = to_platform_device(dev); + if (pdev->num_resources != 2) + return -EBUSY; + + rtc1_base = ioremap(pdev->resource[0].start, RTC1_SIZE); + if (rtc1_base == NULL) + return -EBUSY; + + rtc2_base = ioremap(pdev->resource[1].start, RTC2_SIZE); + if (rtc2_base == NULL) { + iounmap(rtc1_base); + rtc1_base = NULL; + return -EBUSY; + } + + retval = misc_register(&rtc_miscdevice); + if (retval < 0) { + iounmap(rtc1_base); + iounmap(rtc2_base); + rtc1_base = NULL; + rtc2_base = NULL; + return retval; + } + + spin_lock_irq(&rtc_lock); + + rtc1_write(ECMPLREG, 0); + rtc1_write(ECMPMREG, 0); + rtc1_write(ECMPHREG, 0); + rtc1_write(RTCL1LREG, 0); + rtc1_write(RTCL1HREG, 0); + + rtc_status = RTC_RELEASE; + rtc_irq_data = 0; + + spin_unlock_irq(&rtc_lock); + + init_waitqueue_head(&rtc_wait); + + irq = ELAPSEDTIME_IRQ; + retval = request_irq(irq, elapsedtime_interrupt, SA_INTERRUPT, + "elapsed_time", NULL); + if (retval == 0) { + irq = RTCLONG1_IRQ; + retval = request_irq(irq, rtclong1_interrupt, SA_INTERRUPT, + "rtclong1", NULL); + } + + if (retval < 0) { + printk(KERN_ERR "rtc: IRQ%d is busy\n", irq); + if (irq == RTCLONG1_IRQ) + free_irq(ELAPSEDTIME_IRQ, NULL); + iounmap(rtc1_base); + iounmap(rtc2_base); + rtc1_base = NULL; + rtc2_base = NULL; + return retval; + } + + disable_irq(ELAPSEDTIME_IRQ); + disable_irq(RTCLONG1_IRQ); + + spin_lock_init(&rtc_task_lock); + + printk(KERN_INFO "rtc: Real Time Clock of NEC VR4100 series\n"); + + return 0; +} + +static int rtc_remove(struct device *dev) +{ + int retval; + + retval = misc_deregister(&rtc_miscdevice); + if (retval < 0) + return retval; + + free_irq(ELAPSEDTIME_IRQ, NULL); + free_irq(RTCLONG1_IRQ, NULL); + if (rtc1_base != NULL) + iounmap(rtc1_base); + if (rtc2_base != NULL) + iounmap(rtc2_base); + + return 0; +} + +static struct platform_device *rtc_platform_device; + +static struct device_driver rtc_device_driver = { + .name = rtc_name, + .bus = &platform_bus_type, + .probe = rtc_probe, + .remove = rtc_remove, +}; + +static int __devinit vr41xx_rtc_init(void) +{ + int retval; + + switch (current_cpu_data.cputype) { + case CPU_VR4111: + case CPU_VR4121: + rtc_resource[0].start = RTC1_TYPE1_START; + rtc_resource[0].end = RTC1_TYPE1_END; + rtc_resource[1].start = RTC2_TYPE1_START; + rtc_resource[1].end = RTC2_TYPE1_END; + break; + case CPU_VR4122: + case CPU_VR4131: + case CPU_VR4133: + rtc_resource[0].start = RTC1_TYPE2_START; + rtc_resource[0].end = RTC1_TYPE2_END; + rtc_resource[1].start = RTC2_TYPE2_START; + rtc_resource[1].end = RTC2_TYPE2_END; + break; + default: + return -ENODEV; + break; + } + + rtc_platform_device = platform_device_register_simple("RTC", -1, rtc_resource, RTC_NUM_RESOURCES); + if (IS_ERR(rtc_platform_device)) + return PTR_ERR(rtc_platform_device); + + retval = driver_register(&rtc_device_driver); + if (retval < 0) + platform_device_unregister(rtc_platform_device); + + return retval; +} + +static void __devexit vr41xx_rtc_exit(void) +{ + driver_unregister(&rtc_device_driver); + + platform_device_unregister(rtc_platform_device); +} + +module_init(vr41xx_rtc_init); +module_exit(vr41xx_rtc_exit); diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c --- a/drivers/char/vt.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/char/vt.c 2005-03-30 16:58:50 -08:00 @@ -221,9 +221,6 @@ #define DO_UPDATE(vc) CON_IS_VISIBLE(vc) #endif -static int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data); -static struct pm_dev *pm_con; - static inline unsigned short *screenpos(struct vc_data *vc, int offset, int viewed) { unsigned short *p; @@ -723,12 +720,6 @@ } vc->vc_kmalloced = 1; vc_init(vc, vc->vc_rows, vc->vc_cols, 1); - - if (!pm_con) { - pm_con = pm_register(PM_SYS_DEV, - PM_SYS_VGA, - pm_con_request); - } } return 0; } @@ -3216,24 +3207,6 @@ softcursor_original = -1; add_softcursor(vc); } -} - -static int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data) -{ - switch (rqst) - { - case PM_RESUME: - acquire_console_sem(); - unblank_screen(); - release_console_sem(); - break; - case PM_SUSPEND: - acquire_console_sem(); - do_blank_screen(0); - release_console_sem(); - break; - } - return 0; } /* diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c --- a/drivers/ide/ide-cd.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/ide/ide-cd.c 2005-03-30 16:58:48 -08:00 @@ -324,6 +324,33 @@ #include "ide-cd.h" +static DECLARE_MUTEX(idecd_ref_sem); + +#define to_ide_cd(obj) container_of(obj, struct cdrom_info, kref) + +#define ide_cd_g(disk) ((disk)->private_data) + +static struct cdrom_info *ide_cd_get(struct gendisk *disk) +{ + struct cdrom_info *cd = NULL; + + down(&idecd_ref_sem); + cd = ide_cd_g(disk); + if (cd) + kref_get(&cd->kref); + up(&idecd_ref_sem); + return cd; +} + +static void ide_cd_release(struct kref *); + +static void ide_cd_put(struct cdrom_info *cd) +{ + down(&idecd_ref_sem); + kref_put(&cd->kref, ide_cd_release); + up(&idecd_ref_sem); +} + /**************************************************************************** * Generic packet command support and error handling routines. */ @@ -3225,14 +3252,27 @@ int ide_cdrom_cleanup(ide_drive_t *drive) { struct cdrom_info *info = drive->driver_data; - struct cdrom_device_info *devinfo = &info->devinfo; - struct gendisk *g = drive->disk; if (ide_unregister_subdriver(drive)) { printk(KERN_ERR "%s: %s: failed to ide_unregister_subdriver\n", __FUNCTION__, drive->name); return 1; } + + del_gendisk(drive->disk); + + ide_cd_put(info); + + return 0; +} + +static void ide_cd_release(struct kref *kref) +{ + struct cdrom_info *info = to_ide_cd(kref); + struct cdrom_device_info *devinfo = &info->devinfo; + ide_drive_t *drive = info->drive; + struct gendisk *g = drive->disk; + if (info->buffer != NULL) kfree(info->buffer); if (info->toc != NULL) @@ -3240,13 +3280,13 @@ if (info->changer_info != NULL) kfree(info->changer_info); if (devinfo->handle == drive && unregister_cdrom(devinfo)) - printk(KERN_ERR "%s: ide_cdrom_cleanup failed to unregister device from the cdrom driver.\n", drive->name); - kfree(info); + printk(KERN_ERR "%s: %s failed to unregister device from the cdrom " + "driver.\n", __FUNCTION__, drive->name); drive->driver_data = NULL; blk_queue_prep_rq(drive->queue, NULL); - del_gendisk(g); + g->private_data = NULL; g->fops = ide_fops; - return 0; + kfree(info); } static int ide_cdrom_attach (ide_drive_t *drive); @@ -3289,9 +3329,16 @@ static int idecd_open(struct inode * inode, struct file * file) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; - struct cdrom_info *info = drive->driver_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct cdrom_info *info; + ide_drive_t *drive; int rc = -ENOMEM; + + if (!(info = ide_cd_get(disk))) + return -ENXIO; + + drive = info->drive; + drive->usage++; if (!info->buffer) @@ -3299,16 +3346,24 @@ GFP_KERNEL|__GFP_REPEAT); if (!info->buffer || (rc = cdrom_open(&info->devinfo, inode, file))) drive->usage--; + + if (rc < 0) + ide_cd_put(info); + return rc; } static int idecd_release(struct inode * inode, struct file * file) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; - struct cdrom_info *info = drive->driver_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct cdrom_info *info = ide_cd_g(disk); + ide_drive_t *drive = info->drive; cdrom_release (&info->devinfo, file); drive->usage--; + + ide_cd_put(info); + return 0; } @@ -3316,27 +3371,27 @@ unsigned int cmd, unsigned long arg) { struct block_device *bdev = inode->i_bdev; - ide_drive_t *drive = bdev->bd_disk->private_data; - int err = generic_ide_ioctl(file, bdev, cmd, arg); - if (err == -EINVAL) { - struct cdrom_info *info = drive->driver_data; + struct cdrom_info *info = ide_cd_g(bdev->bd_disk); + int err; + + err = generic_ide_ioctl(info->drive, file, bdev, cmd, arg); + if (err == -EINVAL) err = cdrom_ioctl(file, &info->devinfo, inode, cmd, arg); - } + return err; } static int idecd_media_changed(struct gendisk *disk) { - ide_drive_t *drive = disk->private_data; - struct cdrom_info *info = drive->driver_data; + struct cdrom_info *info = ide_cd_g(disk); return cdrom_media_changed(&info->devinfo); } static int idecd_revalidate_disk(struct gendisk *disk) { - ide_drive_t *drive = disk->private_data; + struct cdrom_info *info = ide_cd_g(disk); struct request_sense sense; - cdrom_read_toc(drive, &sense); + cdrom_read_toc(info->drive, &sense); return 0; } @@ -3390,7 +3445,12 @@ goto failed; } memset(info, 0, sizeof (struct cdrom_info)); + + kref_init(&info->kref); + + info->drive = drive; drive->driver_data = info; + DRIVER(drive)->busy++; g->minors = 1; snprintf(g->devfs_name, sizeof(g->devfs_name), @@ -3417,6 +3477,7 @@ cdrom_read_toc(drive, &sense); g->fops = &idecd_ops; + g->private_data = info; g->flags |= GENHD_FL_REMOVABLE; add_disk(g); return 0; diff -Nru a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h --- a/drivers/ide/ide-cd.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/ide/ide-cd.h 2005-03-30 16:58:50 -08:00 @@ -460,6 +460,8 @@ /* Extra per-device info for cdrom drives. */ struct cdrom_info { + ide_drive_t *drive; + struct kref kref; /* Buffer for table of contents. NULL if we haven't allocated a TOC buffer for this device yet. */ diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c --- a/drivers/ide/ide-disk.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/ide/ide-disk.c 2005-03-30 16:58:48 -08:00 @@ -71,6 +71,38 @@ #include #include +struct ide_disk_obj { + ide_drive_t *drive; + struct kref kref; +}; + +static DECLARE_MUTEX(idedisk_ref_sem); + +#define to_ide_disk(obj) container_of(obj, struct ide_disk_obj, kref) + +#define ide_disk_g(disk) ((disk)->private_data) + +static struct ide_disk_obj *ide_disk_get(struct gendisk *disk) +{ + struct ide_disk_obj *idkp = NULL; + + down(&idedisk_ref_sem); + idkp = ide_disk_g(disk); + if (idkp) + kref_get(&idkp->kref); + up(&idedisk_ref_sem); + return idkp; +} + +static void ide_disk_release(struct kref *); + +static void ide_disk_put(struct ide_disk_obj *idkp) +{ + down(&idedisk_ref_sem); + kref_put(&idkp->kref, ide_disk_release); + up(&idedisk_ref_sem); +} + /* * lba_capacity_is_ok() performs a sanity check on the claimed "lba_capacity" * value for this drive (from its reported identification information). @@ -991,14 +1023,30 @@ static int idedisk_cleanup (ide_drive_t *drive) { + struct ide_disk_obj *idkp = drive->driver_data; struct gendisk *g = drive->disk; + ide_cacheflush_p(drive); if (ide_unregister_subdriver(drive)) return 1; del_gendisk(g); + + ide_disk_put(idkp); + + return 0; +} + +static void ide_disk_release(struct kref *kref) +{ + struct ide_disk_obj *idkp = to_ide_disk(kref); + ide_drive_t *drive = idkp->drive; + struct gendisk *g = drive->disk; + + drive->driver_data = NULL; drive->devfs_name[0] = '\0'; + g->private_data = NULL; g->fops = ide_fops; - return 0; + kfree(idkp); } static int idedisk_attach(ide_drive_t *drive); @@ -1028,7 +1076,7 @@ } printk("Shutdown: %s\n", drive->name); - dev->bus->suspend(dev, PM_SUSPEND_STANDBY); + dev->bus->suspend(dev, PMSG_SUSPEND); } /* @@ -1056,7 +1104,15 @@ static int idedisk_open(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_disk_obj *idkp; + ide_drive_t *drive; + + if (!(idkp = ide_disk_get(disk))) + return -ENXIO; + + drive = idkp->drive; + drive->usage++; if (drive->removable && drive->usage == 1) { ide_task_t args; @@ -1078,7 +1134,10 @@ static int idedisk_release(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_disk_obj *idkp = ide_disk_g(disk); + ide_drive_t *drive = idkp->drive; + if (drive->usage == 1) ide_cacheflush_p(drive); if (drive->removable && drive->usage == 1) { @@ -1091,6 +1150,9 @@ drive->doorlocking = 0; } drive->usage--; + + ide_disk_put(idkp); + return 0; } @@ -1098,12 +1160,14 @@ unsigned int cmd, unsigned long arg) { struct block_device *bdev = inode->i_bdev; - return generic_ide_ioctl(file, bdev, cmd, arg); + struct ide_disk_obj *idkp = ide_disk_g(bdev->bd_disk); + return generic_ide_ioctl(idkp->drive, file, bdev, cmd, arg); } static int idedisk_media_changed(struct gendisk *disk) { - ide_drive_t *drive = disk->private_data; + struct ide_disk_obj *idkp = ide_disk_g(disk); + ide_drive_t *drive = idkp->drive; /* do not scan partitions twice if this is a removable device */ if (drive->attach) { @@ -1116,8 +1180,8 @@ static int idedisk_revalidate_disk(struct gendisk *disk) { - ide_drive_t *drive = disk->private_data; - set_capacity(disk, idedisk_capacity(drive)); + struct ide_disk_obj *idkp = ide_disk_g(disk); + set_capacity(disk, idedisk_capacity(idkp->drive)); return 0; } @@ -1134,6 +1198,7 @@ static int idedisk_attach(ide_drive_t *drive) { + struct ide_disk_obj *idkp; struct gendisk *g = drive->disk; /* strstr("foo", "") is non-NULL */ @@ -1144,10 +1209,22 @@ if (drive->media != ide_disk) goto failed; + idkp = kmalloc(sizeof(*idkp), GFP_KERNEL); + if (!idkp) + goto failed; + if (ide_register_subdriver(drive, &idedisk_driver)) { printk (KERN_ERR "ide-disk: %s: Failed to register the driver with ide.c\n", drive->name); - goto failed; + goto out_free_idkp; } + + memset(idkp, 0, sizeof(*idkp)); + + kref_init(&idkp->kref); + + idkp->drive = drive; + drive->driver_data = idkp; + DRIVER(drive)->busy++; idedisk_setup(drive); if ((!drive->head || drive->head > 16) && !drive->select.b.lba) { @@ -1163,8 +1240,11 @@ g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; set_capacity(g, idedisk_capacity(drive)); g->fops = &idedisk_ops; + g->private_data = idkp; add_disk(g); return 0; +out_free_idkp: + kfree(idkp); failed: return 1; } diff -Nru a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c --- a/drivers/ide/ide-floppy.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/ide/ide-floppy.c 2005-03-30 16:58:51 -08:00 @@ -274,8 +274,9 @@ * driver due to an interrupt or a timer event is stored in a variable * of type idefloppy_floppy_t, defined below. */ -typedef struct { - ide_drive_t *drive; +typedef struct ide_floppy_obj { + ide_drive_t *drive; + struct kref kref; /* Current packet command */ idefloppy_pc_t *pc; @@ -514,6 +515,33 @@ u8 reserved[4]; } idefloppy_mode_parameter_header_t; +static DECLARE_MUTEX(idefloppy_ref_sem); + +#define to_ide_floppy(obj) container_of(obj, struct ide_floppy_obj, kref) + +#define ide_floppy_g(disk) ((disk)->private_data) + +static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk) +{ + struct ide_floppy_obj *floppy = NULL; + + down(&idefloppy_ref_sem); + floppy = ide_floppy_g(disk); + if (floppy) + kref_get(&floppy->kref); + up(&idefloppy_ref_sem); + return floppy; +} + +static void ide_floppy_release(struct kref *); + +static void ide_floppy_put(struct ide_floppy_obj *floppy) +{ + down(&idefloppy_ref_sem); + kref_put(&floppy->kref, ide_floppy_release); + up(&idefloppy_ref_sem); +} + /* * Too bad. The drive wants to send us data which we are not ready to accept. * Just throw it away. @@ -1792,9 +1820,6 @@ struct idefloppy_id_gcw gcw; *((u16 *) &gcw) = drive->id->config; - drive->driver_data = floppy; - memset(floppy, 0, sizeof(idefloppy_floppy_t)); - floppy->drive = drive; floppy->pc = floppy->pc_stack; if (gcw.drq_type == 1) set_bit(IDEFLOPPY_DRQ_INTERRUPT, &floppy->flags); @@ -1838,13 +1863,26 @@ if (ide_unregister_subdriver(drive)) return 1; - drive->driver_data = NULL; - kfree(floppy); + del_gendisk(g); - g->fops = ide_fops; + + ide_floppy_put(floppy); + return 0; } +static void ide_floppy_release(struct kref *kref) +{ + struct ide_floppy_obj *floppy = to_ide_floppy(kref); + ide_drive_t *drive = floppy->drive; + struct gendisk *g = drive->disk; + + drive->driver_data = NULL; + g->private_data = NULL; + g->fops = ide_fops; + kfree(floppy); +} + #ifdef CONFIG_PROC_FS static int proc_idefloppy_read_capacity @@ -1893,14 +1931,21 @@ static int idefloppy_open(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; - idefloppy_floppy_t *floppy = drive->driver_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_floppy_obj *floppy; + ide_drive_t *drive; idefloppy_pc_t pc; + int ret = 0; - drive->usage++; - debug_log(KERN_INFO "Reached idefloppy_open\n"); + if (!(floppy = ide_floppy_get(disk))) + return -ENXIO; + + drive = floppy->drive; + + drive->usage++; + if (drive->usage == 1) { clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags); /* Just in case */ @@ -1920,13 +1965,15 @@ */ ) { drive->usage--; - return -EIO; + ret = -EIO; + goto out_put_floppy; } if (floppy->wp && (filp->f_mode & 2)) { drive->usage--; - return -EROFS; - } + ret = -EROFS; + goto out_put_floppy; + } set_bit(IDEFLOPPY_MEDIA_CHANGED, &floppy->flags); /* IOMEGA Clik! drives do not support lock/unlock commands */ if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) { @@ -1936,21 +1983,26 @@ check_disk_change(inode->i_bdev); } else if (test_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags)) { drive->usage--; - return -EBUSY; + ret = -EBUSY; + goto out_put_floppy; } return 0; + +out_put_floppy: + ide_floppy_put(floppy); + return ret; } static int idefloppy_release(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_floppy_obj *floppy = ide_floppy_g(disk); + ide_drive_t *drive = floppy->drive; idefloppy_pc_t pc; debug_log(KERN_INFO "Reached idefloppy_release\n"); if (drive->usage == 1) { - idefloppy_floppy_t *floppy = drive->driver_data; - /* IOMEGA Clik! drives do not support lock/unlock commands */ if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) { idefloppy_create_prevent_cmd(&pc, 0); @@ -1960,6 +2012,9 @@ clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags); } drive->usage--; + + ide_floppy_put(floppy); + return 0; } @@ -1967,10 +2022,10 @@ unsigned int cmd, unsigned long arg) { struct block_device *bdev = inode->i_bdev; - ide_drive_t *drive = bdev->bd_disk->private_data; - idefloppy_floppy_t *floppy = drive->driver_data; + struct ide_floppy_obj *floppy = ide_floppy_g(bdev->bd_disk); + ide_drive_t *drive = floppy->drive; void __user *argp = (void __user *)arg; - int err = generic_ide_ioctl(file, bdev, cmd, arg); + int err = generic_ide_ioctl(drive, file, bdev, cmd, arg); int prevent = (arg) ? 1 : 0; idefloppy_pc_t pc; if (err != -EINVAL) @@ -2031,8 +2086,8 @@ static int idefloppy_media_changed(struct gendisk *disk) { - ide_drive_t *drive = disk->private_data; - idefloppy_floppy_t *floppy = drive->driver_data; + struct ide_floppy_obj *floppy = ide_floppy_g(disk); + ide_drive_t *drive = floppy->drive; /* do not scan partitions twice if this is a removable device */ if (drive->attach) { @@ -2044,8 +2099,8 @@ static int idefloppy_revalidate_disk(struct gendisk *disk) { - ide_drive_t *drive = disk->private_data; - set_capacity(disk, idefloppy_capacity(drive)); + struct ide_floppy_obj *floppy = ide_floppy_g(disk); + set_capacity(disk, idefloppy_capacity(floppy->drive)); return 0; } @@ -2085,6 +2140,15 @@ kfree (floppy); goto failed; } + + memset(floppy, 0, sizeof(*floppy)); + + kref_init(&floppy->kref); + + floppy->drive = drive; + + drive->driver_data = floppy; + DRIVER(drive)->busy++; idefloppy_setup (drive, floppy); DRIVER(drive)->busy--; @@ -2093,6 +2157,7 @@ strcpy(g->devfs_name, drive->devfs_name); g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; g->fops = &idefloppy_ops; + g->private_data = floppy; drive->attach = 1; add_disk(g); return 0; diff -Nru a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c --- a/drivers/ide/ide-tape.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/ide/ide-tape.c 2005-03-30 16:58:48 -08:00 @@ -781,8 +781,10 @@ * driver due to an interrupt or a timer event is stored in a variable * of type idetape_tape_t, defined below. */ -typedef struct { - ide_drive_t *drive; +typedef struct ide_tape_obj { + ide_drive_t *drive; + struct kref kref; + /* * Since a typical character device operation requires more * than one packet command, we provide here enough memory @@ -1007,6 +1009,33 @@ int debug_level; } idetape_tape_t; +static DECLARE_MUTEX(idetape_ref_sem); + +#define to_ide_tape(obj) container_of(obj, struct ide_tape_obj, kref) + +#define ide_tape_g(disk) ((disk)->private_data) + +static struct ide_tape_obj *ide_tape_get(struct gendisk *disk) +{ + struct ide_tape_obj *tape = NULL; + + down(&idetape_ref_sem); + tape = ide_tape_g(disk); + if (tape) + kref_get(&tape->kref); + up(&idetape_ref_sem); + return tape; +} + +static void ide_tape_release(struct kref *); + +static void ide_tape_put(struct ide_tape_obj *tape) +{ + down(&idetape_ref_sem); + kref_put(&tape->kref, ide_tape_release); + up(&idetape_ref_sem); +} + /* * Tape door status */ @@ -1093,15 +1122,6 @@ #define IDETAPE_ERROR_EOD 103 /* - * idetape_chrdev_t provides the link between out character device - * interface and our block device interface and the corresponding - * ide_drive_t structure. - */ -typedef struct { - ide_drive_t *drive; -} idetape_chrdev_t; - -/* * The following is used to format the general configuration word of * the ATAPI IDENTIFY DEVICE command. */ @@ -1257,7 +1277,21 @@ * The variables below are used for the character device interface. * Additional state variables are defined in our ide_drive_t structure. */ -static idetape_chrdev_t idetape_chrdevs[MAX_HWIFS * MAX_DRIVES]; +static struct ide_tape_obj * idetape_devs[MAX_HWIFS * MAX_DRIVES]; + +#define ide_tape_f(file) ((file)->private_data) + +static struct ide_tape_obj *ide_tape_chrdev_get(unsigned int i) +{ + struct ide_tape_obj *tape = NULL; + + down(&idetape_ref_sem); + tape = idetape_devs[i]; + if (tape) + kref_get(&tape->kref); + up(&idetape_ref_sem); + return tape; +} /* * Function declarations @@ -3669,8 +3703,8 @@ static ssize_t idetape_chrdev_read (struct file *file, char __user *buf, size_t count, loff_t *ppos) { - ide_drive_t *drive = file->private_data; - idetape_tape_t *tape = drive->driver_data; + struct ide_tape_obj *tape = ide_tape_f(file); + ide_drive_t *drive = tape->drive; ssize_t bytes_read,temp, actually_read = 0, rc; #if IDETAPE_DEBUG_LOG @@ -3728,8 +3762,8 @@ static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - ide_drive_t *drive = file->private_data; - idetape_tape_t *tape = drive->driver_data; + struct ide_tape_obj *tape = ide_tape_f(file); + ide_drive_t *drive = tape->drive; ssize_t retval, actually_written = 0; /* The drive is write protected. */ @@ -4031,8 +4065,8 @@ */ static int idetape_chrdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - ide_drive_t *drive = file->private_data; - idetape_tape_t *tape = drive->driver_data; + struct ide_tape_obj *tape = ide_tape_f(file); + ide_drive_t *drive = tape->drive; struct mtop mtop; struct mtget mtget; struct mtpos mtpos; @@ -4109,17 +4143,24 @@ if (i >= MAX_HWIFS * MAX_DRIVES) return -ENXIO; - drive = idetape_chrdevs[i].drive; - tape = drive->driver_data; - filp->private_data = drive; - if (test_and_set_bit(IDETAPE_BUSY, &tape->flags)) - return -EBUSY; + if (!(tape = ide_tape_chrdev_get(i))) + return -ENXIO; + + drive = tape->drive; + + filp->private_data = tape; + + if (test_and_set_bit(IDETAPE_BUSY, &tape->flags)) { + retval = -EBUSY; + goto out_put_tape; + } + retval = idetape_wait_ready(drive, 60 * HZ); if (retval) { clear_bit(IDETAPE_BUSY, &tape->flags); printk(KERN_ERR "ide-tape: %s: drive not ready\n", tape->name); - return retval; + goto out_put_tape; } idetape_read_position(drive); @@ -4143,7 +4184,8 @@ if ((filp->f_flags & O_ACCMODE) == O_WRONLY || (filp->f_flags & O_ACCMODE) == O_RDWR) { clear_bit(IDETAPE_BUSY, &tape->flags); - return -EROFS; + retval = -EROFS; + goto out_put_tape; } } @@ -4161,6 +4203,10 @@ idetape_restart_speed_control(drive); tape->restart_speed_control_req = 0; return 0; + +out_put_tape: + ide_tape_put(tape); + return retval; } static void idetape_write_release (ide_drive_t *drive, unsigned int minor) @@ -4184,8 +4230,8 @@ */ static int idetape_chrdev_release (struct inode *inode, struct file *filp) { - ide_drive_t *drive = filp->private_data; - idetape_tape_t *tape; + struct ide_tape_obj *tape = ide_tape_f(filp); + ide_drive_t *drive = tape->drive; idetape_pc_t pc; unsigned int minor = iminor(inode); @@ -4219,6 +4265,7 @@ } } clear_bit(IDETAPE_BUSY, &tape->flags); + ide_tape_put(tape); unlock_kernel(); return 0; } @@ -4529,9 +4576,7 @@ int stage_size; struct sysinfo si; - memset(tape, 0, sizeof (idetape_tape_t)); spin_lock_init(&tape->spinlock); - drive->driver_data = tape; drive->dsc_overlap = 1; #ifdef CONFIG_BLK_DEV_IDEPCI if (HWIF(drive)->pci_dev != NULL) { @@ -4549,7 +4594,6 @@ /* Seagate Travan drives do not support DSC overlap. */ if (strstr(drive->id->model, "Seagate STT3401")) drive->dsc_overlap = 0; - tape->drive = drive; tape->minor = minor; tape->name[0] = 'h'; tape->name[1] = 't'; @@ -4630,7 +4674,6 @@ static int idetape_cleanup (ide_drive_t *drive) { idetape_tape_t *tape = drive->driver_data; - int minor = tape->minor; unsigned long flags; spin_lock_irqsave(&ide_lock, flags); @@ -4639,17 +4682,30 @@ spin_unlock_irqrestore(&ide_lock, flags); return 1; } - idetape_chrdevs[minor].drive = NULL; + spin_unlock_irqrestore(&ide_lock, flags); DRIVER(drive)->busy = 0; (void) ide_unregister_subdriver(drive); + + ide_tape_put(tape); + + return 0; +} + +static void ide_tape_release(struct kref *kref) +{ + struct ide_tape_obj *tape = to_ide_tape(kref); + ide_drive_t *drive = tape->drive; + struct gendisk *g = drive->disk; + drive->driver_data = NULL; devfs_remove("%s/mt", drive->devfs_name); devfs_remove("%s/mtn", drive->devfs_name); - devfs_unregister_tape(drive->disk->number); - kfree (tape); - drive->disk->fops = ide_fops; - return 0; + devfs_unregister_tape(g->number); + idetape_devs[tape->minor] = NULL; + g->private_data = NULL; + g->fops = ide_fops; + kfree(tape); } #ifdef CONFIG_PROC_FS @@ -4714,15 +4770,30 @@ static int idetape_open(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_tape_obj *tape; + ide_drive_t *drive; + + if (!(tape = ide_tape_get(disk))) + return -ENXIO; + + drive = tape->drive; + drive->usage++; + return 0; } static int idetape_release(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_tape_obj *tape = ide_tape_g(disk); + ide_drive_t *drive = tape->drive; + drive->usage--; + + ide_tape_put(tape); + return 0; } @@ -4730,8 +4801,9 @@ unsigned int cmd, unsigned long arg) { struct block_device *bdev = inode->i_bdev; - ide_drive_t *drive = bdev->bd_disk->private_data; - int err = generic_ide_ioctl(file, bdev, cmd, arg); + struct ide_tape_obj *tape = ide_tape_g(bdev->bd_disk); + ide_drive_t *drive = tape->drive; + int err = generic_ide_ioctl(drive, file, bdev, cmd, arg); if (err == -EINVAL) err = idetape_blkdev_ioctl(drive, cmd, arg); return err; @@ -4747,6 +4819,7 @@ static int idetape_attach (ide_drive_t *drive) { idetape_tape_t *tape; + struct gendisk *g = drive->disk; int minor; if (!strstr("ide-tape", drive->driver_req)) @@ -4777,10 +4850,22 @@ kfree(tape); goto failed; } - for (minor = 0; idetape_chrdevs[minor].drive != NULL; minor++) + + memset(tape, 0, sizeof(*tape)); + + kref_init(&tape->kref); + + tape->drive = drive; + + drive->driver_data = tape; + + down(&idetape_ref_sem); + for (minor = 0; idetape_devs[minor]; minor++) ; + idetape_devs[minor] = tape; + up(&idetape_ref_sem); + idetape_setup(drive, tape, minor); - idetape_chrdevs[minor].drive = drive; devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), S_IFCHR | S_IRUGO | S_IWUGO, @@ -4789,8 +4874,10 @@ S_IFCHR | S_IRUGO | S_IWUGO, "%s/mtn", drive->devfs_name); - drive->disk->number = devfs_register_tape(drive->devfs_name); - drive->disk->fops = &idetape_block_ops; + g->number = devfs_register_tape(drive->devfs_name); + g->fops = &idetape_block_ops; + g->private_data = tape; + return 0; failed: return 1; diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/ide/ide.c 2005-03-30 16:58:48 -08:00 @@ -1414,10 +1414,9 @@ return ide_do_drive_cmd(drive, &rq, ide_head_wait); } -int generic_ide_ioctl(struct file *file, struct block_device *bdev, +int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev, unsigned int cmd, unsigned long arg) { - ide_drive_t *drive = bdev->bd_disk->private_data; ide_settings_t *setting; int err = 0; void __user *p = (void __user *)arg; diff -Nru a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c --- a/drivers/ide/pci/cs5520.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/ide/pci/cs5520.c 2005-03-30 16:58:47 -08:00 @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -227,7 +228,7 @@ return 1; } pci_set_master(dev); - if (pci_set_dma_mask(dev, 0xFFFFFFFF)) { + if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { printk(KERN_WARNING "cs5520: No suitable DMA available.\n"); return -ENODEV; } diff -Nru a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c --- a/drivers/ieee1394/dv1394.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/ieee1394/dv1394.c 2005-03-30 16:58:51 -08:00 @@ -2531,7 +2531,7 @@ mm_segment_t old_fs; int ret; - if (file->f_op->ioctl != dv1394_ioctl) + if (file->f_op->unlocked_ioctl != dv1394_ioctl) return -EFAULT; if (copy_from_user(&dv32, (void __user *)arg, sizeof(dv32))) @@ -2547,8 +2547,7 @@ old_fs = get_fs(); set_fs(KERNEL_DS); - ret = dv1394_ioctl(file, - DV1394_IOC_INIT, (unsigned long)&dv); + ret = dv1394_ioctl(file, DV1394_IOC_INIT, (unsigned long)&dv); set_fs(old_fs); return ret; @@ -2561,13 +2560,12 @@ mm_segment_t old_fs; int ret; - if (file->f_op->ioctl != dv1394_ioctl) + if (file->f_op->unlocked_ioctl != dv1394_ioctl) return -EFAULT; old_fs = get_fs(); set_fs(KERNEL_DS); - ret = dv1394_ioctl(file, - DV1394_IOC_GET_STATUS, (unsigned long)&dv); + ret = dv1394_ioctl(file, DV1394_IOC_GET_STATUS, (unsigned long)&dv); set_fs(old_fs); if (!ret) { @@ -2595,7 +2593,6 @@ static long dv1394_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - int err; switch (cmd) { case DV1394_IOC_SHUTDOWN: case DV1394_IOC_SUBMIT_FRAMES: diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/ieee1394/eth1394.c 2005-03-30 16:58:49 -08:00 @@ -625,7 +625,7 @@ goto out; } - ETH1394_PRINT (KERN_ERR, dev->name, "IEEE-1394 IPv4 over 1394 Ethernet (fw-host%d)\n", + ETH1394_PRINT (KERN_INFO, dev->name, "IEEE-1394 IPv4 over 1394 Ethernet (fw-host%d)\n", host->id); hi->host = host; diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c --- a/drivers/ieee1394/nodemgr.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/ieee1394/nodemgr.c 2005-03-30 16:58:49 -08:00 @@ -1284,7 +1284,7 @@ if (ud->device.driver && (!ud->device.driver->suspend || - ud->device.driver->suspend(&ud->device, 0, 0))) + ud->device.driver->suspend(&ud->device, PMSG_SUSPEND, 0))) device_release_driver(&ud->device); } up_write(&ne->device.bus->subsys.rwsem); diff -Nru a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c --- a/drivers/ieee1394/ohci1394.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/ieee1394/ohci1394.c 2005-03-30 16:58:50 -08:00 @@ -538,6 +538,11 @@ /* Initialize AT dma */ initialize_dma_trm_ctx(&ohci->at_req_context); initialize_dma_trm_ctx(&ohci->at_resp_context); + + /* Initialize IR Legacy DMA */ + ohci->ir_legacy_channels = 0; + initialize_dma_rcv_ctx(&ohci->ir_legacy_context, 1); + DBGMSG("ISO receive legacy context activated"); /* * Accept AT requests from all nodes. This probably @@ -1035,22 +1040,6 @@ return -EFAULT; } - /* activate the legacy IR context */ - if (ohci->ir_legacy_context.ohci == NULL) { - if (alloc_dma_rcv_ctx(ohci, &ohci->ir_legacy_context, - DMA_CTX_ISO, 0, IR_NUM_DESC, - IR_BUF_SIZE, IR_SPLIT_BUF_SIZE, - OHCI1394_IsoRcvContextBase) < 0) { - PRINT(KERN_ERR, "%s: failed to allocate an IR context", - __FUNCTION__); - return -ENOMEM; - } - ohci->ir_legacy_channels = 0; - initialize_dma_rcv_ctx(&ohci->ir_legacy_context, 1); - - DBGMSG("ISO receive legacy context activated"); - } - mask = (u64)0x1<IR_channel_lock, flags); @@ -1112,12 +1101,6 @@ spin_unlock_irqrestore(&ohci->IR_channel_lock, flags); DBGMSG("Listening disabled on channel %d", arg); - - if (ohci->ir_legacy_channels == 0) { - stop_dma_rcv_ctx(&ohci->ir_legacy_context); - free_dma_rcv_ctx(&ohci->ir_legacy_context); - DBGMSG("ISO receive legacy context deactivated"); - } break; } default: @@ -2921,7 +2904,9 @@ enum context_type type, int ctx, int num_desc, int buf_size, int split_buf_size, int context_base) { - int i; + int i, len; + static int num_allocs; + static char pool_name[20]; d->ohci = ohci; d->type = type; @@ -2965,9 +2950,19 @@ free_dma_rcv_ctx(d); return -ENOMEM; } - - d->prg_pool = pci_pool_create("ohci1394 rcv prg", ohci->dev, + + len = sprintf(pool_name, "ohci1394_rcv_prg"); + sprintf(pool_name+len, "%d", num_allocs); + d->prg_pool = pci_pool_create(pool_name, ohci->dev, sizeof(struct dma_cmd), 4, 0); + if(d->prg_pool == NULL) + { + PRINT(KERN_ERR, "pci_pool_create failed for %s", pool_name); + free_dma_rcv_ctx(d); + return -ENOMEM; + } + num_allocs++; + OHCI_DMA_ALLOC("dma_rcv prg pool"); for (i=0; inum_desc; i++) { @@ -3060,7 +3055,9 @@ enum context_type type, int ctx, int num_desc, int context_base) { - int i; + int i, len; + static char pool_name[20]; + static int num_allocs=0; d->ohci = ohci; d->type = type; @@ -3082,8 +3079,17 @@ memset(d->prg_cpu, 0, d->num_desc * sizeof(struct at_dma_prg*)); memset(d->prg_bus, 0, d->num_desc * sizeof(dma_addr_t)); - d->prg_pool = pci_pool_create("ohci1394 trm prg", ohci->dev, + len = sprintf(pool_name, "ohci1394_trm_prg"); + sprintf(pool_name+len, "%d", num_allocs); + d->prg_pool = pci_pool_create(pool_name, ohci->dev, sizeof(struct at_dma_prg), 4, 0); + if (d->prg_pool == NULL) { + PRINT(KERN_ERR, "pci_pool_create failed for %s", pool_name); + free_dma_trm_ctx(d); + return -ENOMEM; + } + num_allocs++; + OHCI_DMA_ALLOC("dma_rcv prg pool"); for (i = 0; i < d->num_desc; i++) { @@ -3355,10 +3361,19 @@ ohci->ISO_channel_usage = 0; spin_lock_init(&ohci->IR_channel_lock); - /* the IR DMA context is allocated on-demand; mark it inactive */ - ohci->ir_legacy_context.ohci = NULL; + /* Allocate the IR DMA context right here so we don't have + * to do it in interrupt path - note that this doesn't + * waste much memory and avoids the jugglery required to + * allocate it in IRQ path. */ + if (alloc_dma_rcv_ctx(ohci, &ohci->ir_legacy_context, + DMA_CTX_ISO, 0, IR_NUM_DESC, + IR_BUF_SIZE, IR_SPLIT_BUF_SIZE, + OHCI1394_IsoRcvContextBase) < 0) { + FAIL(-ENOMEM, "Cannot allocate IR Legacy DMA context"); + } - /* same for the IT DMA context */ + /* We hopefully don't have to pre-allocate IT DMA like we did + * for IR DMA above. Allocate it on-demand and mark inactive. */ ohci->it_legacy_context.ohci = NULL; if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ, @@ -3398,6 +3413,7 @@ switch (ohci->init_state) { case OHCI_INIT_DONE: + stop_dma_rcv_ctx(&ohci->ir_legacy_context); hpsb_remove_host(ohci->host); /* Clear out BUS Options */ @@ -3447,6 +3463,10 @@ /* Free IT dma */ free_dma_trm_ctx(&ohci->it_legacy_context); + /* Free IR legacy dma */ + free_dma_rcv_ctx(&ohci->ir_legacy_context); + + case OHCI_INIT_HAVE_SELFID_BUFFER: pci_free_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE, ohci->selfid_buf_cpu, @@ -3512,7 +3532,7 @@ } -static int ohci1394_pci_suspend (struct pci_dev *pdev, u32 state) +static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state) { #ifdef CONFIG_PMAC_PBOOK { @@ -3678,7 +3698,7 @@ static int __init ohci1394_init(void) { - return pci_module_init(&ohci1394_pci_driver); + return pci_register_driver(&ohci1394_pci_driver); } module_init(ohci1394_init); diff -Nru a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c --- a/drivers/ieee1394/pcilynx.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/ieee1394/pcilynx.c 2005-03-30 16:58:48 -08:00 @@ -1,5 +1,5 @@ /* - * ti_pcilynx.c - Texas Instruments PCILynx driver + * pcilynx.c - Texas Instruments PCILynx driver * Copyright (C) 1999,2000 Andreas Bombe , * Stephan Linz * Manfred Weihs @@ -1952,7 +1952,7 @@ } #endif - ret = pci_module_init(&lynx_pci_driver); + ret = pci_register_driver(&lynx_pci_driver); if (ret < 0) { PRINT_G(KERN_ERR, "PCI module init failed"); goto free_char_dev; diff -Nru a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c --- a/drivers/ieee1394/raw1394.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/ieee1394/raw1394.c 2005-03-30 16:58:47 -08:00 @@ -2737,7 +2737,8 @@ list) { entry = fi_hlp->addr_list.next; while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, struct + arm_addr = list_entry(entry, + struct arm_addr, addr_list); if (arm_addr->start == @@ -2945,10 +2946,10 @@ { class_simple_device_remove(MKDEV( IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); - hpsb_unregister_protocol(&raw1394_driver); cdev_del(&raw1394_cdev); devfs_remove(RAW1394_DEVICE_NAME); hpsb_unregister_highlevel(&raw1394_highlevel); + hpsb_unregister_protocol(&raw1394_driver); } module_init(init_raw1394); diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c --- a/drivers/ieee1394/sbp2.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/ieee1394/sbp2.c 2005-03-30 16:58:47 -08:00 @@ -905,9 +905,13 @@ * connected to the sbp2 device being removed. That host would * have a certain amount of time to relogin before the sbp2 device * allows someone else to login instead. One second makes sense. */ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); - + msleep_interruptible(1000); + if (signal_pending(current)) { + SBP2_WARN("aborting sbp2_start_device due to event"); + sbp2_remove_device(scsi_id); + return -EINTR; + } + /* * Login to the sbp-2 device */ diff -Nru a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c --- a/drivers/ieee1394/video1394.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/ieee1394/video1394.c 2005-03-30 16:58:47 -08:00 @@ -710,6 +710,17 @@ reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1<ctx); } +static inline unsigned video1394_buffer_state(struct dma_iso_ctx *d, + unsigned int buffer) +{ + unsigned long flags; + unsigned int ret; + spin_lock_irqsave(&d->lock, flags); + ret = d->buffer_status[buffer]; + spin_unlock_irqrestore(&d->lock, flags); + return ret; +} + static int __video1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { @@ -970,24 +981,13 @@ return -EINTR; } -#if 1 - while (d->buffer_status[v.buffer]!= - VIDEO1394_BUFFER_READY) { - spin_unlock_irqrestore(&d->lock, flags); - interruptible_sleep_on(&d->waitq); - spin_lock_irqsave(&d->lock, flags); - if (signal_pending(current)) { - spin_unlock_irqrestore(&d->lock,flags); - return -EINTR; - } - } -#else - if (wait_event_interruptible(d->waitq, - d->buffer_status[v.buffer] - == VIDEO1394_BUFFER_READY) - == -ERESTARTSYS) - return -EINTR; -#endif + spin_unlock_irqrestore(&d->lock, flags); + wait_event_interruptible(d->waitq, + video1394_buffer_state(d, v.buffer) == + VIDEO1394_BUFFER_READY); + if (signal_pending(current)) + return -EINTR; + spin_lock_irqsave(&d->lock, flags); d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; break; default: @@ -1144,19 +1144,10 @@ d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; return 0; case VIDEO1394_BUFFER_QUEUED: -#if 1 - while (d->buffer_status[v.buffer]!= - VIDEO1394_BUFFER_READY) { - interruptible_sleep_on(&d->waitq); - if (signal_pending(current)) return -EINTR; - } -#else - if (wait_event_interruptible(d->waitq, - d->buffer_status[v.buffer] - == VIDEO1394_BUFFER_READY) - == -ERESTARTSYS) + wait_event_interruptible(d->waitq, + (d->buffer_status[v.buffer] == VIDEO1394_BUFFER_READY)); + if (signal_pending(current)) return -EINTR; -#endif d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; return 0; default: diff -Nru a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c --- a/drivers/infiniband/core/mad.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/infiniband/core/mad.c 2005-03-30 16:58:50 -08:00 @@ -646,7 +646,7 @@ struct ib_smp *smp, struct ib_send_wr *send_wr) { - int ret, alloc_flags, solicited; + int ret, solicited; unsigned long flags; struct ib_mad_local_private *local; struct ib_mad_private *mad_priv; @@ -666,11 +666,7 @@ if (!ret || !device->process_mad) goto out; - if (in_atomic() || irqs_disabled()) - alloc_flags = GFP_ATOMIC; - else - alloc_flags = GFP_KERNEL; - local = kmalloc(sizeof *local, alloc_flags); + local = kmalloc(sizeof *local, GFP_ATOMIC); if (!local) { ret = -ENOMEM; printk(KERN_ERR PFX "No memory for ib_mad_local_private\n"); @@ -678,7 +674,7 @@ } local->mad_priv = NULL; local->recv_mad_agent = NULL; - mad_priv = kmem_cache_alloc(ib_mad_cache, alloc_flags); + mad_priv = kmem_cache_alloc(ib_mad_cache, GFP_ATOMIC); if (!mad_priv) { ret = -ENOMEM; printk(KERN_ERR PFX "No memory for local response MAD\n"); @@ -860,9 +856,7 @@ } /* Allocate MAD send WR tracking structure */ - mad_send_wr = kmalloc(sizeof *mad_send_wr, - (in_atomic() || irqs_disabled()) ? - GFP_ATOMIC : GFP_KERNEL); + mad_send_wr = kmalloc(sizeof *mad_send_wr, GFP_ATOMIC); if (!mad_send_wr) { printk(KERN_ERR PFX "No memory for " "ib_mad_send_wr_private\n"); diff -Nru a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c --- a/drivers/input/serio/hil_mlc.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/input/serio/hil_mlc.c 2005-03-30 16:58:50 -08:00 @@ -72,7 +72,7 @@ #define PREFIX "HIL MLC: " static LIST_HEAD(hil_mlcs); -static rwlock_t hil_mlcs_lock = RW_LOCK_UNLOCKED; +static DEFINE_RWLOCK(hil_mlcs_lock); static struct timer_list hil_mlcs_kicker; static int hil_mlcs_probe; @@ -848,7 +848,7 @@ mlc->istarted = 0; mlc->ostarted = 0; - mlc->lock = RW_LOCK_UNLOCKED; + rwlock_init(&mlc->lock); init_MUTEX(&(mlc->osem)); init_MUTEX(&(mlc->isem)); diff -Nru a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c --- a/drivers/input/serio/hp_sdc.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/input/serio/hp_sdc.c 2005-03-30 16:58:47 -08:00 @@ -779,10 +779,10 @@ uint8_t ts_sync[6]; struct semaphore s_sync; - hp_sdc.lock = RW_LOCK_UNLOCKED; - hp_sdc.ibf_lock = RW_LOCK_UNLOCKED; - hp_sdc.rtq_lock = RW_LOCK_UNLOCKED; - hp_sdc.hook_lock = RW_LOCK_UNLOCKED; + rwlock_init(&hp_sdc.lock); + rwlock_init(&hp_sdc.ibf_lock); + rwlock_init(&hp_sdc.rtq_lock); + rwlock_init(&hp_sdc.hook_lock); hp_sdc.timer = NULL; hp_sdc.hil = NULL; diff -Nru a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c --- a/drivers/isdn/hisax/elsa.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/isdn/hisax/elsa.c 2005-03-30 16:58:47 -08:00 @@ -838,7 +838,7 @@ static struct pci_dev *dev_qs3000 __devinitdata = NULL; #ifdef __ISAPNP__ -static struct isapnp_device_id elsa_ids[] __initdata = { +static struct isapnp_device_id elsa_ids[] __devinitdata = { { ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133), (unsigned long) "Elsa QS1000" }, @@ -848,7 +848,7 @@ { 0, } }; -static struct isapnp_device_id *ipid __initdata = &elsa_ids[0]; +static struct isapnp_device_id *ipid __devinitdata = &elsa_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif diff -Nru a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c --- a/drivers/isdn/hisax/hfc_sx.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/isdn/hisax/hfc_sx.c 2005-03-30 16:58:47 -08:00 @@ -1382,14 +1382,14 @@ } #ifdef __ISAPNP__ -static struct isapnp_device_id hfc_ids[] __initdata = { +static struct isapnp_device_id hfc_ids[] __devinitdata = { { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620), (unsigned long) "Teles 16.3c2" }, { 0, } }; -static struct isapnp_device_id *ipid __initdata = &hfc_ids[0]; +static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif diff -Nru a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c --- a/drivers/isdn/hisax/sedlbauer.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/isdn/hisax/sedlbauer.c 2005-03-30 16:58:50 -08:00 @@ -516,7 +516,7 @@ static struct pci_dev *dev_sedl __devinitdata = NULL; #ifdef __ISAPNP__ -static struct isapnp_device_id sedl_ids[] __initdata = { +static struct isapnp_device_id sedl_ids[] __devinitdata = { { ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01), (unsigned long) "Speed win" }, @@ -526,7 +526,7 @@ { 0, } }; -static struct isapnp_device_id *ipid __initdata = &sedl_ids[0]; +static struct isapnp_device_id *ipid __devinitdata = &sedl_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif diff -Nru a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c --- a/drivers/isdn/hisax/teles3.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/isdn/hisax/teles3.c 2005-03-30 16:58:50 -08:00 @@ -254,7 +254,7 @@ #ifdef __ISAPNP__ -static struct isapnp_device_id teles_ids[] __initdata = { +static struct isapnp_device_id teles_ids[] __devinitdata = { { ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110), (unsigned long) "Teles 16.3 PnP" }, @@ -267,7 +267,7 @@ { 0, } }; -static struct isapnp_device_id *ipid __initdata = &teles_ids[0]; +static struct isapnp_device_id *ipid __devinitdata = &teles_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif diff -Nru a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c --- a/drivers/isdn/hisax/w6692.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/isdn/hisax/w6692.c 2005-03-30 16:58:50 -08:00 @@ -49,7 +49,7 @@ {"W6692 V00", "W6692 V01", "W6692 V10", "W6692 V11"}; -static void +static void __init W6692Version(struct IsdnCardState *cs, char *s) { int val; diff -Nru a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c --- a/drivers/macintosh/therm_pm72.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/macintosh/therm_pm72.c 2005-03-30 16:58:49 -08:00 @@ -47,8 +47,11 @@ * decisions, like slewing down CPUs * - Deal with fan and i2c failures in a better way * - Maybe do a generic PID based on params used for - * U3 and Drives ? - * - Add RackMac3,1 support (XServe g5) + * U3 and Drives ? Definitely need to factor code a bit + * bettter... also make sensor detection more robust using + * the device-tree to probe for them + * - Figure out how to get the slots consumption and set the + * slots fan accordingly * * History: * @@ -85,6 +88,13 @@ * - Add new CPU cooling algorithm for machines with liquid cooling * - Workaround for some PowerMac7,3 with empty "fan" node in the devtree * - Fix a signed/unsigned compare issue in some PID loops + * + * Mar. 10, 2005 : 1.2 + * - Add basic support for Xserve G5 + * - Retreive pumps min/max from EEPROM image in device-tree (broken) + * - Use min/max macros here or there + * - Latest darwin updated U3H min fan speed to 20% PWM + * */ #include @@ -113,7 +123,7 @@ #include "therm_pm72.h" -#define VERSION "1.1" +#define VERSION "1.2b2" #undef DEBUG @@ -131,21 +141,26 @@ static struct of_device * of_dev; static struct i2c_adapter * u3_0; static struct i2c_adapter * u3_1; +static struct i2c_adapter * k2; static struct i2c_client * fcu; static struct cpu_pid_state cpu_state[2]; static struct basckside_pid_params backside_params; static struct backside_pid_state backside_state; static struct drives_pid_state drives_state; +static struct dimm_pid_state dimms_state; static int state; static int cpu_count; static int cpu_pid_type; static pid_t ctrl_task; static struct completion ctrl_complete; static int critical_state; +static int rackmac; +static s32 dimm_output_clamp; + static DECLARE_MUTEX(driver_lock); /* - * We have 2 types of CPU PID control. One is "split" old style control + * We have 3 types of CPU PID control. One is "split" old style control * for intake & exhaust fans, the other is "combined" control for both * CPUs that also deals with the pumps when present. To be "compatible" * with OS X at this point, we only use "COMBINED" on the machines that @@ -155,6 +170,7 @@ */ #define CPU_PID_TYPE_SPLIT 0 #define CPU_PID_TYPE_COMBINED 1 +#define CPU_PID_TYPE_RACKMAC 2 /* * This table describes all fans in the FCU. The "id" and "type" values @@ -177,7 +193,7 @@ struct fcu_fan_table fcu_fans[] = { [BACKSIDE_FAN_PWM_INDEX] = { - .loc = "BACKSIDE", + .loc = "BACKSIDE,SYS CTRLR FAN", .type = FCU_FAN_PWM, .id = BACKSIDE_FAN_PWM_DEFAULT_ID, }, @@ -187,7 +203,7 @@ .id = DRIVES_FAN_RPM_DEFAULT_ID, }, [SLOTS_FAN_PWM_INDEX] = { - .loc = "SLOT", + .loc = "SLOT,PCI FAN", .type = FCU_FAN_PWM, .id = SLOTS_FAN_PWM_DEFAULT_ID, }, @@ -224,6 +240,37 @@ .type = FCU_FAN_RPM, .id = FCU_FAN_ABSENT_ID, }, + /* Xserve fans */ + [CPU_A1_FAN_RPM_INDEX] = { + .loc = "CPU A 1", + .type = FCU_FAN_RPM, + .id = FCU_FAN_ABSENT_ID, + }, + [CPU_A2_FAN_RPM_INDEX] = { + .loc = "CPU A 2", + .type = FCU_FAN_RPM, + .id = FCU_FAN_ABSENT_ID, + }, + [CPU_A3_FAN_RPM_INDEX] = { + .loc = "CPU A 3", + .type = FCU_FAN_RPM, + .id = FCU_FAN_ABSENT_ID, + }, + [CPU_B1_FAN_RPM_INDEX] = { + .loc = "CPU B 1", + .type = FCU_FAN_RPM, + .id = FCU_FAN_ABSENT_ID, + }, + [CPU_B2_FAN_RPM_INDEX] = { + .loc = "CPU B 2", + .type = FCU_FAN_RPM, + .id = FCU_FAN_ABSENT_ID, + }, + [CPU_B3_FAN_RPM_INDEX] = { + .loc = "CPU B 3", + .type = FCU_FAN_RPM, + .id = FCU_FAN_ABSENT_ID, + }, }; /* @@ -251,7 +298,9 @@ struct i2c_client *clt; struct i2c_adapter *adap; - if (id & 0x100) + if (id & 0x200) + adap = k2; + else if (id & 0x100) adap = u3_1; else adap = u3_0; @@ -361,6 +410,31 @@ } } +static int read_lm87_reg(struct i2c_client * chip, int reg) +{ + int rc, tries = 0; + u8 buf; + + for (;;) { + /* Set address */ + buf = (u8)reg; + rc = i2c_master_send(chip, &buf, 1); + if (rc <= 0) + goto error; + rc = i2c_master_recv(chip, &buf, 1); + if (rc <= 0) + goto error; + return (int)buf; + error: + DBG("Error reading LM87, retrying...\n"); + if (++tries > 10) { + printk(KERN_ERR "therm_pm72: Error reading LM87 !\n"); + return -1; + } + msleep(10); + } +} + static int fan_read_reg(int reg, unsigned char *buf, int nb) { int tries, nr, nw; @@ -570,6 +644,38 @@ return 0; } +static void fetch_cpu_pumps_minmax(void) +{ + struct cpu_pid_state *state0 = &cpu_state[0]; + struct cpu_pid_state *state1 = &cpu_state[1]; + u16 pump_min = 0, pump_max = 0xffff; + u16 tmp[4]; + + /* Try to fetch pumps min/max infos from eeprom */ + + memcpy(&tmp, &state0->mpu.processor_part_num, 8); + if (tmp[0] != 0xffff && tmp[1] != 0xffff) { + pump_min = max(pump_min, tmp[0]); + pump_max = min(pump_max, tmp[1]); + } + if (tmp[2] != 0xffff && tmp[3] != 0xffff) { + pump_min = max(pump_min, tmp[2]); + pump_max = min(pump_max, tmp[3]); + } + + /* Double check the values, this _IS_ needed as the EEPROM on + * some dual 2.5Ghz G5s seem, at least, to have both min & max + * same to the same value ... (grrrr) + */ + if (pump_min == pump_max || pump_min == 0 || pump_max == 0xffff) { + pump_min = CPU_PUMP_OUTPUT_MIN; + pump_max = CPU_PUMP_OUTPUT_MAX; + } + + state0->pump_min = state1->pump_min = pump_min; + state0->pump_max = state1->pump_max = pump_max; +} + /* * Now, unfortunately, sysfs doesn't give us a nice void * we could * pass around to the attribute functions, so we don't really have @@ -611,6 +717,8 @@ BUILD_SHOW_FUNC_FIX(drives_temperature, drives_state.last_temp) BUILD_SHOW_FUNC_INT(drives_fan_rpm, drives_state.rpm) +BUILD_SHOW_FUNC_FIX(dimms_temperature, dimms_state.last_temp) + static DEVICE_ATTR(cpu0_temperature,S_IRUGO,show_cpu0_temperature,NULL); static DEVICE_ATTR(cpu0_voltage,S_IRUGO,show_cpu0_voltage,NULL); static DEVICE_ATTR(cpu0_current,S_IRUGO,show_cpu0_current,NULL); @@ -629,6 +737,8 @@ static DEVICE_ATTR(drives_temperature,S_IRUGO,show_drives_temperature,NULL); static DEVICE_ATTR(drives_fan_rpm,S_IRUGO,show_drives_fan_rpm,NULL); +static DEVICE_ATTR(dimms_temperature,S_IRUGO,show_dimms_temperature,NULL); + /* * CPUs fans control loop */ @@ -636,17 +746,21 @@ static int do_read_one_cpu_values(struct cpu_pid_state *state, s32 *temp, s32 *power) { s32 ltemp, volts, amps; - int rc = 0; + int index, rc = 0; /* Default (in case of error) */ *temp = state->cur_temp; *power = state->cur_power; - /* Read current fan status */ - if (state->index == 0) - rc = get_rpm_fan(CPUA_EXHAUST_FAN_RPM_INDEX, !RPM_PID_USE_ACTUAL_SPEED); + if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) + index = (state->index == 0) ? + CPU_A1_FAN_RPM_INDEX : CPU_B1_FAN_RPM_INDEX; else - rc = get_rpm_fan(CPUB_EXHAUST_FAN_RPM_INDEX, !RPM_PID_USE_ACTUAL_SPEED); + index = (state->index == 0) ? + CPUA_EXHAUST_FAN_RPM_INDEX : CPUB_EXHAUST_FAN_RPM_INDEX; + + /* Read current fan status */ + rc = get_rpm_fan(index, !RPM_PID_USE_ACTUAL_SPEED); if (rc < 0) { /* XXX What do we do now ? Nothing for now, keep old value, but * return error upstream @@ -777,11 +891,6 @@ DBG(" sum: %d\n", (int)sum); state->rpm += (s32)sum; - - if (state->rpm < (int)state->mpu.rminn_exhaust_fan) - state->rpm = state->mpu.rminn_exhaust_fan; - if (state->rpm > (int)state->mpu.rmaxn_exhaust_fan) - state->rpm = state->mpu.rmaxn_exhaust_fan; } static void do_monitor_cpu_combined(void) @@ -823,28 +932,28 @@ if (state0->overtemp > 0) { state0->rpm = state0->mpu.rmaxn_exhaust_fan; state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; - pump = CPU_PUMP_OUTPUT_MAX; + pump = state0->pump_min; goto do_set_fans; } /* Do the PID */ do_cpu_pid(state0, temp_combi, power_combi); + /* Range check */ + state0->rpm = max(state0->rpm, (int)state0->mpu.rminn_exhaust_fan); + state0->rpm = min(state0->rpm, (int)state0->mpu.rmaxn_exhaust_fan); + /* Calculate intake fan speed */ intake = (state0->rpm * CPU_INTAKE_SCALE) >> 16; - if (intake < (int)state0->mpu.rminn_intake_fan) - intake = state0->mpu.rminn_intake_fan; - if (intake > (int)state0->mpu.rmaxn_intake_fan) - intake = state0->mpu.rmaxn_intake_fan; + intake = max(intake, (int)state0->mpu.rminn_intake_fan); + intake = min(intake, (int)state0->mpu.rmaxn_intake_fan); state0->intake_rpm = intake; /* Calculate pump speed */ - pump = (state0->rpm * CPU_PUMP_OUTPUT_MAX) / + pump = (state0->rpm * state0->pump_max) / state0->mpu.rmaxn_exhaust_fan; - if (pump > CPU_PUMP_OUTPUT_MAX) - pump = CPU_PUMP_OUTPUT_MAX; - if (pump < CPU_PUMP_OUTPUT_MIN) - pump = CPU_PUMP_OUTPUT_MIN; + pump = min(pump, state0->pump_max); + pump = max(pump, state0->pump_min); do_set_fans: /* We copy values from state 0 to state 1 for /sysfs */ @@ -904,11 +1013,14 @@ /* Do the PID */ do_cpu_pid(state, temp, power); + /* Range check */ + state->rpm = max(state->rpm, (int)state->mpu.rminn_exhaust_fan); + state->rpm = min(state->rpm, (int)state->mpu.rmaxn_exhaust_fan); + + /* Calculate intake fan */ intake = (state->rpm * CPU_INTAKE_SCALE) >> 16; - if (intake < (int)state->mpu.rminn_intake_fan) - intake = state->mpu.rminn_intake_fan; - if (intake > (int)state->mpu.rmaxn_intake_fan) - intake = state->mpu.rmaxn_intake_fan; + intake = max(intake, (int)state->mpu.rminn_intake_fan); + intake = min(intake, (int)state->mpu.rmaxn_intake_fan); state->intake_rpm = intake; do_set_fans: @@ -929,6 +1041,67 @@ } } +static void do_monitor_cpu_rack(struct cpu_pid_state *state) +{ + s32 temp, power, fan_min; + int rc; + + /* Read current fan status */ + rc = do_read_one_cpu_values(state, &temp, &power); + if (rc < 0) { + /* XXX What do we do now ? */ + } + + /* Check tmax, increment overtemp if we are there. At tmax+8, we go + * full blown immediately and try to trigger a shutdown + */ + if (temp >= ((state->mpu.tmax + 8) << 16)) { + printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" + " (%d) !\n", + state->index, temp >> 16); + state->overtemp = CPU_MAX_OVERTEMP; + } else if (temp > (state->mpu.tmax << 16)) + state->overtemp++; + else + state->overtemp = 0; + if (state->overtemp >= CPU_MAX_OVERTEMP) + critical_state = 1; + if (state->overtemp > 0) { + state->rpm = state->intake_rpm = state->mpu.rmaxn_intake_fan; + goto do_set_fans; + } + + /* Do the PID */ + do_cpu_pid(state, temp, power); + + /* Check clamp from dimms */ + fan_min = dimm_output_clamp; + fan_min = max(fan_min, (int)state->mpu.rminn_intake_fan); + + state->rpm = max(state->rpm, (int)fan_min); + state->rpm = min(state->rpm, (int)state->mpu.rmaxn_intake_fan); + state->intake_rpm = state->rpm; + + do_set_fans: + DBG("** CPU %d RPM: %d overtemp: %d\n", + state->index, (int)state->rpm, state->overtemp); + + /* We should check for errors, shouldn't we ? But then, what + * do we do once the error occurs ? For FCU notified fan + * failures (-EFAULT) we probably want to notify userland + * some way... + */ + if (state->index == 0) { + set_rpm_fan(CPU_A1_FAN_RPM_INDEX, state->rpm); + set_rpm_fan(CPU_A2_FAN_RPM_INDEX, state->rpm); + set_rpm_fan(CPU_A3_FAN_RPM_INDEX, state->rpm); + } else { + set_rpm_fan(CPU_B1_FAN_RPM_INDEX, state->rpm); + set_rpm_fan(CPU_B2_FAN_RPM_INDEX, state->rpm); + set_rpm_fan(CPU_B3_FAN_RPM_INDEX, state->rpm); + } +} + /* * Initialize the state structure for one CPU control loop */ @@ -936,7 +1109,7 @@ { state->index = index; state->first = 1; - state->rpm = 1000; + state->rpm = (cpu_pid_type == CPU_PID_TYPE_RACKMAC) ? 4000 : 1000; state->overtemp = 0; state->adc_config = 0x00; @@ -1012,13 +1185,13 @@ */ static void do_monitor_backside(struct backside_pid_state *state) { - s32 temp, integral, derivative; + s32 temp, integral, derivative, fan_min; s64 integ_p, deriv_p, prop_p, sum; int i, rc; if (--state->ticks != 0) return; - state->ticks = BACKSIDE_PID_INTERVAL; + state->ticks = backside_params.interval; DBG("backside:\n"); @@ -1059,7 +1232,7 @@ integral = 0; for (i = 0; i < BACKSIDE_PID_HISTORY_SIZE; i++) integral += state->error_history[i]; - integral *= BACKSIDE_PID_INTERVAL; + integral *= backside_params.interval; DBG(" integral: %08x\n", integral); integ_p = ((s64)backside_params.G_r) * (s64)integral; DBG(" integ_p: %d\n", (int)(integ_p >> 36)); @@ -1069,7 +1242,7 @@ derivative = state->error_history[state->cur_sample] - state->error_history[(state->cur_sample + BACKSIDE_PID_HISTORY_SIZE - 1) % BACKSIDE_PID_HISTORY_SIZE]; - derivative /= BACKSIDE_PID_INTERVAL; + derivative /= backside_params.interval; deriv_p = ((s64)backside_params.G_d) * (s64)derivative; DBG(" deriv_p: %d\n", (int)(deriv_p >> 36)); sum += deriv_p; @@ -1083,11 +1256,17 @@ sum >>= 36; DBG(" sum: %d\n", (int)sum); - state->pwm += (s32)sum; - if (state->pwm < backside_params.output_min) - state->pwm = backside_params.output_min; - if (state->pwm > backside_params.output_max) - state->pwm = backside_params.output_max; + if (backside_params.additive) + state->pwm += (s32)sum; + else + state->pwm = sum; + + /* Check for clamp */ + fan_min = (dimm_output_clamp * 100) / 14000; + fan_min = max(fan_min, backside_params.output_min); + + state->pwm = max(state->pwm, fan_min); + state->pwm = min(state->pwm, backside_params.output_max); DBG("** BACKSIDE PWM: %d\n", (int)state->pwm); set_pwm_fan(BACKSIDE_FAN_PWM_INDEX, state->pwm); @@ -1114,17 +1293,33 @@ of_node_put(u3); } - backside_params.G_p = BACKSIDE_PID_G_p; - backside_params.G_r = BACKSIDE_PID_G_r; - backside_params.output_max = BACKSIDE_PID_OUTPUT_MAX; - if (u3h) { + if (rackmac) { + backside_params.G_d = BACKSIDE_PID_RACK_G_d; + backside_params.input_target = BACKSIDE_PID_RACK_INPUT_TARGET; + backside_params.output_min = BACKSIDE_PID_U3H_OUTPUT_MIN; + backside_params.interval = BACKSIDE_PID_RACK_INTERVAL; + backside_params.G_p = BACKSIDE_PID_RACK_G_p; + backside_params.G_r = BACKSIDE_PID_G_r; + backside_params.output_max = BACKSIDE_PID_OUTPUT_MAX; + backside_params.additive = 0; + } else if (u3h) { backside_params.G_d = BACKSIDE_PID_U3H_G_d; backside_params.input_target = BACKSIDE_PID_U3H_INPUT_TARGET; backside_params.output_min = BACKSIDE_PID_U3H_OUTPUT_MIN; + backside_params.interval = BACKSIDE_PID_INTERVAL; + backside_params.G_p = BACKSIDE_PID_G_p; + backside_params.G_r = BACKSIDE_PID_G_r; + backside_params.output_max = BACKSIDE_PID_OUTPUT_MAX; + backside_params.additive = 1; } else { backside_params.G_d = BACKSIDE_PID_U3_G_d; backside_params.input_target = BACKSIDE_PID_U3_INPUT_TARGET; backside_params.output_min = BACKSIDE_PID_U3_OUTPUT_MIN; + backside_params.interval = BACKSIDE_PID_INTERVAL; + backside_params.G_p = BACKSIDE_PID_G_p; + backside_params.G_r = BACKSIDE_PID_G_r; + backside_params.output_max = BACKSIDE_PID_OUTPUT_MAX; + backside_params.additive = 1; } state->ticks = 1; @@ -1233,10 +1428,9 @@ DBG(" sum: %d\n", (int)sum); state->rpm += (s32)sum; - if (state->rpm < DRIVES_PID_OUTPUT_MIN) - state->rpm = DRIVES_PID_OUTPUT_MIN; - if (state->rpm > DRIVES_PID_OUTPUT_MAX) - state->rpm = DRIVES_PID_OUTPUT_MAX; + + state->rpm = max(state->rpm, DRIVES_PID_OUTPUT_MIN); + state->rpm = min(state->rpm, DRIVES_PID_OUTPUT_MAX); DBG("** DRIVES RPM: %d\n", (int)state->rpm); set_rpm_fan(DRIVES_FAN_RPM_INDEX, state->rpm); @@ -1276,6 +1470,126 @@ state->monitor = NULL; } +/* + * DIMMs temp control loop + */ +static void do_monitor_dimms(struct dimm_pid_state *state) +{ + s32 temp, integral, derivative, fan_min; + s64 integ_p, deriv_p, prop_p, sum; + int i; + + if (--state->ticks != 0) + return; + state->ticks = DIMM_PID_INTERVAL; + + DBG("DIMM:\n"); + + DBG(" current value: %d\n", state->output); + + temp = read_lm87_reg(state->monitor, LM87_INT_TEMP); + if (temp < 0) + return; + temp <<= 16; + state->last_temp = temp; + DBG(" temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp), + FIX32TOPRINT(DIMM_PID_INPUT_TARGET)); + + /* Store temperature and error in history array */ + state->cur_sample = (state->cur_sample + 1) % DIMM_PID_HISTORY_SIZE; + state->sample_history[state->cur_sample] = temp; + state->error_history[state->cur_sample] = temp - DIMM_PID_INPUT_TARGET; + + /* If first loop, fill the history table */ + if (state->first) { + for (i = 0; i < (DIMM_PID_HISTORY_SIZE - 1); i++) { + state->cur_sample = (state->cur_sample + 1) % + DIMM_PID_HISTORY_SIZE; + state->sample_history[state->cur_sample] = temp; + state->error_history[state->cur_sample] = + temp - DIMM_PID_INPUT_TARGET; + } + state->first = 0; + } + + /* Calculate the integral term */ + sum = 0; + integral = 0; + for (i = 0; i < DIMM_PID_HISTORY_SIZE; i++) + integral += state->error_history[i]; + integral *= DIMM_PID_INTERVAL; + DBG(" integral: %08x\n", integral); + integ_p = ((s64)DIMM_PID_G_r) * (s64)integral; + DBG(" integ_p: %d\n", (int)(integ_p >> 36)); + sum += integ_p; + + /* Calculate the derivative term */ + derivative = state->error_history[state->cur_sample] - + state->error_history[(state->cur_sample + DIMM_PID_HISTORY_SIZE - 1) + % DIMM_PID_HISTORY_SIZE]; + derivative /= DIMM_PID_INTERVAL; + deriv_p = ((s64)DIMM_PID_G_d) * (s64)derivative; + DBG(" deriv_p: %d\n", (int)(deriv_p >> 36)); + sum += deriv_p; + + /* Calculate the proportional term */ + prop_p = ((s64)DIMM_PID_G_p) * (s64)(state->error_history[state->cur_sample]); + DBG(" prop_p: %d\n", (int)(prop_p >> 36)); + sum += prop_p; + + /* Scale sum */ + sum >>= 36; + + DBG(" sum: %d\n", (int)sum); + state->output = (s32)sum; + state->output = max(state->output, DIMM_PID_OUTPUT_MIN); + state->output = min(state->output, DIMM_PID_OUTPUT_MAX); + dimm_output_clamp = state->output; + + DBG("** DIMM clamp value: %d\n", (int)state->output); + + /* Backside PID is only every 5 seconds, force backside fan clamping now */ + fan_min = (dimm_output_clamp * 100) / 14000; + fan_min = max(fan_min, backside_params.output_min); + if (backside_state.pwm < fan_min) { + backside_state.pwm = fan_min; + DBG(" -> applying clamp to backside fan now: %d !\n", fan_min); + set_pwm_fan(BACKSIDE_FAN_PWM_INDEX, fan_min); + } +} + +/* + * Initialize the state structure for the DIMM temp control loop + */ +static int init_dimms_state(struct dimm_pid_state *state) +{ + state->ticks = 1; + state->first = 1; + state->output = 4000; + + state->monitor = attach_i2c_chip(XSERVE_DIMMS_LM87, "dimms_temp"); + if (state->monitor == NULL) + return -ENODEV; + + device_create_file(&of_dev->dev, &dev_attr_dimms_temperature); + + return 0; +} + +/* + * Dispose of the state data for the drives control loop + */ +static void dispose_dimms_state(struct dimm_pid_state *state) +{ + if (state->monitor == NULL) + return; + + device_remove_file(&of_dev->dev, &dev_attr_dimms_temperature); + + detach_i2c_chip(state->monitor); + state->monitor = NULL; +} + static int call_critical_overtemp(void) { char *argv[] = { critical_overtemp_path, NULL }; @@ -1321,15 +1635,29 @@ start = jiffies; down(&driver_lock); + + /* First, we always calculate the new DIMMs state on an Xserve */ + if (rackmac) + do_monitor_dimms(&dimms_state); + + /* Then, the CPUs */ if (cpu_pid_type == CPU_PID_TYPE_COMBINED) do_monitor_cpu_combined(); - else { + else if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) { + do_monitor_cpu_rack(&cpu_state[0]); + if (cpu_state[1].monitor != NULL) + do_monitor_cpu_rack(&cpu_state[1]); + // better deal with UP + } else { do_monitor_cpu_split(&cpu_state[0]); if (cpu_state[1].monitor != NULL) do_monitor_cpu_split(&cpu_state[1]); + // better deal with UP } + /* Then, the rest */ do_monitor_backside(&backside_state); - do_monitor_drives(&drives_state); + if (!rackmac) + do_monitor_drives(&drives_state); up(&driver_lock); if (critical_state == 1) { @@ -1369,9 +1697,9 @@ { dispose_cpu_state(&cpu_state[0]); dispose_cpu_state(&cpu_state[1]); - dispose_backside_state(&backside_state); dispose_drives_state(&drives_state); + dispose_dimms_state(&dimms_state); } /* @@ -1395,7 +1723,9 @@ * the pumps, though that may not be the best way, that is good enough * for now */ - if (machine_is_compatible("PowerMac7,3") + if (rackmac) + cpu_pid_type = CPU_PID_TYPE_RACKMAC; + else if (machine_is_compatible("PowerMac7,3") && (cpu_count > 1) && fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID && fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID) { @@ -1409,11 +1739,16 @@ */ if (init_cpu_state(&cpu_state[0], 0)) goto fail; + if (cpu_pid_type == CPU_PID_TYPE_COMBINED) + fetch_cpu_pumps_minmax(); + if (cpu_count > 1 && init_cpu_state(&cpu_state[1], 1)) goto fail; if (init_backside_state(&backside_state)) goto fail; - if (init_drives_state(&drives_state)) + if (rackmac && init_dimms_state(&dimms_state)) + goto fail; + if (!rackmac && init_drives_state(&drives_state)) goto fail; DBG("all control loops up !\n"); @@ -1492,17 +1827,24 @@ /* Check if we are looking for one of these */ if (u3_0 == NULL && !strcmp(adapter->name, "u3 0")) { u3_0 = adapter; - DBG("found U3-0, creating control loops\n"); - if (create_control_loops()) - u3_0 = NULL; + DBG("found U3-0\n"); + if (k2 || !rackmac) + if (create_control_loops()) + u3_0 = NULL; } else if (u3_1 == NULL && !strcmp(adapter->name, "u3 1")) { u3_1 = adapter; DBG("found U3-1, attaching FCU\n"); if (attach_fcu()) u3_1 = NULL; + } else if (k2 == NULL && !strcmp(adapter->name, "mac-io 0")) { + k2 = adapter; + DBG("Found K2\n"); + if (u3_0 && rackmac) + if (create_control_loops()) + k2 = NULL; } /* We got all we need, start control loops */ - if (u3_0 != NULL && u3_1 != NULL) { + if (u3_0 != NULL && u3_1 != NULL && (k2 || !rackmac)) { DBG("everything up, starting control loops\n"); state = state_attached; start_control_loops(); @@ -1548,6 +1890,27 @@ return 0; } +static int fan_check_loc_match(const char *loc, int fan) +{ + char tmp[64]; + char *c, *e; + + strlcpy(tmp, fcu_fans[fan].loc, 64); + + c = tmp; + for (;;) { + e = strchr(c, ','); + if (e) + *e = 0; + if (strcmp(loc, c) == 0) + return 1; + if (e == NULL) + break; + c = e + 1; + } + return 0; +} + static void fcu_lookup_fans(struct device_node *fcu_node) { struct device_node *np = NULL; @@ -1589,7 +1952,7 @@ for (i = 0; i < FCU_FAN_COUNT; i++) { int fan_id; - if (strcmp(loc, fcu_fans[i].loc)) + if (!fan_check_loc_match(loc, i)) continue; DBG(" location match, index: %d\n", i); fcu_fans[i].id = FCU_FAN_ABSENT_ID; @@ -1671,8 +2034,11 @@ { struct device_node *np; + rackmac = machine_is_compatible("RackMac3,1"); + if (!machine_is_compatible("PowerMac7,2") && - !machine_is_compatible("PowerMac7,3")) + !machine_is_compatible("PowerMac7,3") && + !rackmac) return -ENODEV; printk(KERN_INFO "PowerMac G5 Thermal control driver %s\n", VERSION); @@ -1709,6 +2075,6 @@ module_exit(therm_pm72_exit); MODULE_AUTHOR("Benjamin Herrenschmidt "); -MODULE_DESCRIPTION("Driver for Apple's PowerMac7,2 G5 thermal control"); +MODULE_DESCRIPTION("Driver for Apple's PowerMac G5 thermal control"); MODULE_LICENSE("GPL"); diff -Nru a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h --- a/drivers/macintosh/therm_pm72.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/macintosh/therm_pm72.h 2005-03-30 16:58:48 -08:00 @@ -52,7 +52,7 @@ u16 rmaxn_intake_fan; /* 0x4e - Intake fan max RPM */ u16 rminn_exhaust_fan; /* 0x50 - Exhaust fan min RPM */ u16 rmaxn_exhaust_fan; /* 0x52 - Exhaust fan max RPM */ - u8 processor_part_num[8]; /* 0x54 - Processor part number */ + u8 processor_part_num[8]; /* 0x54 - Processor part number XX pumps min/max */ u32 processor_lot_num; /* 0x5c - Processor lot number */ u8 orig_card_sernum[0x10]; /* 0x60 - Card original serial number */ u8 curr_card_sernum[0x10]; /* 0x70 - Card current serial number */ @@ -94,19 +94,25 @@ * of the driver, though I would accept any clean patch * doing a better use of the device-tree without turning the * while i2c registration mecanism into a racy mess + * + * Note: Xserve changed this. We have some bits on the K2 bus, + * which I arbitrarily set to 0x200. Ultimately, we really want + * too lookup these in the device-tree though */ #define FAN_CTRLER_ID 0x15e #define SUPPLY_MONITOR_ID 0x58 #define SUPPLY_MONITORB_ID 0x5a #define DRIVES_DALLAS_ID 0x94 #define BACKSIDE_MAX_ID 0x98 +#define XSERVE_DIMMS_LM87 0x25a /* - * Some MAX6690 & DS1775 register definitions + * Some MAX6690, DS1775, LM87 register definitions */ #define MAX6690_INT_TEMP 0 #define MAX6690_EXT_TEMP 1 #define DS1775_TEMP 0 +#define LM87_INT_TEMP 0x27 /* * Scaling factors for the AD7417 ADC converters (except @@ -126,14 +132,18 @@ #define BACKSIDE_FAN_PWM_INDEX 0 #define BACKSIDE_PID_U3_G_d 0x02800000 #define BACKSIDE_PID_U3H_G_d 0x01400000 +#define BACKSIDE_PID_RACK_G_d 0x00500000 #define BACKSIDE_PID_G_p 0x00500000 +#define BACKSIDE_PID_RACK_G_p 0x0004cccc #define BACKSIDE_PID_G_r 0x00000000 #define BACKSIDE_PID_U3_INPUT_TARGET 0x00410000 #define BACKSIDE_PID_U3H_INPUT_TARGET 0x004b0000 +#define BACKSIDE_PID_RACK_INPUT_TARGET 0x00460000 #define BACKSIDE_PID_INTERVAL 5 +#define BACKSIDE_PID_RACK_INTERVAL 1 #define BACKSIDE_PID_OUTPUT_MAX 100 #define BACKSIDE_PID_U3_OUTPUT_MIN 20 -#define BACKSIDE_PID_U3H_OUTPUT_MIN 30 +#define BACKSIDE_PID_U3H_OUTPUT_MIN 20 #define BACKSIDE_PID_HISTORY_SIZE 2 struct basckside_pid_params @@ -144,6 +154,8 @@ s32 input_target; s32 output_min; s32 output_max; + s32 interval; + int additive; }; struct backside_pid_state @@ -188,25 +200,34 @@ #define SLOTS_FAN_PWM_INDEX 2 #define SLOTS_FAN_DEFAULT_PWM 50 /* Do better here ! */ + /* - * IDs in Darwin for the sensors & fans - * - * CPU A AD7417_TEMP 10 (CPU A ambient temperature) - * CPU A AD7417_AD1 11 (CPU A diode temperature) - * CPU A AD7417_AD2 12 (CPU A 12V current) - * CPU A AD7417_AD3 13 (CPU A voltage) - * CPU A AD7417_AD4 14 (CPU A current) - * - * CPU A FAKE POWER 48 (I_V_inputs: 13, 14) - * - * CPU B AD7417_TEMP 15 (CPU B ambient temperature) - * CPU B AD7417_AD1 16 (CPU B diode temperature) - * CPU B AD7417_AD2 17 (CPU B 12V current) - * CPU B AD7417_AD3 18 (CPU B voltage) - * CPU B AD7417_AD4 19 (CPU B current) - * - * CPU B FAKE POWER 49 (I_V_inputs: 18, 19) + * PID factors for the Xserve DIMM control loop */ +#define DIMM_PID_G_d 0 +#define DIMM_PID_G_p 0 +#define DIMM_PID_G_r 0x6553600 +#define DIMM_PID_INPUT_TARGET 3276800 +#define DIMM_PID_INTERVAL 1 +#define DIMM_PID_OUTPUT_MAX 14000 +#define DIMM_PID_OUTPUT_MIN 4000 +#define DIMM_PID_HISTORY_SIZE 20 + +struct dimm_pid_state +{ + int ticks; + struct i2c_client * monitor; + s32 sample_history[DIMM_PID_HISTORY_SIZE]; + s32 error_history[DIMM_PID_HISTORY_SIZE]; + int cur_sample; + s32 last_temp; + int first; + int output; +}; + + + +/* Desktops */ #define CPUA_INTAKE_FAN_RPM_DEFAULT_ID 3 #define CPUA_EXHAUST_FAN_RPM_DEFAULT_ID 4 @@ -226,8 +247,17 @@ #define CPUA_PUMP_RPM_INDEX 7 #define CPUB_PUMP_RPM_INDEX 8 -#define CPU_PUMP_OUTPUT_MAX 3700 -#define CPU_PUMP_OUTPUT_MIN 1000 +#define CPU_PUMP_OUTPUT_MAX 3200 +#define CPU_PUMP_OUTPUT_MIN 1250 + +/* Xserve */ +#define CPU_A1_FAN_RPM_INDEX 9 +#define CPU_A2_FAN_RPM_INDEX 10 +#define CPU_A3_FAN_RPM_INDEX 11 +#define CPU_B1_FAN_RPM_INDEX 12 +#define CPU_B2_FAN_RPM_INDEX 13 +#define CPU_B3_FAN_RPM_INDEX 14 + struct cpu_pid_state { @@ -249,6 +279,8 @@ s32 last_power; int first; u8 adc_config; + s32 pump_min; + s32 pump_max; }; /* diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/macintosh/via-pmu.c 2005-03-30 16:58:50 -08:00 @@ -2344,7 +2344,7 @@ } /* Send suspend call to devices, hold the device core's dpm_sem */ - ret = device_suspend(PM_SUSPEND_MEM); + ret = device_suspend(PMSG_SUSPEND); if (ret) { broadcast_wake(); printk(KERN_ERR "Driver sleep failed\n"); diff -Nru a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/md/dm-crypt.c 2005-03-30 16:58:47 -08:00 @@ -96,7 +96,7 @@ /* * Mempool alloc and free functions for the page */ -static void *mempool_alloc_page(int gfp_mask, void *data) +static void *mempool_alloc_page(unsigned int __nocast gfp_mask, void *data) { return alloc_page(gfp_mask); } diff -Nru a/drivers/md/dm-io.c b/drivers/md/dm-io.c --- a/drivers/md/dm-io.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/md/dm-io.c 2005-03-30 16:58:50 -08:00 @@ -32,7 +32,7 @@ static unsigned _num_ios; static mempool_t *_io_pool; -static void *alloc_io(int gfp_mask, void *pool_data) +static void *alloc_io(unsigned int __nocast gfp_mask, void *pool_data) { return kmalloc(sizeof(struct io), gfp_mask); } diff -Nru a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c --- a/drivers/md/dm-raid1.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/md/dm-raid1.c 2005-03-30 16:58:51 -08:00 @@ -122,7 +122,7 @@ /* FIXME move this */ static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw); -static void *region_alloc(int gfp_mask, void *pool_data) +static void *region_alloc(unsigned int __nocast gfp_mask, void *pool_data) { return kmalloc(sizeof(struct region), gfp_mask); } diff -Nru a/drivers/md/multipath.c b/drivers/md/multipath.c --- a/drivers/md/multipath.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/md/multipath.c 2005-03-30 16:58:48 -08:00 @@ -38,7 +38,7 @@ static mdk_personality_t multipath_personality; -static void *mp_pool_alloc(int gfp_flags, void *data) +static void *mp_pool_alloc(unsigned int __nocast gfp_flags, void *data) { struct multipath_bh *mpb; mpb = kmalloc(sizeof(*mpb), gfp_flags); diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c --- a/drivers/md/raid1.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/md/raid1.c 2005-03-30 16:58:49 -08:00 @@ -34,7 +34,7 @@ static void unplug_slaves(mddev_t *mddev); -static void * r1bio_pool_alloc(int gfp_flags, void *data) +static void * r1bio_pool_alloc(unsigned int __nocast gfp_flags, void *data) { struct pool_info *pi = data; r1bio_t *r1_bio; @@ -61,7 +61,7 @@ #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE) #define RESYNC_WINDOW (2048*1024) -static void * r1buf_pool_alloc(int gfp_flags, void *data) +static void * r1buf_pool_alloc(unsigned int __nocast gfp_flags, void *data) { struct pool_info *pi = data; struct page *page; diff -Nru a/drivers/md/raid10.c b/drivers/md/raid10.c --- a/drivers/md/raid10.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/md/raid10.c 2005-03-30 16:58:51 -08:00 @@ -47,7 +47,7 @@ static void unplug_slaves(mddev_t *mddev); -static void * r10bio_pool_alloc(int gfp_flags, void *data) +static void * r10bio_pool_alloc(unsigned int __nocast gfp_flags, void *data) { conf_t *conf = data; r10bio_t *r10_bio; @@ -81,7 +81,7 @@ * one for write (we recover only one drive per r10buf) * */ -static void * r10buf_pool_alloc(int gfp_flags, void *data) +static void * r10buf_pool_alloc(unsigned int __nocast gfp_flags, void *data) { conf_t *conf = data; struct page *page; diff -Nru a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c --- a/drivers/media/common/saa7146_core.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/common/saa7146_core.c 2005-03-30 16:58:49 -08:00 @@ -20,11 +20,9 @@ #include -/* global variables */ -struct list_head saa7146_devices; -struct semaphore saa7146_devices_lock; +LIST_HEAD(saa7146_devices); +DECLARE_MUTEX(saa7146_devices_lock); -static int initialized = 0; static int saa7146_num = 0; unsigned int saa7146_debug = 0; @@ -48,21 +46,15 @@ * gpio and debi helper functions ****************************************************************************/ -/* write "data" to the gpio-pin "pin" -- unused */ -void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data) +void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data) { u32 value = 0; - /* sanity check */ - if(pin > 3) - return; - - /* read old register contents */ - value = saa7146_read(dev, GPIO_CTRL ); - - value &= ~(0xff << (8*pin)); - value |= (data << (8*pin)); + BUG_ON(port > 3); + value = saa7146_read(dev, GPIO_CTRL); + value &= ~(0xff << (8*port)); + value |= (data << (8*port)); saa7146_write(dev, GPIO_CTRL, value); } @@ -238,19 +230,6 @@ } /********************************************************************************/ -/* gpio functions */ - -void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data) -{ - u32 val = 0; - - val=saa7146_read(dev,GPIO_CTRL); - val&=~(0xff << (8*(port))); - val|=(data)<<(8*(port)); - saa7146_write(dev, GPIO_CTRL, val); -} - -/********************************************************************************/ /* interrupt handler */ static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) { @@ -527,12 +506,6 @@ { DEB_EE(("ext:%p\n",ext)); - if( 0 == initialized ) { - INIT_LIST_HEAD(&saa7146_devices); - init_MUTEX(&saa7146_devices_lock); - initialized = 1; - } - ext->driver.name = ext->name; ext->driver.id_table = ext->pci_tbl; ext->driver.probe = saa7146_init_one; @@ -549,23 +522,6 @@ pci_unregister_driver(&ext->driver); return 0; } - -static int __init saa7146_init_module(void) -{ - if( 0 == initialized ) { - INIT_LIST_HEAD(&saa7146_devices); - init_MUTEX(&saa7146_devices_lock); - initialized = 1; - } - return 0; -} - -static void __exit saa7146_cleanup_module(void) -{ -} - -module_init(saa7146_init_module); -module_exit(saa7146_cleanup_module); EXPORT_SYMBOL_GPL(saa7146_register_extension); EXPORT_SYMBOL_GPL(saa7146_unregister_extension); diff -Nru a/drivers/media/dvb/b2c2/b2c2-common.c b/drivers/media/dvb/b2c2/b2c2-common.c --- a/drivers/media/dvb/b2c2/b2c2-common.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/b2c2/b2c2-common.c 2005-03-30 16:58:48 -08:00 @@ -158,7 +158,7 @@ return 0; } -int samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) +static int samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) { u32 div; unsigned char bs = 0; diff -Nru a/drivers/media/dvb/b2c2/skystar2.c b/drivers/media/dvb/b2c2/skystar2.c --- a/drivers/media/dvb/b2c2/skystar2.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/media/dvb/b2c2/skystar2.c 2005-03-30 16:58:51 -08:00 @@ -5,14 +5,14 @@ * Copyright (C) 2003 Vadim Catana, skystar@moldova.cc * * FIX: DISEQC Tone Burst in flexcop_diseqc_ioctl() - * FIX: FULL soft DiSEqC for skystar2 (FlexCopII rev 130) VP310 equipped + * FIX: FULL soft DiSEqC for skystar2 (FlexCopII rev 130) VP310 equipped * Vincenzo Di Massa, hawk.it at tiscalinet.it - * + * * Converted to Linux coding style * Misc reorganization, polishing, restyling - * Roberto Ragusa, r.ragusa at libero.it - * - * Added hardware filtering support, + * Roberto Ragusa, skystar2-c5b8 at robertoragusa dot it + * + * Added hardware filtering support, * Niklas Peinecke, peinecke at gdv.uni-hannover.de * * @@ -231,8 +231,8 @@ { if (device == 0x20000000) *ret = bus | ((addr >> 8) & 3); - - *ret = bus; + else + *ret = bus; } static u32 flex_i2c_read(struct adapter *adapter, u32 device, u32 bus, u32 addr, u8 *buf, u32 len) @@ -1968,7 +1968,7 @@ ctrl_enable_mac(adapter, 1); } - adapter->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&adapter->lock); out: return ret; @@ -1996,10 +1996,6 @@ free_adapter_object(adapter); pci_set_drvdata(pdev, NULL); - - pci_disable_device(pdev); - pci_release_region(pdev, 1); - pci_release_region(pdev, 0); } static int dvb_start_feed(struct dvb_demux_feed *dvbdmxfeed) @@ -2356,7 +2352,7 @@ return 0; } -int samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) +static int samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) { u32 div; unsigned char bs = 0; @@ -2633,7 +2629,7 @@ static int skystar2_init(void) { - return pci_module_init(&skystar2_pci_driver); + return pci_register_driver(&skystar2_pci_driver); } static void skystar2_cleanup(void) diff -Nru a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig --- a/drivers/media/dvb/bt8xx/Kconfig 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/bt8xx/Kconfig 2005-03-30 16:58:48 -08:00 @@ -5,9 +5,11 @@ select DVB_SP887X select DVB_NXT6000 select DVB_CX24110 + select DVB_OR51211 help Support for PCI cards based on the Bt8xx PCI bridge. Examples are - the Nebula cards, the Pinnacle PCTV cards and Twinhan DST cards. + the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards and + pcHDTV HD2000 cards. Since these cards have no MPEG decoder onboard, they transmit only compressed MPEG data over the PCI bus, so you need diff -Nru a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c --- a/drivers/media/dvb/bt8xx/bt878.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/bt8xx/bt878.c 2005-03-30 16:58:48 -08:00 @@ -55,10 +55,10 @@ static unsigned int bt878_debug; module_param_named(verbose, bt878_verbose, int, 0444); -MODULE_PARM_DESC(bt878_verbose, +MODULE_PARM_DESC(verbose, "verbose startup messages, default is 1 (yes)"); module_param_named(debug, bt878_debug, int, 0644); -MODULE_PARM_DESC(bt878_debug, "Turn on/off debugging (default:off)."); +MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off)."); int bt878_num; struct bt878 bt878[BT878_MAX]; @@ -381,21 +381,6 @@ EXPORT_SYMBOL(bt878_device_control); -struct bt878 *bt878_find_by_i2c_adap(struct i2c_adapter *adapter) -{ - unsigned int card_nr; - - printk("bt878 find by dvb adap: checking \"%s\"\n",adapter->name); - for (card_nr = 0; card_nr < bt878_num; card_nr++) { - if (bt878[card_nr].adapter == adapter) - return &bt878[card_nr]; - } - printk("bt878 find by dvb adap: NOT found \"%s\"\n",adapter->name); - return NULL; -} - -EXPORT_SYMBOL(bt878_find_by_i2c_adap); - /***********************/ /* PCI device handling */ /***********************/ @@ -578,7 +563,7 @@ /* later we register inside of bt878_find_audio_dma() * because we may want to ignore certain cards */ bt878_pci_driver_registered = 1; - return pci_module_init(&bt878_pci_driver); + return pci_register_driver(&bt878_pci_driver); } static void bt878_cleanup_module(void) diff -Nru a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c --- a/drivers/media/dvb/bt8xx/dst.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/bt8xx/dst.c 2005-03-30 16:58:50 -08:00 @@ -998,7 +998,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/bt8xx/dst_priv.h b/drivers/media/dvb/bt8xx/dst_priv.h --- a/drivers/media/dvb/bt8xx/dst_priv.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/bt8xx/dst_priv.h 2005-03-30 16:58:50 -08:00 @@ -34,4 +34,3 @@ int bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp); -struct bt878 *bt878_find_by_i2c_adap(struct i2c_adapter *adap); diff -Nru a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c 2005-03-30 16:58:47 -08:00 @@ -133,7 +133,7 @@ static u8 mt352_reset [] = { 0x50, 0x80 }; static u8 mt352_adc_ctl_1_cfg [] = { 0x8E, 0x40 }; static u8 mt352_agc_cfg [] = { 0x67, 0x28, 0x20 }; - static u8 mt352_gpp_ctl_cfg [] = { 0x75, 0x33 }; + static u8 mt352_gpp_ctl_cfg [] = { 0x8C, 0x33 }; static u8 mt352_capt_range_cfg[] = { 0x75, 0x32 }; mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); @@ -369,6 +369,63 @@ }; +static int or51211_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) +{ + struct dvb_bt8xx_card* bt = (struct dvb_bt8xx_card*) fe->dvb->priv; + + return request_firmware(fw, name, &bt->bt->dev->dev); +} + +static void or51211_setmode(struct dvb_frontend * fe, int mode) +{ + struct dvb_bt8xx_card *bt = fe->dvb->priv; + bttv_write_gpio(bt->bttv_nr, 0x0002, mode); /* Reset */ + msleep(20); +} + +static void or51211_reset(struct dvb_frontend * fe) +{ + struct dvb_bt8xx_card *bt = fe->dvb->priv; + + /* RESET DEVICE + * reset is controled by GPIO-0 + * when set to 0 causes reset and when to 1 for normal op + * must remain reset for 128 clock cycles on a 50Mhz clock + * also PRM1 PRM2 & PRM4 are controled by GPIO-1,GPIO-2 & GPIO-4 + * We assume that the reset has be held low long enough or we + * have been reset by a power on. When the driver is unloaded + * reset set to 0 so if reloaded we have been reset. + */ + /* reset & PRM1,2&4 are outputs */ + int ret = bttv_gpio_enable(bt->bttv_nr, 0x001F, 0x001F); + if (ret != 0) { + printk(KERN_WARNING "or51211: Init Error - Can't Reset DVR " + "(%i)\n", ret); + } + bttv_write_gpio(bt->bttv_nr, 0x001F, 0x0000); /* Reset */ + msleep(20); + /* Now set for normal operation */ + bttv_write_gpio(bt->bttv_nr, 0x0001F, 0x0001); + /* wait for operation to begin */ + msleep(500); +} + +static void or51211_sleep(struct dvb_frontend * fe) +{ + struct dvb_bt8xx_card *bt = fe->dvb->priv; + bttv_write_gpio(bt->bttv_nr, 0x0001, 0x0000); +} + +static struct or51211_config or51211_config = { + + .demod_address = 0x15, + .request_firmware = or51211_request_firmware, + .setmode = or51211_setmode, + .reset = or51211_reset, + .sleep = or51211_sleep, +}; + + static int vp3021_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; @@ -458,6 +515,13 @@ break; } break; + + case BTTV_PC_HDTV: + card->fe = or51211_attach(&or51211_config, card->i2c_adapter); + if (card->fe != NULL) { + break; + } + break; } if (card->fe == NULL) { @@ -635,6 +699,12 @@ * DA_APP = async data parallel port, * ACAP_EN = 1, * RISC+FIFO ENABLE */ + break; + + case BTTV_PC_HDTV: + card->gpio_mode = 0x0100EC7B; + card->op_sync_orin = 0; + card->irq_err_ignore = 0; break; default: diff -Nru a/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/drivers/media/dvb/bt8xx/dvb-bt8xx.h --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.h 2005-03-30 16:58:50 -08:00 @@ -34,6 +34,7 @@ #include "dst.h" #include "nxt6000.h" #include "cx24110.h" +#include "or51211.h" struct dvb_bt8xx_card { struct semaphore lock; diff -Nru a/drivers/media/dvb/dibusb/Kconfig b/drivers/media/dvb/dibusb/Kconfig --- a/drivers/media/dvb/dibusb/Kconfig 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/dibusb/Kconfig 2005-03-30 16:58:48 -08:00 @@ -13,7 +13,7 @@ TwinhanDTV USB-Ter (VP7041) TwinhanDTV Magic Box (VP7041e) - KWorld V-Stream XPERT DTV - DVB-T USB + KWorld/JetWay/ADSTech V-Stream XPERT DTV - DVB-T USB1.1 and USB2.0 Hama DVB-T USB-Box DiBcom reference devices (non-public) Ultima Electronic/Artec T1 USB TVBOX @@ -23,6 +23,7 @@ Artec T1 USB1.1 and USB2.0 boxes Yakumo/Typhoon DVB-T USB2.0 Hanftek UMT-010 USB2.0 + Hauppauge WinTV NOVA-T USB2 The VP7041 seems to be identical to "CTS Portable" (Chinese Television System). diff -Nru a/drivers/media/dvb/dibusb/Makefile b/drivers/media/dvb/dibusb/Makefile --- a/drivers/media/dvb/dibusb/Makefile 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/dibusb/Makefile 2005-03-30 16:58:49 -08:00 @@ -4,7 +4,7 @@ dvb-dibusb-firmware.o \ dvb-dibusb-remote.o \ dvb-dibusb-usb.o \ - dvb-dibusb-pid.o + dvb-fe-dtt200u.o obj-$(CONFIG_DVB_DIBUSB) += dvb-dibusb.o diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-core.c b/drivers/media/dvb/dibusb/dvb-dibusb-core.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-core.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-core.c 2005-03-30 16:58:47 -08:00 @@ -42,11 +42,16 @@ module_param(pid_parse, int, 0644); MODULE_PARM_DESC(pid_parse, "enable pid parsing (filtering) when running at USB2.0"); -static int rc_query_interval; +static int rc_query_interval = 100; module_param(rc_query_interval, int, 0644); MODULE_PARM_DESC(rc_query_interval, "interval in msecs for remote control query (default: 100; min: 40)"); +static int rc_key_repeat_count = 2; +module_param(rc_key_repeat_count, int, 0644); +MODULE_PARM_DESC(rc_key_repeat_count, "how many key repeats will be dropped before passing the key event again (default: 2)"); + /* Vendor IDs */ +#define USB_VID_ADSTECH 0x06e1 #define USB_VID_ANCHOR 0x0547 #define USB_VID_AVERMEDIA 0x14aa #define USB_VID_COMPRO 0x185b @@ -55,13 +60,16 @@ #define USB_VID_DIBCOM 0x10b8 #define USB_VID_EMPIA 0xeb1a #define USB_VID_GRANDTEC 0x5032 -#define USB_VID_HYPER_PALTEK 0x1025 #define USB_VID_HANFTEK 0x15f4 +#define USB_VID_HAUPPAUGE 0x2040 +#define USB_VID_HYPER_PALTEK 0x1025 #define USB_VID_IMC_NETWORKS 0x13d3 #define USB_VID_TWINHAN 0x1822 #define USB_VID_ULTIMA_ELECTRONIC 0x05d8 /* Product IDs */ +#define USB_PID_ADSTECH_USB2_COLD 0xa333 +#define USB_PID_ADSTECH_USB2_WARM 0xa334 #define USB_PID_AVERMEDIA_DVBT_USB_COLD 0x0001 #define USB_PID_AVERMEDIA_DVBT_USB_WARM 0x0002 #define USB_PID_COMPRO_DVBU2000_COLD 0xd000 @@ -90,9 +98,11 @@ #define USB_PID_UNK_HYPER_PALTEK_COLD 0x005e #define USB_PID_UNK_HYPER_PALTEK_WARM 0x005f #define USB_PID_HANFTEK_UMT_010_COLD 0x0001 -#define USB_PID_HANFTEK_UMT_010_WARM 0x0025 +#define USB_PID_HANFTEK_UMT_010_WARM 0x0015 #define USB_PID_YAKUMO_DTT200U_COLD 0x0201 #define USB_PID_YAKUMO_DTT200U_WARM 0x0301 +#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300 +#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301 /* USB Driver stuff * table of devices that this driver is working with @@ -109,10 +119,6 @@ /* 00 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB_COLD)}, /* 01 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB_WARM)}, /* 02 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_YAKUMO_DTT200U_COLD) }, - -/* the following device is actually not supported, but when loading the - * correct firmware (ie. its usb ids will change) everything works fine then - */ /* 03 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_YAKUMO_DTT200U_WARM) }, /* 04 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, @@ -143,16 +149,20 @@ /* 28 */ { USB_DEVICE(USB_VID_HANFTEK, USB_PID_HANFTEK_UMT_010_COLD) }, /* 29 */ { USB_DEVICE(USB_VID_HANFTEK, USB_PID_HANFTEK_UMT_010_WARM) }, +/* 30 */ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_WINTV_NOVA_T_USB2_COLD) }, +/* 31 */ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_WINTV_NOVA_T_USB2_WARM) }, +/* 32 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, +/* 33 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, /* * activate the following define when you have one of the devices and want to * build it from build-2.6 in dvb-kernel */ -// #define CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES +// #define CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES #ifdef CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES -/* 30 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, -/* 31 */ { USB_DEVICE(USB_VID_CYPRESS, USB_PID_ULTIMA_TVBOX_USB2_FX_COLD) }, -/* 32 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_USB2_FX_WARM) }, -/* 33 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_DIBCOM_ANCHOR_2135_COLD) }, +/* 34 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, +/* 35 */ { USB_DEVICE(USB_VID_CYPRESS, USB_PID_ULTIMA_TVBOX_USB2_FX_COLD) }, +/* 36 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_USB2_FX_WARM) }, +/* 37 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_DIBCOM_ANCHOR_2135_COLD) }, #endif { } /* Terminating entry */ }; @@ -193,13 +203,17 @@ 254, { 0xf, 0 }, }, + { DTT200U_FE, + 8, + { 0xff,0 }, /* there is no i2c bus in this device */ + } }; static struct dibusb_device_class dibusb_device_classes[] = { { .id = DIBUSB1_1, .usb_ctrl = &dibusb_usb_ctrl[0], .firmware = "dvb-dibusb-5.0.0.11.fw", .pipe_cmd = 0x01, .pipe_data = 0x02, - .urb_count = 3, .urb_buffer_size = 4096, + .urb_count = 7, .urb_buffer_size = 4096, DIBUSB_RC_NEC_PROTOCOL, &dibusb_demod[DIBUSB_DIB3000MB], &dibusb_tuner[DIBUSB_TUNER_CABLE_THOMSON], @@ -207,7 +221,7 @@ { DIBUSB1_1_AN2235, &dibusb_usb_ctrl[1], "dvb-dibusb-an2235-1.fw", 0x01, 0x02, - 3, 4096, + 7, 4096, DIBUSB_RC_NEC_PROTOCOL, &dibusb_demod[DIBUSB_DIB3000MB], &dibusb_tuner[DIBUSB_TUNER_CABLE_THOMSON], @@ -215,20 +229,43 @@ { DIBUSB2_0,&dibusb_usb_ctrl[2], "dvb-dibusb-6.0.0.5.fw", 0x01, 0x06, - 3, 188*210, + 7, 4096, DIBUSB_RC_NEC_PROTOCOL, &dibusb_demod[DIBUSB_DIB3000MC], &dibusb_tuner[DIBUSB_TUNER_COFDM_PANASONIC_ENV57H1XD5], }, { UMT2_0, &dibusb_usb_ctrl[2], - "dvb-dibusb-umt-1.fw", - 0x01, 0x02, - 15, 188*21, + "dvb-dibusb-umt-2.fw", + 0x01, 0x06, + 20, 512, DIBUSB_RC_NO, &dibusb_demod[DIBUSB_MT352], -// &dibusb_tuner[DIBUSB_TUNER_COFDM_PANASONIC_ENV77H11D5], &dibusb_tuner[DIBUSB_TUNER_CABLE_LG_TDTP_E102P], }, + { DIBUSB2_0B,&dibusb_usb_ctrl[2], + "dvb-dibusb-adstech-usb2-1.fw", + 0x01, 0x06, + 7, 4096, + DIBUSB_RC_NEC_PROTOCOL, + &dibusb_demod[DIBUSB_DIB3000MB], + &dibusb_tuner[DIBUSB_TUNER_CABLE_THOMSON], + }, + { NOVAT_USB2,&dibusb_usb_ctrl[2], + "dvb-dibusb-nova-t-1.fw", + 0x01, 0x06, + 7, 4096, + DIBUSB_RC_HAUPPAUGE_PROTO, + &dibusb_demod[DIBUSB_DIB3000MC], + &dibusb_tuner[DIBUSB_TUNER_COFDM_PANASONIC_ENV57H1XD5], + }, + { DTT200U,&dibusb_usb_ctrl[2], + "dvb-dtt200u-1.fw", + 0x01, 0x02, + 7, 4096, + DIBUSB_RC_NO, + &dibusb_demod[DTT200U_FE], + NULL, /* no explicit tuner/pll-programming necessary (it has the ENV57H1XD5) */ + }, }; static struct dibusb_usb_device dibusb_devices[] = { @@ -287,30 +324,40 @@ { &dib_table[27], NULL }, { NULL }, }, - { "AVermedia/Yakumo/Hama/Typhoon DVB-T USB2.0", - &dibusb_device_classes[UMT2_0], + { "Hauppauge WinTV NOVA-T USB2", + &dibusb_device_classes[NOVAT_USB2], + { &dib_table[30], NULL }, + { &dib_table[31], NULL }, + }, + { "DTT200U (Yakumo/Hama/Typhoon) DVB-T USB2.0", + &dibusb_device_classes[DTT200U], { &dib_table[2], NULL }, - { NULL }, + { &dib_table[3], NULL }, }, { "Hanftek UMT-010 DVB-T USB2.0", &dibusb_device_classes[UMT2_0], { &dib_table[28], NULL }, { &dib_table[29], NULL }, }, + { "KWorld/ADSTech Instant DVB-T USB 2.0", + &dibusb_device_classes[DIBUSB2_0B], + { &dib_table[32], NULL }, + { &dib_table[33], NULL }, /* device ID with default DIBUSB2_0-firmware */ + }, #ifdef CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES { "Artec T1 USB1.1 TVBOX with AN2235 (misdesigned)", &dibusb_device_classes[DIBUSB1_1_AN2235], - { &dib_table[30], NULL }, + { &dib_table[34], NULL }, { NULL }, }, { "Artec T1 USB2.0 TVBOX with FX2 IDs (misdesigned, please report the warm ID)", - &dibusb_device_classes[DIBUSB2_0], - { &dib_table[31], NULL }, - { &dib_table[32], NULL }, /* undefined, it could be that the device will get another USB ID in warm state */ + &dibusb_device_classes[DTT200U], + { &dib_table[35], NULL }, + { &dib_table[36], NULL }, /* undefined, it could be that the device will get another USB ID in warm state */ }, { "DiBcom USB1.1 DVB-T reference design (MOD3000) with AN2135 default IDs", &dibusb_device_classes[DIBUSB1_1], - { &dib_table[33], NULL }, + { &dib_table[37], NULL }, { NULL }, }, #endif @@ -322,7 +369,6 @@ dibusb_remote_exit(dib); dibusb_fe_exit(dib); dibusb_i2c_exit(dib); - dibusb_pid_list_exit(dib); dibusb_dvb_exit(dib); dibusb_urb_exit(dib); deb_info("init_state should be zero now: %x\n",dib->init_state); @@ -341,7 +387,6 @@ if ((ret = dibusb_urb_init(dib)) || (ret = dibusb_dvb_init(dib)) || - (ret = dibusb_pid_list_init(dib)) || (ret = dibusb_i2c_init(dib))) { dibusb_exit(dib); return ret; @@ -356,30 +401,62 @@ return 0; } +static struct dibusb_usb_device * dibusb_device_class_quirk(struct usb_device *udev, struct dibusb_usb_device *dev) +{ + int i; + + /* Quirk for the Kworld/ADSTech Instant USB2.0 device. It has the same USB + * IDs like the USB1.1 KWorld after loading the firmware. Which is a bad + * idea and make this quirk necessary. + */ + if (dev->dev_cl->id == DIBUSB1_1 && udev->speed == USB_SPEED_HIGH) { + info("this seems to be the Kworld/ADSTech Instant USB2.0 device or equal."); + for (i = 0; i < sizeof(dibusb_devices)/sizeof(struct dibusb_usb_device); i++) { + if (dibusb_devices[i].dev_cl->id == DIBUSB2_0B) { + dev = &dibusb_devices[i]; + break; + } + } + } + + return dev; +} + static struct dibusb_usb_device * dibusb_find_device (struct usb_device *udev,int *cold) { int i,j; + struct dibusb_usb_device *dev = NULL; *cold = -1; + for (i = 0; i < sizeof(dibusb_devices)/sizeof(struct dibusb_usb_device); i++) { for (j = 0; j < DIBUSB_ID_MAX_NUM && dibusb_devices[i].cold_ids[j] != NULL; j++) { deb_info("check for cold %x %x\n",dibusb_devices[i].cold_ids[j]->idVendor, dibusb_devices[i].cold_ids[j]->idProduct); if (dibusb_devices[i].cold_ids[j]->idVendor == le16_to_cpu(udev->descriptor.idVendor) && dibusb_devices[i].cold_ids[j]->idProduct == le16_to_cpu(udev->descriptor.idProduct)) { *cold = 1; - return &dibusb_devices[i]; + dev = &dibusb_devices[i]; + break; } } + if (dev != NULL) + break; + for (j = 0; j < DIBUSB_ID_MAX_NUM && dibusb_devices[i].warm_ids[j] != NULL; j++) { deb_info("check for warm %x %x\n",dibusb_devices[i].warm_ids[j]->idVendor, dibusb_devices[i].warm_ids[j]->idProduct); if (dibusb_devices[i].warm_ids[j]->idVendor == le16_to_cpu(udev->descriptor.idVendor) && dibusb_devices[i].warm_ids[j]->idProduct == le16_to_cpu(udev->descriptor.idProduct)) { *cold = 0; - return &dibusb_devices[i]; + dev = &dibusb_devices[i]; + break; } } } - return NULL; + + if (dev != NULL) + dev = dibusb_device_class_quirk(udev,dev); + + return dev; } /* @@ -418,6 +495,7 @@ /* store parameters to structures */ dib->rc_query_interval = rc_query_interval; dib->pid_parse = pid_parse; + dib->rc_key_repeat_count = rc_key_repeat_count; usb_set_intfdata(intf, dib); @@ -446,7 +524,7 @@ } /* usb specific object needed to register this driver with the usb subsystem */ -struct usb_driver dibusb_driver = { +static struct usb_driver dibusb_driver = { .owner = THIS_MODULE, .name = DRIVER_DESC, .probe = dibusb_probe, diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c b/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-dvb.c 2005-03-30 16:58:49 -08:00 @@ -22,46 +22,34 @@ void dibusb_urb_complete(struct urb *urb, struct pt_regs *ptregs) { struct usb_dibusb *dib = urb->context; - int ret; deb_ts("urb complete feedcount: %d, status: %d, length: %d\n",dib->feedcount,urb->status, urb->actual_length); urb_compl_count++; - if (urb_compl_count % 500 == 0) + if (urb_compl_count % 1000 == 0) deb_info("%d urbs completed so far.\n",urb_compl_count); switch (urb->status) { case 0: /* success */ case -ETIMEDOUT: /* NAK */ break; - case -ECONNRESET: /* unlink */ + case -ECONNRESET: /* kill */ case -ENOENT: case -ESHUTDOWN: return; default: /* error */ - warn("urb completition error %d.", urb->status); + deb_ts("urb completition error %d.", urb->status); + break; } - if (dib->feedcount > 0) { - deb_ts("URB return len: %d\n",urb->actual_length); - if (urb->actual_length % 188) - deb_ts("TS Packets: %d, %d\n", urb->actual_length/188,urb->actual_length % 188); - - /* Francois recommends to drop not full-filled packets, even if they may - * contain valid TS packets, at least for USB1.1 - * - * if (urb->actual_length == dib->dibdev->parm->default_size && dib->dvb_is_ready) */ + if (dib->feedcount > 0 && urb->actual_length > 0) { if (dib->init_state & DIBUSB_STATE_DVB) dvb_dmx_swfilter(&dib->demux, (u8*) urb->transfer_buffer,urb->actual_length); - else - deb_ts("URB dropped because of the " - "actual_length or !dvb_is_ready (%d).\n",dib->init_state & DIBUSB_STATE_DVB); } else deb_ts("URB dropped because of feedcount.\n"); - ret = usb_submit_urb(urb,GFP_ATOMIC); - deb_ts("urb resubmitted, (%d)\n",ret); + usb_submit_urb(urb,GFP_ATOMIC); } static int dibusb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) @@ -77,7 +65,6 @@ /* * stop feed before setting a new pid if there will be no pid anymore */ -// if ((dib->dibdev->parm->firmware_bug && dib->feedcount) || if (newfeedcount == 0) { deb_ts("stop feeding\n"); if (dib->xfer_ops.fifo_ctrl != NULL) { @@ -86,23 +73,20 @@ return -ENODEV; } } + dibusb_streaming(dib,0); } dib->feedcount = newfeedcount; - /* get a free pid from the list and activate it on the device - * specific pid_filter - */ - if (dib->pid_parse) - dibusb_ctrl_pid(dib,dvbdmxfeed,onoff); + /* activate the pid on the device specific pid_filter */ + deb_ts("setting pid: %5d %04x at index %d '%s'\n",dvbdmxfeed->pid,dvbdmxfeed->pid,dvbdmxfeed->index,onoff ? "on" : "off"); + if (dib->pid_parse && dib->xfer_ops.pid_ctrl != NULL) + dib->xfer_ops.pid_ctrl(dib->fe,dvbdmxfeed->index,dvbdmxfeed->pid,onoff); /* - * start the feed, either if there is the firmware bug or - * if this was the first pid to set and there is still a pid for - * reception. + * start the feed if this was the first pid to set and there is still a pid + * for reception. */ - -// if ((dib->dibdev->parm->firmware_bug) if (dib->feedcount == onoff && dib->feedcount > 0) { deb_ts("controlling pid parser\n"); @@ -142,12 +126,8 @@ urb_compl_count = 0; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,4) - if ((ret = dvb_register_adapter(&dib->adapter, DRIVER_DESC)) < 0) { -#else - if ((ret = dvb_register_adapter(&dib->adapter, DRIVER_DESC , + if ((ret = dvb_register_adapter(&dib->adapter, DRIVER_DESC, THIS_MODULE)) < 0) { -#endif deb_info("dvb_register_adapter failed: error %d", ret); goto err; } diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c b/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c 2005-03-30 16:58:49 -08:00 @@ -14,7 +14,7 @@ #include -int dibusb_i2c_msg(struct usb_dibusb *dib, u8 addr, +static int dibusb_i2c_msg(struct usb_dibusb *dib, u8 addr, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) { u8 sndbuf[wlen+4]; /* lead(1) devaddr,direction(1) addr(2) data(wlen) (len(2) (when reading)) */ @@ -125,27 +125,6 @@ return 0; } -/* there is a ugly pid_filter in the firmware of the umt devices, it is accessible - * by i2c address 0x8. Don't know how to deactivate it and how many rows it has. - */ -static int dibusb_umt_pid_control(struct dvb_frontend *fe, int index, int pid, int onoff) -{ - struct usb_dibusb *dib = fe->dvb->priv; - u8 b[3]; - b[0] = index; - if (onoff) { - b[1] = (pid >> 8) & 0xff; - b[2] = pid & 0xff; - } else { - b[1] = 0; - b[2] = 0; - } - dibusb_i2c_msg(dib, 0x8, b, 3, NULL,0); - dibusb_set_streaming_mode(dib,0); - dibusb_set_streaming_mode(dib,1); - return 0; -} - int dibusb_fe_init(struct usb_dibusb* dib) { struct dib3000_config demod_cfg; @@ -160,6 +139,8 @@ demod_cfg.pll_set = dibusb_general_pll_set; demod_cfg.pll_init = dibusb_general_pll_init; + deb_info("demod id: %d %d\n",dib->dibdev->dev_cl->demod->id,DTT200U_FE); + switch (dib->dibdev->dev_cl->demod->id) { case DIBUSB_DIB3000MB: dib->fe = dib3000mb_attach(&demod_cfg,&dib->i2c_adap,&dib->xfer_ops); @@ -170,7 +151,9 @@ case DIBUSB_MT352: mt352_hanftek_umt_010_config.demod_address = dib->dibdev->dev_cl->demod->i2c_addrs[i]; dib->fe = mt352_attach(&mt352_hanftek_umt_010_config, &dib->i2c_adap); - dib->xfer_ops.pid_ctrl = dibusb_umt_pid_control; + break; + case DTT200U_FE: + dib->fe = dtt200u_fe_attach(dib,&dib->xfer_ops); break; } if (dib->fe != NULL) { @@ -178,6 +161,8 @@ break; } } + /* if a frontend was found */ + if (dib->fe != NULL) { if (dib->fe->ops->sleep != NULL) dib->fe_sleep = dib->fe->ops->sleep; dib->fe->ops->sleep = dibusb_hw_sleep; @@ -192,6 +177,7 @@ /* check which tuner is mounted on this device, in case this is unsure */ dibusb_tuner_quirk(dib); } + } if (dib->fe == NULL) { err("A frontend driver was not found for device '%s'.", dib->dibdev->name); @@ -205,6 +191,7 @@ return -ENODEV; } } + return 0; } @@ -274,10 +261,10 @@ static int panasonic_cofdm_env57h1xd5_pll_set(struct dvb_frontend_parameters *fep, u8 pllbuf[4]) { - u32 freq = fep->frequency; - u32 tfreq = ((freq + 36125000)*6 + 500000) / 1000000; + u32 freq_khz = fep->frequency / 1000; + u32 tfreq = ((freq_khz + 36125)*6 + 500) / 1000; u8 TA, T210, R210, ctrl1, cp210, p4321; - if (freq > 858000000) { + if (freq_khz > 858000) { err("frequency cannot be larger than 858 MHz."); return -EINVAL; } @@ -289,17 +276,17 @@ ctrl1 = (1 << 7) | (TA << 6) | (T210 << 3) | R210; // ******** CHARGE PUMP CONFIG vs RF FREQUENCIES ***************** - if (freq < 470000000) + if (freq_khz < 470000) cp210 = 2; // VHF Low and High band ch E12 to E4 to E12 - else if (freq < 526000000) + else if (freq_khz < 526000) cp210 = 4; // UHF band Ch E21 to E27 else // if (freq < 862000000) cp210 = 5; // UHF band ch E28 to E69 //********************* BW select ******************************* - if (freq < 153000000) + if (freq_khz < 153000) p4321 = 1; // BW selected for VHF low - else if (freq < 470000000) + else if (freq_khz < 470000) p4321 = 2; // BW selected for VHF high E5 to E12 else // if (freq < 862000000) p4321 = 4; // BW selection for UHF E21 to E69 @@ -341,8 +328,6 @@ * BSn = 0 corresponding port is off, high-impedance state (at power-on) * BSn = 1 corresponding port is on */ - - static int panasonic_cofdm_env77h11d5_tda6650_init(struct dvb_frontend *fe, u8 pllbuf[4]) { pllbuf[0] = 0x0b; @@ -437,55 +422,54 @@ * 0 1 c2 (always valid) * 1 0 c4 * 1 1 c6 - * - * - * */ - static int lg_tdtp_e102p_tua6034(struct dvb_frontend_parameters* fep, u8 pllbuf[4]) { u32 div; - u8 p3210, p4; + u8 p210, p3; #define TUNER_MUL 62500 div = (fep->frequency + 36125000 + TUNER_MUL / 2) / TUNER_MUL; +// div = ((fep->frequency/1000 + 36166) * 6) / 1000; if (fep->frequency < 174500000) - p3210 = 1; // not supported by the tdtp_e102p + p210 = 1; // not supported by the tdtp_e102p else if (fep->frequency < 230000000) // VHF - p3210 = 2; + p210 = 2; else - p3210 = 4; + p210 = 4; if (fep->u.ofdm.bandwidth == BANDWIDTH_7_MHZ) - p4 = 0; + p3 = 0; else - p4 = 1; + p3 = 1; pllbuf[0] = (div >> 8) & 0x7f; pllbuf[1] = div & 0xff; pllbuf[2] = 0xce; - pllbuf[3] = (p4 << 4) | p3210; +// pllbuf[2] = 0xcc; + pllbuf[3] = (p3 << 3) | p210; return 0; } static int lg_tdtp_e102p_mt352_demod_init(struct dvb_frontend *fe) { - static u8 mt352_clock_config[] = { 0x89, 0xb0, 0x2d }; + static u8 mt352_clock_config[] = { 0x89, 0xb8, 0x2d }; static u8 mt352_reset[] = { 0x50, 0x80 }; static u8 mt352_mclk_ratio[] = { 0x8b, 0x00 }; static u8 mt352_adc_ctl_1_cfg[] = { 0x8E, 0x40 }; - static u8 mt352_agc_cfg[] = { 0x67, 0x14, 0x22 }; - static u8 mt352_sec_agc_cfg[] = { 0x69, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x40, 0x40 }; - - static u8 mt352_unk [] = { 0xb5, 0x7a }; + static u8 mt352_agc_cfg[] = { 0x67, 0x10, 0xa0 }; - static u8 mt352_acq_ctl[] = { 0x53, 0x5f }; - static u8 mt352_input_freq_1[] = { 0x56, 0xf1, 0x05 }; + static u8 mt352_sec_agc_cfg1[] = { 0x6a, 0xff }; + static u8 mt352_sec_agc_cfg2[] = { 0x6d, 0xff }; + static u8 mt352_sec_agc_cfg3[] = { 0x70, 0x40 }; + static u8 mt352_sec_agc_cfg4[] = { 0x7b, 0x03 }; + static u8 mt352_sec_agc_cfg5[] = { 0x7d, 0x0f }; -// static u8 mt352_capt_range_cfg[] = { 0x75, 0x32 }; + static u8 mt352_acq_ctl[] = { 0x53, 0x50 }; + static u8 mt352_input_freq_1[] = { 0x56, 0x31, 0x06 }; mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); udelay(2000); @@ -495,14 +479,14 @@ mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); mt352_write(fe, mt352_agc_cfg, sizeof(mt352_agc_cfg)); - mt352_write(fe, mt352_sec_agc_cfg, sizeof(mt352_sec_agc_cfg)); - - mt352_write(fe, mt352_unk, sizeof(mt352_unk)); + mt352_write(fe, mt352_sec_agc_cfg1, sizeof(mt352_sec_agc_cfg1)); + mt352_write(fe, mt352_sec_agc_cfg2, sizeof(mt352_sec_agc_cfg2)); + mt352_write(fe, mt352_sec_agc_cfg3, sizeof(mt352_sec_agc_cfg3)); + mt352_write(fe, mt352_sec_agc_cfg4, sizeof(mt352_sec_agc_cfg4)); + mt352_write(fe, mt352_sec_agc_cfg5, sizeof(mt352_sec_agc_cfg5)); mt352_write(fe, mt352_acq_ctl, sizeof(mt352_acq_ctl)); mt352_write(fe, mt352_input_freq_1, sizeof(mt352_input_freq_1)); - -// mt352_write(fe, mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); return 0; } diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-firmware.c b/drivers/media/dvb/dibusb/dvb-dibusb-firmware.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-firmware.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-firmware.c 2005-03-30 16:58:50 -08:00 @@ -30,11 +30,13 @@ int ret = 0,i; if ((ret = request_firmware(&fw, dibdev->dev_cl->firmware, &udev->dev)) != 0) { - err("did not find a valid firmware file. (%s) " + err("did not find the firmware file. (%s) " "Please see linux/Documentation/dvb/ for more details on firmware-problems.", dibdev->dev_cl->firmware); return ret; } + + info("downloading firmware from file '%s'.",dibdev->dev_cl->firmware); p = kmalloc(fw->size,GFP_KERNEL); if (p != NULL) { diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-pid.c b/drivers/media/dvb/dibusb/dvb-dibusb-pid.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-pid.c 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,80 +0,0 @@ -/* - * dvb-dibusb-pid.c is part of the driver for mobile USB Budget DVB-T devices - * based on reference design made by DiBcom (http://www.dibcom.fr/) - * - * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de) - * - * see dvb-dibusb-core.c for more copyright details. - * - * This file contains functions for initializing and handling the internal - * pid-list. This pid-list mirrors the information currently stored in the - * devices pid-list. - */ -#include "dvb-dibusb.h" - -int dibusb_pid_list_init(struct usb_dibusb *dib) -{ - int i; - dib->pid_list = kmalloc(sizeof(struct dibusb_pid) * dib->dibdev->dev_cl->demod->pid_filter_count,GFP_KERNEL); - if (dib->pid_list == NULL) - return -ENOMEM; - - deb_xfer("initializing %d pids for the pid_list.\n",dib->dibdev->dev_cl->demod->pid_filter_count); - - dib->pid_list_lock = SPIN_LOCK_UNLOCKED; - memset(dib->pid_list,0,dib->dibdev->dev_cl->demod->pid_filter_count*(sizeof(struct dibusb_pid))); - for (i=0; i < dib->dibdev->dev_cl->demod->pid_filter_count; i++) { - dib->pid_list[i].index = i; - dib->pid_list[i].pid = 0; - dib->pid_list[i].active = 0; - } - - dib->init_state |= DIBUSB_STATE_PIDLIST; - return 0; -} - -void dibusb_pid_list_exit(struct usb_dibusb *dib) -{ - if (dib->init_state & DIBUSB_STATE_PIDLIST) - kfree(dib->pid_list); - dib->init_state &= ~DIBUSB_STATE_PIDLIST; -} - -/* fetch a pid from pid_list and set it on or off */ -int dibusb_ctrl_pid(struct usb_dibusb *dib, struct dvb_demux_feed *dvbdmxfeed , int onoff) -{ - int i,ret = -1; - unsigned long flags; - u16 pid = dvbdmxfeed->pid; - - if (onoff) { - spin_lock_irqsave(&dib->pid_list_lock,flags); - for (i=0; i < dib->dibdev->dev_cl->demod->pid_filter_count; i++) - if (!dib->pid_list[i].active) { - dib->pid_list[i].pid = pid; - dib->pid_list[i].active = 1; - ret = i; - break; - } - dvbdmxfeed->priv = &dib->pid_list[ret]; - spin_unlock_irqrestore(&dib->pid_list_lock,flags); - - if (dib->xfer_ops.pid_ctrl != NULL) - dib->xfer_ops.pid_ctrl(dib->fe,dib->pid_list[ret].index,dib->pid_list[ret].pid,1); - } else { - struct dibusb_pid *dpid = dvbdmxfeed->priv; - - if (dib->xfer_ops.pid_ctrl != NULL) - dib->xfer_ops.pid_ctrl(dib->fe,dpid->index,0,0); - - dpid->pid = 0; - dpid->active = 0; - ret = dpid->index; - } - - /* a free pid from the list */ - deb_info("setting pid: %5d %04x at index %d '%s'\n",pid,pid,ret,onoff ? "on" : "off"); - - return ret; -} - diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-remote.c b/drivers/media/dvb/dibusb/dvb-dibusb-remote.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-remote.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-remote.c 2005-03-30 16:58:48 -08:00 @@ -13,7 +13,7 @@ /* Table to map raw key codes to key events. This should not be hard-wired into the kernel. */ -static const struct { u8 c0, c1, c2; uint32_t key; } rc_keys [] = +static const struct { u8 c0, c1, c2; uint32_t key; } nec_rc_keys [] = { /* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */ { 0x00, 0xff, 0x16, KEY_POWER }, @@ -83,18 +83,58 @@ { 0x86, 0x6b, 0x1b, KEY_RIGHT }, }; -/* - * Read the remote control and feed the appropriate event. - * NEC protocol is used for remote controls - */ -static int dibusb_read_remote_control(struct usb_dibusb *dib) +/* Hauppauge NOVA-T USB2 keys */ +static const struct { u16 raw; uint32_t key; } haupp_rc_keys [] = { + { 0xddf, KEY_GOTO }, + { 0xdef, KEY_POWER }, + { 0xce7, KEY_TV }, + { 0xcc7, KEY_VIDEO }, + { 0xccf, KEY_AUDIO }, + { 0xcd7, KEY_MEDIA }, + { 0xcdf, KEY_EPG }, + { 0xca7, KEY_UP }, + { 0xc67, KEY_RADIO }, + { 0xcb7, KEY_LEFT }, + { 0xd2f, KEY_OK }, + { 0xcbf, KEY_RIGHT }, + { 0xcff, KEY_BACK }, + { 0xcaf, KEY_DOWN }, + { 0xc6f, KEY_MENU }, + { 0xc87, KEY_VOLUMEUP }, + { 0xc8f, KEY_VOLUMEDOWN }, + { 0xc97, KEY_CHANNEL }, + { 0xc7f, KEY_MUTE }, + { 0xd07, KEY_CHANNELUP }, + { 0xd0f, KEY_CHANNELDOWN }, + { 0xdbf, KEY_RECORD }, + { 0xdb7, KEY_STOP }, + { 0xd97, KEY_REWIND }, + { 0xdaf, KEY_PLAY }, + { 0xda7, KEY_FASTFORWARD }, + { 0xd27, KEY_LAST }, /* Skip backwards */ + { 0xd87, KEY_PAUSE }, + { 0xcf7, KEY_NEXT }, + { 0xc07, KEY_0 }, + { 0xc0f, KEY_1 }, + { 0xc17, KEY_2 }, + { 0xc1f, KEY_3 }, + { 0xc27, KEY_4 }, + { 0xc2f, KEY_5 }, + { 0xc37, KEY_6 }, + { 0xc3f, KEY_7 }, + { 0xc47, KEY_8 }, + { 0xc4f, KEY_9 }, + { 0xc57, KEY_KPASTERISK }, + { 0xc77, KEY_GRAVE }, /* # */ + { 0xc5f, KEY_RED }, + { 0xd77, KEY_GREEN }, + { 0xdc7, KEY_YELLOW }, + { 0xd4f, KEY_BLUE}, +}; + +static int dibusb_key2event_nec(struct usb_dibusb *dib,u8 rb[5]) { - u8 b[1] = { DIBUSB_REQ_POLL_REMOTE }, rb[5]; - int ret; int i; - if ((ret = dibusb_readwrite_usb(dib,b,1,rb,5))) - return ret; - switch (rb[0]) { case DIBUSB_RC_NEC_KEY_PRESSED: /* rb[1-3] is the actual key, rb[4] is a checksum */ @@ -107,30 +147,100 @@ } /* See if we can match the raw key code. */ - for (i = 0; i < sizeof(rc_keys)/sizeof(rc_keys[0]); i++) { - if (rc_keys[i].c0 == rb[1] && - rc_keys[i].c1 == rb[2] && - rc_keys[i].c2 == rb[3]) { - dib->rc_input_event = rc_keys[i].key; - deb_rc("Translated key 0x%04x\n", dib->rc_input_event); - /* Signal down and up events for this key. */ - input_report_key(&dib->rc_input_dev, dib->rc_input_event, 1); - input_report_key(&dib->rc_input_dev, dib->rc_input_event, 0); - input_sync(&dib->rc_input_dev); - break; + for (i = 0; i < sizeof(nec_rc_keys)/sizeof(nec_rc_keys[0]); i++) { + if (nec_rc_keys[i].c0 == rb[1] && + nec_rc_keys[i].c1 == rb[2] && + nec_rc_keys[i].c2 == rb[3]) { + + dib->last_event = nec_rc_keys[i].key; + return 1; } } break; - case DIBUSB_RC_NEC_EMPTY: /* No (more) remote control keys. */ - break; case DIBUSB_RC_NEC_KEY_REPEATED: /* rb[1]..rb[4] are always zero.*/ /* Repeats often seem to occur so for the moment just ignore this. */ - deb_rc("Key repeat\n"); + return 0; + case DIBUSB_RC_NEC_EMPTY: /* No (more) remote control keys. */ + default: + break; + } + return -1; +} + +static int dibusb_key2event_hauppauge(struct usb_dibusb *dib,u8 rb[4]) +{ + u16 raw; + int i,state; + switch (rb[0]) { + case DIBUSB_RC_HAUPPAUGE_KEY_PRESSED: + raw = ((rb[1] & 0x0f) << 8) | rb[2]; + + state = !!(rb[1] & 0x40); + + deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to %04x state: %d\n",rb[1],rb[2],rb[3],raw,state); + for (i = 0; i < sizeof(haupp_rc_keys)/sizeof(haupp_rc_keys[0]); i++) { + if (haupp_rc_keys[i].raw == raw) { + if (dib->last_event == haupp_rc_keys[i].key && + dib->last_state == state) { + deb_rc("key repeat\n"); + return 0; + } else { + dib->last_event = haupp_rc_keys[i].key; + dib->last_state = state; + return 1; + } + } + } + break; + case DIBUSB_RC_HAUPPAUGE_KEY_EMPTY: default: break; } + return -1; +} + +/* + * Read the remote control and feed the appropriate event. + * NEC protocol is used for remote controls + */ +static int dibusb_read_remote_control(struct usb_dibusb *dib) +{ + u8 b[1] = { DIBUSB_REQ_POLL_REMOTE }, rb[5]; + int ret,event = 0; + + if ((ret = dibusb_readwrite_usb(dib,b,1,rb,5))) + return ret; + + switch (dib->dibdev->dev_cl->remote_type) { + case DIBUSB_RC_NEC_PROTOCOL: + event = dibusb_key2event_nec(dib,rb); + break; + case DIBUSB_RC_HAUPPAUGE_PROTO: + event = dibusb_key2event_hauppauge(dib,rb); + default: + break; + } + + /* key repeat */ + if (event == 0) + if (++dib->repeat_key_count < dib->rc_key_repeat_count) { + deb_rc("key repeat dropped. (%d)\n",dib->repeat_key_count); + event = -1; /* skip this key repeat */ + } + + if (event == 1 || event == 0) { + deb_rc("Translated key 0x%04x\n",event); + + /* Signal down and up events for this key. */ + input_report_key(&dib->rc_input_dev, dib->last_event, 1); + input_report_key(&dib->rc_input_dev, dib->last_event, 0); + input_sync(&dib->rc_input_dev); + + if (event == 1) + dib->repeat_key_count = 0; + } return 0; } @@ -161,12 +271,21 @@ dib->rc_input_dev.keycodemax = KEY_MAX; dib->rc_input_dev.name = DRIVER_DESC " remote control"; - for (i=0; irc_input_dev.keybit); + switch (dib->dibdev->dev_cl->remote_type) { + case DIBUSB_RC_NEC_PROTOCOL: + for (i=0; irc_input_dev.keybit); + break; + case DIBUSB_RC_HAUPPAUGE_PROTO: + for (i=0; irc_input_dev.keybit); + break; + default: + break; + } - input_register_device(&dib->rc_input_dev); - dib->rc_input_event = KEY_MAX; + input_register_device(&dib->rc_input_dev); INIT_WORK(&dib->rc_query_work, dibusb_remote_query, dib); diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-usb.c b/drivers/media/dvb/dibusb/dvb-dibusb-usb.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-usb.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-usb.c 2005-03-30 16:58:48 -08:00 @@ -1,12 +1,12 @@ /* - * dvb-dibusb-usb.c is part of the driver for mobile USB Budget DVB-T devices + * dvb-dibusb-usb.c is part of the driver for mobile USB Budget DVB-T devices * based on reference design made by DiBcom (http://www.dibcom.fr/) * * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de) * * see dvb-dibusb-core.c for more copyright details. * - * This file contains functions for initializing and handling the + * This file contains functions for initializing and handling the * usb specific stuff. */ #include "dvb-dibusb.h" @@ -25,18 +25,12 @@ if ((ret = down_interruptible(&dib->usb_sem))) return ret; - if (dib->feedcount && - wbuf[0] == DIBUSB_REQ_I2C_WRITE && - dib->dibdev->dev_cl->id == DIBUSB1_1) - deb_err("BUG: writing to i2c, while TS-streaming destroys the stream." - "(%x reg: %x %x)\n", wbuf[0],wbuf[2],wbuf[3]); - debug_dump(wbuf,wlen); ret = usb_bulk_msg(dib->udev,usb_sndbulkpipe(dib->udev, dib->dibdev->dev_cl->pipe_cmd), wbuf,wlen,&actlen, DIBUSB_I2C_TIMEOUT); - + if (ret) err("bulk message failed: %d (%d/%d)",ret,wlen,actlen); else @@ -55,7 +49,7 @@ debug_dump(rbuf,actlen); } } - + up(&dib->usb_sem); return ret; } @@ -63,15 +57,18 @@ /* * Cypress controls */ +int dibusb_write_usb(struct usb_dibusb *dib, u8 *buf, u16 len) +{ + return dibusb_readwrite_usb(dib,buf,len,NULL,0); +} #if 0 -/* - * #if 0'ing the following functions as they are not in use _now_, +/* + * #if 0'ing the following functions as they are not in use _now_, * but probably will be sometime. */ - /* - * do not use this, just a workaround for a bug, + * do not use this, just a workaround for a bug, * which will hopefully never occur :). */ int dibusb_interrupt_read_loop(struct usb_dibusb *dib) @@ -79,15 +76,10 @@ u8 b[1] = { DIBUSB_REQ_INTR_READ }; return dibusb_write_usb(dib,b,1); } - -#endif -static int dibusb_write_usb(struct usb_dibusb *dib, u8 *buf, u16 len) -{ - return dibusb_readwrite_usb(dib,buf,len,NULL,0); -} +#endif /* - * ioctl for the firmware + * ioctl for the firmware */ static int dibusb_ioctl_cmd(struct usb_dibusb *dib, u8 cmd, u8 *param, int plen) { @@ -111,11 +103,18 @@ struct usb_dibusb *dib = (struct usb_dibusb *) fe->dvb->priv; u8 b[1] = { DIBUSB_IOCTL_POWER_WAKEUP }; deb_info("dibusb-device is getting up.\n"); - dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); - + + switch (dib->dibdev->dev_cl->id) { + case DTT200U: + break; + default: + dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); + break; + } + if (dib->fe_init) return dib->fe_init(fe); - + return 0; } @@ -124,11 +123,19 @@ struct usb_dibusb *dib = (struct usb_dibusb *) fe->dvb->priv; u8 b[1] = { DIBUSB_IOCTL_POWER_SLEEP }; deb_info("dibusb-device is going to bed.\n"); - dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); - + /* workaround, something is wrong, when dibusb 1.1 device are going to bed too late */ + switch (dib->dibdev->dev_cl->id) { + case DIBUSB1_1: + case NOVAT_USB2: + case DTT200U: + break; + default: + dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); + break; + } if (dib->fe_sleep) return dib->fe_sleep(fe); - + return 0; } @@ -138,18 +145,57 @@ return dibusb_readwrite_usb(dib,b,2,NULL,0); } +static int dibusb_urb_kill(struct usb_dibusb *dib) +{ + int i; +deb_info("trying to kill urbs\n"); + if (dib->init_state & DIBUSB_STATE_URB_SUBMIT) { + for (i = 0; i < dib->dibdev->dev_cl->urb_count; i++) { + deb_info("killing URB no. %d.\n",i); + + /* stop the URB */ + usb_kill_urb(dib->urb_list[i]); + } + } else + deb_info(" URBs not killed.\n"); + dib->init_state &= ~DIBUSB_STATE_URB_SUBMIT; + return 0; +} + +static int dibusb_urb_submit(struct usb_dibusb *dib) +{ + int i,ret; + if (dib->init_state & DIBUSB_STATE_URB_INIT) { + for (i = 0; i < dib->dibdev->dev_cl->urb_count; i++) { + deb_info("submitting URB no. %d\n",i); + if ((ret = usb_submit_urb(dib->urb_list[i],GFP_ATOMIC))) { + err("could not submit buffer urb no. %d - get them all back\n",i); + dibusb_urb_kill(dib); + return ret; + } + dib->init_state |= DIBUSB_STATE_URB_SUBMIT; + } + } + return 0; +} + int dibusb_streaming(struct usb_dibusb *dib,int onoff) { + if (onoff) + dibusb_urb_submit(dib); + else + dibusb_urb_kill(dib); + switch (dib->dibdev->dev_cl->id) { case DIBUSB2_0: + case DIBUSB2_0B: + case NOVAT_USB2: + case UMT2_0: if (onoff) return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_ENABLE_STREAM,NULL,0); else return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_DISABLE_STREAM,NULL,0); break; - case UMT2_0: - return dibusb_set_streaming_mode(dib,onoff); - break; default: break; } @@ -158,10 +204,10 @@ int dibusb_urb_init(struct usb_dibusb *dib) { - int ret,i,bufsize,def_pid_parse = 1; - + int i,bufsize,def_pid_parse = 1; + /* - * when reloading the driver w/o replugging the device + * when reloading the driver w/o replugging the device * a timeout occures, this helps */ usb_clear_halt(dib->udev,usb_sndbulkpipe(dib->udev,dib->dibdev->dev_cl->pipe_cmd)); @@ -175,7 +221,7 @@ memset(dib->urb_list,0,dib->dibdev->dev_cl->urb_count*sizeof(struct urb *)); dib->init_state |= DIBUSB_STATE_URB_LIST; - + bufsize = dib->dibdev->dev_cl->urb_count*dib->dibdev->dev_cl->urb_buffer_size; deb_info("allocate %d bytes as buffersize for all URBs\n",bufsize); /* allocate the actual buffer for the URBs */ @@ -185,7 +231,7 @@ } deb_info("allocation complete\n"); memset(dib->buffer,0,bufsize); - + dib->init_state |= DIBUSB_STATE_URB_BUF; /* allocate and submit the URBs */ @@ -193,55 +239,49 @@ if (!(dib->urb_list[i] = usb_alloc_urb(0,GFP_ATOMIC))) { return -ENOMEM; } - deb_info("submitting URB no. %d\n",i); - - usb_fill_bulk_urb( dib->urb_list[i], dib->udev, + + usb_fill_bulk_urb( dib->urb_list[i], dib->udev, usb_rcvbulkpipe(dib->udev,dib->dibdev->dev_cl->pipe_data), - &dib->buffer[i*dib->dibdev->dev_cl->urb_buffer_size], - dib->dibdev->dev_cl->urb_buffer_size, + &dib->buffer[i*dib->dibdev->dev_cl->urb_buffer_size], + dib->dibdev->dev_cl->urb_buffer_size, dibusb_urb_complete, dib); - + dib->urb_list[i]->transfer_flags = 0; - if ((ret = usb_submit_urb(dib->urb_list[i],GFP_ATOMIC))) { - err("could not submit buffer urb no. %d\n",i); - return ret; - } - dib->init_state |= DIBUSB_STATE_URB_SUBMIT; + dib->init_state |= DIBUSB_STATE_URB_INIT; } /* dib->pid_parse here contains the value of the module parameter */ /* decide if pid parsing can be deactivated: - * is possible (by speed) and wanted (by user) + * is possible (by device type) and wanted (by user) */ switch (dib->dibdev->dev_cl->id) { case DIBUSB2_0: + case DIBUSB2_0B: if (dib->udev->speed == USB_SPEED_HIGH && !dib->pid_parse) { def_pid_parse = 0; info("running at HIGH speed, will deliver the complete TS."); } else info("will use pid_parsing."); break; - default: + default: break; } /* from here on it contains the device and user decision */ dib->pid_parse = def_pid_parse; - + return 0; } int dibusb_urb_exit(struct usb_dibusb *dib) { int i; + + dibusb_urb_kill(dib); + if (dib->init_state & DIBUSB_STATE_URB_LIST) { for (i = 0; i < dib->dibdev->dev_cl->urb_count; i++) { if (dib->urb_list[i] != NULL) { - deb_info("killing URB no. %d.\n",i); - - /* stop the URBs */ - usb_kill_urb(dib->urb_list[i]); - deb_info("freeing URB no. %d.\n",i); /* free the URBs */ usb_free_urb(dib->urb_list[i]); @@ -249,7 +289,6 @@ } /* free the urb array */ kfree(dib->urb_list); - dib->init_state &= ~DIBUSB_STATE_URB_SUBMIT; dib->init_state &= ~DIBUSB_STATE_URB_LIST; } @@ -259,5 +298,6 @@ dib->buffer,dib->dma_handle); dib->init_state &= ~DIBUSB_STATE_URB_BUF; + dib->init_state &= ~DIBUSB_STATE_URB_INIT; return 0; } diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb.h b/drivers/media/dvb/dibusb/dvb-dibusb.h --- a/drivers/media/dvb/dibusb/dvb-dibusb.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb.h 2005-03-30 16:58:47 -08:00 @@ -44,7 +44,7 @@ /* Version information */ #define DRIVER_VERSION "0.3" -#define DRIVER_DESC "Driver for DiBcom based USB Budget DVB-T device" +#define DRIVER_DESC "DiBcom based USB Budget DVB-T device" #define DRIVER_AUTHOR "Patrick Boettcher, patrick.boettcher@desy.de" #define deb_info(args...) dprintk(0x01,args) @@ -55,9 +55,12 @@ #define deb_rc(args...) dprintk(0x20,args) /* generic log methods - taken from usb.h */ -#define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , __FILE__ , ## arg) -#define info(format, arg...) printk(KERN_INFO "%s: " format "\n" , __FILE__ , ## arg) -#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , __FILE__ , ## arg) +#undef err +#define err(format, arg...) printk(KERN_ERR "dvb-dibusb: " format "\n" , ## arg) +#undef info +#define info(format, arg...) printk(KERN_INFO "dvb-dibusb: " format "\n" , ## arg) +#undef warn +#define warn(format, arg...) printk(KERN_WARNING "dvb-dibusb: " format "\n" , ## arg) struct dibusb_usb_controller { const char *name; /* name of the usb controller */ @@ -69,6 +72,9 @@ DIBUSB1_1_AN2235, DIBUSB2_0, UMT2_0, + DIBUSB2_0B, + NOVAT_USB2, + DTT200U, } dibusb_class_t; typedef enum { @@ -82,11 +88,13 @@ DIBUSB_DIB3000MB = 0, DIBUSB_DIB3000MC, DIBUSB_MT352, + DTT200U_FE, } dibusb_demodulator_t; typedef enum { DIBUSB_RC_NO = 0, - DIBUSB_RC_NEC_PROTOCOL = 1, + DIBUSB_RC_NEC_PROTOCOL, + DIBUSB_RC_HAUPPAUGE_PROTO, } dibusb_remote_t; struct dibusb_tuner { @@ -149,11 +157,11 @@ #define DIBUSB_STATE_INIT 0x000 #define DIBUSB_STATE_URB_LIST 0x001 #define DIBUSB_STATE_URB_BUF 0x002 -#define DIBUSB_STATE_URB_SUBMIT 0x004 +#define DIBUSB_STATE_URB_INIT 0x004 #define DIBUSB_STATE_DVB 0x008 #define DIBUSB_STATE_I2C 0x010 #define DIBUSB_STATE_REMOTE 0x020 -#define DIBUSB_STATE_PIDLIST 0x040 +#define DIBUSB_STATE_URB_SUBMIT 0x040 int init_state; int feedcount; @@ -172,10 +180,6 @@ struct semaphore usb_sem; struct semaphore i2c_sem; - /* pid filtering */ - spinlock_t pid_list_lock; - struct dibusb_pid *pid_list; - /* dvb */ struct dvb_adapter *adapter; struct dmxdev dmxdev; @@ -189,7 +193,10 @@ /* remote control */ struct input_dev rc_input_dev; struct work_struct rc_query_work; - int rc_input_event; + int last_event; + int last_state; /* for Hauppauge RC protocol */ + int repeat_key_count; + int rc_key_repeat_count; /* module parameter */ /* module parameters */ int pid_parse; @@ -206,8 +213,6 @@ int dibusb_remote_init(struct usb_dibusb *dib); /* dvb-dibusb-fe-i2c.c */ -int dibusb_i2c_msg(struct usb_dibusb *dib, u8 addr, - u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen); int dibusb_fe_init(struct usb_dibusb* dib); int dibusb_fe_exit(struct usb_dibusb *dib); int dibusb_i2c_init(struct usb_dibusb *dib); @@ -221,6 +226,7 @@ /* dvb-dibusb-usb.c */ int dibusb_readwrite_usb(struct usb_dibusb *dib, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen); +int dibusb_write_usb(struct usb_dibusb *dib, u8 *buf, u16 len); int dibusb_hw_wakeup(struct dvb_frontend *); int dibusb_hw_sleep(struct dvb_frontend *); @@ -230,10 +236,8 @@ int dibusb_urb_init(struct usb_dibusb *); int dibusb_urb_exit(struct usb_dibusb *); -/* dvb-dibusb-pid.c */ -int dibusb_pid_list_init(struct usb_dibusb *dib); -void dibusb_pid_list_exit(struct usb_dibusb *dib); -int dibusb_ctrl_pid(struct usb_dibusb *dib, struct dvb_demux_feed *dvbdmxfeed , int onoff); +/* dvb-fe-dtt200u.c */ +struct dvb_frontend* dtt200u_fe_attach(struct usb_dibusb *,struct dib_fe_xfer_ops *); /* i2c and transfer stuff */ #define DIBUSB_I2C_TIMEOUT 5000 @@ -277,6 +281,10 @@ #define DIBUSB_RC_NEC_EMPTY 0x00 #define DIBUSB_RC_NEC_KEY_PRESSED 0x01 #define DIBUSB_RC_NEC_KEY_REPEATED 0x02 + +/* additional status values for Hauppauge Remote Control Protocol */ +#define DIBUSB_RC_HAUPPAUGE_KEY_PRESSED 0x01 +#define DIBUSB_RC_HAUPPAUGE_KEY_EMPTY 0x03 /* streaming mode: * bulk write: 0x05 mode_byte diff -Nru a/drivers/media/dvb/dibusb/dvb-fe-dtt200u.c b/drivers/media/dvb/dibusb/dvb-fe-dtt200u.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/media/dvb/dibusb/dvb-fe-dtt200u.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,263 @@ +/* + * dvb-dtt200u-fe.c is a driver which implements the frontend-part of the + * Yakumo/Typhoon/Hama USB2.0 boxes. It is hard-wired to the dibusb-driver as + * it uses the usb-transfer functions directly (maybe creating a + * generic-dvb-usb-lib for all usb-drivers will be reduce some more code.) + * + * Copyright (C) 2005 Patrick Boettcher + * + * see dvb-dibusb-core.c for copyright details. + */ + +/* guessed protocol description (reverse engineered): + * read + * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1 + * 81 - + * 82 - crash - do not touch + * 83 - crash - do not touch + * 84 - remote control + * 85 - crash - do not touch (OK, stop testing here) + * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal) + * 89 - noise-to-signal + * 8a - unkown 1 byte - signal_strength + * 8c - ber ??? + * 8d - ber + * 8e - unc + * + * write + * 02 - bandwidth + * 03 - frequency (divided by 250000) + * 04 - pid table (index pid(7:0) pid(12:8)) + * 05 - reset the pid table + * 08 - demod transfer enabled or not (FX2 transfer is enabled by default) + */ + +#include "dvb-dibusb.h" +#include "dvb_frontend.h" + +struct dtt200u_fe_state { + struct usb_dibusb *dib; + + struct dvb_frontend_parameters fep; + struct dvb_frontend frontend; +}; + +#define moan(which,what) info("unexpected value in '%s' for cmd '%02x' - please report to linux-dvb@linuxtv.org",which,what) + +static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u8 bw[1] = { 0x81 }; + u8 br[3] = { 0 }; +// u8 bdeb[5] = { 0 }; + + dibusb_readwrite_usb(state->dib,bw,1,br,3); + switch (br[0]) { + case 0x01: + *stat = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK; + break; + case 0x00: + *stat = 0; + break; + default: + moan("br[0]",0x81); + break; + } + +// bw[0] = 0x88; +// dibusb_readwrite_usb(state->dib,bw,1,bdeb,5); + +// deb_info("%02x: %02x %02x %02x %02x %02x\n",bw[0],bdeb[0],bdeb[1],bdeb[2],bdeb[3],bdeb[4]); + + return 0; +} +static int dtt200u_fe_read_ber(struct dvb_frontend* fe, u32 *ber) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u8 bw[1] = { 0x8d }; + *ber = 0; + dibusb_readwrite_usb(state->dib,bw,1,(u8*) ber, 3); + return 0; +} + +static int dtt200u_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u8 bw[1] = { 0x8c }; + *unc = 0; + dibusb_readwrite_usb(state->dib,bw,1,(u8*) unc, 3); + return 0; +} + +static int dtt200u_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u8 bw[1] = { 0x8a }; + u8 b; + dibusb_readwrite_usb(state->dib,bw,1,&b, 1); + *strength = (b << 8) | b; + return 0; +} + +static int dtt200u_fe_read_snr(struct dvb_frontend* fe, u16 *snr) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u8 bw[1] = { 0x89 }; + u8 br[1] = { 0 }; + dibusb_readwrite_usb(state->dib,bw,1,br,1); + *snr = ((0xff - br[0]) << 8) | (0xff - br[0]); + return 0; +} + +static int dtt200u_fe_init(struct dvb_frontend* fe) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u8 b[] = { 0x01 }; + return dibusb_write_usb(state->dib,b,1); +} + +static int dtt200u_fe_sleep(struct dvb_frontend* fe) +{ + return dtt200u_fe_init(fe); +} + +static int dtt200u_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) +{ + tune->min_delay_ms = 1500; + tune->step_size = 166667; + tune->max_drift = 166667 * 2; + return 0; +} + +static int dtt200u_fe_set_frontend(struct dvb_frontend* fe, + struct dvb_frontend_parameters *fep) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + u16 freq = fep->frequency / 250000; + u8 bw,bwbuf[2] = { 0x03, 0 }, freqbuf[3] = { 0x02, 0, 0 }; + + switch (fep->u.ofdm.bandwidth) { + case BANDWIDTH_8_MHZ: bw = 8; break; + case BANDWIDTH_7_MHZ: bw = 7; break; + case BANDWIDTH_6_MHZ: bw = 6; break; + case BANDWIDTH_AUTO: return -EOPNOTSUPP; + default: + return -EINVAL; + } + deb_info("set_frontend\n"); + + bwbuf[1] = bw; + dibusb_write_usb(state->dib,bwbuf,2); + + freqbuf[1] = freq & 0xff; + freqbuf[2] = (freq >> 8) & 0xff; + dibusb_write_usb(state->dib,freqbuf,3); + + memcpy(&state->fep,fep,sizeof(struct dvb_frontend_parameters)); + + return 0; +} + +static int dtt200u_fe_get_frontend(struct dvb_frontend* fe, + struct dvb_frontend_parameters *fep) +{ + struct dtt200u_fe_state *state = fe->demodulator_priv; + memcpy(fep,&state->fep,sizeof(struct dvb_frontend_parameters)); + return 0; +} + +static void dtt200u_fe_release(struct dvb_frontend* fe) +{ + struct dtt200u_fe_state *state = (struct dtt200u_fe_state*) fe->demodulator_priv; + kfree(state); +} + +static int dtt200u_pid_control(struct dvb_frontend *fe,int index, int pid,int onoff) +{ + struct dtt200u_fe_state *state = (struct dtt200u_fe_state*) fe->demodulator_priv; + u8 b_pid[4]; + pid = onoff ? pid : 0; + + b_pid[0] = 0x04; + b_pid[1] = index; + b_pid[2] = pid & 0xff; + b_pid[3] = (pid >> 8) & 0xff; + + dibusb_write_usb(state->dib,b_pid,4); + return 0; +} + +static int dtt200u_fifo_control(struct dvb_frontend *fe, int onoff) +{ + struct dtt200u_fe_state *state = (struct dtt200u_fe_state*) fe->demodulator_priv; + u8 b_streaming[2] = { 0x08, onoff }; + u8 b_rst_pid[1] = { 0x05 }; + + dibusb_write_usb(state->dib,b_streaming,2); + + if (!onoff) + dibusb_write_usb(state->dib,b_rst_pid,1); + return 0; +} + +static struct dvb_frontend_ops dtt200u_fe_ops; + +struct dvb_frontend* dtt200u_fe_attach(struct usb_dibusb *dib, struct dib_fe_xfer_ops *xfer_ops) +{ + struct dtt200u_fe_state* state = NULL; + + /* allocate memory for the internal state */ + state = (struct dtt200u_fe_state*) kmalloc(sizeof(struct dtt200u_fe_state), GFP_KERNEL); + if (state == NULL) + goto error; + memset(state,0,sizeof(struct dtt200u_fe_state)); + + deb_info("attaching frontend dtt200u\n"); + + state->dib = dib; + + state->frontend.ops = &dtt200u_fe_ops; + state->frontend.demodulator_priv = state; + + xfer_ops->fifo_ctrl = dtt200u_fifo_control; + xfer_ops->pid_ctrl = dtt200u_pid_control; + + goto success; +error: + return NULL; +success: + return &state->frontend; +} + +static struct dvb_frontend_ops dtt200u_fe_ops = { + .info = { + .name = "DTT200U (Yakumo/Typhoon/Hama) DVB-T", + .type = FE_OFDM, + .frequency_min = 44250000, + .frequency_max = 867250000, + .frequency_stepsize = 250000, + .caps = FE_CAN_INVERSION_AUTO | + FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | + FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | + FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO | + FE_CAN_TRANSMISSION_MODE_AUTO | + FE_CAN_GUARD_INTERVAL_AUTO | + FE_CAN_RECOVER | + FE_CAN_HIERARCHY_AUTO, + }, + + .release = dtt200u_fe_release, + + .init = dtt200u_fe_init, + .sleep = dtt200u_fe_sleep, + + .set_frontend = dtt200u_fe_set_frontend, + .get_frontend = dtt200u_fe_get_frontend, + .get_tune_settings = dtt200u_fe_get_tune_settings, + + .read_status = dtt200u_fe_read_status, + .read_ber = dtt200u_fe_read_ber, + .read_signal_strength = dtt200u_fe_read_signal_strength, + .read_snr = dtt200u_fe_read_snr, + .read_ucblocks = dtt200u_fe_read_unc_blocks, +}; diff -Nru a/drivers/media/dvb/dvb-core/demux.h b/drivers/media/dvb/dvb-core/demux.h --- a/drivers/media/dvb/dvb-core/demux.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/dvb-core/demux.h 2005-03-30 16:58:48 -08:00 @@ -298,8 +298,4 @@ #define DMX_DIR_ENTRY(list) list_entry(list, struct dmx_demux, reg_list) -int dmx_register_demux (struct dmx_demux* demux); -int dmx_unregister_demux (struct dmx_demux* demux); -struct list_head* dmx_get_demuxes (void); - #endif /* #ifndef __DEMUX_H */ diff -Nru a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c --- a/drivers/media/dvb/dvb-core/dmxdev.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/dvb-core/dmxdev.c 2005-03-30 16:58:49 -08:00 @@ -304,8 +304,7 @@ buf->size=size; buf->pwrite=buf->pread=0; spin_unlock_irq(&dmxdevfilter->dev->lock); - if (mem) - vfree(mem); + vfree(mem); if (buf->size) { mem=vmalloc(dmxdevfilter->buffer.size); @@ -1129,15 +1128,10 @@ dvb_unregister_device(dmxdev->dvbdev); dvb_unregister_device(dmxdev->dvr_dvbdev); - if (dmxdev->filter) { - vfree(dmxdev->filter); - dmxdev->filter=NULL; - } - - if (dmxdev->dvr) { - vfree(dmxdev->dvr); - dmxdev->dvr=NULL; - } + vfree(dmxdev->filter); + dmxdev->filter=NULL; + vfree(dmxdev->dvr); + dmxdev->dvr=NULL; dmxdev->demux->close(dmxdev->demux); } EXPORT_SYMBOL(dvb_dmxdev_release); diff -Nru a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2005-03-30 16:58:51 -08:00 @@ -148,13 +148,13 @@ wait_queue_head_t thread_queue; /* Flag indicating when thread should exit */ - int exit:1; + unsigned int exit:1; /* Flag indicating if the CA device is open */ - int open:1; + unsigned int open:1; /* Flag indicating the thread should wake up now */ - int wakeup:1; + unsigned int wakeup:1; /* Delay the main thread should use */ unsigned long delay; @@ -804,8 +804,7 @@ down_write(&ca->slot_info[slot].sem); ca->pub->slot_shutdown(ca->pub, slot); ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_NONE; - if (ca->slot_info[slot].rx_buffer.data) - vfree(ca->slot_info[slot].rx_buffer.data); + vfree(ca->slot_info[slot].rx_buffer.data); ca->slot_info[slot].rx_buffer.data = NULL; up_write(&ca->slot_info[slot].sem); @@ -974,7 +973,7 @@ if (ca->open) { if ((!ca->slot_info[slot].da_irq_supported) || (!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_DA))) { - delay = HZ / 100; + delay = HZ / 10; } } break; @@ -1733,8 +1732,7 @@ if (ca != NULL) { if (ca->dvbdev != NULL) dvb_unregister_device(ca->dvbdev); - if (ca->slot_info != NULL) - kfree(ca->slot_info); + kfree(ca->slot_info); kfree(ca); } pubca->private = NULL; diff -Nru a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c --- a/drivers/media/dvb/dvb-core/dvb_demux.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_demux.c 2005-03-30 16:58:47 -08:00 @@ -39,17 +39,17 @@ // #define DVB_DEMUX_SECTION_LOSS_LOG -LIST_HEAD(dmx_muxs); +static LIST_HEAD(dmx_muxs); -int dmx_register_demux(struct dmx_demux *demux) +static int dmx_register_demux(struct dmx_demux *demux) { demux->users = 0; list_add(&demux->reg_list, &dmx_muxs); return 0; } -int dmx_unregister_demux(struct dmx_demux* demux) +static int dmx_unregister_demux(struct dmx_demux* demux) { struct list_head *pos, *n, *head=&dmx_muxs; @@ -66,14 +66,6 @@ } -struct list_head *dmx_get_demuxes(void) -{ - if (list_empty(&dmx_muxs)) - return NULL; - - return &dmx_muxs; -} - /****************************************************************************** * static inlined helper functions ******************************************************************************/ @@ -105,19 +97,6 @@ } -void dvb_set_crc32(u8 *data, int length) -{ - u32 crc; - - crc = crc32_be(~0, data, length); - - data[length] = (crc >> 24) & 0xff; - data[length+1] = (crc >> 16) & 0xff; - data[length+2] = (crc >> 8) & 0xff; - data[length+3] = (crc) & 0xff; -} - - static u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len) { return (f->feed.sec.crc_val = crc32_be (f->feed.sec.crc_val, src, len)); @@ -424,7 +403,7 @@ ((f)->feed.ts.is_filtering) && \ (((f)->ts_type & (TS_PACKET|TS_PAYLOAD_ONLY)) == TS_PACKET)) -void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) +static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf) { struct dvb_demux_feed *feed; struct list_head *pos, *head=&demux->feed_list; @@ -452,7 +431,6 @@ feed->cb.ts(buf, 188, NULL, 0, &feed->feed.ts, DMX_OK); } } -EXPORT_SYMBOL(dvb_dmx_swfilter_packet); void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t count) { @@ -1190,7 +1168,7 @@ } -int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) +static int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1204,10 +1182,9 @@ up(&dvbdemux->mutex); return 0; } -EXPORT_SYMBOL(dvbdmx_connect_frontend); -int dvbdmx_disconnect_frontend(struct dmx_demux *demux) +static int dvbdmx_disconnect_frontend(struct dmx_demux *demux) { struct dvb_demux *dvbdemux = (struct dvb_demux *) demux; @@ -1218,7 +1195,6 @@ up(&dvbdemux->mutex); return 0; } -EXPORT_SYMBOL(dvbdmx_disconnect_frontend); static int dvbdmx_get_pes_pids(struct dmx_demux *demux, u16 *pids) @@ -1250,8 +1226,10 @@ dvbdemux->filter[i].state = DMX_STATE_FREE; dvbdemux->filter[i].index = i; } - for (i=0; ifeednum; i++) + for (i=0; ifeednum; i++) { dvbdemux->feed[i].state = DMX_STATE_FREE; + dvbdemux->feed[i].index = i; + } dvbdemux->frontend_list.next= dvbdemux->frontend_list.prev= &dvbdemux->frontend_list; diff -Nru a/drivers/media/dvb/dvb-core/dvb_demux.h b/drivers/media/dvb/dvb-core/dvb_demux.h --- a/drivers/media/dvb/dvb-core/dvb_demux.h 2005-03-30 16:58:51 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_demux.h 2005-03-30 16:58:51 -08:00 @@ -98,6 +98,7 @@ u16 peslen; struct list_head list_head; + int index; /* a unique index for each feed (can be used as hardware pid filter index) */ }; struct dvb_demux { @@ -138,12 +139,8 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux); int dvb_dmx_release(struct dvb_demux *dvbdemux); -void dvb_dmx_swfilter_packet(struct dvb_demux *dvbdmx, const u8 *buf); void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf, size_t count); void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count); void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count); - -int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend); -int dvbdmx_disconnect_frontend(struct dmx_demux *demux); #endif /* _DVB_DEMUX_H_ */ diff -Nru a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c --- a/drivers/media/dvb/dvb-core/dvb_frontend.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c 2005-03-30 16:58:47 -08:00 @@ -908,8 +908,7 @@ else printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops->info.name); /* fe is invalid now */ - if (fepriv) - kfree(fepriv); + kfree(fepriv); up (&frontend_mutex); return 0; } diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2005-03-30 16:58:47 -08:00 @@ -217,12 +217,12 @@ #define ULE_TEST 0 #define ULE_BRIDGED 1 -int ule_test_sndu( struct dvb_net_priv *p ) +static int ule_test_sndu( struct dvb_net_priv *p ) { return -1; } -int ule_bridged_sndu( struct dvb_net_priv *p ) +static int ule_bridged_sndu( struct dvb_net_priv *p ) { /* BRIDGE SNDU handling sucks in draft-ietf-ipdvb-ule-03.txt. * This has to be the last extension header, otherwise it won't work. diff -Nru a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c --- a/drivers/media/dvb/dvb-core/dvbdev.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/dvb-core/dvbdev.c 2005-03-30 16:58:47 -08:00 @@ -51,9 +51,10 @@ "net", "osd" }; -#define DVB_MAX_IDS 6 -#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) -#define MAX_DVB_MINORS (DVB_MAX_IDS*64) +#define DVB_MAX_ADAPTERS 8 +#define DVB_MAX_IDS 4 +#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) +#define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) struct class_simple *dvb_class; EXPORT_SYMBOL(dvb_class); @@ -268,7 +269,7 @@ { int num = 0; - while (1) { + while (num < DVB_MAX_ADAPTERS) { struct list_head *entry; list_for_each (entry, &dvb_adapter_list) { struct dvb_adapter *adap; @@ -396,9 +397,7 @@ } out: - if (mbuf) - kfree(mbuf); - + kfree(mbuf); return err; } diff -Nru a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig --- a/drivers/media/dvb/frontends/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/Kconfig 2005-03-30 16:58:47 -08:00 @@ -108,14 +108,14 @@ A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_DIB3000MB - tristate "DiBcom 3000-MB" + tristate "DiBcom 3000M-B" depends on DVB_CORE help A DVB-T tuner module. Designed for mobile usage. Say Y when you want to support this frontend. config DVB_DIB3000MC - tristate "DiBcom 3000-MC/P" + tristate "DiBcom 3000P/M-C" depends on DVB_CORE help A DVB-T tuner module. Designed for mobile usage. Say Y when you want @@ -154,11 +154,19 @@ config DVB_NXT2002 tristate "Nxt2002 based" depends on DVB_CORE + select FW_LOADER help An ATSC 8VSB tuner module. Say Y when you want to support this frontend. config DVB_OR51132 tristate "OR51132 based (pcHDTV)" depends on DVB_CORE + +config DVB_OR51211 + tristate "or51211 based (pcHDTV HD2000 card)" + depends on DVB_CORE + select FW_LOADER + help + An ATSC 8VSB tuner module. Say Y when you want to support this frontend. endmenu diff -Nru a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile --- a/drivers/media/dvb/frontends/Makefile 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/Makefile 2005-03-30 16:58:47 -08:00 @@ -26,4 +26,5 @@ obj-$(CONFIG_DVB_TDA10021) += tda10021.o obj-$(CONFIG_DVB_STV0297) += stv0297.o obj-$(CONFIG_DVB_NXT2002) += nxt2002.o +obj-$(CONFIG_DVB_OR51211) += or51211.o obj-$(CONFIG_DVB_OR51132) += or51132.o diff -Nru a/drivers/media/dvb/frontends/at76c651.c b/drivers/media/dvb/frontends/at76c651.c --- a/drivers/media/dvb/frontends/at76c651.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/frontends/at76c651.c 2005-03-30 16:58:50 -08:00 @@ -402,7 +402,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c --- a/drivers/media/dvb/frontends/cx22700.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/frontends/cx22700.c 2005-03-30 16:58:50 -08:00 @@ -392,7 +392,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c --- a/drivers/media/dvb/frontends/cx22702.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/frontends/cx22702.c 2005-03-30 16:58:49 -08:00 @@ -476,7 +476,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c --- a/drivers/media/dvb/frontends/cx24110.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/cx24110.c 2005-03-30 16:58:47 -08:00 @@ -581,7 +581,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/dib3000-common.c b/drivers/media/dvb/frontends/dib3000-common.c --- a/drivers/media/dvb/frontends/dib3000-common.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/dib3000-common.c 2005-03-30 16:58:47 -08:00 @@ -73,7 +73,7 @@ }; MODULE_AUTHOR("Patrick Boettcher demodulator_priv; + deb_info("dib3000mb is getting up.\n"); wr(DIB3000MB_REG_POWER_CONTROL, DIB3000MB_POWER_UP); wr(DIB3000MB_REG_RESTART, DIB3000MB_RESTART_AGC); @@ -574,16 +575,9 @@ if (rd(DIB3000MB_REG_TS_SYNC_LOCK)) *stat |= (FE_HAS_SYNC | FE_HAS_LOCK); - deb_info("actual status is %2x\n",*stat); + deb_getf("actual status is %2x\n",*stat); - deb_getf("tps %x %x %x %x %x\n", - rd(DIB3000MB_REG_TPS_1), - rd(DIB3000MB_REG_TPS_2), - rd(DIB3000MB_REG_TPS_3), - rd(DIB3000MB_REG_TPS_4), - rd(DIB3000MB_REG_TPS_5)); - - deb_info("autoval: tps: %d, qam: %d, hrch: %d, alpha: %d, hp: %d, lp: %d, guard: %d, fft: %d cell: %d\n", + deb_getf("autoval: tps: %d, qam: %d, hrch: %d, alpha: %d, hp: %d, lp: %d, guard: %d, fft: %d cell: %d\n", rd(DIB3000MB_REG_TPS_LOCK), rd(DIB3000MB_REG_TPS_QAM), rd(DIB3000MB_REG_TPS_HRCH), @@ -605,68 +599,22 @@ *ber = ((rd(DIB3000MB_REG_BER_MSB) << 16) | rd(DIB3000MB_REG_BER_LSB)); return 0; } -/* - * Amaury: - * signal strength is measured with dBm (power compared to mW) - * the standard range is -90dBm(low power) to -10 dBm (strong power), - * but the calibration is done for -100 dBm to 0dBm - */ -#define DIB3000MB_AGC_REF_dBm -14 -#define DIB3000MB_GAIN_SLOPE_dBm 100 -#define DIB3000MB_GAIN_DELTA_dBm -2 +/* see dib3000-watch dvb-apps for exact calcuations of signal_strength and snr */ static int dib3000mb_read_signal_strength(struct dvb_frontend* fe, u16 *strength) { struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; -/* TODO log10 - u16 sigpow = rd(DIB3000MB_REG_SIGNAL_POWER), - n_agc_power = rd(DIB3000MB_REG_AGC_POWER), - rf_power = rd(DIB3000MB_REG_RF_POWER); - double rf_power_dBm, ad_power_dBm, minar_power_dBm; - - if (n_agc_power == 0 ) - n_agc_power = 1 ; - - ad_power_dBm = 10 * log10 ( (float)n_agc_power / (float)(1<<16) ); - minor_power_dBm = ad_power_dBm - DIB3000MB_AGC_REF_dBm; - rf_power_dBm = (-DIB3000MB_GAIN_SLOPE_dBm * (float)rf_power / (float)(1<<16) + - DIB3000MB_GAIN_DELTA_dBm) + minor_power_dBm; - // relative rf_power - *strength = (u16) ((rf_power_dBm + 100) / 100 * 0xffff); -*/ *strength = rd(DIB3000MB_REG_SIGNAL_POWER) * 0xffff / 0x170; return 0; } -/* - * Amaury: - * snr is the signal quality measured in dB. - * snr = 10*log10(signal power / noise power) - * the best quality is near 35dB (cable transmission & good modulator) - * the minimum without errors depend of transmission parameters - * some indicative values are given in en300744 Annex A - * ex : 16QAM 2/3 (Gaussian) = 11.1 dB - * - * If SNR is above 20dB, BER should be always 0. - * choose 0dB as the minimum - */ static int dib3000mb_read_snr(struct dvb_frontend* fe, u16 *snr) { struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; short sigpow = rd(DIB3000MB_REG_SIGNAL_POWER); int icipow = ((rd(DIB3000MB_REG_NOISE_POWER_MSB) & 0xff) << 16) | rd(DIB3000MB_REG_NOISE_POWER_LSB); -/* - float snr_dBm=0; - - if (sigpow > 0 && icipow > 0) - snr_dBm = 10.0 * log10( (float) (sigpow<<8) / (float)icipow ) ; - else if (sigpow > 0) - snr_dBm = 35; - - *snr = (u16) ((snr_dBm / 35) * 0xffff); -*/ *snr = (sigpow << 8) / ((icipow > 0) ? icipow : 1); return 0; } @@ -682,7 +630,7 @@ static int dib3000mb_sleep(struct dvb_frontend* fe) { struct dib3000_state* state = (struct dib3000_state*) fe->demodulator_priv; - + deb_info("dib3000mb is going to bed.\n"); wr(DIB3000MB_REG_POWER_CONTROL, DIB3000MB_POWER_DOWN); return 0; } @@ -736,8 +684,9 @@ static int dib3000mb_pid_parse(struct dvb_frontend *fe, int onoff) { - //struct dib3000_state *state = fe->demodulator_priv; - /* switch it off and on */ + struct dib3000_state *state = fe->demodulator_priv; + deb_xfer("%s pid parsing\n",onoff ? "enabling" : "disabling"); + wr(DIB3000MB_REG_PID_PARSE,onoff); return 0; } @@ -763,6 +712,7 @@ state = (struct dib3000_state*) kmalloc(sizeof(struct dib3000_state), GFP_KERNEL); if (state == NULL) goto error; + memset(state,0,sizeof(struct dib3000_state)); /* setup the state */ state->i2c = i2c; @@ -789,15 +739,14 @@ return &state->frontend; error: - if (state) - kfree(state); + kfree(state); return NULL; } static struct dvb_frontend_ops dib3000mb_ops = { .info = { - .name = "DiBcom 3000-MB DVB-T", + .name = "DiBcom 3000M-B DVB-T", .type = FE_OFDM, .frequency_min = 44250000, .frequency_max = 867250000, diff -Nru a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c --- a/drivers/media/dvb/frontends/dib3000mc.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/dib3000mc.c 2005-03-30 16:58:47 -08:00 @@ -1,5 +1,5 @@ /* - * Frontend driver for mobile DVB-T demodulator DiBcom 3000-MC/P + * Frontend driver for mobile DVB-T demodulator DiBcom 3000P/M-C * DiBcom (http://www.dibcom.fr/) * * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de) @@ -34,7 +34,7 @@ /* Version information */ #define DRIVER_VERSION "0.1" -#define DRIVER_DESC "DiBcom 3000-MC DVB-T demodulator driver" +#define DRIVER_DESC "DiBcom 3000M-C DVB-T demodulator" #define DRIVER_AUTHOR "Patrick Boettcher, patrick.boettcher@desy.de" #ifdef CONFIG_DVB_DIBCOM_DEBUG @@ -794,10 +794,8 @@ deb_xfer("%s pid parsing\n",onoff ? "enabling" : "disabling"); if (onoff) { - deb_xfer("%d %x\n",tmp | DIB3000MC_SMO_MODE_PID_PARSE,tmp | DIB3000MC_SMO_MODE_PID_PARSE); wr(DIB3000MC_REG_SMO_MODE,tmp | DIB3000MC_SMO_MODE_PID_PARSE); } else { - deb_xfer("%d %x\n",tmp & DIB3000MC_SMO_MODE_NO_PID_PARSE,tmp & DIB3000MC_SMO_MODE_NO_PID_PARSE); wr(DIB3000MC_REG_SMO_MODE,tmp & DIB3000MC_SMO_MODE_NO_PID_PARSE); } return 0; @@ -849,6 +847,7 @@ state = (struct dib3000_state*) kmalloc(sizeof(struct dib3000_state), GFP_KERNEL); if (state == NULL) goto error; + memset(state,0,sizeof(struct dib3000_state)); /* setup the state */ state->i2c = i2c; @@ -865,10 +864,10 @@ switch (devid) { case DIB3000MC_DEVICE_ID: - info("Found a DiBcom 3000-MC, interesting..."); + info("Found a DiBcom 3000M-C, interesting..."); break; case DIB3000P_DEVICE_ID: - info("Found a DiBcom 3000-P."); + info("Found a DiBcom 3000P."); break; } @@ -887,15 +886,14 @@ return &state->frontend; error: - if (state) - kfree(state); + kfree(state); return NULL; } static struct dvb_frontend_ops dib3000mc_ops = { .info = { - .name = "DiBcom 3000-MC/P DVB-T", + .name = "DiBcom 3000P/M-C DVB-T", .type = FE_OFDM, .frequency_min = 44250000, .frequency_max = 867250000, diff -Nru a/drivers/media/dvb/frontends/dib3000mc_priv.h b/drivers/media/dvb/frontends/dib3000mc_priv.h --- a/drivers/media/dvb/frontends/dib3000mc_priv.h 2005-03-30 16:58:51 -08:00 +++ b/drivers/media/dvb/frontends/dib3000mc_priv.h 2005-03-30 16:58:51 -08:00 @@ -320,7 +320,7 @@ * pidfilter * it is not a hardware pidfilter but a filter which drops all pids * except the ones set. When connected to USB1.1 bandwidth this is important. - * DiB3000-MC/P can filter up to 32 PIDs + * DiB3000P/M-C can filter up to 32 PIDs */ #define DIB3000MC_REG_FIRST_PID ( 212) #define DIB3000MC_NUM_PIDS ( 32) diff -Nru a/drivers/media/dvb/frontends/dvb_dummy_fe.c b/drivers/media/dvb/frontends/dvb_dummy_fe.c --- a/drivers/media/dvb/frontends/dvb_dummy_fe.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/frontends/dvb_dummy_fe.c 2005-03-30 16:58:48 -08:00 @@ -123,7 +123,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c --- a/drivers/media/dvb/frontends/l64781.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/frontends/l64781.c 2005-03-30 16:58:49 -08:00 @@ -1,9 +1,8 @@ /* driver for LSI L64781 COFDM demodulator - Copyright (C) 2001 Holger Waechtler - for Convergence Integrated Media GmbH - Marko Kohtala + Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH + Marko Kohtala 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 @@ -560,7 +559,7 @@ error: if (reg0x3e >= 0) l64781_writereg (state, 0x3e, reg0x3e); /* restore reg 0x3e */ - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/l64781.h b/drivers/media/dvb/frontends/l64781.h --- a/drivers/media/dvb/frontends/l64781.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/frontends/l64781.h 2005-03-30 16:58:50 -08:00 @@ -1,9 +1,8 @@ /* driver for LSI L64781 COFDM demodulator - Copyright (C) 2001 Holger Waechtler - for Convergence Integrated Media GmbH - Marko Kohtala + Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH + Marko Kohtala 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 diff -Nru a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c --- a/drivers/media/dvb/frontends/mt312.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/mt312.c 2005-03-30 16:58:47 -08:00 @@ -641,8 +641,7 @@ return &state->frontend; error: - if (state) - kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c --- a/drivers/media/dvb/frontends/mt352.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/mt352.c 2005-03-30 16:58:47 -08:00 @@ -42,13 +42,11 @@ struct mt352_state { struct i2c_adapter* i2c; + struct dvb_frontend frontend; struct dvb_frontend_ops ops; /* configuration settings */ const struct mt352_config* config; - int s0,s1,s3; - - struct dvb_frontend frontend; }; static int debug; @@ -59,7 +57,7 @@ static int mt352_single_write(struct dvb_frontend *fe, u8 reg, u8 val) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; u8 buf[2] = { reg, val }; struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 }; @@ -170,7 +168,7 @@ static int mt352_set_parameters(struct dvb_frontend* fe, struct dvb_frontend_parameters *param) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; unsigned char buf[13]; static unsigned char tuner_go[] = { 0x5d, 0x01 }; static unsigned char fsm_go[] = { 0x5e, 0x01 }; @@ -293,18 +291,6 @@ mt352_calc_input_freq(state, buf+6); state->config->pll_set(fe, param, buf+8); -#if 0 /* FIXME: should be catched elsewhere ... */ - /* Only send the tuning request if the tuner doesn't have the requested - * parameters already set. Enhances tuning time and prevents stream - * breakup when retuning the same transponder. */ - for (i = 1; i < 13; i++) - if (buf[i] != mt352_read_register(state, i + 0x50)) - break; - if (13 == i) - /* no changes */ - return 0; -#endif - mt352_write(fe, buf, sizeof(buf)); if (state->config->no_tuner) { /* start decoding */ @@ -319,7 +305,7 @@ static int mt352_get_parameters(struct dvb_frontend* fe, struct dvb_frontend_parameters *param) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; u16 tps; u16 div; u8 trl; @@ -337,9 +323,7 @@ }; if ( (mt352_read_register(state,0x00) & 0xC0) != 0xC0 ) - { return -EINVAL; - } /* Use TPS_RECEIVED-registers, not the TPS_CURRENT-registers because * the mt352 sometimes works with the wrong parameters @@ -410,17 +394,11 @@ param->frequency = ( 500 * (div - IF_FREQUENCYx6) ) / 3 * 1000; if (trl == 0x72) - { op->bandwidth = BANDWIDTH_8_MHZ; - } else if (trl == 0x64) - { op->bandwidth = BANDWIDTH_7_MHZ; - } else - { op->bandwidth = BANDWIDTH_6_MHZ; - } if (mt352_read_register(state, STATUS_2) & 0x02) @@ -433,39 +411,38 @@ static int mt352_read_status(struct dvb_frontend* fe, fe_status_t* status) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; -#if 1 - int val; - - if (0 != mt352_read_register(state, INTERRUPT_0)) { - val = mt352_read_register(state, STATUS_0); - if (-1 != val) - state->s0 = val; - val = mt352_read_register(state, STATUS_1); - if (-1 != val) - state->s1 = val; - val = mt352_read_register(state, STATUS_3); - if (-1 != val) - state->s3 = val; - } -#else - state->s0 = mt352_read_register(state, STATUS_0); - state->s1 = mt352_read_register(state, STATUS_1); - state->s3 = mt352_read_register(state, STATUS_3); - if (-1 == state->s0 || -1 == state->s1 || -1 == state->s3) - return -EIO; -#endif + struct mt352_state* state = fe->demodulator_priv; + int s0, s1, s3; + + /* FIXME: + * + * The MT352 design manual from Zarlink states (page 46-47): + * + * Notes about the TUNER_GO register: + * + * If the Read_Tuner_Byte (bit-1) is activated, then the tuner status + * byte is copied from the tuner to the STATUS_3 register and + * completion of the read operation is indicated by bit-5 of the + * INTERRUPT_3 register. + */ + + if ((s0 = mt352_read_register(state, STATUS_0)) < 0) + return -EREMOTEIO; + if ((s1 = mt352_read_register(state, STATUS_1)) < 0) + return -EREMOTEIO; + if ((s3 = mt352_read_register(state, STATUS_3)) < 0) + return -EREMOTEIO; *status = 0; - if (state->s0 & (1 << 4)) + if (s0 & (1 << 4)) *status |= FE_HAS_CARRIER; - if (state->s0 & (1 << 1)) + if (s0 & (1 << 1)) *status |= FE_HAS_VITERBI; - if (state->s0 & (1 << 5)) + if (s0 & (1 << 5)) *status |= FE_HAS_LOCK; - if (state->s1 & (1 << 1)) + if (s1 & (1 << 1)) *status |= FE_HAS_SYNC; - if (state->s3 & (1 << 6)) + if (s3 & (1 << 6)) *status |= FE_HAS_SIGNAL; if ((*status & (FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC)) != @@ -477,7 +454,7 @@ static int mt352_read_ber(struct dvb_frontend* fe, u32* ber) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; *ber = (mt352_read_register (state, RS_ERR_CNT_2) << 16) | (mt352_read_register (state, RS_ERR_CNT_1) << 8) | @@ -488,10 +465,10 @@ static int mt352_read_signal_strength(struct dvb_frontend* fe, u16* strength) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; - u16 signal = (mt352_read_register (state, AGC_GAIN_3) << 8) | - (mt352_read_register (state, AGC_GAIN_2)); + u16 signal = ((mt352_read_register(state, AGC_GAIN_1) << 8) & 0x0f) | + (mt352_read_register(state, AGC_GAIN_0)); *strength = ~signal; return 0; @@ -499,7 +476,7 @@ static int mt352_read_snr(struct dvb_frontend* fe, u16* snr) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; u8 _snr = mt352_read_register (state, SNR); *snr = (_snr << 8) | _snr; @@ -509,7 +486,7 @@ static int mt352_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; *ucblocks = (mt352_read_register (state, RS_UBC_1) << 8) | (mt352_read_register (state, RS_UBC_0)); @@ -528,7 +505,7 @@ static int mt352_init(struct dvb_frontend* fe) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; static u8 mt352_reset_attach [] = { RESET, 0xC0 }; @@ -547,7 +524,7 @@ static void mt352_release(struct dvb_frontend* fe) { - struct mt352_state* state = (struct mt352_state*) fe->demodulator_priv; + struct mt352_state* state = fe->demodulator_priv; kfree(state); } @@ -559,7 +536,7 @@ struct mt352_state* state = NULL; /* allocate memory for the internal state */ - state = (struct mt352_state*) kmalloc(sizeof(struct mt352_state), GFP_KERNEL); + state = kmalloc(sizeof(struct mt352_state), GFP_KERNEL); if (state == NULL) goto error; memset(state,0,sizeof(*state)); @@ -577,7 +554,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/nxt2002.c b/drivers/media/dvb/frontends/nxt2002.c --- a/drivers/media/dvb/frontends/nxt2002.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/frontends/nxt2002.c 2005-03-30 16:58:49 -08:00 @@ -343,8 +343,21 @@ /* reset the agc now that tuning has been completed */ nxt2002_agc_reset(state); + + /* set target power level */ + switch (p->u.vsb.modulation) { + case QAM_64: + case QAM_256: + buf[0] = 0x74; + break; + case VSB_8: buf[0] = 0x70; + break; + default: + return -EINVAL; + break; + } i2c_writebytes(state,0x42,buf,1); /* configure sdm */ @@ -357,7 +370,20 @@ nxt2002_writereg_multibyte(state,0x58,buf,2); /* write sdmx input */ + switch (p->u.vsb.modulation) { + case QAM_64: + buf[0] = 0x68; + break; + case QAM_256: + buf[0] = 0x64; + break; + case VSB_8: buf[0] = 0x60; + break; + default: + return -EINVAL; + break; + } buf[1] = 0x00; nxt2002_writereg_multibyte(state,0x5C,buf,2); @@ -387,7 +413,20 @@ i2c_writebytes(state,0x41,buf,1); /* write agc ucgp0 */ + switch (p->u.vsb.modulation) { + case QAM_64: + buf[0] = 0x02; + break; + case QAM_256: + buf[0] = 0x03; + break; + case VSB_8: buf[0] = 0x00; + break; + default: + return -EINVAL; + break; + } i2c_writebytes(state,0x30,buf,1); /* write agc control reg */ @@ -520,7 +559,7 @@ if (!state->initialised) { /* request the firmware, this will block until someone uploads it */ - printk("nxt2002: Waiting for firmware upload...\n"); + printk("nxt2002: Waiting for firmware upload (%s)...\n", NXT2002_DEFAULT_FIRMWARE); ret = state->config->request_firmware(fe, &fw, NXT2002_DEFAULT_FIRMWARE); printk("nxt2002: Waiting for firmware upload(2)...\n"); if (ret) { @@ -534,6 +573,7 @@ release_firmware(fw); return ret; } + printk("nxt2002: firmware upload complete\n"); /* Put the micro into reset */ nxt2002_microcontroller_stop(state); @@ -621,7 +661,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } @@ -631,12 +671,12 @@ .name = "Nextwave nxt2002 VSB/QAM frontend", .type = FE_ATSC, .frequency_min = 54000000, - .frequency_max = 803000000, + .frequency_max = 860000000, /* stepsize is just a guess */ .frequency_stepsize = 166666, .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | - FE_CAN_8VSB + FE_CAN_8VSB | FE_CAN_QAM_64 | FE_CAN_QAM_256 }, .release = nxt2002_release, diff -Nru a/drivers/media/dvb/frontends/nxt6000.c b/drivers/media/dvb/frontends/nxt6000.c --- a/drivers/media/dvb/frontends/nxt6000.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/frontends/nxt6000.c 2005-03-30 16:58:49 -08:00 @@ -511,7 +511,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c --- a/drivers/media/dvb/frontends/or51132.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/frontends/or51132.c 2005-03-30 16:58:48 -08:00 @@ -422,7 +422,7 @@ } /* log10-1 table at .5 increments from 1 to 100.5 */ -unsigned int i100x20log10[] = { +static unsigned int i100x20log10[] = { 0, 352, 602, 795, 954, 1088, 1204, 1306, 1397, 1480, 1556, 1625, 1690, 1750, 1806, 1858, 1908, 1955, 2000, 2042, 2082, 2121, 2158, 2193, 2227, 2260, 2292, 2322, 2352, 2380, @@ -445,9 +445,9 @@ 3964, 3969, 3973, 3978, 3982, 3986, 3991, 3995, 4000, 4004, }; -unsigned int denom[] = {1,1,100,1000,10000,100000,1000000,10000000,100000000}; +static unsigned int denom[] = {1,1,100,1000,10000,100000,1000000,10000000,100000000}; -unsigned int i20Log10(unsigned short val) +static unsigned int i20Log10(unsigned short val) { unsigned int rntval = 100; unsigned int tmp = val; diff -Nru a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/media/dvb/frontends/or51211.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,631 @@ +/* + * Support for OR51211 (pcHDTV HD-2000) - VSB + * + * Copyright (C) 2005 Kirk Lapray + * + * Based on code from Jack Kelliher (kelliher@xmission.com) + * Copyright (C) 2002 & pcHDTV, inc. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * +*/ + +/* + * This driver needs external firmware. Please use the command + * "/Documentation/dvb/get_dvb_firmware or51211" to + * download/extract it, and then copy it to /usr/lib/hotplug/firmware. + */ +#define OR51211_DEFAULT_FIRMWARE "dvb-fe-or51211.fw" + +#include +#include +#include +#include +#include +#include + +#include "dvb_frontend.h" +#include "or51211.h" + +static int debug; +#define dprintk(args...) \ + do { \ + if (debug) printk(KERN_DEBUG "or51211: " args); \ + } while (0) + +static u8 run_buf[] = {0x7f,0x01}; +static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC + +struct or51211_state { + + struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; + + /* Configuration settings */ + const struct or51211_config* config; + + struct dvb_frontend frontend; + struct bt878* bt; + + /* Demodulator private data */ + u8 initialized:1; + + /* Tuner private data */ + u32 current_frequency; +}; + +static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf, + int len) +{ + int err; + struct i2c_msg msg; + msg.addr = reg; + msg.flags = 0; + msg.len = len; + msg.buf = buf; + + if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { + printk(KERN_WARNING "or51211: i2c_writebytes error " + "(addr %02x, err == %i)\n", reg, err); + return -EREMOTEIO; + } + + return 0; +} + +static u8 i2c_readbytes (struct or51211_state* state, u8 reg, u8* buf, int len) +{ + int err; + struct i2c_msg msg; + msg.addr = reg; + msg.flags = I2C_M_RD; + msg.len = len; + msg.buf = buf; + + if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { + printk(KERN_WARNING "or51211: i2c_readbytes error " + "(addr %02x, err == %i)\n", reg, err); + return -EREMOTEIO; + } + + return 0; +} + +static int or51211_load_firmware (struct dvb_frontend* fe, + const struct firmware *fw) +{ + struct or51211_state* state = fe->demodulator_priv; + u8 tudata[585]; + int i; + + dprintk("Firmware is %d bytes\n",fw->size); + + /* Get eprom data */ + tudata[0] = 17; + if (i2c_writebytes(state,0x50,tudata,1)) { + printk(KERN_WARNING "or51211:load_firmware error eprom addr\n"); + return -1; + } + if (i2c_readbytes(state,0x50,&tudata[145],192)) { + printk(KERN_WARNING "or51211: load_firmware error eprom\n"); + return -1; + } + + /* Create firmware buffer */ + for (i = 0; i < 145; i++) + tudata[i] = fw->data[i]; + + for (i = 0; i < 248; i++) + tudata[i+337] = fw->data[145+i]; + + state->config->reset(fe); + + if (i2c_writebytes(state,state->config->demod_address,tudata,585)) { + printk(KERN_WARNING "or51211: load_firmware error 1\n"); + return -1; + } + msleep(1); + + if (i2c_writebytes(state,state->config->demod_address, + &fw->data[393],8125)) { + printk(KERN_WARNING "or51211: load_firmware error 2\n"); + return -1; + } + msleep(1); + + if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) { + printk(KERN_WARNING "or51211: load_firmware error 3\n"); + return -1; + } + + /* Wait at least 5 msec */ + msleep(10); + if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) { + printk(KERN_WARNING "or51211: load_firmware error 4\n"); + return -1; + } + msleep(10); + + printk("or51211: Done.\n"); + return 0; +}; + +static int or51211_setmode(struct dvb_frontend* fe, int mode) +{ + struct or51211_state* state = fe->demodulator_priv; + u8 rec_buf[14]; + + state->config->setmode(fe, mode); + + if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) { + printk(KERN_WARNING "or51211: setmode error 1\n"); + return -1; + } + + /* Wait at least 5 msec */ + msleep(10); + if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) { + printk(KERN_WARNING "or51211: setmode error 2\n"); + return -1; + } + + msleep(10); + + /* Set operation mode in Receiver 1 register; + * type 1: + * data 0x50h Automatic sets receiver channel conditions + * Automatic NTSC rejection filter + * Enable MPEG serial data output + * MPEG2tr + * High tuner phase noise + * normal +/-150kHz Carrier acquisition range + */ + if (i2c_writebytes(state,state->config->demod_address,cmd_buf,3)) { + printk(KERN_WARNING "or51211: setmode error 3\n"); + return -1; + } + + rec_buf[0] = 0x04; + rec_buf[1] = 0x00; + rec_buf[2] = 0x03; + rec_buf[3] = 0x00; + msleep(20); + if (i2c_writebytes(state,state->config->demod_address,rec_buf,3)) { + printk(KERN_WARNING "or51211: setmode error 5\n"); + } + msleep(3); + if (i2c_readbytes(state,state->config->demod_address,&rec_buf[10],2)) { + printk(KERN_WARNING "or51211: setmode error 6"); + return -1; + } + dprintk("setmode rec status %02x %02x\n",rec_buf[10],rec_buf[11]); + + return 0; +} + +static int or51211_set_parameters(struct dvb_frontend* fe, + struct dvb_frontend_parameters *param) +{ + struct or51211_state* state = fe->demodulator_priv; + u32 freq = 0; + u16 tunerfreq = 0; + u8 buf[4]; + + /* Change only if we are actually changing the channel */ + if (state->current_frequency != param->frequency) { + freq = 44000 + (param->frequency/1000); + tunerfreq = freq * 16/1000; + + dprintk("set_parameters frequency = %d (tunerfreq = %d)\n", + param->frequency,tunerfreq); + + buf[0] = (tunerfreq >> 8) & 0x7F; + buf[1] = (tunerfreq & 0xFF); + buf[2] = 0x8E; + + if (param->frequency < 157250000) { + buf[3] = 0xA0; + dprintk("set_parameters VHF low range\n"); + } else if (param->frequency < 454000000) { + buf[3] = 0x90; + dprintk("set_parameters VHF high range\n"); + } else { + buf[3] = 0x30; + dprintk("set_parameters UHF range\n"); + } + dprintk("set_parameters tuner bytes: 0x%02x 0x%02x " + "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]); + + if (i2c_writebytes(state,0xC2>>1,buf,4)) + printk(KERN_WARNING "or51211:set_parameters error " + "writing to tuner\n"); + + /* Set to ATSC mode */ + or51211_setmode(fe,0); + + /* Update current frequency */ + state->current_frequency = param->frequency; + } + return 0; +} + +static int or51211_read_status(struct dvb_frontend* fe, fe_status_t* status) +{ + struct or51211_state* state = fe->demodulator_priv; + unsigned char rec_buf[2]; + unsigned char snd_buf[] = {0x04,0x00,0x03,0x00}; + *status = 0; + + /* Receiver Status */ + if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) { + printk(KERN_WARNING "or51132: read_status write error\n"); + return -1; + } + msleep(3); + if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) { + printk(KERN_WARNING "or51132: read_status read error\n"); + return -1; + } + dprintk("read_status %x %x\n",rec_buf[0],rec_buf[1]); + + if (rec_buf[0] & 0x01) { /* Receiver Lock */ + *status |= FE_HAS_SIGNAL; + *status |= FE_HAS_CARRIER; + *status |= FE_HAS_VITERBI; + *status |= FE_HAS_SYNC; + *status |= FE_HAS_LOCK; + } + return 0; +} + +/* log10-1 table at .5 increments from 1 to 100.5 */ +static unsigned int i100x20log10[] = { + 0, 352, 602, 795, 954, 1088, 1204, 1306, 1397, 1480, + 1556, 1625, 1690, 1750, 1806, 1858, 1908, 1955, 2000, 2042, + 2082, 2121, 2158, 2193, 2227, 2260, 2292, 2322, 2352, 2380, + 2408, 2434, 2460, 2486, 2510, 2534, 2557, 2580, 2602, 2623, + 2644, 2664, 2684, 2704, 2723, 2742, 2760, 2778, 2795, 2813, + 2829, 2846, 2862, 2878, 2894, 2909, 2924, 2939, 2954, 2968, + 2982, 2996, 3010, 3023, 3037, 3050, 3062, 3075, 3088, 3100, + 3112, 3124, 3136, 3148, 3159, 3170, 3182, 3193, 3204, 3214, + 3225, 3236, 3246, 3256, 3266, 3276, 3286, 3296, 3306, 3316, + 3325, 3334, 3344, 3353, 3362, 3371, 3380, 3389, 3397, 3406, + 3415, 3423, 3432, 3440, 3448, 3456, 3464, 3472, 3480, 3488, + 3496, 3504, 3511, 3519, 3526, 3534, 3541, 3549, 3556, 3563, + 3570, 3577, 3584, 3591, 3598, 3605, 3612, 3619, 3625, 3632, + 3639, 3645, 3652, 3658, 3665, 3671, 3677, 3683, 3690, 3696, + 3702, 3708, 3714, 3720, 3726, 3732, 3738, 3744, 3750, 3755, + 3761, 3767, 3772, 3778, 3784, 3789, 3795, 3800, 3806, 3811, + 3816, 3822, 3827, 3832, 3838, 3843, 3848, 3853, 3858, 3863, + 3868, 3874, 3879, 3884, 3888, 3893, 3898, 3903, 3908, 3913, + 3918, 3922, 3927, 3932, 3936, 3941, 3946, 3950, 3955, 3960, + 3964, 3969, 3973, 3978, 3982, 3986, 3991, 3995, 4000, 4004, +}; + +static unsigned int denom[] = {1,1,100,1000,10000,100000,1000000,10000000,100000000}; + +static unsigned int i20Log10(unsigned short val) +{ + unsigned int rntval = 100; + unsigned int tmp = val; + unsigned int exp = 1; + + while(tmp > 100) {tmp /= 100; exp++;} + + val = (2 * val)/denom[exp]; + if (exp > 1) rntval = 2000*exp; + + rntval += i100x20log10[val]; + return rntval; +} + +static int or51211_read_signal_strength(struct dvb_frontend* fe, u16* strength) +{ + struct or51211_state* state = fe->demodulator_priv; + u8 rec_buf[2]; + u8 snd_buf[4]; + u8 snr_equ; + + /* SNR after Equalizer */ + snd_buf[0] = 0x04; + snd_buf[1] = 0x00; + snd_buf[2] = 0x04; + snd_buf[3] = 0x00; + + if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) { + printk(KERN_WARNING "or51211: read_status write error\n"); + return -1; + } + msleep(3); + if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) { + printk(KERN_WARNING "or51211: read_status read error\n"); + return -1; + } + snr_equ = rec_buf[0] & 0xff; + + /* The value reported back from the frontend will be FFFF=100% 0000=0% */ + *strength = (((5334 - i20Log10(snr_equ))/3+5)*65535)/1000; + + dprintk("read_signal_strength %i\n",*strength); + + return 0; +} + +static int or51211_read_snr(struct dvb_frontend* fe, u16* snr) +{ + struct or51211_state* state = fe->demodulator_priv; + u8 rec_buf[2]; + u8 snd_buf[4]; + + /* SNR after Equalizer */ + snd_buf[0] = 0x04; + snd_buf[1] = 0x00; + snd_buf[2] = 0x04; + snd_buf[3] = 0x00; + + if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) { + printk(KERN_WARNING "or51211: read_status write error\n"); + return -1; + } + msleep(3); + if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) { + printk(KERN_WARNING "or51211: read_status read error\n"); + return -1; + } + *snr = rec_buf[0] & 0xff; + + dprintk("read_snr %i\n",*snr); + + return 0; +} + +static int or51211_read_ber(struct dvb_frontend* fe, u32* ber) +{ + *ber = -ENOSYS; + return 0; +} + +static int or51211_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) +{ + *ucblocks = -ENOSYS; + return 0; +} + +static int or51211_sleep(struct dvb_frontend* fe) +{ + return 0; +} + +static int or51211_init(struct dvb_frontend* fe) +{ + struct or51211_state* state = fe->demodulator_priv; + const struct or51211_config* config = state->config; + const struct firmware* fw; + unsigned char get_ver_buf[] = {0x04,0x00,0x30,0x00,0x00}; + unsigned char rec_buf[14]; + int ret,i; + + if (!state->initialized) { + /* Request the firmware, this will block until it uploads */ + printk(KERN_INFO "or51211: Waiting for firmware upload " + "(%s)...\n", OR51211_DEFAULT_FIRMWARE); + ret = config->request_firmware(fe, &fw, + OR51211_DEFAULT_FIRMWARE); + printk(KERN_INFO "or51211:Got Hotplug firmware\n"); + if (ret) { + printk(KERN_WARNING "or51211: No firmware uploaded " + "(timeout or file not found?)\n"); + return ret; + } + + ret = or51211_load_firmware(fe, fw); + if (ret) { + printk(KERN_WARNING "or51211: Writing firmware to " + "device failed!\n"); + release_firmware(fw); + return ret; + } + printk(KERN_INFO "or51211: Firmware upload complete.\n"); + + /* Set operation mode in Receiver 1 register; + * type 1: + * data 0x50h Automatic sets receiver channel conditions + * Automatic NTSC rejection filter + * Enable MPEG serial data output + * MPEG2tr + * High tuner phase noise + * normal +/-150kHz Carrier acquisition range + */ + if (i2c_writebytes(state,state->config->demod_address, + cmd_buf,3)) { + printk(KERN_WARNING "or51211: Load DVR Error 5\n"); + return -1; + } + + /* Read back ucode version to besure we loaded correctly */ + /* and are really up and running */ + rec_buf[0] = 0x04; + rec_buf[1] = 0x00; + rec_buf[2] = 0x03; + rec_buf[3] = 0x00; + msleep(30); + if (i2c_writebytes(state,state->config->demod_address, + rec_buf,3)) { + printk(KERN_WARNING "or51211: Load DVR Error A\n"); + return -1; + } + msleep(3); + if (i2c_readbytes(state,state->config->demod_address, + &rec_buf[10],2)) { + printk(KERN_WARNING "or51211: Load DVR Error B\n"); + return -1; + } + + rec_buf[0] = 0x04; + rec_buf[1] = 0x00; + rec_buf[2] = 0x01; + rec_buf[3] = 0x00; + msleep(20); + if (i2c_writebytes(state,state->config->demod_address, + rec_buf,3)) { + printk(KERN_WARNING "or51211: Load DVR Error C\n"); + return -1; + } + msleep(3); + if (i2c_readbytes(state,state->config->demod_address, + &rec_buf[12],2)) { + printk(KERN_WARNING "or51211: Load DVR Error D\n"); + return -1; + } + + for (i = 0; i < 8; i++) + rec_buf[i]=0xed; + + for (i = 0; i < 5; i++) { + msleep(30); + get_ver_buf[4] = i+1; + if (i2c_writebytes(state,state->config->demod_address, + get_ver_buf,5)) { + printk(KERN_WARNING "or51211:Load DVR Error 6" + " - %d\n",i); + return -1; + } + msleep(3); + + if (i2c_readbytes(state,state->config->demod_address, + &rec_buf[i*2],2)) { + printk(KERN_WARNING "or51211:Load DVR Error 7" + " - %d\n",i); + return -1; + } + /* If we didn't receive the right index, try again */ + if ((int)rec_buf[i*2+1]!=i+1){ + i--; + } + } + dprintk("read_fwbits %x %x %x %x %x %x %x %x %x %x\n", + rec_buf[0], rec_buf[1], rec_buf[2], rec_buf[3], + rec_buf[4], rec_buf[5], rec_buf[6], rec_buf[7], + rec_buf[8], rec_buf[9]); + + printk(KERN_INFO "or51211: ver TU%02x%02x%02x VSB mode %02x" + " Status %02x\n", + rec_buf[2], rec_buf[4],rec_buf[6], + rec_buf[12],rec_buf[10]); + + rec_buf[0] = 0x04; + rec_buf[1] = 0x00; + rec_buf[2] = 0x03; + rec_buf[3] = 0x00; + msleep(20); + if (i2c_writebytes(state,state->config->demod_address, + rec_buf,3)) { + printk(KERN_WARNING "or51211: Load DVR Error 8\n"); + return -1; + } + msleep(20); + if (i2c_readbytes(state,state->config->demod_address, + &rec_buf[8],2)) { + printk(KERN_WARNING "or51211: Load DVR Error 9\n"); + return -1; + } + state->initialized = 1; + } + + return 0; +} + +static int or51211_get_tune_settings(struct dvb_frontend* fe, + struct dvb_frontend_tune_settings* fesettings) +{ + fesettings->min_delay_ms = 500; + fesettings->step_size = 0; + fesettings->max_drift = 0; + return 0; +} + +static void or51211_release(struct dvb_frontend* fe) +{ + struct or51211_state* state = fe->demodulator_priv; + state->config->sleep(fe); + kfree(state); +} + +static struct dvb_frontend_ops or51211_ops; + +struct dvb_frontend* or51211_attach(const struct or51211_config* config, + struct i2c_adapter* i2c) +{ + struct or51211_state* state = NULL; + + /* Allocate memory for the internal state */ + state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL); + if (state == NULL) + goto error; + + /* Setup the state */ + state->config = config; + state->i2c = i2c; + memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); + state->initialized = 0; + state->current_frequency = 0; + + /* Create dvb_frontend */ + state->frontend.ops = &state->ops; + state->frontend.demodulator_priv = state; + return &state->frontend; + +error: + kfree(state); + return NULL; +} + +static struct dvb_frontend_ops or51211_ops = { + + .info = { + .name = "Oren OR51211 VSB Frontend", + .type = FE_ATSC, + .frequency_min = 44000000, + .frequency_max = 958000000, + .frequency_stepsize = 166666, + .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | + FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | + FE_CAN_8VSB + }, + + .release = or51211_release, + + .init = or51211_init, + .sleep = or51211_sleep, + + .set_frontend = or51211_set_parameters, + .get_tune_settings = or51211_get_tune_settings, + + .read_status = or51211_read_status, + .read_ber = or51211_read_ber, + .read_signal_strength = or51211_read_signal_strength, + .read_snr = or51211_read_snr, + .read_ucblocks = or51211_read_ucblocks, +}; + +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); + +MODULE_DESCRIPTION("Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver"); +MODULE_AUTHOR("Kirk Lapray"); +MODULE_LICENSE("GPL"); + +EXPORT_SYMBOL(or51211_attach); + diff -Nru a/drivers/media/dvb/frontends/or51211.h b/drivers/media/dvb/frontends/or51211.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/media/dvb/frontends/or51211.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,44 @@ +/* + * Support for OR51211 (pcHDTV HD-2000) - VSB + * + * Copyright (C) 2005 Kirk Lapray + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * +*/ + +#ifndef OR51211_H +#define OR51211_H + +#include +#include + +struct or51211_config +{ + /* The demodulator's i2c address */ + u8 demod_address; + + /* Request firmware for device */ + int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); + void (*setmode)(struct dvb_frontend * fe, int mode); + void (*reset)(struct dvb_frontend * fe); + void (*sleep)(struct dvb_frontend * fe); +}; + +extern struct dvb_frontend* or51211_attach(const struct or51211_config* config, + struct i2c_adapter* i2c); + +#endif // OR51211_H + diff -Nru a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c --- a/drivers/media/dvb/frontends/sp8870.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/frontends/sp8870.c 2005-03-30 16:58:50 -08:00 @@ -570,7 +570,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c --- a/drivers/media/dvb/frontends/sp887x.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/frontends/sp887x.c 2005-03-30 16:58:49 -08:00 @@ -564,7 +564,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c --- a/drivers/media/dvb/frontends/stv0297.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/stv0297.c 2005-03-30 16:58:47 -08:00 @@ -758,8 +758,7 @@ return &state->frontend; error: - if (state) - kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c --- a/drivers/media/dvb/frontends/stv0299.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/frontends/stv0299.c 2005-03-30 16:58:50 -08:00 @@ -675,7 +675,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c --- a/drivers/media/dvb/frontends/tda10021.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/media/dvb/frontends/tda10021.c 2005-03-30 16:58:51 -08:00 @@ -61,12 +61,12 @@ #define FIN (XIN >> 4) -int tda10021_inittab_size = 0x40; +static int tda10021_inittab_size = 0x40; static u8 tda10021_inittab[0x40]= { 0x73, 0x6a, 0x23, 0x0a, 0x02, 0x37, 0x77, 0x1a, 0x37, 0x6a, 0x17, 0x8a, 0x1e, 0x86, 0x43, 0x40, - 0xb8, 0x3f, 0xa1, 0x00, 0xcd, 0x01, 0x00, 0xff, + 0xb8, 0x3f, 0xa0, 0x00, 0xcd, 0x01, 0x00, 0xff, 0x11, 0x00, 0x7c, 0x31, 0x30, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x33, 0x11, 0x0d, 0x95, 0x08, 0x58, @@ -420,7 +420,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c --- a/drivers/media/dvb/frontends/tda1004x.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/frontends/tda1004x.c 2005-03-30 16:58:50 -08:00 @@ -353,7 +353,7 @@ if (tda1004x_check_upload_ok(state, 0x2c) == 0) return 0; /* request the firmware, this will block until someone uploads it */ - printk("tda1004x: waiting for firmware upload...\n"); + printk("tda1004x: waiting for firmware upload (%s)...\n", TDA10045_DEFAULT_FIRMWARE); ret = state->config->request_firmware(fe, &fw, TDA10045_DEFAULT_FIRMWARE); if (ret) { printk("tda1004x: no firmware upload (timeout or file not found?)\n"); @@ -372,6 +372,7 @@ ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10045H_FWPAGE, TDA10045H_CODE_IN); if (ret) return ret; + printk("tda1004x: firmware upload complete\n"); /* wait for DSP to initialise */ /* DSPREADY doesn't seem to work on the TDA10045H */ @@ -396,7 +397,7 @@ if (tda1004x_check_upload_ok(state, 0x20) == 0) return 0; /* request the firmware, this will block until someone uploads it */ - printk("tda1004x: waiting for firmware upload...\n"); + printk("tda1004x: waiting for firmware upload (%s)...\n", TDA10046_DEFAULT_FIRMWARE); ret = state->config->request_firmware(fe, &fw, TDA10046_DEFAULT_FIRMWARE); if (ret) { printk("tda1004x: no firmware upload (timeout or file not found?)\n"); @@ -414,6 +415,7 @@ ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN); if (ret) return ret; + printk("tda1004x: firmware upload complete\n"); /* wait for DSP to initialise */ timeout = jiffies + HZ; @@ -1095,7 +1097,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c --- a/drivers/media/dvb/frontends/tda8083.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/frontends/tda8083.c 2005-03-30 16:58:48 -08:00 @@ -405,7 +405,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/tda80xx.c b/drivers/media/dvb/frontends/tda80xx.c --- a/drivers/media/dvb/frontends/tda80xx.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/frontends/tda80xx.c 2005-03-30 16:58:49 -08:00 @@ -683,7 +683,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c --- a/drivers/media/dvb/frontends/ves1820.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/frontends/ves1820.c 2005-03-30 16:58:48 -08:00 @@ -404,7 +404,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/frontends/ves1x93.c b/drivers/media/dvb/frontends/ves1x93.c --- a/drivers/media/dvb/frontends/ves1x93.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/frontends/ves1x93.c 2005-03-30 16:58:47 -08:00 @@ -175,7 +175,7 @@ { u32 BDR; u32 ratio; - u8 ADCONF, FCONF, FNR; + u8 ADCONF, FCONF, FNR, AGCR; u32 BDRI; u32 tmp; u32 FIN; @@ -243,10 +243,16 @@ ves1x93_writereg (state, 0x20, ADCONF); ves1x93_writereg (state, 0x21, FCONF); + AGCR = state->init_1x93_tab[0x05]; + if (state->config->invert_pwm) + AGCR |= 0x20; + if (srate < 6000000) - ves1x93_writereg (state, 0x05, state->init_1x93_tab[0x05] | 0x80); + AGCR |= 0x80; else - ves1x93_writereg (state, 0x05, state->init_1x93_tab[0x05] & 0x7f); + AGCR &= ~0x80; + + ves1x93_writereg (state, 0x05, AGCR); /* ves1993 hates this, will lose lock */ if (state->demod_type != DEMOD_VES1993) @@ -491,7 +497,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig --- a/drivers/media/dvb/ttpci/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/ttpci/Kconfig 2005-03-30 16:58:47 -08:00 @@ -10,6 +10,7 @@ select DVB_TDA8083 select DVB_SP8870 select DVB_STV0297 + select DVB_L64781 help Support for SAA7146 and AV7110 based DVB cards as produced by Fujitsu-Siemens, Technotrend, Hauppauge and others. diff -Nru a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c --- a/drivers/media/dvb/ttpci/av7110.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/ttpci/av7110.c 2005-03-30 16:58:49 -08:00 @@ -188,6 +188,15 @@ recover_arm(av7110); } +static void av7110_arm_sync(struct av7110 *av7110) +{ + av7110->arm_rmmod = 1; + wake_up_interruptible(&av7110->arm_wait); + + while (av7110->arm_thread) + msleep(1); +} + static int arm_thread(void *data) { struct av7110 *av7110 = data; @@ -1461,6 +1470,11 @@ #ifdef CONFIG_DVB_AV7110_FIRMWARE_FILE #include "av7110_firm.h" +static void put_firmware(struct av7110* av7110) +{ + av7110->bin_fw = NULL; +} + static inline int get_firmware(struct av7110* av7110) { av7110->bin_fw = dvb_ttpci_fw; @@ -1468,6 +1482,11 @@ return check_firmware(av7110); } #else +static void put_firmware(struct av7110* av7110) +{ + vfree(av7110->bin_fw); +} + static int get_firmware(struct av7110* av7110) { int ret; @@ -1834,6 +1853,45 @@ }; + +static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +{ + struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + u32 div; + u8 cfg, cpump, band_select; + u8 data[4]; + struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; + + div = (36125000 + params->frequency) / 166666; + + cfg = 0x88; + + if (params->frequency < 175000000) cpump = 2; + else if (params->frequency < 390000000) cpump = 1; + else if (params->frequency < 470000000) cpump = 2; + else if (params->frequency < 750000000) cpump = 1; + else cpump = 3; + + if (params->frequency < 175000000) band_select = 0x0e; + else if (params->frequency < 470000000) band_select = 0x05; + else band_select = 0x03; + + data[0] = (div >> 8) & 0x7f; + data[1] = div & 0xff; + data[2] = ((div >> 10) & 0x60) | cfg; + data[3] = (cpump << 6) | band_select; + + if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; + return 0; +} + +static struct l64781_config grundig_29504_401_config = { + .demod_address = 0x55, + .pll_set = grundig_29504_401_pll_set, +}; + + + static void av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status) { int synced = (status & FE_HAS_LOCK) ? 1 : 0; @@ -1960,8 +2018,10 @@ return pwm; } -static void frontend_init(struct av7110 *av7110) +static int frontend_init(struct av7110 *av7110) { + int ret; + if (av7110->dev->pci->subsystem_vendor == 0x110a) { switch(av7110->dev->pci->subsystem_device) { case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) @@ -2039,6 +2099,11 @@ } break; + case 0x0008: // Hauppauge/TT DVB-T + + av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); + break; + case 0x000A: // Hauppauge/TT Nexus-CA rev1.X av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap, 0x7b); @@ -2054,7 +2119,9 @@ } } - if (av7110->fe == NULL) { + if (!av7110->fe) { + /* FIXME: propagate the failure code from the lower layers */ + ret = -ENOMEM; printk("dvb-ttpci: A frontend driver was not found for device %04x/%04x subsystem %04x/%04x\n", av7110->dev->pci->vendor, av7110->dev->pci->device, @@ -2071,13 +2138,15 @@ FE_FUNC_OVERRIDE(av7110->fe->ops->dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); FE_FUNC_OVERRIDE(av7110->fe->ops->set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); - if (dvb_register_frontend(av7110->dvb_adapter, av7110->fe)) { + ret = dvb_register_frontend(av7110->dvb_adapter, av7110->fe); + if (ret < 0) { printk("av7110: Frontend registration failed!\n"); if (av7110->fe->ops->release) av7110->fe->ops->release(av7110->fe); av7110->fe = NULL; } } + return ret; } /* Budgetpatch note: @@ -2147,10 +2216,10 @@ */ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) { - struct av7110 *av7110 = NULL; - int length = TS_WIDTH * TS_HEIGHT; - int ret = 0; - int count = 0; + const int length = TS_WIDTH * TS_HEIGHT; + struct pci_dev *pdev = dev->pci; + struct av7110 *av7110; + int ret, count = 0; dprintk(4, "dev: %p\n", dev); @@ -2244,7 +2313,8 @@ } /* prepare the av7110 device struct */ - if (!(av7110 = kmalloc (sizeof (struct av7110), GFP_KERNEL))) { + av7110 = kmalloc(sizeof(struct av7110), GFP_KERNEL); + if (!av7110) { dprintk(1, "out of memory\n"); return -ENOMEM; } @@ -2255,12 +2325,14 @@ av7110->dev = dev; dev->ext_priv = av7110; - if ((ret = get_firmware(av7110))) { - kfree(av7110); - return ret; - } + ret = get_firmware(av7110); + if (ret < 0) + goto err_kfree_0; - dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, THIS_MODULE); + ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, + THIS_MODULE); + if (ret < 0) + goto err_put_firmware_1; /* the Siemens DVB needs this if you want to have the i2c chips get recognized before the main driver is fully loaded */ @@ -2275,21 +2347,21 @@ saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */ - if (i2c_add_adapter(&av7110->i2c_adap) < 0) { -err_no_mem: - dvb_unregister_adapter (av7110->dvb_adapter); - kfree(av7110); - return -ENOMEM; - } + ret = i2c_add_adapter(&av7110->i2c_adap); + if (ret < 0) + goto err_dvb_unregister_adapter_2; - ttpci_eeprom_parse_mac(&av7110->i2c_adap, av7110->dvb_adapter->proposed_mac); + ttpci_eeprom_parse_mac(&av7110->i2c_adap, + av7110->dvb_adapter->proposed_mac); + ret = -ENOMEM; if (budgetpatch) { spin_lock_init(&av7110->feedlock1); - av7110->grabbing = saa7146_vmalloc_build_pgtable( - dev->pci, length, &av7110->pt); + av7110->grabbing = saa7146_vmalloc_build_pgtable(pdev, length, + &av7110->pt); if (!av7110->grabbing) - goto err_no_mem; + goto err_i2c_del_3; + saa7146_write(dev, PCI_BT_V1, 0x1c1f101f); saa7146_write(dev, BCS_CTRL, 0x80400040); /* set dd1 stream a & b */ @@ -2396,43 +2468,43 @@ av7110->arm_thread = NULL; /* allocate and init buffers */ - av7110->debi_virt = pci_alloc_consistent(dev->pci, 8192, - &av7110->debi_bus); - if (!av7110->debi_virt) { - ret = -ENOMEM; - goto err; - } + av7110->debi_virt = pci_alloc_consistent(pdev, 8192, &av7110->debi_bus); + if (!av7110->debi_virt) + goto err_saa71466_vfree_4; + av7110->iobuf = vmalloc(AVOUTLEN+AOUTLEN+BMPLEN+4*IPACKS); - if (!av7110->iobuf) { - ret = -ENOMEM; - goto err; - } + if (!av7110->iobuf) + goto err_pci_free_5; - av7110_av_init(av7110); + ret = av7110_av_init(av7110); + if (ret < 0) + goto err_iobuf_vfree_6; /* init BMP buffer */ av7110->bmpbuf = av7110->iobuf+AVOUTLEN+AOUTLEN; init_waitqueue_head(&av7110->bmpq); - av7110_ca_init(av7110); + ret = av7110_ca_init(av7110); + if (ret < 0) + goto err_av7110_av_exit_7; /* load firmware into AV7110 cards */ - av7110_bootarm(av7110); - if (av7110_firmversion(av7110)) { - ret = -EIO; - goto err2; - } + ret = av7110_bootarm(av7110); + if (ret < 0) + goto err_av7110_ca_exit_8; + + ret = av7110_firmversion(av7110); + if (ret < 0) + goto err_stop_arm_9; if (FW_VERSION(av7110->arm_app)<0x2501) printk ("dvb-ttpci: Warning, firmware version 0x%04x is too old. " "System might be unstable!\n", FW_VERSION(av7110->arm_app)); - if (kernel_thread(arm_thread, (void *) av7110, 0) < 0) { - printk("dvb-ttpci: failed to start arm_mon kernel thread @ card %d\n", - av7110->dvb_adapter->num); - goto err2; - } + ret = kernel_thread(arm_thread, (void *) av7110, 0); + if (ret < 0) + goto err_stop_arm_9; /* set initial volume in mixer struct */ av7110->mixer.volume_left = volume; @@ -2440,56 +2512,65 @@ init_av7110_av(av7110); - av7110_register(av7110); + ret = av7110_register(av7110); + if (ret < 0) + goto err_arm_thread_stop_10; /* special case DVB-C: these cards have an analog tuner plus need some special handling, so we have separate saa7146_ext_vv data for these... */ ret = av7110_init_v4l(av7110); - - if (ret) - goto err3; + if (ret < 0) + goto err_av7110_unregister_11; av7110->dvb_adapter->priv = av7110; - frontend_init(av7110); + ret = frontend_init(av7110); + if (ret < 0) + goto err_av7110_exit_v4l_12; +#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) + av7110_ir_init(); +#endif printk(KERN_INFO "dvb-ttpci: found av7110-%d.\n", av7110_num); - av7110->device_initialized = 1; av7110_num++; - return 0; +out: + return ret; -err3: - av7110->arm_rmmod = 1; - wake_up_interruptible(&av7110->arm_wait); - while (av7110->arm_thread) - msleep(1); -err2: +err_av7110_exit_v4l_12: + av7110_exit_v4l(av7110); +err_av7110_unregister_11: + dvb_unregister(av7110); +err_arm_thread_stop_10: + av7110_arm_sync(av7110); +err_stop_arm_9: + /* Nothing to do. Rejoice. */ +err_av7110_ca_exit_8: av7110_ca_exit(av7110); +err_av7110_av_exit_7: av7110_av_exit(av7110); -err: +err_iobuf_vfree_6: + vfree(av7110->iobuf); +err_pci_free_5: + pci_free_consistent(pdev, 8192, av7110->debi_virt, av7110->debi_bus); +err_saa71466_vfree_4: + if (!av7110->grabbing) + saa7146_pgtable_free(pdev, &av7110->pt); +err_i2c_del_3: i2c_del_adapter(&av7110->i2c_adap); - +err_dvb_unregister_adapter_2: dvb_unregister_adapter(av7110->dvb_adapter); - - if (NULL != av7110->debi_virt) - pci_free_consistent(dev->pci, 8192, av7110->debi_virt, av7110->debi_bus); - if (NULL != av7110->iobuf) - vfree(av7110->iobuf); - if (NULL != av7110 ) { +err_put_firmware_1: + put_firmware(av7110); +err_kfree_0: kfree(av7110); - } - - return ret; + goto out; } static int av7110_detach(struct saa7146_dev* saa) { - struct av7110 *av7110 = (struct av7110*)saa->ext_priv; + struct av7110 *av7110 = saa->ext_priv; dprintk(4, "%p\n", av7110); - if (!av7110->device_initialized ) - return 0; - if (budgetpatch) { /* Disable RPS1 */ saa7146_write(saa, MC1, MASK_29); @@ -2504,11 +2585,7 @@ } av7110_exit_v4l(av7110); - av7110->arm_rmmod=1; - wake_up_interruptible(&av7110->arm_wait); - - while (av7110->arm_thread) - msleep(1); + av7110_arm_sync(av7110); tasklet_kill(&av7110->debi_tasklet); tasklet_kill(&av7110->gpio_tasklet); @@ -2530,11 +2607,11 @@ dvb_unregister_adapter (av7110->dvb_adapter); av7110_num--; -#ifndef CONFIG_DVB_AV7110_FIRMWARE_FILE - if (av7110->bin_fw) - vfree(av7110->bin_fw); -#endif + + put_firmware(av7110); + kfree(av7110); + saa->ext_priv = NULL; return 0; @@ -2596,6 +2673,7 @@ MAKE_AV7110_INFO(ttc_2_X, "Technotrend/Hauppauge WinTV DVB-C rev2.X"); MAKE_AV7110_INFO(tts_2_X, "Technotrend/Hauppauge WinTV Nexus-S rev2.X"); MAKE_AV7110_INFO(tts_1_3se, "Technotrend/Hauppauge WinTV DVB-S rev1.3 SE"); +MAKE_AV7110_INFO(ttt, "Technotrend/Hauppauge DVB-T"); MAKE_AV7110_INFO(fsc, "Fujitsu Siemens DVB-C"); MAKE_AV7110_INFO(fss, "Fujitsu Siemens DVB-S rev1.6"); @@ -2608,10 +2686,10 @@ MAKE_EXTENSION_PCI(fsc, 0x110a, 0x0000), MAKE_EXTENSION_PCI(ttc_1_X, 0x13c2, 0x000a), MAKE_EXTENSION_PCI(fss, 0x13c2, 0x0006), + MAKE_EXTENSION_PCI(ttt, 0x13c2, 0x0008), /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0004), UNDEFINED CARD */ // Galaxis DVB PC-Sat-Carte /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0005), UNDEFINED CARD */ // Technisat SkyStar1 -/* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0008), UNDEFINED CARD */ // TT/Hauppauge WinTV DVB-T v???? /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0009), UNDEFINED CARD */ // TT/Hauppauge WinTV Nexus-CA v???? { @@ -2640,18 +2718,6 @@ { int retval; retval = saa7146_register_extension(&av7110_extension); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) - if (retval) - goto failed_saa7146_register; - - retval = av7110_ir_init(); - if (retval) - goto failed_av7110_ir_init; - return 0; -failed_av7110_ir_init: - saa7146_unregister_extension(&av7110_extension); -failed_saa7146_register: -#endif return retval; } diff -Nru a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h --- a/drivers/media/dvb/ttpci/av7110.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/ttpci/av7110.h 2005-03-30 16:58:47 -08:00 @@ -31,6 +31,7 @@ #include "tda8083.h" #include "sp8870.h" #include "stv0297.h" +#include "l64781.h" #include @@ -231,8 +232,6 @@ u32 ir_config; /* firmware stuff */ - unsigned int device_initialized; - unsigned char *bin_fw; unsigned long size_fw; diff -Nru a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c --- a/drivers/media/dvb/ttpci/av7110_av.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_av.c 2005-03-30 16:58:47 -08:00 @@ -1426,25 +1426,34 @@ int av7110_av_init(struct av7110 *av7110) { + void (*play[])(u8 *, int, void *) = { play_audio_cb, play_video_cb }; + int i, ret; + av7110->vidmode = VIDEO_MODE_PAL; - av7110_ipack_init(&av7110->ipack[0], IPACKS, play_audio_cb); - av7110->ipack[0].data = (void *) av7110; - av7110_ipack_init(&av7110->ipack[1], IPACKS, play_video_cb); - av7110->ipack[1].data = (void *) av7110; + for (i = 0; i < 2; i++) { + struct ipack *ipack = av7110->ipack + i; + + ret = av7110_ipack_init(ipack, IPACKS, play[i]); + if (ret < 0) { + if (i) + av7110_ipack_free(--ipack); + goto out; + } + ipack->data = av7110; + } dvb_ringbuffer_init(&av7110->avout, av7110->iobuf, AVOUTLEN); dvb_ringbuffer_init(&av7110->aout, av7110->iobuf + AVOUTLEN, AOUTLEN); av7110->kbuf[0] = (u8 *)(av7110->iobuf + AVOUTLEN + AOUTLEN + BMPLEN); av7110->kbuf[1] = av7110->kbuf[0] + 2 * IPACKS; - - return 0; +out: + return ret; } -int av7110_av_exit(struct av7110 *av7110) +void av7110_av_exit(struct av7110 *av7110) { av7110_ipack_free(&av7110->ipack[0]); av7110_ipack_free(&av7110->ipack[1]); - return 0; } diff -Nru a/drivers/media/dvb/ttpci/av7110_av.h b/drivers/media/dvb/ttpci/av7110_av.h --- a/drivers/media/dvb/ttpci/av7110_av.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_av.h 2005-03-30 16:58:48 -08:00 @@ -23,7 +23,7 @@ extern int av7110_av_register(struct av7110 *av7110); extern void av7110_av_unregister(struct av7110 *av7110); extern int av7110_av_init(struct av7110 *av7110); -extern int av7110_av_exit(struct av7110 *av7110); +extern void av7110_av_exit(struct av7110 *av7110); #endif /* _AV7110_AV_H_ */ diff -Nru a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c --- a/drivers/media/dvb/ttpci/av7110_ca.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_ca.c 2005-03-30 16:58:49 -08:00 @@ -91,8 +91,20 @@ static int ci_ll_init(struct dvb_ringbuffer *cirbuf, struct dvb_ringbuffer *ciwbuf, int size) { - dvb_ringbuffer_init(cirbuf, vmalloc(size), size); - dvb_ringbuffer_init(ciwbuf, vmalloc(size), size); + struct dvb_ringbuffer *tab[] = { cirbuf, ciwbuf, NULL }, **p; + void *data; + + for (p = tab; *p; p++) { + data = vmalloc(size); + if (!data) { + while (p-- != tab) { + vfree(p[0]->data); + p[0]->data = NULL; + } + return -ENOMEM; + } + dvb_ringbuffer_init(*p, data, size); + } return 0; } @@ -367,9 +379,9 @@ dvb_unregister_device(av7110->ca_dev); } -void av7110_ca_init(struct av7110* av7110) +int av7110_ca_init(struct av7110* av7110) { - ci_ll_init(&av7110->ci_rbuffer, &av7110->ci_wbuffer, 8192); + return ci_ll_init(&av7110->ci_rbuffer, &av7110->ci_wbuffer, 8192); } void av7110_ca_exit(struct av7110* av7110) diff -Nru a/drivers/media/dvb/ttpci/av7110_ca.h b/drivers/media/dvb/ttpci/av7110_ca.h --- a/drivers/media/dvb/ttpci/av7110_ca.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_ca.h 2005-03-30 16:58:47 -08:00 @@ -8,7 +8,7 @@ extern int av7110_ca_register(struct av7110 *av7110); extern void av7110_ca_unregister(struct av7110 *av7110); -extern void av7110_ca_init(struct av7110* av7110); +extern int av7110_ca_init(struct av7110* av7110); extern void av7110_ca_exit(struct av7110* av7110); #endif /* _AV7110_CA_H_ */ diff -Nru a/drivers/media/dvb/ttpci/av7110_ipack.c b/drivers/media/dvb/ttpci/av7110_ipack.c --- a/drivers/media/dvb/ttpci/av7110_ipack.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_ipack.c 2005-03-30 16:58:48 -08:00 @@ -37,7 +37,6 @@ void av7110_ipack_free(struct ipack *p) { - if (p->buf) vfree(p->buf); } diff -Nru a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c --- a/drivers/media/dvb/ttpci/av7110_ir.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/ttpci/av7110_ir.c 2005-03-30 16:58:47 -08:00 @@ -12,6 +12,7 @@ /* enable ir debugging by or'ing av7110_debug with 16 */ +static int ir_initialized; static struct input_dev input_dev; static u32 ir_config; @@ -162,6 +163,9 @@ { static struct proc_dir_entry *e; + if (ir_initialized) + return 0; + init_timer(&keyup_timer); keyup_timer.data = 0; @@ -187,16 +191,20 @@ e->size = 4 + 256 * sizeof(u16); } + ir_initialized = 1; return 0; } void __exit av7110_ir_exit(void) { + if (ir_initialized == 0) + return; del_timer_sync(&keyup_timer); remove_proc_entry("av7110_ir", NULL); av7110_unregister_irc_handler(av7110_emit_key); input_unregister_device(&input_dev); + ir_initialized = 0; } //MODULE_AUTHOR("Holger Waechtler "); diff -Nru a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c --- a/drivers/media/dvb/ttpci/budget-av.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/ttpci/budget-av.c 2005-03-30 16:58:49 -08:00 @@ -59,7 +59,7 @@ struct dvb_ca_en50221 ca; }; -int enable_ci = 0; +static int enable_ci = 0; /**************************************************************************** @@ -121,6 +121,8 @@ return -EINVAL; saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTHI); + udelay(1); + result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 0xfff, 1, 0, 0); if (result == -ETIMEDOUT) @@ -137,6 +139,8 @@ return -EINVAL; saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTHI); + udelay(1); + result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 0xfff, 1, value, 0, 0); if (result == -ETIMEDOUT) @@ -153,6 +157,8 @@ return -EINVAL; saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO); + udelay(1); + result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 3, 1, 0, 0); if (result == -ETIMEDOUT) @@ -169,6 +175,8 @@ return -EINVAL; saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO); + udelay(1); + result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 3, 1, value, 0, 0); if (result == -ETIMEDOUT) @@ -180,6 +188,7 @@ { struct budget_av *budget_av = (struct budget_av *) ca->data; struct saa7146_dev *saa = budget_av->budget.dev; + int max = 20; if (slot != 0) return -EINVAL; @@ -190,7 +199,9 @@ saa7146_setgpio(saa, 0, SAA7146_GPIO_OUTHI); msleep(100); saa7146_setgpio(saa, 0, SAA7146_GPIO_OUTLO); - msleep(2000); /* horrendous I know, but its the only way to be absolutely sure without an IRQ line! */ + + while (--max > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d) + msleep(100); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTB); return 0; @@ -658,7 +669,7 @@ return request_firmware(fw, name, &budget->dev->pci->dev); } -struct tda1004x_config philips_tu1216_config = { +static struct tda1004x_config philips_tu1216_config = { .demod_address = 0x8, .invert = 1, diff -Nru a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c --- a/drivers/media/dvb/ttpci/budget-core.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/dvb/ttpci/budget-core.c 2005-03-30 16:58:48 -08:00 @@ -41,7 +41,7 @@ int budget_debug; module_param_named(debug, budget_debug, int, 0644); -MODULE_PARM_DESC(budget_debug, "Turn on/off budget debugging (default:off)."); +MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off)."); /**************************************************************************** * TT budget / WinTV Nova @@ -415,8 +415,7 @@ err: i2c_del_adapter(&budget->i2c_adap); - if (budget->grabbing) - vfree(budget->grabbing); + vfree(budget->grabbing); dvb_unregister_adapter(budget->dvb_adapter); diff -Nru a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c --- a/drivers/media/dvb/ttpci/budget-patch.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/dvb/ttpci/budget-patch.c 2005-03-30 16:58:47 -08:00 @@ -406,7 +406,7 @@ return 0; } -struct tda8083_config grundig_29504_451_config = { +static struct tda8083_config grundig_29504_451_config = { .demod_address = 0x68, .pll_set = grundig_29504_451_pll_set, }; diff -Nru a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c --- a/drivers/media/dvb/ttpci/budget.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/dvb/ttpci/budget.c 2005-03-30 16:58:49 -08:00 @@ -444,9 +444,15 @@ if (budget->dvb_frontend) break; break; - case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI (tda8083/Grundig 29504-451(tsa5522)) + case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) + budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); + if (budget->dvb_frontend) { + budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; + break; + } + break; - // grundig 29504-451 + case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); if (budget->dvb_frontend) { budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; @@ -518,14 +524,16 @@ MAKE_BUDGET_INFO(ttbc, "TT-Budget/WinTV-NOVA-C PCI", BUDGET_TT); MAKE_BUDGET_INFO(ttbt, "TT-Budget/WinTV-NOVA-T PCI", BUDGET_TT); MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); -MAKE_BUDGET_INFO(fsacs, "Fujitsu Siemens Activy Budget-S PCI", BUDGET_FS_ACTIVY); +MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig frontend)", BUDGET_FS_ACTIVY); +MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY); static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1003), MAKE_EXTENSION_PCI(ttbc, 0x13c2, 0x1004), MAKE_EXTENSION_PCI(ttbt, 0x13c2, 0x1005), MAKE_EXTENSION_PCI(satel, 0x13c2, 0x1013), - MAKE_EXTENSION_PCI(fsacs, 0x1131, 0x4f61), + MAKE_EXTENSION_PCI(fsacs1,0x1131, 0x4f60), + MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61), { .vendor = 0, } diff -Nru a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-03-30 16:58:50 -08:00 @@ -68,6 +68,7 @@ #define TTUSB_MAXFILTER 16 /* ??? */ #endif +#define TTUSB_REV_2_2 0x22 #define TTUSB_BUDGET_NAME "ttusb_stc_fw" /** @@ -79,9 +80,8 @@ struct dmxdev dmxdev; struct dvb_net dvbnet; - /* our semaphore, for channel allocation/deallocation */ - struct semaphore sem; /* and one for USB access. */ + struct semaphore semi2c; struct semaphore semusb; struct dvb_adapter *adapter; @@ -121,18 +121,8 @@ u8 last_result[32]; - struct ttusb_channel { - struct ttusb *ttusb; - struct dvb_demux_feed *dvbdmxfeed; - - int active; - int id; - int pid; - int type; /* 1 - TS, 2 - Filter */ -#ifdef TTUSB_HWSECTIONS - int filterstate[TTUSB_MAXFILTER]; /* 0: not busy, 1: busy */ -#endif - } channel[TTUSB_MAXCHANNEL]; + int revision; + #if 0 devfs_handle_t stc_devfs_handle; #endif @@ -258,7 +248,7 @@ int i = 0; int inc; - if (down_interruptible(&ttusb->sem) < 0) + if (down_interruptible(&ttusb->semi2c) < 0) return -EAGAIN; while (i < num) { @@ -292,7 +282,7 @@ i += inc; } - up(&ttusb->sem); + up(&ttusb->semi2c); return i; } @@ -445,13 +435,17 @@ if (memcmp(get_version + 4, "V 0.0", 5) && memcmp(get_version + 4, "V 1.1", 5) && - memcmp(get_version + 4, "V 2.1", 5)) { + memcmp(get_version + 4, "V 2.1", 5) && + memcmp(get_version + 4, "V 2.2", 5)) { printk ("%s: unknown STC version %c%c%c%c%c, please report!\n", __FUNCTION__, get_version[4], get_version[5], get_version[6], get_version[7], get_version[8]); } + ttusb->revision = ((get_version[6] - '0') << 4) | + (get_version[8] - '0'); + err = ttusb_cmd(ttusb, get_dsp_version, sizeof(get_dsp_version), 1); if (err) @@ -491,6 +485,31 @@ } #endif +static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) +{ + struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; + int ret; + u8 data[1]; + struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) }; + + switch(voltage) { + case SEC_VOLTAGE_OFF: + data[0] = 0x00; + break; + case SEC_VOLTAGE_13: + data[0] = 0x44; + break; + case SEC_VOLTAGE_18: + data[0] = 0x4c; + break; + default: + return -EINVAL; + }; + + ret = i2c_transfer(&ttusb->i2c_adap, &msg, 1); + return (ret != 1) ? -EIO : 0; +} + static int ttusb_update_lnb(struct ttusb *ttusb) { u8 b[] = { 0xaa, ++ttusb->c, 0x16, 5, /*power: */ 1, @@ -831,7 +850,7 @@ int i; for (i = 0; i < ISO_BUF_COUNT; i++) - usb_unlink_urb(ttusb->iso_urb[i]); + usb_kill_urb(ttusb->iso_urb[i]); ttusb->iso_streaming = 0; } @@ -888,15 +907,13 @@ } #ifdef TTUSB_HWSECTIONS -static void ttusb_handle_ts_data(struct ttusb_channel *channel, const u8 * data, +static void ttusb_handle_ts_data(struct dvb_demux_feed *dvbdmxfeed, const u8 * data, int len) { - struct dvb_demux_feed *dvbdmxfeed = channel->dvbdmxfeed; - dvbdmxfeed->cb.ts(data, len, 0, 0, &dvbdmxfeed->feed.ts, 0); } -static void ttusb_handle_sec_data(struct ttusb_channel *channel, const u8 * data, +static void ttusb_handle_sec_data(struct dvb_demux_feed *dvbdmxfeed, const u8 * data, int len) { // struct dvb_demux_feed *dvbdmxfeed = channel->dvbdmxfeed; @@ -905,31 +922,10 @@ } #endif -static struct ttusb_channel *ttusb_channel_allocate(struct ttusb *ttusb) -{ - int i; - - if (down_interruptible(&ttusb->sem)) - return NULL; - - /* lock! */ - for (i = 0; i < TTUSB_MAXCHANNEL; ++i) { - if (!ttusb->channel[i].active) { - ttusb->channel[i].active = 1; - up(&ttusb->sem); - return ttusb->channel + i; - } - } - - up(&ttusb->sem); - - return NULL; -} - static int ttusb_start_feed(struct dvb_demux_feed *dvbdmxfeed) { struct ttusb *ttusb = (struct ttusb *) dvbdmxfeed->demux; - struct ttusb_channel *channel; + int feed_type = 1; dprintk("ttusb_start_feed\n"); @@ -949,35 +945,22 @@ case DMX_TS_PES_TELETEXT: case DMX_TS_PES_PCR: case DMX_TS_PES_OTHER: - channel = ttusb_channel_allocate(ttusb); break; default: return -EINVAL; } - } else { - channel = ttusb_channel_allocate(ttusb); } - if (!channel) - return -EBUSY; - - dvbdmxfeed->priv = channel; - channel->dvbdmxfeed = dvbdmxfeed; - - channel->pid = dvbdmxfeed->pid; - #ifdef TTUSB_HWSECTIONS +#error TODO: allocate filters if (dvbdmxfeed->type == DMX_TYPE_TS) { - channel->type = 1; + feed_type = 1; } else if (dvbdmxfeed->type == DMX_TYPE_SEC) { - channel->type = 2; -#error TODO: allocate filters + feed_type = 2; } -#else - channel->type = 1; #endif - ttusb_set_channel(ttusb, channel->id, channel->type, channel->pid); + ttusb_set_channel(ttusb, dvbdmxfeed->index, feed_type, dvbdmxfeed->pid); if (0 == ttusb->running_feed_count++) ttusb_start_iso_xfer(ttusb); @@ -987,17 +970,13 @@ static int ttusb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) { - struct ttusb_channel *channel = - (struct ttusb_channel *) dvbdmxfeed->priv; struct ttusb *ttusb = (struct ttusb *) dvbdmxfeed->demux; - ttusb_del_channel(channel->ttusb, channel->id); + ttusb_del_channel(ttusb, dvbdmxfeed->index); if (--ttusb->running_feed_count == 0) ttusb_stop_iso_xfer(ttusb); - channel->active = 0; - return 0; } @@ -1201,10 +1180,51 @@ .request_firmware = philips_tdm1316l_request_firmware, }; +static u8 alps_bsbe1_inittab[] = { + 0x01, 0x15, + 0x02, 0x30, + 0x03, 0x00, + 0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */ + 0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */ + 0x06, 0x40, /* DAC not used, set to high impendance mode */ + 0x07, 0x00, /* DAC LSB */ + 0x08, 0x40, /* DiSEqC off, LNB power on OP2/LOCK pin on */ + 0x09, 0x00, /* FIFO */ + 0x0c, 0x51, /* OP1 ctl = Normal, OP1 val = 1 (LNB Power ON) */ + 0x0d, 0x82, /* DC offset compensation = ON, beta_agc1 = 2 */ + 0x0e, 0x23, /* alpha_tmg = 2, beta_tmg = 3 */ + 0x10, 0x3f, // AGC2 0x3d + 0x11, 0x84, + 0x12, 0xb5, // Lock detect: -64 Carrier freq detect:on + 0x15, 0xc9, // lock detector threshold + 0x16, 0x00, + 0x17, 0x00, + 0x18, 0x00, + 0x19, 0x00, + 0x1a, 0x00, + 0x1f, 0x50, + 0x20, 0x00, + 0x21, 0x00, + 0x22, 0x00, + 0x23, 0x00, + 0x28, 0x00, // out imp: normal out type: parallel FEC mode:0 + 0x29, 0x1e, // 1/2 threshold + 0x2a, 0x14, // 2/3 threshold + 0x2b, 0x0f, // 3/4 threshold + 0x2c, 0x09, // 5/6 threshold + 0x2d, 0x05, // 7/8 threshold + 0x2e, 0x01, + 0x31, 0x1f, // test all FECs + 0x32, 0x19, // viterbi and synchro search + 0x33, 0xfc, // rs control + 0x34, 0x93, // error control + 0x0f, 0x92, + 0xff, 0xff +}; static u8 alps_bsru6_inittab[] = { 0x01, 0x15, - 0x02, 0x00, + 0x02, 0x30, 0x03, 0x00, 0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */ 0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */ @@ -1244,7 +1264,7 @@ 0xff, 0xff }; -static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) +static int alps_stv0299_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) { u8 aclk = 0; u8 bclk = 0; @@ -1278,7 +1298,7 @@ return 0; } -static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tsa5059_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; u8 buf[4]; @@ -1295,7 +1315,11 @@ buf[3] = 0xC4; if (params->frequency > 1530000) - buf[3] = 0xc0; + buf[3] = 0xC0; + + /* BSBE1 wants XCE bit set */ + if (ttusb->revision == TTUSB_REV_2_2) + buf[3] |= 0x20; if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) return -EIO; @@ -1303,8 +1327,7 @@ return 0; } -static struct stv0299_config alps_bsru6_config = { - +static struct stv0299_config alps_stv0299_config = { .demod_address = 0x68, .inittab = alps_bsru6_inittab, .mclk = 88000000UL, @@ -1314,8 +1337,8 @@ .lock_output = STV0229_LOCKOUTPUT_1, .volt13_op0_op1 = STV0299_VOLT13_OP1, .min_delay_ms = 100, - .set_symbol_rate = alps_bsru6_set_symbol_rate, - .pll_set = alps_bsru6_pll_set, + .set_symbol_rate = alps_stv0299_set_symbol_rate, + .pll_set = philips_tsa5059_pll_set, }; static int ttusb_novas_grundig_29504_491_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) @@ -1349,11 +1372,16 @@ static void frontend_init(struct ttusb* ttusb) { switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) { - case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6(tsa5059) - // try the ALPS BSRU6 first - ttusb->fe = stv0299_attach(&alps_bsru6_config, &ttusb->i2c_adap); + case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS BSRU6|BSBE1(tsa5059)) + // try the stv0299 based first + ttusb->fe = stv0299_attach(&alps_stv0299_config, &ttusb->i2c_adap); if (ttusb->fe != NULL) { - ttusb->fe->ops->set_voltage = ttusb_set_voltage; + if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1 + alps_stv0299_config.inittab = alps_bsbe1_inittab; + ttusb->fe->ops->set_voltage = lnbp21_set_voltage; + } else { // ALPS BSRU6 + ttusb->fe->ops->set_voltage = ttusb_set_voltage; + } break; } @@ -1406,7 +1434,7 @@ { struct usb_device *udev; struct ttusb *ttusb; - int result, channel; + int result; dprintk("%s: TTUSB DVB connected\n", __FUNCTION__); @@ -1419,15 +1447,10 @@ memset(ttusb, 0, sizeof(struct ttusb)); - for (channel = 0; channel < TTUSB_MAXCHANNEL; ++channel) { - ttusb->channel[channel].id = channel; - ttusb->channel[channel].ttusb = ttusb; - } - ttusb->dev = udev; ttusb->c = 0; ttusb->mux_state = 0; - sema_init(&ttusb->sem, 0); + sema_init(&ttusb->semi2c, 0); sema_init(&ttusb->semusb, 1); ttusb_setup_interfaces(ttusb); @@ -1436,7 +1459,7 @@ if (ttusb_init_controller(ttusb)) printk("ttusb_init_controller: error\n"); - up(&ttusb->sem); + up(&ttusb->semi2c); dvb_register_adapter(&ttusb->adapter, "Technotrend/Hauppauge Nova-USB", THIS_MODULE); ttusb->adapter->priv = ttusb; diff -Nru a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2005-03-30 16:58:50 -08:00 @@ -2,6 +2,7 @@ * TTUSB DEC Driver * * Copyright (C) 2003-2004 Alex Woods + * IR support by Peter Beutner * * 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 @@ -32,6 +33,7 @@ #include #include #include +#include #include "dmxdev.h" #include "dvb_demux.h" @@ -42,27 +44,32 @@ static int debug; static int output_pva; +static int enable_rc; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off)."); module_param(output_pva, int, 0444); MODULE_PARM_DESC(output_pva, "Output PVA from dvr device (default:off)"); +module_param(enable_rc, int, 0644); +MODULE_PARM_DESC(enable_rc, "Turn on/off IR remote control(default: off)"); #define dprintk if (debug) printk #define DRIVER_NAME "TechnoTrend/Hauppauge DEC USB" #define COMMAND_PIPE 0x03 -#define RESULT_PIPE 0x84 -#define IN_PIPE 0x88 +#define RESULT_PIPE 0x04 +#define IN_PIPE 0x08 #define OUT_PIPE 0x07 +#define IRQ_PIPE 0x0A #define COMMAND_PACKET_SIZE 0x3c #define ARM_PACKET_SIZE 0x1000 +#define IRQ_PACKET_SIZE 0x8 #define ISO_BUF_COUNT 0x04 #define FRAMES_PER_ISO_BUF 0x04 -#define ISO_FRAME_SIZE 0x03FF +#define ISO_FRAME_SIZE 0x0380 #define MAX_PVA_LENGTH 6144 @@ -107,9 +114,13 @@ unsigned int result_pipe; unsigned int in_pipe; unsigned int out_pipe; + unsigned int irq_pipe; enum ttusb_dec_interface interface; struct semaphore usb_sem; + void *irq_buffer; + struct urb *irq_urb; + dma_addr_t irq_dma_handle; void *iso_buffer; dma_addr_t iso_dma_handle; struct urb *iso_urb[ISO_BUF_COUNT]; @@ -142,6 +153,8 @@ struct list_head filter_info_list; spinlock_t filter_info_list_lock; + struct input_dev rc_input_dev; + int active; /* Loaded successfully */ }; @@ -157,9 +170,83 @@ struct list_head filter_info_list; }; +static u16 rc_keys[] = { + KEY_POWER, + KEY_MUTE, + KEY_1, + KEY_2, + KEY_3, + KEY_4, + KEY_5, + KEY_6, + KEY_7, + KEY_8, + KEY_9, + KEY_0, + KEY_CHANNELUP, + KEY_VOLUMEDOWN, + KEY_OK, + KEY_VOLUMEUP, + KEY_CHANNELDOWN, + KEY_PREVIOUS, + KEY_ESC, + KEY_RED, + KEY_GREEN, + KEY_YELLOW, + KEY_BLUE, + KEY_OPTION, + KEY_M, + KEY_RADIO +}; + static void ttusb_dec_set_model(struct ttusb_dec *dec, enum ttusb_dec_model model); +static void ttusb_dec_handle_irq( struct urb *urb, struct pt_regs *regs) +{ + struct ttusb_dec * dec = urb->context; + char *buffer = dec->irq_buffer; + int retval; + + switch(urb->status) { + case 0: /*success*/ + break; + case -ECONNRESET: + case -ENOENT: + case -ESHUTDOWN: + case -ETIMEDOUT: + /* this urb is dead, cleanup */ + dprintk("%s:urb shutting down with status: %d\n", + __FUNCTION__, urb->status); + return; + default: + dprintk("%s:nonzero status received: %d\n", + __FUNCTION__,urb->status); + goto exit; + } + + if( (buffer[0] == 0x1) && (buffer[2] == 0x15) ) { + /* IR - Event */ + /* this is an fact a bit too simple implementation; + * the box also reports a keyrepeat signal + * (with buffer[3] == 0x40) in an intervall of ~100ms. + * But to handle this correctly we had to imlemenent some + * kind of timer which signals a 'key up' event if no + * keyrepeat signal is recieved for lets say 200ms. + * this should/could be added later ... + * for now lets report each signal as a key down and up*/ + dprintk("%s:rc signal:%d\n", __FUNCTION__, buffer[4]); + input_report_key(&dec->rc_input_dev,rc_keys[buffer[4]-1],1); + input_report_key(&dec->rc_input_dev,rc_keys[buffer[4]-1],0); + input_sync(&dec->rc_input_dev); + } + +exit: retval = usb_submit_urb(urb, GFP_ATOMIC); + if(retval) + printk("%s - usb_commit_urb failed with result: %d\n", + __FUNCTION__, retval); +} + static u16 crc16(u16 crc, const u8 *buf, size_t len) { u16 tmp; @@ -781,7 +868,7 @@ b, NULL, NULL); if (result) return result; - result = usb_set_interface(dec->udev, 0, 7); + result = usb_set_interface(dec->udev, 0, 8); break; case TTUSB_DEC_INTERFACE_OUT: result = usb_set_interface(dec->udev, 0, 1); @@ -1095,6 +1182,31 @@ (unsigned long)dec); } +static void ttusb_init_rc( struct ttusb_dec *dec) +{ + u8 b[] = { 0x00, 0x01 }; + int i; + + init_input_dev(&dec->rc_input_dev); + + dec->rc_input_dev.name = "ttusb_dec remote control"; + dec->rc_input_dev.evbit[0] = BIT(EV_KEY); + dec->rc_input_dev.keycodesize = sizeof(u16); + dec->rc_input_dev.keycodemax = 0x1a; + dec->rc_input_dev.keycode = rc_keys; + + for (i = 0; i < sizeof(rc_keys)/sizeof(rc_keys[0]); i++) + set_bit(rc_keys[i], dec->rc_input_dev.keybit); + + input_register_device(&dec->rc_input_dev); + + if(usb_submit_urb(dec->irq_urb,GFP_KERNEL)) { + printk("%s: usb_submit_urb failed\n",__FUNCTION__); + } + /* enable irq pipe */ + ttusb_dec_send_command(dec,0xb0,sizeof(b),b,NULL,NULL); +} + static void ttusb_dec_init_v_pes(struct ttusb_dec *dec) { dprintk("%s\n", __FUNCTION__); @@ -1105,7 +1217,7 @@ dec->v_pes[3] = 0xe0; } -static void ttusb_dec_init_usb(struct ttusb_dec *dec) +static int ttusb_dec_init_usb(struct ttusb_dec *dec) { dprintk("%s\n", __FUNCTION__); @@ -1116,8 +1228,26 @@ dec->result_pipe = usb_rcvbulkpipe(dec->udev, RESULT_PIPE); dec->in_pipe = usb_rcvisocpipe(dec->udev, IN_PIPE); dec->out_pipe = usb_sndisocpipe(dec->udev, OUT_PIPE); + dec->irq_pipe = usb_rcvintpipe(dec->udev, IRQ_PIPE); - ttusb_dec_alloc_iso_urbs(dec); + if(enable_rc) { + dec->irq_urb = usb_alloc_urb(0, GFP_KERNEL); + if(!dec->irq_urb) { + return -ENOMEM; + } + dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, + SLAB_ATOMIC, &dec->irq_dma_handle); + if(!dec->irq_buffer) { + return -ENOMEM; + } + usb_fill_int_urb(dec->irq_urb, dec->udev,dec->irq_pipe, + dec->irq_buffer, IRQ_PACKET_SIZE, + ttusb_dec_handle_irq, dec, 1); + dec->irq_urb->transfer_dma = dec->irq_dma_handle; + dec->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + } + + return ttusb_dec_alloc_iso_urbs(dec); } static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) @@ -1369,6 +1499,26 @@ dvb_unregister_adapter(dec->adapter); } +static void ttusb_dec_exit_rc(struct ttusb_dec *dec) +{ + + dprintk("%s\n", __FUNCTION__); + /* we have to check whether the irq URB is already submitted. + * As the irq is submitted after the interface is changed, + * this is the best method i figured out. + * Any others?*/ + if(dec->interface == TTUSB_DEC_INTERFACE_IN) + usb_kill_urb(dec->irq_urb); + + usb_free_urb(dec->irq_urb); + + usb_buffer_free(dec->udev,IRQ_PACKET_SIZE, + dec->irq_buffer, dec->irq_dma_handle); + + input_unregister_device(&dec->rc_input_dev); +} + + static void ttusb_dec_exit_usb(struct ttusb_dec *dec) { int i; @@ -1462,7 +1612,8 @@ dec->udev = udev; - ttusb_dec_init_usb(dec); + if (ttusb_dec_init_usb(dec)) + return 0; if (ttusb_dec_init_stb(dec)) { ttusb_dec_exit_usb(dec); return 0; @@ -1502,6 +1653,9 @@ ttusb_dec_set_interface(dec, TTUSB_DEC_INTERFACE_IN); + if(enable_rc) + ttusb_init_rc(dec); + return 0; } @@ -1516,6 +1670,8 @@ if (dec->active) { ttusb_dec_exit_tasklet(dec); ttusb_dec_exit_filters(dec); + if(enable_rc) + ttusb_dec_exit_rc(dec); ttusb_dec_exit_usb(dec); ttusb_dec_exit_dvb(dec); } diff -Nru a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c --- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c 2005-03-30 16:58:50 -08:00 @@ -169,7 +169,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } @@ -195,7 +195,7 @@ return &state->frontend; error: - if (state) kfree(state); + kfree(state); return NULL; } diff -Nru a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c --- a/drivers/media/video/bt819.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/video/bt819.c 2005-03-30 16:58:47 -08:00 @@ -236,7 +236,8 @@ init[0x07 * 2 - 1] = timing->hactive & 0xff; init[0x08 * 2 - 1] = timing->hscale >> 8; init[0x09 * 2 - 1] = timing->hscale & 0xff; - init[0x19*2-1] = decoder->norm == 0 ? 115 : 93; /* Chroma burst delay */ + /* 0x15 in array is address 0x19 */ + init[0x15 * 2 - 1] = (decoder->norm == 0) ? 115 : 93; /* Chroma burst delay */ /* reset */ bt819_write(client, 0x1f, 0x00); mdelay(1); diff -Nru a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c --- a/drivers/media/video/cpia_usb.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/media/video/cpia_usb.c 2005-03-30 16:58:47 -08:00 @@ -440,7 +440,7 @@ /* Unschedule all of the iso td's */ if (ucpia->sbuf[1].urb) { - usb_unlink_urb(ucpia->sbuf[1].urb); + usb_kill_urb(ucpia->sbuf[1].urb); usb_free_urb(ucpia->sbuf[1].urb); ucpia->sbuf[1].urb = NULL; } @@ -451,7 +451,7 @@ } if (ucpia->sbuf[0].urb) { - usb_unlink_urb(ucpia->sbuf[0].urb); + usb_kill_urb(ucpia->sbuf[0].urb); usb_free_urb(ucpia->sbuf[0].urb); ucpia->sbuf[0].urb = NULL; } diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c --- a/drivers/media/video/msp3400.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/media/video/msp3400.c 2005-03-30 16:58:49 -08:00 @@ -734,6 +734,7 @@ { DECLARE_WAITQUEUE(wait, current); +again: add_wait_queue(&msp->wq, &wait); if (!kthread_should_stop()) { if (timeout < 0) { @@ -749,9 +750,12 @@ #endif } } - if (current->flags & PF_FREEZE) - refrigerator(PF_FREEZE); + remove_wait_queue(&msp->wq, &wait); + + if (try_to_freeze(PF_FREEZE)) + goto again; + return msp->restart; } diff -Nru a/drivers/media/video/planb.c b/drivers/media/video/planb.c --- a/drivers/media/video/planb.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/media/video/planb.c 2005-03-30 16:58:50 -08:00 @@ -422,6 +422,16 @@ /* overlay support functions */ /*****************************/ +static inline int overlay_is_active(struct planb *pb) +{ + unsigned int size = pb->tab_size * sizeof(struct dbdma_cmd); + unsigned int caddr = (unsigned)in_le32(&pb->planb_base->ch1.cmdptr); + + return (in_le32(&pb->overlay_last1->cmd_dep) == pb->ch1_cmd_phys) + && (caddr < (pb->ch1_cmd_phys + size)) + && (caddr >= (unsigned)pb->ch1_cmd_phys); +} + static void overlay_start(struct planb *pb) { @@ -852,16 +862,6 @@ }; #define PLANB_PALETTE_MAX 15 - -static inline int overlay_is_active(struct planb *pb) -{ - unsigned int size = pb->tab_size * sizeof(struct dbdma_cmd); - unsigned int caddr = (unsigned)in_le32(&pb->planb_base->ch1.cmdptr); - - return (in_le32(&pb->overlay_last1->cmd_dep) == pb->ch1_cmd_phys) - && (caddr < (pb->ch1_cmd_phys + size)) - && (caddr >= (unsigned)pb->ch1_cmd_phys); -} static int vgrab(struct planb *pb, struct video_mmap *mp) { diff -Nru a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c --- a/drivers/media/video/tvaudio.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/media/video/tvaudio.c 2005-03-30 16:58:48 -08:00 @@ -286,6 +286,7 @@ schedule(); } remove_wait_queue(&chip->wq, &wait); + try_to_freeze(PF_FREEZE); if (chip->done || signal_pending(current)) break; dprintk("%s: thread wakeup\n", i2c_clientname(&chip->c)); diff -Nru a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h --- a/drivers/message/fusion/mptbase.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/message/fusion/mptbase.h 2005-03-30 16:58:47 -08:00 @@ -83,8 +83,8 @@ #define COPYRIGHT "Copyright (c) 1999-2004 " MODULEAUTHOR #endif -#define MPT_LINUX_VERSION_COMMON "3.01.19" -#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.01.19" +#define MPT_LINUX_VERSION_COMMON "3.01.20" +#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.01.20" #define WHAT_MAGIC_STRING "@" "(" "#" ")" #define show_mptmod_ver(s,ver) \ diff -Nru a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c --- a/drivers/message/fusion/mptscsih.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/message/fusion/mptscsih.c 2005-03-30 16:58:51 -08:00 @@ -96,23 +96,26 @@ MODULE_DESCRIPTION(my_NAME); MODULE_LICENSE("GPL"); -#ifdef MODULE -static int dv = MPTSCSIH_DOMAIN_VALIDATION; -module_param(dv, int, 0); -MODULE_PARM_DESC(dv, "DV Algorithm: enhanced = 1, basic = 0 (default=MPTSCSIH_DOMAIN_VALIDATION=1)"); - -static int width = MPTSCSIH_MAX_WIDTH; -module_param(width, int, 0); -MODULE_PARM_DESC(width, "Max Bus Width: wide = 1, narrow = 0 (default=MPTSCSIH_MAX_WIDTH=1)"); - -static ushort factor = MPTSCSIH_MIN_SYNC; -module_param(factor, ushort, 0); -MODULE_PARM_DESC(factor, "Min Sync Factor: (default=MPTSCSIH_MIN_SYNC=0x08)"); - -static int saf_te = MPTSCSIH_SAF_TE; -module_param(saf_te, int, 0); -MODULE_PARM_DESC(saf_te, "Force enabling SEP Processor: (default=MPTSCSIH_SAF_TE=0)"); -#endif +/* Command line args */ +static int mpt_dv = MPTSCSIH_DOMAIN_VALIDATION; +MODULE_PARM(mpt_dv, "i"); +MODULE_PARM_DESC(mpt_dv, " DV Algorithm: enhanced=1, basic=0 (default=MPTSCSIH_DOMAIN_VALIDATION=1)"); + +static int mpt_width = MPTSCSIH_MAX_WIDTH; +MODULE_PARM(mpt_width, "i"); +MODULE_PARM_DESC(mpt_width, " Max Bus Width: wide=1, narrow=0 (default=MPTSCSIH_MAX_WIDTH=1)"); + +static int mpt_factor = MPTSCSIH_MIN_SYNC; +MODULE_PARM(mpt_factor, "h"); +MODULE_PARM_DESC(mpt_factor, " Min Sync Factor (default=MPTSCSIH_MIN_SYNC=0x08)"); + +static int mpt_saf_te = MPTSCSIH_SAF_TE; +MODULE_PARM(mpt_saf_te, "i"); +MODULE_PARM_DESC(mpt_saf_te, " Force enabling SEP Processor: enable=1 (default=MPTSCSIH_SAF_TE=0)"); + +static int mpt_pq_filter = 0; +MODULE_PARM(mpt_pq_filter, "i"); +MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1 (default=0)"); /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -253,7 +256,6 @@ /* Driver command line structure */ -static struct mptscsih_driver_setup driver_setup; static struct scsi_host_template driver_template; /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -1224,29 +1226,23 @@ /* Update with the driver setup * values. */ - if (ioc->spi_data.maxBusWidth > - driver_setup.max_width) { - ioc->spi_data.maxBusWidth = - driver_setup.max_width; - } - - if (ioc->spi_data.minSyncFactor < - driver_setup.min_sync_factor) { - ioc->spi_data.minSyncFactor = - driver_setup.min_sync_factor; - } + if (ioc->spi_data.maxBusWidth > mpt_width) + ioc->spi_data.maxBusWidth = mpt_width; + if (ioc->spi_data.minSyncFactor < mpt_factor) + ioc->spi_data.minSyncFactor = mpt_factor; if (ioc->spi_data.minSyncFactor == MPT_ASYNC) { ioc->spi_data.maxSyncOffset = 0; } - ioc->spi_data.Saf_Te = driver_setup.saf_te; + ioc->spi_data.Saf_Te = mpt_saf_te; hd->negoNvram = 0; #ifndef MPTSCSIH_ENABLE_DOMAIN_VALIDATION hd->negoNvram = MPT_SCSICFG_USE_NVRAM; #endif ioc->spi_data.forceDv = 0; + ioc->spi_data.noQas = 0; for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { ioc->spi_data.dvStatus[ii] = MPT_SCSICFG_NEGOTIATE; @@ -1256,12 +1252,12 @@ ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_DV_NOT_DONE; - ddvprintk((MYIOC_s_INFO_FMT + dinitprintk((MYIOC_s_INFO_FMT "dv %x width %x factor %x saf_te %x\n", - ioc->name, driver_setup.dv, - driver_setup.max_width, - driver_setup.min_sync_factor, - driver_setup.saf_te)); + ioc->name, mpt_dv, + mpt_width, + mpt_factor, + mpt_saf_te)); } mpt_scsi_hosts++; @@ -1477,18 +1473,6 @@ ": Registered for IOC reset notifications\n")); } -#ifdef MODULE - dinitprintk((KERN_INFO MYNAM - ": Command Line Args: dv=%d max_width=%d " - "factor=0x%x saf_te=%d\n", - dv, width, factor, saf_te)); - - driver_setup.dv = (dv) ? 1 : 0; - driver_setup.max_width = (width) ? 1 : 0; - driver_setup.min_sync_factor = factor; - driver_setup.saf_te = (saf_te) ? 1 : 0;; -#endif - if(mpt_device_driver_register(&mptscsih_driver, MPTSCSIH_DRIVER) != 0 ) { dprintk((KERN_INFO MYNAM @@ -3165,6 +3149,18 @@ dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", hd->ioc->name, bus_id, target_id, lun, hd)); + /* + * If the peripheral qualifier filter is enabled then if the target reports a 0x1 + * (i.e. The targer is capable of supporting the specified peripheral device type + * on this logical unit; however, the physical device is not currently connected + * to this logical unit) it will be converted to a 0x3 (i.e. The target is not + * capable of supporting a physical device on this logical unit). This is to work + * around a bug in th emid-layer in some distributions in which the mid-layer will + * continue to try to communicate to the LUN and evntually create a dummy LUN. + */ + if (mpt_pq_filter && dlen && (data[0] & 0xE0)) + data[0] |= 0x40; + /* Is LUN supported? If so, upper 2 bits will be 0 * in first byte of inquiry data. */ @@ -5161,7 +5157,7 @@ } ddvprintk((MYIOC_s_NOTE_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id)); - if (driver_setup.dv == 0) + if (mpt_dv == 0) goto target_done; inq0 = (*pbuf1) & 0x1F; diff -Nru a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h --- a/drivers/message/fusion/mptscsih.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/message/fusion/mptscsih.h 2005-03-30 16:58:50 -08:00 @@ -91,12 +91,4 @@ #define MPTSCSIH_MIN_SYNC 0x08 #define MPTSCSIH_SAF_TE 0 -struct mptscsih_driver_setup -{ - u8 dv; - u8 max_width; - u8 min_sync_factor; - u8 saf_te; -}; - #endif diff -Nru a/drivers/misc/Makefile b/drivers/misc/Makefile --- a/drivers/misc/Makefile 2005-03-30 16:58:50 -08:00 +++ b/drivers/misc/Makefile 2005-03-30 16:58:50 -08:00 @@ -4,3 +4,4 @@ obj- := misc.o # Dummy rule to force built-in.o to be made obj-$(CONFIG_IBM_ASM) += ibmasm/ +obj-$(CONFIG_HDPU_FEATURES) += hdpuftrs/ diff -Nru a/drivers/misc/hdpuftrs/Makefile b/drivers/misc/hdpuftrs/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/misc/hdpuftrs/Makefile 2005-03-30 16:58:51 -08:00 @@ -0,0 +1 @@ +obj-$(CONFIG_HDPU_FEATURES) := hdpu_cpustate.o hdpu_nexus.o diff -Nru a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,234 @@ +/* + * Sky CPU State Driver + * + * Copyright (C) 2002 Brian Waite + * + * This driver allows use of the CPU state bits + * It exports the /dev/sky_cpustate and also + * /proc/sky_cpustate pseudo-file for status information. + * + * 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. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SKY_CPUSTATE_VERSION "1.1" + +static int hdpu_cpustate_probe(struct device *ddev); +static int hdpu_cpustate_remove(struct device *ddev); + +struct cpustate_t cpustate; + +static int cpustate_get_ref(int excl) +{ + + int retval = -EBUSY; + + spin_lock(&cpustate.lock); + + if (cpustate.excl) + goto out_busy; + + if (excl) { + if (cpustate.open_count) + goto out_busy; + cpustate.excl = 1; + } + + cpustate.open_count++; + retval = 0; + + out_busy: + spin_unlock(&cpustate.lock); + return retval; +} + +static int cpustate_free_ref(void) +{ + + spin_lock(&cpustate.lock); + + cpustate.excl = 0; + cpustate.open_count--; + + spin_unlock(&cpustate.lock); + return 0; +} + +unsigned char cpustate_get_state(void) +{ + + return cpustate.cached_val; +} + +void cpustate_set_state(unsigned char new_state) +{ + unsigned int state = (new_state << 21); + +#ifdef DEBUG_CPUSTATE + printk("CPUSTATE -> 0x%x\n", new_state); +#endif + spin_lock(&cpustate.lock); + cpustate.cached_val = new_state; + writel((0xff << 21), cpustate.clr_addr); + writel(state, cpustate.set_addr); + spin_unlock(&cpustate.lock); +} + +/* + * Now all the various file operations that we export. + */ + +static ssize_t cpustate_read(struct file *file, char *buf, + size_t count, loff_t * ppos) +{ + unsigned char data; + + if (count < 0) + return -EFAULT; + if (count == 0) + return 0; + + data = cpustate_get_state(); + if (copy_to_user(buf, &data, sizeof(unsigned char))) + return -EFAULT; + return sizeof(unsigned char); +} + +static ssize_t cpustate_write(struct file *file, const char *buf, + size_t count, loff_t * ppos) +{ + unsigned char data; + + if (count < 0) + return -EFAULT; + + if (count == 0) + return 0; + + if (copy_from_user((unsigned char *)&data, buf, sizeof(unsigned char))) + return -EFAULT; + + cpustate_set_state(data); + return sizeof(unsigned char); +} + +static int cpustate_open(struct inode *inode, struct file *file) +{ + return cpustate_get_ref((file->f_flags & O_EXCL)); +} + +static int cpustate_release(struct inode *inode, struct file *file) +{ + return cpustate_free_ref(); +} + +/* + * Info exported via "/proc/sky_cpustate". + */ +static int cpustate_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + char *p = page; + int len = 0; + + p += sprintf(p, "CPU State: %04x\n", cpustate_get_state()); + len = p - page; + + if (len <= off + count) + *eof = 1; + *start = page + off; + len -= off; + if (len > count) + len = count; + if (len < 0) + len = 0; + return len; +} + +static struct device_driver hdpu_cpustate_driver = { + .name = HDPU_CPUSTATE_NAME, + .bus = &platform_bus_type, + .probe = hdpu_cpustate_probe, + .remove = hdpu_cpustate_remove, +}; + +/* + * The various file operations we support. + */ +static struct file_operations cpustate_fops = { + owner:THIS_MODULE, + open:cpustate_open, + release:cpustate_release, + read:cpustate_read, + write:cpustate_write, + fasync:NULL, + poll:NULL, + ioctl:NULL, + llseek:no_llseek, + +}; + +static struct miscdevice cpustate_dev = { + MISC_DYNAMIC_MINOR, + "sky_cpustate", + &cpustate_fops +}; + +static int hdpu_cpustate_probe(struct device *ddev) +{ + struct platform_device *pdev = to_platform_device(ddev); + struct resource *res; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + cpustate.set_addr = (unsigned long *)res->start; + cpustate.clr_addr = (unsigned long *)res->end - 1; + + misc_register(&cpustate_dev); + create_proc_read_entry("sky_cpustate", 0, 0, cpustate_read_proc, NULL); + + printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n"); + return 0; +} +static int hdpu_cpustate_remove(struct device *ddev) +{ + + cpustate.set_addr = 0; + cpustate.clr_addr = 0; + + remove_proc_entry("sky_cpustate", NULL); + misc_deregister(&cpustate_dev); + return 0; + +} + +static int __init cpustate_init(void) +{ + int rc; + rc = driver_register(&hdpu_cpustate_driver); + return rc; +} + +static void __exit cpustate_exit(void) +{ + driver_unregister(&hdpu_cpustate_driver); +} + +module_init(cpustate_init); +module_exit(cpustate_exit); + +MODULE_AUTHOR("Brian Waite"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/misc/hdpuftrs/hdpu_nexus.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,111 @@ +/* + * Sky Nexus Register Driver + * + * Copyright (C) 2002 Brian Waite + * + * This driver allows reading the Nexus register + * It exports the /proc/sky_chassis_id and also + * /proc/sky_slot_id pseudo-file for status information. + * + * 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. + * + */ + +#include +#include +#include +#include +#include +#include + +#include + +static int hdpu_nexus_probe(struct device *ddev); +static int hdpu_nexus_remove(struct device *ddev); + +static struct proc_dir_entry *hdpu_slot_id; +static struct proc_dir_entry *hdpu_chassis_id; +static int slot_id = -1; +static int chassis_id = -1; + +static struct device_driver hdpu_nexus_driver = { + .name = HDPU_NEXUS_NAME, + .bus = &platform_bus_type, + .probe = hdpu_nexus_probe, + .remove = hdpu_nexus_remove, +}; + +int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset, + int buffer_length, int *zero, void *ptr) +{ + + if (offset > 0) + return 0; + return sprintf(buffer, "%d\n", slot_id); +} + +int hdpu_chassis_id_read(char *buffer, char **buffer_location, off_t offset, + int buffer_length, int *zero, void *ptr) +{ + + if (offset > 0) + return 0; + return sprintf(buffer, "%d\n", chassis_id); +} + +static int hdpu_nexus_probe(struct device *ddev) +{ + struct platform_device *pdev = to_platform_device(ddev); + struct resource *res; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + int *nexus_id_addr; + nexus_id_addr = + ioremap(res->start, (unsigned long)(res->end - res->start)); + if (nexus_id_addr) { + slot_id = (*nexus_id_addr >> 8) & 0x1f; + chassis_id = *nexus_id_addr & 0xff; + iounmap(nexus_id_addr); + } else + printk("Could not map slot id\n"); + hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root); + hdpu_slot_id->read_proc = hdpu_slot_id_read; + hdpu_slot_id->nlink = 1; + + hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root); + hdpu_chassis_id->read_proc = hdpu_chassis_id_read; + hdpu_chassis_id->nlink = 1; + return 0; +} + +static int hdpu_nexus_remove(struct device *ddev) +{ + slot_id = -1; + chassis_id = -1; + remove_proc_entry("sky_slot_id", &proc_root); + remove_proc_entry("sky_chassis_id", &proc_root); + hdpu_slot_id = 0; + hdpu_chassis_id = 0; + return 0; +} + +static int __init nexus_init(void) +{ + int rc; + rc = driver_register(&hdpu_nexus_driver); + return rc; +} + +static void __exit nexus_exit(void) +{ + driver_unregister(&hdpu_nexus_driver); +} + +module_init(nexus_init); +module_exit(nexus_exit); + +MODULE_AUTHOR("Brian Waite"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c --- a/drivers/mmc/mmc_block.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/mmc/mmc_block.c 2005-03-30 16:58:50 -08:00 @@ -437,7 +437,7 @@ } #ifdef CONFIG_PM -static int mmc_blk_suspend(struct mmc_card *card, u32 state) +static int mmc_blk_suspend(struct mmc_card *card, pm_message_t state) { struct mmc_blk_data *md = mmc_get_drvdata(card); diff -Nru a/drivers/mmc/mmc_sysfs.c b/drivers/mmc/mmc_sysfs.c --- a/drivers/mmc/mmc_sysfs.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/mmc/mmc_sysfs.c 2005-03-30 16:58:49 -08:00 @@ -109,7 +109,7 @@ return 0; } -static int mmc_bus_suspend(struct device *dev, u32 state) +static int mmc_bus_suspend(struct device *dev, pm_message_t state) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = dev_to_mmc_card(dev); diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/net/8139too.c 2005-03-30 16:58:47 -08:00 @@ -749,7 +749,6 @@ pci_release_regions (pdev); free_netdev(dev); - pci_disable_device(pdev); pci_set_drvdata (pdev, NULL); } @@ -778,7 +777,7 @@ struct net_device *dev; struct rtl8139_private *tp; u8 tmp8; - int rc; + int rc, disable_dev_on_err = 0; unsigned int i; unsigned long pio_start, pio_end, pio_flags, pio_len; unsigned long mmio_start, mmio_end, mmio_flags, mmio_len; @@ -850,6 +849,7 @@ rc = pci_request_regions (pdev, "8139too"); if (rc) goto err_out; + disable_dev_on_err = 1; /* enable PCI bus-mastering */ pci_set_master (pdev); @@ -935,6 +935,8 @@ err_out: __rtl8139_cleanup_dev (dev); + if (disable_dev_on_err) + pci_disable_device (pdev); return rc; } @@ -1112,6 +1114,7 @@ err_out: __rtl8139_cleanup_dev (dev); + pci_disable_device (pdev); return i; } @@ -1125,6 +1128,7 @@ unregister_netdev (dev); __rtl8139_cleanup_dev (dev); + pci_disable_device (pdev); } diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/net/Kconfig 2005-03-30 16:58:50 -08:00 @@ -44,6 +44,7 @@ config BONDING tristate "Bonding driver support" depends on NETDEVICES + depends on INET ---help--- Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet Channels together. This is called 'Etherchannel' by Cisco, @@ -102,29 +103,6 @@ If you don't know what to use this for, you don't need it. -config ETHERTAP - tristate "Ethertap network tap" - depends on NETDEVICES && EXPERIMENTAL && NETLINK_DEV - ---help--- - If you say Y here (and have said Y to "Kernel/User network link - driver", above) and create a character special file /dev/tap0 with - major number 36 and minor number 16 using mknod ("man mknod"), you - will be able to have a user space program read and write raw - Ethernet frames from/to that special file. tap0 can be configured - with ifconfig and route like any other Ethernet device but it is not - connected to any physical LAN; everything written by the user to - /dev/tap0 is treated by the kernel as if it had come in from a LAN - to the device tap0; everything the kernel wants to send out over the - device tap0 can instead be read by the user from /dev/tap0: the user - mode program replaces the LAN that would be attached to an ordinary - Ethernet device. Please read the file - for more information. - - To compile this driver as a module, choose M here: the module - will be called ethertap. - - If you don't know what to use this for, you don't need it. - config NET_SB1000 tristate "General Instruments Surfboard 1000" depends on NETDEVICES && PNP @@ -158,7 +136,7 @@ # menu "Ethernet (10 or 100Mbit)" - depends on NETDEVICES + depends on NETDEVICES && !UML config NET_ETHERNET bool "Ethernet (10 or 100Mbit)" @@ -635,7 +613,7 @@ will be called 3c507. config EL3 - tristate "3c509/3c529 (MCA)/3c569B (98)/3c579 \"EtherLink III\" support" + tristate "3c509/3c529 (MCA)/3c579 \"EtherLink III\" support" depends on NET_VENDOR_3COM && (ISA || EISA || MCA) ---help--- If you have a network (Ethernet) card belonging to the 3Com @@ -899,7 +877,7 @@ source "drivers/net/tulip/Kconfig" config AT1700 - tristate "AT1700/1720/RE1000Plus(C-Bus) support (EXPERIMENTAL)" + tristate "AT1700/1720 support (EXPERIMENTAL)" depends on NET_ETHERNET && (ISA || MCA_LEGACY) && EXPERIMENTAL select CRC32 ---help--- @@ -1790,7 +1768,7 @@ # menu "Ethernet (1000 Mbit)" - depends on NETDEVICES + depends on NETDEVICES && !UML config ACENIC tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support" @@ -2100,7 +2078,7 @@ # menu "Ethernet (10000 Mbit)" - depends on NETDEVICES + depends on NETDEVICES && !UML config IXGB tristate "Intel(R) PRO/10GbE support" @@ -2179,11 +2157,13 @@ endmenu +if !UML source "drivers/net/tokenring/Kconfig" source "drivers/net/wireless/Kconfig" source "drivers/net/pcmcia/Kconfig" +endif source "drivers/net/wan/Kconfig" diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile --- a/drivers/net/Makefile 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/Makefile 2005-03-30 16:58:48 -08:00 @@ -68,7 +68,6 @@ obj-$(CONFIG_HAMACHI) += hamachi.o obj-$(CONFIG_NET) += Space.o loopback.o obj-$(CONFIG_SEEQ8005) += seeq8005.o -obj-$(CONFIG_ETHERTAP) += ethertap.o obj-$(CONFIG_NET_SB1000) += sb1000.o obj-$(CONFIG_MAC8390) += mac8390.o 8390.o obj-$(CONFIG_APNE) += apne.o 8390.o diff -Nru a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c --- a/drivers/net/arcnet/arcnet.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/arcnet/arcnet.c 2005-03-30 16:58:49 -08:00 @@ -253,7 +253,7 @@ BUGLVL(D_DURING) { BUGMSG(D_DURING, "release_arcbuf: freed #%d; buffer queue is now: ", bufnum); - for (i = lp->next_buf; i != lp->first_free_buf; i = ++i % 5) + for (i = lp->next_buf; i != lp->first_free_buf; i = (i+1) % 5) BUGMSG2(D_DURING, "#%d ", lp->buf_queue[i]); BUGMSG2(D_DURING, "\n"); } @@ -289,7 +289,7 @@ BUGLVL(D_DURING) { BUGMSG(D_DURING, "get_arcbuf: got #%d; buffer queue is now: ", buf); - for (i = lp->next_buf; i != lp->first_free_buf; i = ++i % 5) + for (i = lp->next_buf; i != lp->first_free_buf; i = (i+1) % 5) BUGMSG2(D_DURING, "#%d ", lp->buf_queue[i]); BUGMSG2(D_DURING, "\n"); } diff -Nru a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c --- a/drivers/net/bonding/bond_alb.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/bonding/bond_alb.c 2005-03-30 16:58:49 -08:00 @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -1300,7 +1301,8 @@ switch (ntohs(skb->protocol)) { case ETH_P_IP: if ((memcmp(eth_data->h_dest, mac_bcast, ETH_ALEN) == 0) || - (skb->nh.iph->daddr == ip_bcast)) { + (skb->nh.iph->daddr == ip_bcast) || + (skb->nh.iph->protocol == IPPROTO_IGMP)) { do_tx_balance = 0; break; } diff -Nru a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c --- a/drivers/net/bonding/bond_main.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/net/bonding/bond_main.c 2005-03-30 16:58:50 -08:00 @@ -4297,6 +4297,10 @@ */ bond_dev->features |= NETIF_F_VLAN_CHALLENGED; + /* don't acquire bond device's xmit_lock when + * transmitting */ + bond_dev->features |= NETIF_F_LLTX; + /* By default, we declare the bond to be fully * VLAN hardware accelerated capable. Special * care is taken in the various xmit functions diff -Nru a/drivers/net/depca.c b/drivers/net/depca.c --- a/drivers/net/depca.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/depca.c 2005-03-30 16:58:48 -08:00 @@ -1827,7 +1827,7 @@ /* set up the buffer descriptors */ len = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len; - for (i = entry; i != end; i = (++i) & lp->txRingMask) { + for (i = entry; i != end; i = (i+1) & lp->txRingMask) { /* clean out flags */ writel(readl(&lp->tx_ring[i].base) & ~T_FLAGS, &lp->tx_ring[i].base); writew(0x0000, &lp->tx_ring[i].misc); /* clears other error flags */ diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c --- a/drivers/net/eepro100.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/eepro100.c 2005-03-30 16:58:49 -08:00 @@ -144,8 +144,8 @@ MODULE_PARM_DESC(congenb, "Enable congestion control (1)"); MODULE_PARM_DESC(txfifo, "Tx FIFO threshold in 4 byte units, (0-15)"); MODULE_PARM_DESC(rxfifo, "Rx FIFO threshold in 4 byte units, (0-15)"); -MODULE_PARM_DESC(txdmaccount, "Tx DMA burst length; 128 - disable (0-128)"); -MODULE_PARM_DESC(rxdmaccount, "Rx DMA burst length; 128 - disable (0-128)"); +MODULE_PARM_DESC(txdmacount, "Tx DMA burst length; 128 - disable (0-128)"); +MODULE_PARM_DESC(rxdmacount, "Rx DMA burst length; 128 - disable (0-128)"); MODULE_PARM_DESC(rx_copybreak, "copy breakpoint for copy-only-tiny-frames"); MODULE_PARM_DESC(max_interrupt_work, "maximum events handled per interrupt"); MODULE_PARM_DESC(multicast_filter_limit, "maximum number of filtered multicast addresses"); diff -Nru a/drivers/net/eql.c b/drivers/net/eql.c --- a/drivers/net/eql.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/net/eql.c 2005-03-30 16:58:50 -08:00 @@ -499,8 +499,6 @@ return -ENODEV; ret = -EINVAL; - if (!slave_dev) - return ret; spin_lock_bh(&eql->queue.lock); if (eql_is_slave(slave_dev)) { @@ -536,8 +534,6 @@ return -ENODEV; ret = -EINVAL; - if (!slave_dev) - return ret; eql = netdev_priv(dev); spin_lock_bh(&eql->queue.lock); diff -Nru a/drivers/net/ethertap.c b/drivers/net/ethertap.c --- a/drivers/net/ethertap.c 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,390 +0,0 @@ -/* - * Ethertap: A network device for bouncing packets via user space - * - * This is a very simple ethernet driver. It bounces ethernet frames - * to user space on /dev/tap0->/dev/tap15 and expects ethernet frames - * to be written back to it. By default it does not ARP. If you turn ARP - * on it will attempt to ARP the user space and reply to ARPS from the - * user space. - * - * As this is an ethernet device you can use it for appletalk, IPX etc - * even for building bridging tunnels. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -/* - * Index to functions. - */ - -static int ethertap_open(struct net_device *dev); -static int ethertap_start_xmit(struct sk_buff *skb, struct net_device *dev); -static int ethertap_close(struct net_device *dev); -static struct net_device_stats *ethertap_get_stats(struct net_device *dev); -static void ethertap_rx(struct sock *sk, int len); -#ifdef CONFIG_ETHERTAP_MC -static void set_multicast_list(struct net_device *dev); -#endif - -static int ethertap_debug; - -static int max_taps = 1; -module_param(max_taps, int, 0); -MODULE_PARM_DESC(max_taps,"Max number of ethernet tap devices"); - -static struct net_device **tap_map; /* Returns the tap device for a given netlink */ - -/* - * Board-specific info in dev->priv. - */ - -struct net_local -{ - struct sock *nl; -#ifdef CONFIG_ETHERTAP_MC - __u32 groups; -#endif - struct net_device_stats stats; -}; - -/* - * To call this a probe is a bit misleading, however for real - * hardware it would have to check what was present. - */ -static int __init ethertap_probe(int unit) -{ - struct net_device *dev; - int err = -ENOMEM; - - dev = alloc_etherdev(sizeof(struct net_local)); - - if (!dev) - goto out; - - SET_MODULE_OWNER(dev); - - sprintf(dev->name, "tap%d", unit); - dev->base_addr = unit + NETLINK_TAPBASE; - - netdev_boot_setup_check(dev); - - memcpy(dev->dev_addr, "\xFE\xFD\x00\x00\x00\x00", 6); - if (dev->mem_start & 0xf) - ethertap_debug = dev->mem_start & 0x7; - - /* - * The tap specific entries in the device structure. - */ - - dev->open = ethertap_open; - dev->hard_start_xmit = ethertap_start_xmit; - dev->stop = ethertap_close; - dev->get_stats = ethertap_get_stats; -#ifdef CONFIG_ETHERTAP_MC - dev->set_multicast_list = set_multicast_list; -#endif - - dev->tx_queue_len = 0; - dev->flags|=IFF_NOARP; - - err = register_netdev(dev); - if (err) - goto out_free; - - tap_map[unit]=dev; - return 0; -out_free: - free_netdev(dev); -out: - return err; -} - -/* - * Open/initialize the board. - */ - -static int ethertap_open(struct net_device *dev) -{ - struct net_local *lp = netdev_priv(dev); - - if (ethertap_debug > 2) - printk(KERN_DEBUG "%s: Doing ethertap_open()...\n", dev->name); - - lp->nl = netlink_kernel_create(dev->base_addr, ethertap_rx); - if (lp->nl == NULL) - return -ENOBUFS; - - netif_start_queue(dev); - return 0; -} - -#ifdef CONFIG_ETHERTAP_MC -static unsigned ethertap_mc_hash(__u8 *dest) -{ - unsigned idx = 0; - idx ^= dest[0]; - idx ^= dest[1]; - idx ^= dest[2]; - idx ^= dest[3]; - idx ^= dest[4]; - idx ^= dest[5]; - return 1U << (idx&0x1F); -} - -static void set_multicast_list(struct net_device *dev) -{ - unsigned groups = ~0; - struct net_local *lp = netdev_priv(dev); - - if (!(dev->flags&(IFF_NOARP|IFF_PROMISC|IFF_ALLMULTI))) { - struct dev_mc_list *dmi; - - groups = ethertap_mc_hash(dev->broadcast); - - for (dmi=dev->mc_list; dmi; dmi=dmi->next) { - if (dmi->dmi_addrlen != 6) - continue; - groups |= ethertap_mc_hash(dmi->dmi_addr); - } - } - lp->groups = groups; - if (lp->nl) - lp->nl->protinfo.af_netlink.groups = groups; -} -#endif - -/* - * We transmit by throwing the packet at netlink. We have to clone - * it for 2.0 so that we dev_kfree_skb() the locked original. - */ - -static int ethertap_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct net_local *lp = netdev_priv(dev); -#ifdef CONFIG_ETHERTAP_MC - struct ethhdr *eth = (struct ethhdr*)skb->data; -#endif - - if (skb_headroom(skb) < 2) { - static int once; - struct sk_buff *skb2; - - if (!once) { - once = 1; - printk(KERN_DEBUG "%s: not aligned xmit by protocol %04x\n", dev->name, skb->protocol); - } - - skb2 = skb_realloc_headroom(skb, 2); - dev_kfree_skb(skb); - if (skb2 == NULL) - return 0; - skb = skb2; - } - __skb_push(skb, 2); - - /* Make the same thing, which loopback does. */ - if (skb_shared(skb)) { - struct sk_buff *skb2 = skb; - skb = skb_clone(skb, GFP_ATOMIC); /* Clone the buffer */ - if (skb==NULL) { - dev_kfree_skb(skb2); - return 0; - } - dev_kfree_skb(skb2); - } - /* ... but do not orphan it here, netlink does it in any case. */ - - lp->stats.tx_bytes+=skb->len; - lp->stats.tx_packets++; - -#ifndef CONFIG_ETHERTAP_MC - netlink_broadcast(lp->nl, skb, 0, ~0, GFP_ATOMIC); -#else - if (dev->flags&IFF_NOARP) { - netlink_broadcast(lp->nl, skb, 0, ~0, GFP_ATOMIC); - return 0; - } - - if (!(eth->h_dest[0]&1)) { - /* Unicast packet */ - __u32 pid; - memcpy(&pid, eth->h_dest+2, 4); - netlink_unicast(lp->nl, skb, ntohl(pid), MSG_DONTWAIT); - } else - netlink_broadcast(lp->nl, skb, 0, ethertap_mc_hash(eth->h_dest), GFP_ATOMIC); -#endif - return 0; -} - -static __inline__ int ethertap_rx_skb(struct sk_buff *skb, struct net_device *dev) -{ - struct net_local *lp = netdev_priv(dev); -#ifdef CONFIG_ETHERTAP_MC - struct ethhdr *eth = (struct ethhdr*)(skb->data + 2); -#endif - int len = skb->len; - - if (len < 16) { - printk(KERN_DEBUG "%s : rx len = %d\n", dev->name, len); - kfree_skb(skb); - return -EINVAL; - } - if (NETLINK_CREDS(skb)->uid) { - printk(KERN_INFO "%s : user %d\n", dev->name, NETLINK_CREDS(skb)->uid); - kfree_skb(skb); - return -EPERM; - } - -#ifdef CONFIG_ETHERTAP_MC - if (!(dev->flags&(IFF_NOARP|IFF_PROMISC))) { - int drop = 0; - - if (eth->h_dest[0]&1) { - if (!(ethertap_mc_hash(eth->h_dest)&lp->groups)) - drop = 1; - } else if (memcmp(eth->h_dest, dev->dev_addr, 6) != 0) - drop = 1; - - if (drop) { - if (ethertap_debug > 3) - printk(KERN_DEBUG "%s : not for us\n", dev->name); - kfree_skb(skb); - return -EINVAL; - } - } -#endif - - if (skb_shared(skb)) { - struct sk_buff *skb2 = skb; - skb = skb_clone(skb, GFP_KERNEL); /* Clone the buffer */ - if (skb==NULL) { - kfree_skb(skb2); - return -ENOBUFS; - } - kfree_skb(skb2); - } else - skb_orphan(skb); - - skb_pull(skb, 2); - skb->dev = dev; - skb->protocol=eth_type_trans(skb,dev); - memset(skb->cb, 0, sizeof(skb->cb)); - lp->stats.rx_packets++; - lp->stats.rx_bytes+=len; - netif_rx(skb); - dev->last_rx = jiffies; - return len; -} - -/* - * The typical workload of the driver: - * Handle the ether interface interrupts. - * - * (In this case handle the packets posted from user space..) - */ - -static void ethertap_rx(struct sock *sk, int len) -{ - unsigned unit = sk->sk_protocol - NETLINK_TAPBASE; - struct net_device *dev; - struct sk_buff *skb; - - if (unit >= max_taps || (dev = tap_map[unit]) == NULL) { - printk(KERN_CRIT "ethertap: bad unit %u!\n", unit); - skb_queue_purge(&sk->sk_receive_queue); - return; - } - - if (ethertap_debug > 3) - printk(KERN_DEBUG "%s: ethertap_rx()\n", dev->name); - - while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) - ethertap_rx_skb(skb, dev); -} - -static int ethertap_close(struct net_device *dev) -{ - struct net_local *lp = netdev_priv(dev); - struct sock *sk = lp->nl; - - if (ethertap_debug > 2) - printk(KERN_DEBUG "%s: Shutting down.\n", dev->name); - - netif_stop_queue(dev); - - if (sk) { - lp->nl = NULL; - sock_release(sk->sk_socket); - } - - return 0; -} - -static struct net_device_stats *ethertap_get_stats(struct net_device *dev) -{ - struct net_local *lp = netdev_priv(dev); - return &lp->stats; -} - - -static int __init ethertap_init(void) -{ - int i, err = 0; - - /* netlink can only hande 16 entries unless modified */ - if (max_taps > MAX_LINKS - NETLINK_TAPBASE) - return -E2BIG; - - tap_map = kmalloc(sizeof(struct net_device *)*max_taps, GFP_KERNEL); - if (!tap_map) - return -ENOMEM; - - for (i = 0; i < max_taps; i++) { - err = ethertap_probe(i); - if (err) { - while (--i > 0) { - unregister_netdev(tap_map[i]); - free_netdev(tap_map[i]); - } - break; - } - } - if (err) - kfree(tap_map); - return err; -} -module_init(ethertap_init); - -static void __exit ethertap_cleanup(void) -{ - int i; - - for (i = 0; i < max_taps; i++) { - struct net_device *dev = tap_map[i]; - if (dev) { - tap_map[i] = NULL; - unregister_netdev(dev); - free_netdev(dev); - } - } - kfree(tap_map); -} -module_exit(ethertap_cleanup); - -MODULE_LICENSE("GPL"); diff -Nru a/drivers/net/irda/act200l-sir.c b/drivers/net/irda/act200l-sir.c --- a/drivers/net/irda/act200l-sir.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/act200l-sir.c 2005-03-30 16:58:48 -08:00 @@ -240,7 +240,7 @@ dev->speed = 9600; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, state); + IRDA_ERROR("%s(), unknown state %d\n", __FUNCTION__, state); ret = -1; break; } diff -Nru a/drivers/net/irda/act200l.c b/drivers/net/irda/act200l.c --- a/drivers/net/irda/act200l.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/act200l.c 2005-03-30 16:58:48 -08:00 @@ -152,7 +152,8 @@ } break; case IRDA_TASK_CHILD_WAIT: - WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__); + IRDA_WARNING("%s(), resetting dongle timed out!\n", + __FUNCTION__); ret = -1; break; case IRDA_TASK_CHILD_DONE: @@ -197,7 +198,8 @@ self->speed_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->speed_task = NULL; ret = -1; @@ -263,7 +265,8 @@ self->reset_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->reset_task = NULL; ret = -1; diff -Nru a/drivers/net/irda/actisys.c b/drivers/net/irda/actisys.c --- a/drivers/net/irda/actisys.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/net/irda/actisys.c 2005-03-30 16:58:50 -08:00 @@ -227,7 +227,7 @@ dongle_t *self = (dongle_t *) task->instance; int ret = 0; - ASSERT(task != NULL, return -1;); + IRDA_ASSERT(task != NULL, return -1;); self->reset_task = task; @@ -254,7 +254,8 @@ self->speed = 9600; /* That's the default */ break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->reset_task = NULL; ret = -1; diff -Nru a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c --- a/drivers/net/irda/ali-ircc.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/ali-ircc.c 2005-03-30 16:58:48 -08:00 @@ -260,7 +260,8 @@ dev = alloc_irdadev(sizeof(*self)); if (dev == NULL) { - ERROR("%s(), can't allocate memory for control block!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate memory for control block!\n", + __FUNCTION__); return -ENOMEM; } @@ -283,7 +284,7 @@ /* Reserve the ioports that we need */ if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) { - WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__, + IRDA_WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__, self->io.fir_base); err = -ENODEV; goto err_out1; @@ -345,14 +346,14 @@ err = register_netdev(dev); if (err) { - ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); + IRDA_ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); goto err_out4; } - MESSAGE("IrDA: Registered device %s\n", dev->name); + IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); /* Check dongle id */ dongle_id = ali_ircc_read_dongle_id(i, info); - MESSAGE("%s(), %s, Found dongle: %s\n", __FUNCTION__, driver_name, dongle_types[dongle_id]); + IRDA_MESSAGE("%s(), %s, Found dongle: %s\n", __FUNCTION__, driver_name, dongle_types[dongle_id]); self->io.dongle_id = dongle_id; @@ -391,7 +392,7 @@ IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.fir_base; @@ -489,7 +490,7 @@ info->dma = reg & 0x07; if(info->dma == 0x04) - WARNING("%s(), No DMA channel assigned !\n", __FUNCTION__); + IRDA_WARNING("%s(), No DMA channel assigned !\n", __FUNCTION__); else IRDA_DEBUG(2, "%s(), probing dma=%d\n", __FUNCTION__, info->dma); @@ -546,11 +547,11 @@ /* Should be 0x00 in the M1535/M1535D */ if(version != 0x00) { - ERROR("%s, Wrong chip version %02x\n", driver_name, version); + IRDA_ERROR("%s, Wrong chip version %02x\n", driver_name, version); return -1; } - // MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, info->cfg_base); + // IRDA_MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, info->cfg_base); /* Set FIR FIFO Threshold Register */ switch_bank(iobase, BANK1); @@ -581,7 +582,7 @@ /* Switch to SIR space */ FIR2SIR(iobase); - MESSAGE("%s, driver loaded (Benjamin Kong)\n", driver_name); + IRDA_MESSAGE("%s, driver loaded (Benjamin Kong)\n", driver_name); /* Enable receive interrupts */ // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM @@ -645,7 +646,7 @@ IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); if (!dev) { - WARNING("%s: irq %d for unknown device.\n", driver_name, irq); + IRDA_WARNING("%s: irq %d for unknown device.\n", driver_name, irq); return IRQ_NONE; } @@ -851,7 +852,7 @@ int iobase; IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.sir_base; @@ -885,7 +886,7 @@ int actual = 0; int iobase; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); @@ -994,7 +995,7 @@ IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); dev = self->netdev; iobase = self->io.fir_base; @@ -1035,7 +1036,7 @@ IRDA_DEBUG(1, "%s(), Setting speed to: %d\n", __FUNCTION__ , speed); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.sir_base; @@ -1315,19 +1316,19 @@ IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct ali_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; /* Request IRQ and install Interrupt Handler */ if (request_irq(self->io.irq, ali_ircc_interrupt, 0, dev->name, dev)) { - WARNING("%s, unable to allocate irq=%d\n", driver_name, - self->io.irq); + IRDA_WARNING("%s, unable to allocate irq=%d\n", driver_name, + self->io.irq); return -EAGAIN; } @@ -1336,8 +1337,8 @@ * failure. */ if (request_dma(self->io.dma, dev->name)) { - WARNING("%s, unable to allocate dma=%d\n", driver_name, - self->io.dma); + IRDA_WARNING("%s, unable to allocate dma=%d\n", driver_name, + self->io.dma); free_irq(self->io.irq, self); return -EAGAIN; } @@ -1376,10 +1377,10 @@ IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct ali_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); /* Stop device */ netif_stop_queue(dev); @@ -1643,7 +1644,7 @@ if((inb(iobase+FIR_LSR) & LSR_FRAME_ABORT) == LSR_FRAME_ABORT) { - ERROR("%s(), ********* LSR_FRAME_ABORT *********\n", __FUNCTION__); + IRDA_ERROR("%s(), ********* LSR_FRAME_ABORT *********\n", __FUNCTION__); self->stats.tx_errors++; self->stats.tx_fifo_errors++; } @@ -1890,8 +1891,9 @@ skb = dev_alloc_skb(len+1); if (skb == NULL) { - WARNING("%s(), memory squeeze, " - "dropping frame.\n", __FUNCTION__); + IRDA_WARNING("%s(), memory squeeze, " + "dropping frame.\n", + __FUNCTION__); self->stats.rx_dropped++; return FALSE; @@ -1940,10 +1942,10 @@ IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - ASSERT(dev != NULL, return 0;); + IRDA_ASSERT(dev != NULL, return 0;); self = (struct ali_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.sir_base; @@ -2008,11 +2010,11 @@ IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd); @@ -2065,7 +2067,7 @@ IRDA_DEBUG(2, "%s(), ---------------- Start -----------------\n", __FUNCTION__ ); - ASSERT(self != NULL, return FALSE;); + IRDA_ASSERT(self != NULL, return FALSE;); spin_lock_irqsave(&self->lock, flags); @@ -2109,7 +2111,7 @@ { IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - MESSAGE("%s, Suspending\n", driver_name); + IRDA_MESSAGE("%s, Suspending\n", driver_name); if (self->io.suspended) return; @@ -2130,7 +2132,7 @@ ali_ircc_net_open(self->netdev); - MESSAGE("%s, Waking up\n", driver_name); + IRDA_MESSAGE("%s, Waking up\n", driver_name); self->io.suspended = 0; diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c --- a/drivers/net/irda/donauboe.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/donauboe.c 2005-03-30 16:58:48 -08:00 @@ -587,9 +587,9 @@ /*Find out where the rings live */ physaddr = virt_to_bus (self->ring); - ASSERT ((physaddr & 0x3ff) == 0, - printk (KERN_ERR DRIVER_NAME "ring not correctly aligned\n"); - return;); + IRDA_ASSERT ((physaddr & 0x3ff) == 0, + printk (KERN_ERR DRIVER_NAME "ring not correctly aligned\n"); + return;); OUTB ((physaddr >> 10) & 0xff, OBOE_RING_BASE0); OUTB ((physaddr >> 18) & 0xff, OBOE_RING_BASE1); @@ -994,7 +994,7 @@ self = (struct toshoboe_cb *) dev->priv; - ASSERT (self != NULL, return 0; ); + IRDA_ASSERT (self != NULL, return 0; ); IRDA_DEBUG (1, "%s.tx:%x(%x)%x\n", __FUNCTION__ ,skb->len,self->txpending,INB (OBOE_ENABLEH)); @@ -1360,10 +1360,10 @@ IRDA_DEBUG (4, "%s()\n", __FUNCTION__); - ASSERT (dev != NULL, return -1; ); + IRDA_ASSERT (dev != NULL, return -1; ); self = (struct toshoboe_cb *) dev->priv; - ASSERT (self != NULL, return 0; ); + IRDA_ASSERT (self != NULL, return 0; ); if (self->async) return -EBUSY; @@ -1402,7 +1402,7 @@ IRDA_DEBUG (4, "%s()\n", __FUNCTION__); - ASSERT (dev != NULL, return -1; ); + IRDA_ASSERT (dev != NULL, return -1; ); self = (struct toshoboe_cb *) dev->priv; /* Stop device */ @@ -1439,11 +1439,11 @@ unsigned long flags; int ret = 0; - ASSERT (dev != NULL, return -1; ); + IRDA_ASSERT (dev != NULL, return -1; ); self = dev->priv; - ASSERT (self != NULL, return -1; ); + IRDA_ASSERT (self != NULL, return -1; ); IRDA_DEBUG (5, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd); @@ -1509,7 +1509,7 @@ IRDA_DEBUG (4, "%s()\n", __FUNCTION__); - ASSERT (self != NULL, return; ); + IRDA_ASSERT (self != NULL, return; ); if (!self->stopped) { diff -Nru a/drivers/net/irda/girbil-sir.c b/drivers/net/irda/girbil-sir.c --- a/drivers/net/irda/girbil-sir.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/girbil-sir.c 2005-03-30 16:58:48 -08:00 @@ -179,7 +179,7 @@ break; default: - ERROR("%s - undefined state %d\n", __FUNCTION__, state); + IRDA_ERROR("%s - undefined state %d\n", __FUNCTION__, state); ret = -EINVAL; break; } @@ -241,7 +241,7 @@ break; default: - ERROR("%s(), undefined state %d\n", __FUNCTION__, state); + IRDA_ERROR("%s(), undefined state %d\n", __FUNCTION__, state); ret = -1; break; } diff -Nru a/drivers/net/irda/girbil.c b/drivers/net/irda/girbil.c --- a/drivers/net/irda/girbil.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/net/irda/girbil.c 2005-03-30 16:58:50 -08:00 @@ -123,7 +123,8 @@ } break; case IRDA_TASK_CHILD_WAIT: - WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__); + IRDA_WARNING("%s(), resetting dongle timed out!\n", + __FUNCTION__); ret = -1; break; case IRDA_TASK_CHILD_DONE: @@ -162,7 +163,8 @@ self->speed_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->speed_task = NULL; ret = -1; @@ -215,7 +217,8 @@ self->reset_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->reset_task = NULL; ret = -1; diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/irda-usb.c 2005-03-30 16:58:48 -08:00 @@ -251,7 +251,7 @@ /* Grab the speed URB */ urb = self->speed_urb; if (urb->status != 0) { - WARNING("%s(), URB still in use!\n", __FUNCTION__); + IRDA_WARNING("%s(), URB still in use!\n", __FUNCTION__); return; } @@ -271,7 +271,7 @@ /* Irq disabled -> GFP_ATOMIC */ if ((ret = usb_submit_urb(urb, GFP_ATOMIC))) { - WARNING("%s(), failed Speed URB\n", __FUNCTION__); + IRDA_WARNING("%s(), failed Speed URB\n", __FUNCTION__); } } @@ -287,9 +287,9 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); /* We should always have a context */ - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); /* We should always be called for the speed URB */ - ASSERT(urb == self->speed_urb, return;); + IRDA_ASSERT(urb == self->speed_urb, return;); /* Check for timeout and other USB nasties */ if (urb->status != 0) { @@ -374,7 +374,7 @@ } if (urb->status != 0) { - WARNING("%s(), URB still in use!\n", __FUNCTION__); + IRDA_WARNING("%s(), URB still in use!\n", __FUNCTION__); goto drop; } @@ -385,7 +385,7 @@ if (skb_headroom(skb) < USB_IRDA_HEADER) { IRDA_DEBUG(0, "%s(), Insuficient skb headroom.\n", __FUNCTION__); if (skb_cow(skb, USB_IRDA_HEADER)) { - WARNING("%s(), failed skb_cow() !!!\n", __FUNCTION__); + IRDA_WARNING("%s(), failed skb_cow() !!!\n", __FUNCTION__); goto drop; } } @@ -457,7 +457,7 @@ /* Ask USB to send the packet - Irq disabled -> GFP_ATOMIC */ if ((res = usb_submit_urb(urb, GFP_ATOMIC))) { - WARNING("%s(), failed Tx URB\n", __FUNCTION__); + IRDA_WARNING("%s(), failed Tx URB\n", __FUNCTION__); self->stats.tx_errors++; /* Let USB recover : We will catch that in the watchdog */ /*netif_start_queue(netdev);*/ @@ -492,9 +492,9 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); /* We should always have a context */ - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); /* We should always be called for the speed URB */ - ASSERT(urb == self->tx_urb, return;); + IRDA_ASSERT(urb == self->tx_urb, return;); /* Free up the skb */ dev_kfree_skb_any(skb); @@ -566,14 +566,14 @@ int done = 0; /* If we have made any progress */ IRDA_DEBUG(0, "%s(), Network layer thinks we timed out!\n", __FUNCTION__); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); /* Protect us from USB callbacks, net Tx and else. */ spin_lock_irqsave(&self->lock, flags); /* self->present *MUST* be read under spinlock */ if (!self->present) { - WARNING("%s(), device not present!\n", __FUNCTION__); + IRDA_WARNING("%s(), device not present!\n", __FUNCTION__); netif_stop_queue(netdev); spin_unlock_irqrestore(&self->lock, flags); return; @@ -699,8 +699,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); /* This should never happen */ - ASSERT(skb != NULL, return;); - ASSERT(urb != NULL, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(urb != NULL, return;); /* Save ourselves in the skb */ cb = (struct irda_skb_cb *) skb->cb; @@ -720,7 +720,8 @@ if (ret) { /* If this ever happen, we are in deep s***. * Basically, the Rx path will stop... */ - WARNING("%s(), Failed to submit Rx URB %d\n", __FUNCTION__, ret); + IRDA_WARNING("%s(), Failed to submit Rx URB %d\n", + __FUNCTION__, ret); } } @@ -744,9 +745,9 @@ /* Find ourselves */ cb = (struct irda_skb_cb *) skb->cb; - ASSERT(cb != NULL, return;); + IRDA_ASSERT(cb != NULL, return;); self = (struct irda_usb_cb *) cb->context; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); /* If the network is closed or the device gone, stop everything */ if ((!self->netopen) || (!self->present)) { @@ -777,7 +778,7 @@ /* Check for empty frames */ if (urb->actual_length <= USB_IRDA_HEADER) { - WARNING("%s(), empty frame!\n", __FUNCTION__); + IRDA_WARNING("%s(), empty frame!\n", __FUNCTION__); goto done; } @@ -910,13 +911,13 @@ IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(netdev != NULL, return -1;); + IRDA_ASSERT(netdev != NULL, return -1;); self = (struct irda_usb_cb *) netdev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* Can only open the device if it's there */ if(!self->present) { - WARNING("%s(), device not present!\n", __FUNCTION__); + IRDA_WARNING("%s(), device not present!\n", __FUNCTION__); return -1; } @@ -938,7 +939,7 @@ */ sprintf(hwname, "usb#%d", self->usbdev->devnum); self->irlap = irlap_open(netdev, &self->qos, hwname); - ASSERT(self->irlap != NULL, return -1;); + IRDA_ASSERT(self->irlap != NULL, return -1;); /* Allow IrLAP to send data to us */ netif_start_queue(netdev); @@ -957,7 +958,8 @@ if (!skb) { /* If this ever happen, we are in deep s***. * Basically, we can't start the Rx path... */ - WARNING("%s(), Failed to allocate Rx skb\n", __FUNCTION__); + IRDA_WARNING("%s(), Failed to allocate Rx skb\n", + __FUNCTION__); return -1; } //skb_reserve(newskb, USB_IRDA_HEADER - 1); @@ -982,9 +984,9 @@ IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(netdev != NULL, return -1;); + IRDA_ASSERT(netdev != NULL, return -1;); self = (struct irda_usb_cb *) netdev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* Clear this flag *before* unlinking the urbs and *before* * stopping the network Tx queue - Jean II */ @@ -1030,9 +1032,9 @@ struct irda_usb_cb *self; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd); @@ -1239,7 +1241,7 @@ /* This is our interrupt endpoint */ self->bulk_int_ep = ep; } else { - ERROR("%s(), Unrecognised endpoint %02X.\n", __FUNCTION__, ep); + IRDA_ERROR("%s(), Unrecognised endpoint %02X.\n", __FUNCTION__, ep); } } } @@ -1247,7 +1249,7 @@ IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", __FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); /* Should be 8, 16, 32 or 64 bytes */ - ASSERT(self->bulk_out_mtu == 64, ;); + IRDA_ASSERT(self->bulk_out_mtu == 64, ;); return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0)); } @@ -1312,11 +1314,11 @@ IRDA_DEBUG(1, "%s(), ret=%d\n", __FUNCTION__, ret); if (ret < sizeof(*desc)) { - WARNING("usb-irda: class_descriptor read %s (%d)\n", - (ret<0) ? "failed" : "too short", ret); + IRDA_WARNING("usb-irda: class_descriptor read %s (%d)\n", + (ret<0) ? "failed" : "too short", ret); } else if (desc->bDescriptorType != USB_DT_IRDA) { - WARNING("usb-irda: bad class_descriptor type\n"); + IRDA_WARNING("usb-irda: bad class_descriptor type\n"); } else { #ifdef IU_DUMP_CLASS_DESC @@ -1359,9 +1361,9 @@ * don't need to check if the dongle is really ours. * Jean II */ - MESSAGE("IRDA-USB found at address %d, Vendor: %x, Product: %x\n", - dev->devnum, le16_to_cpu(dev->descriptor.idVendor), - le16_to_cpu(dev->descriptor.idProduct)); + IRDA_MESSAGE("IRDA-USB found at address %d, Vendor: %x, Product: %x\n", + dev->devnum, le16_to_cpu(dev->descriptor.idVendor), + le16_to_cpu(dev->descriptor.idProduct)); net = alloc_irdadev(sizeof(*self)); if (!net) @@ -1421,7 +1423,7 @@ interface = intf->cur_altsetting; if(!irda_usb_parse_endpoints(self, interface->endpoint, interface->desc.bNumEndpoints)) { - ERROR("%s(), Bogus endpoints...\n", __FUNCTION__); + IRDA_ERROR("%s(), Bogus endpoints...\n", __FUNCTION__); ret = -EIO; goto err_out_3; } @@ -1453,7 +1455,7 @@ if (ret) goto err_out_4; - MESSAGE("IrDA: Registered device %s\n", net->name); + IRDA_MESSAGE("IrDA: Registered device %s\n", net->name); usb_set_intfdata(intf, self); return 0; @@ -1573,7 +1575,7 @@ if (ret < 0) return ret; - MESSAGE("USB IrDA support registered\n"); + IRDA_MESSAGE("USB IrDA support registered\n"); return 0; } module_init(usb_irda_init); diff -Nru a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c --- a/drivers/net/irda/irport.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/irda/irport.c 2005-03-30 16:58:49 -08:00 @@ -114,8 +114,8 @@ */ dev = alloc_irdadev(sizeof(struct irport_cb)); if (!dev) { - ERROR("%s(), can't allocate memory for " - "irda device!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate memory for " + "irda device!\n", __FUNCTION__); goto err_out2; } @@ -147,8 +147,8 @@ self->rx_buff.skb = __dev_alloc_skb(self->rx_buff.truesize, GFP_KERNEL); if (self->rx_buff.skb == NULL) { - ERROR("%s(), can't allocate memory for " - "receive buffer!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate memory for " + "receive buffer!\n", __FUNCTION__); goto err_out3; } skb_reserve(self->rx_buff.skb, 1); @@ -168,8 +168,8 @@ self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize, GFP_KERNEL); if (self->tx_buff.head == NULL) { - ERROR("%s(), can't allocate memory for " - "transmit buffer!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate memory for " + "transmit buffer!\n", __FUNCTION__); goto err_out4; } memset(self->tx_buff.head, 0, self->tx_buff.truesize); @@ -198,10 +198,10 @@ dev->irq = irq; if (register_netdev(dev)) { - ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); + IRDA_ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); goto err_out5; } - MESSAGE("IrDA: Registered device %s (irport io=0x%X irq=%d)\n", + IRDA_MESSAGE("IrDA: Registered device %s (irport io=0x%X irq=%d)\n", dev->name, iobase, irq); return self; @@ -220,7 +220,7 @@ static int irport_close(struct irport_cb *self) { - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* We are not using any dongle anymore! */ if (self->dongle) @@ -340,8 +340,8 @@ unsigned int lcr; /* Line control reg */ int divisor; - ASSERT(self != NULL, return;); - ASSERT(speed != 0, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(speed != 0, return;); IRDA_DEBUG(1, "%s(), Setting speed to: %d - iobase=%#x\n", __FUNCTION__, speed, self->io.sir_base); @@ -395,7 +395,7 @@ self = (struct irport_cb *) task->instance; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* Locking notes : this function may be called from irq context with * spinlock, via irport_write_wakeup(), or from non-interrupt without @@ -444,7 +444,7 @@ irda_task_next_state(task, IRDA_TASK_CHILD_DONE); break; case IRDA_TASK_CHILD_WAIT: - WARNING("%s(), changing speed of dongle timed out!\n", __FUNCTION__); + IRDA_WARNING("%s(), changing speed of dongle timed out!\n", __FUNCTION__); ret = -1; break; case IRDA_TASK_CHILD_DONE: @@ -454,7 +454,8 @@ irda_task_next_state(task, IRDA_TASK_DONE); break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); ret = -1; break; @@ -481,8 +482,8 @@ self = (struct irport_cb *) task->instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->netdev != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->netdev != NULL, return -1;); /* Finished changing speed, so we are not busy any longer */ /* Signal network layer so it can try to send the frame */ @@ -507,10 +508,10 @@ unsigned long flags; self = (struct irport_cb *) dev->priv; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.sir_base; - WARNING("%s: transmit timed out, jiffies = %ld, trans_start = %ld\n", + IRDA_WARNING("%s: transmit timed out, jiffies = %ld, trans_start = %ld\n", dev->name, jiffies, dev->trans_start); spin_lock_irqsave(&self->lock, flags); @@ -592,10 +593,10 @@ IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return 0;); + IRDA_ASSERT(dev != NULL, return 0;); self = (struct irport_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.sir_base; @@ -692,7 +693,7 @@ int iobase; unsigned int fcr; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__); @@ -753,7 +754,7 @@ int boguscount = 0; int iobase; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.sir_base; @@ -789,7 +790,7 @@ int handled = 0; if (!dev) { - WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq); + IRDA_WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq); return IRQ_NONE; } self = (struct irport_cb *) dev->priv; @@ -826,8 +827,8 @@ /* Make sure we don't stay here to long */ if (boguscount++ > 10) { - WARNING("%s() irq handler looping : lsr=%02x\n", - __FUNCTION__, lsr); + IRDA_WARNING("%s() irq handler looping : lsr=%02x\n", + __FUNCTION__, lsr); break; } @@ -862,7 +863,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct irport_cb *) dev->priv; iobase = self->io.sir_base; @@ -914,10 +915,10 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct irport_cb *) dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.sir_base; @@ -960,7 +961,7 @@ struct irport_cb *self = dev->priv; int iobase; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.sir_base; @@ -980,7 +981,7 @@ int actual = 0; int iobase; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.sir_base; @@ -1014,11 +1015,11 @@ unsigned long flags; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd); diff -Nru a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c --- a/drivers/net/irda/irtty-sir.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/net/irda/irtty-sir.c 2005-03-30 16:58:47 -08:00 @@ -60,8 +60,8 @@ { struct sirtty_cb *priv = dev->priv; - ASSERT(priv != NULL, return -1;); - ASSERT(priv->magic == IRTTY_MAGIC, return -1;); + IRDA_ASSERT(priv != NULL, return -1;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;); return priv->tty->driver->chars_in_buffer(priv->tty); } @@ -88,8 +88,8 @@ struct sirtty_cb *priv = dev->priv; struct tty_struct *tty; - ASSERT(priv != NULL, return;); - ASSERT(priv->magic == IRTTY_MAGIC, return;); + IRDA_ASSERT(priv != NULL, return;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); tty = priv->tty; if (tty->driver->wait_until_sent) { @@ -119,8 +119,8 @@ struct termios old_termios; int cflag; - ASSERT(priv != NULL, return -1;); - ASSERT(priv->magic == IRTTY_MAGIC, return -1;); + IRDA_ASSERT(priv != NULL, return -1;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;); tty = priv->tty; @@ -183,8 +183,8 @@ int set = 0; int clear = 0; - ASSERT(priv != NULL, return -1;); - ASSERT(priv->magic == IRTTY_MAGIC, return -1;); + IRDA_ASSERT(priv != NULL, return -1;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;); if (rts) set |= TIOCM_RTS; @@ -201,7 +201,7 @@ * This function is not yet defined for all tty driver, so * let's be careful... Jean II */ - ASSERT(priv->tty->driver->tiocmset != NULL, return -1;); + IRDA_ASSERT(priv->tty->driver->tiocmset != NULL, return -1;); priv->tty->driver->tiocmset(priv->tty, NULL, set, clear); return 0; @@ -220,8 +220,8 @@ struct tty_struct *tty; int writelen; - ASSERT(priv != NULL, return -1;); - ASSERT(priv->magic == IRTTY_MAGIC, return -1;); + IRDA_ASSERT(priv != NULL, return -1;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -1;); tty = priv->tty; if (!tty->driver->write) @@ -262,15 +262,15 @@ struct sirtty_cb *priv = tty->disc_data; int i; - ASSERT(priv != NULL, return;); - ASSERT(priv->magic == IRTTY_MAGIC, return;); + IRDA_ASSERT(priv != NULL, return;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); if (unlikely(count==0)) /* yes, this happens */ return; dev = priv->dev; if (!dev) { - WARNING("%s(), not ready yet!\n", __FUNCTION__); + IRDA_WARNING("%s(), not ready yet!\n", __FUNCTION__); return; } @@ -298,8 +298,8 @@ { struct sirtty_cb *priv = tty->disc_data; - ASSERT(priv != NULL, return 0;); - ASSERT(priv->magic == IRTTY_MAGIC, return 0;); + IRDA_ASSERT(priv != NULL, return 0;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return 0;); return 65536; /* We can handle an infinite amount of data. :-) */ } @@ -315,8 +315,8 @@ { struct sirtty_cb *priv = tty->disc_data; - ASSERT(priv != NULL, return;); - ASSERT(priv->magic == IRTTY_MAGIC, return;); + IRDA_ASSERT(priv != NULL, return;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); @@ -440,13 +440,13 @@ struct sirtty_cb *priv = tty->disc_data; int err = 0; - ASSERT(priv != NULL, return -ENODEV;); - ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;); + IRDA_ASSERT(priv != NULL, return -ENODEV;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;); IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __FUNCTION__, cmd); dev = priv->dev; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); switch (cmd) { case TCGETS: @@ -460,7 +460,7 @@ break; case IRTTY_IOCGET: - ASSERT(dev->netdev != NULL, return -1;); + IRDA_ASSERT(dev->netdev != NULL, return -1;); memset(&info, 0, sizeof(info)); strncpy(info.name, dev->netdev->name, sizeof(info.name)-1); @@ -558,8 +558,8 @@ { struct sirtty_cb *priv = tty->disc_data; - ASSERT(priv != NULL, return;); - ASSERT(priv->magic == IRTTY_MAGIC, return;); + IRDA_ASSERT(priv != NULL, return;); + IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;); /* Hm, with a dongle attached the dongle driver wants * to close the dongle - which requires the use of @@ -617,8 +617,8 @@ int err; if ((err = tty_register_ldisc(N_IRDA, &irda_ldisc)) != 0) - ERROR("IrDA: can't register line discipline (err = %d)\n", - err); + IRDA_ERROR("IrDA: can't register line discipline (err = %d)\n", + err); return err; } @@ -627,8 +627,8 @@ int err; if ((err = tty_register_ldisc(N_IRDA, NULL))) { - ERROR("%s(), can't unregister line discipline (err = %d)\n", - __FUNCTION__, err); + IRDA_ERROR("%s(), can't unregister line discipline (err = %d)\n", + __FUNCTION__, err); } } diff -Nru a/drivers/net/irda/ma600-sir.c b/drivers/net/irda/ma600-sir.c --- a/drivers/net/irda/ma600-sir.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/irda/ma600-sir.c 2005-03-30 16:58:49 -08:00 @@ -201,9 +201,9 @@ sirdev_raw_read(dev, &byte, sizeof(byte)); if (byte != get_control_byte(speed)) { - WARNING("%s(): bad control byte read-back %02x != %02x\n", - __FUNCTION__, (unsigned) byte, - (unsigned) get_control_byte(speed)); + IRDA_WARNING("%s(): bad control byte read-back %02x != %02x\n", + __FUNCTION__, (unsigned) byte, + (unsigned) get_control_byte(speed)); return -1; } else diff -Nru a/drivers/net/irda/ma600.c b/drivers/net/irda/ma600.c --- a/drivers/net/irda/ma600.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/ma600.c 2005-03-30 16:58:48 -08:00 @@ -209,7 +209,8 @@ break; case IRDA_TASK_CHILD_WAIT: - WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__); + IRDA_WARNING("%s(), resetting dongle timed out!\n", + __FUNCTION__); ret = -1; break; @@ -267,7 +268,8 @@ break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->speed_task = NULL; ret = -1; @@ -320,7 +322,8 @@ self->reset_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->reset_task = NULL; ret = -1; diff -Nru a/drivers/net/irda/mcp2120-sir.c b/drivers/net/irda/mcp2120-sir.c --- a/drivers/net/irda/mcp2120-sir.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/net/irda/mcp2120-sir.c 2005-03-30 16:58:51 -08:00 @@ -155,7 +155,7 @@ break; default: - ERROR("%s(), undefine state %d\n", __FUNCTION__, state); + IRDA_ERROR("%s(), undefine state %d\n", __FUNCTION__, state); ret = -EINVAL; break; } @@ -213,7 +213,7 @@ break; default: - ERROR("%s(), undefined state %d\n", __FUNCTION__, state); + IRDA_ERROR("%s(), undefined state %d\n", __FUNCTION__, state); ret = -EINVAL; break; } diff -Nru a/drivers/net/irda/mcp2120.c b/drivers/net/irda/mcp2120.c --- a/drivers/net/irda/mcp2120.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/net/irda/mcp2120.c 2005-03-30 16:58:51 -08:00 @@ -103,7 +103,8 @@ } break; case IRDA_TASK_CHILD_WAIT: - WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__); + IRDA_WARNING("%s(), resetting dongle timed out!\n", + __FUNCTION__); ret = -1; break; case IRDA_TASK_CHILD_DONE: @@ -151,7 +152,8 @@ //printk("mcp2120_change_speed irda_task_wait\n"); break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->speed_task = NULL; ret = -1; @@ -206,7 +208,8 @@ self->reset_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->reset_task = NULL; ret = -1; diff -Nru a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c --- a/drivers/net/irda/nsc-ircc.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/net/irda/nsc-ircc.c 2005-03-30 16:58:50 -08:00 @@ -250,18 +250,18 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, - info->cfg_base); + IRDA_MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, + info->cfg_base); if ((nsc_ircc_setup(info)) == -1) return -1; - MESSAGE("%s, driver loaded (Dag Brattli)\n", driver_name); + IRDA_MESSAGE("%s, driver loaded (Dag Brattli)\n", driver_name); dev = alloc_irdadev(sizeof(struct nsc_ircc_cb)); if (dev == NULL) { - ERROR("%s(), can't allocate memory for " - "control block!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate memory for " + "control block!\n", __FUNCTION__); return -ENOMEM; } @@ -284,8 +284,8 @@ /* Reserve the ioports that we need */ ret = request_region(self->io.fir_base, self->io.fir_ext, driver_name); if (!ret) { - WARNING("%s(), can't get iobase of 0x%03x\n", - __FUNCTION__, self->io.fir_base); + IRDA_WARNING("%s(), can't get iobase of 0x%03x\n", + __FUNCTION__, self->io.fir_base); err = -ENODEV; goto out1; } @@ -343,21 +343,21 @@ err = register_netdev(dev); if (err) { - ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); + IRDA_ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); goto out4; } - MESSAGE("IrDA: Registered device %s\n", dev->name); + IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); /* Check if user has supplied a valid dongle id or not */ if ((dongle_id <= 0) || (dongle_id >= (sizeof(dongle_types) / sizeof(dongle_types[0]))) ) { dongle_id = nsc_ircc_read_dongle_id(self->io.fir_base); - MESSAGE("%s, Found dongle: %s\n", driver_name, - dongle_types[dongle_id]); + IRDA_MESSAGE("%s, Found dongle: %s\n", driver_name, + dongle_types[dongle_id]); } else { - MESSAGE("%s, Using dongle: %s\n", driver_name, - dongle_types[dongle_id]); + IRDA_MESSAGE("%s, Using dongle: %s\n", driver_name, + dongle_types[dongle_id]); } self->io.dongle_id = dongle_id; @@ -394,7 +394,7 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.fir_base; @@ -441,7 +441,7 @@ case 0x2e8: outb(0x15, cfg_base+1); break; case 0x3f8: outb(0x16, cfg_base+1); break; case 0x2f8: outb(0x17, cfg_base+1); break; - default: ERROR("%s(), invalid base_address", __FUNCTION__); + default: IRDA_ERROR("%s(), invalid base_address", __FUNCTION__); } /* Control Signal Routing Register (CSRT) */ @@ -453,7 +453,7 @@ case 9: temp = 0x05; break; case 11: temp = 0x06; break; case 15: temp = 0x07; break; - default: ERROR("%s(), invalid irq", __FUNCTION__); + default: IRDA_ERROR("%s(), invalid irq", __FUNCTION__); } outb(CFG_108_CSRT, cfg_base); @@ -461,7 +461,7 @@ case 0: outb(0x08+temp, cfg_base+1); break; case 1: outb(0x10+temp, cfg_base+1); break; case 3: outb(0x18+temp, cfg_base+1); break; - default: ERROR("%s(), invalid dma", __FUNCTION__); + default: IRDA_ERROR("%s(), invalid dma", __FUNCTION__); } outb(CFG_108_MCTL, cfg_base); /* Mode Control Register (MCTL) */ @@ -825,7 +825,8 @@ /* Should be 0x2? */ if (0x20 != (version & 0xf0)) { - ERROR("%s, Wrong chip version %02x\n", driver_name, version); + IRDA_ERROR("%s, Wrong chip version %02x\n", + driver_name, version); return -1; } @@ -1089,7 +1090,7 @@ IRDA_DEBUG(2, "%s(), speed=%d\n", __FUNCTION__, speed); - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1197,7 +1198,7 @@ self = (struct nsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1702,8 +1703,9 @@ skb = dev_alloc_skb(len+1); if (skb == NULL) { - WARNING("%s(), memory squeeze, " - "dropping frame.\n", __FUNCTION__); + IRDA_WARNING("%s(), memory squeeze, " + "dropping frame.\n", + __FUNCTION__); self->stats.rx_dropped++; /* Restore bank register */ @@ -1889,9 +1891,9 @@ nsc_ircc_dma_receive(self); self->ier = IER_SFIF_IE; } else - WARNING("%s(), potential " - "Tx queue lockup !\n", - __FUNCTION__); + IRDA_WARNING("%s(), potential " + "Tx queue lockup !\n", + __FUNCTION__); } } else { /* Not finished yet, so interrupt on DMA again */ @@ -1924,7 +1926,8 @@ int iobase; if (!dev) { - WARNING("%s: irq %d for unknown device.\n", driver_name, irq); + IRDA_WARNING("%s: irq %d for unknown device.\n", + driver_name, irq); return IRQ_NONE; } self = (struct nsc_ircc_cb *) dev->priv; @@ -1969,7 +1972,7 @@ int iobase; __u8 bank; - ASSERT(self != NULL, return FALSE;); + IRDA_ASSERT(self != NULL, return FALSE;); spin_lock_irqsave(&self->lock, flags); @@ -2007,16 +2010,16 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct nsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; if (request_irq(self->io.irq, nsc_ircc_interrupt, 0, dev->name, dev)) { - WARNING("%s, unable to allocate irq=%d\n", driver_name, - self->io.irq); + IRDA_WARNING("%s, unable to allocate irq=%d\n", + driver_name, self->io.irq); return -EAGAIN; } /* @@ -2024,8 +2027,8 @@ * failure. */ if (request_dma(self->io.dma, dev->name)) { - WARNING("%s, unable to allocate dma=%d\n", driver_name, - self->io.dma); + IRDA_WARNING("%s, unable to allocate dma=%d\n", + driver_name, self->io.dma); free_irq(self->io.irq, dev); return -EAGAIN; } @@ -2069,10 +2072,10 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct nsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); /* Stop device */ netif_stop_queue(dev); @@ -2115,11 +2118,11 @@ unsigned long flags; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd); @@ -2159,7 +2162,7 @@ static void nsc_ircc_suspend(struct nsc_ircc_cb *self) { - MESSAGE("%s, Suspending\n", driver_name); + IRDA_MESSAGE("%s, Suspending\n", driver_name); if (self->io.suspended) return; @@ -2177,7 +2180,7 @@ nsc_ircc_setup(&self->io); nsc_ircc_net_open(self->netdev); - MESSAGE("%s, Waking up\n", driver_name); + IRDA_MESSAGE("%s, Waking up\n", driver_name); self->io.suspended = 0; } diff -Nru a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c --- a/drivers/net/irda/sir_dev.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/irda/sir_dev.c 2005-03-30 16:58:49 -08:00 @@ -154,7 +154,8 @@ } else if (unlikely(actual<0)) { /* could be dropped later when we have tx_timeout to recover */ - ERROR("%s: drv->do_write failed (%d)\n", __FUNCTION__, actual); + IRDA_ERROR("%s: drv->do_write failed (%d)\n", + __FUNCTION__, actual); if ((skb=dev->tx_skb) != NULL) { dev->tx_skb = NULL; dev_kfree_skb_any(skb); @@ -208,7 +209,8 @@ /* should never happen * forget the speed change and hope the stack recovers */ - ERROR("%s - schedule speed change failed: %d\n", __FUNCTION__, err); + IRDA_ERROR("%s - schedule speed change failed: %d\n", + __FUNCTION__, err); netif_wake_queue(dev->netdev); } /* else: success @@ -234,13 +236,13 @@ int sirdev_receive(struct sir_dev *dev, const unsigned char *cp, size_t count) { if (!dev || !dev->netdev) { - WARNING("%s(), not ready yet!\n", __FUNCTION__); + IRDA_WARNING("%s(), not ready yet!\n", __FUNCTION__); return -1; } if (!dev->irlap) { - WARNING("%s - too early: %p / %zd!\n", - __FUNCTION__, cp, count); + IRDA_WARNING("%s - too early: %p / %zd!\n", + __FUNCTION__, cp, count); return -1; } @@ -297,7 +299,7 @@ int err; s32 speed; - ASSERT(dev != NULL, return 0;); + IRDA_ASSERT(dev != NULL, return 0;); netif_stop_queue(ndev); @@ -366,7 +368,8 @@ } else if (unlikely(actual < 0)) { /* could be dropped later when we have tx_timeout to recover */ - ERROR("%s: drv->do_write failed (%d)\n", __FUNCTION__, actual); + IRDA_ERROR("%s: drv->do_write failed (%d)\n", + __FUNCTION__, actual); dev_kfree_skb_any(skb); dev->stats.tx_errors++; dev->stats.tx_dropped++; @@ -385,7 +388,7 @@ struct sir_dev *dev = ndev->priv; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); IRDA_DEBUG(3, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, ndev->name, cmd); @@ -593,7 +596,7 @@ */ ndev = alloc_irdadev(sizeof(*dev)); if (ndev == NULL) { - ERROR("%s - Can't allocate memory for IrDA control block!\n", __FUNCTION__); + IRDA_ERROR("%s - Can't allocate memory for IrDA control block!\n", __FUNCTION__); goto out; } dev = ndev->priv; @@ -628,7 +631,7 @@ ndev->do_ioctl = sirdev_ioctl; if (register_netdev(ndev)) { - ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); + IRDA_ERROR("%s(), register_netdev() failed!\n", __FUNCTION__); goto out_freenetdev; } @@ -654,7 +657,7 @@ if (dev->dongle_drv) err = sirdev_schedule_dongle_close(dev); if (err) - ERROR("%s - error %d\n", __FUNCTION__, err); + IRDA_ERROR("%s - error %d\n", __FUNCTION__, err); sirdev_close(dev->netdev); diff -Nru a/drivers/net/irda/sir_kthread.c b/drivers/net/irda/sir_kthread.c --- a/drivers/net/irda/sir_kthread.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/net/irda/sir_kthread.c 2005-03-30 16:58:51 -08:00 @@ -222,7 +222,7 @@ return 0; default: - ERROR("%s - undefined state\n", __FUNCTION__); + IRDA_ERROR("%s - undefined state\n", __FUNCTION__); return -EINVAL; } fsm->substate = next_state; @@ -391,12 +391,12 @@ break; default: - ERROR("%s - undefined state\n", __FUNCTION__); + IRDA_ERROR("%s - undefined state\n", __FUNCTION__); fsm->result = -EINVAL; /* fall thru */ case SIRDEV_STATE_ERROR: - ERROR("%s - error: %d\n", __FUNCTION__, fsm->result); + IRDA_ERROR("%s - error: %d\n", __FUNCTION__, fsm->result); #if 0 /* don't enable this before we have netdev->tx_timeout to recover */ netif_stop_queue(dev->netdev); @@ -439,7 +439,7 @@ if (fsm->state == SIRDEV_STATE_DEAD) { /* race with sirdev_close should never happen */ - ERROR("%s(), instance staled!\n", __FUNCTION__); + IRDA_ERROR("%s(), instance staled!\n", __FUNCTION__); up(&fsm->sem); return -ESTALE; /* or better EPIPE? */ } diff -Nru a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c --- a/drivers/net/irda/smsc-ircc2.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/irda/smsc-ircc2.c 2005-03-30 16:58:49 -08:00 @@ -334,8 +334,8 @@ dev_count=0; if ((ircc_fir>0)&&(ircc_sir>0)) { - MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir); - MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir); + IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir); + IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir); if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq) == 0) return 0; @@ -345,7 +345,8 @@ /* try user provided configuration register base address */ if (ircc_cfg>0) { - MESSAGE(" Overriding configuration address 0x%04x\n", ircc_cfg); + IRDA_MESSAGE(" Overriding configuration address 0x%04x\n", + ircc_cfg); if (!smsc_superio_fdc(ircc_cfg)) ret = 0; if (!smsc_superio_lpc(ircc_cfg)) @@ -377,7 +378,7 @@ err = -ENOMEM; if (dev_count > DIM(dev_self)) { - WARNING("%s(), too many devices!\n", __FUNCTION__); + IRDA_WARNING("%s(), too many devices!\n", __FUNCTION__); goto err_out1; } @@ -386,7 +387,7 @@ */ dev = alloc_irdadev(sizeof(struct smsc_ircc_cb)); if (!dev) { - WARNING("%s() can't allocate net device\n", __FUNCTION__); + IRDA_WARNING("%s() can't allocate net device\n", __FUNCTION__); goto err_out1; } @@ -420,8 +421,8 @@ dma_alloc_coherent(NULL, self->rx_buff.truesize, &self->rx_buff_dma, GFP_KERNEL); if (self->rx_buff.head == NULL) { - ERROR("%s, Can't allocate memory for receive buffer!\n", - driver_name); + IRDA_ERROR("%s, Can't allocate memory for receive buffer!\n", + driver_name); goto err_out2; } @@ -429,8 +430,8 @@ dma_alloc_coherent(NULL, self->tx_buff.truesize, &self->tx_buff_dma, GFP_KERNEL); if (self->tx_buff.head == NULL) { - ERROR("%s, Can't allocate memory for transmit buffer!\n", - driver_name); + IRDA_ERROR("%s, Can't allocate memory for transmit buffer!\n", + driver_name); goto err_out3; } @@ -456,8 +457,8 @@ err = register_netdev(self->netdev); if(err) { - ERROR("%s, Network device registration failed!\n", - driver_name); + IRDA_ERROR("%s, Network device registration failed!\n", + driver_name); goto err_out4; } @@ -465,7 +466,7 @@ if (self->pmdev) self->pmdev->data = self; - MESSAGE("IrDA: Registered device %s\n", dev->name); + IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); return 0; err_out4: @@ -496,15 +497,15 @@ if (!request_region(fir_base, SMSC_IRCC2_FIR_CHIP_IO_EXTENT, driver_name)) { - WARNING("%s: can't get fir_base of 0x%03x\n", - __FUNCTION__, fir_base); + IRDA_WARNING("%s: can't get fir_base of 0x%03x\n", + __FUNCTION__, fir_base); goto out1; } if (!request_region(sir_base, SMSC_IRCC2_SIR_CHIP_IO_EXTENT, driver_name)) { - WARNING("%s: can't get sir_base of 0x%03x\n", - __FUNCTION__, sir_base); + IRDA_WARNING("%s: can't get sir_base of 0x%03x\n", + __FUNCTION__, sir_base); goto out2; } @@ -519,13 +520,13 @@ irq = (config & IRCC_INTERFACE_IRQ_MASK) >> 4; if (high != 0x10 || low != 0xb8 || (chip != 0xf1 && chip != 0xf2)) { - WARNING("%s(), addr 0x%04x - no device found!\n", - __FUNCTION__, fir_base); + IRDA_WARNING("%s(), addr 0x%04x - no device found!\n", + __FUNCTION__, fir_base); goto out3; } - MESSAGE("SMsC IrDA Controller found\n IrCC version %d.%d, " - "firport 0x%03x, sirport 0x%03x dma=%d, irq=%d\n", - chip & 0x0f, version, fir_base, sir_base, dma, irq); + IRDA_MESSAGE("SMsC IrDA Controller found\n IrCC version %d.%d, " + "firport 0x%03x, sirport 0x%03x dma=%d, irq=%d\n", + chip & 0x0f, version, fir_base, sir_base, dma, irq); return 0; out3: @@ -562,8 +563,8 @@ if (irq < 255) { if (irq != chip_irq) - MESSAGE("%s, Overriding IRQ - chip says %d, using %d\n", - driver_name, chip_irq, irq); + IRDA_MESSAGE("%s, Overriding IRQ - chip says %d, using %d\n", + driver_name, chip_irq, irq); self->io.irq = irq; } else @@ -571,8 +572,8 @@ if (dma < 255) { if (dma != chip_dma) - MESSAGE("%s, Overriding DMA - chip says %d, using %d\n", - driver_name, chip_dma, dma); + IRDA_MESSAGE("%s, Overriding DMA - chip says %d, using %d\n", + driver_name, chip_dma, dma); self->io.dma = dma; } else @@ -609,7 +610,7 @@ { int iobase, ir_mode, ctrl, fast; - ASSERT( self != NULL, return; ); + IRDA_ASSERT( self != NULL, return; ); iobase = self->io.fir_base; ir_mode = IRCC_CFGA_IRDA_SIR_A; @@ -659,11 +660,11 @@ unsigned long flags; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd); @@ -728,7 +729,8 @@ self = (struct smsc_ircc_cb *) dev->priv; - WARNING("%s: transmit timed out, changing speed to: %d\n", dev->name, self->io.speed); + IRDA_WARNING("%s: transmit timed out, changing speed to: %d\n", + dev->name, self->io.speed); spin_lock_irqsave(&self->lock, flags); smsc_ircc_sir_start(self); smsc_ircc_change_speed(self, self->io.speed); @@ -754,10 +756,10 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(dev != NULL, return 0;); + IRDA_ASSERT(dev != NULL, return 0;); self = (struct smsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.sir_base; @@ -819,7 +821,7 @@ { int fir_base, ir_mode, ctrl, fast; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); fir_base = self->io.fir_base; self->io.speed = speed; @@ -874,9 +876,9 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); dev = self->netdev; - ASSERT(dev != NULL, return;); + IRDA_ASSERT(dev != NULL, return;); fir_base = self->io.fir_base; @@ -922,7 +924,7 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); fir_base = self->io.fir_base; register_bank(fir_base, 0); @@ -948,7 +950,7 @@ IRDA_DEBUG(0, "%s() changing speed to: %d\n", __FUNCTION__, speed); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); dev = self->netdev; iobase = self->io.fir_base; @@ -1018,7 +1020,7 @@ IRDA_DEBUG(0, "%s(), Setting speed to: %d\n", __FUNCTION__, speed); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.sir_base; /* Update accounting for new speed */ @@ -1071,9 +1073,9 @@ int iobase; int mtt; - ASSERT(dev != NULL, return 0;); + IRDA_ASSERT(dev != NULL, return 0;); self = (struct smsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1325,15 +1327,15 @@ len -= 4; if ((len < 2) || (len > 2050)) { - WARNING("%s(), bogus len=%d\n", __FUNCTION__, len); + IRDA_WARNING("%s(), bogus len=%d\n", __FUNCTION__, len); return; } IRDA_DEBUG(2, "%s: msgcnt = %d, len=%d\n", __FUNCTION__, msgcnt, len); skb = dev_alloc_skb(len+1); if (!skb) { - WARNING("%s(), memory squeeze, dropping frame.\n", - __FUNCTION__); + IRDA_WARNING("%s(), memory squeeze, dropping frame.\n", + __FUNCTION__); return; } /* Make sure IP header gets aligned */ @@ -1360,7 +1362,7 @@ int boguscount = 0; int iobase; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.sir_base; @@ -1400,7 +1402,7 @@ goto irq_ret; } self = (struct smsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return IRQ_NONE;); + IRDA_ASSERT(self != NULL, return IRQ_NONE;); /* Serialise the interrupt handler in various CPUs, stop Tx path */ spin_lock(&self->lock); @@ -1521,7 +1523,7 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(self != NULL, return FALSE;); + IRDA_ASSERT(self != NULL, return FALSE;); IRDA_DEBUG(0, "%s: dma count = %d\n", __FUNCTION__, get_dma_residue(self->io.dma)); @@ -1548,9 +1550,9 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct smsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1584,8 +1586,8 @@ if (request_dma(self->io.dma, dev->name)) { smsc_ircc_net_close(dev); - WARNING("%s(), unable to allocate DMA=%d\n", - __FUNCTION__, self->io.dma); + IRDA_WARNING("%s(), unable to allocate DMA=%d\n", + __FUNCTION__, self->io.dma); return -EAGAIN; } @@ -1607,9 +1609,9 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct smsc_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1633,7 +1635,7 @@ static void smsc_ircc_suspend(struct smsc_ircc_cb *self) { - MESSAGE("%s, Suspending\n", driver_name); + IRDA_MESSAGE("%s, Suspending\n", driver_name); if (self->io.suspended) return; @@ -1654,7 +1656,7 @@ smsc_ircc_net_open(self->netdev); - MESSAGE("%s, Waking up\n", driver_name); + IRDA_MESSAGE("%s, Waking up\n", driver_name); } static int smsc_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data) @@ -1686,7 +1688,7 @@ IRDA_DEBUG(1, "%s\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.fir_base; @@ -1761,9 +1763,9 @@ IRDA_DEBUG(3, "%s\n", __FUNCTION__); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); dev= self->netdev; - ASSERT(dev != NULL, return;); + IRDA_ASSERT(dev != NULL, return;); dev->hard_start_xmit = &smsc_ircc_hard_xmit_sir; fir_base = self->io.fir_base; @@ -1820,7 +1822,7 @@ int iobase; int fcr; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); IRDA_DEBUG(4, "%s\n", __FUNCTION__); @@ -1885,7 +1887,7 @@ /* Tx FIFO should be empty! */ if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { - WARNING("%s(), failed, fifo not empty!\n", __FUNCTION__); + IRDA_WARNING("%s(), failed, fifo not empty!\n", __FUNCTION__); return 0; } @@ -1920,15 +1922,17 @@ { unsigned int i; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); for(i=0; smsc_transceivers[i].name!=NULL; i++) if((*smsc_transceivers[i].probe)(self->io.fir_base)) { - MESSAGE(" %s transceiver found\n", smsc_transceivers[i].name); + IRDA_MESSAGE(" %s transceiver found\n", + smsc_transceivers[i].name); self->transceiver= i+1; return; } - MESSAGE("No transceiver found. Defaulting to %s\n", smsc_transceivers[SMSC_IRCC2_C_DEFAULT_TRANSCEIVER].name); + IRDA_MESSAGE("No transceiver found. Defaulting to %s\n", + smsc_transceivers[SMSC_IRCC2_C_DEFAULT_TRANSCEIVER].name); self->transceiver= SMSC_IRCC2_C_DEFAULT_TRANSCEIVER; } @@ -2052,7 +2056,7 @@ /*printk(KERN_WARNING "%s(): mode: 0x%02x\n", __FUNCTION__, mode);*/ if(!(mode & SMSCSIOFLAT_UART2MODE_VAL_IRDA)) - WARNING("%s(): IrDA not enabled\n", __FUNCTION__); + IRDA_WARNING("%s(): IrDA not enabled\n", __FUNCTION__); outb(SMSCSIOFLAT_UART2BASEADDR_REG, cfgbase); sirbase = inb(cfgbase+1) << 2; @@ -2069,7 +2073,7 @@ outb(SMSCSIOFLAT_UARTIRQSELECT_REG, cfgbase); irq = inb(cfgbase+1) & SMSCSIOFLAT_UART2IRQSELECT_MASK; - MESSAGE("%s(): fir: 0x%02x, sir: 0x%02x, dma: %02d, irq: %d, mode: 0x%02x\n", __FUNCTION__, firbase, sirbase, dma, irq, mode); + IRDA_MESSAGE("%s(): fir: 0x%02x, sir: 0x%02x, dma: %02d, irq: %d, mode: 0x%02x\n", __FUNCTION__, firbase, sirbase, dma, irq, mode); if (firbase) { if (smsc_ircc_open(firbase, sirbase, dma, irq) == 0) @@ -2201,15 +2205,15 @@ return NULL; } - MESSAGE("found SMC SuperIO Chip (devid=0x%02x rev=%02X base=0x%04x): %s%s\n",devid,rev,cfg_base,type,chip->name); + IRDA_MESSAGE("found SMC SuperIO Chip (devid=0x%02x rev=%02X base=0x%04x): %s%s\n",devid,rev,cfg_base,type,chip->name); if (chip->rev>rev){ - MESSAGE("Revision higher than expected\n"); + IRDA_MESSAGE("Revision higher than expected\n"); return NULL; } if (chip->flags&NoIRDA) - MESSAGE("chipset does not support IRDA\n"); + IRDA_MESSAGE("chipset does not support IRDA\n"); return chip; } @@ -2219,8 +2223,8 @@ int ret = -1; if (!request_region(cfg_base, 2, driver_name)) { - WARNING("%s: can't get cfg_base of 0x%03x\n", - __FUNCTION__, cfg_base); + IRDA_WARNING("%s: can't get cfg_base of 0x%03x\n", + __FUNCTION__, cfg_base); } else { if (!smsc_superio_flat(fdc_chips_flat,cfg_base,"FDC") ||!smsc_superio_paged(fdc_chips_paged,cfg_base,"FDC")) @@ -2237,8 +2241,8 @@ int ret = -1; if (!request_region(cfg_base, 2, driver_name)) { - WARNING("%s: can't get cfg_base of 0x%03x\n", - __FUNCTION__, cfg_base); + IRDA_WARNING("%s: can't get cfg_base of 0x%03x\n", + __FUNCTION__, cfg_base); } else { if (!smsc_superio_flat(lpc_chips_flat,cfg_base,"LPC") ||!smsc_superio_paged(lpc_chips_paged,cfg_base,"LPC")) @@ -2275,8 +2279,8 @@ outb((inb(fir_base+IRCC_ATC) & IRCC_ATC_MASK) |IRCC_ATC_nPROGREADY|IRCC_ATC_ENABLE, fir_base+IRCC_ATC); while((val=(inb(fir_base+IRCC_ATC) & IRCC_ATC_nPROGREADY)) && !time_after(jiffies, jiffies_timeout)); if(val) - WARNING("%s(): ATC: 0x%02x\n", __FUNCTION__, - inb(fir_base+IRCC_ATC)); + IRDA_WARNING("%s(): ATC: 0x%02x\n", __FUNCTION__, + inb(fir_base+IRCC_ATC)); } /* diff -Nru a/drivers/net/irda/tekram-sir.c b/drivers/net/irda/tekram-sir.c --- a/drivers/net/irda/tekram-sir.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/tekram-sir.c 2005-03-30 16:58:48 -08:00 @@ -179,7 +179,7 @@ break; default: - ERROR("%s - undefined state %d\n", __FUNCTION__, state); + IRDA_ERROR("%s - undefined state %d\n", __FUNCTION__, state); ret = -EINVAL; break; } diff -Nru a/drivers/net/irda/tekram.c b/drivers/net/irda/tekram.c --- a/drivers/net/irda/tekram.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/irda/tekram.c 2005-03-30 16:58:49 -08:00 @@ -109,7 +109,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(task != NULL, return -1;); + IRDA_ASSERT(task != NULL, return -1;); if (self->speed_task && self->speed_task != task) { IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__ ); @@ -155,7 +155,8 @@ irda_task_next_state(task, IRDA_TASK_CHILD_DONE); break; case IRDA_TASK_CHILD_WAIT: - WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__); + IRDA_WARNING("%s(), resetting dongle timed out!\n", + __FUNCTION__); ret = -1; break; case IRDA_TASK_CHILD_DONE: @@ -181,7 +182,8 @@ self->speed_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->speed_task = NULL; ret = -1; @@ -210,7 +212,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(task != NULL, return -1;); + IRDA_ASSERT(task != NULL, return -1;); if (self->reset_task && self->reset_task != task) { IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__ ); @@ -249,7 +251,8 @@ self->reset_task = NULL; break; default: - ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state); + IRDA_ERROR("%s(), unknown state %d\n", + __FUNCTION__, task->state); irda_task_next_state(task, IRDA_TASK_DONE); self->reset_task = NULL; ret = -1; diff -Nru a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c --- a/drivers/net/irda/via-ircc.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/net/irda/via-ircc.c 2005-03-30 16:58:47 -08:00 @@ -441,7 +441,7 @@ if (err) goto err_out4; - MESSAGE("IrDA: Registered device %s (via-ircc)\n", dev->name); + IRDA_MESSAGE("IrDA: Registered device %s (via-ircc)\n", dev->name); /* Initialise the hardware.. */ @@ -474,7 +474,7 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); iobase = self->io.fir_base; @@ -565,7 +565,7 @@ { int dongle_id = 9; /* Default to IBM */ - ERROR("via-ircc: dongle probing not supported, please specify dongle_id module parameter.\n"); + IRDA_ERROR("via-ircc: dongle probing not supported, please specify dongle_id module parameter.\n"); return dongle_id; } @@ -707,8 +707,8 @@ break; default: - ERROR("%s: Error: dongle_id %d unsupported !\n", - __FUNCTION__, dongle_id); + IRDA_ERROR("%s: Error: dongle_id %d unsupported !\n", + __FUNCTION__, dongle_id); } } @@ -826,7 +826,7 @@ __u32 speed; self = (struct via_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; netif_stop_queue(dev); @@ -1351,8 +1351,8 @@ u8 iHostIntType, iRxIntType, iTxIntType; if (!dev) { - WARNING("%s: irq %d for unknown device.\n", driver_name, - irq); + IRDA_WARNING("%s: irq %d for unknown device.\n", driver_name, + irq); return IRQ_NONE; } self = (struct via_ircc_cb *) dev->priv; @@ -1498,7 +1498,7 @@ int status = FALSE; int iobase; - ASSERT(self != NULL, return FALSE;); + IRDA_ASSERT(self != NULL, return FALSE;); iobase = self->io.fir_base; if (CkRxRecv(iobase, self)) @@ -1524,14 +1524,14 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct via_ircc_cb *) dev->priv; self->stats.rx_packets = 0; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; if (request_irq(self->io.irq, via_ircc_interrupt, 0, dev->name, dev)) { - WARNING("%s, unable to allocate irq=%d\n", driver_name, - self->io.irq); + IRDA_WARNING("%s, unable to allocate irq=%d\n", driver_name, + self->io.irq); return -EAGAIN; } /* @@ -1539,15 +1539,15 @@ * failure. */ if (request_dma(self->io.dma, dev->name)) { - WARNING("%s, unable to allocate dma=%d\n", driver_name, - self->io.dma); + IRDA_WARNING("%s, unable to allocate dma=%d\n", driver_name, + self->io.dma); free_irq(self->io.irq, self); return -EAGAIN; } if (self->io.dma2 != self->io.dma) { if (request_dma(self->io.dma2, dev->name)) { - WARNING("%s, unable to allocate dma2=%d\n", - driver_name, self->io.dma2); + IRDA_WARNING("%s, unable to allocate dma2=%d\n", + driver_name, self->io.dma2); free_irq(self->io.irq, self); return -EAGAIN; } @@ -1590,9 +1590,9 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct via_ircc_cb *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); /* Stop device */ netif_stop_queue(dev); @@ -1627,9 +1627,9 @@ unsigned long flags; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(1, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd); /* Disable interrupts & save flags */ diff -Nru a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c --- a/drivers/net/irda/vlsi_ir.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/net/irda/vlsi_ir.c 2005-03-30 16:58:47 -08:00 @@ -435,8 +435,8 @@ if (rd->buf == NULL || !(busaddr = pci_map_single(pdev, rd->buf, len, dir))) { if (rd->buf) { - ERROR("%s: failed to create PCI-MAP for %p", - __FUNCTION__, rd->buf); + IRDA_ERROR("%s: failed to create PCI-MAP for %p", + __FUNCTION__, rd->buf); kfree(rd->buf); rd->buf = NULL; } @@ -490,7 +490,8 @@ ringarea = pci_alloc_consistent(idev->pdev, HW_RING_AREA_SIZE, &idev->busaddr); if (!ringarea) { - ERROR("%s: insufficient memory for descriptor rings\n", __FUNCTION__); + IRDA_ERROR("%s: insufficient memory for descriptor rings\n", + __FUNCTION__); goto out; } memset(ringarea, 0, HW_RING_AREA_SIZE); @@ -587,7 +588,7 @@ } if (!rd->skb) { - WARNING("%s: rx packet lost\n", __FUNCTION__); + IRDA_WARNING("%s: rx packet lost\n", __FUNCTION__); ret |= VLSI_RX_DROP; goto done; } @@ -617,8 +618,8 @@ for (rd = ring_last(r); rd != NULL; rd = ring_put(r)) { if (rd_is_active(rd)) { - WARNING("%s: driver bug: rx descr race with hw\n", - __FUNCTION__); + IRDA_WARNING("%s: driver bug: rx descr race with hw\n", + __FUNCTION__); vlsi_ring_debug(r); break; } @@ -677,7 +678,7 @@ if (ring_first(r) == NULL) { /* we are in big trouble, if this should ever happen */ - ERROR("%s: rx ring exhausted!\n", __FUNCTION__); + IRDA_ERROR("%s: rx ring exhausted!\n", __FUNCTION__); vlsi_ring_debug(r); } else @@ -789,8 +790,8 @@ config = IRCFG_SIR | IRCFG_SIRFILT | IRCFG_RXANY; switch(baudrate) { default: - WARNING("%s: undefined baudrate %d - fallback to 9600!\n", - __FUNCTION__, baudrate); + IRDA_WARNING("%s: undefined baudrate %d - fallback to 9600!\n", + __FUNCTION__, baudrate); baudrate = 9600; /* fallthru */ case 2400: @@ -831,14 +832,14 @@ config ^= IRENABLE_SIR_ON; if (config != (IRENABLE_PHYANDCLOCK|IRENABLE_ENRXST)) { - WARNING("%s: failed to set %s mode!\n", __FUNCTION__, + IRDA_WARNING("%s: failed to set %s mode!\n", __FUNCTION__, (mode==IFF_SIR)?"SIR":((mode==IFF_MIR)?"MIR":"FIR")); ret = -1; } else { if (inw(iobase+VLSI_PIO_PHYCTL) != nphyctl) { - WARNING("%s: failed to apply baudrate %d\n", - __FUNCTION__, baudrate); + IRDA_WARNING("%s: failed to apply baudrate %d\n", + __FUNCTION__, baudrate); ret = -1; } else { @@ -982,8 +983,8 @@ */ if (len >= r->len-5) - WARNING("%s: possible buffer overflow with SIR wrapping!\n", - __FUNCTION__); + IRDA_WARNING("%s: possible buffer overflow with SIR wrapping!\n", + __FUNCTION__); } else { /* hw deals with MIR/FIR mode wrapping */ @@ -1050,7 +1051,7 @@ drop_unlock: spin_unlock_irqrestore(&idev->lock, flags); drop: - WARNING("%s: dropping packet - %s\n", __FUNCTION__, msg); + IRDA_WARNING("%s: dropping packet - %s\n", __FUNCTION__, msg); dev_kfree_skb_any(skb); idev->stats.tx_errors++; idev->stats.tx_dropped++; @@ -1188,7 +1189,8 @@ } if (count < 3) { if (clksrc == 1) { /* explicitly asked for PLL hence bail out */ - ERROR("%s: no PLL or failed to lock!\n", __FUNCTION__); + IRDA_ERROR("%s: no PLL or failed to lock!\n", + __FUNCTION__); clkctl = CLKCTL_CLKSTP; pci_write_config_byte(pdev, VLSI_PCI_CLKCTL, clkctl); return -1; @@ -1269,7 +1271,7 @@ /* start the clock and clean the registers */ if (vlsi_start_clock(pdev)) { - ERROR("%s: no valid clock source\n", __FUNCTION__); + IRDA_ERROR("%s: no valid clock source\n", __FUNCTION__); return -1; } iobase = ndev->base_addr; @@ -1400,8 +1402,8 @@ idev->new_baud = idev->baud; /* keep current baudrate */ if (vlsi_start_hw(idev)) - ERROR("%s: failed to restart hw - %s(%s) unusable!\n", - __FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name); + IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", + __FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name); else netif_start_queue(ndev); } @@ -1445,7 +1447,8 @@ irq->ifr_receiving = (fifocnt!=0) ? 1 : 0; break; default: - WARNING("%s: notsupp - cmd=%04x\n", __FUNCTION__, cmd); + IRDA_WARNING("%s: notsupp - cmd=%04x\n", + __FUNCTION__, cmd); ret = -EOPNOTSUPP; } @@ -1490,7 +1493,8 @@ spin_unlock_irqrestore(&idev->lock,flags); if (boguscount <= 0) - MESSAGE("%s: too much work in interrupt!\n", __FUNCTION__); + IRDA_MESSAGE("%s: too much work in interrupt!\n", + __FUNCTION__); return IRQ_RETVAL(handled); } @@ -1503,7 +1507,7 @@ char hwname[32]; if (pci_request_regions(idev->pdev, drivername)) { - WARNING("%s: io resource busy\n", __FUNCTION__); + IRDA_WARNING("%s: io resource busy\n", __FUNCTION__); goto errout; } ndev->base_addr = pci_resource_start(idev->pdev,0); @@ -1517,7 +1521,8 @@ if (request_irq(ndev->irq, vlsi_interrupt, SA_SHIRQ, drivername, ndev)) { - WARNING("%s: couldn't get IRQ: %d\n", __FUNCTION__, ndev->irq); + IRDA_WARNING("%s: couldn't get IRQ: %d\n", + __FUNCTION__, ndev->irq); goto errout_io; } @@ -1538,7 +1543,7 @@ netif_start_queue(ndev); - MESSAGE("%s: device %s operational\n", __FUNCTION__, ndev->name); + IRDA_MESSAGE("%s: device %s operational\n", __FUNCTION__, ndev->name); return 0; @@ -1572,7 +1577,7 @@ pci_release_regions(idev->pdev); - MESSAGE("%s: device %s stopped\n", __FUNCTION__, ndev->name); + IRDA_MESSAGE("%s: device %s stopped\n", __FUNCTION__, ndev->name); return 0; } @@ -1593,7 +1598,7 @@ if (pci_set_dma_mask(pdev,DMA_MASK_USED_BY_HW) || pci_set_dma_mask(pdev,DMA_MASK_MSTRPAGE)) { - ERROR("%s: aborting due to PCI BM-DMA address limitations\n", __FUNCTION__); + IRDA_ERROR("%s: aborting due to PCI BM-DMA address limitations\n", __FUNCTION__); return -1; } @@ -1640,18 +1645,19 @@ else pdev->current_state = 0; /* hw must be running now */ - MESSAGE("%s: IrDA PCI controller %s detected\n", - drivername, PCIDEV_NAME(pdev)); + IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", + drivername, PCIDEV_NAME(pdev)); if ( !pci_resource_start(pdev,0) || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { - ERROR("%s: bar 0 invalid", __FUNCTION__); + IRDA_ERROR("%s: bar 0 invalid", __FUNCTION__); goto out_disable; } ndev = alloc_irdadev(sizeof(*idev)); if (ndev==NULL) { - ERROR("%s: Unable to allocate device memory.\n", __FUNCTION__); + IRDA_ERROR("%s: Unable to allocate device memory.\n", + __FUNCTION__); goto out_disable; } @@ -1666,7 +1672,7 @@ goto out_freedev; if (register_netdev(ndev) < 0) { - ERROR("%s: register_netdev failed\n", __FUNCTION__); + IRDA_ERROR("%s: register_netdev failed\n", __FUNCTION__); goto out_freedev; } @@ -1675,7 +1681,8 @@ ent = create_proc_entry(ndev->name, S_IFREG|S_IRUGO, vlsi_proc_root); if (!ent) { - WARNING("%s: failed to create proc entry\n", __FUNCTION__); + IRDA_WARNING("%s: failed to create proc entry\n", + __FUNCTION__); } else { ent->data = ndev; ent->proc_fops = VLSI_PROC_FOPS; @@ -1683,7 +1690,7 @@ } idev->proc_entry = ent; } - MESSAGE("%s: registered device %s\n", drivername, ndev->name); + IRDA_MESSAGE("%s: registered device %s\n", drivername, ndev->name); pci_set_drvdata(pdev, ndev); up(&idev->sem); @@ -1706,7 +1713,7 @@ vlsi_irda_dev_t *idev; if (!ndev) { - ERROR("%s: lost netdevice?\n", drivername); + IRDA_ERROR("%s: lost netdevice?\n", drivername); return; } @@ -1724,7 +1731,7 @@ pci_set_drvdata(pdev, NULL); - MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev)); + IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev)); } #ifdef CONFIG_PM @@ -1743,12 +1750,13 @@ vlsi_irda_dev_t *idev; if (state < 1 || state > 3 ) { - ERROR("%s - %s: invalid pm state request: %u\n", - __FUNCTION__, PCIDEV_NAME(pdev), state); + IRDA_ERROR("%s - %s: invalid pm state request: %u\n", + __FUNCTION__, PCIDEV_NAME(pdev), state); return 0; } if (!ndev) { - ERROR("%s - %s: no netdevice \n", __FUNCTION__, PCIDEV_NAME(pdev)); + IRDA_ERROR("%s - %s: no netdevice \n", + __FUNCTION__, PCIDEV_NAME(pdev)); return 0; } idev = ndev->priv; @@ -1759,8 +1767,7 @@ pdev->current_state = state; } else - ERROR("%s - %s: invalid suspend request %u -> %u\n", - __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state); + IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state); up(&idev->sem); return 0; } @@ -1787,14 +1794,16 @@ vlsi_irda_dev_t *idev; if (!ndev) { - ERROR("%s - %s: no netdevice \n", __FUNCTION__, PCIDEV_NAME(pdev)); + IRDA_ERROR("%s - %s: no netdevice \n", + __FUNCTION__, PCIDEV_NAME(pdev)); return 0; } idev = ndev->priv; down(&idev->sem); if (pdev->current_state == 0) { up(&idev->sem); - WARNING("%s - %s: already resumed\n", __FUNCTION__, PCIDEV_NAME(pdev)); + IRDA_WARNING("%s - %s: already resumed\n", + __FUNCTION__, PCIDEV_NAME(pdev)); return 0; } @@ -1813,7 +1822,7 @@ * now we explicitly set pdev->current_state = 0 after enabling the * device and independently resume_ok should catch any garbage config. */ - WARNING("%s - hm, nothing to resume?\n", __FUNCTION__); + IRDA_WARNING("%s - hm, nothing to resume?\n", __FUNCTION__); up(&idev->sem); return 0; } @@ -1850,7 +1859,7 @@ int i, ret; if (clksrc < 0 || clksrc > 3) { - ERROR("%s: invalid clksrc=%d\n", drivername, clksrc); + IRDA_ERROR("%s: invalid clksrc=%d\n", drivername, clksrc); return -1; } @@ -1863,8 +1872,7 @@ case 64: break; default: - WARNING("%s: invalid %s ringsize %d, using default=8", - drivername, (i)?"rx":"tx", ringsize[i]); + IRDA_WARNING("%s: invalid %s ringsize %d, using default=8", drivername, (i)?"rx":"tx", ringsize[i]); ringsize[i] = 8; break; } diff -Nru a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h --- a/drivers/net/irda/vlsi_ir.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/irda/vlsi_ir.h 2005-03-30 16:58:49 -08:00 @@ -656,7 +656,7 @@ */ if ((a & ~DMA_MASK_MSTRPAGE)>>24 != MSTRPAGE_VALUE) { - ERROR("%s: pci busaddr inconsistency!\n", __FUNCTION__); + IRDA_ERROR("%s: pci busaddr inconsistency!\n", __FUNCTION__); dump_stack(); return; } diff -Nru a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c --- a/drivers/net/irda/w83977af_ir.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/irda/w83977af_ir.c 2005-03-30 16:58:48 -08:00 @@ -245,10 +245,10 @@ err = register_netdev(dev); if (err) { - ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__); + IRDA_ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__); goto err_out3; } - MESSAGE("IrDA: Registered device %s\n", dev->name); + IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); /* Need to store self somewhere */ dev_self[i] = self; @@ -401,8 +401,8 @@ switch_bank(iobase, SET7); outb(0x40, iobase+7); - MESSAGE("W83977AF (IR) driver loaded. " - "Version: 0x%02x\n", version); + IRDA_MESSAGE("W83977AF (IR) driver loaded. " + "Version: 0x%02x\n", version); return 0; } else { @@ -691,7 +691,7 @@ IRDA_DEBUG(4, "%s(%ld)\n", __FUNCTION__ , jiffies); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.fir_base; @@ -743,7 +743,7 @@ unsigned long flags; __u8 hcr; #endif - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(4, "%s\n", __FUNCTION__ ); @@ -945,7 +945,7 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); iobase = self->io.fir_base; @@ -1163,7 +1163,7 @@ int iobase; __u8 set; - ASSERT(self != NULL, return FALSE;); + IRDA_ASSERT(self != NULL, return FALSE;); if (self->io.speed > 115200) { iobase = self->io.fir_base; @@ -1197,10 +1197,10 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct w83977af_ir *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1260,11 +1260,11 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = (struct w83977af_ir *) dev->priv; - ASSERT(self != NULL, return 0;); + IRDA_ASSERT(self != NULL, return 0;); iobase = self->io.fir_base; @@ -1307,11 +1307,11 @@ unsigned long flags; int ret = 0; - ASSERT(dev != NULL, return -1;); + IRDA_ASSERT(dev != NULL, return -1;); self = dev->priv; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd); diff -Nru a/drivers/net/mii.c b/drivers/net/mii.c --- a/drivers/net/mii.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/mii.c 2005-03-30 16:58:48 -08:00 @@ -43,6 +43,9 @@ (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII); + if (mii->supports_gmii) + ecmd->supported |= SUPPORTED_1000baseT_Half | + SUPPORTED_1000baseT_Full; /* only supports twisted-pair */ ecmd->port = PORT_MII; @@ -100,7 +103,7 @@ } else { ecmd->autoneg = AUTONEG_DISABLE; - ecmd->speed = ((bmcr2 & BMCR_SPEED1000 && + ecmd->speed = ((bmcr & BMCR_SPEED1000 && (bmcr & BMCR_SPEED100) == 0) ? SPEED_1000 : (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10); ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; @@ -163,9 +166,9 @@ tmp |= ADVERTISE_100FULL; if (mii->supports_gmii) { if (ecmd->advertising & ADVERTISED_1000baseT_Half) - advert2 |= ADVERTISE_1000HALF; + tmp2 |= ADVERTISE_1000HALF; if (ecmd->advertising & ADVERTISED_1000baseT_Full) - advert2 |= ADVERTISE_1000FULL; + tmp2 |= ADVERTISE_1000FULL; } if (advert != tmp) { mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp); diff -Nru a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/netconsole.c 2005-03-30 16:58:48 -08:00 @@ -60,6 +60,7 @@ .local_port = 6665, .remote_port = 6666, .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + .drop = netpoll_queue, }; static int configured = 0; diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/sis900.c 2005-03-30 16:58:48 -08:00 @@ -196,7 +196,9 @@ MODULE_PARM_DESC(max_interrupt_work, "SiS 900/7016 maximum events handled per interrupt"); MODULE_PARM_DESC(sis900_debug, "SiS 900/7016 bitmapped debugging message level"); +#ifdef CONFIG_NET_POLL_CONTROLLER static void sis900_poll(struct net_device *dev); +#endif static int sis900_open(struct net_device *net_dev); static int sis900_mii_probe (struct net_device * net_dev); static void sis900_init_rxfilter (struct net_device * net_dev); diff -Nru a/drivers/net/sk98lin/skethtool.c b/drivers/net/sk98lin/skethtool.c --- a/drivers/net/sk98lin/skethtool.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/net/sk98lin/skethtool.c 2005-03-30 16:58:51 -08:00 @@ -437,9 +437,6 @@ pAC->LedsOn = 0; mod_timer(&pAC->BlinkTimer, jiffies); msleep_interruptible(data * 1000); - - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(data * HZ); del_timer_sync(&pAC->BlinkTimer); toggleLeds(pNet, 0); diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/tg3.c 2005-03-30 16:58:49 -08:00 @@ -4,6 +4,7 @@ * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) * Copyright (C) 2004 Sun Microsystems Inc. + * Copyright (C) 2005 Broadcom Corporation. * * Firmware is: * Copyright (C) 2000-2003 Broadcom Corporation. @@ -60,8 +61,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.24" -#define DRV_MODULE_RELDATE "March 4, 2005" +#define DRV_MODULE_VERSION "3.25" +#define DRV_MODULE_RELDATE "March 24, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -103,9 +104,7 @@ * replace things like '% foo' with '& (foo - 1)'. */ #define TG3_RX_RCB_RING_SIZE(tp) \ - ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || \ - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) ? \ - 512 : 1024) + ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ? 512 : 1024) #define TG3_TX_RING_SIZE 512 #define TG3_DEF_TX_RING_PENDING (TG3_TX_RING_SIZE - 1) @@ -468,8 +467,7 @@ 0x1f); tp->pci_clock_ctrl = clock_ctrl; - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl | CLOCK_CTRL_625_CORE); @@ -871,6 +869,19 @@ !tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg)) tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000); } + + /* Set phy register 0x10 bit 0 to high fifo elasticity to support + * jumbo frames transmission. + */ + if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && + GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + u32 phy_reg; + + if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, &phy_reg)) + tg3_writephy(tp, MII_TG3_EXT_CTRL, + phy_reg | MII_TG3_EXT_CTRL_FIFO_ELASTIC); + } + tg3_phy_set_wirespeed(tp); return 0; } @@ -969,6 +980,7 @@ #define RESET_KIND_SUSPEND 2 static void tg3_write_sig_post_reset(struct tg3 *, int); +static int tg3_halt_cpu(struct tg3 *, u32); static int tg3_set_power_state(struct tg3 *tp, int state) { @@ -1093,8 +1105,7 @@ CLOCK_CTRL_TXCLK_DISABLE | CLOCK_CTRL_ALTCLK); newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; - } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { + } else if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { newbits1 = CLOCK_CTRL_625_CORE; newbits2 = newbits1 | CLOCK_CTRL_ALTCLK; } else { @@ -1108,8 +1119,7 @@ tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); udelay(40); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { u32 newbits3; if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || @@ -1129,6 +1139,17 @@ tg3_frob_aux_power(tp); + /* Workaround for unstable PLL clock */ + if ((GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_AX) || + (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_BX)) { + u32 val = tr32(0x7d00); + + val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1); + tw32(0x7d00, val); + if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) + tg3_halt_cpu(tp, RX_CPU_BASE); + } + /* Finally, set the new power state. */ pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control); @@ -2448,8 +2469,7 @@ (6 << TX_LENGTHS_IPG_SHIFT) | (32 << TX_LENGTHS_SLOT_TIME_SHIFT))); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { if (netif_carrier_ok(tp->dev)) { tw32(HOSTCC_STAT_COAL_TICKS, DEFAULT_STAT_COAL_TICKS); @@ -2892,7 +2912,13 @@ spin_lock_irqsave(&tp->lock, flags); - if (sblk->status & SD_STATUS_UPDATED) { + /* In INTx mode, it is possible for the interrupt to arrive at + * the CPU before the status block posted prior to the interrupt. + * Reading the PCI State register will confirm whether the + * interrupt is ours and will flush the status block. + */ + if ((sblk->status & SD_STATUS_UPDATED) || + !(tr32(TG3PCI_PCISTATE) & PCISTATE_INT_NOT_ACTIVE)) { /* * writing any value to intr-mbox-0 clears PCI INTA# and * chip-internal interrupt pending events. @@ -3017,6 +3043,7 @@ tp->tx_buffers[entry].skb = NULL; } entry = NEXT_TX(entry); + i++; } dev_kfree_skb(skb); @@ -3568,8 +3595,7 @@ unsigned int i; u32 val; - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { switch (ofs) { case RCVLSC_MODE: case DMAC_MODE: @@ -3811,8 +3837,7 @@ } } - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) val |= GRC_MISC_CFG_KEEP_GPHY_POWER; tw32(GRC_MISC_CFG, val); @@ -4127,7 +4152,7 @@ int i; if (offset == TX_CPU_BASE && - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) + (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) BUG(); if (offset == RX_CPU_BASE) { @@ -4181,14 +4206,14 @@ void (*write_op)(struct tg3 *, u32, u32); if (cpu_base == TX_CPU_BASE && - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { + (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { printk(KERN_ERR PFX "tg3_load_firmware_cpu: Trying to load " "TX cpu firmware on %s which is 5705.\n", tp->dev->name); return -EINVAL; } - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) write_op = tg3_write_mem; else write_op = tg3_write_indirect_reg32; @@ -4928,8 +4953,7 @@ (bdinfo_addr + TG3_BDINFO_MAXLEN_FLAGS), maxlen_flags); - if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && - (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)) + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) tg3_write_mem(tp, (bdinfo_addr + TG3_BDINFO_NIC_ADDR), nic_addr); @@ -5107,8 +5131,7 @@ /* Don't even try to program the JUMBO/MINI buffer descriptor * configs on 5705. */ - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT); } else { @@ -5140,8 +5163,7 @@ /* There is only one send ring on 5705/5750, no need to explicitly * disable the others. */ - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { /* Clear out send RCB ring in SRAM. */ for (i = NIC_SRAM_SEND_RCB; i < NIC_SRAM_RCV_RET_RCB; i += TG3_BDINFO_SIZE) tg3_write_mem(tp, i + TG3_BDINFO_MAXLEN_FLAGS, @@ -5162,8 +5184,7 @@ /* There is only one receive return ring on 5705/5750, no need * to explicitly disable the others. */ - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { for (i = NIC_SRAM_RCV_RET_RCB; i < NIC_SRAM_STATS_BLK; i += TG3_BDINFO_SIZE) { tg3_write_mem(tp, i + TG3_BDINFO_MAXLEN_FLAGS, @@ -5262,8 +5283,7 @@ tw32(HOSTCC_TXCOL_TICKS, LOW_TXCOL_TICKS); tw32(HOSTCC_RXMAX_FRAMES, 1); tw32(HOSTCC_TXMAX_FRAMES, LOW_RXMAX_FRAMES); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { tw32(HOSTCC_RXCOAL_TICK_INT, 0); tw32(HOSTCC_TXCOAL_TICK_INT, 0); } @@ -5276,8 +5296,7 @@ tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, ((u64) tp->status_mapping & 0xffffffff)); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { /* Status/statistics block address. See tg3_timer, * the tg3_periodic_fetch_stats call there, and * tg3_get_stats to see how this works for 5705/5750 chips. @@ -5296,8 +5315,7 @@ tw32(RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE); tw32(RCVLPC_MODE, RCVLPC_MODE_ENABLE); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) tw32(RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE); /* Clear statistics/status block in chip, and status block in ram. */ @@ -5324,8 +5342,7 @@ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0); tr32(MAILBOX_INTERRUPT_0); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) { + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { tw32_f(DMAC_MODE, DMAC_MODE_ENABLE); udelay(40); } @@ -5372,8 +5389,7 @@ udelay(40); tw32(RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE); - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) + if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) tw32(MBFREE_MODE, MBFREE_MODE_ENABLE); tw32(SNDDATAC_MODE, SNDDATAC_MODE_ENABLE); tw32(SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE); @@ -5477,8 +5493,7 @@ tw32(MAC_RCV_RULE_1, 0x86000004 & RCV_RULE_DISABLE_MASK); tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK); - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) limit = 8; else limit = 16; @@ -5622,8 +5637,7 @@ return; } - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) tg3_periodic_fetch_stats(tp); /* This part only runs once per second. */ @@ -6532,10 +6546,6 @@ { struct tg3 *tp = netdev_priv(dev); - if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || - tp->link_config.phy_is_low_power) - return -EAGAIN; - cmd->supported = (SUPPORTED_Autoneg); if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY)) @@ -6552,8 +6562,10 @@ cmd->supported |= SUPPORTED_FIBRE; cmd->advertising = tp->link_config.advertising; - cmd->speed = tp->link_config.active_speed; - cmd->duplex = tp->link_config.active_duplex; + if (netif_running(dev)) { + cmd->speed = tp->link_config.active_speed; + cmd->duplex = tp->link_config.active_duplex; + } cmd->port = 0; cmd->phy_address = PHY_ADDR; cmd->transceiver = 0; @@ -6567,10 +6579,6 @@ { struct tg3 *tp = netdev_priv(dev); - if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || - tp->link_config.phy_is_low_power) - return -EAGAIN; - if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { /* These are the only valid advertisement bits allowed. */ if (cmd->autoneg == AUTONEG_ENABLE && @@ -6595,7 +6603,9 @@ tp->link_config.duplex = cmd->duplex; } - tg3_setup_phy(tp, 1); + if (netif_running(dev)) + tg3_setup_phy(tp, 1); + spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); @@ -6675,6 +6685,9 @@ u32 bmcr; int r; + if (!netif_running(dev)) + return -EAGAIN; + spin_lock_irq(&tp->lock); r = -EINVAL; tg3_readphy(tp, MII_BMCR, &bmcr); @@ -6711,7 +6724,9 @@ (ering->tx_pending > TG3_TX_RING_SIZE - 1)) return -EINVAL; - tg3_netif_stop(tp); + if (netif_running(dev)) + tg3_netif_stop(tp); + spin_lock_irq(&tp->lock); spin_lock(&tp->tx_lock); @@ -6723,9 +6738,12 @@ tp->rx_jumbo_pending = ering->rx_jumbo_pending; tp->tx_pending = ering->tx_pending; - tg3_halt(tp); - tg3_init_hw(tp); - tg3_netif_start(tp); + if (netif_running(dev)) { + tg3_halt(tp); + tg3_init_hw(tp); + tg3_netif_start(tp); + } + spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); @@ -6745,7 +6763,9 @@ { struct tg3 *tp = netdev_priv(dev); - tg3_netif_stop(tp); + if (netif_running(dev)) + tg3_netif_stop(tp); + spin_lock_irq(&tp->lock); spin_lock(&tp->tx_lock); if (epause->autoneg) @@ -6760,9 +6780,12 @@ tp->tg3_flags |= TG3_FLAG_TX_PAUSE; else tp->tg3_flags &= ~TG3_FLAG_TX_PAUSE; - tg3_halt(tp); - tg3_init_hw(tp); - tg3_netif_start(tp); + + if (netif_running(dev)) { + tg3_halt(tp); + tg3_init_hw(tp); + tg3_netif_start(tp); + } spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); @@ -7908,6 +7931,10 @@ tp->pci_hdr_type = (cacheline_sz_reg >> 16) & 0xff; tp->pci_bist = (cacheline_sz_reg >> 24) & 0xff; + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) || + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)) + tp->tg3_flags2 |= TG3_FLG2_5705_PLUS; + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) tp->tg3_flags2 |= TG3_FLG2_HW_TSO; @@ -8795,8 +8822,7 @@ goto err_out_iounmap; } - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { tp->bufmgr_config.mbuf_read_dma_low_water = DEFAULT_MB_RDMA_LOW_WATER_5705; tp->bufmgr_config.mbuf_mac_rx_low_water = diff -Nru a/drivers/net/tg3.h b/drivers/net/tg3.h --- a/drivers/net/tg3.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/net/tg3.h 2005-03-30 16:58:47 -08:00 @@ -140,6 +140,8 @@ #define CHIPREV_5703_AX 0x10 #define CHIPREV_5704_AX 0x20 #define CHIPREV_5704_BX 0x21 +#define CHIPREV_5750_AX 0x40 +#define CHIPREV_5750_BX 0x41 #define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff) #define METAL_REV_A0 0x00 #define METAL_REV_A1 0x01 @@ -1516,6 +1518,7 @@ #define MII_TG3_CTRL_ENABLE_AS_MASTER 0x1000 #define MII_TG3_EXT_CTRL 0x10 /* Extended control register */ +#define MII_TG3_EXT_CTRL_FIFO_ELASTIC 0x0001 #define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002 #define MII_TG3_EXT_CTRL_TBI 0x8000 @@ -2096,6 +2099,7 @@ #define TG3_FLG2_FLASH 0x00008000 #define TG3_FLG2_HW_TSO 0x00010000 #define TG3_FLG2_SERDES_PREEMPHASIS 0x00020000 +#define TG3_FLG2_5705_PLUS 0x00040000 u32 split_mode_max_reqs; #define SPLIT_MODE_5704_MAX_REQ 3 diff -Nru a/drivers/net/tun.c b/drivers/net/tun.c --- a/drivers/net/tun.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/net/tun.c 2005-03-30 16:58:48 -08:00 @@ -226,7 +226,7 @@ { struct tun_pi pi = { 0, __constant_htons(ETH_P_IP) }; struct sk_buff *skb; - size_t len = count; + size_t len = count, align = 0; if (!(tun->flags & TUN_NO_PI)) { if ((len -= sizeof(pi)) > count) @@ -235,13 +235,17 @@ if(memcpy_fromiovec((void *)&pi, iv, sizeof(pi))) return -EFAULT; } + + if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) + align = NET_IP_ALIGN; - if (!(skb = alloc_skb(len + 2, GFP_KERNEL))) { + if (!(skb = alloc_skb(len + align, GFP_KERNEL))) { tun->stats.rx_dropped++; return -ENOMEM; } - skb_reserve(skb, 2); + if (align) + skb_reserve(skb, align); if (memcpy_fromiovec(skb_put(skb, len), iv, len)) return -EFAULT; diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/net/via-velocity.c 2005-03-30 16:58:49 -08:00 @@ -3212,7 +3212,8 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) { - struct velocity_info *vptr = pci_get_drvdata(pdev); + struct net_device *dev = pci_get_drvdata(pdev); + struct velocity_info *vptr = netdev_priv(dev); unsigned long flags; if(!netif_running(vptr->dev)) @@ -3245,7 +3246,8 @@ static int velocity_resume(struct pci_dev *pdev) { - struct velocity_info *vptr = pci_get_drvdata(pdev); + struct net_device *dev = pci_get_drvdata(pdev); + struct velocity_info *vptr = netdev_priv(dev); unsigned long flags; int i; diff -Nru a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c --- a/drivers/net/wireless/airo.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/net/wireless/airo.c 2005-03-30 16:58:47 -08:00 @@ -3440,7 +3440,7 @@ /* Make sure we got something */ if (rxd.rdy && rxd.valid == 0) { len = rxd.len + 12; - if (len < 12 && len > 2048) + if (len < 12 || len > 2048) goto badrx; skb = dev_alloc_skb(len); diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/parport/parport_pc.c 2005-03-30 16:58:50 -08:00 @@ -2733,11 +2733,11 @@ aks_0100, mobility_pp, netmos_9705, + netmos_9715, + netmos_9755, netmos_9805, netmos_9815, netmos_9855, - netmos_9755, - netmos_9715 }; @@ -2808,11 +2808,11 @@ /* aks_0100 */ { 1, { { 0, -1 }, } }, /* mobility_pp */ { 1, { { 0, 1 }, } }, /* netmos_9705 */ { 1, { { 0, -1 }, } }, /* untested */ + /* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */ + /* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */ /* netmos_9805 */ { 1, { { 0, -1 }, } }, /* untested */ /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */ /* netmos_9855 */ { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */ - /* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */ - /* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */ }; static struct pci_device_id parport_pc_pci_tbl[] = { @@ -2885,16 +2885,16 @@ /* NetMos communication controllers */ { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9705, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9705 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9715, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9715 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9755, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9755 }, { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9805 }, { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9815, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9815 }, { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 }, - { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9755, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9755 }, - { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9715, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9715 }, { 0, } /* terminate list */ }; MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl); diff -Nru a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c --- a/drivers/parport/parport_serial.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/parport/parport_serial.c 2005-03-30 16:58:50 -08:00 @@ -33,8 +33,7 @@ enum parport_pc_pci_cards { titan_110l = 0, titan_210l, - netmos_9735, - netmos_9835, + netmos_9xx5_combo, avlab_1s1p, avlab_1s1p_650, avlab_1s1p_850, @@ -51,9 +50,8 @@ siig_2s1p_20x, }; - /* each element directly indexed from enum list, above */ -static struct parport_pc_pci { +struct parport_pc_pci { int numports; struct { /* BAR (base address registers) numbers in the config space header */ @@ -65,16 +63,30 @@ /* If set, this is called immediately after pci_enable_device. * If it returns non-zero, no probing will take place and the * ports will not be used. */ - int (*preinit_hook) (struct pci_dev *pdev, int autoirq, int autodma); + int (*preinit_hook) (struct pci_dev *pdev, struct parport_pc_pci *card, + int autoirq, int autodma); /* If set, this is called after probing for ports. If 'failed' * is non-zero we couldn't use any of the ports. */ - void (*postinit_hook) (struct pci_dev *pdev, int failed); -} cards[] __devinitdata = { + void (*postinit_hook) (struct pci_dev *pdev, + struct parport_pc_pci *card, int failed); +}; + +static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma) +{ + /* + * Netmos uses the subdevice ID to indicate the number of parallel + * and serial ports. The form is 0x00PS, where

is the number of + * parallel ports and is the number of serial ports. + */ + card->numports = (dev->subsystem_device & 0xf0) >> 4; + return 0; +} + +static struct parport_pc_pci cards[] __devinitdata = { /* titan_110l */ { 1, { { 3, -1 }, } }, /* titan_210l */ { 1, { { 3, -1 }, } }, - /* netmos_9735 (not tested) */ { 1, { { 2, -1 }, } }, - /* netmos_9835 */ { 1, { { 2, -1 }, } }, + /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, /* avlab_1s1p */ { 1, { { 1, 2}, } }, /* avlab_1s1p_650 */ { 1, { { 1, 2}, } }, /* avlab_1s1p_850 */ { 1, { { 1, 2}, } }, @@ -98,9 +110,17 @@ { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_210L, PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_210l }, { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9735, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9735 }, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9745, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo }, { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9835 }, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9845, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9xx5_combo }, /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/ { 0x14db, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p}, { 0x14db, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_650}, @@ -167,6 +187,12 @@ return pci_siig20x_fn(dev, enable); } +static int __devinit netmos_serial_init(struct pci_dev *dev, struct pci_board_no_ids *board, int enable) +{ + board->num_ports = dev->subsystem_device & 0xf; + return 0; +} + static struct pci_board_no_ids pci_boards[] __devinitdata = { /* * PCI Flags, Number of Ports, Base (Maximum) Baud Rate, @@ -180,8 +206,7 @@ /* titan_110l */ { SPCI_FL_BASE1 | SPCI_FL_BASE_TABLE, 1, 921600 }, /* titan_210l */ { SPCI_FL_BASE1 | SPCI_FL_BASE_TABLE, 2, 921600 }, -/* netmos_9735 (n/t)*/ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 }, -/* netmos_9835 */ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 }, +/* netmos_9xx5_combo */ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200, 0, 0, netmos_serial_init }, /* avlab_1s1p (n/t) */ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 }, /* avlab_1s1p_650 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 }, /* avlab_1s1p_850 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 }, @@ -204,6 +229,7 @@ struct pci_board_no_ids ser; int num_par; struct parport *port[PARPORT_MAX]; + struct parport_pc_pci par; }; static int __devinit get_pci_port (struct pci_dev *dev, @@ -271,14 +297,15 @@ static int __devinit serial_register (struct pci_dev *dev, const struct pci_device_id *id) { - struct pci_board_no_ids *board = &pci_boards[id->driver_data]; + struct pci_board_no_ids *board; struct parport_serial_private *priv = pci_get_drvdata (dev); struct serial_struct serial_req; int base_baud; int k; int success = 0; - priv->ser = *board; + priv->ser = pci_boards[id->driver_data]; + board = &priv->ser; if (board->init_fn && ((board->init_fn) (dev, board, 1) != 0)) return 1; @@ -289,6 +316,15 @@ for (k = 0; k < board->num_ports; k++) { int line; + + if (priv->num_ser == ARRAY_SIZE (priv->line)) { + printk (KERN_WARNING + "parport_serial: %s: only %u serial lines " + "supported (%d reported)\n", pci_name (dev), + ARRAY_SIZE (priv->line), board->num_ports); + break; + } + serial_req.irq = dev->irq; if (get_pci_port (dev, board, &serial_req, k)) break; @@ -311,19 +347,31 @@ static int __devinit parport_register (struct pci_dev *dev, const struct pci_device_id *id) { + struct parport_pc_pci *card; struct parport_serial_private *priv = pci_get_drvdata (dev); int i = id->driver_data, n; int success = 0; - if (cards[i].preinit_hook && - cards[i].preinit_hook (dev, PARPORT_IRQ_NONE, PARPORT_DMA_NONE)) + priv->par = cards[id->driver_data]; + card = &priv->par; + if (card->preinit_hook && + card->preinit_hook (dev, card, PARPORT_IRQ_NONE, PARPORT_DMA_NONE)) return -ENODEV; - for (n = 0; n < cards[i].numports; n++) { + for (n = 0; n < card->numports; n++) { struct parport *port; - int lo = cards[i].addr[n].lo; - int hi = cards[i].addr[n].hi; + int lo = card->addr[n].lo; + int hi = card->addr[n].hi; unsigned long io_lo, io_hi; + + if (priv->num_par == ARRAY_SIZE (priv->port)) { + printk (KERN_WARNING + "parport_serial: %s: only %u parallel ports " + "supported (%d reported)\n", pci_name (dev), + ARRAY_SIZE (priv->port), card->numports); + break; + } + io_lo = pci_resource_start (dev, lo); io_hi = 0; if ((hi >= 0) && (hi <= 6)) @@ -345,8 +393,8 @@ } } - if (cards[i].postinit_hook) - cards[i].postinit_hook (dev, !success); + if (card->postinit_hook) + card->postinit_hook (dev, card, !success); return success ? 0 : 1; } diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c --- a/drivers/pci/pci.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/pci/pci.c 2005-03-30 16:58:48 -08:00 @@ -312,22 +312,24 @@ /** * pci_choose_state - Choose the power state of a PCI device * @dev: PCI device to be suspended - * @state: target sleep state for the whole system + * @state: target sleep state for the whole system. This is the value + * that is passed to suspend() function. * * Returns PCI power state suitable for given device and given system * message. */ -pci_power_t pci_choose_state(struct pci_dev *dev, u32 state) +pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { if (!pci_find_capability(dev, PCI_CAP_ID_PM)) return PCI_D0; switch (state) { - case 0: return PCI_D0; - case 2: return PCI_D2; + case 0: return PCI_D0; case 3: return PCI_D3hot; - default: BUG(); + default: + printk("They asked me for state %d\n", state); + BUG(); } return PCI_D0; } diff -Nru a/drivers/pci/pci.ids b/drivers/pci/pci.ids --- a/drivers/pci/pci.ids 2005-03-30 16:58:49 -08:00 +++ b/drivers/pci/pci.ids 2005-03-30 16:58:49 -08:00 @@ -1812,6 +1812,7 @@ 103c 1226 Keystone SP2 103c 1227 Powerbar SP2 103c 1282 Everest SP2 + 103c 1301 Diva RMP3 1054 PCI Local Bus Adapter 1064 79C970 PCnet Ethernet Controller 108b Visualize FXe @@ -6304,6 +6305,7 @@ 7401 Four Port RS-232 Interface 7402 Four Port RS-422/485 Interface 7801 Eight Port RS-232 Interface + 7804 Eight Port RS-232/422/485 Interface 8001 8001 Digital I/O Adapter 135f I-Data International A-S 1360 Meinberg Funkuhren @@ -9570,14 +9572,25 @@ 6565 6565 9710 NetMos Technology 7780 USB IRDA-port - 9815 PCI 9815 Multi-I/O Controller + 9705 PCI 9705 Parallel Port + 9715 PCI 9715 Dual Parallel Port + 9735 PCI 9735 Multi-I/O Controller + 1000 0002 0P2S (2 serial) + 1000 0012 1P2S (1 parallel + 2 serial) + 9745 PCI 9745 Multi-I/O Controller + 1000 0002 0P2S (2 serial) + 1000 0012 1P2S (1 parallel + 2 serial) + 9755 PCI 9755 Parallel Port and ISA Bridge + 9805 PCI 9805 Parallel Port + 9815 PCI 9815 Dual Parallel Port 1000 0020 2P0S (2 port parallel adaptor) 9835 PCI 9835 Multi-I/O Controller - 1000 0002 2S (16C550 UART) + 1000 0002 0P2S (16C550 UART) 1000 0012 1P2S 9845 PCI 9845 Multi-I/O Controller 1000 0004 0P4S (4 port 16550A serial card) - 1000 0006 0P6S (6 port 16550a serial card) + 1000 0006 0P6S (6 port 16550A serial card) + 1000 0014 1P4S (4 port 16550A serial card + parallel) 9855 PCI 9855 Multi-I/O Controller 1000 0014 1P4S 9902 Stargen Inc. diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pci/quirks.c 2005-03-30 16:58:47 -08:00 @@ -1259,6 +1259,40 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch ); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch ); +static void __devinit quirk_netmos(struct pci_dev *dev) +{ + unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; + unsigned int num_serial = dev->subsystem_device & 0xf; + + /* + * These Netmos parts are multiport serial devices with optional + * parallel ports. Even when parallel ports are present, they + * are identified as class SERIAL, which means the serial driver + * will claim them. To prevent this, mark them as class OTHER. + * These combo devices should be claimed by parport_serial. + * + * The subdevice ID is of the form 0x00PS, where

is the number + * of parallel ports and is the number of serial ports. + */ + switch (dev->device) { + case PCI_DEVICE_ID_NETMOS_9735: + case PCI_DEVICE_ID_NETMOS_9745: + case PCI_DEVICE_ID_NETMOS_9835: + case PCI_DEVICE_ID_NETMOS_9845: + case PCI_DEVICE_ID_NETMOS_9855: + if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_SERIAL && + num_parallel) { + printk(KERN_INFO "PCI: Netmos %04x (%u parallel, " + "%u serial); changing class SERIAL to OTHER " + "(use parport_serial)\n", + dev->device, num_parallel, num_serial); + dev->class = (PCI_CLASS_COMMUNICATION_OTHER << 8) | + (dev->class & 0xff); + } + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); + static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) { while (f < end) { diff -Nru a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c --- a/drivers/pcmcia/au1000_generic.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/pcmcia/au1000_generic.c 2005-03-30 16:58:49 -08:00 @@ -156,15 +156,12 @@ static int au1x00_pcmcia_suspend(struct pcmcia_socket *sock) { struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); - int ret; debug("suspending socket %u\n", skt->nr); - ret = au1x00_pcmcia_config_skt(skt, &dead_socket); - if (ret == 0) - skt->ops->socket_suspend(skt); + skt->ops->socket_suspend(skt); - return ret; + return 0; } static DEFINE_SPINLOCK(status_lock); diff -Nru a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c --- a/drivers/pcmcia/cs.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pcmcia/cs.c 2005-03-30 16:58:47 -08:00 @@ -140,7 +140,7 @@ static int socket_resume(struct pcmcia_socket *skt); static int socket_suspend(struct pcmcia_socket *skt); -int pcmcia_socket_dev_suspend(struct device *dev, u32 state) +int pcmcia_socket_dev_suspend(struct device *dev, pm_message_t state) { struct pcmcia_socket *socket; @@ -565,7 +565,9 @@ send_event(skt, CS_EVENT_PM_SUSPEND, CS_EVENT_PRI_LOW); skt->socket = dead_socket; - skt->ops->suspend(skt); + skt->ops->set_socket(skt, &skt->socket); + if (skt->ops->suspend) + skt->ops->suspend(skt); skt->state |= SOCKET_SUSPEND; return CS_SUCCESS; @@ -586,6 +588,11 @@ skt->socket = dead_socket; skt->ops->init(skt); skt->ops->set_socket(skt, &skt->socket); + + if (!(skt->state & SOCKET_PRESENT)) { + skt->state &= ~SOCKET_SUSPEND; + return socket_insert(skt); + } ret = socket_setup(skt, resume_delay); if (ret == CS_SUCCESS) { diff -Nru a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c --- a/drivers/pcmcia/ds.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/pcmcia/ds.c 2005-03-30 16:58:49 -08:00 @@ -91,8 +91,7 @@ struct pcmcia_callback callback; int state; user_info_t *user; - int req_pending, req_result; - wait_queue_head_t queue, request; + wait_queue_head_t queue; struct pcmcia_socket *parent; /* the PCMCIA devices connected to this socket (normally one, more @@ -673,19 +672,6 @@ wake_up_interruptible(&s->queue); } -static int handle_request(struct pcmcia_bus_socket *s, event_t event) -{ - if (s->req_pending != 0) - return CS_IN_USE; - if (s->state & DS_SOCKET_BUSY) - s->req_pending = 1; - handle_event(s, event); - if (wait_event_interruptible(s->request, s->req_pending <= 0)) - return CS_IN_USE; - if (s->state & DS_SOCKET_BUSY) - return s->req_result; - return CS_SUCCESS; -} /*====================================================================== @@ -767,9 +753,6 @@ break; case CS_EVENT_EJECTION_REQUEST: - ret = handle_request(s, event); - if (ret) - break; ret = send_event(skt, event, priority); break; @@ -1216,8 +1199,6 @@ /* Unlink user data structure */ if ((file->f_flags & O_ACCMODE) != O_RDONLY) { s->state &= ~DS_SOCKET_BUSY; - s->req_pending = 0; - wake_up_interruptible(&s->request); } file->private_data = NULL; for (link = &s->user; *link; link = &(*link)->next) @@ -1266,33 +1247,14 @@ static ssize_t ds_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct pcmcia_bus_socket *s; - user_info_t *user; - ds_dbg(2, "ds_write(socket %d)\n", iminor(file->f_dentry->d_inode)); - + if (count != 4) return -EINVAL; if ((file->f_flags & O_ACCMODE) == O_RDONLY) return -EBADF; - user = file->private_data; - if (CHECK_USER(user)) - return -EIO; - - s = user->socket; - if (s->state & DS_SOCKET_DEAD) - return -EIO; - - if (s->req_pending) { - s->req_pending--; - get_user(s->req_result, (int __user *)buf); - if ((s->req_result != 0) || (s->req_pending == 0)) - wake_up_interruptible(&s->request); - } else - return -EIO; - - return 4; + return -EIO; } /* ds_write */ /*====================================================================*/ @@ -1386,7 +1348,9 @@ buf->config.Function, &buf->config); break; case DS_GET_FIRST_TUPLE: + down(&s->parent->skt_sem); pcmcia_validate_mem(s->parent); + up(&s->parent->skt_sem); ret = pccard_get_first_tuple(s->parent, BIND_FN_ALL, &buf->tuple); break; case DS_GET_NEXT_TUPLE: @@ -1412,7 +1376,9 @@ ret = pccard_get_status(s->parent, buf->status.Function, &buf->status); break; case DS_VALIDATE_CIS: + down(&s->parent->skt_sem); pcmcia_validate_mem(s->parent); + up(&s->parent->skt_sem); ret = pccard_validate_cis(s->parent, BIND_FN_ALL, &buf->cisinfo); break; case DS_SUSPEND_CARD: @@ -1453,7 +1419,7 @@ printed++; } } - ret = -EINVAL; + err = -EINVAL; goto free_out; break; case DS_GET_FIRST_WINDOW: @@ -1562,7 +1528,6 @@ msleep(250); init_waitqueue_head(&s->queue); - init_waitqueue_head(&s->request); INIT_LIST_HEAD(&s->devices_list); /* Set up hotline to Card Services */ diff -Nru a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c --- a/drivers/pcmcia/hd64465_ss.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/pcmcia/hd64465_ss.c 2005-03-30 16:58:49 -08:00 @@ -353,20 +353,6 @@ /*============================================================*/ -static int hs_suspend(struct pcmcia_socket *s) -{ -#ifdef HD64465_DEBUG - hs_socket_t *sp = container_of(s, struct hs_socket_t, socket); - DPRINTK("hs_suspend(%d)\n", sp->number); -#endif - - /* TODO */ - - return 0; -} - -/*============================================================*/ - static int hs_get_status(struct pcmcia_socket *s, u_int *value) { @@ -763,7 +749,6 @@ static struct pccard_operations hs_operations = { .init = hs_init, - .suspend = hs_suspend, .get_status = hs_get_status, .get_socket = hs_get_socket, .set_socket = hs_set_socket, diff -Nru a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c --- a/drivers/pcmcia/i82092.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/pcmcia/i82092.c 2005-03-30 16:58:50 -08:00 @@ -42,7 +42,7 @@ }; MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids); -static int i82092aa_socket_suspend (struct pci_dev *dev, u32 state) +static int i82092aa_socket_suspend (struct pci_dev *dev, pm_message_t state) { return pcmcia_socket_dev_suspend(&dev->dev, state); } @@ -65,7 +65,6 @@ /* the pccard structure and its functions */ static struct pccard_operations i82092aa_operations = { .init = i82092aa_init, - .suspend = i82092aa_suspend, .get_status = i82092aa_get_status, .get_socket = i82092aa_get_socket, .set_socket = i82092aa_set_socket, @@ -440,15 +439,6 @@ return 0; } -static int i82092aa_suspend(struct pcmcia_socket *sock) -{ - int retval; - enter("i82092aa_suspend"); - retval = i82092aa_set_socket(sock, &dead_socket); - leave("i82092aa_suspend"); - return retval; -} - static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value) { unsigned int sock = container_of(socket, struct socket_info, socket)->number; diff -Nru a/drivers/pcmcia/i82092aa.h b/drivers/pcmcia/i82092aa.h --- a/drivers/pcmcia/i82092aa.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/pcmcia/i82092aa.h 2005-03-30 16:58:47 -08:00 @@ -34,7 +34,6 @@ static int i82092aa_set_io_map(struct pcmcia_socket *socket, struct pccard_io_map *io); static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_map *mem); static int i82092aa_init(struct pcmcia_socket *socket); -static int i82092aa_suspend(struct pcmcia_socket *socket); #endif diff -Nru a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c --- a/drivers/pcmcia/i82365.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/pcmcia/i82365.c 2005-03-30 16:58:50 -08:00 @@ -1322,14 +1322,8 @@ return 0; } -static int pcic_suspend(struct pcmcia_socket *sock) -{ - return pcic_set_socket(sock, &dead_socket); -} - static struct pccard_operations pcic_operations = { .init = pcic_init, - .suspend = pcic_suspend, .get_status = pcic_get_status, .get_socket = pcic_get_socket, .set_socket = pcic_set_socket, @@ -1339,7 +1333,7 @@ /*====================================================================*/ -static int i82365_suspend(struct device *dev, u32 state, u32 level) +static int i82365_suspend(struct device *dev, pm_message_t state, u32 level) { int ret = 0; if (level == SUSPEND_SAVE_STATE) diff -Nru a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c --- a/drivers/pcmcia/m32r_cfc.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/pcmcia/m32r_cfc.c 2005-03-30 16:58:48 -08:00 @@ -732,15 +732,8 @@ return 0; } -static int pcc_suspend(struct pcmcia_socket *sock) -{ - debug(3, "m32r_cfc: pcc_suspend()\n"); - return pcc_set_socket(sock, &dead_socket); -} - static struct pccard_operations pcc_operations = { .init = pcc_init, - .suspend = pcc_suspend, .get_status = pcc_get_status, .get_socket = pcc_get_socket, .set_socket = pcc_set_socket, diff -Nru a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c --- a/drivers/pcmcia/m32r_pcc.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pcmcia/m32r_pcc.c 2005-03-30 16:58:47 -08:00 @@ -685,14 +685,8 @@ return 0; } -static int pcc_suspend(struct pcmcia_socket *sock) -{ - return pcc_set_socket(sock, &dead_socket); -} - static struct pccard_operations pcc_operations = { .init = pcc_init, - .suspend = pcc_suspend, .get_status = pcc_get_status, .get_socket = pcc_get_socket, .set_socket = pcc_set_socket, diff -Nru a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c --- a/drivers/pcmcia/pd6729.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/pcmcia/pd6729.c 2005-03-30 16:58:50 -08:00 @@ -615,11 +615,6 @@ return 0; } -static int pd6729_suspend(struct pcmcia_socket *sock) -{ - return pd6729_set_socket(sock, &dead_socket); -} - static int pd6729_init(struct pcmcia_socket *sock) { int i; @@ -644,7 +639,6 @@ /* the pccard structure and its functions */ static struct pccard_operations pd6729_operations = { .init = pd6729_init, - .suspend = pd6729_suspend, .get_status = pd6729_get_status, .get_socket = pd6729_get_socket, .set_socket = pd6729_set_socket, @@ -833,7 +827,7 @@ kfree(socket); } -static int pd6729_socket_suspend(struct pci_dev *dev, u32 state) +static int pd6729_socket_suspend(struct pci_dev *dev, pm_message_t state) { return pcmcia_socket_dev_suspend(&dev->dev, state); } diff -Nru a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c --- a/drivers/pcmcia/rsrc_nonstatic.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pcmcia/rsrc_nonstatic.c 2005-03-30 16:58:47 -08:00 @@ -474,8 +474,7 @@ /* - * Locking note: this is the only place where we take - * both rsrc_sem and skt_sem. + * Locking note: Must be called with skt_sem held! */ static void pcmcia_nonstatic_validate_mem(struct pcmcia_socket *s) { @@ -492,12 +491,8 @@ if (probe_mask & ~s_data->rsrc_mem_probe) { s_data->rsrc_mem_probe |= probe_mask; - down(&s->skt_sem); - if (s->state & SOCKET_PRESENT) validate_mem(s, probe_mask); - - up(&s->skt_sem); } up(&rsrc_sem); @@ -781,6 +776,7 @@ data = kmalloc(sizeof(struct socket_data), GFP_KERNEL); if (!data) return -ENOMEM; + memset(data, 0, sizeof(struct socket_data)); data->mem_db.next = &data->mem_db; data->io_db.next = &data->io_db; diff -Nru a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c --- a/drivers/pcmcia/soc_common.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pcmcia/soc_common.c 2005-03-30 16:58:47 -08:00 @@ -197,15 +197,12 @@ static int soc_common_pcmcia_suspend(struct pcmcia_socket *sock) { struct soc_pcmcia_socket *skt = to_soc_pcmcia_socket(sock); - int ret; debug(skt, 2, "suspending socket\n"); - ret = soc_common_pcmcia_config_skt(skt, &dead_socket); - if (ret == 0) - skt->ops->socket_suspend(skt); + skt->ops->socket_suspend(skt); - return ret; + return 0; } static DEFINE_SPINLOCK(status_lock); diff -Nru a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c --- a/drivers/pcmcia/tcic.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/pcmcia/tcic.c 2005-03-30 16:58:49 -08:00 @@ -373,7 +373,7 @@ /*====================================================================*/ -static int tcic_drv_suspend(struct device *dev, u32 state, u32 level) +static int tcic_drv_suspend(struct device *dev, pm_message_t state, u32 level) { int ret = 0; if (level == SUSPEND_SAVE_STATE) @@ -888,14 +888,8 @@ return 0; } -static int tcic_suspend(struct pcmcia_socket *sock) -{ - return tcic_set_socket(sock, &dead_socket); -} - static struct pccard_operations tcic_operations = { .init = tcic_init, - .suspend = tcic_suspend, .get_status = tcic_get_status, .get_socket = tcic_get_socket, .set_socket = tcic_set_socket, diff -Nru a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c --- a/drivers/pcmcia/vrc4171_card.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/pcmcia/vrc4171_card.c 2005-03-30 16:58:50 -08:00 @@ -249,11 +249,6 @@ return 0; } -static int pccard_suspend(struct pcmcia_socket *sock) -{ - return -EINVAL; -} - static int pccard_get_status(struct pcmcia_socket *sock, u_int *value) { unsigned int slot; @@ -554,7 +549,6 @@ static struct pccard_operations vrc4171_pccard_operations = { .init = pccard_init, - .suspend = pccard_suspend, .get_status = pccard_get_status, .get_socket = pccard_get_socket, .set_socket = pccard_set_socket, diff -Nru a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c --- a/drivers/pcmcia/vrc4173_cardu.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pcmcia/vrc4173_cardu.c 2005-03-30 16:58:47 -08:00 @@ -141,11 +141,6 @@ return 0; } -static int cardu_suspend(unsigned int slot) -{ - return -EINVAL; -} - static int cardu_register_callback(unsigned int sock, void (*handler)(void *, unsigned int), void * info) @@ -433,7 +428,6 @@ static struct pccard_operations cardu_operations = { .init = cardu_init, - .suspend = cardu_suspend, .register_callback = cardu_register_callback, .inquire_socket = cardu_inquire_socket, .get_status = cardu_get_status, diff -Nru a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c --- a/drivers/pcmcia/yenta_socket.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/pcmcia/yenta_socket.c 2005-03-30 16:58:49 -08:00 @@ -506,8 +506,6 @@ { struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); - yenta_set_socket(sock, &dead_socket); - /* Disable CSC interrupts */ cb_writel(socket, CB_SOCKET_MASK, 0x0); @@ -1019,7 +1017,7 @@ } -static int yenta_dev_suspend (struct pci_dev *dev, u32 state) +static int yenta_dev_suspend (struct pci_dev *dev, pm_message_t state) { struct yenta_socket *socket = pci_get_drvdata(dev); int ret; diff -Nru a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c --- a/drivers/pnp/pnpbios/core.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/pnp/pnpbios/core.c 2005-03-30 16:58:47 -08:00 @@ -180,8 +180,12 @@ * Poll every 2 seconds */ msleep_interruptible(2000); - if(signal_pending(current)) + + if(signal_pending(current)) { + if (try_to_freeze(PF_FREEZE)) + continue; break; + } status = pnp_bios_dock_station_info(&now); diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c --- a/drivers/pnp/resource.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/pnp/resource.c 2005-03-30 16:58:49 -08:00 @@ -21,7 +21,6 @@ #include #include "base.h" -static int pnp_skip_pci_scan; /* skip PCI resource scanning */ static int pnp_reserve_irq[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some IRQ */ static int pnp_reserve_dma[8] = { [0 ... 7] = -1 }; /* reserve (don't use) some DMA */ static int pnp_reserve_io[16] = { [0 ... 15] = -1 }; /* reserve (don't use) some I/O region */ @@ -385,9 +384,9 @@ #ifdef CONFIG_PCI /* check if the resource is being used by a pci device */ - if (!pnp_skip_pci_scan) { - struct pci_dev * pci = NULL; - while ((pci = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci)) != NULL) { + { + struct pci_dev *pci = NULL; + for_each_pci_dev(pci) { if (pci->irq == *irq) return 0; } diff -Nru a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c --- a/drivers/s390/block/dasd.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/s390/block/dasd.c 2005-03-30 16:58:48 -08:00 @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.156 $ + * $Revision: 1.158 $ */ #include @@ -757,6 +757,17 @@ DBF_DEV_EVENT(DBF_ERR, device, "%s", "start_IO: request timeout, retry later"); break; + case -EACCES: + /* -EACCES indicates that the request used only a + * subset of the available pathes and all these + * pathes are gone. + * Do a retry with all available pathes. + */ + cqr->lpm = LPM_ANYPATH; + DBF_DEV_EVENT(DBF_ERR, device, "%s", + "start_IO: selected pathes gone," + " retry on all pathes"); + break; case -ENODEV: case -EIO: DBF_DEV_EVENT(DBF_ERR, device, "%s", @@ -1222,7 +1233,9 @@ rc = device->discipline->start_IO(cqr); if (rc == 0) dasd_set_timer(device, cqr->expires); - else + else if (rc == -EACCES) { + dasd_schedule_bh(device); + } else /* Hmpf, try again in 1/2 sec */ dasd_set_timer(device, 50); } @@ -1813,8 +1826,8 @@ if (rc) { printk (KERN_WARNING "dasd_generic couldn't online device %s " - "with discipline %s\n", - cdev->dev.bus_id, discipline->name); + "with discipline %s rc=%i\n", + cdev->dev.bus_id, discipline->name, rc); dasd_delete_device(device); return rc; } diff -Nru a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c --- a/drivers/s390/block/dasd_eckd.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/s390/block/dasd_eckd.c 2005-03-30 16:58:47 -08:00 @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.68 $ + * $Revision: 1.69 $ */ #include @@ -56,6 +56,7 @@ struct dasd_eckd_private { struct dasd_eckd_characteristics rdc_data; struct dasd_eckd_confdata conf_data; + struct dasd_eckd_path path_data; struct eckd_count count_area[5]; int init_cqr_status; int uses_cdl; @@ -447,12 +448,72 @@ } static int +dasd_eckd_read_conf(struct dasd_device *device) +{ + void *conf_data; + int conf_len, conf_data_saved; + int rc; + __u8 lpm; + struct dasd_eckd_private *private; + struct dasd_eckd_path *path_data; + + private = (struct dasd_eckd_private *) device->private; + path_data = (struct dasd_eckd_path *) &private->path_data; + path_data->opm = ccw_device_get_path_mask(device->cdev); + lpm = 0x80; + conf_data_saved = 0; + + /* get configuration data per operational path */ + for (lpm = 0x80; lpm; lpm>>= 1) { + if (lpm & path_data->opm){ + rc = read_conf_data_lpm(device->cdev, &conf_data, + &conf_len, lpm); + if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ + MESSAGE(KERN_WARNING, + "Read configuration data returned " + "error %d", rc); + return rc; + } + if (conf_data == NULL) { + MESSAGE(KERN_WARNING, "%s", "No configuration " + "data retrieved"); + continue; /* no errror */ + } + if (conf_len != sizeof (struct dasd_eckd_confdata)) { + MESSAGE(KERN_WARNING, + "sizes of configuration data mismatch" + "%d (read) vs %ld (expected)", + conf_len, + sizeof (struct dasd_eckd_confdata)); + kfree(conf_data); + continue; /* no errror */ + } + /* save first valid configuration data */ + if (!conf_data_saved){ + memcpy(&private->conf_data, conf_data, + sizeof (struct dasd_eckd_confdata)); + conf_data_saved++; + } + switch (((char *)conf_data)[242] & 0x07){ + case 0x02: + path_data->npm |= lpm; + break; + case 0x03: + path_data->ppm |= lpm; + break; + } + kfree(conf_data); + } + } + return 0; +} + + +static int dasd_eckd_check_characteristics(struct dasd_device *device) { struct dasd_eckd_private *private; void *rdc_data; - void *conf_data; - int conf_len; int rc; private = (struct dasd_eckd_private *) device->private; @@ -465,6 +526,7 @@ "data"); return -ENOMEM; } + memset(private, 0, sizeof(struct dasd_eckd_private)); device->private = (void *) private; } /* Invalidate status of initial analysis. */ @@ -494,30 +556,9 @@ private->rdc_data.sec_per_trk); /* Read Configuration Data */ - rc = read_conf_data(device->cdev, &conf_data, &conf_len); - if (rc && rc != -EOPNOTSUPP) { /* -EOPNOTSUPP is ok */ - DEV_MESSAGE(KERN_WARNING, device, - "Read configuration data returned error %d", rc); - return rc; - } - if (conf_data == NULL) { - DEV_MESSAGE(KERN_WARNING, device, "%s", - "No configuration data retrieved"); - return 0; /* no errror */ - } - if (conf_len != sizeof (struct dasd_eckd_confdata)) { - DEV_MESSAGE(KERN_WARNING, device, - "sizes of configuration data mismatch" - "%d (read) vs %ld (expected)", - conf_len, sizeof (struct dasd_eckd_confdata)); - - kfree(conf_data); /* allocated by read_conf_data() */ - return 0; /* no errror */ - } - memcpy(&private->conf_data, conf_data, - sizeof (struct dasd_eckd_confdata)); - kfree(conf_data); /* allocated by read_conf_data() */ - return 0; + rc = dasd_eckd_read_conf (device); + return rc; + } static struct dasd_ccw_req * @@ -1096,7 +1137,7 @@ } cqr->device = device; cqr->expires = 5 * 60 * HZ; /* 5 minutes */ - cqr->lpm = LPM_ANYPATH; + cqr->lpm = private->path_data.ppm; cqr->retries = 256; cqr->buildclk = get_clock(); cqr->status = DASD_CQR_FILLED; diff -Nru a/drivers/s390/block/dasd_eckd.h b/drivers/s390/block/dasd_eckd.h --- a/drivers/s390/block/dasd_eckd.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/s390/block/dasd_eckd.h 2005-03-30 16:58:48 -08:00 @@ -5,7 +5,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.9 $ + * $Revision: 1.10 $ */ #ifndef DASD_ECKD_H @@ -325,6 +325,12 @@ unsigned char reserved2[12]; } __attribute__ ((packed)) neq; } __attribute__ ((packed)); + +struct dasd_eckd_path { + __u8 opm; + __u8 ppm; + __u8 npm; +}; /* * Perform Subsystem Function - Prepare for Read Subsystem Data diff -Nru a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c --- a/drivers/s390/block/dasd_erp.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/s390/block/dasd_erp.c 2005-03-30 16:58:47 -08:00 @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.13 $ + * $Revision: 1.14 $ */ #include @@ -95,6 +95,7 @@ DEV_MESSAGE (KERN_DEBUG, device, "default ERP called (%i retries left)", cqr->retries); + cqr->lpm = LPM_ANYPATH; cqr->status = DASD_CQR_QUEUED; } else { DEV_MESSAGE (KERN_WARNING, device, "%s", diff -Nru a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c --- a/drivers/s390/cio/chsc.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/s390/cio/chsc.c 2005-03-30 16:58:49 -08:00 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/chsc.c * S/390 common I/O routines -- channel subsystem call - * $Revision: 1.118 $ + * $Revision: 1.119 $ * * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -887,6 +887,27 @@ static DEVICE_ATTR(status, 0644, chp_status_show, chp_status_write); +static ssize_t +chp_type_show(struct device *dev, char *buf) +{ + struct channel_path *chp = container_of(dev, struct channel_path, dev); + + if (!chp) + return 0; + return sprintf(buf, "%x\n", chp->desc.desc); +} + +static DEVICE_ATTR(type, 0444, chp_type_show, NULL); + +static struct attribute * chp_attrs[] = { + &dev_attr_status.attr, + &dev_attr_type.attr, + NULL, +}; + +static struct attribute_group chp_attr_group = { + .attrs = chp_attrs, +}; static void chp_release(struct device *dev) @@ -897,6 +918,68 @@ kfree(cp); } +static int +chsc_determine_channel_path_description(int chpid, + struct channel_path_desc *desc) +{ + int ccode, ret; + + struct { + struct chsc_header request; + u32 : 24; + u32 first_chpid : 8; + u32 : 24; + u32 last_chpid : 8; + u32 zeroes1; + struct chsc_header response; + u32 zeroes2; + struct channel_path_desc desc; + } *scpd_area; + + scpd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); + if (!scpd_area) + return -ENOMEM; + + scpd_area->request = (struct chsc_header) { + .length = 0x0010, + .code = 0x0002, + }; + + scpd_area->first_chpid = chpid; + scpd_area->last_chpid = chpid; + + ccode = chsc(scpd_area); + if (ccode > 0) { + ret = (ccode == 3) ? -ENODEV : -EBUSY; + goto out; + } + + switch (scpd_area->response.code) { + case 0x0001: /* Success. */ + memcpy(desc, &scpd_area->desc, + sizeof(struct channel_path_desc)); + ret = 0; + break; + case 0x0003: /* Invalid block. */ + case 0x0007: /* Invalid format. */ + case 0x0008: /* Other invalid block. */ + CIO_CRW_EVENT(2, "Error in chsc request block!\n"); + ret = -EINVAL; + break; + case 0x0004: /* Command not provided in model. */ + CIO_CRW_EVENT(2, "Model does not provide scpd\n"); + ret = -EOPNOTSUPP; + break; + default: + CIO_CRW_EVENT(2, "Unknown CHSC response %d\n", + scpd_area->response.code); + ret = -EIO; + } +out: + free_page((unsigned long)scpd_area); + return ret; +} + /* * Entries for chpids on the system bus. * This replaces /proc/chpids. @@ -921,6 +1004,11 @@ }; snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid); + /* Obtain channel path description and fill it in. */ + ret = chsc_determine_channel_path_description(chpid, &chp->desc); + if (ret) + goto out_free; + /* make it known to the system */ ret = device_register(&chp->dev); if (ret) { @@ -928,7 +1016,7 @@ __func__, chpid); goto out_free; } - ret = device_create_file(&chp->dev, &dev_attr_status); + ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group); if (ret) { device_unregister(&chp->dev); goto out_free; @@ -939,6 +1027,23 @@ kfree(chp); return ret; } + +void * +chsc_get_chp_desc(struct subchannel *sch, int chp_no) +{ + struct channel_path *chp; + struct channel_path_desc *desc; + + chp = chps[sch->schib.pmcw.chpid[chp_no]]; + if (!chp) + return NULL; + desc = kmalloc(sizeof(struct channel_path_desc), GFP_KERNEL); + if (!desc) + return NULL; + memcpy(desc, &chp->desc, sizeof(struct channel_path_desc)); + return desc; +} + static int __init chsc_alloc_sei_area(void) diff -Nru a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h --- a/drivers/s390/cio/chsc.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/s390/cio/chsc.h 2005-03-30 16:58:50 -08:00 @@ -12,9 +12,21 @@ u16 code; }; +struct channel_path_desc { + u8 flags; + u8 lsn; + u8 desc; + u8 chpid; + u8 swla; + u8 zeroes; + u8 chla; + u8 chpp; +}; + struct channel_path { int id; int state; + struct channel_path_desc desc; struct device dev; }; @@ -49,4 +61,6 @@ extern int chsc_determine_css_characteristics(void); extern int css_characteristics_avail; + +extern void *chsc_get_chp_desc(struct subchannel*, int); #endif diff -Nru a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c --- a/drivers/s390/cio/cio.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/s390/cio/cio.c 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/cio.c * S/390 common I/O routines -- low level i/o calls - * $Revision: 1.130 $ + * $Revision: 1.131 $ * * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -608,6 +608,10 @@ irq_enter (); asm volatile ("mc 0,0"); if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) + /** + * Make sure that the i/o interrupt did not "overtake" + * the last HZ timer interrupt. + */ account_ticks(regs); /* * Get interrupt information from lowcore diff -Nru a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c --- a/drivers/s390/cio/device_fsm.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/s390/cio/device_fsm.c 2005-03-30 16:58:48 -08:00 @@ -649,9 +649,11 @@ cdev->private->state = DEV_STATE_NOT_OPER; sch = to_subchannel(cdev->dev.parent); - device_unregister(&sch->dev); - sch->schib.pmcw.intparm = 0; - cio_modify(sch); + if (get_device(&cdev->dev)) { + PREPARE_WORK(&cdev->private->kick_work, + ccw_device_call_sch_unregister, (void *)cdev); + queue_work(ccw_device_work, &cdev->private->kick_work); + } wake_up(&cdev->private->wait_q); } @@ -678,9 +680,11 @@ // FIXME: not-oper indication to device driver ? ccw_device_call_handler(cdev); } - device_unregister(&sch->dev); - sch->schib.pmcw.intparm = 0; - cio_modify(sch); + if (get_device(&cdev->dev)) { + PREPARE_WORK(&cdev->private->kick_work, + ccw_device_call_sch_unregister, (void *)cdev); + queue_work(ccw_device_work, &cdev->private->kick_work); + } wake_up(&cdev->private->wait_q); } diff -Nru a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c --- a/drivers/s390/cio/device_ops.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/s390/cio/device_ops.c 2005-03-30 16:58:51 -08:00 @@ -24,6 +24,7 @@ #include "cio.h" #include "cio_debug.h" #include "css.h" +#include "chsc.h" #include "device.h" #include "qdio.h" @@ -291,14 +292,14 @@ } static inline int -__ccw_device_retry_loop(struct ccw_device *cdev, struct ccw1 *ccw, long magic) +__ccw_device_retry_loop(struct ccw_device *cdev, struct ccw1 *ccw, long magic, __u8 lpm) { int ret; struct subchannel *sch; sch = to_subchannel(cdev->dev.parent); do { - ret = cio_start (sch, ccw, 0); + ret = cio_start (sch, ccw, lpm); if ((ret == -EBUSY) || (ret == -EACCES)) { /* Try again later. */ spin_unlock_irq(&sch->lock); @@ -388,7 +389,7 @@ ret = -EBUSY; else /* 0x00D9C4C3 == ebcdic "RDC" */ - ret = __ccw_device_retry_loop(cdev, rdc_ccw, 0x00D9C4C3); + ret = __ccw_device_retry_loop(cdev, rdc_ccw, 0x00D9C4C3, 0); /* Restore interrupt handler. */ cdev->handler = handler; @@ -401,10 +402,10 @@ } /* - * Read Configuration data + * Read Configuration data using path mask */ int -read_conf_data (struct ccw_device *cdev, void **buffer, int *length) +read_conf_data_lpm (struct ccw_device *cdev, void **buffer, int *length, __u8 lpm) { void (*handler)(struct ccw_device *, unsigned long, struct irb *); struct subchannel *sch; @@ -457,7 +458,7 @@ ret = -EBUSY; else /* 0x00D9C3C4 == ebcdic "RCD" */ - ret = __ccw_device_retry_loop(cdev, rcd_ccw, 0x00D9C3C4); + ret = __ccw_device_retry_loop(cdev, rcd_ccw, 0x00D9C3C4, lpm); /* Restore interrupt handler. */ cdev->handler = handler; @@ -480,6 +481,15 @@ } /* + * Read Configuration data + */ +int +read_conf_data (struct ccw_device *cdev, void **buffer, int *length) +{ + return read_conf_data_lpm (cdev, buffer, length, 0); +} + +/* * Try to break the lock on a boxed device. */ int @@ -550,6 +560,15 @@ return ret; } +void * +ccw_device_get_chp_desc(struct ccw_device *cdev, int chp_no) +{ + struct subchannel *sch; + + sch = to_subchannel(cdev->dev.parent); + return chsc_get_chp_desc(sch, chp_no); +} + // FIXME: these have to go: int @@ -580,3 +599,5 @@ EXPORT_SYMBOL(read_dev_chars); EXPORT_SYMBOL(_ccw_device_get_subchannel_number); EXPORT_SYMBOL(_ccw_device_get_device_number); +EXPORT_SYMBOL_GPL(ccw_device_get_chp_desc); +EXPORT_SYMBOL_GPL(read_conf_data_lpm); diff -Nru a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig --- a/drivers/s390/net/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/s390/net/Kconfig 2005-03-30 16:58:50 -08:00 @@ -50,6 +50,15 @@ Select this option if you want to be able to receive SMSG messages from other VM guest systems. +config CLAW + tristate "CLAW device support" + depends on NETDEVICES + help + This driver supports channel attached CLAW devices. + CLAW is Common Link Access for Workstation. Common devices + that use CLAW are RS/6000s, Cisco Routers (CIP) and 3172 devices. + To compile as a module choose M here: The module will be called + claw.ko to compile into the kernel choose Y config QETH tristate "Gigabit Ethernet device support" diff -Nru a/drivers/s390/net/Makefile b/drivers/s390/net/Makefile --- a/drivers/s390/net/Makefile 2005-03-30 16:58:51 -08:00 +++ b/drivers/s390/net/Makefile 2005-03-30 16:58:51 -08:00 @@ -9,6 +9,6 @@ obj-$(CONFIG_SMSGIUCV) += smsgiucv.o obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o obj-$(CONFIG_LCS) += lcs.o cu3088.o -qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o +qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o qeth_eddp.o qeth_tso.o qeth-$(CONFIG_PROC_FS) += qeth_proc.o obj-$(CONFIG_QETH) += qeth.o diff -Nru a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/s390/net/claw.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,4447 @@ +/* + * drivers/s390/net/claw.c + * ESCON CLAW network driver + * + * $Revision: 1.35 $ $Date: 2005/03/24 12:25:38 $ + * + * Linux fo zSeries version + * Copyright (C) 2002,2005 IBM Corporation + * Author(s) Original code written by: + * Kazuo Iimura (iimura@jp.ibm.com) + * Rewritten by + * Andy Richter (richtera@us.ibm.com) + * Marc Price (mwprice@us.ibm.com) + * + * sysfs parms: + * group x.x.rrrr,x.x.wwww + * read_buffer nnnnnnn + * write_buffer nnnnnn + * host_name aaaaaaaa + * adapter_name aaaaaaaa + * api_type aaaaaaaa + * + * eg. + * group 0.0.0200 0.0.0201 + * read_buffer 25 + * write_buffer 20 + * host_name LINUX390 + * adapter_name RS6K + * api_type TCPIP + * + * where + * + * The device id is decided by the order entries + * are added to the group the first is claw0 the second claw1 + * up to CLAW_MAX_DEV + * + * rrrr - the first of 2 consecutive device addresses used for the + * CLAW protocol. + * The specified address is always used as the input (Read) + * channel and the next address is used as the output channel. + * + * wwww - the second of 2 consecutive device addresses used for + * the CLAW protocol. + * The specified address is always used as the output + * channel and the previous address is used as the input channel. + * + * read_buffer - specifies number of input buffers to allocate. + * write_buffer - specifies number of output buffers to allocate. + * host_name - host name + * adaptor_name - adaptor name + * api_type - API type TCPIP or API will be sent and expected + * as ws_name + * + * Note the following requirements: + * 1) host_name must match the configured adapter_name on the remote side + * 2) adaptor_name must match the configured host name on the remote side + * + * Change History + * 1.00 Initial release shipped + * 1.10 Changes for Buffer allocation + * 1.15 Changed for 2.6 Kernel No longer compiles on 2.4 or lower + * 1.25 Added Packing support + */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cu3088.h" +#include "claw.h" + +MODULE_AUTHOR("Andy Richter "); +MODULE_DESCRIPTION("Linux for zSeries CLAW Driver\n" \ + "Copyright 2000,2005 IBM Corporation\n"); +MODULE_LICENSE("GPL"); + +/* Debugging is based on DEBUGMSG, IOTRACE, or FUNCTRACE options: + DEBUGMSG - Enables output of various debug messages in the code + IOTRACE - Enables output of CCW and other IO related traces + FUNCTRACE - Enables output of function entry/exit trace + Define any combination of above options to enable tracing + + CLAW also uses the s390dbf file system see claw_trace and claw_setup +*/ + +/* following enables tracing */ +//#define DEBUGMSG +//#define IOTRACE +//#define FUNCTRACE + +#ifdef DEBUGMSG +#define DEBUG +#endif + +#ifdef IOTRACE +#define DEBUG +#endif + +#ifdef FUNCTRACE +#define DEBUG +#endif + + char debug_buffer[255]; +/** + * Debug Facility Stuff + */ +static debug_info_t *claw_dbf_setup; +static debug_info_t *claw_dbf_trace; + +/** + * CLAW Debug Facility functions + */ +static void +claw_unregister_debug_facility(void) +{ + if (claw_dbf_setup) + debug_unregister(claw_dbf_setup); + if (claw_dbf_trace) + debug_unregister(claw_dbf_trace); +} + +static int +claw_register_debug_facility(void) +{ + claw_dbf_setup = debug_register("claw_setup", 1, 1, 8); + claw_dbf_trace = debug_register("claw_trace", 1, 2, 8); + if (claw_dbf_setup == NULL || claw_dbf_trace == NULL) { + printk(KERN_WARNING "Not enough memory for debug facility.\n"); + claw_unregister_debug_facility(); + return -ENOMEM; + } + debug_register_view(claw_dbf_setup, &debug_hex_ascii_view); + debug_set_level(claw_dbf_setup, 2); + debug_register_view(claw_dbf_trace, &debug_hex_ascii_view); + debug_set_level(claw_dbf_trace, 2); + return 0; +} + +static inline void +claw_set_busy(struct net_device *dev) +{ + ((struct claw_privbk *) dev->priv)->tbusy=1; + eieio(); +} + +static inline void +claw_clear_busy(struct net_device *dev) +{ + clear_bit(0, &(((struct claw_privbk *) dev->priv)->tbusy)); + netif_wake_queue(dev); + eieio(); +} + +static inline int +claw_check_busy(struct net_device *dev) +{ + eieio(); + return ((struct claw_privbk *) dev->priv)->tbusy; +} + +static inline void +claw_setbit_busy(int nr,struct net_device *dev) +{ + netif_stop_queue(dev); + set_bit(nr, (void *)&(((struct claw_privbk *)dev->priv)->tbusy)); +} + +static inline void +claw_clearbit_busy(int nr,struct net_device *dev) +{ + clear_bit(nr,(void *)&(((struct claw_privbk *)dev->priv)->tbusy)); + netif_wake_queue(dev); +} + +static inline int +claw_test_and_setbit_busy(int nr,struct net_device *dev) +{ + netif_stop_queue(dev); + return test_and_set_bit(nr, + (void *)&(((struct claw_privbk *) dev->priv)->tbusy)); +} + + +/* Functions for the DEV methods */ + +static int claw_probe(struct ccwgroup_device *cgdev); +static void claw_remove_device(struct ccwgroup_device *cgdev); +static void claw_purge_skb_queue(struct sk_buff_head *q); +static int claw_new_device(struct ccwgroup_device *cgdev); +static int claw_shutdown_device(struct ccwgroup_device *cgdev); +static int claw_tx(struct sk_buff *skb, struct net_device *dev); +static int claw_change_mtu( struct net_device *dev, int new_mtu); +static int claw_open(struct net_device *dev); +static void claw_irq_handler(struct ccw_device *cdev, + unsigned long intparm, struct irb *irb); +static void claw_irq_tasklet ( unsigned long data ); +static int claw_release(struct net_device *dev); +static void claw_write_retry ( struct chbk * p_ch ); +static void claw_write_next ( struct chbk * p_ch ); +static void claw_timer ( struct chbk * p_ch ); + +/* Functions */ +static int add_claw_reads(struct net_device *dev, + struct ccwbk* p_first, struct ccwbk* p_last); +static void inline ccw_check_return_code (struct ccw_device *cdev, + int return_code); +static void inline ccw_check_unit_check (struct chbk * p_ch, + unsigned char sense ); +static int find_link(struct net_device *dev, char *host_name, char *ws_name ); +static int claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid); +static int init_ccw_bk(struct net_device *dev); +static void probe_error( struct ccwgroup_device *cgdev); +static struct net_device_stats *claw_stats(struct net_device *dev); +static int inline pages_to_order_of_mag(int num_of_pages); +static struct sk_buff *claw_pack_skb(struct claw_privbk *privptr); +#ifdef DEBUG +static void dumpit (char *buf, int len); +#endif +/* sysfs Functions */ +static ssize_t claw_hname_show(struct device *dev, char *buf); +static ssize_t claw_hname_write(struct device *dev, + const char *buf, size_t count); +static ssize_t claw_adname_show(struct device *dev, char *buf); +static ssize_t claw_adname_write(struct device *dev, + const char *buf, size_t count); +static ssize_t claw_apname_show(struct device *dev, char *buf); +static ssize_t claw_apname_write(struct device *dev, + const char *buf, size_t count); +static ssize_t claw_wbuff_show(struct device *dev, char *buf); +static ssize_t claw_wbuff_write(struct device *dev, + const char *buf, size_t count); +static ssize_t claw_rbuff_show(struct device *dev, char *buf); +static ssize_t claw_rbuff_write(struct device *dev, + const char *buf, size_t count); +static int claw_add_files(struct device *dev); +static void claw_remove_files(struct device *dev); + +/* Functions for System Validate */ +static int claw_process_control( struct net_device *dev, struct ccwbk * p_ccw); +static int claw_send_control(struct net_device *dev, __u8 type, __u8 link, + __u8 correlator, __u8 rc , char *local_name, char *remote_name); +static int claw_snd_conn_req(struct net_device *dev, __u8 link); +static int claw_snd_disc(struct net_device *dev, struct clawctl * p_ctl); +static int claw_snd_sys_validate_rsp(struct net_device *dev, + struct clawctl * p_ctl, __u32 return_code); +static int claw_strt_conn_req(struct net_device *dev ); +static void claw_strt_read ( struct net_device *dev, int lock ); +static void claw_strt_out_IO( struct net_device *dev ); +static void claw_free_wrt_buf( struct net_device *dev ); + +/* Functions for unpack reads */ +static void unpack_read (struct net_device *dev ); + +/* ccwgroup table */ + +static struct ccwgroup_driver claw_group_driver = { + .owner = THIS_MODULE, + .name = "claw", + .max_slaves = 2, + .driver_id = 0xC3D3C1E6, + .probe = claw_probe, + .remove = claw_remove_device, + .set_online = claw_new_device, + .set_offline = claw_shutdown_device, +}; + +/* +* +* Key functions +*/ + +/*----------------------------------------------------------------* + * claw_probe * + * this function is called for each CLAW device. * + *----------------------------------------------------------------*/ +static int +claw_probe(struct ccwgroup_device *cgdev) +{ + int rc; + struct claw_privbk *privptr=NULL; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s Enter\n",__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"probe"); + if (!get_device(&cgdev->dev)) + return -ENODEV; +#ifdef DEBUGMSG + printk(KERN_INFO "claw: variable cgdev =\n"); + dumpit((char *)cgdev, sizeof(struct ccwgroup_device)); +#endif + privptr = kmalloc(sizeof(struct claw_privbk), GFP_KERNEL); + if (privptr == NULL) { + probe_error(cgdev); + put_device(&cgdev->dev); + printk(KERN_WARNING "Out of memory %s %s Exit Line %d \n", + cgdev->cdev[0]->dev.bus_id,__FUNCTION__,__LINE__); + CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM); + return -ENOMEM; + } + memset(privptr,0x00,sizeof(struct claw_privbk)); + privptr->p_mtc_envelope= kmalloc( MAX_ENVELOPE_SIZE, GFP_KERNEL); + privptr->p_env = kmalloc(sizeof(struct claw_env), GFP_KERNEL); + if ((privptr->p_mtc_envelope==NULL) || (privptr->p_env==NULL)) { + probe_error(cgdev); + put_device(&cgdev->dev); + printk(KERN_WARNING "Out of memory %s %s Exit Line %d \n", + cgdev->cdev[0]->dev.bus_id,__FUNCTION__,__LINE__); + CLAW_DBF_TEXT_(2,setup,"probex%d",-ENOMEM); + return -ENOMEM; + } + memset(privptr->p_mtc_envelope, 0x00, MAX_ENVELOPE_SIZE); + memset(privptr->p_env, 0x00, sizeof(struct claw_env)); + memcpy(privptr->p_env->adapter_name,WS_NAME_NOT_DEF,8); + memcpy(privptr->p_env->host_name,WS_NAME_NOT_DEF,8); + memcpy(privptr->p_env->api_type,WS_NAME_NOT_DEF,8); + privptr->p_env->packing = 0; + privptr->p_env->write_buffers = 5; + privptr->p_env->read_buffers = 5; + privptr->p_env->read_size = CLAW_FRAME_SIZE; + privptr->p_env->write_size = CLAW_FRAME_SIZE; + rc = claw_add_files(&cgdev->dev); + if (rc) { + probe_error(cgdev); + put_device(&cgdev->dev); + printk(KERN_WARNING "add_files failed %s %s Exit Line %d \n", + cgdev->cdev[0]->dev.bus_id,__FUNCTION__,__LINE__); + CLAW_DBF_TEXT_(2,setup,"probex%d",rc); + return rc; + } + printk(KERN_INFO "claw: sysfs files added for %s\n",cgdev->cdev[0]->dev.bus_id); + privptr->p_env->p_priv = privptr; + cgdev->cdev[0]->handler = claw_irq_handler; + cgdev->cdev[1]->handler = claw_irq_handler; + cgdev->dev.driver_data = privptr; +#ifdef FUNCTRACE + printk(KERN_INFO "claw:%s exit on line %d, " + "rc = 0\n",__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(2,setup,"prbext 0"); + + return 0; +} /* end of claw_probe */ + +/*-------------------------------------------------------------------* + * claw_tx * + *-------------------------------------------------------------------*/ + +static int +claw_tx(struct sk_buff *skb, struct net_device *dev) +{ + int rc; + struct claw_privbk *privptr=dev->priv; + unsigned long saveflags; + struct chbk *p_ch; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"claw_tx"); + p_ch=&privptr->channel[WRITE]; + if (skb == NULL) { + printk(KERN_WARNING "%s: null pointer passed as sk_buffer\n", + dev->name); + privptr->stats.tx_dropped++; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() exit on line %d, rc = EIO\n", + dev->name,__FUNCTION__, __LINE__); +#endif + CLAW_DBF_TEXT_(2,trace,"clawtx%d",-EIO); + return -EIO; + } + +#ifdef IOTRACE + printk(KERN_INFO "%s: variable sk_buff=\n",dev->name); + dumpit((char *) skb, sizeof(struct sk_buff)); + printk(KERN_INFO "%s: variable dev=\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); +#endif + spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); + rc=claw_hw_tx( skb, dev, 1 ); + spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s exit on line %d, rc = %d\n", + dev->name, __FUNCTION__, __LINE__, rc); +#endif + CLAW_DBF_TEXT_(4,trace,"clawtx%d",rc); + return rc; +} /* end of claw_tx */ + +/*------------------------------------------------------------------* + * pack the collect queue into an skb and return it * + * If not packing just return the top skb from the queue * + *------------------------------------------------------------------*/ + +static struct sk_buff * +claw_pack_skb(struct claw_privbk *privptr) +{ + struct sk_buff *new_skb,*held_skb; + struct chbk *p_ch = &privptr->channel[WRITE]; + struct claw_env *p_env = privptr->p_env; + int pkt_cnt,pk_ind,so_far; + + new_skb = NULL; /* assume no dice */ + pkt_cnt = 0; + CLAW_DBF_TEXT(4,trace,"PackSKBe"); + if (skb_queue_len(&p_ch->collect_queue) > 0) { + /* some data */ + held_skb = skb_dequeue(&p_ch->collect_queue); + if (p_env->packing != DO_PACKED) + return held_skb; + if (held_skb) + atomic_dec(&held_skb->users); + else + return NULL; + /* get a new SKB we will pack at least one */ + new_skb = dev_alloc_skb(p_env->write_size); + if (new_skb == NULL) { + atomic_inc(&held_skb->users); + skb_queue_head(&p_ch->collect_queue,held_skb); + return NULL; + } + /* we have packed packet and a place to put it */ + pk_ind = 1; + so_far = 0; + new_skb->cb[1] = 'P'; /* every skb on queue has pack header */ + while ((pk_ind) && (held_skb != NULL)) { + if (held_skb->len+so_far <= p_env->write_size-8) { + memcpy(skb_put(new_skb,held_skb->len), + held_skb->data,held_skb->len); + privptr->stats.tx_packets++; + so_far += held_skb->len; + pkt_cnt++; + dev_kfree_skb_irq(held_skb); + held_skb = skb_dequeue(&p_ch->collect_queue); + if (held_skb) + atomic_dec(&held_skb->users); + } else { + pk_ind = 0; + atomic_inc(&held_skb->users); + skb_queue_head(&p_ch->collect_queue,held_skb); + } + } +#ifdef IOTRACE + printk(KERN_INFO "%s: %s() Packed %d len %d\n", + p_env->ndev->name, + __FUNCTION__,pkt_cnt,new_skb->len); +#endif + } + CLAW_DBF_TEXT(4,trace,"PackSKBx"); + return new_skb; +} + +/*-------------------------------------------------------------------* + * claw_change_mtu * + * * + *-------------------------------------------------------------------*/ + +static int +claw_change_mtu(struct net_device *dev, int new_mtu) +{ + struct claw_privbk *privptr=dev->priv; + int buff_size; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); +#endif +#ifdef DEBUGMSG + printk(KERN_INFO "variable dev =\n"); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "variable new_mtu = %d\n", new_mtu); +#endif + CLAW_DBF_TEXT(4,trace,"setmtu"); + buff_size = privptr->p_env->write_size; + if ((new_mtu < 60) || (new_mtu > buff_size)) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc=EINVAL\n", + dev->name, + __FUNCTION__, __LINE__); +#endif + return -EINVAL; + } + dev->mtu = new_mtu; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n",dev->name, + __FUNCTION__, __LINE__); +#endif + return 0; +} /* end of claw_change_mtu */ + + +/*-------------------------------------------------------------------* + * claw_open * + * * + *-------------------------------------------------------------------*/ +static int +claw_open(struct net_device *dev) +{ + + int rc; + int i; + unsigned long saveflags=0; + unsigned long parm; + struct claw_privbk *privptr; + DECLARE_WAITQUEUE(wait, current); + struct timer_list timer; + struct ccwbk *p_buf; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"open"); + if (!dev | (dev->name[0] == 0x00)) { + CLAW_DBF_TEXT(2,trace,"BadDev"); + printk(KERN_WARNING "claw: Bad device at open failing \n"); + return -ENODEV; + } + privptr = (struct claw_privbk *)dev->priv; + /* allocate and initialize CCW blocks */ + if (privptr->buffs_alloc == 0) { + rc=init_ccw_bk(dev); + if (rc) { + printk(KERN_INFO "%s:%s Exit on line %d, rc=ENOMEM\n", + dev->name, + __FUNCTION__, __LINE__); + CLAW_DBF_TEXT(2,trace,"openmem"); + return -ENOMEM; + } + } + privptr->system_validate_comp=0; + privptr->release_pend=0; + if(strncmp(privptr->p_env->api_type,WS_APPL_NAME_PACKED,6) == 0) { + privptr->p_env->read_size=DEF_PACK_BUFSIZE; + privptr->p_env->write_size=DEF_PACK_BUFSIZE; + privptr->p_env->packing=PACKING_ASK; + } else { + privptr->p_env->packing=0; + privptr->p_env->read_size=CLAW_FRAME_SIZE; + privptr->p_env->write_size=CLAW_FRAME_SIZE; + } + claw_set_busy(dev); + tasklet_init(&privptr->channel[READ].tasklet, claw_irq_tasklet, + (unsigned long) &privptr->channel[READ]); + for ( i = 0; i < 2; i++) { + CLAW_DBF_TEXT_(2,trace,"opn_ch%d",i); + init_waitqueue_head(&privptr->channel[i].wait); + /* skb_queue_head_init(&p_ch->io_queue); */ + if (i == WRITE) + skb_queue_head_init( + &privptr->channel[WRITE].collect_queue); + privptr->channel[i].flag_a = 0; + privptr->channel[i].IO_active = 0; + privptr->channel[i].flag &= ~CLAW_TIMER; + init_timer(&timer); + timer.function = (void *)claw_timer; + timer.data = (unsigned long)(&privptr->channel[i]); + timer.expires = jiffies + 15*HZ; + add_timer(&timer); + spin_lock_irqsave(get_ccwdev_lock( + privptr->channel[i].cdev), saveflags); + parm = (unsigned long) &privptr->channel[i]; + privptr->channel[i].claw_state = CLAW_START_HALT_IO; + rc = 0; + add_wait_queue(&privptr->channel[i].wait, &wait); + rc = ccw_device_halt( + (struct ccw_device *)privptr->channel[i].cdev,parm); + set_current_state(TASK_INTERRUPTIBLE); + spin_unlock_irqrestore( + get_ccwdev_lock(privptr->channel[i].cdev), saveflags); + schedule(); + set_current_state(TASK_RUNNING); + remove_wait_queue(&privptr->channel[i].wait, &wait); + if(rc != 0) + ccw_check_return_code(privptr->channel[i].cdev, rc); + if((privptr->channel[i].flag & CLAW_TIMER) == 0x00) + del_timer(&timer); + } + if ((((privptr->channel[READ].last_dstat | + privptr->channel[WRITE].last_dstat) & + ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) || + (((privptr->channel[READ].flag | + privptr->channel[WRITE].flag) & CLAW_TIMER) != 0x00)) { +#ifdef DEBUGMSG + printk(KERN_INFO "%s: channel problems during open - read:" + " %02x - write: %02x\n", + dev->name, + privptr->channel[READ].last_dstat, + privptr->channel[WRITE].last_dstat); +#endif + printk(KERN_INFO "%s: remote side is not ready\n", dev->name); + CLAW_DBF_TEXT(2,trace,"notrdy"); + + for ( i = 0; i < 2; i++) { + spin_lock_irqsave( + get_ccwdev_lock(privptr->channel[i].cdev), + saveflags); + parm = (unsigned long) &privptr->channel[i]; + privptr->channel[i].claw_state = CLAW_STOP; + rc = ccw_device_halt( + (struct ccw_device *)&privptr->channel[i].cdev, + parm); + spin_unlock_irqrestore( + get_ccwdev_lock(privptr->channel[i].cdev), + saveflags); + if (rc != 0) { + ccw_check_return_code( + privptr->channel[i].cdev, rc); + } + } + free_pages((unsigned long)privptr->p_buff_ccw, + (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); + if (privptr->p_env->read_size < PAGE_SIZE) { + free_pages((unsigned long)privptr->p_buff_read, + (int)pages_to_order_of_mag( + privptr->p_buff_read_num)); + } + else { + p_buf=privptr->p_read_active_first; + while (p_buf!=NULL) { + free_pages((unsigned long)p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perread )); + p_buf=p_buf->next; + } + } + if (privptr->p_env->write_size < PAGE_SIZE ) { + free_pages((unsigned long)privptr->p_buff_write, + (int)pages_to_order_of_mag( + privptr->p_buff_write_num)); + } + else { + p_buf=privptr->p_write_active_first; + while (p_buf!=NULL) { + free_pages((unsigned long)p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perwrite )); + p_buf=p_buf->next; + } + } + privptr->buffs_alloc = 0; + privptr->channel[READ].flag= 0x00; + privptr->channel[WRITE].flag = 0x00; + privptr->p_buff_ccw=NULL; + privptr->p_buff_read=NULL; + privptr->p_buff_write=NULL; + claw_clear_busy(dev); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc=EIO\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(2,trace,"open EIO"); + return -EIO; + } + + /* Send SystemValidate command */ + + claw_clear_busy(dev); + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc=0\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"openok"); + return 0; +} /* end of claw_open */ + +/*-------------------------------------------------------------------* +* * +* claw_irq_handler * +* * +*--------------------------------------------------------------------*/ +static void +claw_irq_handler(struct ccw_device *cdev, + unsigned long intparm, struct irb *irb) +{ + struct chbk *p_ch = NULL; + struct claw_privbk *privptr = NULL; + struct net_device *dev = NULL; + struct claw_env *p_env; + struct chbk *p_ch_r=NULL; + + +#ifdef FUNCTRACE + printk(KERN_INFO "%s enter \n",__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"clawirq"); + /* Bypass all 'unsolicited interrupts' */ + if (!cdev->dev.driver_data) { + printk(KERN_WARNING "claw: unsolicited interrupt for device:" + "%s received c-%02x d-%02x\n", + cdev->dev.bus_id,irb->scsw.cstat, irb->scsw.dstat); +#ifdef FUNCTRACE + printk(KERN_INFO "claw: %s() " + "exit on line %d\n",__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(2,trace,"badirq"); + return; + } + privptr = (struct claw_privbk *)cdev->dev.driver_data; + + /* Try to extract channel from driver data. */ + if (privptr->channel[READ].cdev == cdev) + p_ch = &privptr->channel[READ]; + else if (privptr->channel[WRITE].cdev == cdev) + p_ch = &privptr->channel[WRITE]; + else { + printk(KERN_WARNING "claw: Can't determine channel for " + "interrupt, device %s\n", cdev->dev.bus_id); + CLAW_DBF_TEXT(2,trace,"badchan"); + return; + } + CLAW_DBF_TEXT_(4,trace,"IRQCH=%d",p_ch->flag); + + dev = (struct net_device *) (p_ch->ndev); + p_env=privptr->p_env; + +#ifdef IOTRACE + printk(KERN_INFO "%s: interrupt for device: %04x " + "received c-%02x d-%02x state-%02x\n", + dev->name, p_ch->devno, irb->scsw.cstat, + irb->scsw.dstat, p_ch->claw_state); +#endif + + /* Copy interruption response block. */ + memcpy(p_ch->irb, irb, sizeof(struct irb)); + + /* Check for good subchannel return code, otherwise error message */ + if (irb->scsw.cstat && !(irb->scsw.cstat & SCHN_STAT_PCI)) { + printk(KERN_INFO "%s: subchannel check for device: %04x -" + " Sch Stat %02x Dev Stat %02x CPA - %04x\n", + dev->name, p_ch->devno, + irb->scsw.cstat, irb->scsw.dstat,irb->scsw.cpa); +#ifdef IOTRACE + dumpit((char *)irb,sizeof(struct irb)); + dumpit((char *)(unsigned long)irb->scsw.cpa, + sizeof(struct ccw1)); +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(2,trace,"chanchk"); + /* return; */ + } + + /* Check the reason-code of a unit check */ + if (irb->scsw.dstat & DEV_STAT_UNIT_CHECK) { + ccw_check_unit_check(p_ch, irb->ecw[0]); + } + + /* State machine to bring the connection up, down and to restart */ + p_ch->last_dstat = irb->scsw.dstat; + + switch (p_ch->claw_state) { + case CLAW_STOP:/* HALT_IO by claw_release (halt sequence) */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: CLAW_STOP enter\n", dev->name); +#endif + if (!((p_ch->irb->scsw.stctl & SCSW_STCTL_SEC_STATUS) || + (p_ch->irb->scsw.stctl == SCSW_STCTL_STATUS_PEND) || + (p_ch->irb->scsw.stctl == + (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return; + } + wake_up(&p_ch->wait); /* wake up claw_release */ + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: CLAW_STOP exit\n", dev->name); +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"stop"); + return; + + case CLAW_START_HALT_IO: /* HALT_IO issued by claw_open */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: process CLAW_STAT_HALT_IO\n", + dev->name); +#endif + if (!((p_ch->irb->scsw.stctl & SCSW_STCTL_SEC_STATUS) || + (p_ch->irb->scsw.stctl == SCSW_STCTL_STATUS_PEND) || + (p_ch->irb->scsw.stctl == + (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"haltio"); + return; + } + if (p_ch->flag == CLAW_READ) { + p_ch->claw_state = CLAW_START_READ; + wake_up(&p_ch->wait); /* wake claw_open (READ)*/ + } + else + if (p_ch->flag == CLAW_WRITE) { + p_ch->claw_state = CLAW_START_WRITE; + /* send SYSTEM_VALIDATE */ + claw_strt_read(dev, LOCK_NO); + claw_send_control(dev, + SYSTEM_VALIDATE_REQUEST, + 0, 0, 0, + p_env->host_name, + p_env->adapter_name ); + } else { + printk(KERN_WARNING "claw: unsolicited " + "interrupt for device:" + "%s received c-%02x d-%02x\n", + cdev->dev.bus_id, + irb->scsw.cstat, + irb->scsw.dstat); + return; + } +#ifdef DEBUGMSG + printk(KERN_INFO "%s: process CLAW_STAT_HALT_IO exit\n", + dev->name); +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"haltio"); + return; + case CLAW_START_READ: + CLAW_DBF_TEXT(4,trace,"ReadIRQ"); + if (p_ch->irb->scsw.dstat & DEV_STAT_UNIT_CHECK) { + clear_bit(0, (void *)&p_ch->IO_active); + if ((p_ch->irb->ecw[0] & 0x41) == 0x41 || + (p_ch->irb->ecw[0] & 0x40) == 0x40 || + (p_ch->irb->ecw[0]) == 0) + { + privptr->stats.rx_errors++; + printk(KERN_INFO "%s: Restart is " + "required after remote " + "side recovers \n", + dev->name); + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"notrdy"); + return; + } + if ((p_ch->irb->scsw.cstat & SCHN_STAT_PCI) && + (p_ch->irb->scsw.dstat==0)) { + if (test_and_set_bit(CLAW_BH_ACTIVE, + (void *)&p_ch->flag_a) == 0) { + tasklet_schedule(&p_ch->tasklet); + } + else { + CLAW_DBF_TEXT(4,trace,"PCINoBH"); + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"PCI_read"); + return; + } + if(!((p_ch->irb->scsw.stctl & SCSW_STCTL_SEC_STATUS) || + (p_ch->irb->scsw.stctl == SCSW_STCTL_STATUS_PEND) || + (p_ch->irb->scsw.stctl == + (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"SPend_rd"); + return; + } + clear_bit(0, (void *)&p_ch->IO_active); + claw_clearbit_busy(TB_RETRY,dev); + if (test_and_set_bit(CLAW_BH_ACTIVE, + (void *)&p_ch->flag_a) == 0) { + tasklet_schedule(&p_ch->tasklet); + } + else { + CLAW_DBF_TEXT(4,trace,"RdBHAct"); + } + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: process CLAW_START_READ exit\n", + dev->name); +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"RdIRQXit"); + return; + case CLAW_START_WRITE: + if (p_ch->irb->scsw.dstat & DEV_STAT_UNIT_CHECK) { + printk(KERN_INFO "%s: Unit Check Occured in " + "write channel\n",dev->name); + clear_bit(0, (void *)&p_ch->IO_active); + if (p_ch->irb->ecw[0] & 0x80 ) { + printk(KERN_INFO "%s: Resetting Event " + "occurred:\n",dev->name); + init_timer(&p_ch->timer); + p_ch->timer.function = + (void *)claw_write_retry; + p_ch->timer.data = (unsigned long)p_ch; + p_ch->timer.expires = jiffies + 10*HZ; + add_timer(&p_ch->timer); + printk(KERN_INFO "%s: write connection " + "restarting\n",dev->name); + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"rstrtwrt"); + return; + } + if (p_ch->irb->scsw.dstat & DEV_STAT_UNIT_EXCEP) { + clear_bit(0, (void *)&p_ch->IO_active); + printk(KERN_INFO "%s: Unit Exception " + "Occured in write channel\n", + dev->name); + } + if(!((p_ch->irb->scsw.stctl & SCSW_STCTL_SEC_STATUS) || + (p_ch->irb->scsw.stctl == SCSW_STCTL_STATUS_PEND) || + (p_ch->irb->scsw.stctl == + (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND)))) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"writeUE"); + return; + } + clear_bit(0, (void *)&p_ch->IO_active); + if (claw_test_and_setbit_busy(TB_TX,dev)==0) { + claw_write_next(p_ch); + claw_clearbit_busy(TB_TX,dev); + claw_clear_busy(dev); + } + p_ch_r=(struct chbk *)&privptr->channel[READ]; + if (test_and_set_bit(CLAW_BH_ACTIVE, + (void *)&p_ch_r->flag_a) == 0) { + tasklet_schedule(&p_ch_r->tasklet); + } + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: process CLAW_START_WRITE exit\n", + dev->name); +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"StWtExit"); + return; + default: + printk(KERN_WARNING "%s: wrong selection code - irq " + "state=%d\n",dev->name,p_ch->claw_state); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(2,trace,"badIRQ"); + return; + } + +} /* end of claw_irq_handler */ + + +/*-------------------------------------------------------------------* +* claw_irq_tasklet * +* * +*--------------------------------------------------------------------*/ +static void +claw_irq_tasklet ( unsigned long data ) +{ + struct chbk * p_ch; + struct net_device *dev; + struct claw_privbk * privptr; + + p_ch = (struct chbk *) data; + dev = (struct net_device *)p_ch->ndev; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); +#endif +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable p_ch =\n",dev->name); + dumpit((char *) p_ch, sizeof(struct chbk)); +#endif + CLAW_DBF_TEXT(4,trace,"IRQtask"); + + privptr = (struct claw_privbk *) dev->priv; + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: bh routine - state-%02x\n" , + dev->name, p_ch->claw_state); +#endif + + unpack_read(dev); + clear_bit(CLAW_BH_ACTIVE, (void *)&p_ch->flag_a); + CLAW_DBF_TEXT(4,trace,"TskletXt"); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return; +} /* end of claw_irq_bh */ + +/*-------------------------------------------------------------------* +* claw_release * +* * +*--------------------------------------------------------------------*/ +static int +claw_release(struct net_device *dev) +{ + int rc; + int i; + unsigned long saveflags; + unsigned long parm; + struct claw_privbk *privptr; + DECLARE_WAITQUEUE(wait, current); + struct ccwbk* p_this_ccw; + struct ccwbk* p_buf; + + if (!dev) + return 0; + privptr = (struct claw_privbk *) dev->priv; + if (!privptr) + return 0; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"release"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "Priv Buffalloc %d\n",privptr->buffs_alloc); + printk(KERN_INFO "Priv p_buff_ccw = %p\n",&privptr->p_buff_ccw); +#endif + privptr->release_pend=1; + claw_setbit_busy(TB_STOP,dev); + for ( i = 1; i >=0 ; i--) { + spin_lock_irqsave( + get_ccwdev_lock(privptr->channel[i].cdev), saveflags); + /* del_timer(&privptr->channel[READ].timer); */ + privptr->channel[i].claw_state = CLAW_STOP; + privptr->channel[i].IO_active = 0; + parm = (unsigned long) &privptr->channel[i]; + if (i == WRITE) + claw_purge_skb_queue( + &privptr->channel[WRITE].collect_queue); + rc = ccw_device_halt (privptr->channel[i].cdev, parm); + if (privptr->system_validate_comp==0x00) /* never opened? */ + init_waitqueue_head(&privptr->channel[i].wait); + add_wait_queue(&privptr->channel[i].wait, &wait); + set_current_state(TASK_INTERRUPTIBLE); + spin_unlock_irqrestore( + get_ccwdev_lock(privptr->channel[i].cdev), saveflags); + schedule(); + set_current_state(TASK_RUNNING); + remove_wait_queue(&privptr->channel[i].wait, &wait); + if (rc != 0) { + ccw_check_return_code(privptr->channel[i].cdev, rc); + } + } + if (privptr->pk_skb != NULL) { + dev_kfree_skb(privptr->pk_skb); + privptr->pk_skb = NULL; + } + if(privptr->buffs_alloc != 1) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"none2fre"); + return 0; + } + CLAW_DBF_TEXT(4,trace,"freebufs"); + if (privptr->p_buff_ccw != NULL) { + free_pages((unsigned long)privptr->p_buff_ccw, + (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); + } + CLAW_DBF_TEXT(4,trace,"freeread"); + if (privptr->p_env->read_size < PAGE_SIZE) { + if (privptr->p_buff_read != NULL) { + free_pages((unsigned long)privptr->p_buff_read, + (int)pages_to_order_of_mag(privptr->p_buff_read_num)); + } + } + else { + p_buf=privptr->p_read_active_first; + while (p_buf!=NULL) { + free_pages((unsigned long)p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perread )); + p_buf=p_buf->next; + } + } + CLAW_DBF_TEXT(4,trace,"freewrit"); + if (privptr->p_env->write_size < PAGE_SIZE ) { + free_pages((unsigned long)privptr->p_buff_write, + (int)pages_to_order_of_mag(privptr->p_buff_write_num)); + } + else { + p_buf=privptr->p_write_active_first; + while (p_buf!=NULL) { + free_pages((unsigned long)p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perwrite )); + p_buf=p_buf->next; + } + } + CLAW_DBF_TEXT(4,trace,"clearptr"); + privptr->buffs_alloc = 0; + privptr->p_buff_ccw=NULL; + privptr->p_buff_read=NULL; + privptr->p_buff_write=NULL; + privptr->system_validate_comp=0; + privptr->release_pend=0; + /* Remove any writes that were pending and reset all reads */ + p_this_ccw=privptr->p_read_active_first; + while (p_this_ccw!=NULL) { + p_this_ccw->header.length=0xffff; + p_this_ccw->header.opcode=0xff; + p_this_ccw->header.flag=0x00; + p_this_ccw=p_this_ccw->next; + } + + while (privptr->p_write_active_first!=NULL) { + p_this_ccw=privptr->p_write_active_first; + p_this_ccw->header.flag=CLAW_PENDING; + privptr->p_write_active_first=p_this_ccw->next; + p_this_ccw->next=privptr->p_write_free_chain; + privptr->p_write_free_chain=p_this_ccw; + ++privptr->write_free_count; + } + privptr->p_write_active_last=NULL; + privptr->mtc_logical_link = -1; + privptr->mtc_skipping = 1; + privptr->mtc_offset=0; + + if (((privptr->channel[READ].last_dstat | + privptr->channel[WRITE].last_dstat) & + ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) { + printk(KERN_WARNING "%s: channel problems during close - " + "read: %02x - write: %02x\n", + dev->name, + privptr->channel[READ].last_dstat, + privptr->channel[WRITE].last_dstat); + CLAW_DBF_TEXT(2,trace,"badclose"); + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"rlsexit"); + return 0; +} /* end of claw_release */ + + + +/*-------------------------------------------------------------------* +* claw_write_retry * +* * +*--------------------------------------------------------------------*/ + +static void +claw_write_retry ( struct chbk *p_ch ) +{ + + struct net_device *dev=p_ch->ndev; + + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); + printk(KERN_INFO "claw: variable p_ch =\n"); + dumpit((char *) p_ch, sizeof(struct chbk)); +#endif + CLAW_DBF_TEXT(4,trace,"w_retry"); + if (p_ch->claw_state == CLAW_STOP) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return; + } +#ifdef DEBUGMSG + printk( KERN_INFO "%s:%s state-%02x\n" , + dev->name, + __FUNCTION__, + p_ch->claw_state); +#endif + claw_strt_out_IO( dev ); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"rtry_xit"); + return; +} /* end of claw_write_retry */ + + +/*-------------------------------------------------------------------* +* claw_write_next * +* * +*--------------------------------------------------------------------*/ + +static void +claw_write_next ( struct chbk * p_ch ) +{ + + struct net_device *dev; + struct claw_privbk *privptr=NULL; + struct sk_buff *pk_skb; + int rc; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",p_ch->ndev->name,__FUNCTION__); + printk(KERN_INFO "%s: variable p_ch =\n",p_ch->ndev->name); + dumpit((char *) p_ch, sizeof(struct chbk)); +#endif + CLAW_DBF_TEXT(4,trace,"claw_wrt"); + if (p_ch->claw_state == CLAW_STOP) + return; + dev = (struct net_device *) p_ch->ndev; + privptr = (struct claw_privbk *) dev->priv; + claw_free_wrt_buf( dev ); + if ((privptr->write_free_count > 0) && + (skb_queue_len(&p_ch->collect_queue) > 0)) { + pk_skb = claw_pack_skb(privptr); + while (pk_skb != NULL) { + rc = claw_hw_tx( pk_skb, dev,1); + if (privptr->write_free_count > 0) { + pk_skb = claw_pack_skb(privptr); + } else + pk_skb = NULL; + } + } + if (privptr->p_write_active_first!=NULL) { + claw_strt_out_IO(dev); + } + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return; +} /* end of claw_write_next */ + +/*-------------------------------------------------------------------* +* * +* claw_timer * +*--------------------------------------------------------------------*/ + +static void +claw_timer ( struct chbk * p_ch ) +{ +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Entry\n",p_ch->ndev->name,__FUNCTION__); + printk(KERN_INFO "%s: variable p_ch =\n",p_ch->ndev->name); + dumpit((char *) p_ch, sizeof(struct chbk)); +#endif + CLAW_DBF_TEXT(4,trace,"timer"); + p_ch->flag |= CLAW_TIMER; + wake_up(&p_ch->wait); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + p_ch->ndev->name,__FUNCTION__,__LINE__); +#endif + return; +} /* end of claw_timer */ + + +/* +* +* functions +*/ + + +/*-------------------------------------------------------------------* +* * +* pages_to_order_of_mag * +* * +* takes a number of pages from 1 to 512 and returns the * +* log(num_pages)/log(2) get_free_pages() needs a base 2 order * +* of magnitude get_free_pages() has an upper order of 9 * +*--------------------------------------------------------------------*/ + +static int inline +pages_to_order_of_mag(int num_of_pages) +{ + int order_of_mag=1; /* assume 2 pages */ + int nump=2; +#ifdef FUNCTRACE + printk(KERN_INFO "%s Enter pages = %d \n",__FUNCTION__,num_of_pages); +#endif + CLAW_DBF_TEXT_(5,trace,"pages%d",num_of_pages); + if (num_of_pages == 1) {return 0; } /* magnitude of 0 = 1 page */ + /* 512 pages = 2Meg on 4k page systems */ + if (num_of_pages >= 512) {return 9; } + /* we have two or more pages order is at least 1 */ + for (nump=2 ;nump <= 512;nump*=2) { + if (num_of_pages <= nump) + break; + order_of_mag +=1; + } + if (order_of_mag > 9) { order_of_mag = 9; } /* I know it's paranoid */ +#ifdef FUNCTRACE + printk(KERN_INFO "%s Exit on line %d, order = %d\n", + __FUNCTION__,__LINE__, order_of_mag); +#endif + CLAW_DBF_TEXT_(5,trace,"mag%d",order_of_mag); + return order_of_mag; +} + +/*-------------------------------------------------------------------* +* * +* add_claw_reads * +* * +*--------------------------------------------------------------------*/ +static int +add_claw_reads(struct net_device *dev, struct ccwbk* p_first, + struct ccwbk* p_last) +{ + struct claw_privbk *privptr; + struct ccw1 temp_ccw; + struct endccw * p_end; +#ifdef IOTRACE + struct ccwbk* p_buf; +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); +#endif +#ifdef DEBUGMSG + printk(KERN_INFO "dev\n"); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "p_first\n"); + dumpit((char *) p_first, sizeof(struct ccwbk)); + printk(KERN_INFO "p_last\n"); + dumpit((char *) p_last, sizeof(struct ccwbk)); +#endif + CLAW_DBF_TEXT(4,trace,"addreads"); + privptr = dev->priv; + p_end = privptr->p_end_ccw; + + /* first CCW and last CCW contains a new set of read channel programs + * to apend the running channel programs + */ + if ( p_first==NULL) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"addexit"); + return 0; + } + + /* set up ending CCW sequence for this segment */ + if (p_end->read1) { + p_end->read1=0x00; /* second ending CCW is now active */ + /* reset ending CCWs and setup TIC CCWs */ + p_end->read2_nop2.cmd_code = CCW_CLAW_CMD_READFF; + p_end->read2_nop2.flags = CCW_FLAG_SLI | CCW_FLAG_SKIP; + p_last->r_TIC_1.cda =(__u32)__pa(&p_end->read2_nop1); + p_last->r_TIC_2.cda =(__u32)__pa(&p_end->read2_nop1); + p_end->read2_nop2.cda=0; + p_end->read2_nop2.count=1; + } + else { + p_end->read1=0x01; /* first ending CCW is now active */ + /* reset ending CCWs and setup TIC CCWs */ + p_end->read1_nop2.cmd_code = CCW_CLAW_CMD_READFF; + p_end->read1_nop2.flags = CCW_FLAG_SLI | CCW_FLAG_SKIP; + p_last->r_TIC_1.cda = (__u32)__pa(&p_end->read1_nop1); + p_last->r_TIC_2.cda = (__u32)__pa(&p_end->read1_nop1); + p_end->read1_nop2.cda=0; + p_end->read1_nop2.count=1; + } + + if ( privptr-> p_read_active_first ==NULL ) { +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s p_read_active_frist == NULL \n", + dev->name,__FUNCTION__); + printk(KERN_INFO "%s:%s Read active first/last changed \n", + dev->name,__FUNCTION__); +#endif + privptr-> p_read_active_first= p_first; /* set new first */ + privptr-> p_read_active_last = p_last; /* set new last */ + } + else { + +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s Read in progress \n", + dev->name,__FUNCTION__); +#endif + /* set up TIC ccw */ + temp_ccw.cda= (__u32)__pa(&p_first->read); + temp_ccw.count=0; + temp_ccw.flags=0; + temp_ccw.cmd_code = CCW_CLAW_CMD_TIC; + + + if (p_end->read1) { + + /* first set of CCW's is chained to the new read */ + /* chain, so the second set is chained to the active chain. */ + /* Therefore modify the second set to point to the new */ + /* read chain set up TIC CCWs */ + /* make sure we update the CCW so channel doesn't fetch it */ + /* when it's only half done */ + memcpy( &p_end->read2_nop2, &temp_ccw , + sizeof(struct ccw1)); + privptr->p_read_active_last->r_TIC_1.cda= + (__u32)__pa(&p_first->read); + privptr->p_read_active_last->r_TIC_2.cda= + (__u32)__pa(&p_first->read); + } + else { + /* make sure we update the CCW so channel doesn't */ + /* fetch it when it is only half done */ + memcpy( &p_end->read1_nop2, &temp_ccw , + sizeof(struct ccw1)); + privptr->p_read_active_last->r_TIC_1.cda= + (__u32)__pa(&p_first->read); + privptr->p_read_active_last->r_TIC_2.cda= + (__u32)__pa(&p_first->read); + } + /* chain in new set of blocks */ + privptr->p_read_active_last->next = p_first; + privptr->p_read_active_last=p_last; + } /* end of if ( privptr-> p_read_active_first ==NULL) */ +#ifdef IOTRACE + printk(KERN_INFO "%s:%s dump p_last CCW BK \n",dev->name,__FUNCTION__); + dumpit((char *)p_last, sizeof(struct ccwbk)); + printk(KERN_INFO "%s:%s dump p_end CCW BK \n",dev->name,__FUNCTION__); + dumpit((char *)p_end, sizeof(struct endccw)); + + printk(KERN_INFO "%s:%s dump p_first CCW BK \n",dev->name,__FUNCTION__); + dumpit((char *)p_first, sizeof(struct ccwbk)); + printk(KERN_INFO "%s:%s Dump Active CCW chain \n", + dev->name,__FUNCTION__); + p_buf=privptr->p_read_active_first; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"addexit"); + return 0; +} /* end of add_claw_reads */ + +/*-------------------------------------------------------------------* + * ccw_check_return_code * + * * + *-------------------------------------------------------------------*/ + +static void inline +ccw_check_return_code(struct ccw_device *cdev, int return_code) +{ +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > enter \n", + cdev->dev.bus_id,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"ccwret"); +#ifdef DEBUGMSG + printk(KERN_INFO "variable cdev =\n"); + dumpit((char *) cdev, sizeof(struct ccw_device)); + printk(KERN_INFO "variable return_code = %d\n",return_code); +#endif + if (return_code != 0) { + switch (return_code) { + case -EBUSY: + printk(KERN_INFO "%s: Busy !\n", + cdev->dev.bus_id); + break; + case -ENODEV: + printk(KERN_EMERG "%s: Missing device called " + "for IO ENODEV\n", cdev->dev.bus_id); + break; + case -EIO: + printk(KERN_EMERG "%s: Status pending... EIO \n", + cdev->dev.bus_id); + break; + case -EINVAL: + printk(KERN_EMERG "%s: Invalid Dev State EINVAL \n", + cdev->dev.bus_id); + break; + default: + printk(KERN_EMERG "%s: Unknown error in " + "Do_IO %d\n",cdev->dev.bus_id, return_code); + } + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > exit on line %d\n", + cdev->dev.bus_id,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"ccwret"); +} /* end of ccw_check_return_code */ + +/*-------------------------------------------------------------------* +* ccw_check_unit_check * +*--------------------------------------------------------------------*/ + +static void inline +ccw_check_unit_check(struct chbk * p_ch, unsigned char sense ) +{ + struct net_device *dev = p_ch->ndev; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > enter\n",dev->name,__FUNCTION__); +#endif +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *)dev, sizeof(struct net_device)); + printk(KERN_INFO "%s: variable sense =\n",dev->name); + dumpit((char *)&sense, 2); +#endif + CLAW_DBF_TEXT(4,trace,"unitchek"); + + printk(KERN_INFO "%s: Unit Check with sense byte:0x%04x\n", + dev->name, sense); + + if (sense & 0x40) { + if (sense & 0x01) { + printk(KERN_WARNING "%s: Interface disconnect or " + "Selective reset " + "occurred (remote side)\n", dev->name); + } + else { + printk(KERN_WARNING "%s: System reset occured" + " (remote side)\n", dev->name); + } + } + else if (sense & 0x20) { + if (sense & 0x04) { + printk(KERN_WARNING "%s: Data-streaming " + "timeout)\n", dev->name); + } + else { + printk(KERN_WARNING "%s: Data-transfer parity" + " error\n", dev->name); + } + } + else if (sense & 0x10) { + if (sense & 0x20) { + printk(KERN_WARNING "%s: Hardware malfunction " + "(remote side)\n", dev->name); + } + else { + printk(KERN_WARNING "%s: read-data parity error " + "(remote side)\n", dev->name); + } + } + +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif +} /* end of ccw_check_unit_check */ + + + +/*-------------------------------------------------------------------* +* Dump buffer format * +* * +*--------------------------------------------------------------------*/ +#ifdef DEBUG +static void +dumpit(char* buf, int len) +{ + + __u32 ct, sw, rm, dup; + char *ptr, *rptr; + char tbuf[82], tdup[82]; +#if (CONFIG_ARCH_S390X) + char addr[22]; +#else + char addr[12]; +#endif + char boff[12]; + char bhex[82], duphex[82]; + char basc[40]; + + sw = 0; + rptr =ptr=buf; + rm = 16; + duphex[0] = 0x00; + dup = 0; + for ( ct=0; ct < len; ct++, ptr++, rptr++ ) { + if (sw == 0) { +#if (CONFIG_ARCH_S390X) + sprintf(addr, "%16.16lX",(unsigned long)rptr); +#else + sprintf(addr, "%8.8X",(__u32)rptr); +#endif + sprintf(boff, "%4.4X", (__u32)ct); + bhex[0] = '\0'; + basc[0] = '\0'; + } + if ((sw == 4) || (sw == 12)) { + strcat(bhex, " "); + } + if (sw == 8) { + strcat(bhex, " "); + } +#if (CONFIG_ARCH_S390X) + sprintf(tbuf,"%2.2lX", (unsigned long)*ptr); +#else + sprintf(tbuf,"%2.2X", (__u32)*ptr); +#endif + tbuf[2] = '\0'; + strcat(bhex, tbuf); + if ((0!=isprint(*ptr)) && (*ptr >= 0x20)) { + basc[sw] = *ptr; + } + else { + basc[sw] = '.'; + } + basc[sw+1] = '\0'; + sw++; + rm--; + if (sw==16) { + if ((strcmp(duphex, bhex)) !=0) { + if (dup !=0) { + sprintf(tdup,"Duplicate as above to" + " %s", addr); + printk( KERN_INFO " " + " --- %s ---\n",tdup); + } + printk( KERN_INFO " %s (+%s) : %s [%s]\n", + addr, boff, bhex, basc); + dup = 0; + strcpy(duphex, bhex); + } + else { + dup++; + } + sw = 0; + rm = 16; + } + } /* endfor */ + + if (sw != 0) { + for ( ; rm > 0; rm--, sw++ ) { + if ((sw==4) || (sw==12)) strcat(bhex, " "); + if (sw==8) strcat(bhex, " "); + strcat(bhex, " "); + strcat(basc, " "); + } + if (dup !=0) { + sprintf(tdup,"Duplicate as above to %s", addr); + printk( KERN_INFO " --- %s ---\n", + tdup); + } + printk( KERN_INFO " %s (+%s) : %s [%s]\n", + addr, boff, bhex, basc); + } + else { + if (dup >=1) { + sprintf(tdup,"Duplicate as above to %s", addr); + printk( KERN_INFO " --- %s ---\n", + tdup); + } + if (dup !=0) { + printk( KERN_INFO " %s (+%s) : %s [%s]\n", + addr, boff, bhex, basc); + } + } + return; + +} /* end of dumpit */ +#endif + +/*-------------------------------------------------------------------* +* find_link * +*--------------------------------------------------------------------*/ +static int +find_link(struct net_device *dev, char *host_name, char *ws_name ) +{ + struct claw_privbk *privptr; + struct claw_env *p_env; + int rc=0; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s > enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"findlink"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev = \n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "%s: variable host_name = %s\n",dev->name, host_name); + printk(KERN_INFO "%s: variable ws_name = %s\n",dev->name, ws_name); +#endif + privptr=dev->priv; + p_env=privptr->p_env; + switch (p_env->packing) + { + case PACKING_ASK: + if ((memcmp(WS_APPL_NAME_PACKED, host_name, 8)!=0) || + (memcmp(WS_APPL_NAME_PACKED, ws_name, 8)!=0 )) + rc = EINVAL; + break; + case DO_PACKED: + case PACK_SEND: + if ((memcmp(WS_APPL_NAME_IP_NAME, host_name, 8)!=0) || + (memcmp(WS_APPL_NAME_IP_NAME, ws_name, 8)!=0 )) + rc = EINVAL; + break; + default: + if ((memcmp(HOST_APPL_NAME, host_name, 8)!=0) || + (memcmp(p_env->api_type , ws_name, 8)!=0)) + rc = EINVAL; + break; + } + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return 0; +} /* end of find_link */ + +/*-------------------------------------------------------------------* + * claw_hw_tx * + * * + * * + *-------------------------------------------------------------------*/ + +static int +claw_hw_tx(struct sk_buff *skb, struct net_device *dev, long linkid) +{ + int rc=0; + struct claw_privbk *privptr; + struct ccwbk *p_this_ccw; + struct ccwbk *p_first_ccw; + struct ccwbk *p_last_ccw; + __u32 numBuffers; + signed long len_of_data; + unsigned long bytesInThisBuffer; + unsigned char *pDataAddress; + struct endccw *pEnd; + struct ccw1 tempCCW; + struct chbk *p_ch; + struct claw_env *p_env; + int lock; + struct clawph *pk_head; + struct chbk *ch; +#ifdef IOTRACE + struct ccwbk *p_buf; +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"hw_tx"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev skb =\n",dev->name); + dumpit((char *) skb, sizeof(struct sk_buff)); + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "%s: variable linkid = %ld\n",dev->name,linkid); +#endif + privptr = (struct claw_privbk *) (dev->priv); + p_ch=(struct chbk *)&privptr->channel[WRITE]; + p_env =privptr->p_env; +#ifdef IOTRACE + printk(KERN_INFO "%s: %s() dump sk_buff \n",dev->name,__FUNCTION__); + dumpit((char *)skb ,sizeof(struct sk_buff)); +#endif + claw_free_wrt_buf(dev); /* Clean up free chain if posible */ + /* scan the write queue to free any completed write packets */ + p_first_ccw=NULL; + p_last_ccw=NULL; + if ((p_env->packing >= PACK_SEND) && + (skb->cb[1] != 'P')) { + skb_push(skb,sizeof(struct clawph)); + pk_head=(struct clawph *)skb->data; + pk_head->len=skb->len-sizeof(struct clawph); + if (pk_head->len%4) { + pk_head->len+= 4-(pk_head->len%4); + skb_pad(skb,4-(pk_head->len%4)); + skb_put(skb,4-(pk_head->len%4)); + } + if (p_env->packing == DO_PACKED) + pk_head->link_num = linkid; + else + pk_head->link_num = 0; + pk_head->flag = 0x00; + skb_pad(skb,4); + skb->cb[1] = 'P'; + } + if (linkid == 0) { + if (claw_check_busy(dev)) { + if (privptr->write_free_count!=0) { + claw_clear_busy(dev); + } + else { + claw_strt_out_IO(dev ); + claw_free_wrt_buf( dev ); + if (privptr->write_free_count==0) { +#ifdef IOTRACE + printk(KERN_INFO "%s: " + "(claw_check_busy) no free write " + "buffers\n", dev->name); +#endif + ch = &privptr->channel[WRITE]; + atomic_inc(&skb->users); + skb_queue_tail(&ch->collect_queue, skb); + goto Done; + } + else { + claw_clear_busy(dev); + } + } + } + /* tx lock */ + if (claw_test_and_setbit_busy(TB_TX,dev)) { /* set to busy */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: busy (claw_test_and_setbit_" + "busy)\n", dev->name); +#endif + ch = &privptr->channel[WRITE]; + atomic_inc(&skb->users); + skb_queue_tail(&ch->collect_queue, skb); + claw_strt_out_IO(dev ); + rc=-EBUSY; + goto Done2; + } + } + /* See how many write buffers are required to hold this data */ + numBuffers= ( skb->len + privptr->p_env->write_size - 1) / + ( privptr->p_env->write_size); + + /* If that number of buffers isn't available, give up for now */ + if (privptr->write_free_count < numBuffers || + privptr->p_write_free_chain == NULL ) { + + claw_setbit_busy(TB_NOBUFFER,dev); + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: busy (claw_setbit_busy" + "(TB_NOBUFFER))\n", dev->name); + printk(KERN_INFO " free_count: %d, numBuffers : %d\n", + (int)privptr->write_free_count,(int) numBuffers ); +#endif + ch = &privptr->channel[WRITE]; + atomic_inc(&skb->users); + skb_queue_tail(&ch->collect_queue, skb); + CLAW_DBF_TEXT(2,trace,"clawbusy"); + goto Done2; + } + pDataAddress=skb->data; + len_of_data=skb->len; + + while (len_of_data > 0) { +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() length-of-data is %ld \n", + dev->name ,__FUNCTION__,len_of_data); + dumpit((char *)pDataAddress ,64); +#endif + p_this_ccw=privptr->p_write_free_chain; /* get a block */ + if (p_this_ccw == NULL) { /* lost the race */ + ch = &privptr->channel[WRITE]; + atomic_inc(&skb->users); + skb_queue_tail(&ch->collect_queue, skb); + goto Done2; + } + privptr->p_write_free_chain=p_this_ccw->next; + p_this_ccw->next=NULL; + --privptr->write_free_count; /* -1 */ + bytesInThisBuffer=len_of_data; + memcpy( p_this_ccw->p_buffer,pDataAddress, bytesInThisBuffer); + len_of_data-=bytesInThisBuffer; + pDataAddress+=(unsigned long)bytesInThisBuffer; + /* setup write CCW */ + p_this_ccw->write.cmd_code = (linkid * 8) +1; + if (len_of_data>0) { + p_this_ccw->write.cmd_code+=MORE_to_COME_FLAG; + } + p_this_ccw->write.count=bytesInThisBuffer; + /* now add to end of this chain */ + if (p_first_ccw==NULL) { + p_first_ccw=p_this_ccw; + } + if (p_last_ccw!=NULL) { + p_last_ccw->next=p_this_ccw; + /* set up TIC ccws */ + p_last_ccw->w_TIC_1.cda= + (__u32)__pa(&p_this_ccw->write); + } + p_last_ccw=p_this_ccw; /* save new last block */ +#ifdef IOTRACE + printk(KERN_INFO "%s: %s() > CCW and Buffer %ld bytes long \n", + dev->name,__FUNCTION__,bytesInThisBuffer); + dumpit((char *)p_this_ccw, sizeof(struct ccwbk)); + dumpit((char *)p_this_ccw->p_buffer, 64); +#endif + } + + /* FirstCCW and LastCCW now contain a new set of write channel + * programs to append to the running channel program + */ + + if (p_first_ccw!=NULL) { + /* setup ending ccw sequence for this segment */ + pEnd=privptr->p_end_ccw; + if (pEnd->write1) { + pEnd->write1=0x00; /* second end ccw is now active */ + /* set up Tic CCWs */ + p_last_ccw->w_TIC_1.cda= + (__u32)__pa(&pEnd->write2_nop1); + pEnd->write2_nop2.cmd_code = CCW_CLAW_CMD_READFF; + pEnd->write2_nop2.flags = + CCW_FLAG_SLI | CCW_FLAG_SKIP; + pEnd->write2_nop2.cda=0; + pEnd->write2_nop2.count=1; + } + else { /* end of if (pEnd->write1)*/ + pEnd->write1=0x01; /* first end ccw is now active */ + /* set up Tic CCWs */ + p_last_ccw->w_TIC_1.cda= + (__u32)__pa(&pEnd->write1_nop1); + pEnd->write1_nop2.cmd_code = CCW_CLAW_CMD_READFF; + pEnd->write1_nop2.flags = + CCW_FLAG_SLI | CCW_FLAG_SKIP; + pEnd->write1_nop2.cda=0; + pEnd->write1_nop2.count=1; + } /* end if if (pEnd->write1) */ + + + if (privptr->p_write_active_first==NULL ) { + privptr->p_write_active_first=p_first_ccw; + privptr->p_write_active_last=p_last_ccw; + } + else { + + /* set up Tic CCWs */ + + tempCCW.cda=(__u32)__pa(&p_first_ccw->write); + tempCCW.count=0; + tempCCW.flags=0; + tempCCW.cmd_code=CCW_CLAW_CMD_TIC; + + if (pEnd->write1) { + + /* + * first set of ending CCW's is chained to the new write + * chain, so the second set is chained to the active chain + * Therefore modify the second set to point the new write chain. + * make sure we update the CCW atomically + * so channel does not fetch it when it's only half done + */ + memcpy( &pEnd->write2_nop2, &tempCCW , + sizeof(struct ccw1)); + privptr->p_write_active_last->w_TIC_1.cda= + (__u32)__pa(&p_first_ccw->write); + } + else { + + /*make sure we update the CCW atomically + *so channel does not fetch it when it's only half done + */ + memcpy(&pEnd->write1_nop2, &tempCCW , + sizeof(struct ccw1)); + privptr->p_write_active_last->w_TIC_1.cda= + (__u32)__pa(&p_first_ccw->write); + + } /* end if if (pEnd->write1) */ + + privptr->p_write_active_last->next=p_first_ccw; + privptr->p_write_active_last=p_last_ccw; + } + + } /* endif (p_first_ccw!=NULL) */ + + +#ifdef IOTRACE + printk(KERN_INFO "%s: %s() > Dump Active CCW chain \n", + dev->name,__FUNCTION__); + p_buf=privptr->p_write_active_first; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } + p_buf=(struct ccwbk*)privptr->p_end_ccw; + dumpit((char *)p_buf, sizeof(struct endccw)); +#endif + dev_kfree_skb(skb); + if (linkid==0) { + lock=LOCK_NO; + } + else { + lock=LOCK_YES; + } + claw_strt_out_IO(dev ); + /* if write free count is zero , set NOBUFFER */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() > free_count is %d\n", + dev->name,__FUNCTION__, + (int) privptr->write_free_count ); +#endif + if (privptr->write_free_count==0) { + claw_setbit_busy(TB_NOBUFFER,dev); + } +Done2: + claw_clearbit_busy(TB_TX,dev); +Done: +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > exit on line %d, rc = %d \n", + dev->name,__FUNCTION__,__LINE__, rc); +#endif + return(rc); +} /* end of claw_hw_tx */ + +/*-------------------------------------------------------------------* +* * +* init_ccw_bk * +* * +*--------------------------------------------------------------------*/ + +static int +init_ccw_bk(struct net_device *dev) +{ + + __u32 ccw_blocks_required; + __u32 ccw_blocks_perpage; + __u32 ccw_pages_required; + __u32 claw_reads_perpage=1; + __u32 claw_read_pages; + __u32 claw_writes_perpage=1; + __u32 claw_write_pages; + void *p_buff=NULL; + struct ccwbk*p_free_chain; + struct ccwbk*p_buf; + struct ccwbk*p_last_CCWB; + struct ccwbk*p_first_CCWB; + struct endccw *p_endccw=NULL; + addr_t real_address; + struct claw_privbk *privptr=dev->priv; + struct clawh *pClawH=NULL; + addr_t real_TIC_address; + int i,j; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"init_ccw"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); +#endif + + /* initialize statistics field */ + privptr->active_link_ID=0; + /* initialize ccwbk pointers */ + privptr->p_write_free_chain=NULL; /* pointer to free ccw chain*/ + privptr->p_write_active_first=NULL; /* pointer to the first write ccw*/ + privptr->p_write_active_last=NULL; /* pointer to the last write ccw*/ + privptr->p_read_active_first=NULL; /* pointer to the first read ccw*/ + privptr->p_read_active_last=NULL; /* pointer to the last read ccw */ + privptr->p_end_ccw=NULL; /* pointer to ending ccw */ + privptr->p_claw_signal_blk=NULL; /* pointer to signal block */ + privptr->buffs_alloc = 0; + memset(&privptr->end_ccw, 0x00, sizeof(struct endccw)); + memset(&privptr->ctl_bk, 0x00, sizeof(struct clawctl)); + /* initialize free write ccwbk counter */ + privptr->write_free_count=0; /* number of free bufs on write chain */ + p_last_CCWB = NULL; + p_first_CCWB= NULL; + /* + * We need 1 CCW block for each read buffer, 1 for each + * write buffer, plus 1 for ClawSignalBlock + */ + ccw_blocks_required = + privptr->p_env->read_buffers+privptr->p_env->write_buffers+1; +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() " + "ccw_blocks_required=%d\n", + dev->name,__FUNCTION__, + ccw_blocks_required); + printk(KERN_INFO "%s: %s() " + "PAGE_SIZE=0x%x\n", + dev->name,__FUNCTION__, + (unsigned int)PAGE_SIZE); + printk(KERN_INFO "%s: %s() > " + "PAGE_MASK=0x%x\n", + dev->name,__FUNCTION__, + (unsigned int)PAGE_MASK); +#endif + /* + * compute number of CCW blocks that will fit in a page + */ + ccw_blocks_perpage= PAGE_SIZE / CCWBK_SIZE; + ccw_pages_required= + (ccw_blocks_required+ccw_blocks_perpage -1) / + ccw_blocks_perpage; + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() > ccw_blocks_perpage=%d\n", + dev->name,__FUNCTION__, + ccw_blocks_perpage); + printk(KERN_INFO "%s: %s() > ccw_pages_required=%d\n", + dev->name,__FUNCTION__, + ccw_pages_required); +#endif + /* + * read and write sizes are set by 2 constants in claw.h + * 4k and 32k. Unpacked values other than 4k are not going to + * provide good performance. With packing buffers support 32k + * buffers are used. + */ + if (privptr->p_env->read_size < PAGE_SIZE) { + claw_reads_perpage= PAGE_SIZE / privptr->p_env->read_size; + claw_read_pages= (privptr->p_env->read_buffers + + claw_reads_perpage -1) / claw_reads_perpage; + } + else { /* > or equal */ + privptr->p_buff_pages_perread= + (privptr->p_env->read_size + PAGE_SIZE - 1) / PAGE_SIZE; + claw_read_pages= + privptr->p_env->read_buffers * privptr->p_buff_pages_perread; + } + if (privptr->p_env->write_size < PAGE_SIZE) { + claw_writes_perpage= + PAGE_SIZE / privptr->p_env->write_size; + claw_write_pages= + (privptr->p_env->write_buffers + claw_writes_perpage -1) / + claw_writes_perpage; + + } + else { /* > or equal */ + privptr->p_buff_pages_perwrite= + (privptr->p_env->read_size + PAGE_SIZE - 1) / PAGE_SIZE; + claw_write_pages= + privptr->p_env->write_buffers * privptr->p_buff_pages_perwrite; + } +#ifdef DEBUGMSG + if (privptr->p_env->read_size < PAGE_SIZE) { + printk(KERN_INFO "%s: %s() reads_perpage=%d\n", + dev->name,__FUNCTION__, + claw_reads_perpage); + } + else { + printk(KERN_INFO "%s: %s() pages_perread=%d\n", + dev->name,__FUNCTION__, + privptr->p_buff_pages_perread); + } + printk(KERN_INFO "%s: %s() read_pages=%d\n", + dev->name,__FUNCTION__, + claw_read_pages); + if (privptr->p_env->write_size < PAGE_SIZE) { + printk(KERN_INFO "%s: %s() writes_perpage=%d\n", + dev->name,__FUNCTION__, + claw_writes_perpage); + } + else { + printk(KERN_INFO "%s: %s() pages_perwrite=%d\n", + dev->name,__FUNCTION__, + privptr->p_buff_pages_perwrite); + } + printk(KERN_INFO "%s: %s() write_pages=%d\n", + dev->name,__FUNCTION__, + claw_write_pages); +#endif + + + /* + * allocate ccw_pages_required + */ + if (privptr->p_buff_ccw==NULL) { + privptr->p_buff_ccw= + (void *)__get_free_pages(__GFP_DMA, + (int)pages_to_order_of_mag(ccw_pages_required )); + if (privptr->p_buff_ccw==NULL) { + printk(KERN_INFO "%s: %s() " + "__get_free_pages for CCWs failed : " + "pages is %d\n", + dev->name,__FUNCTION__, + ccw_pages_required ); +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > " + "exit on line %d, rc = ENOMEM\n", + dev->name,__FUNCTION__, + __LINE__); +#endif + return -ENOMEM; + } + privptr->p_buff_ccw_num=ccw_pages_required; + } + memset(privptr->p_buff_ccw, 0x00, + privptr->p_buff_ccw_num * PAGE_SIZE); + + /* + * obtain ending ccw block address + * + */ + privptr->p_end_ccw = (struct endccw *)&privptr->end_ccw; + real_address = (__u32)__pa(privptr->p_end_ccw); + /* Initialize ending CCW block */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() begin initialize ending CCW blocks\n", + dev->name,__FUNCTION__); +#endif + + p_endccw=privptr->p_end_ccw; + p_endccw->real=real_address; + p_endccw->write1=0x00; + p_endccw->read1=0x00; + + /* write1_nop1 */ + p_endccw->write1_nop1.cmd_code = CCW_CLAW_CMD_NOP; + p_endccw->write1_nop1.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_endccw->write1_nop1.count = 1; + p_endccw->write1_nop1.cda = 0; + + /* write1_nop2 */ + p_endccw->write1_nop2.cmd_code = CCW_CLAW_CMD_READFF; + p_endccw->write1_nop2.flags = CCW_FLAG_SLI | CCW_FLAG_SKIP; + p_endccw->write1_nop2.count = 1; + p_endccw->write1_nop2.cda = 0; + + /* write2_nop1 */ + p_endccw->write2_nop1.cmd_code = CCW_CLAW_CMD_NOP; + p_endccw->write2_nop1.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_endccw->write2_nop1.count = 1; + p_endccw->write2_nop1.cda = 0; + + /* write2_nop2 */ + p_endccw->write2_nop2.cmd_code = CCW_CLAW_CMD_READFF; + p_endccw->write2_nop2.flags = CCW_FLAG_SLI | CCW_FLAG_SKIP; + p_endccw->write2_nop2.count = 1; + p_endccw->write2_nop2.cda = 0; + + /* read1_nop1 */ + p_endccw->read1_nop1.cmd_code = CCW_CLAW_CMD_NOP; + p_endccw->read1_nop1.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_endccw->read1_nop1.count = 1; + p_endccw->read1_nop1.cda = 0; + + /* read1_nop2 */ + p_endccw->read1_nop2.cmd_code = CCW_CLAW_CMD_READFF; + p_endccw->read1_nop2.flags = CCW_FLAG_SLI | CCW_FLAG_SKIP; + p_endccw->read1_nop2.count = 1; + p_endccw->read1_nop2.cda = 0; + + /* read2_nop1 */ + p_endccw->read2_nop1.cmd_code = CCW_CLAW_CMD_NOP; + p_endccw->read2_nop1.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_endccw->read2_nop1.count = 1; + p_endccw->read2_nop1.cda = 0; + + /* read2_nop2 */ + p_endccw->read2_nop2.cmd_code = CCW_CLAW_CMD_READFF; + p_endccw->read2_nop2.flags = CCW_FLAG_SLI | CCW_FLAG_SKIP; + p_endccw->read2_nop2.count = 1; + p_endccw->read2_nop2.cda = 0; + +#ifdef IOTRACE + printk(KERN_INFO "%s: %s() dump claw ending CCW BK \n", + dev->name,__FUNCTION__); + dumpit((char *)p_endccw, sizeof(struct endccw)); +#endif + + /* + * Build a chain of CCWs + * + */ + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() Begin build a chain of CCW buffer \n", + dev->name,__FUNCTION__); +#endif + p_buff=privptr->p_buff_ccw; + + p_free_chain=NULL; + for (i=0 ; i < ccw_pages_required; i++ ) { + real_address = (__u32)__pa(p_buff); + p_buf=p_buff; + for (j=0 ; j < ccw_blocks_perpage ; j++) { + p_buf->next = p_free_chain; + p_free_chain = p_buf; + p_buf->real=(__u32)__pa(p_buf); + ++p_buf; + } + p_buff+=PAGE_SIZE; + } +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() " + "End build a chain of CCW buffer \n", + dev->name,__FUNCTION__); + p_buf=p_free_chain; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } +#endif + + /* + * Initialize ClawSignalBlock + * + */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() " + "Begin initialize ClawSignalBlock \n", + dev->name,__FUNCTION__); +#endif + if (privptr->p_claw_signal_blk==NULL) { + privptr->p_claw_signal_blk=p_free_chain; + p_free_chain=p_free_chain->next; + pClawH=(struct clawh *)privptr->p_claw_signal_blk; + pClawH->length=0xffff; + pClawH->opcode=0xff; + pClawH->flag=CLAW_BUSY; + } +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() > End initialize " + "ClawSignalBlock\n", + dev->name,__FUNCTION__); + dumpit((char *)privptr->p_claw_signal_blk, sizeof(struct ccwbk)); +#endif + + /* + * allocate write_pages_required and add to free chain + */ + if (privptr->p_buff_write==NULL) { + if (privptr->p_env->write_size < PAGE_SIZE) { + privptr->p_buff_write= + (void *)__get_free_pages(__GFP_DMA, + (int)pages_to_order_of_mag(claw_write_pages )); + if (privptr->p_buff_write==NULL) { + printk(KERN_INFO "%s: %s() __get_free_pages for write" + " bufs failed : get is for %d pages\n", + dev->name,__FUNCTION__,claw_write_pages ); + free_pages((unsigned long)privptr->p_buff_ccw, + (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); + privptr->p_buff_ccw=NULL; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > exit on line %d," + "rc = ENOMEM\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return -ENOMEM; + } + /* + * Build CLAW write free chain + * + */ + + memset(privptr->p_buff_write, 0x00, + ccw_pages_required * PAGE_SIZE); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() Begin build claw write free " + "chain \n",dev->name,__FUNCTION__); +#endif + privptr->p_write_free_chain=NULL; + + p_buff=privptr->p_buff_write; + + for (i=0 ; i< privptr->p_env->write_buffers ; i++) { + p_buf = p_free_chain; /* get a CCW */ + p_free_chain = p_buf->next; + p_buf->next =privptr->p_write_free_chain; + privptr->p_write_free_chain = p_buf; + p_buf-> p_buffer = (struct clawbuf *)p_buff; + p_buf-> write.cda = (__u32)__pa(p_buff); + p_buf-> write.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> w_read_FF.cmd_code = CCW_CLAW_CMD_READFF; + p_buf-> w_read_FF.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> w_read_FF.count = 1; + p_buf-> w_read_FF.cda = + (__u32)__pa(&p_buf-> header.flag); + p_buf-> w_TIC_1.cmd_code = CCW_CLAW_CMD_TIC; + p_buf-> w_TIC_1.flags = 0; + p_buf-> w_TIC_1.count = 0; + + if (((unsigned long)p_buff+privptr->p_env->write_size) >= + ((unsigned long)(p_buff+2* + (privptr->p_env->write_size) -1) & PAGE_MASK)) { + p_buff= p_buff+privptr->p_env->write_size; + } + } + } + else /* Buffers are => PAGE_SIZE. 1 buff per get_free_pages */ + { + privptr->p_write_free_chain=NULL; + for (i = 0; i< privptr->p_env->write_buffers ; i++) { + p_buff=(void *)__get_free_pages(__GFP_DMA, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perwrite) ); +#ifdef IOTRACE + printk(KERN_INFO "%s:%s __get_free_pages " + "for writes buf: get for %d pages\n", + dev->name,__FUNCTION__, + privptr->p_buff_pages_perwrite); +#endif + if (p_buff==NULL) { + printk(KERN_INFO "%s:%s __get_free_pages" + "for writes buf failed : get is for %d pages\n", + dev->name, + __FUNCTION__, + privptr->p_buff_pages_perwrite ); + free_pages((unsigned long)privptr->p_buff_ccw, + (int)pages_to_order_of_mag( + privptr->p_buff_ccw_num)); + privptr->p_buff_ccw=NULL; + p_buf=privptr->p_buff_write; + while (p_buf!=NULL) { + free_pages((unsigned long) + p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perwrite)); + p_buf=p_buf->next; + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s exit on line %d, rc = ENOMEM\n", + dev->name, + __FUNCTION__, + __LINE__); +#endif + return -ENOMEM; + } /* Error on get_pages */ + memset(p_buff, 0x00, privptr->p_env->write_size ); + p_buf = p_free_chain; + p_free_chain = p_buf->next; + p_buf->next = privptr->p_write_free_chain; + privptr->p_write_free_chain = p_buf; + privptr->p_buff_write = p_buf; + p_buf->p_buffer=(struct clawbuf *)p_buff; + p_buf-> write.cda = (__u32)__pa(p_buff); + p_buf-> write.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> w_read_FF.cmd_code = CCW_CLAW_CMD_READFF; + p_buf-> w_read_FF.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> w_read_FF.count = 1; + p_buf-> w_read_FF.cda = + (__u32)__pa(&p_buf-> header.flag); + p_buf-> w_TIC_1.cmd_code = CCW_CLAW_CMD_TIC; + p_buf-> w_TIC_1.flags = 0; + p_buf-> w_TIC_1.count = 0; + } /* for all write_buffers */ + + } /* else buffers are PAGE_SIZE or bigger */ + + } + privptr->p_buff_write_num=claw_write_pages; + privptr->write_free_count=privptr->p_env->write_buffers; + + +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s End build claw write free chain \n", + dev->name,__FUNCTION__); + p_buf=privptr->p_write_free_chain; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } +#endif + /* + * allocate read_pages_required and chain to free chain + */ + if (privptr->p_buff_read==NULL) { + if (privptr->p_env->read_size < PAGE_SIZE) { + privptr->p_buff_read= + (void *)__get_free_pages(__GFP_DMA, + (int)pages_to_order_of_mag(claw_read_pages) ); + if (privptr->p_buff_read==NULL) { + printk(KERN_INFO "%s: %s() " + "__get_free_pages for read buf failed : " + "get is for %d pages\n", + dev->name,__FUNCTION__,claw_read_pages ); + free_pages((unsigned long)privptr->p_buff_ccw, + (int)pages_to_order_of_mag( + privptr->p_buff_ccw_num)); + /* free the write pages size is < page size */ + free_pages((unsigned long)privptr->p_buff_write, + (int)pages_to_order_of_mag( + privptr->p_buff_write_num)); + privptr->p_buff_ccw=NULL; + privptr->p_buff_write=NULL; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > exit on line %d, rc =" + " ENOMEM\n",dev->name,__FUNCTION__,__LINE__); +#endif + return -ENOMEM; + } + memset(privptr->p_buff_read, 0x00, claw_read_pages * PAGE_SIZE); + privptr->p_buff_read_num=claw_read_pages; + /* + * Build CLAW read free chain + * + */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() Begin build claw read free chain \n", + dev->name,__FUNCTION__); +#endif + p_buff=privptr->p_buff_read; + for (i=0 ; i< privptr->p_env->read_buffers ; i++) { + p_buf = p_free_chain; + p_free_chain = p_buf->next; + + if (p_last_CCWB==NULL) { + p_buf->next=NULL; + real_TIC_address=0; + p_last_CCWB=p_buf; + } + else { + p_buf->next=p_first_CCWB; + real_TIC_address= + (__u32)__pa(&p_first_CCWB -> read ); + } + + p_first_CCWB=p_buf; + + p_buf->p_buffer=(struct clawbuf *)p_buff; + /* initialize read command */ + p_buf-> read.cmd_code = CCW_CLAW_CMD_READ; + p_buf-> read.cda = (__u32)__pa(p_buff); + p_buf-> read.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> read.count = privptr->p_env->read_size; + + /* initialize read_h command */ + p_buf-> read_h.cmd_code = CCW_CLAW_CMD_READHEADER; + p_buf-> read_h.cda = + (__u32)__pa(&(p_buf->header)); + p_buf-> read_h.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> read_h.count = sizeof(struct clawh); + + /* initialize Signal command */ + p_buf-> signal.cmd_code = CCW_CLAW_CMD_SIGNAL_SMOD; + p_buf-> signal.cda = + (__u32)__pa(&(pClawH->flag)); + p_buf-> signal.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> signal.count = 1; + + /* initialize r_TIC_1 command */ + p_buf-> r_TIC_1.cmd_code = CCW_CLAW_CMD_TIC; + p_buf-> r_TIC_1.cda = (__u32)real_TIC_address; + p_buf-> r_TIC_1.flags = 0; + p_buf-> r_TIC_1.count = 0; + + /* initialize r_read_FF command */ + p_buf-> r_read_FF.cmd_code = CCW_CLAW_CMD_READFF; + p_buf-> r_read_FF.cda = + (__u32)__pa(&(pClawH->flag)); + p_buf-> r_read_FF.flags = + CCW_FLAG_SLI | CCW_FLAG_CC | CCW_FLAG_PCI; + p_buf-> r_read_FF.count = 1; + + /* initialize r_TIC_2 */ + memcpy(&p_buf->r_TIC_2, + &p_buf->r_TIC_1, sizeof(struct ccw1)); + + /* initialize Header */ + p_buf->header.length=0xffff; + p_buf->header.opcode=0xff; + p_buf->header.flag=CLAW_PENDING; + + if (((unsigned long)p_buff+privptr->p_env->read_size) >= + ((unsigned long)(p_buff+2*(privptr->p_env->read_size) -1) + & PAGE_MASK) ) { + p_buff= p_buff+privptr->p_env->read_size; + } + else { + p_buff= + (void *)((unsigned long) + (p_buff+2*(privptr->p_env->read_size) -1) + & PAGE_MASK) ; + } + } /* for read_buffers */ + } /* read_size < PAGE_SIZE */ + else { /* read Size >= PAGE_SIZE */ + +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() Begin build claw read free chain \n", + dev->name,__FUNCTION__); +#endif + for (i=0 ; i< privptr->p_env->read_buffers ; i++) { + p_buff = (void *)__get_free_pages(__GFP_DMA, + (int)pages_to_order_of_mag(privptr->p_buff_pages_perread) ); + if (p_buff==NULL) { + printk(KERN_INFO "%s: %s() __get_free_pages for read " + "buf failed : get is for %d pages\n", + dev->name,__FUNCTION__, + privptr->p_buff_pages_perread ); + free_pages((unsigned long)privptr->p_buff_ccw, + (int)pages_to_order_of_mag(privptr->p_buff_ccw_num)); + /* free the write pages */ + p_buf=privptr->p_buff_write; + while (p_buf!=NULL) { + free_pages((unsigned long)p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perwrite )); + p_buf=p_buf->next; + } + /* free any read pages already alloc */ + p_buf=privptr->p_buff_read; + while (p_buf!=NULL) { + free_pages((unsigned long)p_buf->p_buffer, + (int)pages_to_order_of_mag( + privptr->p_buff_pages_perread )); + p_buf=p_buf->next; + } + privptr->p_buff_ccw=NULL; + privptr->p_buff_write=NULL; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() exit on line %d, rc = ENOMEM\n", + dev->name,__FUNCTION__, + __LINE__); +#endif + return -ENOMEM; + } + memset(p_buff, 0x00, privptr->p_env->read_size); + p_buf = p_free_chain; + privptr->p_buff_read = p_buf; + p_free_chain = p_buf->next; + + if (p_last_CCWB==NULL) { + p_buf->next=NULL; + real_TIC_address=0; + p_last_CCWB=p_buf; + } + else { + p_buf->next=p_first_CCWB; + real_TIC_address= + (addr_t)__pa( + &p_first_CCWB -> read ); + } + + p_first_CCWB=p_buf; + /* save buff address */ + p_buf->p_buffer=(struct clawbuf *)p_buff; + /* initialize read command */ + p_buf-> read.cmd_code = CCW_CLAW_CMD_READ; + p_buf-> read.cda = (__u32)__pa(p_buff); + p_buf-> read.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> read.count = privptr->p_env->read_size; + + /* initialize read_h command */ + p_buf-> read_h.cmd_code = CCW_CLAW_CMD_READHEADER; + p_buf-> read_h.cda = + (__u32)__pa(&(p_buf->header)); + p_buf-> read_h.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> read_h.count = sizeof(struct clawh); + + /* initialize Signal command */ + p_buf-> signal.cmd_code = CCW_CLAW_CMD_SIGNAL_SMOD; + p_buf-> signal.cda = + (__u32)__pa(&(pClawH->flag)); + p_buf-> signal.flags = CCW_FLAG_SLI | CCW_FLAG_CC; + p_buf-> signal.count = 1; + + /* initialize r_TIC_1 command */ + p_buf-> r_TIC_1.cmd_code = CCW_CLAW_CMD_TIC; + p_buf-> r_TIC_1.cda = (__u32)real_TIC_address; + p_buf-> r_TIC_1.flags = 0; + p_buf-> r_TIC_1.count = 0; + + /* initialize r_read_FF command */ + p_buf-> r_read_FF.cmd_code = CCW_CLAW_CMD_READFF; + p_buf-> r_read_FF.cda = + (__u32)__pa(&(pClawH->flag)); + p_buf-> r_read_FF.flags = + CCW_FLAG_SLI | CCW_FLAG_CC | CCW_FLAG_PCI; + p_buf-> r_read_FF.count = 1; + + /* initialize r_TIC_2 */ + memcpy(&p_buf->r_TIC_2, &p_buf->r_TIC_1, + sizeof(struct ccw1)); + + /* initialize Header */ + p_buf->header.length=0xffff; + p_buf->header.opcode=0xff; + p_buf->header.flag=CLAW_PENDING; + + } /* For read_buffers */ + } /* read_size >= PAGE_SIZE */ + } /* pBuffread = NULL */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() > End build claw read free chain \n", + dev->name,__FUNCTION__); + p_buf=p_first_CCWB; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } + +#endif + add_claw_reads( dev ,p_first_CCWB , p_last_CCWB); + privptr->buffs_alloc = 1; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return 0; +} /* end of init_ccw_bk */ + +/*-------------------------------------------------------------------* +* * +* probe_error * +* * +*--------------------------------------------------------------------*/ + +static void +probe_error( struct ccwgroup_device *cgdev) +{ + struct claw_privbk *privptr; +#ifdef FUNCTRACE + printk(KERN_INFO "%s enter \n",__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"proberr"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s variable cgdev =\n",__FUNCTION__); + dumpit((char *) cgdev, sizeof(struct ccwgroup_device)); +#endif + privptr=(struct claw_privbk *)cgdev->dev.driver_data; + if (privptr!=NULL) { + if (privptr->p_env != NULL) { + kfree(privptr->p_env); + privptr->p_env=NULL; + } + if (privptr->p_mtc_envelope!=NULL) { + kfree(privptr->p_mtc_envelope); + privptr->p_mtc_envelope=NULL; + } + kfree(privptr); + privptr=NULL; + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s > exit on line %d\n", + __FUNCTION__,__LINE__); +#endif + + return; +} /* probe_error */ + + + +/*-------------------------------------------------------------------* +* claw_process_control * +* * +* * +*--------------------------------------------------------------------*/ + +static int +claw_process_control( struct net_device *dev, struct ccwbk * p_ccw) +{ + + struct clawbuf *p_buf; + struct clawctl ctlbk; + struct clawctl *p_ctlbk; + char temp_host_name[8]; + char temp_ws_name[8]; + struct claw_privbk *privptr; + struct claw_env *p_env; + struct sysval *p_sysval; + struct conncmd *p_connect=NULL; + int rc; + struct chbk *p_ch = NULL; +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > enter \n", + dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"clw_cntl"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "%s: variable p_ccw =\n",dev->name); + dumpit((char *) p_ccw, sizeof(struct ccwbk *)); +#endif + udelay(1000); /* Wait a ms for the control packets to + *catch up to each other */ + privptr=dev->priv; + p_env=privptr->p_env; + memcpy( &temp_host_name, p_env->host_name, 8); + memcpy( &temp_ws_name, p_env->adapter_name , 8); + printk(KERN_INFO "%s: CLAW device %.8s: " + "Received Control Packet\n", + dev->name, temp_ws_name); + if (privptr->release_pend==1) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() > " + "exit on line %d, rc=0\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return 0; + } + p_buf=p_ccw->p_buffer; + p_ctlbk=&ctlbk; + if (p_env->packing == DO_PACKED) { /* packing in progress?*/ + memcpy(p_ctlbk, &p_buf->buffer[4], sizeof(struct clawctl)); + } else { + memcpy(p_ctlbk, p_buf, sizeof(struct clawctl)); + } +#ifdef IOTRACE + printk(KERN_INFO "%s: dump claw control data inbound\n",dev->name); + dumpit((char *)p_ctlbk, sizeof(struct clawctl)); +#endif + switch (p_ctlbk->command) + { + case SYSTEM_VALIDATE_REQUEST: + if (p_ctlbk->version!=CLAW_VERSION_ID) { + claw_snd_sys_validate_rsp(dev, p_ctlbk, + CLAW_RC_WRONG_VERSION ); + printk("%s: %d is wrong version id. " + "Expected %d\n", + dev->name, p_ctlbk->version, + CLAW_VERSION_ID); + } + p_sysval=(struct sysval *)&(p_ctlbk->data); + printk( "%s: Recv Sys Validate Request: " + "Vers=%d,link_id=%d,Corr=%d,WS name=%." + "8s,Host name=%.8s\n", + dev->name, p_ctlbk->version, + p_ctlbk->linkid, + p_ctlbk->correlator, + p_sysval->WS_name, + p_sysval->host_name); + if (0!=memcmp(temp_host_name,p_sysval->host_name,8)) { + claw_snd_sys_validate_rsp(dev, p_ctlbk, + CLAW_RC_NAME_MISMATCH ); + CLAW_DBF_TEXT(2,setup,"HSTBAD"); + CLAW_DBF_TEXT_(2,setup,"%s",p_sysval->host_name); + CLAW_DBF_TEXT_(2,setup,"%s",temp_host_name); + printk(KERN_INFO "%s: Host name mismatch\n", + dev->name); + printk(KERN_INFO "%s: Received :%s: " + "expected :%s: \n", + dev->name, + p_sysval->host_name, + temp_host_name); + } + if (0!=memcmp(temp_ws_name,p_sysval->WS_name,8)) { + claw_snd_sys_validate_rsp(dev, p_ctlbk, + CLAW_RC_NAME_MISMATCH ); + CLAW_DBF_TEXT(2,setup,"WSNBAD"); + CLAW_DBF_TEXT_(2,setup,"%s",p_sysval->WS_name); + CLAW_DBF_TEXT_(2,setup,"%s",temp_ws_name); + printk(KERN_INFO "%s: WS name mismatch\n", + dev->name); + printk(KERN_INFO "%s: Received :%s: " + "expected :%s: \n", + dev->name, + p_sysval->WS_name, + temp_ws_name); + } + if (( p_sysval->write_frame_size < p_env->write_size) && + ( p_env->packing == 0)) { + claw_snd_sys_validate_rsp(dev, p_ctlbk, + CLAW_RC_HOST_RCV_TOO_SMALL ); + printk(KERN_INFO "%s: host write size is too " + "small\n", dev->name); + CLAW_DBF_TEXT(2,setup,"wrtszbad"); + } + if (( p_sysval->read_frame_size < p_env->read_size) && + ( p_env->packing == 0)) { + claw_snd_sys_validate_rsp(dev, p_ctlbk, + CLAW_RC_HOST_RCV_TOO_SMALL ); + printk(KERN_INFO "%s: host read size is too " + "small\n", dev->name); + CLAW_DBF_TEXT(2,setup,"rdsizbad"); + } + claw_snd_sys_validate_rsp(dev, p_ctlbk, 0 ); + printk("%s: CLAW device %.8s: System validate" + " completed.\n",dev->name, temp_ws_name); + printk("%s: sys Validate Rsize:%d Wsize:%d\n",dev->name, + p_sysval->read_frame_size,p_sysval->write_frame_size); + privptr->system_validate_comp=1; + if(strncmp(p_env->api_type,WS_APPL_NAME_PACKED,6) == 0) { + p_env->packing = PACKING_ASK; + } + claw_strt_conn_req(dev); + break; + + case SYSTEM_VALIDATE_RESPONSE: + p_sysval=(struct sysval *)&(p_ctlbk->data); + printk("%s: Recv Sys Validate Resp: Vers=%d,Corr=%d,RC=%d," + "WS name=%.8s,Host name=%.8s\n", + dev->name, + p_ctlbk->version, + p_ctlbk->correlator, + p_ctlbk->rc, + p_sysval->WS_name, + p_sysval->host_name); + switch (p_ctlbk->rc) + { + case 0: + printk(KERN_INFO "%s: CLAW device " + "%.8s: System validate " + "completed.\n", + dev->name, temp_ws_name); + if (privptr->system_validate_comp == 0) + claw_strt_conn_req(dev); + privptr->system_validate_comp=1; + break; + case CLAW_RC_NAME_MISMATCH: + printk(KERN_INFO "%s: Sys Validate " + "Resp : Host, WS name is " + "mismatch\n", + dev->name); + break; + case CLAW_RC_WRONG_VERSION: + printk(KERN_INFO "%s: Sys Validate " + "Resp : Wrong version\n", + dev->name); + break; + case CLAW_RC_HOST_RCV_TOO_SMALL: + printk(KERN_INFO "%s: Sys Validate " + "Resp : bad frame size\n", + dev->name); + break; + default: + printk(KERN_INFO "%s: Sys Validate " + "error code=%d \n", + dev->name, p_ctlbk->rc ); + break; + } + break; + + case CONNECTION_REQUEST: + p_connect=(struct conncmd *)&(p_ctlbk->data); + printk(KERN_INFO "%s: Recv Conn Req: Vers=%d,link_id=%d," + "Corr=%d,HOST appl=%.8s,WS appl=%.8s\n", + dev->name, + p_ctlbk->version, + p_ctlbk->linkid, + p_ctlbk->correlator, + p_connect->host_name, + p_connect->WS_name); + if (privptr->active_link_ID!=0 ) { + claw_snd_disc(dev, p_ctlbk); + printk(KERN_INFO "%s: Conn Req error : " + "already logical link is active \n", + dev->name); + } + if (p_ctlbk->linkid!=1 ) { + claw_snd_disc(dev, p_ctlbk); + printk(KERN_INFO "%s: Conn Req error : " + "req logical link id is not 1\n", + dev->name); + } + rc=find_link(dev, + p_connect->host_name, p_connect->WS_name); + if (rc!=0) { + claw_snd_disc(dev, p_ctlbk); + printk(KERN_INFO "%s: Conn Req error : " + "req appl name does not match\n", + dev->name); + } + claw_send_control(dev, + CONNECTION_CONFIRM, p_ctlbk->linkid, + p_ctlbk->correlator, + 0, p_connect->host_name, + p_connect->WS_name); + if (p_env->packing == PACKING_ASK) { + printk("%s: Now Pack ask\n",dev->name); + p_env->packing = PACK_SEND; + claw_snd_conn_req(dev,0); + } + printk(KERN_INFO "%s: CLAW device %.8s: Connection " + "completed link_id=%d.\n", + dev->name, temp_ws_name, + p_ctlbk->linkid); + privptr->active_link_ID=p_ctlbk->linkid; + p_ch=&privptr->channel[WRITE]; + wake_up(&p_ch->wait); /* wake up claw_open ( WRITE) */ + break; + case CONNECTION_RESPONSE: + p_connect=(struct conncmd *)&(p_ctlbk->data); + printk(KERN_INFO "%s: Revc Conn Resp: Vers=%d,link_id=%d," + "Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n", + dev->name, + p_ctlbk->version, + p_ctlbk->linkid, + p_ctlbk->correlator, + p_ctlbk->rc, + p_connect->host_name, + p_connect->WS_name); + + if (p_ctlbk->rc !=0 ) { + printk(KERN_INFO "%s: Conn Resp error: rc=%d \n", + dev->name, p_ctlbk->rc); + return 1; + } + rc=find_link(dev, + p_connect->host_name, p_connect->WS_name); + if (rc!=0) { + claw_snd_disc(dev, p_ctlbk); + printk(KERN_INFO "%s: Conn Resp error: " + "req appl name does not match\n", + dev->name); + } + /* should be until CONNECTION_CONFIRM */ + privptr->active_link_ID = - (p_ctlbk->linkid); + break; + case CONNECTION_CONFIRM: + p_connect=(struct conncmd *)&(p_ctlbk->data); + printk(KERN_INFO "%s: Recv Conn Confirm:Vers=%d,link_id=%d," + "Corr=%d,Host appl=%.8s,WS appl=%.8s\n", + dev->name, + p_ctlbk->version, + p_ctlbk->linkid, + p_ctlbk->correlator, + p_connect->host_name, + p_connect->WS_name); + if (p_ctlbk->linkid== -(privptr->active_link_ID)) { + privptr->active_link_ID=p_ctlbk->linkid; + if (p_env->packing > PACKING_ASK) { + printk(KERN_INFO "%s: Confirmed Now packing\n",dev->name); + p_env->packing = DO_PACKED; + } + p_ch=&privptr->channel[WRITE]; + wake_up(&p_ch->wait); + } + else { + printk(KERN_INFO "%s: Conn confirm: " + "unexpected linkid=%d \n", + dev->name, p_ctlbk->linkid); + claw_snd_disc(dev, p_ctlbk); + } + break; + case DISCONNECT: + printk(KERN_INFO "%s: Disconnect: " + "Vers=%d,link_id=%d,Corr=%d\n", + dev->name, p_ctlbk->version, + p_ctlbk->linkid, p_ctlbk->correlator); + if ((p_ctlbk->linkid == 2) && + (p_env->packing == PACK_SEND)) { + privptr->active_link_ID = 1; + p_env->packing = DO_PACKED; + } + else + privptr->active_link_ID=0; + break; + case CLAW_ERROR: + printk(KERN_INFO "%s: CLAW ERROR detected\n", + dev->name); + break; + default: + printk(KERN_INFO "%s: Unexpected command code=%d \n", + dev->name, p_ctlbk->command); + break; + } + +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s() exit on line %d, rc = 0\n", + dev->name,__FUNCTION__,__LINE__); +#endif + + return 0; +} /* end of claw_process_control */ + + +/*-------------------------------------------------------------------* +* claw_send_control * +* * +*--------------------------------------------------------------------*/ + +static int +claw_send_control(struct net_device *dev, __u8 type, __u8 link, + __u8 correlator, __u8 rc, char *local_name, char *remote_name) +{ + struct claw_privbk *privptr; + struct clawctl *p_ctl; + struct sysval *p_sysval; + struct conncmd *p_connect; + struct sk_buff *skb; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s > enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"sndcntl"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: Sending Control Packet \n",dev->name); + printk(KERN_INFO "%s: variable type = 0x%X, link = " + "%d, correlator = %d, rc = %d\n", + dev->name,type, link, correlator, rc); + printk(KERN_INFO "%s: variable local_name = %s, " + "remote_name = %s\n",dev->name, local_name, remote_name); +#endif + privptr=dev->priv; + p_ctl=(struct clawctl *)&privptr->ctl_bk; + + p_ctl->command=type; + p_ctl->version=CLAW_VERSION_ID; + p_ctl->linkid=link; + p_ctl->correlator=correlator; + p_ctl->rc=rc; + + p_sysval=(struct sysval *)&p_ctl->data; + p_connect=(struct conncmd *)&p_ctl->data; + + switch (p_ctl->command) { + case SYSTEM_VALIDATE_REQUEST: + case SYSTEM_VALIDATE_RESPONSE: + memcpy(&p_sysval->host_name, local_name, 8); + memcpy(&p_sysval->WS_name, remote_name, 8); + if (privptr->p_env->packing > 0) { + p_sysval->read_frame_size=DEF_PACK_BUFSIZE; + p_sysval->write_frame_size=DEF_PACK_BUFSIZE; + } else { + /* how big is the piggest group of packets */ + p_sysval->read_frame_size=privptr->p_env->read_size; + p_sysval->write_frame_size=privptr->p_env->write_size; + } + memset(&p_sysval->reserved, 0x00, 4); + break; + case CONNECTION_REQUEST: + case CONNECTION_RESPONSE: + case CONNECTION_CONFIRM: + case DISCONNECT: + memcpy(&p_sysval->host_name, local_name, 8); + memcpy(&p_sysval->WS_name, remote_name, 8); + if (privptr->p_env->packing > 0) { + /* How big is the biggest packet */ + p_connect->reserved1[0]=CLAW_FRAME_SIZE; + p_connect->reserved1[1]=CLAW_FRAME_SIZE; + } else { + memset(&p_connect->reserved1, 0x00, 4); + memset(&p_connect->reserved2, 0x00, 4); + } + break; + default: + break; + } + + /* write Control Record to the device */ + + + skb = dev_alloc_skb(sizeof(struct clawctl)); + if (!skb) { + printk( "%s:%s low on mem, returning...\n", + dev->name,__FUNCTION__); +#ifdef DEBUG + printk(KERN_INFO "%s:%s Exit, rc = ENOMEM\n", + dev->name,__FUNCTION__); +#endif + return -ENOMEM; + } + memcpy(skb_put(skb, sizeof(struct clawctl)), + p_ctl, sizeof(struct clawctl)); +#ifdef IOTRACE + printk(KERN_INFO "%s: outbnd claw cntl data \n",dev->name); + dumpit((char *)p_ctl,sizeof(struct clawctl)); +#endif + if (privptr->p_env->packing >= PACK_SEND) + claw_hw_tx(skb, dev, 1); + else + claw_hw_tx(skb, dev, 0); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + + return 0; +} /* end of claw_send_control */ + +/*-------------------------------------------------------------------* +* claw_snd_conn_req * +* * +*--------------------------------------------------------------------*/ +static int +claw_snd_conn_req(struct net_device *dev, __u8 link) +{ + int rc; + struct claw_privbk *privptr=dev->priv; + struct clawctl *p_ctl; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"snd_conn"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable link = %X, dev =\n",dev->name, link); + dumpit((char *) dev, sizeof(struct net_device)); +#endif + rc = 1; + p_ctl=(struct clawctl *)&privptr->ctl_bk; + p_ctl->linkid = link; + if ( privptr->system_validate_comp==0x00 ) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc = 1\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return rc; + } + if (privptr->p_env->packing == PACKING_ASK ) + rc=claw_send_control(dev, CONNECTION_REQUEST,0,0,0, + WS_APPL_NAME_PACKED, WS_APPL_NAME_PACKED); + if (privptr->p_env->packing == PACK_SEND) { + rc=claw_send_control(dev, CONNECTION_REQUEST,0,0,0, + WS_APPL_NAME_IP_NAME, WS_APPL_NAME_IP_NAME); + } + if (privptr->p_env->packing == 0) + rc=claw_send_control(dev, CONNECTION_REQUEST,0,0,0, + HOST_APPL_NAME, privptr->p_env->api_type); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", + dev->name,__FUNCTION__,__LINE__, rc); +#endif + return rc; + +} /* end of claw_snd_conn_req */ + + +/*-------------------------------------------------------------------* +* claw_snd_disc * +* * +*--------------------------------------------------------------------*/ + +static int +claw_snd_disc(struct net_device *dev, struct clawctl * p_ctl) +{ + int rc; + struct conncmd * p_connect; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"snd_dsc"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "%s: variable p_ctl",dev->name); + dumpit((char *) p_ctl, sizeof(struct clawctl)); +#endif + p_connect=(struct conncmd *)&p_ctl->data; + + rc=claw_send_control(dev, DISCONNECT, p_ctl->linkid, + p_ctl->correlator, 0, + p_connect->host_name, p_connect->WS_name); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", + dev->name,__FUNCTION__, __LINE__, rc); +#endif + return rc; +} /* end of claw_snd_disc */ + + +/*-------------------------------------------------------------------* +* claw_snd_sys_validate_rsp * +* * +*--------------------------------------------------------------------*/ + +static int +claw_snd_sys_validate_rsp(struct net_device *dev, + struct clawctl *p_ctl, __u32 return_code) +{ + struct claw_env * p_env; + struct claw_privbk *privptr; + int rc; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n", + dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"chkresp"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable return_code = %d, dev =\n", + dev->name, return_code); + dumpit((char *) dev, sizeof(struct net_device)); + printk(KERN_INFO "%s: variable p_ctl =\n",dev->name); + dumpit((char *) p_ctl, sizeof(struct clawctl)); +#endif + privptr = dev->priv; + p_env=privptr->p_env; + rc=claw_send_control(dev, SYSTEM_VALIDATE_RESPONSE, + p_ctl->linkid, + p_ctl->correlator, + return_code, + p_env->host_name, + p_env->adapter_name ); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", + dev->name,__FUNCTION__,__LINE__, rc); +#endif + return rc; +} /* end of claw_snd_sys_validate_rsp */ + +/*-------------------------------------------------------------------* +* claw_strt_conn_req * +* * +*--------------------------------------------------------------------*/ + +static int +claw_strt_conn_req(struct net_device *dev ) +{ + int rc; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"conn_req"); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: variable dev =\n",dev->name); + dumpit((char *) dev, sizeof(struct net_device)); +#endif + rc=claw_snd_conn_req(dev, 1); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d, rc = %d\n", + dev->name,__FUNCTION__,__LINE__, rc); +#endif + return rc; +} /* end of claw_strt_conn_req */ + + + +/*-------------------------------------------------------------------* + * claw_stats * + *-------------------------------------------------------------------*/ + +static struct +net_device_stats *claw_stats(struct net_device *dev) +{ + struct claw_privbk *privptr; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"stats"); + privptr = dev->priv; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return &privptr->stats; +} /* end of claw_stats */ + + +/*-------------------------------------------------------------------* +* unpack_read * +* * +*--------------------------------------------------------------------*/ +static void +unpack_read(struct net_device *dev ) +{ + struct sk_buff *skb; + struct claw_privbk *privptr; + struct claw_env *p_env; + struct ccwbk *p_this_ccw; + struct ccwbk *p_first_ccw; + struct ccwbk *p_last_ccw; + struct clawph *p_packh; + void *p_packd; + struct clawctl *p_ctlrec=NULL; + + __u32 len_of_data; + __u32 pack_off; + __u8 link_num; + __u8 mtc_this_frm=0; + __u32 bytes_to_mov; + struct chbk *p_ch = NULL; + int i=0; + int p=0; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s enter \n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"unpkread"); + p_first_ccw=NULL; + p_last_ccw=NULL; + p_packh=NULL; + p_packd=NULL; + privptr=dev->priv; + p_env = privptr->p_env; + p_this_ccw=privptr->p_read_active_first; + i=0; + while (p_this_ccw!=NULL && p_this_ccw->header.flag!=CLAW_PENDING) { +#ifdef IOTRACE + printk(KERN_INFO "%s p_this_ccw \n",dev->name); + dumpit((char*)p_this_ccw, sizeof(struct ccwbk)); + printk(KERN_INFO "%s Inbound p_this_ccw->p_buffer(64)" + " pk=%d \n",dev->name,p_env->packing); + dumpit((char *)p_this_ccw->p_buffer, 64 ); +#endif + pack_off = 0; + p = 0; + p_this_ccw->header.flag=CLAW_PENDING; + privptr->p_read_active_first=p_this_ccw->next; + p_this_ccw->next=NULL; + p_packh = (struct clawph *)p_this_ccw->p_buffer; + if ((p_env->packing == PACK_SEND) && + (p_packh->len == 32) && + (p_packh->link_num == 0)) { /* is it a packed ctl rec? */ + p_packh++; /* peek past pack header */ + p_ctlrec = (struct clawctl *)p_packh; + p_packh--; /* un peek */ + if ((p_ctlrec->command == CONNECTION_RESPONSE) || + (p_ctlrec->command == CONNECTION_CONFIRM)) + p_env->packing = DO_PACKED; + } + if (p_env->packing == DO_PACKED) + link_num=p_packh->link_num; + else + link_num=p_this_ccw->header.opcode / 8; + if ((p_this_ccw->header.opcode & MORE_to_COME_FLAG)!=0) { +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s > More_to_come is ON\n", + dev->name,__FUNCTION__); +#endif + mtc_this_frm=1; + if (p_this_ccw->header.length!= + privptr->p_env->read_size ) { + printk(KERN_INFO " %s: Invalid frame detected " + "length is %02x\n" , + dev->name, p_this_ccw->header.length); + } + } + + if (privptr->mtc_skipping) { + /* + * We're in the mode of skipping past a + * multi-frame message + * that we can't process for some reason or other. + * The first frame without the More-To-Come flag is + * the last frame of the skipped message. + */ + /* in case of More-To-Come not set in this frame */ + if (mtc_this_frm==0) { + privptr->mtc_skipping=0; /* Ok, the end */ + privptr->mtc_logical_link=-1; + } +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s goto next " + "frame from MoretoComeSkip \n", + dev->name,__FUNCTION__); +#endif + goto NextFrame; + } + + if (link_num==0) { + claw_process_control(dev, p_this_ccw); +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s goto next " + "frame from claw_process_control \n", + dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(4,trace,"UnpkCntl"); + goto NextFrame; + } +unpack_next: + if (p_env->packing == DO_PACKED) { + if (pack_off > p_env->read_size) + goto NextFrame; + p_packd = p_this_ccw->p_buffer+pack_off; + p_packh = (struct clawph *) p_packd; + if ((p_packh->len == 0) || /* all done with this frame? */ + (p_packh->flag != 0)) + goto NextFrame; + bytes_to_mov = p_packh->len; + pack_off += bytes_to_mov+sizeof(struct clawph); + p++; + } else { + bytes_to_mov=p_this_ccw->header.length; + } + if (privptr->mtc_logical_link<0) { +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s mtc_logical_link < 0 \n", + dev->name,__FUNCTION__); +#endif + + /* + * if More-To-Come is set in this frame then we don't know + * length of entire message, and hence have to allocate + * large buffer */ + + /* We are starting a new envelope */ + privptr->mtc_offset=0; + privptr->mtc_logical_link=link_num; + } + + if (bytes_to_mov > (MAX_ENVELOPE_SIZE- privptr->mtc_offset) ) { + /* error */ +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s > goto next " + "frame from MoretoComeSkip \n", + dev->name, + __FUNCTION__); + printk(KERN_INFO " bytes_to_mov %d > (MAX_ENVELOPE_" + "SIZE-privptr->mtc_offset %d)\n", + bytes_to_mov,(MAX_ENVELOPE_SIZE- privptr->mtc_offset)); +#endif + privptr->stats.rx_frame_errors++; + goto NextFrame; + } + if (p_env->packing == DO_PACKED) { + memcpy( privptr->p_mtc_envelope+ privptr->mtc_offset, + p_packd+sizeof(struct clawph), bytes_to_mov); + + } else { + memcpy( privptr->p_mtc_envelope+ privptr->mtc_offset, + p_this_ccw->p_buffer, bytes_to_mov); + } +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() received data \n", + dev->name,__FUNCTION__); + if (p_env->packing == DO_PACKED) + dumpit((char *)p_packd+sizeof(struct clawph),32); + else + dumpit((char *)p_this_ccw->p_buffer, 32); + printk(KERN_INFO "%s: %s() bytelength %d \n", + dev->name,__FUNCTION__,bytes_to_mov); +#endif + if (mtc_this_frm==0) { + len_of_data=privptr->mtc_offset+bytes_to_mov; + skb=dev_alloc_skb(len_of_data); + if (skb) { + memcpy(skb_put(skb,len_of_data), + privptr->p_mtc_envelope, + len_of_data); + skb->mac.raw=skb->data; + skb->dev=dev; + skb->protocol=htons(ETH_P_IP); + skb->ip_summed=CHECKSUM_UNNECESSARY; + privptr->stats.rx_packets++; + privptr->stats.rx_bytes+=len_of_data; + netif_rx(skb); +#ifdef DEBUGMSG + printk(KERN_INFO "%s: %s() netif_" + "rx(skb) completed \n", + dev->name,__FUNCTION__); +#endif + } + else { + privptr->stats.rx_dropped++; + printk(KERN_WARNING "%s: %s() low on memory\n", + dev->name,__FUNCTION__); + } + privptr->mtc_offset=0; + privptr->mtc_logical_link=-1; + } + else { + privptr->mtc_offset+=bytes_to_mov; + } + if (p_env->packing == DO_PACKED) + goto unpack_next; +NextFrame: + /* + * Remove ThisCCWblock from active read queue, and add it + * to queue of free blocks to be reused. + */ + i++; + p_this_ccw->header.length=0xffff; + p_this_ccw->header.opcode=0xff; + /* + * add this one to the free queue for later reuse + */ + if (p_first_ccw==NULL) { + p_first_ccw = p_this_ccw; + } + else { + p_last_ccw->next = p_this_ccw; + } + p_last_ccw = p_this_ccw; + /* + * chain to next block on active read queue + */ + p_this_ccw = privptr->p_read_active_first; + CLAW_DBF_TEXT_(4,trace,"rxpkt %d",p); + } /* end of while */ + + /* check validity */ + +#ifdef IOTRACE + printk(KERN_INFO "%s:%s processed frame is %d \n", + dev->name,__FUNCTION__,i); + printk(KERN_INFO "%s:%s F:%lx L:%lx\n", + dev->name, + __FUNCTION__, + (unsigned long)p_first_ccw, + (unsigned long)p_last_ccw); +#endif + CLAW_DBF_TEXT_(4,trace,"rxfrm %d",i); + add_claw_reads(dev, p_first_ccw, p_last_ccw); + p_ch=&privptr->channel[READ]; + claw_strt_read(dev, LOCK_YES); +#ifdef FUNCTRACE + printk(KERN_INFO "%s: %s exit on line %d\n", + dev->name, __FUNCTION__, __LINE__); +#endif + return; +} /* end of unpack_read */ + +/*-------------------------------------------------------------------* +* claw_strt_read * +* * +*--------------------------------------------------------------------*/ +static void +claw_strt_read (struct net_device *dev, int lock ) +{ + int rc = 0; + __u32 parm; + unsigned long saveflags = 0; + struct claw_privbk *privptr=dev->priv; + struct ccwbk*p_ccwbk; + struct chbk *p_ch; + struct clawh *p_clawh; + p_ch=&privptr->channel[READ]; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); + printk(KERN_INFO "%s: variable lock = %d, dev =\n",dev->name, lock); + dumpit((char *) dev, sizeof(struct net_device)); +#endif + CLAW_DBF_TEXT(4,trace,"StRdNter"); + p_clawh=(struct clawh *)privptr->p_claw_signal_blk; + p_clawh->flag=CLAW_IDLE; /* 0x00 */ + + if ((privptr->p_write_active_first!=NULL && + privptr->p_write_active_first->header.flag!=CLAW_PENDING) || + (privptr->p_read_active_first!=NULL && + privptr->p_read_active_first->header.flag!=CLAW_PENDING )) { + p_clawh->flag=CLAW_BUSY; /* 0xff */ + } +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s state-%02x\n" , + dev->name,__FUNCTION__, p_ch->claw_state); +#endif + if (lock==LOCK_YES) { + spin_lock_irqsave(get_ccwdev_lock(p_ch->cdev), saveflags); + } + if (test_and_set_bit(0, (void *)&p_ch->IO_active) == 0) { +#ifdef DEBUGMSG + printk(KERN_INFO "%s: HOT READ started in %s\n" , + dev->name,__FUNCTION__); + p_clawh=(struct clawh *)privptr->p_claw_signal_blk; + dumpit((char *)&p_clawh->flag , 1); +#endif + CLAW_DBF_TEXT(4,trace,"HotRead"); + p_ccwbk=privptr->p_read_active_first; + parm = (unsigned long) p_ch; + rc = ccw_device_start (p_ch->cdev, &p_ccwbk->read, parm, + 0xff, 0); + if (rc != 0) { + ccw_check_return_code(p_ch->cdev, rc); + } + } + else { +#ifdef DEBUGMSG + printk(KERN_INFO "%s: No READ started by %s() In progress\n" , + dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,trace,"ReadAct"); + } + + if (lock==LOCK_YES) { + spin_unlock_irqrestore(get_ccwdev_lock(p_ch->cdev), saveflags); + } +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + CLAW_DBF_TEXT(4,trace,"StRdExit"); + return; +} /* end of claw_strt_read */ + +/*-------------------------------------------------------------------* +* claw_strt_out_IO * +* * +*--------------------------------------------------------------------*/ + +static void +claw_strt_out_IO( struct net_device *dev ) +{ + int rc = 0; + unsigned long parm; + struct claw_privbk *privptr; + struct chbk *p_ch; + struct ccwbk *p_first_ccw; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); +#endif + if (!dev) { + return; + } + privptr=(struct claw_privbk *)dev->priv; + p_ch=&privptr->channel[WRITE]; + +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s state-%02x\n" , + dev->name,__FUNCTION__,p_ch->claw_state); +#endif + CLAW_DBF_TEXT(4,trace,"strt_io"); + p_first_ccw=privptr->p_write_active_first; + + if (p_ch->claw_state == CLAW_STOP) + return; + if (p_first_ccw == NULL) { +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + return; + } + if (test_and_set_bit(0, (void *)&p_ch->IO_active) == 0) { + parm = (unsigned long) p_ch; +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s do_io \n" ,dev->name,__FUNCTION__); + dumpit((char *)p_first_ccw, sizeof(struct ccwbk)); +#endif + CLAW_DBF_TEXT(2,trace,"StWrtIO"); + rc = ccw_device_start (p_ch->cdev,&p_first_ccw->write, parm, + 0xff, 0); + if (rc != 0) { + ccw_check_return_code(p_ch->cdev, rc); + } + } + dev->trans_start = jiffies; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + dev->name,__FUNCTION__,__LINE__); +#endif + + return; +} /* end of claw_strt_out_IO */ + +/*-------------------------------------------------------------------* +* Free write buffers * +* * +*--------------------------------------------------------------------*/ + +static void +claw_free_wrt_buf( struct net_device *dev ) +{ + + struct claw_privbk *privptr=(struct claw_privbk *)dev->priv; + struct ccwbk*p_first_ccw; + struct ccwbk*p_last_ccw; + struct ccwbk*p_this_ccw; + struct ccwbk*p_next_ccw; +#ifdef IOTRACE + struct ccwbk*p_buf; +#endif +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); + printk(KERN_INFO "%s: free count = %d variable dev =\n", + dev->name,privptr->write_free_count); +#endif + CLAW_DBF_TEXT(4,trace,"freewrtb"); + /* scan the write queue to free any completed write packets */ + p_first_ccw=NULL; + p_last_ccw=NULL; +#ifdef IOTRACE + printk(KERN_INFO "%s: Dump current CCW chain \n",dev->name ); + p_buf=privptr->p_write_active_first; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } + if (p_buf==NULL) { + printk(KERN_INFO "%s: privptr->p_write_" + "active_first==NULL\n",dev->name ); + } + p_buf=(struct ccwbk*)privptr->p_end_ccw; + dumpit((char *)p_buf, sizeof(struct endccw)); +#endif + p_this_ccw=privptr->p_write_active_first; + while ( (p_this_ccw!=NULL) && (p_this_ccw->header.flag!=CLAW_PENDING)) + { + p_next_ccw = p_this_ccw->next; + if (((p_next_ccw!=NULL) && + (p_next_ccw->header.flag!=CLAW_PENDING)) || + ((p_this_ccw == privptr->p_write_active_last) && + (p_this_ccw->header.flag!=CLAW_PENDING))) { + /* The next CCW is OK or this is */ + /* the last CCW...free it @A1A */ + privptr->p_write_active_first=p_this_ccw->next; + p_this_ccw->header.flag=CLAW_PENDING; + p_this_ccw->next=privptr->p_write_free_chain; + privptr->p_write_free_chain=p_this_ccw; + ++privptr->write_free_count; + privptr->stats.tx_bytes+= p_this_ccw->write.count; + p_this_ccw=privptr->p_write_active_first; + privptr->stats.tx_packets++; + } + else { + break; + } + } + if (privptr->write_free_count!=0) { + claw_clearbit_busy(TB_NOBUFFER,dev); + } + /* whole chain removed? */ + if (privptr->p_write_active_first==NULL) { + privptr->p_write_active_last=NULL; +#ifdef DEBUGMSG + printk(KERN_INFO "%s:%s p_write_" + "active_first==NULL\n",dev->name,__FUNCTION__); +#endif + } +#ifdef IOTRACE + printk(KERN_INFO "%s: Dump arranged CCW chain \n",dev->name ); + p_buf=privptr->p_write_active_first; + while (p_buf!=NULL) { + dumpit((char *)p_buf, sizeof(struct ccwbk)); + p_buf=p_buf->next; + } + if (p_buf==NULL) { + printk(KERN_INFO "%s: privptr->p_write_active_" + "first==NULL\n",dev->name ); + } + p_buf=(struct ccwbk*)privptr->p_end_ccw; + dumpit((char *)p_buf, sizeof(struct endccw)); +#endif + + CLAW_DBF_TEXT_(4,trace,"FWC=%d",privptr->write_free_count); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d free_count =%d\n", + dev->name,__FUNCTION__, __LINE__,privptr->write_free_count); +#endif + return; +} + +/*-------------------------------------------------------------------* +* claw free netdevice * +* * +*--------------------------------------------------------------------*/ +static void +claw_free_netdevice(struct net_device * dev, int free_dev) +{ + struct claw_privbk *privptr; +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"free_dev"); + + if (!dev) + return; + CLAW_DBF_TEXT_(2,setup,"%s",dev->name); + privptr = dev->priv; + if (dev->flags & IFF_RUNNING) + claw_release(dev); + if (privptr) { + privptr->channel[READ].ndev = NULL; /* say it's free */ + } + dev->priv=NULL; +#ifdef MODULE + if (free_dev) { + free_netdev(dev); + } +#endif + CLAW_DBF_TEXT(2,setup,"feee_ok"); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit\n",dev->name,__FUNCTION__); +#endif +} + +/** + * Claw init netdevice + * Initialize everything of the net device except the name and the + * channel structs. + */ +static void +claw_init_netdevice(struct net_device * dev) +{ +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"init_dev"); + CLAW_DBF_TEXT_(2,setup,"%s",dev->name); + if (!dev) { + printk(KERN_WARNING "claw:%s BAD Device exit line %d\n", + __FUNCTION__,__LINE__); + CLAW_DBF_TEXT(2,setup,"baddev"); + return; + } + dev->mtu = CLAW_DEFAULT_MTU_SIZE; + dev->hard_start_xmit = claw_tx; + dev->open = claw_open; + dev->stop = claw_release; + dev->get_stats = claw_stats; + dev->change_mtu = claw_change_mtu; + dev->hard_header_len = 0; + dev->addr_len = 0; + dev->type = ARPHRD_SLIP; + dev->tx_queue_len = 1300; + dev->flags = IFF_POINTOPOINT | IFF_NOARP; + SET_MODULE_OWNER(dev); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit\n",dev->name,__FUNCTION__); +#endif + CLAW_DBF_TEXT(2,setup,"initok"); + return; +} + +/** + * Init a new channel in the privptr->channel[i]. + * + * @param cdev The ccw_device to be added. + * + * @return 0 on success, !0 on error. + */ +static int +add_channel(struct ccw_device *cdev,int i,struct claw_privbk *privptr) +{ + struct chbk *p_ch; + +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Enter\n",cdev->dev.bus_id,__FUNCTION__); +#endif + CLAW_DBF_TEXT_(2,setup,"%s",cdev->dev.bus_id); + privptr->channel[i].flag = i+1; /* Read is 1 Write is 2 */ + p_ch = &privptr->channel[i]; + p_ch->cdev = cdev; + snprintf(p_ch->id, CLAW_ID_SIZE, "cl-%s", cdev->dev.bus_id); + sscanf(cdev->dev.bus_id+4,"%x",&p_ch->devno); + if ((p_ch->irb = kmalloc(sizeof (struct irb),GFP_KERNEL)) == NULL) { + printk(KERN_WARNING "%s Out of memory in %s for irb\n", + p_ch->id,__FUNCTION__); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + p_ch->id,__FUNCTION__,__LINE__); +#endif + return -ENOMEM; + } + memset(p_ch->irb, 0, sizeof (struct irb)); +#ifdef FUNCTRACE + printk(KERN_INFO "%s:%s Exit on line %d\n", + cdev->dev.bus_id,__FUNCTION__,__LINE__); +#endif + return 0; +} + + +/** + * + * Setup an interface. + * + * @param cgdev Device to be setup. + * + * @returns 0 on success, !0 on failure. + */ +static int +claw_new_device(struct ccwgroup_device *cgdev) +{ + struct claw_privbk *privptr; + struct claw_env *p_env; + struct net_device *dev; + int ret; + + pr_debug("%s() called\n", __FUNCTION__); + printk(KERN_INFO "claw: add for %s\n",cgdev->cdev[READ]->dev.bus_id); + CLAW_DBF_TEXT(2,setup,"new_dev"); + privptr = cgdev->dev.driver_data; + cgdev->cdev[READ]->dev.driver_data = privptr; + cgdev->cdev[WRITE]->dev.driver_data = privptr; + if (!privptr) + return -ENODEV; + p_env = privptr->p_env; + sscanf(cgdev->cdev[READ]->dev.bus_id+4,"%x", + &p_env->devno[READ]); + sscanf(cgdev->cdev[WRITE]->dev.bus_id+4,"%x", + &p_env->devno[WRITE]); + ret = add_channel(cgdev->cdev[0],0,privptr); + if (ret == 0) + ret = add_channel(cgdev->cdev[1],1,privptr); + if (ret != 0) { + printk(KERN_WARNING + "add channel failed " + "with ret = %d\n", ret); + goto out; + } + ret = ccw_device_set_online(cgdev->cdev[READ]); + if (ret != 0) { + printk(KERN_WARNING + "claw: ccw_device_set_online %s READ failed " + "with ret = %d\n",cgdev->cdev[READ]->dev.bus_id,ret); + goto out; + } + ret = ccw_device_set_online(cgdev->cdev[WRITE]); + if (ret != 0) { + printk(KERN_WARNING + "claw: ccw_device_set_online %s WRITE failed " + "with ret = %d\n",cgdev->cdev[WRITE]->dev.bus_id, ret); + goto out; + } + dev = alloc_netdev(0,"claw%d",claw_init_netdevice); + if (!dev) { + printk(KERN_WARNING "%s:alloc_netdev failed\n",__FUNCTION__); + goto out; + } + dev->priv = privptr; + cgdev->dev.driver_data = privptr; + cgdev->cdev[READ]->dev.driver_data = privptr; + cgdev->cdev[WRITE]->dev.driver_data = privptr; + /* sysfs magic */ + SET_NETDEV_DEV(dev, &cgdev->dev); + if (register_netdev(dev) != 0) { + claw_free_netdevice(dev, 1); + CLAW_DBF_TEXT(2,trace,"regfail"); + goto out; + } + dev->flags &=~IFF_RUNNING; + if (privptr->buffs_alloc == 0) { + ret=init_ccw_bk(dev); + if (ret !=0) { + printk(KERN_WARNING + "claw: init_ccw_bk failed with ret=%d\n", ret); + unregister_netdev(dev); + claw_free_netdevice(dev,1); + CLAW_DBF_TEXT(2,trace,"ccwmem"); + goto out; + } + } + privptr->channel[READ].ndev = dev; + privptr->channel[WRITE].ndev = dev; + privptr->p_env->ndev = dev; + + printk(KERN_INFO "%s:readsize=%d writesize=%d " + "readbuffer=%d writebuffer=%d read=0x%04x write=0x%04x\n", + dev->name, p_env->read_size, + p_env->write_size, p_env->read_buffers, + p_env->write_buffers, p_env->devno[READ], + p_env->devno[WRITE]); + printk(KERN_INFO "%s:host_name:%.8s, adapter_name " + ":%.8s api_type: %.8s\n", + dev->name, p_env->host_name, + p_env->adapter_name , p_env->api_type); + return 0; +out: + ccw_device_set_offline(cgdev->cdev[1]); + ccw_device_set_offline(cgdev->cdev[0]); + + return -ENODEV; +} + +static void +claw_purge_skb_queue(struct sk_buff_head *q) +{ + struct sk_buff *skb; + + CLAW_DBF_TEXT(4,trace,"purgque"); + + while ((skb = skb_dequeue(q))) { + atomic_dec(&skb->users); + dev_kfree_skb_irq(skb); + } +} + +/** + * Shutdown an interface. + * + * @param cgdev Device to be shut down. + * + * @returns 0 on success, !0 on failure. + */ +static int +claw_shutdown_device(struct ccwgroup_device *cgdev) +{ + struct claw_privbk *priv; + struct net_device *ndev; + int ret; + + pr_debug("%s() called\n", __FUNCTION__); + CLAW_DBF_TEXT_(2,setup,"%s",cgdev->dev.bus_id); + priv = cgdev->dev.driver_data; + if (!priv) + return -ENODEV; + ndev = priv->channel[READ].ndev; + if (ndev) { + /* Close the device */ + printk(KERN_INFO + "%s: shuting down \n",ndev->name); + if (ndev->flags & IFF_RUNNING) + ret = claw_release(ndev); + ndev->flags &=~IFF_RUNNING; + unregister_netdev(ndev); + ndev->priv = NULL; /* cgdev data, not ndev's to free */ + claw_free_netdevice(ndev, 1); + priv->channel[READ].ndev = NULL; + priv->channel[WRITE].ndev = NULL; + priv->p_env->ndev = NULL; + } + ccw_device_set_offline(cgdev->cdev[1]); + ccw_device_set_offline(cgdev->cdev[0]); + return 0; +} + +static void +claw_remove_device(struct ccwgroup_device *cgdev) +{ + struct claw_privbk *priv; + + pr_debug("%s() called\n", __FUNCTION__); + CLAW_DBF_TEXT_(2,setup,"%s",cgdev->dev.bus_id); + priv = cgdev->dev.driver_data; + if (!priv) { + printk(KERN_WARNING "claw: %s() no Priv exiting\n",__FUNCTION__); + return; + } + printk(KERN_INFO "claw: %s() called %s will be removed.\n", + __FUNCTION__,cgdev->cdev[0]->dev.bus_id); + if (cgdev->state == CCWGROUP_ONLINE) + claw_shutdown_device(cgdev); + claw_remove_files(&cgdev->dev); + if (priv->p_mtc_envelope!=NULL) { + kfree(priv->p_mtc_envelope); + priv->p_mtc_envelope=NULL; + } + if (priv->p_env != NULL) { + kfree(priv->p_env); + priv->p_env=NULL; + } + if (priv->channel[0].irb != NULL) { + kfree(priv->channel[0].irb); + priv->channel[0].irb=NULL; + } + if (priv->channel[1].irb != NULL) { + kfree(priv->channel[1].irb); + priv->channel[1].irb=NULL; + } + kfree(priv); + cgdev->dev.driver_data=NULL; + cgdev->cdev[READ]->dev.driver_data = NULL; + cgdev->cdev[WRITE]->dev.driver_data = NULL; + put_device(&cgdev->dev); +} + + +/* + * sysfs attributes + */ +static ssize_t +claw_hname_show(struct device *dev, char *buf) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + return sprintf(buf, "%s\n",p_env->host_name); +} + +static ssize_t +claw_hname_write(struct device *dev, const char *buf, size_t count) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + if (count > MAX_NAME_LEN+1) + return -EINVAL; + memset(p_env->host_name, 0x20, MAX_NAME_LEN); + strncpy(p_env->host_name,buf, count); + p_env->host_name[count-1] = 0x20; /* clear extra 0x0a */ + p_env->host_name[MAX_NAME_LEN] = 0x00; + CLAW_DBF_TEXT(2,setup,"HstnSet"); + CLAW_DBF_TEXT_(2,setup,"%s",p_env->host_name); + + return count; +} + +static DEVICE_ATTR(host_name, 0644, claw_hname_show, claw_hname_write); + +static ssize_t +claw_adname_show(struct device *dev, char *buf) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + return sprintf(buf, "%s\n",p_env->adapter_name); +} + +static ssize_t +claw_adname_write(struct device *dev, const char *buf, size_t count) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + if (count > MAX_NAME_LEN+1) + return -EINVAL; + memset(p_env->adapter_name, 0x20, MAX_NAME_LEN); + strncpy(p_env->adapter_name,buf, count); + p_env->adapter_name[count-1] = 0x20; /* clear extra 0x0a */ + p_env->adapter_name[MAX_NAME_LEN] = 0x00; + CLAW_DBF_TEXT(2,setup,"AdnSet"); + CLAW_DBF_TEXT_(2,setup,"%s",p_env->adapter_name); + + return count; +} + +static DEVICE_ATTR(adapter_name, 0644, claw_adname_show, claw_adname_write); + +static ssize_t +claw_apname_show(struct device *dev, char *buf) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + return sprintf(buf, "%s\n", + p_env->api_type); +} + +static ssize_t +claw_apname_write(struct device *dev, const char *buf, size_t count) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + if (count > MAX_NAME_LEN+1) + return -EINVAL; + memset(p_env->api_type, 0x20, MAX_NAME_LEN); + strncpy(p_env->api_type,buf, count); + p_env->api_type[count-1] = 0x20; /* we get a loose 0x0a */ + p_env->api_type[MAX_NAME_LEN] = 0x00; + if(strncmp(p_env->api_type,WS_APPL_NAME_PACKED,6) == 0) { + p_env->read_size=DEF_PACK_BUFSIZE; + p_env->write_size=DEF_PACK_BUFSIZE; + p_env->packing=PACKING_ASK; + CLAW_DBF_TEXT(2,setup,"PACKING"); + } + else { + p_env->packing=0; + p_env->read_size=CLAW_FRAME_SIZE; + p_env->write_size=CLAW_FRAME_SIZE; + CLAW_DBF_TEXT(2,setup,"ApiSet"); + } + CLAW_DBF_TEXT_(2,setup,"%s",p_env->api_type); + return count; +} + +static DEVICE_ATTR(api_type, 0644, claw_apname_show, claw_apname_write); + +static ssize_t +claw_wbuff_show(struct device *dev, char *buf) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + return sprintf(buf, "%d\n", p_env->write_buffers); +} + +static ssize_t +claw_wbuff_write(struct device *dev, const char *buf, size_t count) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + int nnn,max; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + sscanf(buf, "%i", &nnn); + if (p_env->packing) { + max = 64; + } + else { + max = 512; + } + if ((nnn > max ) || (nnn < 2)) + return -EINVAL; + p_env->write_buffers = nnn; + CLAW_DBF_TEXT(2,setup,"Wbufset"); + CLAW_DBF_TEXT_(2,setup,"WB=%d",p_env->write_buffers); + return count; +} + +static DEVICE_ATTR(write_buffer, 0644, claw_wbuff_show, claw_wbuff_write); + +static ssize_t +claw_rbuff_show(struct device *dev, char *buf) +{ + struct claw_privbk *priv; + struct claw_env * p_env; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + return sprintf(buf, "%d\n", p_env->read_buffers); +} + +static ssize_t +claw_rbuff_write(struct device *dev, const char *buf, size_t count) +{ + struct claw_privbk *priv; + struct claw_env *p_env; + int nnn,max; + + priv = dev->driver_data; + if (!priv) + return -ENODEV; + p_env = priv->p_env; + sscanf(buf, "%i", &nnn); + if (p_env->packing) { + max = 64; + } + else { + max = 512; + } + if ((nnn > max ) || (nnn < 2)) + return -EINVAL; + p_env->read_buffers = nnn; + CLAW_DBF_TEXT(2,setup,"Rbufset"); + CLAW_DBF_TEXT_(2,setup,"RB=%d",p_env->read_buffers); + return count; +} + +static DEVICE_ATTR(read_buffer, 0644, claw_rbuff_show, claw_rbuff_write); + +static struct attribute *claw_attr[] = { + &dev_attr_read_buffer.attr, + &dev_attr_write_buffer.attr, + &dev_attr_adapter_name.attr, + &dev_attr_api_type.attr, + &dev_attr_host_name.attr, + NULL, +}; + +static struct attribute_group claw_attr_group = { + .attrs = claw_attr, +}; + +static int +claw_add_files(struct device *dev) +{ + pr_debug("%s() called\n", __FUNCTION__); + CLAW_DBF_TEXT(2,setup,"add_file"); + return sysfs_create_group(&dev->kobj, &claw_attr_group); +} + +static void +claw_remove_files(struct device *dev) +{ + pr_debug("%s() called\n", __FUNCTION__); + CLAW_DBF_TEXT(2,setup,"rem_file"); + sysfs_remove_group(&dev->kobj, &claw_attr_group); +} + +/*--------------------------------------------------------------------* +* claw_init and cleanup * +*---------------------------------------------------------------------*/ + +static void __exit +claw_cleanup(void) +{ + unregister_cu3088_discipline(&claw_group_driver); + claw_unregister_debug_facility(); + printk(KERN_INFO "claw: Driver unloaded\n"); + +} + +/** + * Initialize module. + * This is called just after the module is loaded. + * + * @return 0 on success, !0 on error. + */ +static int __init +claw_init(void) +{ + int ret = 0; + printk(KERN_INFO "claw: starting driver " +#ifdef MODULE + "module " +#else + "compiled into kernel " +#endif + " $Revision: 1.35 $ $Date: 2005/03/24 12:25:38 $ \n"); + + +#ifdef FUNCTRACE + printk(KERN_INFO "claw: %s() enter \n",__FUNCTION__); +#endif + ret = claw_register_debug_facility(); + if (ret) { + printk(KERN_WARNING "claw: %s() debug_register failed %d\n", + __FUNCTION__,ret); + return ret; + } + CLAW_DBF_TEXT(2,setup,"init_mod"); + ret = register_cu3088_discipline(&claw_group_driver); + if (ret) { + claw_unregister_debug_facility(); + printk(KERN_WARNING "claw; %s() cu3088 register failed %d\n", + __FUNCTION__,ret); + } +#ifdef FUNCTRACE + printk(KERN_INFO "claw: %s() exit \n",__FUNCTION__); +#endif + return ret; +} + +module_init(claw_init); +module_exit(claw_cleanup); + + + +/*--------------------------------------------------------------------* +* End of File * +*---------------------------------------------------------------------*/ + + diff -Nru a/drivers/s390/net/claw.h b/drivers/s390/net/claw.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/s390/net/claw.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,335 @@ +/******************************************************* +* Define constants * +* * +********************************************************/ +#define VERSION_CLAW_H "$Revision: 1.6 $" +/*-----------------------------------------------------* +* CCW command codes for CLAW protocol * +*------------------------------------------------------*/ + +#define CCW_CLAW_CMD_WRITE 0x01 /* write - not including link */ +#define CCW_CLAW_CMD_READ 0x02 /* read */ +#define CCW_CLAW_CMD_NOP 0x03 /* NOP */ +#define CCW_CLAW_CMD_SENSE 0x04 /* Sense */ +#define CCW_CLAW_CMD_SIGNAL_SMOD 0x05 /* Signal Status Modifier */ +#define CCW_CLAW_CMD_TIC 0x08 /* TIC */ +#define CCW_CLAW_CMD_READHEADER 0x12 /* read header data */ +#define CCW_CLAW_CMD_READFF 0x22 /* read an FF */ +#define CCW_CLAW_CMD_SENSEID 0xe4 /* Sense ID */ + + +/*-----------------------------------------------------* +* CLAW Unique constants * +*------------------------------------------------------*/ + +#define MORE_to_COME_FLAG 0x04 /* OR with write CCW in case of m-t-c */ +#define CLAW_IDLE 0x00 /* flag to indicate CLAW is idle */ +#define CLAW_BUSY 0xff /* flag to indicate CLAW is busy */ +#define CLAW_PENDING 0x00 /* flag to indicate i/o is pending */ +#define CLAW_COMPLETE 0xff /* flag to indicate i/o completed */ + +/*-----------------------------------------------------* +* CLAW control comand code * +*------------------------------------------------------*/ + +#define SYSTEM_VALIDATE_REQUEST 0x01 /* System Validate request */ +#define SYSTEM_VALIDATE_RESPONSE 0x02 /* System Validate response */ +#define CONNECTION_REQUEST 0x21 /* Connection request */ +#define CONNECTION_RESPONSE 0x22 /* Connection response */ +#define CONNECTION_CONFIRM 0x23 /* Connection confirm */ +#define DISCONNECT 0x24 /* Disconnect */ +#define CLAW_ERROR 0x41 /* CLAW error message */ +#define CLAW_VERSION_ID 2 /* CLAW version ID */ + +/*-----------------------------------------------------* +* CLAW adater sense bytes * +*------------------------------------------------------*/ + +#define CLAW_ADAPTER_SENSE_BYTE 0x41 /* Stop command issued to adapter */ + +/*-----------------------------------------------------* +* CLAW control command return codes * +*------------------------------------------------------*/ + +#define CLAW_RC_NAME_MISMATCH 166 /* names do not match */ +#define CLAW_RC_WRONG_VERSION 167 /* wrong CLAW version number */ +#define CLAW_RC_HOST_RCV_TOO_SMALL 180 /* Host maximum receive is */ + /* less than Linux on zSeries*/ + /* transmit size */ + +/*-----------------------------------------------------* +* CLAW Constants application name * +*------------------------------------------------------*/ + +#define HOST_APPL_NAME "TCPIP " +#define WS_APPL_NAME_IP_LINK "TCPIP " +#define WS_APPL_NAME_IP_NAME "IP " +#define WS_APPL_NAME_API_LINK "API " +#define WS_APPL_NAME_PACKED "PACKED " +#define WS_NAME_NOT_DEF "NOT_DEF " +#define PACKING_ASK 1 +#define PACK_SEND 2 +#define DO_PACKED 3 + +#define MAX_ENVELOPE_SIZE 65536 +#define CLAW_DEFAULT_MTU_SIZE 4096 +#define DEF_PACK_BUFSIZE 32768 +#define READ 0 +#define WRITE 1 + +#define TB_TX 0 /* sk buffer handling in process */ +#define TB_STOP 1 /* network device stop in process */ +#define TB_RETRY 2 /* retry in process */ +#define TB_NOBUFFER 3 /* no buffer on free queue */ +#define CLAW_MAX_LINK_ID 1 +#define CLAW_MAX_DEV 256 /* max claw devices */ +#define MAX_NAME_LEN 8 /* host name, adapter name length */ +#define CLAW_FRAME_SIZE 4096 +#define CLAW_ID_SIZE BUS_ID_SIZE+3 + +/* state machine codes used in claw_irq_handler */ + +#define CLAW_STOP 0 +#define CLAW_START_HALT_IO 1 +#define CLAW_START_SENSEID 2 +#define CLAW_START_READ 3 +#define CLAW_START_WRITE 4 + +/*-----------------------------------------------------* +* Lock flag * +*------------------------------------------------------*/ +#define LOCK_YES 0 +#define LOCK_NO 1 + +/*-----------------------------------------------------* +* DBF Debug macros * +*------------------------------------------------------*/ +#define CLAW_DBF_TEXT(level, name, text) \ + do { \ + debug_text_event(claw_dbf_##name, level, text); \ + } while (0) + +#define CLAW_DBF_HEX(level,name,addr,len) \ +do { \ + debug_event(claw_dbf_##name,level,(void*)(addr),len); \ +} while (0) + +#define CLAW_DBF_TEXT_(level,name,text...) \ +do { \ + sprintf(debug_buffer, text); \ + debug_text_event(claw_dbf_##name,level, debug_buffer);\ +} while (0) + +/******************************************************* +* Define Control Blocks * +* * +********************************************************/ + +/*------------------------------------------------------*/ +/* CLAW header */ +/*------------------------------------------------------*/ + +struct clawh { + __u16 length; /* length of data read by preceding read CCW */ + __u8 opcode; /* equivalent read CCW */ + __u8 flag; /* flag of FF to indicate read was completed */ +}; + +/*------------------------------------------------------*/ +/* CLAW Packing header 4 bytes */ +/*------------------------------------------------------*/ +struct clawph { + __u16 len; /* Length of Packed Data Area */ + __u8 flag; /* Reserved not used */ + __u8 link_num; /* Link ID */ +}; + +/*------------------------------------------------------*/ +/* CLAW Ending struct ccwbk */ +/*------------------------------------------------------*/ +struct endccw { + __u32 real; /* real address of this block */ + __u8 write1; /* write 1 is active */ + __u8 read1; /* read 1 is active */ + __u16 reserved; /* reserved for future use */ + struct ccw1 write1_nop1; + struct ccw1 write1_nop2; + struct ccw1 write2_nop1; + struct ccw1 write2_nop2; + struct ccw1 read1_nop1; + struct ccw1 read1_nop2; + struct ccw1 read2_nop1; + struct ccw1 read2_nop2; +}; + +/*------------------------------------------------------*/ +/* CLAW struct ccwbk */ +/*------------------------------------------------------*/ +struct ccwbk { + void *next; /* pointer to next ccw block */ + __u32 real; /* real address of this ccw */ + void *p_buffer; /* virtual address of data */ + struct clawh header; /* claw header */ + struct ccw1 write; /* write CCW */ + struct ccw1 w_read_FF; /* read FF */ + struct ccw1 w_TIC_1; /* TIC */ + struct ccw1 read; /* read CCW */ + struct ccw1 read_h; /* read header */ + struct ccw1 signal; /* signal SMOD */ + struct ccw1 r_TIC_1; /* TIC1 */ + struct ccw1 r_read_FF; /* read FF */ + struct ccw1 r_TIC_2; /* TIC2 */ +}; + +/*------------------------------------------------------*/ +/* CLAW control block */ +/*------------------------------------------------------*/ +struct clawctl { + __u8 command; /* control command */ + __u8 version; /* CLAW protocol version */ + __u8 linkid; /* link ID */ + __u8 correlator; /* correlator */ + __u8 rc; /* return code */ + __u8 reserved1; /* reserved */ + __u8 reserved2; /* reserved */ + __u8 reserved3; /* reserved */ + __u8 data[24]; /* command specific fields */ +}; + +/*------------------------------------------------------*/ +/* Data for SYSTEMVALIDATE command */ +/*------------------------------------------------------*/ +struct sysval { + char WS_name[8]; /* Workstation System name */ + char host_name[8]; /* Host system name */ + __u16 read_frame_size; /* read frame size */ + __u16 write_frame_size; /* write frame size */ + __u8 reserved[4]; /* reserved */ +}; + +/*------------------------------------------------------*/ +/* Data for Connect command */ +/*------------------------------------------------------*/ +struct conncmd { + char WS_name[8]; /* Workstation application name */ + char host_name[8]; /* Host application name */ + __u16 reserved1[2]; /* read frame size */ + __u8 reserved2[4]; /* reserved */ +}; + +/*------------------------------------------------------*/ +/* Data for CLAW error */ +/*------------------------------------------------------*/ +struct clawwerror { + char reserved1[8]; /* reserved */ + char reserved2[8]; /* reserved */ + char reserved3[8]; /* reserved */ +}; + +/*------------------------------------------------------*/ +/* Data buffer for CLAW */ +/*------------------------------------------------------*/ +struct clawbuf { + char buffer[MAX_ENVELOPE_SIZE]; /* data buffer */ +}; + +/*------------------------------------------------------*/ +/* Channel control block for read and write channel */ +/*------------------------------------------------------*/ + +struct chbk { + unsigned int devno; + int irq; + char id[CLAW_ID_SIZE]; + __u32 IO_active; + __u8 claw_state; + struct irb *irb; + struct ccw_device *cdev; /* pointer to the channel device */ + struct net_device *ndev; + wait_queue_head_t wait; + struct tasklet_struct tasklet; + struct timer_list timer; + unsigned long flag_a; /* atomic flags */ +#define CLAW_BH_ACTIVE 0 + unsigned long flag_b; /* atomic flags */ +#define CLAW_WRITE_ACTIVE 0 + __u8 last_dstat; + __u8 flag; + struct sk_buff_head collect_queue; + spinlock_t collect_lock; +#define CLAW_WRITE 0x02 /* - Set if this is a write channel */ +#define CLAW_READ 0x01 /* - Set if this is a read channel */ +#define CLAW_TIMER 0x80 /* - Set if timer made the wake_up */ +}; + +/*--------------------------------------------------------------* +* CLAW environment block * +*---------------------------------------------------------------*/ + +struct claw_env { + unsigned int devno[2]; /* device number */ + char host_name[9]; /* Host name */ + char adapter_name [9]; /* adapter name */ + char api_type[9]; /* TCPIP, API or PACKED */ + void *p_priv; /* privptr */ + __u16 read_buffers; /* read buffer number */ + __u16 write_buffers; /* write buffer number */ + __u16 read_size; /* read buffer size */ + __u16 write_size; /* write buffer size */ + __u16 dev_id; /* device ident */ + __u8 packing; /* are we packing? */ + volatile __u8 queme_switch; /* gate for imed packing */ + volatile unsigned long pk_delay; /* Delay for adaptive packing */ + __u8 in_use; /* device active flag */ + struct net_device *ndev; /* backward ptr to the net dev*/ +}; + +/*--------------------------------------------------------------* +* CLAW main control block * +*---------------------------------------------------------------*/ + +struct claw_privbk { + void *p_buff_ccw; + __u32 p_buff_ccw_num; + void *p_buff_read; + __u32 p_buff_read_num; + __u32 p_buff_pages_perread; + void *p_buff_write; + __u32 p_buff_write_num; + __u32 p_buff_pages_perwrite; + long active_link_ID; /* Active logical link ID */ + struct ccwbk *p_write_free_chain; /* pointer to free ccw chain */ + struct ccwbk *p_write_active_first; /* ptr to the first write ccw */ + struct ccwbk *p_write_active_last; /* ptr to the last write ccw */ + struct ccwbk *p_read_active_first; /* ptr to the first read ccw */ + struct ccwbk *p_read_active_last; /* ptr to the last read ccw */ + struct endccw *p_end_ccw; /*ptr to ending ccw */ + struct ccwbk *p_claw_signal_blk; /* ptr to signal block */ + __u32 write_free_count; /* number of free bufs for write */ + struct net_device_stats stats; /* device status */ + struct chbk channel[2]; /* Channel control blocks */ + __u8 mtc_skipping; + int mtc_offset; + int mtc_logical_link; + void *p_mtc_envelope; + struct sk_buff *pk_skb; /* packing buffer */ + int pk_cnt; + struct clawctl ctl_bk; + struct claw_env *p_env; + __u8 system_validate_comp; + __u8 release_pend; + __u8 checksum_received_ip_pkts; + __u8 buffs_alloc; + struct endccw end_ccw; + unsigned long tbusy; + +}; + + +/************************************************************/ +/* define global constants */ +/************************************************************/ + +#define CCWBK_SIZE sizeof(struct ccwbk) + + diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c --- a/drivers/s390/net/ctcmain.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/s390/net/ctcmain.c 2005-03-30 16:58:51 -08:00 @@ -1,5 +1,5 @@ /* - * $Id: ctcmain.c,v 1.69 2005/02/27 19:46:44 ptiedem Exp $ + * $Id: ctcmain.c,v 1.72 2005/03/17 10:51:52 ptiedem Exp $ * * CTC / ESCON network driver * @@ -37,7 +37,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.69 $ + * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.72 $ * */ @@ -281,6 +281,8 @@ */ fsm_timer restart_timer; + int buffer_size; + struct channel *channel[2]; }; @@ -321,7 +323,7 @@ print_banner(void) { static int printed = 0; - char vbuf[] = "$Revision: 1.68 $"; + char vbuf[] = "$Revision: 1.72 $"; char *version = vbuf; if (printed) @@ -2704,7 +2706,7 @@ if (!priv) return -ENODEV; return sprintf(buf, "%d\n", - priv->channel[READ]->max_bufsize); + priv->buffer_size); } static ssize_t @@ -2731,6 +2733,7 @@ if (bs1 < (576 + LL_HEADER_LENGTH + 2)) return -EINVAL; + priv->buffer_size = bs1; priv->channel[READ]->max_bufsize = priv->channel[WRITE]->max_bufsize = bs1; if (!(ndev->flags & IFF_RUNNING)) @@ -2926,7 +2929,8 @@ } fsm_newstate(privptr->fsm, DEV_STATE_STOPPED); fsm_settimer(privptr->fsm, &privptr->restart_timer); - dev->mtu = CTC_BUFSIZE_DEFAULT - LL_HEADER_LENGTH - 2; + if (dev->mtu == 0) + dev->mtu = CTC_BUFSIZE_DEFAULT - LL_HEADER_LENGTH - 2; dev->hard_start_xmit = ctc_tx; dev->open = ctc_open; dev->stop = ctc_close; @@ -3051,7 +3055,7 @@ put_device(&cgdev->dev); return rc; } - + priv->buffer_size = CTC_BUFSIZE_DEFAULT; cgdev->cdev[0]->handler = ctc_irq_handler; cgdev->cdev[1]->handler = ctc_irq_handler; cgdev->dev.driver_data = priv; @@ -3132,7 +3136,7 @@ } privptr->channel[direction]->netdev = dev; privptr->channel[direction]->protocol = privptr->protocol; - privptr->channel[direction]->max_bufsize = CTC_BUFSIZE_DEFAULT; + privptr->channel[direction]->max_bufsize = privptr->buffer_size; } /* sysfs magic */ SET_NETDEV_DEV(dev, &cgdev->dev); diff -Nru a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h --- a/drivers/s390/net/qeth.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/s390/net/qeth.h 2005-03-30 16:58:47 -08:00 @@ -24,7 +24,7 @@ #include "qeth_mpc.h" -#define VERSION_QETH_H "$Revision: 1.132 $" +#define VERSION_QETH_H "$Revision: 1.135 $" #ifdef CONFIG_QETH_IPV6 #define QETH_VERSION_IPV6 ":IPv6" @@ -68,7 +68,8 @@ #define QETH_DBF_TRACE_LEN 8 #define QETH_DBF_TRACE_INDEX 2 #define QETH_DBF_TRACE_NR_AREAS 2 -#define QETH_DBF_TRACE_LEVEL 5 +#define QETH_DBF_TRACE_LEVEL 3 +extern debug_info_t *qeth_dbf_trace; #define QETH_DBF_SENSE_NAME "qeth_sense" #define QETH_DBF_SENSE_LEN 64 @@ -206,6 +207,11 @@ __u64 outbound_do_qdio_start_time; unsigned int outbound_do_qdio_cnt; unsigned int outbound_do_qdio_time; + /* eddp data */ + unsigned int large_send_bytes; + unsigned int large_send_cnt; + unsigned int sg_skbs_sent; + unsigned int sg_frags_sent; }; #endif /* CONFIG_QETH_PERF_STATS */ @@ -334,8 +340,8 @@ struct qeth_hdr_layer3 { __u8 id; __u8 flags; - __u16 inbound_checksum; - __u32 token; + __u16 inbound_checksum; /*TSO:__u16 seqno */ + __u32 token; /*TSO: __u32 reserved */ __u16 length; __u8 vlan_prio; __u8 ext_flags; @@ -386,6 +392,7 @@ enum qeth_header_ids { QETH_HEADER_TYPE_LAYER3 = 0x01, QETH_HEADER_TYPE_LAYER2 = 0x02, + QETH_HEADER_TYPE_TSO = 0x03, }; /* flags for qeth_hdr.ext_flags */ #define QETH_HDR_EXT_VLAN_FRAME 0x01 @@ -394,6 +401,7 @@ #define QETH_HDR_EXT_SRC_MAC_ADDR 0x08 #define QETH_HDR_EXT_CSUM_HDR_REQ 0x10 #define QETH_HDR_EXT_CSUM_TRANSP_REQ 0x20 +#define QETH_HDR_EXT_UDP_TSO 0x40 /*bit off for TCP*/ static inline int qeth_is_last_sbale(struct qdio_buffer_element *sbale) @@ -448,11 +456,19 @@ volatile int next_buf_to_init; } __attribute__ ((aligned(256))); +/* possible types of qeth large_send support */ +enum qeth_large_send_types { + QETH_LARGE_SEND_NO, + QETH_LARGE_SEND_EDDP, + QETH_LARGE_SEND_TSO, +}; + struct qeth_qdio_out_buffer { struct qdio_buffer *buffer; atomic_t state; volatile int next_element_to_fill; struct sk_buff_head skb_list; + struct list_head ctx_list; }; struct qeth_card; @@ -668,6 +684,14 @@ #define QETH_BROADCAST_WITH_ECHO 1 #define QETH_BROADCAST_WITHOUT_ECHO 2 +struct qeth_card_blkt { + int time_total; + int inter_packet; + int inter_packet_jumbo; +}; + + + struct qeth_card_info { unsigned short unit_addr2; unsigned short cula; @@ -686,6 +710,7 @@ int max_mtu; int broadcast_capable; int unique_id; + struct qeth_card_blkt blkt; __u32 csum_mask; }; @@ -704,6 +729,7 @@ int add_hhlen; int fake_ll; int layer2; + enum qeth_large_send_types large_send; }; /* @@ -790,6 +816,57 @@ } inline static int +qeth_realloc_headroom(struct qeth_card *card, struct sk_buff **skb, int size) +{ + struct sk_buff *new_skb = NULL; + + if (skb_headroom(*skb) < size){ + new_skb = skb_realloc_headroom(*skb, size); + if (!new_skb) { + PRINT_ERR("qeth_prepare_skb: could " + "not realloc headroom for qeth_hdr " + "on interface %s", QETH_CARD_IFNAME(card)); + return -ENOMEM; + } + *skb = new_skb; + } + return 0; +} +static inline struct sk_buff * +qeth_pskb_unshare(struct sk_buff *skb, int pri) +{ + struct sk_buff *nskb; + if (!skb_cloned(skb)) + return skb; + nskb = skb_copy(skb, pri); + kfree_skb(skb); /* free our shared copy */ + return nskb; +} + + +inline static void * +qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size) +{ + void *hdr; + + hdr = (void *) skb_push(*skb, size); + /* + * sanity check, the Linux memory allocation scheme should + * never present us cases like this one (the qdio header size plus + * the first 40 bytes of the paket cross a 4k boundary) + */ + if ((((unsigned long) hdr) & (~(PAGE_SIZE - 1))) != + (((unsigned long) hdr + size + + QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) { + PRINT_ERR("qeth_prepare_skb: misaligned " + "packet on interface %s. Discarded.", + QETH_CARD_IFNAME(card)); + return NULL; + } + return hdr; +} + +inline static int qeth_get_hlen(__u8 link_type) { #ifdef CONFIG_QETH_IPV6 @@ -830,17 +907,6 @@ #endif } } -static inline struct sk_buff * -qeth_pskb_unshare(struct sk_buff *skb, int pri) -{ - struct sk_buff *nskb; - if (!skb_cloned(skb)) - return skb; - nskb = skb_copy(skb, pri); - kfree_skb(skb); /* free our shared copy */ - return nskb; -} - inline static int qeth_get_initial_mtu_for_card(struct qeth_card * card) @@ -1083,5 +1149,14 @@ extern int qeth_realloc_buffer_pool(struct qeth_card *, int); + +extern int +qeth_set_large_send(struct qeth_card *); + +extern void +qeth_fill_header(struct qeth_card *, struct qeth_hdr *, + struct sk_buff *, int, int); +extern void +qeth_flush_buffers(struct qeth_qdio_out_q *, int, int, int); #endif /* __QETH_H__ */ diff -Nru a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/s390/net/qeth_eddp.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,643 @@ +/* + * + * linux/drivers/s390/net/qeth_eddp.c ($Revision: 1.11 $) + * + * Enhanced Device Driver Packing (EDDP) support for the qeth driver. + * + * Copyright 2004 IBM Corporation + * + * Author(s): Thomas Spatzier + * + * $Revision: 1.11 $ $Date: 2005/03/24 09:04:18 $ + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "qeth.h" +#include "qeth_mpc.h" +#include "qeth_eddp.h" + +int +qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *queue, + struct qeth_eddp_context *ctx) +{ + int index = queue->next_buf_to_fill; + int elements_needed = ctx->num_elements; + int elements_in_buffer; + int skbs_in_buffer; + int buffers_needed = 0; + + QETH_DBF_TEXT(trace, 5, "eddpcbfc"); + while(elements_needed > 0) { + buffers_needed++; + if (atomic_read(&queue->bufs[index].state) != + QETH_QDIO_BUF_EMPTY) + return -EBUSY; + + elements_in_buffer = QETH_MAX_BUFFER_ELEMENTS(queue->card) - + queue->bufs[index].next_element_to_fill; + skbs_in_buffer = elements_in_buffer / ctx->elements_per_skb; + elements_needed -= skbs_in_buffer * ctx->elements_per_skb; + index = (index + 1) % QDIO_MAX_BUFFERS_PER_Q; + } + return buffers_needed; +} + +static inline void +qeth_eddp_free_context(struct qeth_eddp_context *ctx) +{ + int i; + + QETH_DBF_TEXT(trace, 5, "eddpfctx"); + for (i = 0; i < ctx->num_pages; ++i) + free_page((unsigned long)ctx->pages[i]); + kfree(ctx->pages); + if (ctx->elements != NULL) + kfree(ctx->elements); + kfree(ctx); +} + + +static inline void +qeth_eddp_get_context(struct qeth_eddp_context *ctx) +{ + atomic_inc(&ctx->refcnt); +} + +void +qeth_eddp_put_context(struct qeth_eddp_context *ctx) +{ + if (atomic_dec_return(&ctx->refcnt) == 0) + qeth_eddp_free_context(ctx); +} + +void +qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf) +{ + struct qeth_eddp_context_reference *ref; + + QETH_DBF_TEXT(trace, 6, "eddprctx"); + while (!list_empty(&buf->ctx_list)){ + ref = list_entry(buf->ctx_list.next, + struct qeth_eddp_context_reference, list); + qeth_eddp_put_context(ref->ctx); + list_del(&ref->list); + kfree(ref); + } +} + +static inline int +qeth_eddp_buf_ref_context(struct qeth_qdio_out_buffer *buf, + struct qeth_eddp_context *ctx) +{ + struct qeth_eddp_context_reference *ref; + + QETH_DBF_TEXT(trace, 6, "eddprfcx"); + ref = kmalloc(sizeof(struct qeth_eddp_context_reference), GFP_ATOMIC); + if (ref == NULL) + return -ENOMEM; + qeth_eddp_get_context(ctx); + ref->ctx = ctx; + list_add_tail(&ref->list, &buf->ctx_list); + return 0; +} + +int +qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, + struct qeth_eddp_context *ctx, + int index) +{ + struct qeth_qdio_out_buffer *buf = NULL; + struct qdio_buffer *buffer; + int elements = ctx->num_elements; + int element = 0; + int flush_cnt = 0; + int must_refcnt = 1; + int i; + + QETH_DBF_TEXT(trace, 5, "eddpfibu"); + while (elements > 0) { + buf = &queue->bufs[index]; + if (atomic_read(&buf->state) != QETH_QDIO_BUF_EMPTY){ + /* normally this should not happen since we checked for + * available elements in qeth_check_elements_for_context + */ + if (element == 0) + return -EBUSY; + else { + PRINT_WARN("could only partially fill eddp " + "buffer!\n"); + goto out; + } + } + /* check if the whole next skb fits into current buffer */ + if ((QETH_MAX_BUFFER_ELEMENTS(queue->card) - + buf->next_element_to_fill) + < ctx->elements_per_skb){ + /* no -> go to next buffer */ + atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); + index = (index + 1) % QDIO_MAX_BUFFERS_PER_Q; + flush_cnt++; + /* new buffer, so we have to add ctx to buffer'ctx_list + * and increment ctx's refcnt */ + must_refcnt = 1; + continue; + } + if (must_refcnt){ + must_refcnt = 0; + if (qeth_eddp_buf_ref_context(buf, ctx)){ + PRINT_WARN("no memory to create eddp context " + "reference\n"); + goto out_check; + } + } + buffer = buf->buffer; + /* fill one skb into buffer */ + for (i = 0; i < ctx->elements_per_skb; ++i){ + buffer->element[buf->next_element_to_fill].addr = + ctx->elements[element].addr; + buffer->element[buf->next_element_to_fill].length = + ctx->elements[element].length; + buffer->element[buf->next_element_to_fill].flags = + ctx->elements[element].flags; + buf->next_element_to_fill++; + element++; + elements--; + } + } +out_check: + if (!queue->do_pack) { + QETH_DBF_TEXT(trace, 6, "fillbfnp"); + /* set state to PRIMED -> will be flushed */ + if (buf->next_element_to_fill > 0){ + atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); + flush_cnt++; + } + } else { +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.skbs_sent_pack++; +#endif + QETH_DBF_TEXT(trace, 6, "fillbfpa"); + if (buf->next_element_to_fill >= + QETH_MAX_BUFFER_ELEMENTS(queue->card)) { + /* + * packed buffer if full -> set state PRIMED + * -> will be flushed + */ + atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); + flush_cnt++; + } + } +out: + return flush_cnt; +} + +static inline int +qeth_get_skb_data_len(struct sk_buff *skb) +{ + int len = skb->len; + int i; + + for (i = 0; i < skb_shinfo(skb)->nr_frags; ++i) + len -= skb_shinfo(skb)->frags[i].size; + return len; +} + +static inline void +qeth_eddp_create_segment_hdrs(struct qeth_eddp_context *ctx, + struct qeth_eddp_data *eddp) +{ + u8 *page; + int page_remainder; + int page_offset; + int hdr_len; + struct qeth_eddp_element *element; + + QETH_DBF_TEXT(trace, 5, "eddpcrsh"); + page = ctx->pages[ctx->offset >> PAGE_SHIFT]; + page_offset = ctx->offset % PAGE_SIZE; + element = &ctx->elements[ctx->num_elements]; + hdr_len = eddp->nhl + eddp->thl; + /* FIXME: layer2 and VLAN !!! */ + if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) + hdr_len += ETH_HLEN; + if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) + hdr_len += VLAN_HLEN; + /* does complete header fit in current page ? */ + page_remainder = PAGE_SIZE - page_offset; + if (page_remainder < (sizeof(struct qeth_hdr) + hdr_len)){ + /* no -> go to start of next page */ + ctx->offset += page_remainder; + page = ctx->pages[ctx->offset >> PAGE_SHIFT]; + page_offset = 0; + } + memcpy(page + page_offset, &eddp->qh, sizeof(struct qeth_hdr)); + element->addr = page + page_offset; + element->length = sizeof(struct qeth_hdr); + ctx->offset += sizeof(struct qeth_hdr); + page_offset += sizeof(struct qeth_hdr); + /* add mac header (?) */ + if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ + memcpy(page + page_offset, &eddp->mac, ETH_HLEN); + element->length += ETH_HLEN; + ctx->offset += ETH_HLEN; + page_offset += ETH_HLEN; + } + /* add VLAN tag */ + if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)){ + memcpy(page + page_offset, &eddp->vlan, VLAN_HLEN); + element->length += VLAN_HLEN; + ctx->offset += VLAN_HLEN; + page_offset += VLAN_HLEN; + } + /* add network header */ + memcpy(page + page_offset, (u8 *)&eddp->nh, eddp->nhl); + element->length += eddp->nhl; + eddp->nh_in_ctx = page + page_offset; + ctx->offset += eddp->nhl; + page_offset += eddp->nhl; + /* add transport header */ + memcpy(page + page_offset, (u8 *)&eddp->th, eddp->thl); + element->length += eddp->thl; + eddp->th_in_ctx = page + page_offset; + ctx->offset += eddp->thl; +} + +static inline void +qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp, int len, + u32 *hcsum) +{ + struct skb_frag_struct *frag; + int left_in_frag; + int copy_len; + u8 *src; + + QETH_DBF_TEXT(trace, 5, "eddpcdtc"); + if (skb_shinfo(eddp->skb)->nr_frags == 0) { + memcpy(dst, eddp->skb->data + eddp->skb_offset, len); + *hcsum = csum_partial(eddp->skb->data + eddp->skb_offset, len, + *hcsum); + eddp->skb_offset += len; + } else { + while (len > 0) { + if (eddp->frag < 0) { + /* we're in skb->data */ + left_in_frag = qeth_get_skb_data_len(eddp->skb) + - eddp->skb_offset; + src = eddp->skb->data + eddp->skb_offset; + } else { + frag = &skb_shinfo(eddp->skb)-> + frags[eddp->frag]; + left_in_frag = frag->size - eddp->frag_offset; + src = (u8 *)( + (page_to_pfn(frag->page) << PAGE_SHIFT)+ + frag->page_offset + eddp->frag_offset); + } + if (left_in_frag <= 0) { + eddp->frag++; + eddp->frag_offset = 0; + continue; + } + copy_len = min(left_in_frag, len); + memcpy(dst, src, copy_len); + *hcsum = csum_partial(src, copy_len, *hcsum); + dst += copy_len; + eddp->frag_offset += copy_len; + eddp->skb_offset += copy_len; + len -= copy_len; + } + } +} + +static inline void +qeth_eddp_create_segment_data_tcp(struct qeth_eddp_context *ctx, + struct qeth_eddp_data *eddp, int data_len, + u32 hcsum) +{ + u8 *page; + int page_remainder; + int page_offset; + struct qeth_eddp_element *element; + int first_lap = 1; + + QETH_DBF_TEXT(trace, 5, "eddpcsdt"); + page = ctx->pages[ctx->offset >> PAGE_SHIFT]; + page_offset = ctx->offset % PAGE_SIZE; + element = &ctx->elements[ctx->num_elements]; + while (data_len){ + page_remainder = PAGE_SIZE - page_offset; + if (page_remainder < data_len){ + qeth_eddp_copy_data_tcp(page + page_offset, eddp, + page_remainder, &hcsum); + element->length += page_remainder; + if (first_lap) + element->flags = SBAL_FLAGS_FIRST_FRAG; + else + element->flags = SBAL_FLAGS_MIDDLE_FRAG; + ctx->num_elements++; + element++; + data_len -= page_remainder; + ctx->offset += page_remainder; + page = ctx->pages[ctx->offset >> PAGE_SHIFT]; + page_offset = 0; + element->addr = page + page_offset; + } else { + qeth_eddp_copy_data_tcp(page + page_offset, eddp, + data_len, &hcsum); + element->length += data_len; + if (!first_lap) + element->flags = SBAL_FLAGS_LAST_FRAG; + ctx->num_elements++; + ctx->offset += data_len; + data_len = 0; + } + first_lap = 0; + } + ((struct tcphdr *)eddp->th_in_ctx)->check = csum_fold(hcsum); +} + +static inline u32 +qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp, int data_len) +{ + u32 phcsum; /* pseudo header checksum */ + + QETH_DBF_TEXT(trace, 5, "eddpckt4"); + eddp->th.tcp.h.check = 0; + /* compute pseudo header checksum */ + phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr, + eddp->thl + data_len, IPPROTO_TCP, 0); + /* compute checksum of tcp header */ + return csum_partial((u8 *)&eddp->th, eddp->thl, phcsum); +} + +static inline u32 +qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp, int data_len) +{ + u32 proto; + u32 phcsum; /* pseudo header checksum */ + + QETH_DBF_TEXT(trace, 5, "eddpckt6"); + eddp->th.tcp.h.check = 0; + /* compute pseudo header checksum */ + phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr, + sizeof(struct in6_addr), 0); + phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.daddr, + sizeof(struct in6_addr), phcsum); + proto = htonl(IPPROTO_TCP); + phcsum = csum_partial((u8 *)&proto, sizeof(u32), phcsum); + return phcsum; +} + +static inline struct qeth_eddp_data * +qeth_eddp_create_eddp_data(struct qeth_hdr *qh, u8 *nh, u8 nhl, u8 *th, u8 thl) +{ + struct qeth_eddp_data *eddp; + + QETH_DBF_TEXT(trace, 5, "eddpcrda"); + eddp = kmalloc(sizeof(struct qeth_eddp_data), GFP_ATOMIC); + if (eddp){ + memset(eddp, 0, sizeof(struct qeth_eddp_data)); + eddp->nhl = nhl; + eddp->thl = thl; + memcpy(&eddp->qh, qh, sizeof(struct qeth_hdr)); + memcpy(&eddp->nh, nh, nhl); + memcpy(&eddp->th, th, thl); + eddp->frag = -1; /* initially we're in skb->data */ + } + return eddp; +} + +static inline void +__qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, + struct qeth_eddp_data *eddp) +{ + struct tcphdr *tcph; + int data_len; + u32 hcsum; + + QETH_DBF_TEXT(trace, 5, "eddpftcp"); + eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; + tcph = eddp->skb->h.th; + while (eddp->skb_offset < eddp->skb->len) { + data_len = min((int)skb_shinfo(eddp->skb)->tso_size, + (int)(eddp->skb->len - eddp->skb_offset)); + /* prepare qdio hdr */ + if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ + eddp->qh.hdr.l2.pkt_length = data_len + ETH_HLEN + + eddp->nhl + eddp->thl - + sizeof(struct qeth_hdr); +#ifdef CONFIG_QETH_VLAN + if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) + eddp->qh.hdr.l2.pkt_length += VLAN_HLEN; +#endif /* CONFIG_QETH_VLAN */ + } else + eddp->qh.hdr.l3.length = data_len + eddp->nhl + + eddp->thl; + /* prepare ip hdr */ + if (eddp->skb->protocol == ETH_P_IP){ + eddp->nh.ip4.h.tot_len = data_len + eddp->nhl + + eddp->thl; + eddp->nh.ip4.h.check = 0; + eddp->nh.ip4.h.check = + ip_fast_csum((u8 *)&eddp->nh.ip4.h, + eddp->nh.ip4.h.ihl); + } else + eddp->nh.ip6.h.payload_len = data_len + eddp->thl; + /* prepare tcp hdr */ + if (data_len == (eddp->skb->len - eddp->skb_offset)){ + /* last segment -> set FIN and PSH flags */ + eddp->th.tcp.h.fin = tcph->fin; + eddp->th.tcp.h.psh = tcph->psh; + } + if (eddp->skb->protocol == ETH_P_IP) + hcsum = qeth_eddp_check_tcp4_hdr(eddp, data_len); + else + hcsum = qeth_eddp_check_tcp6_hdr(eddp, data_len); + /* fill the next segment into the context */ + qeth_eddp_create_segment_hdrs(ctx, eddp); + qeth_eddp_create_segment_data_tcp(ctx, eddp, data_len, hcsum); + if (eddp->skb_offset >= eddp->skb->len) + break; + /* prepare headers for next round */ + if (eddp->skb->protocol == ETH_P_IP) + eddp->nh.ip4.h.id++; + eddp->th.tcp.h.seq += data_len; + } +} + +static inline int +qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, + struct sk_buff *skb, struct qeth_hdr *qhdr) +{ + struct qeth_eddp_data *eddp = NULL; + + QETH_DBF_TEXT(trace, 5, "eddpficx"); + /* create our segmentation headers and copy original headers */ + if (skb->protocol == ETH_P_IP) + eddp = qeth_eddp_create_eddp_data(qhdr, (u8 *)skb->nh.iph, + skb->nh.iph->ihl*4, + (u8 *)skb->h.th, skb->h.th->doff*4); + else + eddp = qeth_eddp_create_eddp_data(qhdr, (u8 *)skb->nh.ipv6h, + sizeof(struct ipv6hdr), + (u8 *)skb->h.th, skb->h.th->doff*4); + + if (eddp == NULL) { + QETH_DBF_TEXT(trace, 2, "eddpfcnm"); + return -ENOMEM; + } + if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { + memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); +#ifdef CONFIG_QETH_VLAN + if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { + eddp->vlan[0] = __constant_htons(skb->protocol); + eddp->vlan[1] = htons(vlan_tx_tag_get(skb)); + } +#endif /* CONFIG_QETH_VLAN */ + } + /* the next flags will only be set on the last segment */ + eddp->th.tcp.h.fin = 0; + eddp->th.tcp.h.psh = 0; + eddp->skb = skb; + /* begin segmentation and fill context */ + __qeth_eddp_fill_context_tcp(ctx, eddp); + kfree(eddp); + return 0; +} + +static inline void +qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx, struct sk_buff *skb, + int hdr_len) +{ + int skbs_per_page; + + QETH_DBF_TEXT(trace, 5, "eddpcanp"); + /* can we put multiple skbs in one page? */ + skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len); + if (skbs_per_page > 1){ + ctx->num_pages = (skb_shinfo(skb)->tso_segs + 1) / + skbs_per_page + 1; + ctx->elements_per_skb = 1; + } else { + /* no -> how many elements per skb? */ + ctx->elements_per_skb = (skb_shinfo(skb)->tso_size + hdr_len + + PAGE_SIZE) >> PAGE_SHIFT; + ctx->num_pages = ctx->elements_per_skb * + (skb_shinfo(skb)->tso_segs + 1); + } + ctx->num_elements = ctx->elements_per_skb * + (skb_shinfo(skb)->tso_segs + 1); +} + +static inline struct qeth_eddp_context * +qeth_eddp_create_context_generic(struct qeth_card *card, struct sk_buff *skb, + int hdr_len) +{ + struct qeth_eddp_context *ctx = NULL; + u8 *addr; + int i; + + QETH_DBF_TEXT(trace, 5, "creddpcg"); + /* create the context and allocate pages */ + ctx = kmalloc(sizeof(struct qeth_eddp_context), GFP_ATOMIC); + if (ctx == NULL){ + QETH_DBF_TEXT(trace, 2, "ceddpcn1"); + return NULL; + } + memset(ctx, 0, sizeof(struct qeth_eddp_context)); + ctx->type = QETH_LARGE_SEND_EDDP; + qeth_eddp_calc_num_pages(ctx, skb, hdr_len); + if (ctx->elements_per_skb > QETH_MAX_BUFFER_ELEMENTS(card)){ + QETH_DBF_TEXT(trace, 2, "ceddpcis"); + kfree(ctx); + return NULL; + } + ctx->pages = kmalloc(ctx->num_pages * sizeof(u8 *), GFP_ATOMIC); + if (ctx->pages == NULL){ + QETH_DBF_TEXT(trace, 2, "ceddpcn2"); + kfree(ctx); + return NULL; + } + memset(ctx->pages, 0, ctx->num_pages * sizeof(u8 *)); + for (i = 0; i < ctx->num_pages; ++i){ + addr = (u8 *)__get_free_page(GFP_ATOMIC); + if (addr == NULL){ + QETH_DBF_TEXT(trace, 2, "ceddpcn3"); + ctx->num_pages = i; + qeth_eddp_free_context(ctx); + return NULL; + } + memset(addr, 0, PAGE_SIZE); + ctx->pages[i] = addr; + } + ctx->elements = kmalloc(ctx->num_elements * + sizeof(struct qeth_eddp_element), GFP_ATOMIC); + if (ctx->elements == NULL){ + QETH_DBF_TEXT(trace, 2, "ceddpcn4"); + qeth_eddp_free_context(ctx); + return NULL; + } + memset(ctx->elements, 0, + ctx->num_elements * sizeof(struct qeth_eddp_element)); + /* reset num_elements; will be incremented again in fill_buffer to + * reflect number of actually used elements */ + ctx->num_elements = 0; + return ctx; +} + +static inline struct qeth_eddp_context * +qeth_eddp_create_context_tcp(struct qeth_card *card, struct sk_buff *skb, + struct qeth_hdr *qhdr) +{ + struct qeth_eddp_context *ctx = NULL; + + QETH_DBF_TEXT(trace, 5, "creddpct"); + if (skb->protocol == ETH_P_IP) + ctx = qeth_eddp_create_context_generic(card, skb, + sizeof(struct qeth_hdr) + skb->nh.iph->ihl*4 + + skb->h.th->doff*4); + else if (skb->protocol == ETH_P_IPV6) + ctx = qeth_eddp_create_context_generic(card, skb, + sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) + + skb->h.th->doff*4); + else + QETH_DBF_TEXT(trace, 2, "cetcpinv"); + + if (ctx == NULL) { + QETH_DBF_TEXT(trace, 2, "creddpnl"); + return NULL; + } + if (qeth_eddp_fill_context_tcp(ctx, skb, qhdr)){ + QETH_DBF_TEXT(trace, 2, "ceddptfe"); + qeth_eddp_free_context(ctx); + return NULL; + } + atomic_set(&ctx->refcnt, 1); + return ctx; +} + +struct qeth_eddp_context * +qeth_eddp_create_context(struct qeth_card *card, struct sk_buff *skb, + struct qeth_hdr *qhdr) +{ + QETH_DBF_TEXT(trace, 5, "creddpc"); + switch (skb->sk->sk_protocol){ + case IPPROTO_TCP: + return qeth_eddp_create_context_tcp(card, skb, qhdr); + default: + QETH_DBF_TEXT(trace, 2, "eddpinvp"); + } + return NULL; +} + + diff -Nru a/drivers/s390/net/qeth_eddp.h b/drivers/s390/net/qeth_eddp.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/s390/net/qeth_eddp.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,85 @@ +/* + * linux/drivers/s390/net/qeth_eddp.c ($Revision: 1.5 $) + * + * Header file for qeth enhanced device driver pakcing. + * + * Copyright 2004 IBM Corporation + * + * Author(s): Thomas Spatzier + * + * $Revision: 1.5 $ $Date: 2005/03/24 09:04:18 $ + * + */ +#ifndef __QETH_EDDP_H__ +#define __QETH_EDDP_H__ + +struct qeth_eddp_element { + u32 flags; + u32 length; + void *addr; +}; + +struct qeth_eddp_context { + atomic_t refcnt; + enum qeth_large_send_types type; + int num_pages; /* # of allocated pages */ + u8 **pages; /* pointers to pages */ + int offset; /* offset in ctx during creation */ + int num_elements; /* # of required 'SBALEs' */ + struct qeth_eddp_element *elements; /* array of 'SBALEs' */ + int elements_per_skb; /* # of 'SBALEs' per skb **/ +}; + +struct qeth_eddp_context_reference { + struct list_head list; + struct qeth_eddp_context *ctx; +}; + +extern struct qeth_eddp_context * +qeth_eddp_create_context(struct qeth_card *,struct sk_buff *,struct qeth_hdr *); + +extern void +qeth_eddp_put_context(struct qeth_eddp_context *); + +extern int +qeth_eddp_fill_buffer(struct qeth_qdio_out_q *,struct qeth_eddp_context *,int); + +extern void +qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *); + +extern int +qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *, + struct qeth_eddp_context *); +/* + * Data used for fragmenting a IP packet. + */ +struct qeth_eddp_data { + struct qeth_hdr qh; + struct ethhdr mac; + u16 vlan[2]; + union { + struct { + struct iphdr h; + u8 options[40]; + } ip4; + struct { + struct ipv6hdr h; + } ip6; + } nh; + u8 nhl; + void *nh_in_ctx; /* address of nh within the ctx */ + union { + struct { + struct tcphdr h; + u8 options[40]; + } tcp; + } th; + u8 thl; + void *th_in_ctx; /* address of th within the ctx */ + struct sk_buff *skb; + int skb_offset; + int frag; + int frag_offset; +} __attribute__ ((packed)); + +#endif /* __QETH_EDDP_H__ */ diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/s390/net/qeth_main.c 2005-03-30 16:58:51 -08:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.203 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.206 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.203 $ $Date: 2005/03/02 15:53:57 $ + * $Revision: 1.206 $ $Date: 2005/03/24 09:04:18 $ * * 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 @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -76,8 +77,10 @@ #include "qeth.h" #include "qeth_mpc.h" #include "qeth_fs.h" +#include "qeth_eddp.h" +#include "qeth_tso.h" -#define VERSION_QETH_C "$Revision: 1.203 $" +#define VERSION_QETH_C "$Revision: 1.206 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -87,7 +90,7 @@ static debug_info_t *qeth_dbf_data = NULL; static debug_info_t *qeth_dbf_misc = NULL; static debug_info_t *qeth_dbf_control = NULL; -static debug_info_t *qeth_dbf_trace = NULL; +debug_info_t *qeth_dbf_trace = NULL; static debug_info_t *qeth_dbf_sense = NULL; static debug_info_t *qeth_dbf_qerr = NULL; @@ -1071,6 +1074,35 @@ } static int +is_1920_device (struct qeth_card *card) +{ + int single_queue = 0; + struct ccw_device *ccwdev; + struct channelPath_dsc { + u8 flags; + u8 lsn; + u8 desc; + u8 chpid; + u8 swla; + u8 zeroes; + u8 chla; + u8 chpp; + } *chp_dsc; + + QETH_DBF_TEXT(setup, 2, "chk_1920"); + + ccwdev = card->data.ccwdev; + chp_dsc = (struct channelPath_dsc *)ccw_device_get_chp_desc(ccwdev, 0); + if (chp_dsc != NULL) { + /* CHPP field bit 6 == 1 -> single queue */ + single_queue = ((chp_dsc->chpp & 0x02) == 0x02); + kfree(chp_dsc); + } + QETH_DBF_TEXT_(setup, 2, "rc:%x", single_queue); + return single_queue; +} + +static int qeth_determine_card_type(struct qeth_card *card) { int i = 0; @@ -1081,7 +1113,14 @@ if ((CARD_RDEV(card)->id.dev_type == known_devices[i][2]) && (CARD_RDEV(card)->id.dev_model == known_devices[i][3])) { card->info.type = known_devices[i][4]; - card->qdio.no_out_queues = known_devices[i][8]; + if (is_1920_device(card)) { + PRINT_INFO("Priority Queueing not able " + "due to hardware limitations!\n"); + card->qdio.no_out_queues = 1; + card->qdio.default_out_queue = 0; + } else { + card->qdio.no_out_queues = known_devices[i][8]; + } card->info.is_multicast_different = known_devices[i][9]; return 0; } @@ -1112,6 +1151,10 @@ QETH_DBF_TEXT_(setup, 2, "1err%d", -ENOMEM); return -ENOMEM; } + card->read.ccwdev = gdev->cdev[0]; + card->write.ccwdev = gdev->cdev[1]; + card->data.ccwdev = gdev->cdev[2]; + if ((rc = qeth_setup_card(card))){ QETH_DBF_TEXT_(setup, 2, "2err%d", rc); put_device(dev); @@ -1130,9 +1173,6 @@ qeth_free_card(card); return rc; } - card->read.ccwdev = gdev->cdev[0]; - card->write.ccwdev = gdev->cdev[1]; - card->data.ccwdev = gdev->cdev[2]; if ((rc = qeth_determine_card_type(card))){ PRINT_WARN("%s: not a valid card type\n", __func__); QETH_DBF_TEXT_(setup, 2, "3err%d", rc); @@ -1711,7 +1751,7 @@ (unsigned long)iob); } if (cmd) - reply->rc = (s16) cmd->hdr.return_code; + reply->rc = (u16) cmd->hdr.return_code; else if (iob->rc) reply->rc = iob->rc; if (keep_reply) { @@ -2424,14 +2464,15 @@ if (buf->buffer->element[0].flags & 0x40) atomic_dec(&queue->set_pci_flags_count); + while ((skb = skb_dequeue(&buf->skb_list))){ + atomic_dec(&skb->users); + dev_kfree_skb_any(skb); + } + qeth_eddp_buf_release_contexts(buf); for(i = 0; i < QETH_MAX_BUFFER_ELEMENTS(queue->card); ++i){ buf->buffer->element[i].length = 0; buf->buffer->element[i].addr = NULL; buf->buffer->element[i].flags = 0; - while ((skb = skb_dequeue(&buf->skb_list))){ - atomic_dec(&skb->users); - dev_kfree_skb_any(skb); - } } buf->next_element_to_fill = 0; atomic_set(&buf->state, QETH_QDIO_BUF_EMPTY); @@ -2581,7 +2622,7 @@ return QETH_SEND_ERROR_LINK_FAILURE; } -static inline void +void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, int index, int count) { @@ -2622,9 +2663,6 @@ atomic_inc(&queue->set_pci_flags_count); buf->buffer->element[0].flags |= 0x40; } -#ifdef CONFIG_QETH_PERF_STATS - queue->card->perf_stats.bufs_sent_pack++; -#endif } } @@ -2746,6 +2784,7 @@ { int index; int flush_cnt = 0; + int q_was_packing = 0; /* * check if weed have to switch to non-packing mode or if @@ -2760,20 +2799,22 @@ * do_send_packet. So, we check if there is a * packing buffer to be flushed here. */ - /* TODO: try if we get a performance improvement - * by calling netif_stop_queue here */ - /* save start index for flushing */ + netif_stop_queue(queue->card->dev); index = queue->next_buf_to_fill; + q_was_packing = queue->do_pack; flush_cnt += qeth_switch_to_nonpacking_if_needed(queue); if (!flush_cnt && !atomic_read(&queue->set_pci_flags_count)) flush_cnt += qeth_flush_buffers_on_no_pci(queue); - /* were done with updating critical queue members */ - atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); - /* flushing can be done outside the lock */ +#ifdef CONFIG_QETH_PERF_STATS + if (q_was_packing) + queue->card->perf_stats.bufs_sent_pack += + flush_cnt; +#endif if (flush_cnt) qeth_flush_buffers(queue, 1, index, flush_cnt); + atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); } } } @@ -2803,7 +2844,6 @@ return; } } - #ifdef CONFIG_QETH_PERF_STATS card->perf_stats.outbound_handler_cnt++; card->perf_stats.outbound_handler_start_time = qeth_get_micros(); @@ -2824,24 +2864,16 @@ if (card->info.type != QETH_CARD_TYPE_IQD) qeth_check_outbound_queue(queue); - netif_wake_queue(card->dev); + netif_wake_queue(queue->card->dev); #ifdef CONFIG_QETH_PERF_STATS card->perf_stats.outbound_handler_time += qeth_get_micros() - card->perf_stats.outbound_handler_start_time; #endif } -static char* -qeth_create_qib_param_field(struct qeth_card *card) +static void +qeth_create_qib_param_field(struct qeth_card *card, char *param_field) { - char *param_field; - - param_field = kmalloc(QDIO_MAX_BUFFERS_PER_Q * sizeof(char), - GFP_KERNEL); - if (!param_field) - return NULL; - - memset(param_field, 0, QDIO_MAX_BUFFERS_PER_Q * sizeof(char)); param_field[0] = _ascebc['P']; param_field[1] = _ascebc['C']; @@ -2850,8 +2882,18 @@ *((unsigned int *) (¶m_field[4])) = QETH_PCI_THRESHOLD_A(card); *((unsigned int *) (¶m_field[8])) = QETH_PCI_THRESHOLD_B(card); *((unsigned int *) (¶m_field[12])) = QETH_PCI_TIMER_VALUE(card); +} - return param_field; +static void +qeth_create_qib_param_field_blkt(struct qeth_card *card, char *param_field) +{ + param_field[16] = _ascebc['B']; + param_field[17] = _ascebc['L']; + param_field[18] = _ascebc['K']; + param_field[19] = _ascebc['T']; + *((unsigned int *) (¶m_field[20])) = card->info.blkt.time_total; + *((unsigned int *) (¶m_field[24])) = card->info.blkt.inter_packet; + *((unsigned int *) (¶m_field[28])) = card->info.blkt.inter_packet_jumbo; } static void @@ -2901,7 +2943,7 @@ void *ptr; int i, j; - QETH_DBF_TEXT(trace,5,"clwkpool"); + QETH_DBF_TEXT(trace,5,"alocpool"); for (i = 0; i < card->qdio.init_pool.buf_count; ++i){ pool_entry = kmalloc(sizeof(*pool_entry), GFP_KERNEL); if (!pool_entry){ @@ -2989,12 +3031,13 @@ QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *)); memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q)); card->qdio.out_qs[i]->queue_no = i; - /* give inbound qeth_qdio_buffers their qdio_buffers */ + /* give outbound qeth_qdio_buffers their qdio_buffers */ for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j){ card->qdio.out_qs[i]->bufs[j].buffer = &card->qdio.out_qs[i]->qdio_bufs[j]; skb_queue_head_init(&card->qdio.out_qs[i]->bufs[j]. skb_list); + INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list); } } card->qdio.state = QETH_QDIO_ALLOCATED; @@ -3111,10 +3154,17 @@ int rc; QETH_DBF_TEXT(setup, 2, "qdioest"); - qib_param_field = qeth_create_qib_param_field(card); - if (!qib_param_field) + + qib_param_field = kmalloc(QDIO_MAX_BUFFERS_PER_Q * sizeof(char), + GFP_KERNEL); + if (!qib_param_field) return -ENOMEM; + memset(qib_param_field, 0, QDIO_MAX_BUFFERS_PER_Q * sizeof(char)); + + qeth_create_qib_param_field(card, qib_param_field); + qeth_create_qib_param_field_blkt(card, qib_param_field); + in_sbal_ptrs = kmalloc(QDIO_MAX_BUFFERS_PER_Q * sizeof(void *), GFP_KERNEL); if (!in_sbal_ptrs) { @@ -3431,24 +3481,19 @@ card->perf_stats.outbound_cnt++; card->perf_stats.outbound_start_time = qeth_get_micros(); #endif - /* - * We only call netif_stop_queue in case of errors. Since we've - * got our own synchronization on queues we can keep the stack's - * queue running. - */ - if ((rc = qeth_send_packet(card, skb))){ + netif_stop_queue(dev); + if ((rc = qeth_send_packet(card, skb))) { if (rc == -EBUSY) { - netif_stop_queue(dev); - rc = NETDEV_TX_BUSY; + return NETDEV_TX_BUSY; } else { card->stats.tx_errors++; card->stats.tx_dropped++; dev_kfree_skb_any(skb); - /* set to OK; otherwise ksoftirqd goes to 100% */ + /*set to OK; otherwise ksoftirqd goes to 100% */ rc = NETDEV_TX_OK; } } - + netif_wake_queue(dev); #ifdef CONFIG_QETH_PERF_STATS card->perf_stats.outbound_time += qeth_get_micros() - card->perf_stats.outbound_start_time; @@ -3642,8 +3687,9 @@ /* TODO: IPv6!!! */ } return card->qdio.default_out_queue; + case 1: /* fallthrough for single-out-queue 1920-device */ default: - return 0; + return card->qdio.default_out_queue; } } @@ -3664,22 +3710,16 @@ qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, struct qeth_hdr **hdr, int ipv) { - struct sk_buff *new_skb; + int rc = 0; #ifdef CONFIG_QETH_VLAN u16 *tag; #endif QETH_DBF_TEXT(trace, 6, "prepskb"); - if (skb_headroom(*skb) < sizeof(struct qeth_hdr)){ - new_skb = skb_realloc_headroom(*skb, sizeof(struct qeth_hdr)); - if (!new_skb) { - PRINT_ERR("qeth_prepare_skb: could " - "not realloc headroom for qeth_hdr " - "on interface %s", QETH_CARD_IFNAME(card)); - return -ENOMEM; - } - *skb = new_skb; - } + + rc = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr)); + if (rc) + return rc; #ifdef CONFIG_QETH_VLAN if (card->vlangrp && vlan_tx_tag_present(*skb) && ((ipv == 6) || card->options.layer2) ) { @@ -3701,20 +3741,10 @@ *(tag + 1) = htons(vlan_tx_tag_get(*skb)); } #endif - *hdr = (struct qeth_hdr *) skb_push(*skb, sizeof(struct qeth_hdr)); - /* - * sanity check, the Linux memory allocation scheme should - * never present us cases like this one (the 32bytes header plus - * the first 40 bytes of the paket cross a 4k boundary) - */ - if ((((unsigned long) *hdr) & (~(PAGE_SIZE - 1))) != - (((unsigned long) *hdr + sizeof(struct qeth_hdr) + - QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) { - PRINT_ERR("qeth_prepare_skb: misaligned " - "packet on interface %s. Discarded.", - QETH_CARD_IFNAME(card)); + *hdr = (struct qeth_hdr *) + qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); + if (hdr == NULL) return -EINVAL; - } return 0; } @@ -3806,12 +3836,13 @@ #endif } -static inline void +void qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, struct sk_buff *skb, int ipv, int cast_type) { QETH_DBF_TEXT(trace, 6, "fillhdr"); + memset(hdr, 0, sizeof(struct qeth_hdr)); if (card->options.layer2) { qeth_layer2_fill_header(card, hdr, skb, cast_type); return; @@ -3862,21 +3893,59 @@ } } -static inline int -qeth_fill_buffer(struct qeth_qdio_out_q *queue, struct qeth_qdio_out_buffer *buf, - char *data, struct sk_buff *skb) +static inline void +__qeth_fill_buffer_frag(struct sk_buff *skb, struct qdio_buffer *buffer, + int *next_element_to_fill) +{ + int length = skb->len; + struct skb_frag_struct *frag; + int fragno; + unsigned long addr; + int element; + int first_lap = 1; + + fragno = skb_shinfo(skb)->nr_frags; /* start with last frag */ + element = *next_element_to_fill + fragno; + while (length > 0) { + if (fragno > 0) { + frag = &skb_shinfo(skb)->frags[fragno - 1]; + addr = (page_to_pfn(frag->page) << PAGE_SHIFT) + + frag->page_offset; + buffer->element[element].addr = (char *)addr; + buffer->element[element].length = frag->size; + length -= frag->size; + if (first_lap) + buffer->element[element].flags = + SBAL_FLAGS_LAST_FRAG; + else + buffer->element[element].flags = + SBAL_FLAGS_MIDDLE_FRAG; + } else { + buffer->element[element].addr = skb->data; + buffer->element[element].length = length; + length = 0; + buffer->element[element].flags = + SBAL_FLAGS_FIRST_FRAG; + } + element--; + fragno--; + first_lap = 0; + } + *next_element_to_fill += skb_shinfo(skb)->nr_frags + 1; +} + +static inline void +__qeth_fill_buffer(struct sk_buff *skb, struct qdio_buffer *buffer, + int *next_element_to_fill) { - struct qdio_buffer *buffer; int length = skb->len; int length_here; int element; + char *data; int first_lap = 1; - QETH_DBF_TEXT(trace, 6, "qdfillbf"); - buffer = buf->buffer; - atomic_inc(&skb->users); - skb_queue_tail(&buf->skb_list, skb); - element = buf->next_element_to_fill; + element = *next_element_to_fill; + data = skb->data; while (length > 0) { /* length_here is the remaining amount of data in this page */ length_here = PAGE_SIZE - ((unsigned long) data % PAGE_SIZE); @@ -3903,11 +3972,33 @@ element++; first_lap = 0; } - buf->next_element_to_fill = element; + *next_element_to_fill = element; +} + +static inline int +qeth_fill_buffer(struct qeth_qdio_out_q *queue, + struct qeth_qdio_out_buffer *buf, + struct sk_buff *skb) +{ + struct qdio_buffer *buffer; + int flush_cnt = 0; + + QETH_DBF_TEXT(trace, 6, "qdfillbf"); + buffer = buf->buffer; + atomic_inc(&skb->users); + skb_queue_tail(&buf->skb_list, skb); + if (skb_shinfo(skb)->nr_frags == 0) + __qeth_fill_buffer(skb, buffer, + (int *)&buf->next_element_to_fill); + else + __qeth_fill_buffer_frag(skb, buffer, + (int *)&buf->next_element_to_fill); + if (!queue->do_pack) { QETH_DBF_TEXT(trace, 6, "fillbfnp"); /* set state to PRIMED -> will be flushed */ atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); + flush_cnt = 1; } else { QETH_DBF_TEXT(trace, 6, "fillbfpa"); #ifdef CONFIG_QETH_PERF_STATS @@ -3920,17 +4011,21 @@ * -> will be flushed */ atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); + flush_cnt = 1; } } - return 0; + return flush_cnt; } static inline int qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue, struct sk_buff *skb, struct qeth_hdr *hdr, - int elements_needed) + int elements_needed, + struct qeth_eddp_context *ctx) { struct qeth_qdio_out_buffer *buffer; + int buffers_needed = 0; + int flush_cnt = 0; int index; QETH_DBF_TEXT(trace, 6, "dosndpfa"); @@ -3951,22 +4046,42 @@ atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); return -EBUSY; } - queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % - QDIO_MAX_BUFFERS_PER_Q; + if (ctx == NULL) + queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % + QDIO_MAX_BUFFERS_PER_Q; + else { + buffers_needed = qeth_eddp_check_buffers_for_context(queue,ctx); + if (buffers_needed < 0) { + card->stats.tx_dropped++; + atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); + return -EBUSY; + } + queue->next_buf_to_fill = + (queue->next_buf_to_fill + buffers_needed) % + QDIO_MAX_BUFFERS_PER_Q; + } atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); - qeth_fill_buffer(queue, buffer, (char *)hdr, skb); - qeth_flush_buffers(queue, 0, index, 1); + if (ctx == NULL) { + qeth_fill_buffer(queue, buffer, skb); + qeth_flush_buffers(queue, 0, index, 1); + } else { + flush_cnt = qeth_eddp_fill_buffer(queue, ctx, index); + WARN_ON(buffers_needed != flush_cnt); + qeth_flush_buffers(queue, 0, index, flush_cnt); + } return 0; } static inline int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, struct sk_buff *skb, struct qeth_hdr *hdr, - int elements_needed) + int elements_needed, struct qeth_eddp_context *ctx) { struct qeth_qdio_out_buffer *buffer; int start_index; int flush_count = 0; + int do_pack = 0; + int tmp; int rc = 0; QETH_DBF_TEXT(trace, 6, "dosndpkt"); @@ -3989,34 +4104,56 @@ /* check if we need to switch packing state of this queue */ qeth_switch_to_packing_if_needed(queue); if (queue->do_pack){ - /* does packet fit in current buffer? */ - if((QETH_MAX_BUFFER_ELEMENTS(card) - - buffer->next_element_to_fill) < elements_needed){ - /* ... no -> set state PRIMED */ - atomic_set(&buffer->state, QETH_QDIO_BUF_PRIMED); - flush_count++; - queue->next_buf_to_fill = - (queue->next_buf_to_fill + 1) % - QDIO_MAX_BUFFERS_PER_Q; - buffer = &queue->bufs[queue->next_buf_to_fill]; - /* we did a step forward, so check buffer state again */ - if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY){ + do_pack = 1; + if (ctx == NULL) { + /* does packet fit in current buffer? */ + if((QETH_MAX_BUFFER_ELEMENTS(card) - + buffer->next_element_to_fill) < elements_needed){ + /* ... no -> set state PRIMED */ + atomic_set(&buffer->state,QETH_QDIO_BUF_PRIMED); + flush_count++; + queue->next_buf_to_fill = + (queue->next_buf_to_fill + 1) % + QDIO_MAX_BUFFERS_PER_Q; + buffer = &queue->bufs[queue->next_buf_to_fill]; + /* we did a step forward, so check buffer state + * again */ + if (atomic_read(&buffer->state) != + QETH_QDIO_BUF_EMPTY){ + card->stats.tx_dropped++; + qeth_flush_buffers(queue, 0, start_index, flush_count); + atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); + return -EBUSY; + } + } + } else { + /* check if we have enough elements (including following + * free buffers) to handle eddp context */ + if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){ + printk("eddp tx_dropped 1\n"); card->stats.tx_dropped++; - /* return EBUSY because we sent old packet, not - * the current one */ rc = -EBUSY; - atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); goto out; } } } - qeth_fill_buffer(queue, buffer, (char *)hdr, skb); - if (atomic_read(&buffer->state) == QETH_QDIO_BUF_PRIMED){ - /* next time fill the next buffer */ - flush_count++; - queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % - QDIO_MAX_BUFFERS_PER_Q; + if (ctx == NULL) + tmp = qeth_fill_buffer(queue, buffer, skb); + else { + tmp = qeth_eddp_fill_buffer(queue,ctx,queue->next_buf_to_fill); + if (tmp < 0) { + printk("eddp tx_dropped 2\n"); + card->stats.tx_dropped++; + rc = - EBUSY; + goto out; + } } + queue->next_buf_to_fill = (queue->next_buf_to_fill + tmp) % + QDIO_MAX_BUFFERS_PER_Q; + flush_count += tmp; +out: + if (flush_count) + qeth_flush_buffers(queue, 0, start_index, flush_count); /* * queue->state will go from LOCKED -> UNLOCKED or from * LOCKED_FLUSH -> LOCKED if output_handler wanted to 'notify' us @@ -4024,6 +4161,8 @@ * In that case we will enter this loop */ while (atomic_dec_return(&queue->state)){ + flush_count = 0; + start_index = queue->next_buf_to_fill; /* check if we can go back to non-packing state */ flush_count += qeth_switch_to_nonpacking_if_needed(queue); /* @@ -4032,11 +4171,14 @@ */ if (!flush_count && !atomic_read(&queue->set_pci_flags_count)) flush_count += qeth_flush_buffers_on_no_pci(queue); + if (flush_count) + qeth_flush_buffers(queue, 0, start_index, flush_count); } /* at this point the queue is UNLOCKED again */ -out: - if (flush_count) - qeth_flush_buffers(queue, 0, start_index, flush_count); +#ifdef CONFIG_QETH_PERF_STATS + if (do_pack) + queue->card->perf_stats.bufs_sent_pack += flush_count; +#endif /* CONFIG_QETH_PERF_STATS */ return rc; } @@ -4048,7 +4190,9 @@ int cast_type; struct qeth_qdio_out_q *queue; struct qeth_hdr *hdr; - int elements_needed; + int elements_needed = 0; + enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; + struct qeth_eddp_context *ctx = NULL; int rc; QETH_DBF_TEXT(trace, 6, "sendpkt"); @@ -4065,32 +4209,73 @@ } } cast_type = qeth_get_cast_type(card, skb); + if ((cast_type == RTN_BROADCAST) && (card->info.broadcast_capable == 0)){ + card->stats.tx_dropped++; + card->stats.tx_errors++; + dev_kfree_skb_any(skb); + return NETDEV_TX_OK; + } queue = card->qdio.out_qs [qeth_get_priority_queue(card, skb, ipv, cast_type)]; + if (skb_shinfo(skb)->tso_size) + large_send = card->options.large_send; + if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))){ - QETH_DBF_TEXT_(trace, 4, "1err%d", rc); + QETH_DBF_TEXT_(trace, 4, "pskbe%d", rc); return rc; } + /*are we able to do TSO ? If so ,prepare and send it from here */ + if ((large_send == QETH_LARGE_SEND_TSO) && + (cast_type == RTN_UNSPEC)) { + rc = qeth_tso_send_packet(card, skb, queue, + ipv, cast_type); + goto do_statistics; + } + qeth_fill_header(card, hdr, skb, ipv, cast_type); - elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) + skb->len) - >> PAGE_SHIFT); - if (elements_needed > QETH_MAX_BUFFER_ELEMENTS(card)){ - PRINT_ERR("qeth_do_send_packet: invalid size of " - "IP packet. Discarded."); - return -EINVAL; + if (large_send == QETH_LARGE_SEND_EDDP) { + ctx = qeth_eddp_create_context(card, skb, hdr); + if (ctx == NULL) { + PRINT_WARN("could not create eddp context\n"); + return -EINVAL; + } + } else { + elements_needed = qeth_get_elements_no(card,(void*) hdr, skb); + if (!elements_needed) + return -EINVAL; } if (card->info.type != QETH_CARD_TYPE_IQD) rc = qeth_do_send_packet(card, queue, skb, hdr, - elements_needed); + elements_needed, ctx); else rc = qeth_do_send_packet_fast(card, queue, skb, hdr, - elements_needed); - + elements_needed, ctx); +do_statistics: if (!rc){ card->stats.tx_packets++; card->stats.tx_bytes += skb->len; +#ifdef CONFIG_QETH_PERF_STATS + if (skb_shinfo(skb)->tso_size) { + card->perf_stats.large_send_bytes += skb->len; + card->perf_stats.large_send_cnt++; + } + if (skb_shinfo(skb)->nr_frags > 0){ + card->perf_stats.sg_skbs_sent++; + /* nr_frags + skb->data */ + card->perf_stats.sg_frags_sent += + skb_shinfo(skb)->nr_frags + 1; + } +#endif /* CONFIG_QETH_PERF_STATS */ + } + if (ctx != NULL) { + /* drop creator's reference */ + qeth_eddp_put_context(ctx); + /* free skb; it's not referenced by a buffer */ + if (rc == 0) + dev_kfree_skb_any(skb); + } return rc; } @@ -4945,6 +5130,7 @@ static void qeth_free_vlan_addresses6(struct qeth_card *card, unsigned short vid) { +#ifdef CONFIG_QETH_IPV6 struct inet6_dev *in6_dev; struct inet6_ifaddr *ifa; struct qeth_ipaddr *addr; @@ -4967,6 +5153,7 @@ } } in6_dev_put(in6_dev); +#endif /* CONFIG_QETH_IPV6 */ } static void @@ -5566,7 +5753,7 @@ qeth_layer3_register_addr_entry(struct qeth_card *card, struct qeth_ipaddr *addr) { - //char buf[50]; + char buf[50]; int rc; int cnt = 3; @@ -5592,12 +5779,9 @@ } while ((--cnt > 0) && rc); if (rc){ QETH_DBF_TEXT(trace, 2, "FAILED"); - /* TODO: re-activate this warning as soon as we have a - * clean mirco code qeth_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf); - PRINT_WARN("Could not register IP address %s (rc=%x)\n", - buf, rc); - */ + PRINT_WARN("Could not register IP address %s (rc=0x%x/%d)\n", + buf, rc, rc); } return rc; } @@ -5655,6 +5839,111 @@ return qeth_layer3_deregister_addr_entry(card, addr); } +static u32 +qeth_ethtool_get_tx_csum(struct net_device *dev) +{ + /* We may need to say that we support tx csum offload if + * we do EDDP or TSO. There are discussions going on to + * enforce rules in the stack and in ethtool that make + * SG and TSO depend on HW_CSUM. At the moment there are + * no such rules.... + * If we say yes here, we have to checksum outbound packets + * any time. */ + return 0; +} + +static int +qeth_ethtool_set_tx_csum(struct net_device *dev, u32 data) +{ + return -EINVAL; +} + +static u32 +qeth_ethtool_get_rx_csum(struct net_device *dev) +{ + struct qeth_card *card = (struct qeth_card *)dev->priv; + + return (card->options.checksum_type == HW_CHECKSUMMING); +} + +static int +qeth_ethtool_set_rx_csum(struct net_device *dev, u32 data) +{ + struct qeth_card *card = (struct qeth_card *)dev->priv; + + if ((card->state != CARD_STATE_DOWN) && + (card->state != CARD_STATE_RECOVER)) + return -EPERM; + if (data) + card->options.checksum_type = HW_CHECKSUMMING; + else + card->options.checksum_type = SW_CHECKSUMMING; + return 0; +} + +static u32 +qeth_ethtool_get_sg(struct net_device *dev) +{ + struct qeth_card *card = (struct qeth_card *)dev->priv; + + return ((card->options.large_send != QETH_LARGE_SEND_NO) && + (dev->features & NETIF_F_SG)); +} + +static int +qeth_ethtool_set_sg(struct net_device *dev, u32 data) +{ + struct qeth_card *card = (struct qeth_card *)dev->priv; + + if (data) { + if (card->options.large_send != QETH_LARGE_SEND_NO) + dev->features |= NETIF_F_SG; + else { + dev->features &= ~NETIF_F_SG; + return -EINVAL; + } + } else + dev->features &= ~NETIF_F_SG; + return 0; +} + +static u32 +qeth_ethtool_get_tso(struct net_device *dev) +{ + struct qeth_card *card = (struct qeth_card *)dev->priv; + + return ((card->options.large_send != QETH_LARGE_SEND_NO) && + (dev->features & NETIF_F_TSO)); +} + +static int +qeth_ethtool_set_tso(struct net_device *dev, u32 data) +{ + struct qeth_card *card = (struct qeth_card *)dev->priv; + + if (data) { + if (card->options.large_send != QETH_LARGE_SEND_NO) + dev->features |= NETIF_F_TSO; + else { + dev->features &= ~NETIF_F_TSO; + return -EINVAL; + } + } else + dev->features &= ~NETIF_F_TSO; + return 0; +} + +static struct ethtool_ops qeth_ethtool_ops = { + .get_tx_csum = qeth_ethtool_get_tx_csum, + .set_tx_csum = qeth_ethtool_set_tx_csum, + .get_rx_csum = qeth_ethtool_get_rx_csum, + .set_rx_csum = qeth_ethtool_set_rx_csum, + .get_sg = qeth_ethtool_get_sg, + .set_sg = qeth_ethtool_set_sg, + .get_tso = qeth_ethtool_get_tso, + .set_tso = qeth_ethtool_set_tso, +}; + static int qeth_netdev_init(struct net_device *dev) { @@ -5704,6 +5993,8 @@ dev->addr_len = OSA_ADDR_LEN; dev->mtu = card->info.initial_mtu; + SET_ETHTOOL_OPS(dev, &qeth_ethtool_ops); + SET_MODULE_OWNER(dev); return 0; } @@ -6095,6 +6386,9 @@ card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; #endif } + QETH_DBF_TEXT(setup, 2, "suppenbl"); + QETH_DBF_TEXT_(setup, 2, "%x",cmd->hdr.ipa_supported); + QETH_DBF_TEXT_(setup, 2, "%x",cmd->hdr.ipa_enabled); return 0; } @@ -6495,26 +6789,33 @@ return rc; } -/* -static inline void -qeth_print_ipassist_status(struct qeth_card *card) +static int +qeth_start_ipa_tso(struct qeth_card *card) { - char buf[255]; - int offset = 0; + int rc; + + QETH_DBF_TEXT(trace,3,"sttso"); - offset += sprintf(buf, "IPAssist options of %s: ", card->info.if_name); - if (qeth_is_enabled(card, IPA_ARP_PROCESSING)) - offset += sprintf(buf+offset, "ARP "); - if (qeth_is_enabled(card, IPA_IP_FRAGMENTATION)) - offset += sprintf(buf+offset, "IP_FRAG"); - if (qeth_is_enabled(card, IPA_SOURCE_MAC)) - offset += sprintf(buf+offset, "SRC_MAC"); - if (qeth_is_enabled(card, IPA_FULL_VLAN)) - offset += sprintf(buf+offset, "VLAN"); - if (qeth_is_enabled(card, IPA_VLAN_PRIO)) - offset += sprintf(buf+offset, "VLAN_PRIO"); + if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) { + PRINT_WARN("Outbound TSO not supported on %s\n", + QETH_CARD_IFNAME(card)); + rc = -EOPNOTSUPP; + } else { + rc = qeth_send_simple_setassparms(card, IPA_OUTBOUND_TSO, + IPA_CMD_ASS_START,0); + if (rc) + PRINT_WARN("Could not start outbound TSO " + "assist on %s: rc=%i\n", + QETH_CARD_IFNAME(card), rc); + else + PRINT_INFO("Outbound TSO enabled\n"); + } + if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)){ + card->options.large_send = QETH_LARGE_SEND_NO; + card->dev->features &= ~ (NETIF_F_TSO | NETIF_F_SG); + } + return rc; } -*/ static int qeth_start_ipassists(struct qeth_card *card) @@ -6528,6 +6829,7 @@ qeth_start_ipa_ipv6(card); /* go on*/ qeth_start_ipa_broadcast(card); /* go on*/ qeth_start_ipa_checksum(card); /* go on*/ + qeth_start_ipa_tso(card); /* go on*/ return 0; } @@ -6639,6 +6941,40 @@ return rc; } +int +qeth_set_large_send(struct qeth_card *card) +{ + int rc = 0; + + if (card->dev == NULL) + return 0; + + netif_stop_queue(card->dev); + switch (card->options.large_send) { + case QETH_LARGE_SEND_EDDP: + card->dev->features |= NETIF_F_TSO | NETIF_F_SG; + break; + case QETH_LARGE_SEND_TSO: + if (qeth_is_supported(card, IPA_OUTBOUND_TSO)){ + card->dev->features |= NETIF_F_TSO | NETIF_F_SG; + } else { + PRINT_WARN("TSO not supported on %s. " + "large_send set to 'no'.\n", + card->dev->name); + card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); + card->options.large_send = QETH_LARGE_SEND_NO; + rc = -EOPNOTSUPP; + } + break; + default: /* includes QETH_LARGE_SEND_NO */ + card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); + break; + } + + netif_wake_queue(card->dev); + return rc; +} + /* * softsetup card: init IPA stuff */ @@ -6676,6 +7012,12 @@ #endif goto out; } + if ((card->options.large_send == QETH_LARGE_SEND_EDDP) || + (card->options.large_send == QETH_LARGE_SEND_TSO)) + card->dev->features |= NETIF_F_TSO | NETIF_F_SG; + else + card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); + if ((rc = qeth_setadapter_parms(card))) QETH_DBF_TEXT_(setup, 2, "2err%d", rc); if ((rc = qeth_start_ipassists(card))) diff -Nru a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h --- a/drivers/s390/net/qeth_mpc.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/s390/net/qeth_mpc.h 2005-03-30 16:58:48 -08:00 @@ -14,7 +14,7 @@ #include -#define VERSION_QETH_MPC_H "$Revision: 1.38 $" +#define VERSION_QETH_MPC_H "$Revision: 1.43 $" extern const char *VERSION_QETH_MPC_C; @@ -182,6 +182,9 @@ IPA_FULL_VLAN = 0x00004000L, IPA_SOURCE_MAC = 0x00010000L, IPA_OSA_MC_ROUTER = 0x00020000L, + IPA_QUERY_ARP_ASSIST = 0x00040000L, + IPA_INBOUND_TSO = 0x00080000L, + IPA_OUTBOUND_TSO = 0x00100000L, }; /* SETIP/DELIP IPA Command: ***************************************************/ diff -Nru a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c --- a/drivers/s390/net/qeth_proc.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/s390/net/qeth_proc.c 2005-03-30 16:58:49 -08:00 @@ -236,6 +236,14 @@ card->perf_stats.skbs_sent_pack, card->perf_stats.bufs_sent_pack ); + seq_printf(s, " Skbs sent in SG mode : %i\n" + " Skb fragments sent in SG mode : %i\n\n", + card->perf_stats.sg_skbs_sent, + card->perf_stats.sg_frags_sent); + seq_printf(s, " large_send tx (in Kbytes) : %i\n" + " large_send count : %i\n\n", + card->perf_stats.large_send_bytes >> 10, + card->perf_stats.large_send_cnt); seq_printf(s, " Packing state changes no pkg.->packing : %i/%i\n" " Watermarks L/H : %i/%i\n" " Current buffer usage (outbound q's) : " @@ -262,7 +270,7 @@ " Outbound time (in us, incl QDIO) : %i\n" " Outbound count : %i\n" " Outbound do_QDIO time (in us) : %i\n" - " Outbound do_QDIO count : %i\n", + " Outbound do_QDIO count : %i\n\n", card->perf_stats.inbound_time, card->perf_stats.inbound_cnt, card->perf_stats.inbound_do_qdio_time, @@ -274,7 +282,6 @@ card->perf_stats.outbound_do_qdio_time, card->perf_stats.outbound_do_qdio_cnt ); - return 0; } diff -Nru a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c --- a/drivers/s390/net/qeth_sys.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/s390/net/qeth_sys.c 2005-03-30 16:58:49 -08:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.49 $) + * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.51 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs. @@ -20,7 +20,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_SYS_C = "$Revision: 1.49 $"; +const char *VERSION_QETH_SYS_C = "$Revision: 1.51 $"; /*****************************************************************************/ /* */ @@ -249,6 +249,16 @@ (card->state != CARD_STATE_RECOVER)) return -EPERM; + /* check if 1920 devices are supported , + * if though we have to permit priority queueing + */ + if (card->qdio.no_out_queues == 1) { + PRINT_WARN("Priority queueing disabled due " + "to hardware limitations!\n"); + card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; + return -EPERM; + } + tmp = strsep((char **) &buf, "\n"); if (!strcmp(tmp, "prio_queueing_prec")) card->qdio.do_prio_queueing = QETH_PRIO_Q_ING_PREC; @@ -731,6 +741,174 @@ static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show, qeth_dev_layer2_store); +static ssize_t +qeth_dev_large_send_show(struct device *dev, char *buf) +{ + struct qeth_card *card = dev->driver_data; + + if (!card) + return -EINVAL; + + switch (card->options.large_send) { + case QETH_LARGE_SEND_NO: + return sprintf(buf, "%s\n", "no"); + case QETH_LARGE_SEND_EDDP: + return sprintf(buf, "%s\n", "EDDP"); + case QETH_LARGE_SEND_TSO: + return sprintf(buf, "%s\n", "TSO"); + default: + return sprintf(buf, "%s\n", "N/A"); + } +} + +static ssize_t +qeth_dev_large_send_store(struct device *dev, const char *buf, size_t count) +{ + struct qeth_card *card = dev->driver_data; + enum qeth_large_send_types type; + int rc = 0; + char *tmp; + + if (!card) + return -EINVAL; + + tmp = strsep((char **) &buf, "\n"); + + if (!strcmp(tmp, "no")){ + type = QETH_LARGE_SEND_NO; + } else if (!strcmp(tmp, "EDDP")) { + type = QETH_LARGE_SEND_EDDP; + } else if (!strcmp(tmp, "TSO")) { + type = QETH_LARGE_SEND_TSO; + } else { + PRINT_WARN("large_send: invalid mode %s!\n", tmp); + return -EINVAL; + } + if (card->options.large_send == type) + return count; + card->options.large_send = type; + if ((rc = qeth_set_large_send(card))) + return rc; + + return count; +} + +static DEVICE_ATTR(large_send, 0644, qeth_dev_large_send_show, + qeth_dev_large_send_store); + +static ssize_t +qeth_dev_blkt_show(char *buf, struct qeth_card *card, int value ) +{ + + if (!card) + return -EINVAL; + + return sprintf(buf, "%i\n", value); +} + +static ssize_t +qeth_dev_blkt_store(struct qeth_card *card, const char *buf, size_t count, + int *value, int max_value) +{ + char *tmp; + int i; + + if (!card) + return -EINVAL; + + if ((card->state != CARD_STATE_DOWN) && + (card->state != CARD_STATE_RECOVER)) + return -EPERM; + + i = simple_strtoul(buf, &tmp, 10); + if (i <= max_value) { + *value = i; + } else { + PRINT_WARN("blkt total time: write values between" + " 0 and %d to this file!\n", max_value); + return -EINVAL; + } + return count; +} + +static ssize_t +qeth_dev_blkt_total_show(struct device *dev, char *buf) +{ + struct qeth_card *card = dev->driver_data; + + return qeth_dev_blkt_show(buf, card, card->info.blkt.time_total); +} + + +static ssize_t +qeth_dev_blkt_total_store(struct device *dev, const char *buf, size_t count) +{ + struct qeth_card *card = dev->driver_data; + + return qeth_dev_blkt_store(card, buf, count, + &card->info.blkt.time_total,1000); +} + + + +static DEVICE_ATTR(total, 0644, qeth_dev_blkt_total_show, + qeth_dev_blkt_total_store); + +static ssize_t +qeth_dev_blkt_inter_show(struct device *dev, char *buf) +{ + struct qeth_card *card = dev->driver_data; + + return qeth_dev_blkt_show(buf, card, card->info.blkt.inter_packet); +} + + +static ssize_t +qeth_dev_blkt_inter_store(struct device *dev, const char *buf, size_t count) +{ + struct qeth_card *card = dev->driver_data; + + return qeth_dev_blkt_store(card, buf, count, + &card->info.blkt.inter_packet,100); +} + +static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show, + qeth_dev_blkt_inter_store); + +static ssize_t +qeth_dev_blkt_inter_jumbo_show(struct device *dev, char *buf) +{ + struct qeth_card *card = dev->driver_data; + + return qeth_dev_blkt_show(buf, card, + card->info.blkt.inter_packet_jumbo); +} + + +static ssize_t +qeth_dev_blkt_inter_jumbo_store(struct device *dev, const char *buf, size_t count) +{ + struct qeth_card *card = dev->driver_data; + + return qeth_dev_blkt_store(card, buf, count, + &card->info.blkt.inter_packet_jumbo,100); +} + +static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show, + qeth_dev_blkt_inter_jumbo_store); + +static struct device_attribute * qeth_blkt_device_attrs[] = { + &dev_attr_total, + &dev_attr_inter, + &dev_attr_inter_jumbo, + NULL, +}; + +static struct attribute_group qeth_device_blkt_group = { + .name = "blkt", + .attrs = (struct attribute **)qeth_blkt_device_attrs, +}; + static struct device_attribute * qeth_device_attrs[] = { &dev_attr_state, &dev_attr_chpid, @@ -752,6 +930,7 @@ &dev_attr_broadcast_mode, &dev_attr_canonical_macaddr, &dev_attr_layer2, + &dev_attr_large_send, NULL, }; @@ -1506,6 +1685,8 @@ sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); } + if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))) + return ret; return ret; } @@ -1517,6 +1698,7 @@ sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); sysfs_remove_group(&dev->kobj, &qeth_device_rxip_group); + sysfs_remove_group(&dev->kobj, &qeth_device_blkt_group); } /**********************/ diff -Nru a/drivers/s390/net/qeth_tso.c b/drivers/s390/net/qeth_tso.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/s390/net/qeth_tso.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,285 @@ +/* + * linux/drivers/s390/net/qeth_tso.c ($Revision: 1.6 $) + * + * Header file for qeth TCP Segmentation Offload support. + * + * Copyright 2004 IBM Corporation + * + * Author(s): Frank Pavlic + * + * $Revision: 1.6 $ $Date: 2005/03/24 09:04:18 $ + * + */ + +#include +#include +#include +#include +#include +#include "qeth.h" +#include "qeth_mpc.h" +#include "qeth_tso.h" + +/** + * skb already partially prepared + * classic qdio header in skb->data + * */ +static inline struct qeth_hdr_tso * +qeth_tso_prepare_skb(struct qeth_card *card, struct sk_buff **skb) +{ + int rc = 0; + + QETH_DBF_TEXT(trace, 5, "tsoprsk"); + rc = qeth_realloc_headroom(card, skb,sizeof(struct qeth_hdr_ext_tso)); + if (rc) + return NULL; + + return qeth_push_skb(card, skb, sizeof(struct qeth_hdr_ext_tso)); +} + +/** + * fill header for a TSO packet + */ +static inline void +qeth_tso_fill_header(struct qeth_card *card, struct sk_buff *skb) +{ + struct qeth_hdr_tso *hdr; + struct tcphdr *tcph; + struct iphdr *iph; + + QETH_DBF_TEXT(trace, 5, "tsofhdr"); + + hdr = (struct qeth_hdr_tso *) skb->data; + iph = skb->nh.iph; + tcph = skb->h.th; + /*fix header to TSO values ...*/ + hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; + /*set values which are fix for the first approach ...*/ + hdr->ext.hdr_tot_len = (__u16) sizeof(struct qeth_hdr_ext_tso); + hdr->ext.imb_hdr_no = 1; + hdr->ext.hdr_type = 1; + hdr->ext.hdr_version = 1; + hdr->ext.hdr_len = 28; + /*insert non-fix values */ + hdr->ext.mss = skb_shinfo(skb)->tso_size; + hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4); + hdr->ext.payload_len = (__u16)(skb->len - hdr->ext.dg_hdr_len - + sizeof(struct qeth_hdr_tso)); +} + +/** + * change some header values as requested by hardware + */ +static inline void +qeth_tso_set_tcpip_header(struct qeth_card *card, struct sk_buff *skb) +{ + struct iphdr *iph; + struct ipv6hdr *ip6h; + struct tcphdr *tcph; + + iph = skb->nh.iph; + ip6h = skb->nh.ipv6h; + tcph = skb->h.th; + + tcph->check = 0; + if (skb->protocol == ETH_P_IPV6) { + ip6h->payload_len = 0; + tcph->check = ~csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, + 0, IPPROTO_TCP, 0); + return; + } + /*OSA want us to set these values ...*/ + tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, + 0, IPPROTO_TCP, 0); + iph->tot_len = 0; + iph->check = 0; +} + +static inline struct qeth_hdr_tso * +qeth_tso_prepare_packet(struct qeth_card *card, struct sk_buff *skb, + int ipv, int cast_type) +{ + struct qeth_hdr_tso *hdr; + int rc = 0; + + QETH_DBF_TEXT(trace, 5, "tsoprep"); + + /*get headroom for tso qdio header */ + hdr = (struct qeth_hdr_tso *) qeth_tso_prepare_skb(card, &skb); + if (hdr == NULL) { + QETH_DBF_TEXT_(trace, 4, "2err%d", rc); + return NULL; + } + memset(hdr, 0, sizeof(struct qeth_hdr_tso)); + /*fill first 32 bytes of qdio header as used + *FIXME: TSO has two struct members + * with different names but same size + * */ + qeth_fill_header(card, &hdr->hdr, skb, ipv, cast_type); + qeth_tso_fill_header(card, skb); + qeth_tso_set_tcpip_header(card, skb); + return hdr; +} + +static inline int +qeth_tso_get_queue_buffer(struct qeth_qdio_out_q *queue) +{ + struct qeth_qdio_out_buffer *buffer; + int flush_cnt = 0; + + QETH_DBF_TEXT(trace, 5, "tsobuf"); + + /* force to non-packing*/ + if (queue->do_pack) + queue->do_pack = 0; + buffer = &queue->bufs[queue->next_buf_to_fill]; + /* get a new buffer if current is already in use*/ + if ((atomic_read(&buffer->state) == QETH_QDIO_BUF_EMPTY) && + (buffer->next_element_to_fill > 0)) { + atomic_set(&buffer->state, QETH_QDIO_BUF_PRIMED); + queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % + QDIO_MAX_BUFFERS_PER_Q; + flush_cnt++; + } + return flush_cnt; +} + +static inline void +__qeth_tso_fill_buffer_frag(struct qeth_qdio_out_buffer *buf, + struct sk_buff *skb) +{ + struct skb_frag_struct *frag; + struct qdio_buffer *buffer; + int fragno, cnt, element; + unsigned long addr; + + QETH_DBF_TEXT(trace, 6, "tsfilfrg"); + + /*initialize variables ...*/ + fragno = skb_shinfo(skb)->nr_frags; + buffer = buf->buffer; + element = buf->next_element_to_fill; + /*fill buffer elements .....*/ + for (cnt = 0; cnt < fragno; cnt++) { + frag = &skb_shinfo(skb)->frags[cnt]; + addr = (page_to_pfn(frag->page) << PAGE_SHIFT) + + frag->page_offset; + buffer->element[element].addr = (char *)addr; + buffer->element[element].length = frag->size; + if (cnt < (fragno - 1)) + buffer->element[element].flags = + SBAL_FLAGS_MIDDLE_FRAG; + else + buffer->element[element].flags = + SBAL_FLAGS_LAST_FRAG; + element++; + } + buf->next_element_to_fill = element; +} + +static inline int +qeth_tso_fill_buffer(struct qeth_qdio_out_buffer *buf, + struct sk_buff *skb) +{ + int length, length_here, element; + int hdr_len; + struct qdio_buffer *buffer; + struct qeth_hdr_tso *hdr; + char *data; + + QETH_DBF_TEXT(trace, 3, "tsfilbuf"); + + /*increment user count and queue skb ...*/ + atomic_inc(&skb->users); + skb_queue_tail(&buf->skb_list, skb); + + /*initialize all variables...*/ + buffer = buf->buffer; + hdr = (struct qeth_hdr_tso *)skb->data; + hdr_len = sizeof(struct qeth_hdr_tso) + hdr->ext.dg_hdr_len; + data = skb->data + hdr_len; + length = skb->len - hdr_len; + element = buf->next_element_to_fill; + /*fill first buffer entry only with header information */ + buffer->element[element].addr = skb->data; + buffer->element[element].length = hdr_len; + buffer->element[element].flags = SBAL_FLAGS_FIRST_FRAG; + buf->next_element_to_fill++; + + if (skb_shinfo(skb)->nr_frags > 0) { + __qeth_tso_fill_buffer_frag(buf, skb); + goto out; + } + + /*start filling buffer entries ...*/ + element++; + while (length > 0) { + /* length_here is the remaining amount of data in this page */ + length_here = PAGE_SIZE - ((unsigned long) data % PAGE_SIZE); + if (length < length_here) + length_here = length; + buffer->element[element].addr = data; + buffer->element[element].length = length_here; + length -= length_here; + if (!length) + buffer->element[element].flags = + SBAL_FLAGS_LAST_FRAG; + else + buffer->element[element].flags = + SBAL_FLAGS_MIDDLE_FRAG; + data += length_here; + element++; + } + /*set the buffer to primed ...*/ + buf->next_element_to_fill = element; +out: + atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); + return 1; +} + +int +qeth_tso_send_packet(struct qeth_card *card, struct sk_buff *skb, + struct qeth_qdio_out_q *queue, int ipv, int cast_type) +{ + int flush_cnt = 0; + struct qeth_hdr_tso *hdr; + struct qeth_qdio_out_buffer *buffer; + int start_index; + + QETH_DBF_TEXT(trace, 3, "tsosend"); + + if (!(hdr = qeth_tso_prepare_packet(card, skb, ipv, cast_type))) + return -ENOMEM; + /*check if skb fits in one SBAL ...*/ + if (!(qeth_get_elements_no(card, (void*)hdr, skb))) + return -EINVAL; + /*lock queue, force switching to non-packing and send it ...*/ + while (atomic_compare_and_swap(QETH_OUT_Q_UNLOCKED, + QETH_OUT_Q_LOCKED, + &queue->state)); + start_index = queue->next_buf_to_fill; + buffer = &queue->bufs[queue->next_buf_to_fill]; + /*check if card is too busy ...*/ + if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY){ + card->stats.tx_dropped++; + goto out; + } + /*let's force to non-packing and get a new SBAL*/ + flush_cnt += qeth_tso_get_queue_buffer(queue); + buffer = &queue->bufs[queue->next_buf_to_fill]; + if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) { + card->stats.tx_dropped++; + goto out; + } + flush_cnt += qeth_tso_fill_buffer(buffer, skb); + queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % + QDIO_MAX_BUFFERS_PER_Q; +out: + atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); + if (flush_cnt) + qeth_flush_buffers(queue, 0, start_index, flush_cnt); + /*do some statistics */ + card->stats.tx_packets++; + card->stats.tx_bytes += skb->len; + return 0; +} diff -Nru a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/s390/net/qeth_tso.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,58 @@ +/* + * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.4 $) + * + * Header file for qeth TCP Segmentation Offload support. + * + * Copyright 2004 IBM Corporation + * + * Author(s): Frank Pavlic + * + * $Revision: 1.4 $ $Date: 2005/03/24 09:04:18 $ + * + */ +#ifndef __QETH_TSO_H__ +#define __QETH_TSO_H__ + + +extern int +qeth_tso_send_packet(struct qeth_card *, struct sk_buff *, + struct qeth_qdio_out_q *, int , int); + +struct qeth_hdr_ext_tso { + __u16 hdr_tot_len; + __u8 imb_hdr_no; + __u8 reserved; + __u8 hdr_type; + __u8 hdr_version; + __u16 hdr_len; + __u32 payload_len; + __u16 mss; + __u16 dg_hdr_len; + __u8 padding[16]; +} __attribute__ ((packed)); + +struct qeth_hdr_tso { + struct qeth_hdr hdr; /*hdr->hdr.l3.xxx*/ + struct qeth_hdr_ext_tso ext; +} __attribute__ ((packed)); + +/*some helper functions*/ + +static inline int +qeth_get_elements_no(struct qeth_card *card, void *hdr, struct sk_buff *skb) +{ + int elements_needed = 0; + + if (skb_shinfo(skb)->nr_frags > 0) + elements_needed = (skb_shinfo(skb)->nr_frags + 1); + if (elements_needed == 0 ) + elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) + + skb->len) >> PAGE_SHIFT); + if (elements_needed > QETH_MAX_BUFFER_ELEMENTS(card)){ + PRINT_ERR("qeth_do_send_packet: invalid size of " + "IP packet. Discarded."); + return 0; + } + return elements_needed; +} +#endif /* __QETH_TSO_H__ */ diff -Nru a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c --- a/drivers/s390/scsi/zfcp_aux.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/s390/scsi/zfcp_aux.c 2005-03-30 16:58:50 -08:00 @@ -583,7 +583,7 @@ retval = -ENOMEM; goto out; } - memset(sg_list->sg, sg_list->count * sizeof(struct scatterlist), 0); + memset(sg_list->sg, 0, sg_list->count * sizeof(struct scatterlist)); for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) { sg->length = min(size, PAGE_SIZE); @@ -928,7 +928,7 @@ } static void * -zfcp_mempool_alloc(int gfp_mask, void *size) +zfcp_mempool_alloc(unsigned int __nocast gfp_mask, void *size) { return kmalloc((size_t) size, gfp_mask); } diff -Nru a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c --- a/drivers/sbus/char/flash.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/sbus/char/flash.c 2005-03-30 16:58:49 -08:00 @@ -75,7 +75,7 @@ pgprot_val(vma->vm_page_prot) |= _PAGE_E; vma->vm_flags |= (VM_SHM | VM_LOCKED); - if (remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) + if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) return -EAGAIN; return 0; diff -Nru a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c --- a/drivers/sbus/char/vfc_dev.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/sbus/char/vfc_dev.c 2005-03-30 16:58:49 -08:00 @@ -626,8 +626,10 @@ vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE); map_offset = (unsigned int) (long)dev->phys_regs; - ret = io_remap_page_range(vma, vma->vm_start, map_offset, map_size, - vma->vm_page_prot, dev->which_io); + ret = io_remap_pfn_range(vma, vma->vm_start, + MK_IOSPACE_PFN(dev->which_io, + map_offset >> PAGE_SHIFT), + map_size, vma->vm_page_prot); if(ret) return -EAGAIN; diff -Nru a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c --- a/drivers/scsi/3w-9xxx.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/scsi/3w-9xxx.c 2005-03-30 16:58:50 -08:00 @@ -3,7 +3,7 @@ Written By: Adam Radford - Copyright (C) 2004 Applied Micro Circuits Corporation. + Copyright (C) 2004-2005 Applied Micro Circuits Corporation. 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 @@ -51,6 +51,14 @@ ------- 2.26.02.000 - Driver cleanup for kernel submission. 2.26.02.001 - Replace schedule_timeout() calls with msleep(). + 2.26.02.002 - Add support for PAE mode. + Add lun support. + Fix twa_remove() to free irq handler/unregister_chrdev() + before shutting down card. + Change to new 'change_queue_depth' api. + Fix 'handled=1' ISR usage, remove bogus IRQ check. + Remove un-needed eh_abort handler. + Add support for embedded firmware error strings. */ #include @@ -73,7 +81,7 @@ #include "3w-9xxx.h" /* Globals */ -static const char *twa_driver_version="2.26.02.001"; +#define TW_DRIVER_VERSION "2.26.02.002" static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT]; static unsigned int twa_device_extension_count; static int twa_major = -1; @@ -83,6 +91,7 @@ MODULE_AUTHOR ("AMCC"); MODULE_DESCRIPTION ("3ware 9000 Storage Controller Linux Driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(TW_DRIVER_VERSION); /* Function prototypes */ static void twa_aen_queue_event(TW_Device_Extension *tw_dev, TW_Command_Apache_Header *header); @@ -108,9 +117,9 @@ static int twa_poll_response(TW_Device_Extension *tw_dev, int request_id, int seconds); static int twa_poll_status_gone(TW_Device_Extension *tw_dev, u32 flag, int seconds); static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal); -static int twa_reset_device_extension(TW_Device_Extension *tw_dev); +static int twa_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset); static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset); -static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Apache *sglistarg); +static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg); static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int request_id); static char *twa_string_lookup(twa_message_type *table, unsigned int aen_code); static void twa_unmap_scsi_data(TW_Device_Extension *tw_dev, int request_id); @@ -126,7 +135,7 @@ ssize_t len; spin_lock_irqsave(tw_dev->host->host_lock, flags); - len = snprintf(buf, PAGE_SIZE, "Driver version: %s\n" + len = snprintf(buf, PAGE_SIZE, "3w-9xxx Driver version: %s\n" "Current commands posted: %4d\n" "Max commands posted: %4d\n" "Current pending commands: %4d\n" @@ -136,9 +145,8 @@ "Last sector count: %4d\n" "Max sector count: %4d\n" "SCSI Host Resets: %4d\n" - "SCSI Aborts/Timeouts: %4d\n" "AEN's: %4d\n", - twa_driver_version, + TW_DRIVER_VERSION, tw_dev->posted_request_count, tw_dev->max_posted_request_count, tw_dev->pending_request_count, @@ -148,40 +156,19 @@ tw_dev->sector_count, tw_dev->max_sector_count, tw_dev->num_resets, - tw_dev->num_aborts, tw_dev->aen_count); spin_unlock_irqrestore(tw_dev->host->host_lock, flags); return len; } /* End twa_show_stats() */ /* This function will set a devices queue depth */ -static ssize_t twa_store_queue_depth(struct device *dev, const char *buf, size_t count) +static int twa_change_queue_depth(struct scsi_device *sdev, int queue_depth) { - int queue_depth; - struct scsi_device *sdev = to_scsi_device(dev); - - queue_depth = simple_strtoul(buf, NULL, 0); if (queue_depth > TW_Q_LENGTH-2) - return -EINVAL; + queue_depth = TW_Q_LENGTH-2; scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); - - return count; -} /* End twa_store_queue_depth() */ - -/* Create sysfs 'queue_depth' entry */ -static struct device_attribute twa_queue_depth_attr = { - .attr = { - .name = "queue_depth", - .mode = S_IRUSR | S_IWUSR, - }, - .store = twa_store_queue_depth -}; - -/* Device attributes initializer */ -static struct device_attribute *twa_dev_attrs[] = { - &twa_queue_depth_attr, - NULL, -}; + return queue_depth; +} /* End twa_change_queue_depth() */ /* Create sysfs 'stats' entry */ static struct class_device_attribute twa_host_stats_attr = { @@ -265,7 +252,7 @@ { int request_id = 0; char cdb[TW_MAX_CDB_LEN]; - TW_SG_Apache sglist[1]; + TW_SG_Entry sglist[1]; int finished = 0, count = 0; TW_Command_Full *full_command_packet; TW_Command_Apache_Header *header; @@ -286,7 +273,7 @@ cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ /* Initialize sglist */ - memset(&sglist, 0, sizeof(TW_SG_Apache)); + memset(&sglist, 0, sizeof(TW_SG_Entry)); sglist[0].length = TW_SECTOR_SIZE; sglist[0].address = tw_dev->generic_buffer_phys[request_id]; @@ -359,6 +346,7 @@ TW_Event *event; unsigned short aen; char host[16]; + char *error_str; tw_dev->aen_count++; @@ -385,6 +373,9 @@ event->sequence_id = tw_dev->error_sequence_id; tw_dev->error_sequence_id++; + /* Check for embedded error string */ + error_str = &(header->err_specific_desc[strlen(header->err_specific_desc)+1]); + header->err_specific_desc[sizeof(header->err_specific_desc) - 1] = '\0'; event->parameter_len = strlen(header->err_specific_desc); memcpy(event->parameter_data, header->err_specific_desc, event->parameter_len); @@ -393,7 +384,7 @@ host, twa_aen_severity_lookup(TW_SEV_OUT(header->status_block.severity__reserved)), TW_MESSAGE_SOURCE_CONTROLLER_EVENT, aen, - twa_string_lookup(twa_aen_table, aen), + error_str[0] == '\0' ? twa_string_lookup(twa_aen_table, aen) : error_str, header->err_specific_desc); else tw_dev->aen_count--; @@ -407,7 +398,7 @@ static int twa_aen_read_queue(TW_Device_Extension *tw_dev, int request_id) { char cdb[TW_MAX_CDB_LEN]; - TW_SG_Apache sglist[1]; + TW_SG_Entry sglist[1]; TW_Command_Full *full_command_packet; int retval = 1; @@ -420,7 +411,7 @@ cdb[4] = TW_ALLOCATION_LENGTH; /* allocation length */ /* Initialize sglist */ - memset(&sglist, 0, sizeof(TW_SG_Apache)); + memset(&sglist, 0, sizeof(TW_SG_Entry)); sglist[0].length = TW_SECTOR_SIZE; sglist[0].address = tw_dev->generic_buffer_phys[request_id]; @@ -558,18 +549,18 @@ u32 init_connect_result = 0; if (twa_initconnection(tw_dev, TW_INIT_MESSAGE_CREDITS, - TW_EXTENDED_INIT_CONNECT, TW_CURRENT_FW_SRL, - TW_9000_ARCH_ID, TW_CURRENT_FW_BRANCH, - TW_CURRENT_FW_BUILD, &fw_on_ctlr_srl, + TW_EXTENDED_INIT_CONNECT, TW_CURRENT_DRIVER_SRL, + TW_9000_ARCH_ID, TW_CURRENT_DRIVER_BRANCH, + TW_CURRENT_DRIVER_BUILD, &fw_on_ctlr_srl, &fw_on_ctlr_arch_id, &fw_on_ctlr_branch, &fw_on_ctlr_build, &init_connect_result)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x7, "Initconnection failed while checking SRL"); goto out; } - tw_dev->working_srl = TW_CURRENT_FW_SRL; - tw_dev->working_branch = TW_CURRENT_FW_BRANCH; - tw_dev->working_build = TW_CURRENT_FW_BUILD; + tw_dev->working_srl = fw_on_ctlr_srl; + tw_dev->working_branch = fw_on_ctlr_branch; + tw_dev->working_build = fw_on_ctlr_build; /* Try base mode compatibility */ if (!(init_connect_result & TW_CTLR_FW_COMPATIBLE)) { @@ -584,7 +575,7 @@ goto out; } if (!(init_connect_result & TW_CTLR_FW_COMPATIBLE)) { - if (TW_CURRENT_FW_SRL > fw_on_ctlr_srl) { + if (TW_CURRENT_DRIVER_SRL > fw_on_ctlr_srl) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x32, "Firmware and driver incompatibility: please upgrade firmware"); } else { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x33, "Firmware and driver incompatibility: please upgrade driver"); @@ -641,7 +632,7 @@ data_buffer_length_adjusted = (driver_command.buffer_length + 511) & ~511; /* Now allocate ioctl buf memory */ - cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, &dma_handle); + cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, &dma_handle, GFP_KERNEL); if (!cpu_addr) { retval = TW_IOCTL_ERROR_OS_ENOMEM; goto out2; @@ -679,26 +670,28 @@ timeout = TW_IOCTL_CHRDEV_TIMEOUT*HZ; /* Now wait for command to complete */ - timeout = wait_event_interruptible_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); + timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); + + /* See if we reset while waiting for the ioctl to complete */ + if (test_bit(TW_IN_RESET, &tw_dev->flags)) { + clear_bit(TW_IN_RESET, &tw_dev->flags); + retval = TW_IOCTL_ERROR_OS_ERESTARTSYS; + goto out3; + } - /* Check if we timed out, got a signal, or didn't get - an interrupt */ - if ((timeout <= 0) && (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE)) { + /* We timed out, and didn't get an interrupt */ + if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { /* Now we need to reset the board */ - if (timeout == TW_IOCTL_ERROR_OS_ERESTARTSYS) { - retval = timeout; - } else { - printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Character ioctl (0x%x) timed out, resetting card.\n", - tw_dev->host->host_no, TW_DRIVER, 0xc, - cmd); - retval = TW_IOCTL_ERROR_OS_EIO; - } + printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Character ioctl (0x%x) timed out, resetting card.\n", + tw_dev->host->host_no, TW_DRIVER, 0xc, + cmd); + retval = TW_IOCTL_ERROR_OS_EIO; spin_lock_irqsave(tw_dev->host->host_lock, flags); tw_dev->state[request_id] = TW_S_COMPLETED; twa_free_request_id(tw_dev, request_id); tw_dev->posted_request_count--; - twa_reset_device_extension(tw_dev); spin_unlock_irqrestore(tw_dev->host->host_lock, flags); + twa_reset_device_extension(tw_dev, 1); goto out3; } @@ -716,10 +709,16 @@ tw_ioctl->driver_command.status = 0; /* Copy compatiblity struct into ioctl data buffer */ tw_compat_info = (TW_Compatibility_Info *)tw_ioctl->data_buffer; - strncpy(tw_compat_info->driver_version, twa_driver_version, strlen(twa_driver_version)); + strncpy(tw_compat_info->driver_version, TW_DRIVER_VERSION, strlen(TW_DRIVER_VERSION)); tw_compat_info->working_srl = tw_dev->working_srl; tw_compat_info->working_branch = tw_dev->working_branch; tw_compat_info->working_build = tw_dev->working_build; + tw_compat_info->driver_srl_high = TW_CURRENT_DRIVER_SRL; + tw_compat_info->driver_branch_high = TW_CURRENT_DRIVER_BRANCH; + tw_compat_info->driver_build_high = TW_CURRENT_DRIVER_BUILD; + tw_compat_info->driver_srl_low = TW_BASE_FW_SRL; + tw_compat_info->driver_branch_low = TW_BASE_FW_BRANCH; + tw_compat_info->driver_build_low = TW_BASE_FW_BUILD; break; case TW_IOCTL_GET_LAST_EVENT: if (tw_dev->event_queue_wrapped) { @@ -849,7 +848,7 @@ retval = 0; out3: /* Now free ioctl buf memory */ - pci_free_consistent(tw_dev->tw_pci_dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, cpu_addr, dma_handle); + dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioctl_Buf_Apache) - 1, cpu_addr, dma_handle); out2: up(&tw_dev->ioctl_sem); out: @@ -936,8 +935,13 @@ TW_Command_Full *full_command_packet; unsigned short error; int retval = 1; + char *error_str; full_command_packet = tw_dev->command_packet_virt[request_id]; + + /* Check for embedded error string */ + error_str = &(full_command_packet->header.err_specific_desc[strlen(full_command_packet->header.err_specific_desc) + 1]); + /* Don't print error for Logical unit not supported during rollcall */ error = full_command_packet->header.status_block.error; if ((error != TW_ERROR_LOGICAL_UNIT_NOT_SUPPORTED) && (error != TW_ERROR_UNIT_OFFLINE)) { @@ -946,15 +950,17 @@ tw_dev->host->host_no, TW_MESSAGE_SOURCE_CONTROLLER_ERROR, full_command_packet->header.status_block.error, + error_str[0] == '\0' ? twa_string_lookup(twa_error_table, - full_command_packet->header.status_block.error), + full_command_packet->header.status_block.error) : error_str, full_command_packet->header.err_specific_desc); else printk(KERN_WARNING "3w-9xxx: ERROR: (0x%02X:0x%04X): %s:%s.\n", TW_MESSAGE_SOURCE_CONTROLLER_ERROR, full_command_packet->header.status_block.error, + error_str[0] == '\0' ? twa_string_lookup(twa_error_table, - full_command_packet->header.status_block.error), + full_command_packet->header.status_block.error) : error_str, full_command_packet->header.err_specific_desc); } @@ -1075,10 +1081,9 @@ tw_initconnect->request_id = request_id; tw_initconnect->message_credits = message_credits; tw_initconnect->features = set_features; -#if BITS_PER_LONG > 32 - /* Turn on 64-bit sgl support */ - tw_initconnect->features |= 1; -#endif + + /* Turn on 64-bit sgl support if we need to */ + tw_initconnect->features |= sizeof(dma_addr_t) > 4 ? 1 : 0; if (set_features & TW_EXTENDED_INIT_CONNECT) { tw_initconnect->size = TW_INIT_COMMAND_PACKET_SIZE_EXTENDED; @@ -1173,139 +1178,142 @@ /* Get the per adapter lock */ spin_lock(tw_dev->host->host_lock); - /* See if the interrupt matches this instance */ - if (tw_dev->tw_pci_dev->irq == (unsigned int)irq) { - - handled = 1; - - /* Read the registers */ - status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); + /* Read the registers */ + status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); - /* Check if this is our interrupt, otherwise bail */ - if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT)) + /* Check if this is our interrupt, otherwise bail */ + if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT)) + goto twa_interrupt_bail; + + handled = 1; + + /* Check controller for errors */ + if (twa_check_bits(status_reg_value)) { + if (twa_decode_bits(tw_dev, status_reg_value)) { + TW_CLEAR_ALL_INTERRUPTS(tw_dev); goto twa_interrupt_bail; + } + } + + /* Handle host interrupt */ + if (status_reg_value & TW_STATUS_HOST_INTERRUPT) + TW_CLEAR_HOST_INTERRUPT(tw_dev); + + /* Handle attention interrupt */ + if (status_reg_value & TW_STATUS_ATTENTION_INTERRUPT) { + TW_CLEAR_ATTENTION_INTERRUPT(tw_dev); + if (!(test_and_set_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags))) { + twa_get_request_id(tw_dev, &request_id); + + error = twa_aen_read_queue(tw_dev, request_id); + if (error) { + tw_dev->state[request_id] = TW_S_COMPLETED; + twa_free_request_id(tw_dev, request_id); + clear_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags); + } + } + } - /* Check controller for errors */ - if (twa_check_bits(status_reg_value)) { - if (twa_decode_bits(tw_dev, status_reg_value)) { + /* Handle command interrupt */ + if (status_reg_value & TW_STATUS_COMMAND_INTERRUPT) { + TW_MASK_COMMAND_INTERRUPT(tw_dev); + /* Drain as many pending commands as we can */ + while (tw_dev->pending_request_count > 0) { + request_id = tw_dev->pending_queue[tw_dev->pending_head]; + if (tw_dev->state[request_id] != TW_S_PENDING) { + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x19, "Found request id that wasn't pending"); TW_CLEAR_ALL_INTERRUPTS(tw_dev); goto twa_interrupt_bail; } + if (twa_post_command_packet(tw_dev, request_id, 1)==0) { + tw_dev->pending_head = (tw_dev->pending_head + 1) % TW_Q_LENGTH; + tw_dev->pending_request_count--; + } else { + /* If we get here, we will continue re-posting on the next command interrupt */ + break; + } } + } + + /* Handle response interrupt */ + if (status_reg_value & TW_STATUS_RESPONSE_INTERRUPT) { - /* Handle host interrupt */ - if (status_reg_value & TW_STATUS_HOST_INTERRUPT) - TW_CLEAR_HOST_INTERRUPT(tw_dev); - - /* Handle attention interrupt */ - if (status_reg_value & TW_STATUS_ATTENTION_INTERRUPT) { - TW_CLEAR_ATTENTION_INTERRUPT(tw_dev); - if (!(test_and_set_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags))) { - twa_get_request_id(tw_dev, &request_id); - - error = twa_aen_read_queue(tw_dev, request_id); - if (error) { - tw_dev->state[request_id] = TW_S_COMPLETED; - twa_free_request_id(tw_dev, request_id); - clear_bit(TW_IN_ATTENTION_LOOP, &tw_dev->flags); + /* Drain the response queue from the board */ + while ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) { + /* Complete the response */ + response_que.value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); + request_id = TW_RESID_OUT(response_que.response_id); + full_command_packet = tw_dev->command_packet_virt[request_id]; + error = 0; + command_packet = &full_command_packet->command.oldcommand; + /* Check for command packet errors */ + if (full_command_packet->command.newcommand.status != 0) { + if (tw_dev->srb[request_id] != 0) { + error = twa_fill_sense(tw_dev, request_id, 1, 1); + } else { + /* Skip ioctl error prints */ + if (request_id != tw_dev->chrdev_request_id) { + error = twa_fill_sense(tw_dev, request_id, 0, 1); + } } } - } - /* Handle command interrupt */ - if (status_reg_value & TW_STATUS_COMMAND_INTERRUPT) { - TW_MASK_COMMAND_INTERRUPT(tw_dev); - /* Drain as many pending commands as we can */ - while (tw_dev->pending_request_count > 0) { - request_id = tw_dev->pending_queue[tw_dev->pending_head]; - if (tw_dev->state[request_id] != TW_S_PENDING) { - TW_PRINTK(tw_dev->host, TW_DRIVER, 0x19, "Found request id that wasn't pending"); + /* Check for correct state */ + if (tw_dev->state[request_id] != TW_S_POSTED) { + if (tw_dev->srb[request_id] != 0) { + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted"); TW_CLEAR_ALL_INTERRUPTS(tw_dev); goto twa_interrupt_bail; } - if (twa_post_command_packet(tw_dev, request_id, 1)==0) { - tw_dev->pending_head = (tw_dev->pending_head + 1) % TW_Q_LENGTH; - tw_dev->pending_request_count--; - } else { - /* If we get here, we will continue re-posting on the next command interrupt */ - break; - } } - } - /* Handle response interrupt */ - if (status_reg_value & TW_STATUS_RESPONSE_INTERRUPT) { - - /* Drain the response queue from the board */ - while ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) { - /* Complete the response */ - response_que.value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); - request_id = TW_RESID_OUT(response_que.response_id); - full_command_packet = tw_dev->command_packet_virt[request_id]; - error = 0; - command_packet = &full_command_packet->command.oldcommand; - /* Check for command packet errors */ - if (full_command_packet->command.newcommand.status != 0) { - if (tw_dev->srb[request_id] != 0) { - error = twa_fill_sense(tw_dev, request_id, 1, 1); - } else { - /* Skip ioctl error prints */ - if (request_id != tw_dev->chrdev_request_id) { - error = twa_fill_sense(tw_dev, request_id, 0, 1); - } - } + /* Check for internal command completion */ + if (tw_dev->srb[request_id] == 0) { + if (request_id != tw_dev->chrdev_request_id) { + if (twa_aen_complete(tw_dev, request_id)) + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt"); + } else { + tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; + wake_up(&tw_dev->ioctl_wqueue); } - - /* Check for correct state */ - if (tw_dev->state[request_id] != TW_S_POSTED) { - if (tw_dev->srb[request_id] != 0) { - TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted"); - TW_CLEAR_ALL_INTERRUPTS(tw_dev); - goto twa_interrupt_bail; - } + } else { + twa_scsiop_execute_scsi_complete(tw_dev, request_id); + /* If no error command was a success */ + if (error == 0) { + tw_dev->srb[request_id]->result = (DID_OK << 16); } - /* Check for internal command completion */ - if (tw_dev->srb[request_id] == 0) { - if (request_id != tw_dev->chrdev_request_id) { - if (twa_aen_complete(tw_dev, request_id)) - TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt"); - } else { - tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; - wake_up(&tw_dev->ioctl_wqueue); - } - } else { - twa_scsiop_execute_scsi_complete(tw_dev, request_id); - /* If no error command was a success */ - if (error == 0) { - tw_dev->srb[request_id]->result = (DID_OK << 16); - } - - /* If error, command failed */ - if (error == 1) { - /* Ask for a host reset */ - tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); - } + /* If error, command failed */ + if (error == 1) { + /* Ask for a host reset */ + tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); + } - /* Now complete the io */ - tw_dev->state[request_id] = TW_S_COMPLETED; - twa_free_request_id(tw_dev, request_id); - tw_dev->posted_request_count--; - tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); - twa_unmap_scsi_data(tw_dev, request_id); + /* Report residual bytes for single sgl */ + if ((tw_dev->srb[request_id]->use_sg <= 1) && (full_command_packet->command.newcommand.status == 0)) { + if (full_command_packet->command.newcommand.sg_list[0].length < tw_dev->srb[request_id]->request_bufflen) + tw_dev->srb[request_id]->resid = tw_dev->srb[request_id]->request_bufflen - full_command_packet->command.newcommand.sg_list[0].length; } - /* Check for valid status after each drain */ - status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); - if (twa_check_bits(status_reg_value)) { - if (twa_decode_bits(tw_dev, status_reg_value)) { - TW_CLEAR_ALL_INTERRUPTS(tw_dev); - goto twa_interrupt_bail; - } + /* Now complete the io */ + tw_dev->state[request_id] = TW_S_COMPLETED; + twa_free_request_id(tw_dev, request_id); + tw_dev->posted_request_count--; + tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); + twa_unmap_scsi_data(tw_dev, request_id); + } + + /* Check for valid status after each drain */ + status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); + if (twa_check_bits(status_reg_value)) { + if (twa_decode_bits(tw_dev, status_reg_value)) { + TW_CLEAR_ALL_INTERRUPTS(tw_dev); + goto twa_interrupt_bail; } } } } + twa_interrupt_bail: spin_unlock(tw_dev->host->host_lock); return IRQ_RETVAL(handled); @@ -1320,9 +1328,12 @@ if (TW_OP_OUT(full_command_packet->command.newcommand.opcode__reserved) == TW_OP_EXECUTE_SCSI) { newcommand = &full_command_packet->command.newcommand; - newcommand->request_id = request_id; + newcommand->request_id__lunl = + TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id); newcommand->sg_list[0].address = dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1; newcommand->sg_list[0].length = length; + newcommand->sgl_entries__lunh = + TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->sgl_entries__lunh), 1); } else { oldcommand = &full_command_packet->command.oldcommand; oldcommand->request_id = request_id; @@ -1332,6 +1343,9 @@ sgl = (TW_SG_Entry *)((u32 *)oldcommand+TW_SGL_OUT(oldcommand->opcode__sgloffset)); sgl->address = dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1; sgl->length = length; + + if ((sizeof(long) < 8) && (sizeof(dma_addr_t) > 4)) + oldcommand->size += 1; } } } /* End twa_load_sgl() */ @@ -1486,7 +1500,7 @@ static int twa_post_command_packet(TW_Device_Extension *tw_dev, int request_id, char internal) { u32 status_reg_value; - unsigned long command_que_value; + dma_addr_t command_que_value; int retval = 1; command_que_value = tw_dev->command_packet_phys[request_id]; @@ -1517,11 +1531,13 @@ goto out; } else { /* We successfully posted the command packet */ -#if BITS_PER_LONG > 32 - writeq(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev)); -#else - writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev)); -#endif + if (sizeof(dma_addr_t) > 4) { + command_que_value += TW_COMMAND_OFFSET; + writel((u32)command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev)); + writel((u32)((u64)command_que_value >> 32), TW_COMMAND_QUEUE_REG_ADDR(tw_dev) + 0x4); + } else { + writel(TW_COMMAND_OFFSET + command_que_value, TW_COMMAND_QUEUE_REG_ADDR(tw_dev)); + } tw_dev->state[request_id] = TW_S_POSTED; tw_dev->posted_request_count++; if (tw_dev->posted_request_count > tw_dev->max_posted_request_count) { @@ -1534,10 +1550,16 @@ } /* End twa_post_command_packet() */ /* This function will reset a device extension */ -static int twa_reset_device_extension(TW_Device_Extension *tw_dev) +static int twa_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset) { int i = 0; int retval = 1; + unsigned long flags = 0; + + set_bit(TW_IN_RESET, &tw_dev->flags); + TW_DISABLE_INTERRUPTS(tw_dev); + TW_MASK_COMMAND_INTERRUPT(tw_dev); + spin_lock_irqsave(tw_dev->host->host_lock, flags); /* Abort all requests that are in progress */ for (i = 0; i < TW_Q_LENGTH; i++) { @@ -1564,16 +1586,21 @@ tw_dev->pending_head = TW_Q_START; tw_dev->pending_tail = TW_Q_START; tw_dev->reset_print = 0; - tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; - tw_dev->flags = 0; - TW_DISABLE_INTERRUPTS(tw_dev); + spin_unlock_irqrestore(tw_dev->host->host_lock, flags); if (twa_reset_sequence(tw_dev, 1)) goto out; - TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); + TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); + /* Wake up any ioctl that was pending before the reset */ + if ((tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE) || (ioctl_reset)) { + clear_bit(TW_IN_RESET, &tw_dev->flags); + } else { + tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; + wake_up(&tw_dev->ioctl_wqueue); + } retval = 0; out: return retval; @@ -1589,7 +1616,7 @@ TW_SOFT_RESET(tw_dev); /* Make sure controller is in a good state */ - if (twa_poll_status(tw_dev, TW_STATUS_MICROCONTROLLER_READY | (do_soft_reset == 1 ? TW_STATUS_ATTENTION_INTERRUPT : 0), 30)) { + if (twa_poll_status(tw_dev, TW_STATUS_MICROCONTROLLER_READY | (do_soft_reset == 1 ? TW_STATUS_ATTENTION_INTERRUPT : 0), 60)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1f, "Microcontroller not ready during reset sequence"); do_soft_reset = 1; tries++; @@ -1660,38 +1687,6 @@ return 0; } /* End twa_scsi_biosparam() */ -/* This is the new scsi eh abort function */ -static int twa_scsi_eh_abort(struct scsi_cmnd *SCpnt) -{ - int i; - TW_Device_Extension *tw_dev = NULL; - int retval = FAILED; - - tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; - - spin_unlock_irq(tw_dev->host->host_lock); - - tw_dev->num_aborts++; - - /* If we find any IO's in process, we have to reset the card */ - for (i = 0; i < TW_Q_LENGTH; i++) { - if ((tw_dev->state[i] != TW_S_FINISHED) && (tw_dev->state[i] != TW_S_INITIAL)) { - printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Unit #%d: Command (0x%x) timed out, resetting card.\n", - tw_dev->host->host_no, TW_DRIVER, 0x2c, - SCpnt->device->id, SCpnt->cmnd[0]); - if (twa_reset_device_extension(tw_dev)) { - TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2a, "Controller reset failed during scsi abort"); - goto out; - } - break; - } - } - retval = SUCCESS; -out: - spin_lock_irq(tw_dev->host->host_lock); - return retval; -} /* End twa_scsi_eh_abort() */ - /* This is the new scsi eh reset function */ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt) { @@ -1704,14 +1699,14 @@ tw_dev->num_resets++; - printk(KERN_WARNING "3w-9xxx: scsi%d: SCSI host reset started.\n", tw_dev->host->host_no); + printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Unit #%d: Command (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, TW_DRIVER, 0x2c, SCpnt->device->id, SCpnt->cmnd[0]); /* Now reset the card and some of the device extension data */ - if (twa_reset_device_extension(tw_dev)) { + if (twa_reset_device_extension(tw_dev, 0)) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2b, "Controller reset failed during scsi host reset"); goto out; } - printk(KERN_WARNING "3w-9xxx: scsi%d: SCSI host reset succeeded.\n", tw_dev->host->host_no); + retval = SUCCESS; out: spin_lock_irq(tw_dev->host->host_lock); @@ -1724,6 +1719,14 @@ int request_id, retval; TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; + /* Check if this FW supports luns */ + if ((SCpnt->device->lun != 0) && (tw_dev->working_srl < TW_FW_SRL_LUNS_SUPPORTED)) { + SCpnt->result = (DID_BAD_TARGET << 16); + done(SCpnt); + retval = 0; + goto out; + } + /* Save done function into scsi_cmnd struct */ SCpnt->scsi_done = done; @@ -1748,12 +1751,12 @@ done(SCpnt); retval = 0; } - +out: return retval; } /* End twa_scsi_queue() */ /* This function hands scsi cdb's to the firmware */ -static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Apache *sglistarg) +static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, char *cdb, int use_sg, TW_SG_Entry *sglistarg) { TW_Command_Full *full_command_packet; TW_Command_Apache *command_packet; @@ -1787,12 +1790,16 @@ else memcpy(command_packet->cdb, cdb, TW_MAX_CDB_LEN); - if (srb) + if (srb) { command_packet->unit = srb->device->id; - else + command_packet->request_id__lunl = + TW_REQ_LUN_IN(srb->device->lun, request_id); + } else { + command_packet->request_id__lunl = + TW_REQ_LUN_IN(0, request_id); command_packet->unit = 0; + } - command_packet->request_id = request_id; command_packet->sgl_offset = 16; if (!sglistarg) { @@ -1809,7 +1816,7 @@ command_packet->sg_list[0].address = buffaddr; command_packet->sg_list[0].length = tw_dev->srb[request_id]->request_bufflen; } - command_packet->sgl_entries = 1; + command_packet->sgl_entries__lunh = TW_REQ_LUN_IN((srb->device->lun >> 4), 1); if (command_packet->sg_list[0].address & TW_ALIGNMENT_9000_SGL) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2d, "Found unaligned address during execute scsi"); @@ -1818,19 +1825,24 @@ } if (tw_dev->srb[request_id]->use_sg > 0) { - sg_count = twa_map_scsi_sg_data(tw_dev, request_id); - if (sg_count == 0) - goto out; - - for (i = 0; i < sg_count; i++) { - command_packet->sg_list[i].address = sg_dma_address(&sglist[i]); - command_packet->sg_list[i].length = sg_dma_len(&sglist[i]); - if (command_packet->sg_list[i].address & TW_ALIGNMENT_9000_SGL) { - TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2e, "Found unaligned sgl address during execute scsi"); + if ((tw_dev->srb[request_id]->use_sg == 1) && (tw_dev->srb[request_id]->request_bufflen < TW_MIN_SGL_LENGTH)) { + command_packet->sg_list[0].address = tw_dev->generic_buffer_phys[request_id]; + command_packet->sg_list[0].length = TW_MIN_SGL_LENGTH; + } else { + sg_count = twa_map_scsi_sg_data(tw_dev, request_id); + if (sg_count == 0) goto out; + + for (i = 0; i < sg_count; i++) { + command_packet->sg_list[i].address = sg_dma_address(&sglist[i]); + command_packet->sg_list[i].length = sg_dma_len(&sglist[i]); + if (command_packet->sg_list[i].address & TW_ALIGNMENT_9000_SGL) { + TW_PRINTK(tw_dev->host, TW_DRIVER, 0x2e, "Found unaligned sgl address during execute scsi"); + goto out; + } } } - command_packet->sgl_entries = tw_dev->srb[request_id]->use_sg; + command_packet->sgl_entries__lunh = TW_REQ_LUN_IN((srb->device->lun >> 4), tw_dev->srb[request_id]->use_sg); } } else { /* Internal cdb post */ @@ -1842,7 +1854,7 @@ goto out; } } - command_packet->sgl_entries = use_sg; + command_packet->sgl_entries__lunh = TW_REQ_LUN_IN(0, use_sg); } if (srb) { @@ -1903,7 +1915,7 @@ } /* Clear all interrupts just before exit */ - TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); + TW_CLEAR_ALL_INTERRUPTS(tw_dev); } /* End __twa_shutdown() */ /* Wrapper for __twa_shutdown */ @@ -1946,9 +1958,9 @@ .module = THIS_MODULE, .name = "3ware 9000 Storage Controller", .queuecommand = twa_scsi_queue, - .eh_abort_handler = twa_scsi_eh_abort, .eh_host_reset_handler = twa_scsi_eh_reset, .bios_param = twa_scsi_biosparam, + .change_queue_depth = twa_change_queue_depth, .can_queue = TW_Q_LENGTH-2, .this_id = -1, .sg_tablesize = TW_APACHE_MAX_SGL_LENGTH, @@ -1956,7 +1968,6 @@ .cmd_per_lun = TW_MAX_CMDS_PER_LUN, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = twa_host_attrs, - .sdev_attrs = twa_dev_attrs, .emulated = 1 }; @@ -1976,7 +1987,7 @@ pci_set_master(pdev); - retval = pci_set_dma_mask(pdev, TW_DMA_MASK); + retval = pci_set_dma_mask(pdev, sizeof(dma_addr_t) > 4 ? DMA_64BIT_MASK : DMA_32BIT_MASK); if (retval) { TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask"); goto out_disable_device; @@ -2028,8 +2039,8 @@ host->max_id = TW_MAX_UNITS; host->max_cmd_len = TW_MAX_CDB_LEN; - /* Luns and channels aren't supported by adapter */ - host->max_lun = 0; + /* Channels aren't supported by adapter */ + host->max_lun = TW_MAX_LUNS(tw_dev->working_srl); host->max_channel = 0; /* Register the card with the kernel SCSI layer */ @@ -2095,23 +2106,24 @@ scsi_remove_host(tw_dev->host); - __twa_shutdown(tw_dev); + /* Unregister character device */ + if (twa_major >= 0) { + unregister_chrdev(twa_major, "twa"); + twa_major = -1; + } /* Free up the IRQ */ free_irq(tw_dev->tw_pci_dev->irq, tw_dev); + /* Shutdown the card */ + __twa_shutdown(tw_dev); + /* Free up the mem region */ pci_release_regions(pdev); /* Free up device extension resources */ twa_free_device_extension(tw_dev); - /* Unregister character device */ - if (twa_major >= 0) { - unregister_chrdev(twa_major, "twa"); - twa_major = -1; - } - scsi_host_put(tw_dev->host); pci_disable_device(pdev); twa_device_extension_count--; @@ -2139,7 +2151,7 @@ /* This function is called on driver initialization */ static int __init twa_init(void) { - printk(KERN_WARNING "3ware 9000 Storage Controller device driver for Linux v%s.\n", twa_driver_version); + printk(KERN_WARNING "3ware 9000 Storage Controller device driver for Linux v%s.\n", TW_DRIVER_VERSION); return pci_module_init(&twa_driver); } /* End twa_init() */ diff -Nru a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h --- a/drivers/scsi/3w-9xxx.h 2005-03-30 16:58:51 -08:00 +++ b/drivers/scsi/3w-9xxx.h 2005-03-30 16:58:51 -08:00 @@ -3,7 +3,7 @@ Written By: Adam Radford - Copyright (C) 2004 Applied Micro Circuits Corporation. + Copyright (C) 2004-2005 Applied Micro Circuits Corporation. 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 @@ -293,7 +293,6 @@ #define TW_RESPONSE_ID_MASK 0x00000FF0 /* PCI related defines */ -#define TW_DEVICE_NAME "3w-9xxx" #define TW_NUMDEVICES 1 #define TW_PCI_CLEAR_PARITY_ERRORS 0xc100 #define TW_PCI_CLEAR_PCI_ABORT 0x2000 @@ -325,9 +324,9 @@ /* Compatibility defines */ #define TW_9000_ARCH_ID 0x5 -#define TW_CURRENT_FW_SRL 24 -#define TW_CURRENT_FW_BUILD 5 -#define TW_CURRENT_FW_BRANCH 1 +#define TW_CURRENT_DRIVER_SRL 28 +#define TW_CURRENT_DRIVER_BUILD 9 +#define TW_CURRENT_DRIVER_BRANCH 4 /* Phase defines */ #define TW_PHASE_INITIAL 0 @@ -346,19 +345,10 @@ #define TW_BUNDLED_FW_SAFE_TO_FLASH 0x4 #define TW_CTLR_FW_RECOMMENDS_FLASH 0x8 #define TW_CTLR_FW_COMPATIBLE 0x2 -#define TW_BASE_FW_SRL 0x17 +#define TW_BASE_FW_SRL 24 #define TW_BASE_FW_BRANCH 0 #define TW_BASE_FW_BUILD 1 -#if BITS_PER_LONG > 32 -#define TW_APACHE_MAX_SGL_LENGTH 72 -#define TW_ESCALADE_MAX_SGL_LENGTH 41 -#define TW_APACHE_CMD_PKT_SIZE 5 -#else -#define TW_APACHE_MAX_SGL_LENGTH 109 -#define TW_ESCALADE_MAX_SGL_LENGTH 62 -#define TW_APACHE_CMD_PKT_SIZE 4 -#endif -#define TW_ATA_PASS_SGL_MAX 60 +#define TW_FW_SRL_LUNS_SUPPORTED 28 #define TW_Q_LENGTH 256 #define TW_Q_START 0 #define TW_MAX_SLOT 32 @@ -366,7 +356,7 @@ #define TW_MAX_CMDS_PER_LUN 254 #define TW_MAX_RESPONSE_DRAIN 256 #define TW_MAX_AEN_DRAIN 40 -#define TW_IN_IOCTL 2 +#define TW_IN_RESET 2 #define TW_IN_CHRDEV_IOCTL 3 #define TW_IN_ATTENTION_LOOP 4 #define TW_MAX_SECTORS 256 @@ -424,13 +414,6 @@ #define TW_DRIVER TW_MESSAGE_SOURCE_LINUX_DRIVER #define TW_MESSAGE_SOURCE_LINUX_OS 9 #define TW_OS TW_MESSAGE_SOURCE_LINUX_OS -#if BITS_PER_LONG > 32 -#define TW_COMMAND_SIZE 5 -#define TW_DMA_MASK DMA_64BIT_MASK -#else -#define TW_COMMAND_SIZE 4 -#define TW_DMA_MASK DMA_32BIT_MASK -#endif #ifndef PCI_DEVICE_ID_3WARE_9000 #define PCI_DEVICE_ID_3WARE_9000 0x1002 #endif @@ -451,14 +434,14 @@ /* reserved_1: 4, response_id: 8, reserved_2: 20 */ #define TW_RESID_OUT(x) ((x >> 4) & 0xff) +/* request_id: 12, lun: 4 */ +#define TW_REQ_LUN_IN(lun, request_id) (((lun << 12) & 0xf000) | (request_id & 0xfff)) +#define TW_LUN_OUT(lun) ((lun >> 12) & 0xf) + /* Macros */ #define TW_CONTROL_REG_ADDR(x) (x->base_addr) #define TW_STATUS_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x4) -#if BITS_PER_LONG > 32 -#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x20) -#else -#define TW_COMMAND_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0x8) -#endif +#define TW_COMMAND_QUEUE_REG_ADDR(x) (sizeof(dma_addr_t) > 4 ? ((unsigned char __iomem *)x->base_addr + 0x20) : ((unsigned char __iomem *)x->base_addr + 0x8)) #define TW_RESPONSE_QUEUE_REG_ADDR(x) ((unsigned char __iomem *)x->base_addr + 0xC) #define TW_CLEAR_ALL_INTERRUPTS(x) (writel(TW_STATUS_VALID_INTERRUPT, TW_CONTROL_REG_ADDR(x))) #define TW_CLEAR_ATTENTION_INTERRUPT(x) (writel(TW_CONTROL_CLEAR_ATTENTION_INTERRUPT, TW_CONTROL_REG_ADDR(x))) @@ -480,12 +463,17 @@ else \ printk(KERN_WARNING "3w-9xxx: ERROR: (0x%02X:0x%04X): %s.\n",a,b,c); \ } +#define TW_MAX_LUNS(srl) (srl < TW_FW_SRL_LUNS_SUPPORTED ? 1 : 16) +#define TW_COMMAND_SIZE (sizeof(dma_addr_t) > 4 ? 5 : 4) +#define TW_APACHE_MAX_SGL_LENGTH (sizeof(dma_addr_t) > 4 ? 72 : 109) +#define TW_ESCALADE_MAX_SGL_LENGTH (sizeof(dma_addr_t) > 4 ? 41 : 62) +#define TW_PADDING_LENGTH (sizeof(dma_addr_t) > 4 ? 8 : 0) #pragma pack(1) /* Scatter Gather List Entry */ typedef struct TAG_TW_SG_Entry { - unsigned long address; + dma_addr_t address; u32 length; } TW_SG_Entry; @@ -506,42 +494,27 @@ struct { u32 lba; TW_SG_Entry sgl[TW_ESCALADE_MAX_SGL_LENGTH]; -#if BITS_PER_LONG > 32 - u32 padding[2]; /* pad to 512 bytes */ -#else - u32 padding; -#endif + dma_addr_t padding; } io; struct { TW_SG_Entry sgl[TW_ESCALADE_MAX_SGL_LENGTH]; -#if BITS_PER_LONG > 32 - u32 padding[3]; -#else - u32 padding[2]; -#endif + u32 padding; + dma_addr_t padding2; } param; } byte8_offset; } TW_Command; -/* Scatter gather element for 9000+ controllers */ -typedef struct TAG_TW_SG_Apache { - unsigned long address; - u32 length; -} TW_SG_Apache; - /* Command Packet for 9000+ controllers */ typedef struct TAG_TW_Command_Apache { unsigned char opcode__reserved; unsigned char unit; - unsigned short request_id; + unsigned short request_id__lunl; unsigned char status; unsigned char sgl_offset; - unsigned short sgl_entries; + unsigned short sgl_entries__lunh; unsigned char cdb[16]; - TW_SG_Apache sg_list[TW_APACHE_MAX_SGL_LENGTH]; -#if BITS_PER_LONG > 32 - unsigned char padding[8]; -#endif + TW_SG_Entry sg_list[TW_APACHE_MAX_SGL_LENGTH]; + unsigned char padding[TW_PADDING_LENGTH]; } TW_Command_Apache; /* New command packet header */ @@ -652,14 +625,20 @@ unsigned short working_srl; unsigned short working_branch; unsigned short working_build; + unsigned short driver_srl_high; + unsigned short driver_branch_high; + unsigned short driver_build_high; + unsigned short driver_srl_low; + unsigned short driver_branch_low; + unsigned short driver_build_low; } TW_Compatibility_Info; typedef struct TAG_TW_Device_Extension { u32 __iomem *base_addr; unsigned long *generic_buffer_virt[TW_Q_LENGTH]; - unsigned long generic_buffer_phys[TW_Q_LENGTH]; + dma_addr_t generic_buffer_phys[TW_Q_LENGTH]; TW_Command_Full *command_packet_virt[TW_Q_LENGTH]; - unsigned long command_packet_phys[TW_Q_LENGTH]; + dma_addr_t command_packet_phys[TW_Q_LENGTH]; struct pci_dev *tw_pci_dev; struct scsi_cmnd *srb[TW_Q_LENGTH]; unsigned char free_queue[TW_Q_LENGTH]; @@ -675,7 +654,6 @@ unsigned int max_pending_request_count; unsigned int max_sgl_entries; unsigned int sgl_entries; - unsigned int num_aborts; unsigned int num_resets; unsigned int sector_count; unsigned int max_sector_count; diff -Nru a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c --- a/drivers/scsi/3w-xxxx.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/scsi/3w-xxxx.c 2005-03-30 16:58:50 -08:00 @@ -6,7 +6,7 @@ Arnaldo Carvalho de Melo Brad Strand - Copyright (C) 1999-2004 3ware Inc. + Copyright (C) 1999-2005 3ware Inc. Kernel compatiblity By: Andre Hedrick Non-Copyright (C) 2000 Andre Hedrick @@ -185,6 +185,12 @@ Fix data_buffer_length usage in tw_chrdev_ioctl(). Update contact information. 1.26.02.000 - Convert driver to pci_driver format. + 1.26.02.001 - Increase max ioctl buffer size to 512 sectors. + Make tw_scsi_queue() return 0 for 'Unknown scsi opcode'. + Fix tw_remove() to free irq handler/unregister_chrdev() + before shutting down card. + Change to new 'change_queue_depth' api. + Fix 'handled=1' ISR usage, remove bogus IRQ check. */ #include @@ -207,7 +213,7 @@ #include "3w-xxxx.h" /* Globals */ -#define TW_DRIVER_VERSION "1.26.02.000" +#define TW_DRIVER_VERSION "1.26.02.001" static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; static int tw_device_extension_count = 0; static int twe_major = -1; @@ -509,33 +515,13 @@ } /* End tw_show_stats() */ /* This function will set a devices queue depth */ -static ssize_t tw_store_queue_depth(struct device *dev, const char *buf, size_t count) +static int tw_change_queue_depth(struct scsi_device *sdev, int queue_depth) { - int queue_depth; - struct scsi_device *sdev = to_scsi_device(dev); - - queue_depth = simple_strtoul(buf, NULL, 0); if (queue_depth > TW_Q_LENGTH-2) - return -EINVAL; + queue_depth = TW_Q_LENGTH-2; scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); - - return count; -} /* End tw_store_queue_depth() */ - -/* Create sysfs 'queue_depth' entry */ -static struct device_attribute tw_queue_depth_attr = { - .attr = { - .name = "queue_depth", - .mode = S_IRUSR | S_IWUSR, - }, - .store = tw_store_queue_depth -}; - -/* Device attributes initializer */ -static struct device_attribute *tw_dev_attrs[] = { - &tw_queue_depth_attr, - NULL, -}; + return queue_depth; +} /* End tw_change_queue_depth() */ /* Create sysfs 'stats' entry */ static struct class_device_attribute tw_host_stats_attr = { @@ -910,7 +896,7 @@ goto out; /* Check size */ - if (data_buffer_length > TW_MAX_SECTORS * 512) { + if (data_buffer_length > TW_MAX_IOCTL_SECTORS * 512) { retval = -EINVAL; goto out; } @@ -995,7 +981,7 @@ timeout = TW_IOCTL_CHRDEV_TIMEOUT*HZ; /* Now wait for the command to complete */ - timeout = wait_event_interruptible_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); + timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); /* See if we reset while waiting for the ioctl to complete */ if (test_bit(TW_IN_RESET, &tw_dev->flags)) { @@ -1004,16 +990,11 @@ goto out2; } - /* Check if we timed out, got a signal, or didn't get - an interrupt */ - if ((timeout <= 0) && (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE)) { + /* We timed out, and didn't get an interrupt */ + if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { /* Now we need to reset the board */ - if (timeout == -ERESTARTSYS) { - retval = timeout; - } else { - printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd); - retval = -EIO; - } + printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd); + retval = -EIO; spin_lock_irqsave(tw_dev->host->host_lock, flags); tw_dev->state[request_id] = TW_S_COMPLETED; tw_state_request_finish(tw_dev, request_id); @@ -2060,7 +2041,7 @@ tw_state_request_finish(tw_dev, request_id); SCpnt->result = (DID_BAD_TARGET << 16); done(SCpnt); - goto out; + retval = 0; } if (retval) { tw_dev->state[request_id] = TW_S_COMPLETED; @@ -2069,7 +2050,6 @@ done(SCpnt); retval = 0; } -out: return retval; } /* End tw_scsi_queue() */ @@ -2088,183 +2068,180 @@ /* Get the host lock for io completions */ spin_lock(tw_dev->host->host_lock); - /* See if the interrupt matches this instance */ - if (tw_dev->tw_pci_dev->irq == (unsigned int)irq) { + /* Read the registers */ + status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev)); - handled = 1; + /* Check if this is our interrupt, otherwise bail */ + if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT)) + goto tw_interrupt_bail; - /* Read the registers */ - status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev)); + handled = 1; - /* Check if this is our interrupt, otherwise bail */ - if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT)) + /* Check controller for errors */ + if (tw_check_bits(status_reg_value)) { + dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); + if (tw_decode_bits(tw_dev, status_reg_value, 1)) { + TW_CLEAR_ALL_INTERRUPTS(tw_dev); goto tw_interrupt_bail; - - /* Check controller for errors */ - if (tw_check_bits(status_reg_value)) { - dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); - if (tw_decode_bits(tw_dev, status_reg_value, 1)) { - TW_CLEAR_ALL_INTERRUPTS(tw_dev); - goto tw_interrupt_bail; - } } + } - /* Handle host interrupt */ - if (status_reg_value & TW_STATUS_HOST_INTERRUPT) { - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Received host interrupt.\n"); - TW_CLEAR_HOST_INTERRUPT(tw_dev); + /* Handle host interrupt */ + if (status_reg_value & TW_STATUS_HOST_INTERRUPT) { + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Received host interrupt.\n"); + TW_CLEAR_HOST_INTERRUPT(tw_dev); + } + + /* Handle attention interrupt */ + if (status_reg_value & TW_STATUS_ATTENTION_INTERRUPT) { + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Received attention interrupt.\n"); + TW_CLEAR_ATTENTION_INTERRUPT(tw_dev); + tw_state_request_start(tw_dev, &request_id); + error = tw_aen_read_queue(tw_dev, request_id); + if (error) { + printk(KERN_WARNING "3w-xxxx: scsi%d: Error reading aen queue.\n", tw_dev->host->host_no); + tw_dev->state[request_id] = TW_S_COMPLETED; + tw_state_request_finish(tw_dev, request_id); } + } - /* Handle attention interrupt */ - if (status_reg_value & TW_STATUS_ATTENTION_INTERRUPT) { - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Received attention interrupt.\n"); - TW_CLEAR_ATTENTION_INTERRUPT(tw_dev); - tw_state_request_start(tw_dev, &request_id); - error = tw_aen_read_queue(tw_dev, request_id); - if (error) { - printk(KERN_WARNING "3w-xxxx: scsi%d: Error reading aen queue.\n", tw_dev->host->host_no); - tw_dev->state[request_id] = TW_S_COMPLETED; - tw_state_request_finish(tw_dev, request_id); + /* Handle command interrupt */ + if (status_reg_value & TW_STATUS_COMMAND_INTERRUPT) { + /* Drain as many pending commands as we can */ + while (tw_dev->pending_request_count > 0) { + request_id = tw_dev->pending_queue[tw_dev->pending_head]; + if (tw_dev->state[request_id] != TW_S_PENDING) { + printk(KERN_WARNING "3w-xxxx: scsi%d: Found request id that wasn't pending.\n", tw_dev->host->host_no); + break; + } + if (tw_post_command_packet(tw_dev, request_id)==0) { + if (tw_dev->pending_head == TW_Q_LENGTH-1) { + tw_dev->pending_head = TW_Q_START; + } else { + tw_dev->pending_head = tw_dev->pending_head + 1; + } + tw_dev->pending_request_count--; + } else { + /* If we get here, we will continue re-posting on the next command interrupt */ + break; } } + /* If there are no more pending requests, we mask command interrupt */ + if (tw_dev->pending_request_count == 0) + TW_MASK_COMMAND_INTERRUPT(tw_dev); + } + + /* Handle response interrupt */ + if (status_reg_value & TW_STATUS_RESPONSE_INTERRUPT) { + /* Drain the response queue from the board */ + while ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) { + /* Read response queue register */ + response_que.value = inl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); + request_id = TW_RESID_OUT(response_que.response_id); + command_packet = (TW_Command *)tw_dev->command_packet_virtual_address[request_id]; + error = 0; - /* Handle command interrupt */ - if (status_reg_value & TW_STATUS_COMMAND_INTERRUPT) { - /* Drain as many pending commands as we can */ - while (tw_dev->pending_request_count > 0) { - request_id = tw_dev->pending_queue[tw_dev->pending_head]; - if (tw_dev->state[request_id] != TW_S_PENDING) { - printk(KERN_WARNING "3w-xxxx: scsi%d: Found request id that wasn't pending.\n", tw_dev->host->host_no); - break; - } - if (tw_post_command_packet(tw_dev, request_id)==0) { - if (tw_dev->pending_head == TW_Q_LENGTH-1) { - tw_dev->pending_head = TW_Q_START; - } else { - tw_dev->pending_head = tw_dev->pending_head + 1; - } - tw_dev->pending_request_count--; + /* Check for bad response */ + if (command_packet->status != 0) { + /* If internal command, don't error, don't fill sense */ + if (tw_dev->srb[request_id] == NULL) { + tw_decode_sense(tw_dev, request_id, 0); } else { - /* If we get here, we will continue re-posting on the next command interrupt */ - break; + error = tw_decode_sense(tw_dev, request_id, 1); } } - /* If there are no more pending requests, we mask command interrupt */ - if (tw_dev->pending_request_count == 0) - TW_MASK_COMMAND_INTERRUPT(tw_dev); - } - - /* Handle response interrupt */ - if (status_reg_value & TW_STATUS_RESPONSE_INTERRUPT) { - /* Drain the response queue from the board */ - while ((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) { - /* Read response queue register */ - response_que.value = inl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); - request_id = TW_RESID_OUT(response_que.response_id); - command_packet = (TW_Command *)tw_dev->command_packet_virtual_address[request_id]; - error = 0; - - /* Check for bad response */ - if (command_packet->status != 0) { - /* If internal command, don't error, don't fill sense */ - if (tw_dev->srb[request_id] == NULL) { - tw_decode_sense(tw_dev, request_id, 0); - } else { - error = tw_decode_sense(tw_dev, request_id, 1); - } - } - /* Check for correct state */ - if (tw_dev->state[request_id] != TW_S_POSTED) { - if (tw_dev->srb[request_id] != NULL) { - printk(KERN_WARNING "3w-xxxx: scsi%d: Received a request id that wasn't posted.\n", tw_dev->host->host_no); - error = 1; - } + /* Check for correct state */ + if (tw_dev->state[request_id] != TW_S_POSTED) { + if (tw_dev->srb[request_id] != NULL) { + printk(KERN_WARNING "3w-xxxx: scsi%d: Received a request id that wasn't posted.\n", tw_dev->host->host_no); + error = 1; } + } - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Response queue request id: %d.\n", request_id); + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): Response queue request id: %d.\n", request_id); - /* Check for internal command completion */ - if (tw_dev->srb[request_id] == NULL) { - dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Found internally posted command.\n"); - /* Check for chrdev ioctl completion */ - if (request_id != tw_dev->chrdev_request_id) { - retval = tw_aen_complete(tw_dev, request_id); - if (retval) { - printk(KERN_WARNING "3w-xxxx: scsi%d: Error completing aen.\n", tw_dev->host->host_no); - } - } else { - tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; - wake_up(&tw_dev->ioctl_wqueue); + /* Check for internal command completion */ + if (tw_dev->srb[request_id] == NULL) { + dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Found internally posted command.\n"); + /* Check for chrdev ioctl completion */ + if (request_id != tw_dev->chrdev_request_id) { + retval = tw_aen_complete(tw_dev, request_id); + if (retval) { + printk(KERN_WARNING "3w-xxxx: scsi%d: Error completing aen.\n", tw_dev->host->host_no); } } else { + tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; + wake_up(&tw_dev->ioctl_wqueue); + } + } else { switch (tw_dev->srb[request_id]->cmnd[0]) { - case READ_10: - case READ_6: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_10/READ_6\n"); - break; - case WRITE_10: - case WRITE_6: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught WRITE_10/WRITE_6\n"); - break; - case TEST_UNIT_READY: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught TEST_UNIT_READY\n"); - error = tw_scsiop_test_unit_ready_complete(tw_dev, request_id); - break; - case INQUIRY: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught INQUIRY\n"); - error = tw_scsiop_inquiry_complete(tw_dev, request_id); - break; - case READ_CAPACITY: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_CAPACITY\n"); - error = tw_scsiop_read_capacity_complete(tw_dev, request_id); - break; - case MODE_SENSE: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught MODE_SENSE\n"); - error = tw_scsiop_mode_sense_complete(tw_dev, request_id); - break; - case SYNCHRONIZE_CACHE: - dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught SYNCHRONIZE_CACHE\n"); - break; - default: - printk(KERN_WARNING "3w-xxxx: case slip in tw_interrupt()\n"); - error = 1; - } - - /* If no error command was a success */ - if (error == 0) { - tw_dev->srb[request_id]->result = (DID_OK << 16); - } + case READ_10: + case READ_6: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_10/READ_6\n"); + break; + case WRITE_10: + case WRITE_6: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught WRITE_10/WRITE_6\n"); + break; + case TEST_UNIT_READY: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught TEST_UNIT_READY\n"); + error = tw_scsiop_test_unit_ready_complete(tw_dev, request_id); + break; + case INQUIRY: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught INQUIRY\n"); + error = tw_scsiop_inquiry_complete(tw_dev, request_id); + break; + case READ_CAPACITY: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_CAPACITY\n"); + error = tw_scsiop_read_capacity_complete(tw_dev, request_id); + break; + case MODE_SENSE: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught MODE_SENSE\n"); + error = tw_scsiop_mode_sense_complete(tw_dev, request_id); + break; + case SYNCHRONIZE_CACHE: + dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught SYNCHRONIZE_CACHE\n"); + break; + default: + printk(KERN_WARNING "3w-xxxx: case slip in tw_interrupt()\n"); + error = 1; + } - /* If error, command failed */ - if (error == 1) { - /* Ask for a host reset */ - tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); - } + /* If no error command was a success */ + if (error == 0) { + tw_dev->srb[request_id]->result = (DID_OK << 16); + } - /* Now complete the io */ - if ((error != TW_ISR_DONT_COMPLETE)) { - tw_dev->state[request_id] = TW_S_COMPLETED; - tw_state_request_finish(tw_dev, request_id); - tw_dev->posted_request_count--; - tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); + /* If error, command failed */ + if (error == 1) { + /* Ask for a host reset */ + tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); + } - tw_unmap_scsi_data(tw_dev->tw_pci_dev, tw_dev->srb[request_id]); - } + /* Now complete the io */ + if ((error != TW_ISR_DONT_COMPLETE)) { + tw_dev->state[request_id] = TW_S_COMPLETED; + tw_state_request_finish(tw_dev, request_id); + tw_dev->posted_request_count--; + tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); + + tw_unmap_scsi_data(tw_dev->tw_pci_dev, tw_dev->srb[request_id]); } + } - /* Check for valid status after each drain */ - status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev)); - if (tw_check_bits(status_reg_value)) { - dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); - if (tw_decode_bits(tw_dev, status_reg_value, 1)) { - TW_CLEAR_ALL_INTERRUPTS(tw_dev); - goto tw_interrupt_bail; - } + /* Check for valid status after each drain */ + status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev)); + if (tw_check_bits(status_reg_value)) { + dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); + if (tw_decode_bits(tw_dev, status_reg_value, 1)) { + TW_CLEAR_ALL_INTERRUPTS(tw_dev); + goto tw_interrupt_bail; } } } } + tw_interrupt_bail: spin_unlock(tw_dev->host->host_lock); return IRQ_RETVAL(handled); @@ -2304,6 +2281,7 @@ .queuecommand = tw_scsi_queue, .eh_host_reset_handler = tw_scsi_eh_reset, .bios_param = tw_scsi_biosparam, + .change_queue_depth = tw_change_queue_depth, .can_queue = TW_Q_LENGTH-2, .this_id = -1, .sg_tablesize = TW_MAX_SGL_LENGTH, @@ -2311,7 +2289,6 @@ .cmd_per_lun = TW_MAX_CMDS_PER_LUN, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = tw_host_attrs, - .sdev_attrs = tw_dev_attrs, .emulated = 1 }; @@ -2438,22 +2415,23 @@ scsi_remove_host(tw_dev->host); - __tw_shutdown(tw_dev); + /* Unregister character device */ + if (twe_major >= 0) { + unregister_chrdev(twe_major, "twe"); + twe_major = -1; + } /* Free up the IRQ */ free_irq(tw_dev->tw_pci_dev->irq, tw_dev); + /* Shutdown the card */ + __tw_shutdown(tw_dev); + /* Free up the mem region */ pci_release_regions(pdev); /* Free up device extension resources */ tw_free_device_extension(tw_dev); - - /* Unregister character device */ - if (twe_major >= 0) { - unregister_chrdev(twe_major, "twe"); - twe_major = -1; - } scsi_host_put(tw_dev->host); pci_disable_device(pdev); diff -Nru a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h --- a/drivers/scsi/3w-xxxx.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/3w-xxxx.h 2005-03-30 16:58:47 -08:00 @@ -6,7 +6,7 @@ Arnaldo Carvalho de Melo Brad Strand - Copyright (C) 1999-2004 3ware Inc. + Copyright (C) 1999-2005 3ware Inc. Kernel compatiblity By: Andre Hedrick Non-Copyright (C) 2000 Andre Hedrick @@ -227,6 +227,7 @@ #define TW_IN_RESET 2 #define TW_IN_CHRDEV_IOCTL 3 #define TW_MAX_SECTORS 256 +#define TW_MAX_IOCTL_SECTORS 512 #define TW_AEN_WAIT_TIME 1000 #define TW_IOCTL_WAIT_TIME (1 * HZ) /* 1 second */ #define TW_ISR_DONT_COMPLETE 2 diff -Nru a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c --- a/drivers/scsi/53c700.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/53c700.c 2005-03-30 16:58:47 -08:00 @@ -167,7 +167,6 @@ #include "53c700_d.h" -STATIC irqreturn_t NCR_700_intr(int irq, void *dev_id, struct pt_regs *regs); STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *)); STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt); STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt); @@ -297,8 +296,7 @@ struct Scsi_Host * NCR_700_detect(struct scsi_host_template *tpnt, - struct NCR_700_Host_Parameters *hostdata, struct device *dev, - unsigned long irq, u8 scsi_id) + struct NCR_700_Host_Parameters *hostdata, struct device *dev) { dma_addr_t pScript, pSlots; __u8 *memory; @@ -394,8 +392,6 @@ host->unique_id = hostdata->base; host->base = hostdata->base; hostdata->eh_complete = NULL; - host->irq = irq; - host->this_id = scsi_id; host->hostdata[0] = (unsigned long)hostdata; /* kick the chip */ NCR_700_writeb(0xff, host, CTEST9_REG); @@ -416,28 +412,16 @@ /* reset the chip */ NCR_700_chip_reset(host); - if (request_irq(irq, NCR_700_intr, SA_SHIRQ, dev->bus_id, host)) { - dev_printk(KERN_ERR, dev, "53c700: irq %lu request failed\n ", - irq); - goto out_put_host; - } - if (scsi_add_host(host, dev)) { dev_printk(KERN_ERR, dev, "53c700: scsi_add_host failed\n"); - goto out_release_irq; + scsi_host_put(host); + return NULL; } spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD : SPI_SIGNAL_SE; return host; - - out_release_irq: - free_irq(irq, host); - out_put_host: - scsi_host_put(host); - - return NULL; } int @@ -1489,7 +1473,7 @@ return 1; } -STATIC irqreturn_t +irqreturn_t NCR_700_intr(int irq, void *dev_id, struct pt_regs *regs) { struct Scsi_Host *host = (struct Scsi_Host *)dev_id; @@ -2164,6 +2148,7 @@ EXPORT_SYMBOL(NCR_700_detect); EXPORT_SYMBOL(NCR_700_release); +EXPORT_SYMBOL(NCR_700_intr); static struct spi_function_template NCR_700_transport_functions = { .set_period = NCR_700_set_period, diff -Nru a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h --- a/drivers/scsi/53c700.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/53c700.h 2005-03-30 16:58:47 -08:00 @@ -60,9 +60,9 @@ /* These are the externally used routines */ struct Scsi_Host *NCR_700_detect(struct scsi_host_template *, - struct NCR_700_Host_Parameters *, struct device *, - unsigned long, u8); + struct NCR_700_Host_Parameters *, struct device *); int NCR_700_release(struct Scsi_Host *host); +irqreturn_t NCR_700_intr(int, void *, struct pt_regs *); enum NCR_700_Host_State { diff -Nru a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c --- a/drivers/scsi/NCR_D700.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/NCR_D700.c 2005-03-30 16:58:47 -08:00 @@ -97,6 +97,7 @@ #include #include #include +#include #include #include #include @@ -168,11 +169,13 @@ struct NCR_D700_private { struct device *dev; struct Scsi_Host *hosts[2]; + char name[30]; + char pad; }; static int -NCR_D700_probe_one(struct NCR_D700_private *p, int siop, - int irq, int slot, u32 region, int differential) +NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, + int slot, u32 region, int differential) { struct NCR_700_Host_Parameters *hostdata; struct Scsi_Host *host; @@ -201,18 +204,18 @@ NCR_700_set_io_mapped(hostdata); /* and register the siop */ - host = NCR_700_detect(&NCR_D700_driver_template, hostdata, - p->dev, irq, - /* FIXME: read this from SUS */ - id_array[slot * 2 + siop]); + host = NCR_700_detect(&NCR_D700_driver_template, hostdata, p->dev); if (!host) { ret = -ENOMEM; goto detect_failed; } + p->hosts[siop] = host; + /* FIXME: read this from SUS */ + host->this_id = id_array[slot * 2 + siop]; + host->irq = irq; scsi_scan_host(host); - p->hosts[siop] = host; return 0; detect_failed: @@ -223,6 +226,20 @@ return ret; } +static int +NCR_D700_intr(int irq, void *data, struct pt_regs *regs) +{ + struct NCR_D700_private *p = (struct NCR_D700_private *)data; + int i, found = 0; + + for (i = 0; i < 2; i++) + if (p->hosts[i] && + NCR_700_intr(irq, p->hosts[i], regs) == IRQ_HANDLED) + found++; + + return found ? IRQ_HANDLED : IRQ_NONE; +} + /* Detect a D700 card. Note, because of the setup --- the chips are * essentially connectecd to the MCA bus independently, it is easier * to set them up as two separate host adapters, rather than one @@ -301,13 +318,19 @@ p = kmalloc(sizeof(*p), GFP_KERNEL); if (!p) return -ENOMEM; + memset(p, '\0', sizeof(*p)); p->dev = dev; - + snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id); + if (request_irq(irq, NCR_D700_intr, SA_SHIRQ, p->name, p)) { + printk(KERN_ERR "D700: request_irq failed\n"); + kfree(p); + return -EBUSY; + } /* plumb in both 700 chips */ for (i = 0; i < 2; i++) { int err; - if ((err = NCR_D700_probe_one(p, i, irq, slot, + if ((err = NCR_D700_probe_one(p, i, slot, irq, offset_addr + (0x80 * i), differential)) != 0) printk("D700: SIOP%d: probe failed, error = %d\n", diff -Nru a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c --- a/drivers/scsi/NCR_Q720.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/NCR_Q720.c 2005-03-30 16:58:47 -08:00 @@ -225,7 +225,7 @@ /* The first 1k of the memory buffer is a memory map of the registers */ - mem_base = (__u32)dma_mark_declared_memory_occupied(dev, base_addr, + mem_base = dma_mark_declared_memory_occupied(dev, base_addr, 1024); if (IS_ERR(mem_base)) { printk("NCR_Q720 failed to reserve memory mapped region\n"); diff -Nru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/aacraid/aachba.c 2005-03-30 16:58:48 -08:00 @@ -195,10 +195,12 @@ = (struct aac_get_config_status_resp *) fib_data(fibptr); dprintk((KERN_WARNING "aac_get_config_status: response=%d status=%d action=%d\n", - reply->response, reply->status, reply->data.action)); - if ((reply->response != ST_OK) - || (reply->status != CT_OK) - || (reply->data.action > CFACT_PAUSE)) { + le32_to_cpu(reply->response), + le32_to_cpu(reply->status), + le32_to_cpu(reply->data.action))); + if ((le32_to_cpu(reply->response) != ST_OK) || + (le32_to_cpu(reply->status) != CT_OK) || + (le32_to_cpu(reply->data.action) > CFACT_PAUSE)) { printk(KERN_WARNING "aac_get_config_status: Will not issue the Commit Configuration\n"); status = -EINVAL; } @@ -265,7 +267,7 @@ NULL, NULL); if (status >= 0) { dresp = (struct aac_get_container_count_resp *)fib_data(fibptr); - maximum_num_containers = dresp->ContainerSwitchEntries; + maximum_num_containers = le32_to_cpu(dresp->ContainerSwitchEntries); fib_complete(fibptr); } @@ -624,25 +626,28 @@ memcpy(&dev->adapter_info, info, sizeof(struct aac_adapter_info)); - tmp = dev->adapter_info.kernelrev; - printk(KERN_INFO"%s%d: kernel %d.%d.%d build %d\n", + tmp = le32_to_cpu(dev->adapter_info.kernelrev); + printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d]\n", + dev->name, + dev->id, + tmp>>24, + (tmp>>16)&0xff, + tmp&0xff, + le32_to_cpu(dev->adapter_info.kernelbuild)); + tmp = le32_to_cpu(dev->adapter_info.monitorrev); + printk(KERN_INFO "%s%d: monitor %d.%d-%d[%d]\n", dev->name, dev->id, - tmp>>24,(tmp>>16)&0xff,(tmp>>8)&0xff, - dev->adapter_info.kernelbuild); - tmp = dev->adapter_info.monitorrev; - printk(KERN_INFO"%s%d: monitor %d.%d.%d build %d\n", + tmp>>24,(tmp>>16)&0xff,tmp&0xff, + le32_to_cpu(dev->adapter_info.monitorbuild)); + tmp = le32_to_cpu(dev->adapter_info.biosrev); + printk(KERN_INFO "%s%d: bios %d.%d-%d[%d]\n", dev->name, dev->id, - tmp>>24,(tmp>>16)&0xff,(tmp>>8)&0xff, - dev->adapter_info.monitorbuild); - tmp = dev->adapter_info.biosrev; - printk(KERN_INFO"%s%d: bios %d.%d.%d build %d\n", + tmp>>24,(tmp>>16)&0xff,tmp&0xff, + le32_to_cpu(dev->adapter_info.biosbuild)); + if (le32_to_cpu(dev->adapter_info.serial[0]) != 0xBAD0) + printk(KERN_INFO "%s%d: serial %x\n", dev->name, dev->id, - tmp>>24,(tmp>>16)&0xff,(tmp>>8)&0xff, - dev->adapter_info.biosbuild); - printk(KERN_INFO"%s%d: serial %x%x\n", - dev->name, dev->id, - dev->adapter_info.serial[0], - dev->adapter_info.serial[1]); + le32_to_cpu(dev->adapter_info.serial[0])); dev->nondasd_support = 0; dev->raid_scsi_mode = 0; @@ -742,7 +747,8 @@ if (le32_to_cpu(readreply->status) == ST_OK) scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD; else { - printk(KERN_WARNING "read_callback: read failed, status = %d\n", readreply->status); + printk(KERN_WARNING "read_callback: read failed, status = %d\n", + le32_to_cpu(readreply->status)); scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION; set_sense((u8 *) &dev->fsa_dev[cid].sense_data, HARDWARE_ERROR, @@ -853,13 +859,15 @@ readcmd->cid = cpu_to_le16(cid); readcmd->sector_count = cpu_to_le16(count); readcmd->block = cpu_to_le32(lba); - readcmd->pad = cpu_to_le16(0); - readcmd->flags = cpu_to_le16(0); + readcmd->pad = 0; + readcmd->flags = 0; aac_build_sg64(scsicmd, &readcmd->sg); - if(readcmd->sg.count > MAX_DRIVER_SG_SEGMENT_COUNT) - BUG(); - fibsize = sizeof(struct aac_read64) + ((readcmd->sg.count - 1) * sizeof (struct sgentry64)); + fibsize = sizeof(struct aac_read64) + + ((le32_to_cpu(readcmd->sg.count) - 1) * + sizeof (struct sgentry64)); + BUG_ON (fibsize > (sizeof(struct hw_fib) - + sizeof(struct aac_fibhdr))); /* * Now send the Fib to the adapter */ @@ -882,9 +890,11 @@ BUG(); aac_build_sg(scsicmd, &readcmd->sg); - if(readcmd->sg.count > MAX_DRIVER_SG_SEGMENT_COUNT) - BUG(); - fibsize = sizeof(struct aac_read) + ((readcmd->sg.count - 1) * sizeof (struct sgentry)); + fibsize = sizeof(struct aac_read) + + ((le32_to_cpu(readcmd->sg.count) - 1) * + sizeof (struct sgentry)); + BUG_ON (fibsize > (sizeof(struct hw_fib) - + sizeof(struct aac_fibhdr))); /* * Now send the Fib to the adapter */ @@ -903,10 +913,7 @@ * Check that the command queued to the controller */ if (status == -EINPROGRESS) - { - dprintk("read queued.\n"); return 0; - } printk(KERN_WARNING "aac_read: fib_send failed with status: %d.\n", status); /* @@ -943,7 +950,8 @@ lba = (scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5]; count = (scsicmd->cmnd[7] << 8) | scsicmd->cmnd[8]; } - dprintk((KERN_DEBUG "aac_write[cpu %d]: lba = %u, t = %ld.\n", smp_processor_id(), lba, jiffies)); + dprintk((KERN_DEBUG "aac_write[cpu %d]: lba = %u, t = %ld.\n", + smp_processor_id(), (unsigned long long)lba, jiffies)); /* * Allocate and initialize a Fib then setup a BlockWrite command */ @@ -961,13 +969,15 @@ writecmd->cid = cpu_to_le16(cid); writecmd->sector_count = cpu_to_le16(count); writecmd->block = cpu_to_le32(lba); - writecmd->pad = cpu_to_le16(0); - writecmd->flags = cpu_to_le16(0); + writecmd->pad = 0; + writecmd->flags = 0; aac_build_sg64(scsicmd, &writecmd->sg); - if(writecmd->sg.count > MAX_DRIVER_SG_SEGMENT_COUNT) - BUG(); - fibsize = sizeof(struct aac_write64) + ((writecmd->sg.count - 1) * sizeof (struct sgentry64)); + fibsize = sizeof(struct aac_write64) + + ((le32_to_cpu(writecmd->sg.count) - 1) * + sizeof (struct sgentry64)); + BUG_ON (fibsize > (sizeof(struct hw_fib) - + sizeof(struct aac_fibhdr))); /* * Now send the Fib to the adapter */ @@ -993,9 +1003,11 @@ } aac_build_sg(scsicmd, &writecmd->sg); - if(writecmd->sg.count > MAX_DRIVER_SG_SEGMENT_COUNT) - BUG(); - fibsize = sizeof(struct aac_write) + ((writecmd->sg.count - 1) * sizeof (struct sgentry)); + fibsize = sizeof(struct aac_write) + + ((le32_to_cpu(writecmd->sg.count) - 1) * + sizeof (struct sgentry)); + BUG_ON (fibsize > (sizeof(struct hw_fib) - + sizeof(struct aac_fibhdr))); /* * Now send the Fib to the adapter */ @@ -1051,7 +1063,7 @@ u32 cid = ID_LUN_TO_CONTAINER(sdev->id, sdev->lun); printk(KERN_WARNING "synchronize_callback: synchronize failed, status = %d\n", - synchronizereply->status); + le32_to_cpu(synchronizereply->status)); cmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION; set_sense((u8 *)&dev->fsa_dev[cid].sense_data, @@ -1538,7 +1550,8 @@ * Calculate resid for sg */ - scsicmd->resid = scsicmd->request_bufflen - srbreply->data_xfer_length; + scsicmd->resid = scsicmd->request_bufflen - + le32_to_cpu(srbreply->data_xfer_length); if(scsicmd->use_sg) pci_unmap_sg(dev->pdev, @@ -1556,8 +1569,10 @@ if (le32_to_cpu(srbreply->status) != ST_OK){ int len; printk(KERN_WARNING "aac_srb_callback: srb failed, status = %d\n", le32_to_cpu(srbreply->status)); - len = (srbreply->sense_data_size > sizeof(scsicmd->sense_buffer))? - sizeof(scsicmd->sense_buffer):srbreply->sense_data_size; + len = (le32_to_cpu(srbreply->sense_data_size) > + sizeof(scsicmd->sense_buffer)) ? + sizeof(scsicmd->sense_buffer) : + le32_to_cpu(srbreply->sense_data_size); scsicmd->result = DID_ERROR << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_CHECK_CONDITION; memcpy(scsicmd->sense_buffer, srbreply->sense_data, len); } @@ -1693,7 +1708,7 @@ default: #ifdef AAC_DETAILED_STATUS_INFO printk("aacraid: SRB ERROR(%u) %s scsi cmd 0x%x - scsi status 0x%x\n", - le32_to_cpu(srbreply->srb_status & 0x3F), + le32_to_cpu(srbreply->srb_status) & 0x3F, aac_get_status_string( le32_to_cpu(srbreply->srb_status) & 0x3F), scsicmd->cmnd[0], @@ -1705,8 +1720,10 @@ if (le32_to_cpu(srbreply->scsi_status) == 0x02 ){ // Check Condition int len; scsicmd->result |= SAM_STAT_CHECK_CONDITION; - len = (srbreply->sense_data_size > sizeof(scsicmd->sense_buffer))? - sizeof(scsicmd->sense_buffer):srbreply->sense_data_size; + len = (le32_to_cpu(srbreply->sense_data_size) > + sizeof(scsicmd->sense_buffer)) ? + sizeof(scsicmd->sense_buffer) : + le32_to_cpu(srbreply->sense_data_size); #ifdef AAC_DETAILED_STATUS_INFO dprintk((KERN_WARNING "aac_srb_callback: check condition, status = %d len=%d\n", le32_to_cpu(srbreply->status), len)); @@ -1786,7 +1803,7 @@ timeout = 1; } srbcmd->timeout = cpu_to_le32(timeout); // timeout in seconds - srbcmd->retry_limit =cpu_to_le32(0); // Obsolete parameter + srbcmd->retry_limit = 0; /* Obsolete parameter */ srbcmd->cdb_size = cpu_to_le32(scsicmd->cmd_len); if( dev->dac_support == 1 ) { @@ -1798,13 +1815,19 @@ /* * Build Scatter/Gather list */ - fibsize = sizeof (struct aac_srb) + (((srbcmd->sg.count & 0xff) - 1) * sizeof (struct sgentry64)); + fibsize = sizeof (struct aac_srb) - sizeof (struct sgentry) + + ((le32_to_cpu(srbcmd->sg.count) & 0xff) * + sizeof (struct sgentry64)); + BUG_ON (fibsize > (sizeof(struct hw_fib) - + sizeof(struct aac_fibhdr))); /* * Now send the Fib to the adapter */ - status = fib_send(ScsiPortCommand64, cmd_fibcontext, fibsize, FsaNormal, 0, 1, - (fib_callback) aac_srb_callback, (void *) scsicmd); + status = fib_send(ScsiPortCommand64, cmd_fibcontext, + fibsize, FsaNormal, 0, 1, + (fib_callback) aac_srb_callback, + (void *) scsicmd); } else { aac_build_sg(scsicmd, (struct sgmap*)&srbcmd->sg); srbcmd->count = cpu_to_le32(scsicmd->request_bufflen); @@ -1814,7 +1837,11 @@ /* * Build Scatter/Gather list */ - fibsize = sizeof (struct aac_srb) + (((srbcmd->sg.count & 0xff) - 1) * sizeof (struct sgentry)); + fibsize = sizeof (struct aac_srb) + + (((le32_to_cpu(srbcmd->sg.count) & 0xff) - 1) * + sizeof (struct sgentry)); + BUG_ON (fibsize > (sizeof(struct hw_fib) - + sizeof(struct aac_fibhdr))); /* * Now send the Fib to the adapter @@ -1843,9 +1870,9 @@ dev = (struct aac_dev *)scsicmd->device->host->hostdata; // Get rid of old data - psg->count = cpu_to_le32(0); - psg->sg[0].addr = cpu_to_le32(0); - psg->sg[0].count = cpu_to_le32(0); + psg->count = 0; + psg->sg[0].addr = 0; + psg->sg[0].count = 0; if (scsicmd->use_sg) { struct scatterlist *sg; int i; @@ -1899,10 +1926,10 @@ dev = (struct aac_dev *)scsicmd->device->host->hostdata; // Get rid of old data - psg->count = cpu_to_le32(0); - psg->sg[0].addr[0] = cpu_to_le32(0); - psg->sg[0].addr[1] = cpu_to_le32(0); - psg->sg[0].count = cpu_to_le32(0); + psg->count = 0; + psg->sg[0].addr[0] = 0; + psg->sg[0].addr[1] = 0; + psg->sg[0].count = 0; if (scsicmd->use_sg) { struct scatterlist *sg; int i; diff -Nru a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h --- a/drivers/scsi/aacraid/aacraid.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/aacraid/aacraid.h 2005-03-30 16:58:47 -08:00 @@ -507,40 +507,32 @@ */ struct sa_drawbridge_CSR { - // Offset | Name - u32 reserved[10]; // 00h-27h | Reserved - u8 LUT_Offset; // 28h | Looup Table Offset - u8 reserved1[3]; // 29h-2bh | Reserved - u32 LUT_Data; // 2ch | Looup Table Data - u32 reserved2[26]; // 30h-97h | Reserved - u16 PRICLEARIRQ; // 98h | Primary Clear Irq - u16 SECCLEARIRQ; // 9ah | Secondary Clear Irq - u16 PRISETIRQ; // 9ch | Primary Set Irq - u16 SECSETIRQ; // 9eh | Secondary Set Irq - u16 PRICLEARIRQMASK; // a0h | Primary Clear Irq Mask - u16 SECCLEARIRQMASK; // a2h | Secondary Clear Irq Mask - u16 PRISETIRQMASK; // a4h | Primary Set Irq Mask - u16 SECSETIRQMASK; // a6h | Secondary Set Irq Mask - u32 MAILBOX0; // a8h | Scratchpad 0 - u32 MAILBOX1; // ach | Scratchpad 1 - u32 MAILBOX2; // b0h | Scratchpad 2 - u32 MAILBOX3; // b4h | Scratchpad 3 - u32 MAILBOX4; // b8h | Scratchpad 4 - u32 MAILBOX5; // bch | Scratchpad 5 - u32 MAILBOX6; // c0h | Scratchpad 6 - u32 MAILBOX7; // c4h | Scratchpad 7 - - u32 ROM_Setup_Data; // c8h | Rom Setup and Data - u32 ROM_Control_Addr; // cch | Rom Control and Address - - u32 reserved3[12]; // d0h-ffh | reserved - u32 LUT[64]; // 100h-1ffh| Lookup Table Entries - - // - // TO DO - // need to add DMA, I2O, UART, etc registers form 80h to 364h - // - + /* Offset | Name */ + __le32 reserved[10]; /* 00h-27h | Reserved */ + u8 LUT_Offset; /* 28h | Lookup Table Offset */ + u8 reserved1[3]; /* 29h-2bh | Reserved */ + __le32 LUT_Data; /* 2ch | Looup Table Data */ + __le32 reserved2[26]; /* 30h-97h | Reserved */ + __le16 PRICLEARIRQ; /* 98h | Primary Clear Irq */ + __le16 SECCLEARIRQ; /* 9ah | Secondary Clear Irq */ + __le16 PRISETIRQ; /* 9ch | Primary Set Irq */ + __le16 SECSETIRQ; /* 9eh | Secondary Set Irq */ + __le16 PRICLEARIRQMASK;/* a0h | Primary Clear Irq Mask */ + __le16 SECCLEARIRQMASK;/* a2h | Secondary Clear Irq Mask */ + __le16 PRISETIRQMASK; /* a4h | Primary Set Irq Mask */ + __le16 SECSETIRQMASK; /* a6h | Secondary Set Irq Mask */ + __le32 MAILBOX0; /* a8h | Scratchpad 0 */ + __le32 MAILBOX1; /* ach | Scratchpad 1 */ + __le32 MAILBOX2; /* b0h | Scratchpad 2 */ + __le32 MAILBOX3; /* b4h | Scratchpad 3 */ + __le32 MAILBOX4; /* b8h | Scratchpad 4 */ + __le32 MAILBOX5; /* bch | Scratchpad 5 */ + __le32 MAILBOX6; /* c0h | Scratchpad 6 */ + __le32 MAILBOX7; /* c4h | Scratchpad 7 */ + __le32 ROM_Setup_Data; /* c8h | Rom Setup and Data */ + __le32 ROM_Control_Addr;/* cch | Rom Control and Address */ + __le32 reserved3[12]; /* d0h-ffh | reserved */ + __le32 LUT[64]; /* 100h-1ffh | Lookup Table Entries */ }; #define Mailbox0 SaDbCSR.MAILBOX0 @@ -556,13 +548,13 @@ #define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ -#define DOORBELL_0 cpu_to_le16(0x0001) -#define DOORBELL_1 cpu_to_le16(0x0002) -#define DOORBELL_2 cpu_to_le16(0x0004) -#define DOORBELL_3 cpu_to_le16(0x0008) -#define DOORBELL_4 cpu_to_le16(0x0010) -#define DOORBELL_5 cpu_to_le16(0x0020) -#define DOORBELL_6 cpu_to_le16(0x0040) +#define DOORBELL_0 0x0001 +#define DOORBELL_1 0x0002 +#define DOORBELL_2 0x0004 +#define DOORBELL_3 0x0008 +#define DOORBELL_4 0x0010 +#define DOORBELL_5 0x0020 +#define DOORBELL_6 0x0040 #define PrintfReady DOORBELL_5 @@ -585,25 +577,29 @@ */ struct rx_mu_registers { - // Local | PCI* | Name - // | | - u32 ARSR; // 1300h | 00h | APIC Register Select Register - u32 reserved0; // 1304h | 04h | Reserved - u32 AWR; // 1308h | 08h | APIC Window Register - u32 reserved1; // 130Ch | 0Ch | Reserved - u32 IMRx[2]; // 1310h | 10h | Inbound Message Registers - u32 OMRx[2]; // 1318h | 18h | Outbound Message Registers - u32 IDR; // 1320h | 20h | Inbound Doorbell Register - u32 IISR; // 1324h | 24h | Inbound Interrupt Status Register - u32 IIMR; // 1328h | 28h | Inbound Interrupt Mask Register - u32 ODR; // 132Ch | 2Ch | Outbound Doorbell Register - u32 OISR; // 1330h | 30h | Outbound Interrupt Status Register - u32 OIMR; // 1334h | 34h | Outbound Interrupt Mask Register - // * Must access through ATU Inbound Translation Window + /* Local | PCI*| Name */ + __le32 ARSR; /* 1300h | 00h | APIC Register Select Register */ + __le32 reserved0; /* 1304h | 04h | Reserved */ + __le32 AWR; /* 1308h | 08h | APIC Window Register */ + __le32 reserved1; /* 130Ch | 0Ch | Reserved */ + __le32 IMRx[2]; /* 1310h | 10h | Inbound Message Registers */ + __le32 OMRx[2]; /* 1318h | 18h | Outbound Message Registers */ + __le32 IDR; /* 1320h | 20h | Inbound Doorbell Register */ + __le32 IISR; /* 1324h | 24h | Inbound Interrupt + Status Register */ + __le32 IIMR; /* 1328h | 28h | Inbound Interrupt + Mask Register */ + __le32 ODR; /* 132Ch | 2Ch | Outbound Doorbell Register */ + __le32 OISR; /* 1330h | 30h | Outbound Interrupt + Status Register */ + __le32 OIMR; /* 1334h | 34h | Outbound Interrupt + Mask Register */ + /* * Must access through ATU Inbound + Translation Window */ }; struct rx_inbound { - u32 Mailbox[8]; + __le32 Mailbox[8]; }; #define InboundMailbox0 IndexRegs.Mailbox[0] @@ -613,28 +609,27 @@ #define InboundMailbox4 IndexRegs.Mailbox[4] #define InboundMailbox5 IndexRegs.Mailbox[5] #define InboundMailbox6 IndexRegs.Mailbox[6] -#define InboundMailbox7 IndexRegs.Mailbox[7] -#define INBOUNDDOORBELL_0 cpu_to_le32(0x00000001) -#define INBOUNDDOORBELL_1 cpu_to_le32(0x00000002) -#define INBOUNDDOORBELL_2 cpu_to_le32(0x00000004) -#define INBOUNDDOORBELL_3 cpu_to_le32(0x00000008) -#define INBOUNDDOORBELL_4 cpu_to_le32(0x00000010) -#define INBOUNDDOORBELL_5 cpu_to_le32(0x00000020) -#define INBOUNDDOORBELL_6 cpu_to_le32(0x00000040) - -#define OUTBOUNDDOORBELL_0 cpu_to_le32(0x00000001) -#define OUTBOUNDDOORBELL_1 cpu_to_le32(0x00000002) -#define OUTBOUNDDOORBELL_2 cpu_to_le32(0x00000004) -#define OUTBOUNDDOORBELL_3 cpu_to_le32(0x00000008) -#define OUTBOUNDDOORBELL_4 cpu_to_le32(0x00000010) +#define INBOUNDDOORBELL_0 0x00000001 +#define INBOUNDDOORBELL_1 0x00000002 +#define INBOUNDDOORBELL_2 0x00000004 +#define INBOUNDDOORBELL_3 0x00000008 +#define INBOUNDDOORBELL_4 0x00000010 +#define INBOUNDDOORBELL_5 0x00000020 +#define INBOUNDDOORBELL_6 0x00000040 + +#define OUTBOUNDDOORBELL_0 0x00000001 +#define OUTBOUNDDOORBELL_1 0x00000002 +#define OUTBOUNDDOORBELL_2 0x00000004 +#define OUTBOUNDDOORBELL_3 0x00000008 +#define OUTBOUNDDOORBELL_4 0x00000010 #define InboundDoorbellReg MUnit.IDR #define OutboundDoorbellReg MUnit.ODR struct rx_registers { - struct rx_mu_registers MUnit; // 1300h - 1334h - u32 reserved1[6]; // 1338h - 134ch + struct rx_mu_registers MUnit; /* 1300h - 1334h */ + __le32 reserved1[6]; /* 1338h - 134ch */ struct rx_inbound IndexRegs; }; @@ -652,7 +647,7 @@ struct rkt_registers { struct rkt_mu_registers MUnit; /* 1300h - 1334h */ - u32 reserved1[1010]; /* 1338h - 22fch */ + __le32 reserved1[1010]; /* 1338h - 22fch */ struct rkt_inbound IndexRegs; /* 2300h - */ }; @@ -824,6 +819,9 @@ #define AAC_OPT_NONDASD cpu_to_le32(1<<12) #define AAC_OPT_SCSI_MANAGED cpu_to_le32(1<<13) #define AAC_OPT_RAID_SCSI_MODE cpu_to_le32(1<<14) +#define AAC_OPT_SUPPLEMENT_ADAPTER_INFO cpu_to_le32(1<<16) +#define AAC_OPT_NEW_COMM cpu_to_le32(1<<17) +#define AAC_OPT_NEW_COMM_64 cpu_to_le32(1<<18) struct aac_dev { @@ -1482,15 +1480,19 @@ * Monitor/Kernel API */ -#define BREAKPOINT_REQUEST cpu_to_le32(0x00000004) -#define INIT_STRUCT_BASE_ADDRESS cpu_to_le32(0x00000005) -#define READ_PERMANENT_PARAMETERS cpu_to_le32(0x0000000a) -#define WRITE_PERMANENT_PARAMETERS cpu_to_le32(0x0000000b) -#define HOST_CRASHING cpu_to_le32(0x0000000d) -#define SEND_SYNCHRONOUS_FIB cpu_to_le32(0x0000000c) -#define COMMAND_POST_RESULTS cpu_to_le32(0x00000014) -#define GET_ADAPTER_PROPERTIES cpu_to_le32(0x00000019) -#define RE_INIT_ADAPTER cpu_to_le32(0x000000ee) +#define BREAKPOINT_REQUEST 0x00000004 +#define INIT_STRUCT_BASE_ADDRESS 0x00000005 +#define READ_PERMANENT_PARAMETERS 0x0000000a +#define WRITE_PERMANENT_PARAMETERS 0x0000000b +#define HOST_CRASHING 0x0000000d +#define SEND_SYNCHRONOUS_FIB 0x0000000c +#define COMMAND_POST_RESULTS 0x00000014 +#define GET_ADAPTER_PROPERTIES 0x00000019 +#define GET_DRIVER_BUFFER_PROPERTIES 0x00000023 +#define RCV_TEMP_READINGS 0x00000025 +#define GET_COMM_PREFERRED_SETTINGS 0x00000026 +#define IOP_RESET 0x00001000 +#define RE_INIT_ADAPTER 0x000000ee /* * Adapter Status Register @@ -1513,22 +1515,22 @@ * Phases are bit oriented. It is NOT valid to have multiple bits set */ -#define SELF_TEST_FAILED (cpu_to_le32(0x00000004)) -#define MONITOR_PANIC (cpu_to_le32(0x00000020)) -#define KERNEL_UP_AND_RUNNING (cpu_to_le32(0x00000080)) -#define KERNEL_PANIC (cpu_to_le32(0x00000100)) +#define SELF_TEST_FAILED 0x00000004 +#define MONITOR_PANIC 0x00000020 +#define KERNEL_UP_AND_RUNNING 0x00000080 +#define KERNEL_PANIC 0x00000100 /* * Doorbell bit defines */ -#define DoorBellSyncCmdAvailable cpu_to_le32(1<<0) // Host -> Adapter -#define DoorBellPrintfDone cpu_to_le32(1<<5) // Host -> Adapter -#define DoorBellAdapterNormCmdReady cpu_to_le32(1<<1) // Adapter -> Host -#define DoorBellAdapterNormRespReady cpu_to_le32(1<<2) // Adapter -> Host -#define DoorBellAdapterNormCmdNotFull cpu_to_le32(1<<3) // Adapter -> Host -#define DoorBellAdapterNormRespNotFull cpu_to_le32(1<<4) // Adapter -> Host -#define DoorBellPrintfReady cpu_to_le32(1<<5) // Adapter -> Host +#define DoorBellSyncCmdAvailable (1<<0) /* Host -> Adapter */ +#define DoorBellPrintfDone (1<<5) /* Host -> Adapter */ +#define DoorBellAdapterNormCmdReady (1<<1) /* Adapter -> Host */ +#define DoorBellAdapterNormRespReady (1<<2) /* Adapter -> Host */ +#define DoorBellAdapterNormCmdNotFull (1<<3) /* Adapter -> Host */ +#define DoorBellAdapterNormRespNotFull (1<<4) /* Adapter -> Host */ +#define DoorBellPrintfReady (1<<5) /* Adapter -> Host */ /* * For FIB communication, we need all of the following things @@ -1599,7 +1601,6 @@ void aac_printf(struct aac_dev *dev, u32 val); int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt); int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry); -int aac_consumer_avail(struct aac_dev * dev, struct aac_queue * q); void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum); int fib_complete(struct fib * context); #define fib_data(fibctx) ((void *)(fibctx)->hw_fib->data) diff -Nru a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c --- a/drivers/scsi/aacraid/commctrl.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/aacraid/commctrl.c 2005-03-30 16:58:48 -08:00 @@ -74,12 +74,14 @@ * will not overrun the buffer when we copy the memory. Return * an error if we would. */ - if(le32_to_cpu(kfib->header.Size) > sizeof(struct hw_fib) - sizeof(struct aac_fibhdr)) { + if (le16_to_cpu(kfib->header.Size) > + sizeof(struct hw_fib) - sizeof(struct aac_fibhdr)) { fib_free(fibptr); return -EINVAL; } - if (copy_from_user((void *) kfib, arg, le32_to_cpu(kfib->header.Size) + sizeof(struct aac_fibhdr))) { + if (copy_from_user(kfib, arg, le16_to_cpu(kfib->header.Size) + + sizeof(struct aac_fibhdr))) { fib_free(fibptr); return -EFAULT; } @@ -93,7 +95,7 @@ kfib->header.XferState = 0; } else { int retval = fib_send(kfib->header.Command, fibptr, - le32_to_cpu(kfib->header.Size) , FsaNormal, + le16_to_cpu(kfib->header.Size) , FsaNormal, 1, 1, NULL, NULL); if (retval) { fib_free(fibptr); @@ -538,7 +540,9 @@ struct sgmap* psg = &srbcmd->sg; byte_count = 0; - actual_fibsize = sizeof (struct aac_srb) + (((srbcmd->sg.count & 0xff) - 1) * sizeof (struct sgentry)); + actual_fibsize = sizeof (struct aac_srb) + + (((le32_to_cpu(srbcmd->sg.count) & 0xff) - 1) * + sizeof (struct sgentry)); if(actual_fibsize != fibsize){ // User made a mistake - should not continue printk(KERN_DEBUG"aacraid: Bad Size specified in Raw SRB command\n"); rcode = -EINVAL; diff -Nru a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c --- a/drivers/scsi/aacraid/comminit.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/aacraid/comminit.c 2005-03-30 16:58:47 -08:00 @@ -83,7 +83,7 @@ */ dev->aif_base_va = (struct hw_fib *)base; - init->AdapterFibsVirtualAddress = cpu_to_le32(0); + init->AdapterFibsVirtualAddress = 0; init->AdapterFibsPhysicalAddress = cpu_to_le32((u32)phys); init->AdapterFibsSize = cpu_to_le32(fibsize); init->AdapterFibAlign = cpu_to_le32(sizeof(struct hw_fib)); diff -Nru a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c --- a/drivers/scsi/aacraid/commsup.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/scsi/aacraid/commsup.c 2005-03-30 16:58:49 -08:00 @@ -102,7 +102,7 @@ fibptr->next = fibptr+1; /* Forward chain the fibs */ init_MUTEX_LOCKED(&fibptr->event_wait); spin_lock_init(&fibptr->event_lock); - hw_fib_va->header.XferState = cpu_to_le32(0xffffffff); + hw_fib_va->header.XferState = 0xffffffff; hw_fib_va->header.SenderSize = cpu_to_le16(sizeof(struct hw_fib)); fibptr->hw_fib_pa = hw_fib_pa; hw_fib_va = (struct hw_fib *)((unsigned char *)hw_fib_va + sizeof(struct hw_fib)); @@ -148,7 +148,7 @@ * Null out fields that depend on being zero at the start of * each I/O */ - fibptr->hw_fib->header.XferState = cpu_to_le32(0); + fibptr->hw_fib->header.XferState = 0; fibptr->callback = NULL; fibptr->callback_data = NULL; @@ -175,7 +175,8 @@ } else { if (fibptr->hw_fib->header.XferState != 0) { printk(KERN_WARNING "fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n", - (void*)fibptr, fibptr->hw_fib->header.XferState); + (void*)fibptr, + le32_to_cpu(fibptr->hw_fib->header.XferState)); } fibptr->next = fibptr->dev->free_fib; fibptr->dev->free_fib = fibptr; @@ -215,7 +216,7 @@ struct hw_fib *hw_fib = fibptr->hw_fib; if(hw_fib->header.StructType != FIB_MAGIC) BUG(); - hw_fib->header.XferState = cpu_to_le32(0); + hw_fib->header.XferState = 0; } /* @@ -344,7 +345,7 @@ * in the queue entry. */ if (map) - entry->addr = fibptr->hw_fib_pa; + entry->addr = cpu_to_le32(fibptr->hw_fib_pa); return 0; } @@ -418,13 +419,13 @@ struct hw_fib * hw_fib = fibptr->hw_fib; struct aac_queue * q; unsigned long flags = 0; - if (!(le32_to_cpu(hw_fib->header.XferState) & HostOwned)) + if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) return -EBUSY; /* * There are 5 cases with the wait and reponse requested flags. * The only invalid cases are if the caller requests to wait and * does not request a response and if the caller does not want a - * response and the Fibis not allocated from pool. If a response + * response and the Fib is not allocated from pool. If a response * is not requesed the Fib will just be deallocaed by the DPC * routine when the response comes back from the adapter. No * further processing will be done besides deleting the Fib. We @@ -566,12 +567,6 @@ return(status); } -int aac_consumer_avail(struct aac_dev *dev, struct aac_queue * q) -{ - return (le32_to_cpu(*q->headers.producer) != le32_to_cpu(*q->headers.consumer)); -} - - /** * aac_consumer_free - free consumer entry * @dev: Adapter @@ -632,7 +627,7 @@ struct hw_fib * hw_fib = fibptr->hw_fib; struct aac_dev * dev = fibptr->dev; unsigned long nointr = 0; - if (le32_to_cpu(hw_fib->header.XferState) == 0) + if (hw_fib->header.XferState == 0) return 0; /* * If we plan to do anything check the structure type first. @@ -704,7 +699,7 @@ * Check for a fib which has already been completed */ - if (hw_fib->header.XferState == cpu_to_le32(0)) + if (hw_fib->header.XferState == 0) return 0; /* * If we plan to do anything check the structure type first. diff -Nru a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c --- a/drivers/scsi/aacraid/rkt.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/scsi/aacraid/rkt.c 2005-03-30 16:58:50 -08:00 @@ -63,7 +63,7 @@ { bellbits = rkt_readl(dev, OutboundDoorbellReg); if (bellbits & DoorBellPrintfReady) { - aac_printf(dev, le32_to_cpu(rkt_readl (dev, IndexRegs.Mailbox[5]))); + aac_printf(dev, rkt_readl(dev, IndexRegs.Mailbox[5])); rkt_writel(dev, MUnit.ODR,DoorBellPrintfReady); rkt_writel(dev, InboundDoorbellReg,DoorBellPrintfDone); } @@ -94,7 +94,7 @@ * @p1: first parameter * @ret: adapter status * - * This routine will send a synchronous comamnd to the adapter and wait + * This routine will send a synchronous command to the adapter and wait * for its completion. */ @@ -105,11 +105,11 @@ /* * Write the command into Mailbox 0 */ - rkt_writel(dev, InboundMailbox0, cpu_to_le32(command)); + rkt_writel(dev, InboundMailbox0, command); /* * Write the parameters into Mailboxes 1 - 4 */ - rkt_writel(dev, InboundMailbox1, cpu_to_le32(p1)); + rkt_writel(dev, InboundMailbox1, p1); rkt_writel(dev, InboundMailbox2, 0); rkt_writel(dev, InboundMailbox3, 0); rkt_writel(dev, InboundMailbox4, 0); @@ -168,7 +168,7 @@ * Pull the synch status from Mailbox 0. */ if (status) - *status = le32_to_cpu(rkt_readl(dev, IndexRegs.Mailbox[0])); + *status = rkt_readl(dev, IndexRegs.Mailbox[0]); /* * Clear the synch command doorbell. */ @@ -275,7 +275,7 @@ */ static int aac_rkt_check_health(struct aac_dev *dev) { - u32 status = le32_to_cpu(rkt_readl(dev, MUnit.OMRx[0])); + u32 status = rkt_readl(dev, MUnit.OMRx[0]); /* * Check to see if the board failed any self tests. @@ -307,9 +307,9 @@ return ret; } memset(buffer, 0, 512); - post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); + post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); post->Post_Address = cpu_to_le32(baddr); - rkt_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr)); + rkt_writel(dev, MUnit.IMRx[0], paddr); rkt_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status); pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), post, paddr); @@ -388,8 +388,9 @@ { if(time_after(jiffies, start+180*HZ)) { - status = rkt_readl(dev, IndexRegs.Mailbox[7]) >> 16; - printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %ld.\n", dev->name, instance, status); + status = rkt_readl(dev, MUnit.OMRx[0]); + printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", + dev->name, instance, status); goto error_iounmap; } set_current_state(TASK_UNINTERRUPTIBLE); diff -Nru a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c --- a/drivers/scsi/aacraid/rx.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/scsi/aacraid/rx.c 2005-03-30 16:58:51 -08:00 @@ -94,7 +94,7 @@ * @p1: first parameter * @ret: adapter status * - * This routine will send a synchronous comamnd to the adapter and wait + * This routine will send a synchronous command to the adapter and wait * for its completion. */ @@ -105,11 +105,11 @@ /* * Write the command into Mailbox 0 */ - rx_writel(dev, InboundMailbox0, cpu_to_le32(command)); + rx_writel(dev, InboundMailbox0, command); /* * Write the parameters into Mailboxes 1 - 4 */ - rx_writel(dev, InboundMailbox1, cpu_to_le32(p1)); + rx_writel(dev, InboundMailbox1, p1); rx_writel(dev, InboundMailbox2, 0); rx_writel(dev, InboundMailbox3, 0); rx_writel(dev, InboundMailbox4, 0); @@ -167,7 +167,8 @@ /* * Pull the synch status from Mailbox 0. */ - *status = le32_to_cpu(rx_readl(dev, IndexRegs.Mailbox[0])); + if (status) + *status = rx_readl(dev, IndexRegs.Mailbox[0]); /* * Clear the synch command doorbell. */ @@ -274,7 +275,7 @@ */ static int aac_rx_check_health(struct aac_dev *dev) { - u32 status = le32_to_cpu(rx_readl(dev, MUnit.OMRx[0])); + u32 status = rx_readl(dev, MUnit.OMRx[0]); /* * Check to see if the board failed any self tests. @@ -308,7 +309,7 @@ memset(buffer, 0, 512); post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); post->Post_Address = cpu_to_le32(baddr); - rx_writel(dev, MUnit.IMRx[0], cpu_to_le32(paddr)); + rx_writel(dev, MUnit.IMRx[0], paddr); rx_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status); pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), post, paddr); @@ -388,8 +389,9 @@ { if(time_after(jiffies, start+180*HZ)) { - status = rx_readl(dev, IndexRegs.Mailbox[7]) >> 16; - printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %ld.\n", dev->name, instance, status); + status = rx_readl(dev, IndexRegs.Mailbox[7]); + printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", + dev->name, instance, status); goto error_iounmap; } set_current_state(TASK_UNINTERRUPTIBLE); diff -Nru a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c --- a/drivers/scsi/aacraid/sa.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/scsi/aacraid/sa.c 2005-03-30 16:58:49 -08:00 @@ -62,7 +62,7 @@ if (intstat & mask) { if (intstat & PrintfReady) { - aac_printf(dev, le32_to_cpu(sa_readl(dev, Mailbox5))); + aac_printf(dev, sa_readl(dev, Mailbox5)); sa_writew(dev, DoorbellClrReg_p, PrintfReady); /* clear PrintfReady */ sa_writew(dev, DoorbellReg_s, PrintfDone); } else if (intstat & DOORBELL_1) { // dev -> Host Normal Command Ready @@ -128,7 +128,7 @@ * @p1: first parameter * @ret: adapter status * - * This routine will send a synchronous comamnd to the adapter and wait + * This routine will send a synchronous command to the adapter and wait * for its completion. */ @@ -139,11 +139,11 @@ /* * Write the Command into Mailbox 0 */ - sa_writel(dev, Mailbox0, cpu_to_le32(command)); + sa_writel(dev, Mailbox0, command); /* * Write the parameters into Mailboxes 1 - 4 */ - sa_writel(dev, Mailbox1, cpu_to_le32(p1)); + sa_writel(dev, Mailbox1, p1); sa_writel(dev, Mailbox2, 0); sa_writel(dev, Mailbox3, 0); sa_writel(dev, Mailbox4, 0); @@ -186,7 +186,8 @@ /* * Pull the synch status from Mailbox 0. */ - *ret = le32_to_cpu(sa_readl(dev, Mailbox0)); + if (ret) + *ret = sa_readl(dev, Mailbox0); return 0; } @@ -218,9 +219,8 @@ * Fill in the remaining pieces of the init. */ init = dev->init; - init->HostElapsedSeconds = cpu_to_le32(jiffies/HZ); + init->HostElapsedSeconds = cpu_to_le32(get_seconds()); - dprintk(("INIT\n")); /* * Tell the adapter we are back and up and running so it will scan its command * queues and enable our interrupts @@ -230,10 +230,8 @@ * First clear out all interrupts. Then enable the one's that * we can handle. */ - dprintk(("MASK\n")); sa_writew(dev, SaDbCSR.PRISETIRQMASK, cpu_to_le16(0xffff)); sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, (PrintfReady | DOORBELL_1 | DOORBELL_2 | DOORBELL_3 | DOORBELL_4)); - dprintk(("SYNCCMD\n")); /* We can only use a 32 bit address here */ sa_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, &ret); } @@ -286,14 +284,12 @@ int instance; const char *name; - dprintk(("PREINST\n")); instance = dev->id; name = dev->name; /* * Map in the registers from the adapter. */ - dprintk(("PREMAP\n")); if((dev->regs.sa = ioremap((unsigned long)dev->scsi_host_ptr->base, 8192))==NULL) { @@ -320,15 +316,15 @@ */ while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) { if (time_after(jiffies, start+180*HZ)) { - status = sa_readl(dev, Mailbox7) >> 16; - printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %d.\n", name, instance, le32_to_cpu(status)); + status = sa_readl(dev, Mailbox7); + printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n", + name, instance, status); goto error_iounmap; } set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(1); } - dprintk(("ATIRQ\n")); if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance); goto error_iounmap; @@ -343,12 +339,10 @@ dev->a_ops.adapter_sync_cmd = sa_sync_cmd; dev->a_ops.adapter_check_health = aac_sa_check_health; - dprintk(("FUNCDONE\n")); if(aac_init_adapter(dev) == NULL) goto error_irq; - dprintk(("NEWADAPTDONE\n")); /* * Start any kernel threads needed */ @@ -362,9 +356,7 @@ * Tell the adapter that all is configure, and it can start * accepting requests */ - dprintk(("STARTING\n")); aac_sa_start_adapter(dev); - dprintk(("STARTED\n")); return 0; diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c --- a/drivers/scsi/ahci.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/ahci.c 2005-03-30 16:58:47 -08:00 @@ -253,8 +253,6 @@ board_ahci }, /* ICH7 */ { PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ICH7M */ - { PCI_VENDOR_ID_INTEL, 0x27c2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* ICH7R */ { PCI_VENDOR_ID_INTEL, 0x27c3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ICH7R */ { PCI_VENDOR_ID_AL, 0x5288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, diff -Nru a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c --- a/drivers/scsi/atp870u.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/atp870u.c 2005-03-30 16:58:48 -08:00 @@ -39,9 +39,9 @@ #include "atp870u.h" static struct scsi_host_template atp870u_template; -void send_s870(struct atp_unit *dev,unsigned char c); -void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c); -void tscam_885(void); +static void send_s870(struct atp_unit *dev,unsigned char c); +static void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c); +static void tscam_885(void); static irqreturn_t atp870u_intr_handle(int irq, void *dev_id, struct pt_regs *regs) { @@ -364,7 +364,7 @@ } outb(j, tmport); while ((inb(tmport) & 0x01) != j) { - outb(j,tmport); + outb(j,tmport); } if (dev->id[c][target_id].last_len == 0) { tmport = workport + 0x18; @@ -491,7 +491,7 @@ /* * Clear it off the queue */ - dev->id[c][target_id].curr_req = 0; + dev->id[c][target_id].curr_req = NULL; dev->working[c]--; spin_unlock_irqrestore(dev->host->host_lock, flags); /* @@ -614,7 +614,8 @@ * * Queue a command to the ATP queue. Called with the host lock held. */ -int atp870u_queuecommand(struct scsi_cmnd * req_p, void (*done) (struct scsi_cmnd *)) +static int atp870u_queuecommand(struct scsi_cmnd * req_p, + void (*done) (struct scsi_cmnd *)) { unsigned char c; unsigned int tmport,m; @@ -711,7 +712,7 @@ * * Caller holds the host lock. */ -void send_s870(struct atp_unit *dev,unsigned char c) +static void send_s870(struct atp_unit *dev,unsigned char c) { unsigned int tmport; struct scsi_cmnd *workreq; @@ -821,9 +822,9 @@ } outb(j, tmport); while ((inb(tmport) & 0x01) != j) { - outb(j,tmport); + outb(j,tmport); #ifdef ED_DBGP - printk("send_s870 while loop 1\n"); + printk("send_s870 while loop 1\n"); #endif } /* @@ -946,18 +947,18 @@ #ifdef ED_DBGP printk("1. bttl %x, l %x\n",bttl, l); #endif - while (l > 0x10000) { - (((u16 *) (prd))[i + 3]) = 0x0000; - (((u16 *) (prd))[i + 2]) = 0x0000; - (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); - l -= 0x10000; - bttl += 0x10000; - i += 0x04; - } + while (l > 0x10000) { + (((u16 *) (prd))[i + 3]) = 0x0000; + (((u16 *) (prd))[i + 2]) = 0x0000; (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); - (((u16 *) (prd))[i + 2]) = cpu_to_le16(l); - (((u16 *) (prd))[i + 3]) = 0; - i += 0x04; + l -= 0x10000; + bttl += 0x10000; + i += 0x04; + } + (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); + (((u16 *) (prd))[i + 2]) = cpu_to_le16(l); + (((u16 *) (prd))[i + 3]) = 0; + i += 0x04; } (((u16 *) (prd))[i - 1]) = cpu_to_le16(0x8000); #ifdef ED_DBGP @@ -1174,7 +1175,8 @@ outb(0x09, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; k = inb(tmport); if (k != 0x16) { @@ -1245,7 +1247,8 @@ tmport += 0x03; outb(0x09, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0); + while ((inb(tmport) & 0x80) == 0) + cpu_relax(); tmport -= 0x08; inb(tmport); return; @@ -1341,7 +1344,7 @@ } -void is870(struct atp_unit *dev, unsigned int wkport) +static void is870(struct atp_unit *dev, unsigned int wkport) { unsigned int tmport; unsigned char i, j, k, rmb, n; @@ -1401,12 +1404,16 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + dev->active_id[0] |= m; tmport = wkport + 0x10; @@ -1418,7 +1425,8 @@ tmport = wkport + 0x18; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -1444,16 +1452,21 @@ tmport += 0x03; outb(inqd[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + tmport = wkport + 0x1b; - if (dev->chip_ver == 4) { + if (dev->chip_ver == 4) outb(0x00, tmport); - } + tmport = wkport + 0x18; outb(0x08, tmport); tmport += 0x07; @@ -1483,7 +1496,10 @@ tmport += 0x03; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; if (inb(tmport) != 0x16) { goto sel_ok; @@ -1523,12 +1539,16 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + try_wide: j = 0; tmport = wkport + 0x14; @@ -1545,7 +1565,10 @@ } } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport) & 0x0f; if (j == 0x0f) { goto widep_in; @@ -1618,7 +1641,10 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -1672,12 +1698,16 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + try_sync: j = 0; tmport = wkport + 0x14; @@ -1702,7 +1732,10 @@ } } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport) & 0x0f; if (j == 0x0f) { goto phase_ins; @@ -1760,7 +1793,10 @@ goto phase_ins1; } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport); if (j == 0x85) { goto tar_dcons; @@ -1785,7 +1821,10 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -1885,12 +1924,16 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + dev->active_id[0] |= m; tmport = wkport + 0x50; @@ -1902,7 +1945,10 @@ tmport = wkport + 0x58; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -1928,12 +1974,17 @@ tmport += 0x03; outb(inqd[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + tmport = wkport + 0x5b; outb(0x00, tmport); tmport = wkport + 0x58; @@ -1965,11 +2016,13 @@ tmport += 0x03; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if (inb(tmport) != 0x16) { + if (inb(tmport) != 0x16) goto sel_ok; - } + inq_ok: mbuf[36] = 0; printk(KERN_INFO " ID: %2d %s\n", i, &mbuf[8]); @@ -2010,12 +2063,17 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + try_u3: j = 0; tmport = wkport + 0x54; @@ -2032,7 +2090,10 @@ } } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport) & 0x0f; if (j == 0x0f) { goto u3p_in; @@ -2105,7 +2166,10 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -2151,12 +2215,16 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; - if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + if (inb(tmport) != 0x11 && inb(tmport) != 0x8e) continue; - } - while (inb(tmport) != 0x8e); + + while (inb(tmport) != 0x8e) + cpu_relax(); + try_wide: j = 0; tmport = wkport + 0x54; @@ -2173,7 +2241,9 @@ } } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport) & 0x0f; if (j == 0x0f) { goto widep_in; @@ -2246,7 +2316,10 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -2313,12 +2386,16 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { continue; } - while (inb(tmport) != 0x8e); + while (inb(tmport) != 0x8e) + cpu_relax(); + try_sync: j = 0; tmport = wkport + 0x54; @@ -2347,7 +2424,10 @@ } } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport) & 0x0f; if (j == 0x0f) { goto phase_ins; @@ -2405,7 +2485,10 @@ goto phase_ins1; } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + j = inb(tmport); if (j == 0x85) { goto tar_dcons; @@ -2430,7 +2513,10 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); + tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -2544,7 +2630,7 @@ if (pci_enable_device(pdev)) return -EIO; - if (!pci_set_dma_mask(pdev, 0xFFFFFFUL)) { + if (!pci_set_dma_mask(pdev, 0xFFFFFFFFUL)) { printk(KERN_INFO "atp870u: use 32bit DMA mask.\n"); } else { printk(KERN_ERR "atp870u: DMA mask required but not available.\n"); @@ -2822,7 +2908,10 @@ tmport += 0x18; outb(0, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0); + + while ((inb(tmport) & 0x80) == 0) + cpu_relax(); + tmport -= 0x08; inb(tmport); tmport = base_io + 0x81; @@ -2840,7 +2929,10 @@ tmport += 0x18; outb(0, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0); + + while ((inb(tmport) & 0x80) == 0) + cpu_relax(); + tmport -= 0x08; inb(tmport); tmport = base_io + 0xc1; @@ -3005,7 +3097,7 @@ it is available to be used again. Until this gets worked out, we will leave it commented out. */ -int atp870u_abort(struct scsi_cmnd * SCpnt) +static int atp870u_abort(struct scsi_cmnd * SCpnt) { unsigned char j, k, c; struct scsi_cmnd *workrequ; @@ -3044,7 +3136,7 @@ return SUCCESS; } -const char *atp870u_info(struct Scsi_Host *notused) +static const char *atp870u_info(struct Scsi_Host *notused) { static char buffer[128]; @@ -3053,13 +3145,9 @@ return buffer; } -int atp870u_set_info(char *buffer, int length, struct Scsi_Host *HBAptr) -{ - return -ENOSYS; /* Currently this is a no-op */ -} - #define BLS buffer + len + size -int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, char **start, off_t offset, int length, int inout) +int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, + char **start, off_t offset, int length, int inout) { static u8 buff[512]; int size = 0; @@ -3068,10 +3156,9 @@ off_t pos = 0; if (inout) - return -ENOSYS; - if (offset == 0) { + return -EINVAL; + if (offset == 0) memset(buff, 0, sizeof(buff)); - } size += sprintf(BLS, "ACARD AEC-671X Driver Version: 2.6+ac\n"); len += size; pos = begin + len; @@ -3188,7 +3275,7 @@ pci_unregister_driver(&atp870u_driver); } -void tscam_885(void) +static void tscam_885(void) { unsigned char i; @@ -3200,7 +3287,7 @@ -void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c) +static void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c) { unsigned int tmport; unsigned char i, j, k, rmb, n, lvdmode; @@ -3255,12 +3342,14 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { continue; } - while (inb(tmport) != 0x8e); + while (inb(tmport) != 0x8e) + cpu_relax(); dev->active_id[c] |= m; tmport = wkport + 0x10; @@ -3272,7 +3361,8 @@ tmport = wkport + 0x18; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -3298,12 +3388,14 @@ tmport += 0x03; outb(inqd[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { continue; } - while (inb(tmport) != 0x8e); + while (inb(tmport) != 0x8e) + cpu_relax(); tmport = wkport + 0x1b; outb(0x00, tmport); tmport = wkport + 0x18; @@ -3335,7 +3427,8 @@ tmport += 0x03; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; if (inb(tmport) != 0x16) { goto sel_ok; @@ -3379,12 +3472,14 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { continue; } - while (inb(tmport) != 0x8e); + while (inb(tmport) != 0x8e) + cpu_relax(); try_u3: j = 0; tmport = wkport + 0x14; @@ -3399,9 +3494,11 @@ outb(u3[j++], tmport); tmport += 0x06; } + cpu_relax(); } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); j = inb(tmport) & 0x0f; if (j == 0x0f) { goto u3p_in; @@ -3423,6 +3520,7 @@ outb(0, tmport); tmport += 0x06; } + cpu_relax(); } tmport -= 0x08; j = inb(tmport) & 0x0f; @@ -3493,14 +3591,14 @@ goto chg_wide; } if (mbuf[3] == 0x09) { - m = 1; - m = m << i; - dev->wide_id[c] |= m; - dev->id[c][i].devsp = 0xce; + m = 1; + m = m << i; + dev->wide_id[c] |= m; + dev->id[c][i].devsp = 0xce; #ifdef ED_DBGP - printk("dev->id[%2d][%2d].devsp = %2x\n",c,i,dev->id[c][i].devsp); + printk("dev->id[%2d][%2d].devsp = %2x\n",c,i,dev->id[c][i].devsp); #endif - continue; + continue; } chg_wide: tmport = wkport + 0x1b; @@ -3523,12 +3621,14 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { continue; } - while (inb(tmport) != 0x8e); + while (inb(tmport) != 0x8e) + cpu_relax(); try_wide: j = 0; tmport = wkport + 0x14; @@ -3543,9 +3643,11 @@ outb(wide[j++], tmport); tmport += 0x06; } + cpu_relax(); } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); j = inb(tmport) & 0x0f; if (j == 0x0f) { goto widep_in; @@ -3567,6 +3669,7 @@ outb(0, tmport); tmport += 0x06; } + cpu_relax(); } tmport -= 0x08; j = inb(tmport) & 0x0f; @@ -3618,7 +3721,8 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; j = inb(tmport); if (j != 0x16) { @@ -3686,12 +3790,14 @@ outb(satn[8], tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { continue; } - while (inb(tmport) != 0x8e); + while (inb(tmport) != 0x8e) + cpu_relax(); try_sync: j = 0; tmport = wkport + 0x14; @@ -3720,7 +3826,8 @@ } } tmport -= 0x08; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); j = inb(tmport) & 0x0f; if (j == 0x0f) { goto phase_ins; @@ -3742,6 +3849,7 @@ outb(0x00, tmport); tmport += 0x06; } + cpu_relax(); } tmport -= 0x08; j = inb(tmport); @@ -3803,7 +3911,8 @@ tmport += 0x04; outb(0x08, tmport); tmport += 0x07; - while ((inb(tmport) & 0x80) == 0x00); + while ((inb(tmport) & 0x80) == 0x00) + cpu_relax(); tmport -= 0x08; j = inb(tmport); if (j != 0x16) { diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c --- a/drivers/scsi/hosts.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/hosts.c 2005-03-30 16:58:47 -08:00 @@ -443,3 +443,20 @@ } EXPORT_SYMBOL_GPL(scsi_queue_work); +/** + * scsi_flush_work - Flush a Scsi_Host's workqueue. + * @shost: Pointer to Scsi_Host. + **/ +void scsi_flush_work(struct Scsi_Host *shost) +{ + if (!shost->work_q) { + printk(KERN_ERR + "ERROR: Scsi host '%s' attempted to flush scsi-work, " + "when no workqueue created.\n", shost->hostt->name); + dump_stack(); + return; + } + + flush_workqueue(shost->work_q); +} +EXPORT_SYMBOL_GPL(scsi_flush_work); diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c --- a/drivers/scsi/ide-scsi.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/scsi/ide-scsi.c 2005-03-30 16:58:49 -08:00 @@ -96,14 +96,39 @@ */ #define IDESCSI_LOG_CMD 0 /* Log SCSI commands */ -typedef struct { - ide_drive_t *drive; +typedef struct ide_scsi_obj { + ide_drive_t *drive; + struct Scsi_Host *host; + idescsi_pc_t *pc; /* Current packet command */ unsigned long flags; /* Status/Action flags */ unsigned long transform; /* SCSI cmd translation layer */ unsigned long log; /* log flags */ } idescsi_scsi_t; +static DECLARE_MUTEX(idescsi_ref_sem); + +#define ide_scsi_g(disk) ((disk)->private_data) + +static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk) +{ + struct ide_scsi_obj *scsi = NULL; + + down(&idescsi_ref_sem); + scsi = ide_scsi_g(disk); + if (scsi) + scsi_host_get(scsi->host); + up(&idescsi_ref_sem); + return scsi; +} + +static void ide_scsi_put(struct ide_scsi_obj *scsi) +{ + down(&idescsi_ref_sem); + scsi_host_put(scsi->host); + up(&idescsi_ref_sem); +} + static inline idescsi_scsi_t *scsihost_to_idescsi(struct Scsi_Host *host) { return (idescsi_scsi_t*) (&host[1]); @@ -693,16 +718,18 @@ static int idescsi_cleanup (ide_drive_t *drive) { struct Scsi_Host *scsihost = drive->driver_data; + struct gendisk *g = drive->disk; if (ide_unregister_subdriver(drive)) return 1; - - /* FIXME?: Are these two statements necessary? */ + drive->driver_data = NULL; - drive->disk->fops = ide_fops; + g->private_data = NULL; + g->fops = ide_fops; scsi_remove_host(scsihost); - scsi_host_put(scsihost); + ide_scsi_put(scsihost_to_idescsi(scsihost)); + return 0; } @@ -739,15 +766,30 @@ static int idescsi_ide_open(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_scsi_obj *scsi; + ide_drive_t *drive; + + if (!(scsi = ide_scsi_get(disk))) + return -ENXIO; + + drive = scsi->drive; + drive->usage++; + return 0; } static int idescsi_ide_release(struct inode *inode, struct file *filp) { - ide_drive_t *drive = inode->i_bdev->bd_disk->private_data; + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_scsi_obj *scsi = ide_scsi_g(disk); + ide_drive_t *drive = scsi->drive; + drive->usage--; + + ide_scsi_put(scsi); + return 0; } @@ -755,7 +797,8 @@ unsigned int cmd, unsigned long arg) { struct block_device *bdev = inode->i_bdev; - return generic_ide_ioctl(file, bdev, cmd, arg); + struct ide_scsi_obj *scsi = ide_scsi_g(bdev->bd_disk); + return generic_ide_ioctl(scsi->drive, file, bdev, cmd, arg); } static struct block_device_operations idescsi_ops = { @@ -1042,6 +1085,7 @@ { idescsi_scsi_t *idescsi; struct Scsi_Host *host; + struct gendisk *g = drive->disk; static int warned; int err; @@ -1070,10 +1114,12 @@ drive->driver_data = host; idescsi = scsihost_to_idescsi(host); idescsi->drive = drive; + idescsi->host = host; err = ide_register_subdriver(drive, &idescsi_driver); if (!err) { idescsi_setup (drive, idescsi); - drive->disk->fops = &idescsi_ops; + g->fops = &idescsi_ops; + g->private_data = idescsi; err = scsi_add_host(host, &drive->gendev); if (!err) { scsi_scan_host(host); diff -Nru a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c --- a/drivers/scsi/lasi700.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/lasi700.c 2005-03-30 16:58:47 -08:00 @@ -111,8 +111,8 @@ memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters)); hostdata->dev = &dev->dev; - dma_set_mask(&dev->dev, 0xffffffffUL); - hostdata->base = base; + dma_set_mask(&dev->dev, DMA_32BIT_MASK); + hostdata->base = ioremap(base, 0x100); hostdata->differential = 0; if (dev->id.sversion == LASI_700_SVERSION) { @@ -127,17 +127,25 @@ NCR_700_set_mem_mapped(hostdata); - host = NCR_700_detect(&lasi700_template, hostdata, &dev->dev, - dev->irq, 7); + host = NCR_700_detect(&lasi700_template, hostdata, &dev->dev); if (!host) goto out_kfree; + host->this_id = 7; + host->irq = dev->irq; + if(request_irq(dev->irq, NCR_700_intr, SA_SHIRQ, "lasi700", host)) { + printk(KERN_ERR "lasi700: request_irq failed!\n"); + goto out_put_host; + } dev_set_drvdata(&dev->dev, host); scsi_scan_host(host); return 0; + out_put_host: + scsi_host_put(host); out_kfree: + iounmap(hostdata->base); kfree(hostdata); return -ENODEV; } @@ -152,6 +160,7 @@ scsi_remove_host(host); NCR_700_release(host); free_irq(host->irq, host); + iounmap(hostdata->base); kfree(hostdata); return 0; diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c --- a/drivers/scsi/libata-scsi.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/libata-scsi.c 2005-03-30 16:58:48 -08:00 @@ -1038,7 +1038,12 @@ static unsigned int ata_msense_ctl_mode(u8 **ptr_io, const u8 *last) { - const u8 page[] = {0xa, 0xa, 2, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 30}; + const u8 page[] = {0xa, 0xa, 6, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 30}; + + /* byte 2: set the descriptor format sense data bit (bit 2) + * since we need to support returning this format for SAT + * commands and any SCSI commands against a 48b LBA device. + */ ata_msense_push(ptr_io, last, page, sizeof(page)); return sizeof(page); diff -Nru a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c --- a/drivers/scsi/mac_scsi.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/mac_scsi.c 2005-03-30 16:58:47 -08:00 @@ -302,7 +302,7 @@ if (instance->irq != SCSI_IRQ_NONE) if (request_irq(instance->irq, NCR5380_intr, IRQ_FLG_SLOW, - "ncr5380", NCR5380_intr)) { + "ncr5380", instance)) { printk(KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; diff -Nru a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c --- a/drivers/scsi/ncr53c8xx.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/ncr53c8xx.c 2005-03-30 16:58:48 -08:00 @@ -86,7 +86,7 @@ */ /* Name and version of the driver */ -#define SCSI_NCR_DRIVER_NAME "ncr53c8xx-3.4.3f" +#define SCSI_NCR_DRIVER_NAME "ncr53c8xx-3.4.3g" #define SCSI_NCR_DEBUG_FLAGS (0) @@ -1219,7 +1219,7 @@ static struct lcb * ncr_setup_lcb (struct ncb *np, struct scsi_device *sdev); static void ncr_getclock (struct ncb *np, int mult); static void ncr_selectclock (struct ncb *np, u_char scntl3); -static struct ccb *ncr_get_ccb (struct ncb *np, u_char tn, u_char ln); +static struct ccb *ncr_get_ccb (struct ncb *np, struct scsi_cmnd *cmd); static void ncr_chip_reset (struct ncb *np, int delay); static void ncr_init (struct ncb *np, int reset, char * msg, u_long code); static int ncr_int_sbmc (struct ncb *np); @@ -1238,8 +1238,6 @@ static void ncr_setsync (struct ncb *np, struct ccb *cp, u_char scntl3, u_char sxfer); static void ncr_setup_tags (struct ncb *np, struct scsi_device *sdev); static void ncr_setwide (struct ncb *np, struct ccb *cp, u_char wide, u_char ack); -static int ncr_show_msg (u_char * msg); -static void ncr_print_msg (struct ccb *cp, char *label, u_char *msg); static int ncr_snooptest (struct ncb *np); static void ncr_timeout (struct ncb *np); static void ncr_wakeup (struct ncb *np, u_long code); @@ -2746,7 +2744,7 @@ for (i=0; itryloop + sizeof (scrh->tryloop)); @@ -2771,7 +2769,7 @@ *p++ =PADDR (dispatch); *p++ =SCR_MOVE_TBL ^ SCR_DATA_IN; *p++ =offsetof (struct dsb, data[i]); - }; + } BUG_ON((u_long)p != (u_long)&scrh->hdata_in + sizeof (scrh->hdata_in)); @@ -2781,7 +2779,7 @@ *p++ =PADDR (dispatch); *p++ =SCR_MOVE_TBL ^ SCR_DATA_IN; *p++ =offsetof (struct dsb, data[i]); - }; + } BUG_ON((u_long)p != (u_long)&scr->data_in + sizeof (scr->data_in)); @@ -2791,7 +2789,7 @@ *p++ =PADDR (dispatch); *p++ =SCR_MOVE_TBL ^ SCR_DATA_OUT; *p++ =offsetof (struct dsb, data[i]); - }; + } BUG_ON((u_long)p != (u_long)&scrh->hdata_out + sizeof (scrh->hdata_out)); @@ -2801,7 +2799,7 @@ *p++ =PADDR (dispatch); *p++ =SCR_MOVE_TBL ^ SCR_DATA_OUT; *p++ =offsetof (struct dsb, data[i]); - }; + } BUG_ON((u_long) p != (u_long)&scr->data_out + sizeof (scr->data_out)); } @@ -2842,7 +2840,7 @@ printk (KERN_ERR "%s: ERROR0 IN SCRIPT at %d.\n", ncr_name(np), (int) (src-start-1)); mdelay(1000); - }; + } if (DEBUG_FLAGS & DEBUG_SCRIPT) printk (KERN_DEBUG "%p: <%x>\n", @@ -2911,7 +2909,7 @@ default: relocs = 0; break; - }; + } if (relocs) { while (relocs--) { @@ -2958,7 +2956,7 @@ } else *dst++ = cpu_to_scr(*src++); - }; + } } /* @@ -2969,25 +2967,25 @@ struct ncb *ncb; }; -/* -** Print something which allows to retrieve the controller type, unit, -** target, lun concerned by a kernel message. -*/ +#define PRINT_ADDR(cmd, arg...) dev_info(&cmd->device->sdev_gendev , ## arg) -static void PRINT_TARGET(struct ncb *np, int target) +static void ncr_print_msg(struct ccb *cp, char *label, u_char *msg) { - printk(KERN_INFO "%s-<%d,*>: ", ncr_name(np), target); -} + int i; + PRINT_ADDR(cp->cmd, "%s: ", label); -static void PRINT_LUN(struct ncb *np, int target, int lun) -{ - printk(KERN_INFO "%s-<%d,%d>: ", ncr_name(np), target, lun); -} + printk ("%x",*msg); + if (*msg == M_EXTENDED) { + for (i = 1; i < 8; i++) { + if (i - 1 > msg[1]) + break; + printk ("-%x",msg[i]); + } + } else if ((*msg & 0xf0) == 0x20) { + printk ("-%x",msg[1]); + } -static void PRINT_ADDR(struct scsi_cmnd *cmd) -{ - struct host_data *host_data = (struct host_data *) cmd->device->host->hostdata; - PRINT_LUN(host_data->ncb, cmd->device->id, cmd->device->lun); + printk(".\n"); } /*========================================================== @@ -3280,6 +3278,7 @@ tp->usrsync = driver_setup.default_sync; tp->usrwide = driver_setup.max_wide; tp->usrtags = MAX_TAGS; + tp->period = 0xffff; if (!driver_setup.disconnection) np->target[i].usrflag = UF_NODISC; } @@ -3369,34 +3368,23 @@ int nego = 0; struct scsi_target *starget = tp->starget; - if (likely(starget)) { - - /* - ** negotiate wide transfers ? - */ - - if (!tp->widedone) { - if (spi_support_wide(starget)) { - nego = NS_WIDE; - } else - tp->widedone=1; - - }; - - /* - ** negotiate synchronous transfers? - */ + /* negotiate wide transfers ? */ + if (!tp->widedone) { + if (spi_support_wide(starget)) { + nego = NS_WIDE; + } else + tp->widedone=1; + } - if (!nego && !tp->period) { - if (spi_support_sync(starget)) { - nego = NS_SYNC; - } else { - tp->period =0xffff; - PRINT_TARGET(np, cp->target); - printk ("target did not report SYNC.\n"); - }; - }; - }; + /* negotiate synchronous transfers? */ + if (!nego && !tp->period) { + if (spi_support_sync(starget)) { + nego = NS_SYNC; + } else { + tp->period =0xffff; + dev_info(&starget->dev, "target did not report SYNC.\n"); + } + } switch (nego) { case NS_SYNC: @@ -3412,7 +3400,7 @@ msgptr[msglen++] = M_X_WIDE_REQ; msgptr[msglen++] = tp->usrwide; break; - }; + } cp->nego_status = nego; @@ -3421,8 +3409,8 @@ if (DEBUG_FLAGS & DEBUG_NEGO) { ncr_print_msg(cp, nego == NS_WIDE ? "wide msgout":"sync_msgout", msgptr); - }; - }; + } + } return msglen; } @@ -3440,9 +3428,9 @@ */ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) { -/* struct scsi_device *device = cmd->device; */ - struct tcb *tp = &np->target[cmd->device->id]; - struct lcb *lp = tp->lp[cmd->device->lun]; + struct scsi_device *sdev = cmd->device; + struct tcb *tp = &np->target[sdev->id]; + struct lcb *lp = tp->lp[sdev->lun]; struct ccb *cp; int segments; @@ -3457,9 +3445,9 @@ ** **--------------------------------------------- */ - if ((cmd->device->id == np->myaddr ) || - (cmd->device->id >= MAX_TARGET) || - (cmd->device->lun >= MAX_LUN )) { + if ((sdev->id == np->myaddr ) || + (sdev->id >= MAX_TARGET) || + (sdev->lun >= MAX_LUN )) { return(DID_BAD_TARGET); } @@ -3479,8 +3467,7 @@ } if (DEBUG_FLAGS & DEBUG_TINY) { - PRINT_ADDR(cmd); - printk ("CMD=%x ", cmd->cmnd[0]); + PRINT_ADDR(cmd, "CMD=%x ", cmd->cmnd[0]); } /*--------------------------------------------------- @@ -3499,7 +3486,7 @@ np->settle_time = tlimit; } - if (np->settle_time || !(cp=ncr_get_ccb (np, cmd->device->id, cmd->device->lun))) { + if (np->settle_time || !(cp=ncr_get_ccb (np, cmd))) { insert_into_waiting_list(np, cmd); return(DID_OK); } @@ -3512,7 +3499,7 @@ **---------------------------------------------------- */ - idmsg = M_IDENTIFY | cmd->device->lun; + idmsg = M_IDENTIFY | sdev->lun; if (cp ->tag != NO_TAG || (cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC))) @@ -3533,8 +3520,8 @@ if (lp->tags_smap) { order = M_ORDERED_TAG; if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){ - PRINT_ADDR(cmd); - printk("ordered tag forced.\n"); + PRINT_ADDR(cmd, + "ordered tag forced.\n"); } } lp->tags_stime = ktime_get(3*HZ); @@ -3682,7 +3669,7 @@ /* ** select */ - cp->phys.select.sel_id = cmd->device->id; + cp->phys.select.sel_id = sdev->id; cp->phys.select.sel_scntl3 = tp->wval; cp->phys.select.sel_sxfer = tp->sval; /* @@ -3719,9 +3706,7 @@ **---------------------------------------------------- */ - /* - ** activate this job. - */ + /* activate this job. */ cp->magic = CCB_MAGIC; /* @@ -3734,11 +3719,9 @@ else ncr_put_start_queue(np, cp); - /* - ** Command is successfully queued. - */ + /* Command is successfully queued. */ - return(DID_OK); + return DID_OK; } @@ -4203,8 +4186,7 @@ */ if (cp->parity_status > 1) { - PRINT_ADDR(cmd); - printk ("%d parity error(s).\n",cp->parity_status); + PRINT_ADDR(cmd, "%d parity error(s).\n",cp->parity_status); } /* @@ -4212,16 +4194,16 @@ */ if (cp->xerr_status != XE_OK) { - PRINT_ADDR(cmd); switch (cp->xerr_status) { case XE_EXTRA_DATA: - printk ("extraneous data discarded.\n"); + PRINT_ADDR(cmd, "extraneous data discarded.\n"); break; case XE_BAD_PHASE: - printk ("invalid scsi phase (4/5).\n"); + PRINT_ADDR(cmd, "invalid scsi phase (4/5).\n"); break; default: - printk ("extended error %d.\n", cp->xerr_status); + PRINT_ADDR(cmd, "extended error %d.\n", + cp->xerr_status); break; } if (cp->host_status==HS_COMPLETE) @@ -4233,9 +4215,9 @@ */ if (DEBUG_FLAGS & (DEBUG_RESULT|DEBUG_TINY)) { if (cp->host_status!=HS_COMPLETE || cp->scsi_status!=S_GOOD) { - PRINT_ADDR(cmd); - printk ("ERROR: cmd=%x host_status=%x scsi_status=%x\n", - cmd->cmnd[0], cp->host_status, cp->scsi_status); + PRINT_ADDR(cmd, "ERROR: cmd=%x host_status=%x " + "scsi_status=%x\n", cmd->cmnd[0], + cp->host_status, cp->scsi_status); } } @@ -4296,8 +4278,7 @@ if (DEBUG_FLAGS & (DEBUG_RESULT|DEBUG_TINY)) { u_char * p = (u_char*) & cmd->sense_buffer; int i; - PRINT_ADDR(cmd); - printk ("sense data:"); + PRINT_ADDR(cmd, "sense data:"); for (i=0; i<14; i++) printk (" %x", *p++); printk (".\n"); } @@ -4344,8 +4325,7 @@ /* ** Other protocol messes */ - PRINT_ADDR(cmd); - printk ("COMMAND FAILED (%x %x) @%p.\n", + PRINT_ADDR(cmd, "COMMAND FAILED (%x %x) @%p.\n", cp->host_status, cp->scsi_status, cp); cmd->result = ScsiResult(DID_ERROR, cp->scsi_status); @@ -4358,8 +4338,7 @@ if (tp->usrflag & UF_TRACE) { u_char * p; int i; - PRINT_ADDR(cmd); - printk (" CMD:"); + PRINT_ADDR(cmd, " CMD:"); p = (u_char*) &cmd->cmnd[0]; for (i=0; icmd_len; i++) printk (" %x", *p++); @@ -4667,12 +4646,11 @@ } else tp->usrsync = 255; - }; + } if (tp->usrwide > np->maxwide) tp->usrwide = np->maxwide; - ncr_negotiate (np, tp); } /* @@ -4849,7 +4827,7 @@ #endif cp->phys.select.sel_scntl3 = tp->wval; cp->phys.select.sel_sxfer = tp->sval; - }; + } } /*========================================================== @@ -4885,40 +4863,19 @@ else tp->period = 0xffff; - /* - ** Stop there if sync parameters are unchanged - */ - if (tp->sval == sxfer && tp->wval == scntl3) return; + /* Stop there if sync parameters are unchanged */ + if (tp->sval == sxfer && tp->wval == scntl3) + return; tp->sval = sxfer; tp->wval = scntl3; - /* - ** Bells and whistles ;-) - */ - PRINT_TARGET(np, target); if (sxfer & 0x01f) { - unsigned f10 = 100000 << (tp->widedone ? tp->widedone -1 : 0); - unsigned mb10 = (f10 + tp->period/2) / tp->period; - char *scsi; - - /* - ** Disable extended Sreq/Sack filtering - */ - if (tp->period <= 2000) OUTOFFB (nc_stest2, EXT); - - /* - ** Bells and whistles ;-) - */ - if (tp->period < 500) scsi = "FAST-40"; - else if (tp->period < 1000) scsi = "FAST-20"; - else if (tp->period < 2000) scsi = "FAST-10"; - else scsi = "FAST-5"; - - printk ("%s %sSCSI %d.%d MB/s (%d ns, offset %d)\n", scsi, - tp->widedone > 1 ? "WIDE " : "", - mb10 / 10, mb10 % 10, tp->period / 10, sxfer & 0x1f); - } else - printk ("%sasynchronous.\n", tp->widedone > 1 ? "wide " : ""); + /* Disable extended Sreq/Sack filtering */ + if (tp->period <= 2000) + OUTOFFB(nc_stest2, EXT); + } + + spi_display_xfer_agreement(tp->starget); /* ** set actual value and sync_status @@ -4964,11 +4921,8 @@ ** Bells and whistles ;-) */ if (bootverbose >= 2) { - PRINT_TARGET(np, target); - if (scntl3 & EWS) - printk ("WIDE SCSI (16 bit) enabled.\n"); - else - printk ("WIDE SCSI disabled.\n"); + dev_info(&cmd->device->sdev_target->dev, "WIDE SCSI %sabled.\n", + (scntl3 & EWS) ? "en" : "dis"); } /* @@ -5023,7 +4977,7 @@ reqtags = lp->numtags; } else { reqtags = 1; - }; + } /* ** Update max number of tags @@ -5063,12 +5017,13 @@ ** Announce change to user. */ if (bootverbose) { - PRINT_LUN(np, tn, ln); if (lp->usetags) { - printk("tagged command queue depth set to %d\n", reqtags); - } - else { - printk("tagged command queueing disabled\n"); + dev_info(&sdev->sdev_gendev, + "tagged command queue depth set to %d\n", + reqtags); + } else { + dev_info(&sdev->sdev_gendev, + "tagged command queueing disabled\n"); } } } @@ -5274,7 +5229,7 @@ istat = INB (nc_istat); if (DEBUG_FLAGS & DEBUG_TINY) printk ("F "); ncr_wakeup_done (np); - }; + } if (!(istat & (SIP|DIP))) return; @@ -5335,7 +5290,7 @@ } OUTONB_STD (); return; - }; + } /*======================================================== ** Now, interrupts that need some fixing up. @@ -5355,7 +5310,7 @@ if (sist & RST) { ncr_init (np, 1, bootverbose ? "scsi reset" : NULL, HS_RESET); return; - }; + } if ((sist & STO) && !(dstat & (MDPE|BF|ABRT))) { @@ -5366,7 +5321,7 @@ ncr_int_sto (np); return; - }; + } /*========================================================= ** Now, interrupts we are not able to recover cleanly. @@ -5387,7 +5342,7 @@ ((char*)&np->regdump)[i] = INB_OFF(i); np->regdump.nc_dstat = dstat; np->regdump.nc_sist = sist; - }; + } ncr_log_hard_error(np, sist, dstat); @@ -5399,20 +5354,20 @@ (dstat & (MDPE|BF|ABRT|IID))) { ncr_start_reset(np); return; - }; + } if (sist & HTH) { printk ("%s: handshake timeout\n", ncr_name(np)); ncr_start_reset(np); return; - }; + } if (sist & UDC) { printk ("%s: unexpected disconnect\n", ncr_name(np)); OUTB (HS_PRT, HS_UNEXPECTED); OUTL_DSP (NCB_SCRIPT_PHYS (np, cleanup)); return; - }; + } /*========================================================= ** We just miss the cause of the interrupt. :( @@ -5456,7 +5411,7 @@ if (cp) { cp-> host_status = HS_SEL_TIMEOUT; ncr_complete (np, cp); - }; + } /* ** repair start queue and jump to start point. @@ -5647,7 +5602,7 @@ ss2 = INB (nc_sstat2); if (ss2 & OLF1) rest++; if (ss2 & ORF1) rest++; - }; + } if (DEBUG_FLAGS & (DEBUG_TINY|DEBUG_PHASE)) printk ("P%x%x RL=%d D=%d SS0=%x ", cmd&7, sbcl&7, @@ -5716,7 +5671,7 @@ cp, np->header.cp, (unsigned)dsp, (unsigned)nxtdsp, vdsp, cmd); - }; + } /* ** cp=0 means that the DSA does not point to a valid control @@ -5744,7 +5699,7 @@ } else { tblp = (u32 *) 0; olen = scr_to_cpu(vdsp[0]) & 0xffffff; - }; + } if (DEBUG_FLAGS & DEBUG_PHASE) { printk ("OCMD=%x\nTBLP=%p OLEN=%x OADR=%x\n", @@ -5752,16 +5707,15 @@ tblp, (unsigned) olen, (unsigned) oadr); - }; + } /* ** check cmd against assumed interrupted script command. */ if (cmd != (scr_to_cpu(vdsp[0]) >> 24)) { - PRINT_ADDR(cp->cmd); - printk ("internal error: cmd=%02x != %02x=(vdsp[0] >> 24)\n", - (unsigned)cmd, (unsigned)scr_to_cpu(vdsp[0]) >> 24); + PRINT_ADDR(cp->cmd, "internal error: cmd=%02x != %02x=(vdsp[0] " + ">> 24)\n", cmd, scr_to_cpu(vdsp[0]) >> 24); goto reset_all; } @@ -5783,12 +5737,11 @@ */ if (cmd & 0x06) { - PRINT_ADDR(cp->cmd); - printk ("phase change %x-%x %d@%08x resid=%d.\n", + PRINT_ADDR(cp->cmd, "phase change %x-%x %d@%08x resid=%d.\n", cmd&7, sbcl&7, (unsigned)olen, (unsigned)oadr, (unsigned)rest); goto unexpected_phase; - }; + } /* ** choose the correct patch area. @@ -5812,8 +5765,7 @@ newcmd[3] = cpu_to_scr(nxtdsp); if (DEBUG_FLAGS & DEBUG_PHASE) { - PRINT_ADDR(cp->cmd); - printk ("newcmd[%d] %x %x %x %x.\n", + PRINT_ADDR(cp->cmd, "newcmd[%d] %x %x %x %x.\n", (int) (newcmd - cp->patch), (unsigned)scr_to_cpu(newcmd[0]), (unsigned)scr_to_cpu(newcmd[1]), @@ -5939,9 +5891,8 @@ if (!lp) goto out; if (bootverbose >= 1) { - PRINT_ADDR(cmd); - printk ("QUEUE FULL! %d busy, %d disconnected CCBs\n", - busy_cnt, disc_cnt); + PRINT_ADDR(cmd, "QUEUE FULL! %d busy, %d disconnected " + "CCBs\n", busy_cnt, disc_cnt); } if (disc_cnt < lp->numtags) { lp->numtags = disc_cnt > 2 ? disc_cnt : 2; @@ -5978,7 +5929,7 @@ ** ** identify message */ - cp->scsi_smsg2[0] = M_IDENTIFY | cmd->device->lun; + cp->scsi_smsg2[0] = IDENTIFY(0, cmd->device->lun); cp->phys.smsg.addr = cpu_to_scr(CCB_PHYS (cp, scsi_smsg2)); cp->phys.smsg.size = cpu_to_scr(1); @@ -6048,34 +5999,6 @@ **========================================================== */ -static int ncr_show_msg (u_char * msg) -{ - u_char i; - printk ("%x",*msg); - if (*msg==M_EXTENDED) { - for (i=1;i<8;i++) { - if (i-1>msg[1]) break; - printk ("-%x",msg[i]); - }; - return (i+1); - } else if ((*msg & 0xf0) == 0x20) { - printk ("-%x",msg[1]); - return (2); - }; - return (1); -} - -static void ncr_print_msg ( struct ccb *cp, char *label, u_char *msg) -{ - if (cp) - PRINT_ADDR(cp->cmd); - if (label) - printk("%s: ", label); - - (void) ncr_show_msg (msg); - printk(".\n"); -} - void ncr_int_sir (struct ncb *np) { u_char scntl3; @@ -6230,10 +6153,9 @@ */ if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("negotiation failed sir=%x status=%x.\n", - num, cp->nego_status); - }; + PRINT_ADDR(cp->cmd, "negotiation failed sir=%x " + "status=%x.\n", num, cp->nego_status); + } /* ** any error in negotiation: @@ -6242,37 +6164,26 @@ switch (cp->nego_status) { case NS_SYNC: - ncr_setsync (np, cp, 0, 0xe0); spi_period(starget) = 0; spi_offset(starget) = 0; + ncr_setsync (np, cp, 0, 0xe0); break; case NS_WIDE: - ncr_setwide (np, cp, 0, 0); spi_width(starget) = 0; + ncr_setwide (np, cp, 0, 0); break; - }; + } np->msgin [0] = M_NOOP; np->msgout[0] = M_NOOP; cp->nego_status = 0; break; case SIR_NEGO_SYNC: - /* - ** Synchronous request message received. - */ - if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("sync msgin: "); - (void) ncr_show_msg (np->msgin); - printk (".\n"); - }; - - /* - ** get requested values. - */ + ncr_print_msg(cp, "sync msgin", np->msgin); + } chg = 0; per = np->msgin[3]; @@ -6284,8 +6195,8 @@ ** it CAN transfer synch. */ - if (ofs && tp->starget) - spi_support_sync(tp->starget) = 1; + if (ofs && starget) + spi_support_sync(starget) = 1; /* ** check values against driver limits. @@ -6318,9 +6229,8 @@ } if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("sync: per=%d scntl3=0x%x ofs=%d fak=%d chg=%d.\n", - per, scntl3, ofs, fak, chg); + PRINT_ADDR(cp->cmd, "sync: per=%d scntl3=0x%x ofs=%d " + "fak=%d chg=%d.\n", per, scntl3, ofs, fak, chg); } if (INB (HS_PRT) == HS_NEGOTIATE) { @@ -6328,43 +6238,37 @@ switch (cp->nego_status) { case NS_SYNC: - /* - ** This was an answer message - */ + /* This was an answer message */ if (chg) { - /* - ** Answer wasn't acceptable. - */ - ncr_setsync (np, cp, 0, 0xe0); + /* Answer wasn't acceptable. */ spi_period(starget) = 0; spi_offset(starget) = 0; - OUTL_DSP (NCB_SCRIPT_PHYS (np, msg_bad)); + ncr_setsync(np, cp, 0, 0xe0); + OUTL_DSP(NCB_SCRIPT_PHYS (np, msg_bad)); } else { - /* - ** Answer is ok. - */ - ncr_setsync (np, cp, scntl3, (fak<<5)|ofs); + /* Answer is ok. */ spi_period(starget) = per; spi_offset(starget) = ofs; - OUTL_DSP (NCB_SCRIPT_PHYS (np, clrack)); - }; + ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); + OUTL_DSP(NCB_SCRIPT_PHYS (np, clrack)); + } return; case NS_WIDE: - ncr_setwide (np, cp, 0, 0); spi_width(starget) = 0; + ncr_setwide(np, cp, 0, 0); break; - }; - }; + } + } /* ** It was a request. Set value and ** prepare an answer message */ - ncr_setsync (np, cp, scntl3, (fak<<5)|ofs); spi_period(starget) = per; spi_offset(starget) = ofs; + ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); np->msgout[0] = M_EXTENDED; np->msgout[1] = 3; @@ -6375,10 +6279,7 @@ cp->nego_status = NS_SYNC; if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("sync msgout: "); - (void) ncr_show_msg (np->msgout); - printk (".\n"); + ncr_print_msg(cp, "sync msgout", np->msgout); } if (!ofs) { @@ -6394,11 +6295,8 @@ ** Wide request message received. */ if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("wide msgin: "); - (void) ncr_show_msg (np->msgin); - printk (".\n"); - }; + ncr_print_msg(cp, "wide msgin", np->msgin); + } /* ** get requested values. @@ -6412,8 +6310,8 @@ ** it CAN transfer wide. */ - if (wide && tp->starget) - spi_support_wide(tp->starget) = 1; + if (wide && starget) + spi_support_wide(starget) = 1; /* ** check values against driver limits. @@ -6423,8 +6321,8 @@ {chg = 1; wide = tp->usrwide;} if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("wide: wide=%d chg=%d.\n", wide, chg); + PRINT_ADDR(cp->cmd, "wide: wide=%d chg=%d.\n", wide, + chg); } if (INB (HS_PRT) == HS_NEGOTIATE) { @@ -6436,37 +6334,33 @@ ** This was an answer message */ if (chg) { - /* - ** Answer wasn't acceptable. - */ - ncr_setwide (np, cp, 0, 1); + /* Answer wasn't acceptable. */ spi_width(starget) = 0; + ncr_setwide(np, cp, 0, 1); OUTL_DSP (NCB_SCRIPT_PHYS (np, msg_bad)); } else { - /* - ** Answer is ok. - */ - ncr_setwide (np, cp, wide, 1); + /* Answer is ok. */ spi_width(starget) = wide; + ncr_setwide(np, cp, wide, 1); OUTL_DSP (NCB_SCRIPT_PHYS (np, clrack)); - }; + } return; case NS_SYNC: - ncr_setsync (np, cp, 0, 0xe0); spi_period(starget) = 0; spi_offset(starget) = 0; + ncr_setsync(np, cp, 0, 0xe0); break; - }; - }; + } + } /* ** It was a request, set value and ** prepare an answer message */ - ncr_setwide (np, cp, wide, 1); spi_width(starget) = wide; + ncr_setwide(np, cp, wide, 1); np->msgout[0] = M_EXTENDED; np->msgout[1] = 2; @@ -6478,10 +6372,7 @@ cp->nego_status = NS_WIDE; if (DEBUG_FLAGS & DEBUG_NEGO) { - PRINT_ADDR(cp->cmd); - printk ("wide msgout: "); - (void) ncr_show_msg (np->msgin); - printk (".\n"); + ncr_print_msg(cp, "wide msgout", np->msgin); } break; @@ -6500,8 +6391,7 @@ **----------------------------------------------- */ - PRINT_ADDR(cp->cmd); - printk ("M_REJECT received (%x:%x).\n", + PRINT_ADDR(cp->cmd, "M_REJECT received (%x:%x).\n", (unsigned)scr_to_cpu(np->lastmsg), np->msgout[0]); break; @@ -6513,10 +6403,7 @@ **----------------------------------------------- */ - PRINT_ADDR(cp->cmd); - printk ("M_REJECT sent for "); - (void) ncr_show_msg (np->msgin); - printk (".\n"); + ncr_print_msg(cp, "M_REJECT sent for", np->msgin); break; /*-------------------------------------------------------------------- @@ -6535,8 +6422,8 @@ **----------------------------------------------- */ - PRINT_ADDR(cp->cmd); - printk ("M_IGN_RESIDUE received, but not yet implemented.\n"); + PRINT_ADDR(cp->cmd, "M_IGN_RESIDUE received, but not yet " + "implemented.\n"); break; #if 0 case SIR_MISSING_SAVE: @@ -6548,15 +6435,14 @@ **----------------------------------------------- */ - PRINT_ADDR(cp->cmd); - printk ("M_DISCONNECT received, but datapointer not saved: " - "data=%x save=%x goal=%x.\n", + PRINT_ADDR(cp->cmd, "M_DISCONNECT received, but datapointer " + "not saved: data=%x save=%x goal=%x.\n", (unsigned) INL (nc_temp), (unsigned) scr_to_cpu(np->header.savep), (unsigned) scr_to_cpu(np->header.goalp)); break; #endif - }; + } out: OUTONB_STD (); @@ -6571,8 +6457,10 @@ **========================================================== */ -static struct ccb *ncr_get_ccb (struct ncb *np, u_char tn, u_char ln) +static struct ccb *ncr_get_ccb(struct ncb *np, struct scsi_cmnd *cmd) { + u_char tn = cmd->device->id; + u_char ln = cmd->device->lun; struct tcb *tp = &np->target[tn]; struct lcb *lp = tp->lp[ln]; u_char tag = NO_TAG; @@ -6602,8 +6490,8 @@ if (qp) { cp = list_entry(qp, struct ccb, link_ccbq); if (cp->magic) { - PRINT_LUN(np, tn, ln); - printk ("ccb free list corrupted (@%p)\n", cp); + PRINT_ADDR(cmd, "ccb free list corrupted " + "(@%p)\n", cp); cp = NULL; } else { list_add_tail(qp, &lp->wait_ccbq); @@ -6637,7 +6525,7 @@ if (flags & SCSI_NOSLEEP) break; if (tsleep ((caddr_t)cp, PRIBIO|PCATCH, "ncr", 0)) break; - }; + } #endif if (cp->magic) @@ -6665,8 +6553,7 @@ cp->lun = ln; if (DEBUG_FLAGS & DEBUG_TAGS) { - PRINT_LUN(np, tn, ln); - printk ("ccb @%p using tag %d.\n", cp, tag); + PRINT_ADDR(cmd, "ccb @%p using tag %d.\n", cp, tag); } return cp; @@ -6687,8 +6574,7 @@ struct lcb *lp = tp->lp[cp->lun]; if (DEBUG_FLAGS & DEBUG_TAGS) { - PRINT_LUN(np, cp->target, cp->lun); - printk ("ccb @%p freeing tag %d.\n", cp, cp->tag); + PRINT_ADDR(cp->cmd, "ccb @%p freeing tag %d.\n", cp, cp->tag); } /* @@ -7014,21 +6900,12 @@ unsigned char tn = sdev->id, ln = sdev->lun; struct tcb *tp = &np->target[tn]; struct lcb *lp = tp->lp[ln]; - struct scsi_target *starget = tp->starget; - /* - ** If no lcb, try to allocate it. - */ + /* If no lcb, try to allocate it. */ if (!lp && !(lp = ncr_alloc_lcb(np, tn, ln))) goto fail; /* - ** Prepare negotiation - */ - if (spi_support_wide(starget) || spi_support_sync(starget)) - ncr_negotiate(np, tp); - - /* ** If unit supports tagged commands, allocate the ** CCB JUMP table if not yet. */ @@ -7170,7 +7047,7 @@ printk ("CACHE TEST FAILED: reg dstat-sstat2 readback %x.\n", (unsigned) data); return (0x10); - }; + } return (0); } @@ -7223,7 +7100,7 @@ if (i>=NCR_SNOOP_TIMEOUT) { printk ("CACHE TEST FAILED: timeout.\n"); return (0x20); - }; + } /* ** Check termination position. */ @@ -7233,7 +7110,7 @@ (u_long) NCB_SCRIPTH_PHYS (np, snooptest), (u_long) pc, (u_long) NCB_SCRIPTH_PHYS (np, snoopend) +8); return (0x40); - }; + } /* ** Show results. */ @@ -7241,17 +7118,17 @@ printk ("CACHE TEST FAILED: host wrote %d, ncr read %d.\n", (int) host_wr, (int) ncr_rd); err |= 1; - }; + } if (host_rd != ncr_wr) { printk ("CACHE TEST FAILED: ncr wrote %d, host read %d.\n", (int) ncr_wr, (int) host_rd); err |= 2; - }; + } if (ncr_bk != ncr_wr) { printk ("CACHE TEST FAILED: ncr wrote %d, read back %d.\n", (int) ncr_wr, (int) ncr_bk); err |= 4; - }; + } return (err); } @@ -7424,6 +7301,16 @@ /*===================== LINUX ENTRY POINTS SECTION ==========================*/ +static int ncr53c8xx_slave_alloc(struct scsi_device *device) +{ + struct Scsi_Host *host = device->host; + struct ncb *np = ((struct host_data *) host->hostdata)->ncb; + struct tcb *tp = &np->target[device->id]; + tp->starget = device->sdev_target; + + return 0; +} + static int ncr53c8xx_slave_configure(struct scsi_device *device) { struct Scsi_Host *host = device->host; @@ -7432,8 +7319,6 @@ struct lcb *lp = tp->lp[device->lun]; int numtags, depth_to_use; - tp->starget = device->sdev_target; - ncr_setup_lcb(np, device); /* @@ -7778,6 +7663,7 @@ tpnt->queuecommand = ncr53c8xx_queue_command; tpnt->slave_configure = ncr53c8xx_slave_configure; + tpnt->slave_alloc = ncr53c8xx_slave_alloc; tpnt->eh_bus_reset_handler = ncr53c8xx_bus_reset; tpnt->can_queue = SCSI_NCR_CAN_QUEUE; tpnt->this_id = 7; @@ -7925,7 +7811,7 @@ if (ncr_snooptest(np)) { printk(KERN_ERR "CACHE INCORRECTLY CONFIGURED.\n"); goto attach_error; - }; + } /* Install the interrupt handler. */ np->irq = device->slot.irq; @@ -8057,6 +7943,25 @@ ncr_negotiate(np, tp); } +static void ncr53c8xx_get_signalling(struct Scsi_Host *shost) +{ + struct ncb *np = ((struct host_data *)shost->hostdata)->ncb; + enum spi_signal_type type; + + switch (np->scsi_mode) { + case SMODE_SE: + type = SPI_SIGNAL_SE; + break; + case SMODE_HVD: + type = SPI_SIGNAL_HVD; + break; + default: + type = SPI_SIGNAL_UNKNOWN; + break; + } + spi_signalling(shost) = type; +} + static struct spi_function_template ncr53c8xx_transport_functions = { .set_period = ncr53c8xx_set_period, .show_period = 1, @@ -8064,6 +7969,7 @@ .show_offset = 1, .set_width = ncr53c8xx_set_width, .show_width = 1, + .get_signalling = ncr53c8xx_get_signalling, }; int __init ncr53c8xx_init(void) diff -Nru a/drivers/scsi/osst.c b/drivers/scsi/osst.c --- a/drivers/scsi/osst.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/osst.c 2005-03-30 16:58:48 -08:00 @@ -24,7 +24,7 @@ */ static const char * cvsid = "$Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $"; -const char * osst_version = "0.99.3"; +static const char * osst_version = "0.99.3"; /* The "failure to reconnect" firmware bug */ #define OSST_FW_NEED_POLL_MIN 10601 /*(107A)*/ @@ -170,7 +170,7 @@ static int osst_probe(struct device *); static int osst_remove(struct device *); -struct scsi_driver osst_template = { +static struct scsi_driver osst_template = { .owner = THIS_MODULE, .gendrv = { .name = "osst", @@ -4770,9 +4770,6 @@ { int result = 0; struct osst_tape * STp = filp->private_data; - struct scsi_request * SRpnt = NULL; - - if (SRpnt) scsi_release_request(SRpnt); if (STp->door_locked == ST_LOCKED_AUTO) do_door_lock(STp, 0); diff -Nru a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c --- a/drivers/scsi/sata_sil.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/sata_sil.c 2005-03-30 16:58:47 -08:00 @@ -38,12 +38,21 @@ #include #define DRV_NAME "sata_sil" -#define DRV_VERSION "0.8" +#define DRV_VERSION "0.9" enum { sil_3112 = 0, sil_3114 = 1, + SIL_FIFO_R0 = 0x40, + SIL_FIFO_W0 = 0x41, + SIL_FIFO_R1 = 0x44, + SIL_FIFO_W1 = 0x45, + SIL_FIFO_R2 = 0x240, + SIL_FIFO_W2 = 0x241, + SIL_FIFO_R3 = 0x244, + SIL_FIFO_W3 = 0x245, + SIL_SYSCFG = 0x48, SIL_MASK_IDE0_INT = (1 << 22), SIL_MASK_IDE1_INT = (1 << 23), @@ -199,6 +208,13 @@ MODULE_DEVICE_TABLE(pci, sil_pci_tbl); MODULE_VERSION(DRV_VERSION); +static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) +{ + u8 cache_line = 0; + pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &cache_line); + return cache_line; +} + static void sil_post_set_mode (struct ata_port *ap) { struct ata_host_set *host_set = ap->host_set; @@ -341,6 +357,7 @@ unsigned int i; int pci_dev_busy = 0; u32 tmp, irq_mask; + u8 cls; if (!printed_version++) printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); @@ -404,6 +421,19 @@ probe_ent->port[i].scr_addr = base + sil_port[i].scr; ata_std_ports(&probe_ent->port[i]); } + + /* Initialize FIFO PCI bus arbitration */ + cls = sil_get_device_cache_line(pdev); + if (cls) { + cls >>= 3; + cls++; /* cls = (line_size/8)+1 */ + writeb(cls, mmio_base + SIL_FIFO_R0); + writeb(cls, mmio_base + SIL_FIFO_W0); + writeb(cls, mmio_base + SIL_FIFO_R1); + writeb(cls, mmio_base + SIL_FIFO_W2); + } else + printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n", + pci_name(pdev)); if (ent->driver_data == sil_3114) { irq_mask = SIL_MASK_4PORT; diff -Nru a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c --- a/drivers/scsi/scsi_error.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/scsi_error.c 2005-03-30 16:58:47 -08:00 @@ -31,7 +31,6 @@ #include #include #include -#include #include "scsi_priv.h" #include "scsi_logging.h" @@ -352,10 +351,7 @@ return NEEDS_RETRY; case HARDWARE_ERROR: - if (scsi_get_device_flags(scmd->device, - scmd->device->vendor, - scmd->device->model) - & BLIST_RETRY_HWERROR) + if (scmd->device->retry_hwerror) return NEEDS_RETRY; else return SUCCESS; diff -Nru a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c --- a/drivers/scsi/scsi_lib.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/scsi_lib.c 2005-03-30 16:58:48 -08:00 @@ -252,6 +252,16 @@ complete(req->waiting); } +/* This is the end routine we get to if a command was never attached + * to the request. Simply complete the request without changing + * rq_status; this will cause a DRIVER_ERROR. */ +static void scsi_wait_req_end_io(struct request *req) +{ + BUG_ON(!req->waiting); + + complete(req->waiting); +} + void scsi_wait_req(struct scsi_request *sreq, const void *cmnd, void *buffer, unsigned bufflen, int timeout, int retries) { @@ -259,6 +269,7 @@ sreq->sr_request->waiting = &wait; sreq->sr_request->rq_status = RQ_SCSI_BUSY; + sreq->sr_request->end_io = scsi_wait_req_end_io; scsi_do_req(sreq, cmnd, buffer, bufflen, scsi_wait_done, timeout, retries); wait_for_completion(&wait); @@ -1233,6 +1244,22 @@ } /* + * Kill requests for a dead device + */ +static void scsi_kill_requests(request_queue_t *q) +{ + struct request *req; + + while ((req = elv_next_request(q)) != NULL) { + blkdev_dequeue_request(req); + req->flags |= REQ_QUIET; + while (end_that_request_first(req, 0, req->nr_sectors)) + ; + end_that_request_last(req); + } +} + +/* * Function: scsi_request_fn() * * Purpose: Main strategy routine for SCSI. @@ -1246,10 +1273,16 @@ static void scsi_request_fn(struct request_queue *q) { struct scsi_device *sdev = q->queuedata; - struct Scsi_Host *shost = sdev->host; + struct Scsi_Host *shost; struct scsi_cmnd *cmd; struct request *req; + if (!sdev) { + printk("scsi: killing requests for dead queue\n"); + scsi_kill_requests(q); + return; + } + if(!get_device(&sdev->sdev_gendev)) /* We must be tearing the block queue down already */ return; @@ -1258,6 +1291,7 @@ * To start with, we keep looping until the queue is empty, or until * the host is no longer able to accept any more requests. */ + shost = sdev->host; while (!blk_queue_plugged(q)) { int rtn; /* diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c --- a/drivers/scsi/scsi_scan.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/scsi/scsi_scan.c 2005-03-30 16:58:50 -08:00 @@ -725,6 +725,9 @@ if (*bflags & BLIST_NOT_LOCKABLE) sdev->lockable = 0; + if (*bflags & BLIST_RETRY_HWERROR) + sdev->retry_hwerror = 1; + transport_configure_device(&sdev->sdev_gendev); if (sdev->host->hostt->slave_configure) diff -Nru a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c --- a/drivers/scsi/scsi_sysfs.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/scsi_sysfs.c 2005-03-30 16:58:47 -08:00 @@ -168,8 +168,10 @@ list_del(&sdev->starved_entry); spin_unlock_irqrestore(sdev->host->host_lock, flags); - if (sdev->request_queue) + if (sdev->request_queue) { + sdev->request_queue->queuedata = NULL; scsi_free_queue(sdev->request_queue); + } scsi_target_reap(scsi_target(sdev)); @@ -561,15 +563,7 @@ **/ int scsi_sysfs_add_sdev(struct scsi_device *sdev) { - struct Scsi_Host *shost = sdev->host; - struct scsi_target *starget = scsi_target(sdev); int error, i; - unsigned long flags; - - spin_lock_irqsave(shost->host_lock, flags); - list_add_tail(&sdev->same_target_siblings, &starget->devices); - list_add_tail(&sdev->siblings, &shost->__devices); - spin_unlock_irqrestore(shost->host_lock, flags); if ((error = scsi_device_set_state(sdev, SDEV_RUNNING)) != 0) return error; @@ -786,6 +780,10 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev) { + unsigned long flags; + struct Scsi_Host *shost = sdev->host; + struct scsi_target *starget = sdev->sdev_target; + device_initialize(&sdev->sdev_gendev); sdev->sdev_gendev.bus = &scsi_bus_type; sdev->sdev_gendev.release = scsi_device_dev_release; @@ -801,6 +799,10 @@ sdev->channel, sdev->id, sdev->lun); sdev->scsi_level = SCSI_2; transport_setup_device(&sdev->sdev_gendev); + spin_lock_irqsave(shost->host_lock, flags); + list_add_tail(&sdev->same_target_siblings, &starget->devices); + list_add_tail(&sdev->siblings, &shost->__devices); + spin_unlock_irqrestore(shost->host_lock, flags); } int scsi_is_sdev_device(const struct device *dev) @@ -811,4 +813,4 @@ /* A blank transport template that is used in drivers that don't * yet implement Transport Attributes */ -struct scsi_transport_template blank_transport_template = { { { {0, }, }, }, }; +struct scsi_transport_template blank_transport_template = { { { {NULL, }, }, }, }; diff -Nru a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c --- a/drivers/scsi/scsi_transport_fc.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/scsi/scsi_transport_fc.c 2005-03-30 16:58:47 -08:00 @@ -1375,12 +1375,14 @@ static void fc_rport_tgt_remove(struct fc_rport *rport) { + struct Scsi_Host *shost = rport_to_shost(rport); + scsi_target_unblock(&rport->dev); /* Stop anything on the workq */ - if (cancel_delayed_work(&rport->dev_loss_work) || - cancel_delayed_work(&rport->scan_work)) + if (!cancel_delayed_work(&rport->dev_loss_work)) flush_scheduled_work(); + scsi_flush_work(shost); scsi_remove_target(&rport->dev); } @@ -1625,7 +1627,7 @@ * failure as the state machine state change will validate the * transaction. */ - if (cancel_delayed_work(work)) + if (!cancel_delayed_work(work)) flush_scheduled_work(); if (rport->port_state == FC_PORTSTATE_OFFLINE) diff -Nru a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c --- a/drivers/scsi/scsi_transport_spi.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/scsi/scsi_transport_spi.c 2005-03-30 16:58:48 -08:00 @@ -293,9 +293,12 @@ picosec = tp->period * 4000; } - if (picosec == -1) - return sprintf(buf, "reserved"); - len = sprint_frac(buf, picosec, 1000); + if (picosec == -1) { + len = sprintf(buf, "reserved"); + } else { + len = sprint_frac(buf, picosec, 1000); + } + buf[len++] = '\n'; buf[len] = '\0'; return len; diff -Nru a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c --- a/drivers/scsi/sim710.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/scsi/sim710.c 2005-03-30 16:58:50 -08:00 @@ -127,16 +127,24 @@ NCR_700_set_io_mapped(hostdata); /* and register the chip */ - if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev, irq, - scsi_id)) == NULL) { + if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev)) + == NULL) { printk(KERN_ERR "sim710: No host detected; card configuration problem?\n"); goto out_release; } + host->this_id = scsi_id; + host->irq = irq; + if (request_irq(irq, NCR_700_intr, SA_SHIRQ, "sim710", host)) { + printk(KERN_ERR "sim710: request_irq failed\n"); + goto out_put_host; + } scsi_scan_host(host); return 0; + out_put_host: + scsi_host_put(host); out_release: release_region(host->base, 64); out_free: diff -Nru a/drivers/scsi/sym53c8xx_defs.h b/drivers/scsi/sym53c8xx_defs.h --- a/drivers/scsi/sym53c8xx_defs.h 2005-03-30 16:58:51 -08:00 +++ b/drivers/scsi/sym53c8xx_defs.h 2005-03-30 16:58:51 -08:00 @@ -314,9 +314,9 @@ #define writew_b2l __raw_writew #define writel_b2l __raw_writel #define readw_raw __raw_readw -#define readl_raw(a) __raw_readl((unsigned long)(a)) +#define readl_raw __raw_readl #define writew_raw __raw_writew -#define writel_raw(v,a) __raw_writel(v,(unsigned long)(a)) +#define writel_raw __raw_writel #else /* Other big-endian */ #define readw_l2b readw #define readl_l2b readl @@ -1281,34 +1281,34 @@ ** Messages */ -#define M_COMPLETE (0x00) -#define M_EXTENDED (0x01) -#define M_SAVE_DP (0x02) -#define M_RESTORE_DP (0x03) -#define M_DISCONNECT (0x04) -#define M_ID_ERROR (0x05) -#define M_ABORT (0x06) -#define M_REJECT (0x07) -#define M_NOOP (0x08) -#define M_PARITY (0x09) -#define M_LCOMPLETE (0x0a) -#define M_FCOMPLETE (0x0b) -#define M_RESET (0x0c) -#define M_ABORT_TAG (0x0d) -#define M_CLEAR_QUEUE (0x0e) -#define M_INIT_REC (0x0f) -#define M_REL_REC (0x10) +#define M_COMPLETE COMMAND_COMPLETE +#define M_EXTENDED EXTENDED_MESSAGE +#define M_SAVE_DP SAVE_POINTERS +#define M_RESTORE_DP RESTORE_POINTERS +#define M_DISCONNECT DISCONNECT +#define M_ID_ERROR INITIATOR_ERROR +#define M_ABORT ABORT_TASK_SET +#define M_REJECT MESSAGE_REJECT +#define M_NOOP NOP +#define M_PARITY MSG_PARITY_ERROR +#define M_LCOMPLETE LINKED_CMD_COMPLETE +#define M_FCOMPLETE LINKED_FLG_CMD_COMPLETE +#define M_RESET TARGET_RESET +#define M_ABORT_TAG ABORT_TASK +#define M_CLEAR_QUEUE CLEAR_TASK_SET +#define M_INIT_REC INITIATE_RECOVERY +#define M_REL_REC RELEASE_RECOVERY #define M_TERMINATE (0x11) -#define M_SIMPLE_TAG (0x20) -#define M_HEAD_TAG (0x21) -#define M_ORDERED_TAG (0x22) -#define M_IGN_RESIDUE (0x23) +#define M_SIMPLE_TAG SIMPLE_QUEUE_TAG +#define M_HEAD_TAG HEAD_OF_QUEUE_TAG +#define M_ORDERED_TAG ORDERED_QUEUE_TAG +#define M_IGN_RESIDUE IGNORE_WIDE_RESIDUE #define M_IDENTIFY (0x80) -#define M_X_MODIFY_DP (0x00) -#define M_X_SYNC_REQ (0x01) -#define M_X_WIDE_REQ (0x03) -#define M_X_PPR_REQ (0x04) +#define M_X_MODIFY_DP EXTENDED_MODIFY_DATA_POINTER +#define M_X_SYNC_REQ EXTENDED_SDTR +#define M_X_WIDE_REQ EXTENDED_WDTR +#define M_X_PPR_REQ EXTENDED_PPR /* ** Status diff -Nru a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c --- a/drivers/scsi/zalon.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/scsi/zalon.c 2005-03-30 16:58:49 -08:00 @@ -88,31 +88,30 @@ struct gsc_irq gsc_irq; u32 zalon_vers; int error = -ENODEV; - unsigned long zalon = dev->hpa; - unsigned long io_port = zalon + GSC_SCSI_ZALON_OFFSET; + void __iomem *zalon = ioremap(dev->hpa, 4096); + void __iomem *io_port = zalon + GSC_SCSI_ZALON_OFFSET; static int unit = 0; struct Scsi_Host *host; struct ncr_device device; __raw_writel(CMD_RESET, zalon + IO_MODULE_IO_COMMAND); while (!(__raw_readl(zalon + IO_MODULE_IO_STATUS) & IOSTATUS_RY)) - ; + cpu_relax(); __raw_writel(IOIIDATA_MINT5EN | IOIIDATA_PACKEN | IOIIDATA_PREFETCHEN, zalon + IO_MODULE_II_CDATA); /* XXX: Save the Zalon version for bug workarounds? */ - zalon_vers = __raw_readl(dev->hpa + IO_MODULE_II_CDATA) & 0x07000000; - zalon_vers >>= 24; + zalon_vers = (__raw_readl(zalon + IO_MODULE_II_CDATA) >> 24) & 0x07; /* Setup the interrupts first. ** Later on request_irq() will register the handler. */ dev->irq = gsc_alloc_irq(&gsc_irq); - printk("%s: Zalon vers field is 0x%x, IRQ %d\n", __FUNCTION__, + printk(KERN_INFO "%s: Zalon version %d, IRQ %d\n", __FUNCTION__, zalon_vers, dev->irq); - __raw_writel(gsc_irq.txn_addr | gsc_irq.txn_data, dev->hpa + IO_MODULE_EIM); + __raw_writel(gsc_irq.txn_addr | gsc_irq.txn_data, zalon + IO_MODULE_EIM); if (zalon_vers == 0) printk(KERN_WARNING "%s: Zalon 1.1 or earlier\n", __FUNCTION__); @@ -120,16 +119,16 @@ memset(&device, 0, sizeof(struct ncr_device)); /* The following three are needed before any other access. */ - writeb(0x20, io_port + 0x38); /* DCNTL_REG, EA */ - writeb(0x04, io_port + 0x1b); /* CTEST0_REG, EHP */ - writeb(0x80, io_port + 0x22); /* CTEST4_REG, MUX */ + __raw_writeb(0x20, io_port + 0x38); /* DCNTL_REG, EA */ + __raw_writeb(0x04, io_port + 0x1b); /* CTEST0_REG, EHP */ + __raw_writeb(0x80, io_port + 0x22); /* CTEST4_REG, MUX */ /* Initialise ncr_device structure with items required by ncr_attach. */ device.chip = zalon720_chip; device.host_id = 7; device.dev = &dev->dev; - device.slot.base = (u_long)io_port; - device.slot.base_c = (u_long)io_port; + device.slot.base = dev->hpa + GSC_SCSI_ZALON_OFFSET; + device.slot.base_v = io_port; device.slot.irq = dev->irq; device.differential = 2; diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/serial/8250.c 2005-03-30 16:58:47 -08:00 @@ -261,7 +261,7 @@ .fifo_size = 32, .tx_loadsz = 32, .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, - .flags = UART_CAP_FIFO, + .flags = UART_CAP_FIFO | UART_CAP_UUE, }, }; @@ -762,6 +762,7 @@ */ DEBUG_AUTOCONF("Xscale "); up->port.type = PORT_XSCALE; + up->capabilities |= UART_CAP_UUE; return; } } else { @@ -1750,7 +1751,7 @@ up->ier &= ~UART_IER_MSI; if (UART_ENABLE_MS(&up->port, termios->c_cflag)) up->ier |= UART_IER_MSI; - if (up->port.type == PORT_XSCALE) + if (up->capabilities & UART_CAP_UUE) up->ier |= UART_IER_UUE | UART_IER_RTOIE; serial_out(up, UART_IER, up->ier); @@ -2119,7 +2120,7 @@ */ ier = serial_in(up, UART_IER); - if (up->port.type == PORT_XSCALE) + if (up->capabilities & UART_CAP_UUE) serial_out(up, UART_IER, UART_IER_UUE); else serial_out(up, UART_IER, 0); @@ -2332,7 +2333,7 @@ return 0; } -static int serial8250_suspend(struct device *dev, u32 state, u32 level) +static int serial8250_suspend(struct device *dev, pm_message_t state, u32 level) { int i; @@ -2387,26 +2388,6 @@ * modems and PCI multiport cards. */ static DECLARE_MUTEX(serial_sem); - -/* - * Are the two ports equivalent? - */ -static int uart_match_port(struct uart_port *port1, struct uart_port *port2) -{ - if (port1->iotype != port2->iotype) - return 0; - - switch (port1->iotype) { - case UPIO_PORT: - return (port1->iobase == port2->iobase); - case UPIO_HUB6: - return (port1->iobase == port2->iobase) && - (port1->hub6 == port2->hub6); - case UPIO_MEM: - return (port1->membase == port2->membase); - } - return 0; -} static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *port) { diff -Nru a/drivers/serial/8250.h b/drivers/serial/8250.h --- a/drivers/serial/8250.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/serial/8250.h 2005-03-30 16:58:47 -08:00 @@ -49,14 +49,9 @@ #define UART_CAP_EFR (1 << 9) /* UART has EFR */ #define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */ #define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */ - -#undef SERIAL_DEBUG_PCI +#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */ #if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486)) -#define SERIAL_INLINE -#endif - -#ifdef SERIAL_INLINE #define _INLINE_ inline #else #define _INLINE_ @@ -80,6 +75,13 @@ * is cleared, the machine locks up with endless interrupts. */ #define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1) +#elif defined(CONFIG_SBC8560) +/* + * WindRiver did something similarly broken on their SBC8560 board. The + * UART tristates its IRQ output while OUT2 is clear, but they pulled + * the interrupt line _up_ instead of down, so if we register the IRQ + * while the UART is in that state, we die in an IRQ storm. */ +#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2) #else #define ALPHA_KLUDGE_MCR 0 #endif diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- a/drivers/serial/8250_pci.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/serial/8250_pci.c 2005-03-30 16:58:49 -08:00 @@ -31,6 +31,8 @@ #include "8250.h" +#undef SERIAL_DEBUG_PCI + /* * Definitions for PCI support. */ @@ -577,6 +579,16 @@ return 0; } +static int __devinit pci_netmos_init(struct pci_dev *dev) +{ + /* subdevice 0x00PS means

parallel, serial */ + unsigned int num_serial = dev->subsystem_device & 0xf; + + if (num_serial == 0) + return -ENODEV; + return num_serial; +} + static int pci_default_setup(struct pci_dev *dev, struct pci_board *board, struct uart_port *port, int idx) @@ -934,6 +946,17 @@ .setup = pci_default_setup, }, /* + * Netmos cards + */ + { + .vendor = PCI_VENDOR_ID_NETMOS, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_netmos_init, + .setup = pci_default_setup, + }, + /* * Default "match everything" terminator entry */ { @@ -1877,6 +1900,9 @@ { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b2_8_115200 }, + { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, + pbn_b2_8_115200 }, { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, @@ -2184,6 +2210,9 @@ /* * HP Diva card */ + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA, + PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0, + pbn_b1_1_115200 }, { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b0_5_115200 }, diff -Nru a/drivers/serial/Kconfig b/drivers/serial/Kconfig --- a/drivers/serial/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/serial/Kconfig 2005-03-30 16:58:50 -08:00 @@ -827,4 +827,19 @@ If you have a NEC VR4100 series processor and you want to use a console on a serial port, say Y. Otherwise, say N. +config SERIAL_JSM + tristate "Digi International NEO PCI Support" + select SERIAL_CORE + help + This is a driver for Digi International's Neo series + of cards which provide multiple serial ports. You would need + something like this to connect more than two modems to your Linux + box, for instance in order to become a dial-in server. This driver + supports PCI boards only. + If you have a card like this, say Y here and read the file + . + + To compile this driver as a module, choose M here: the + module will be called jsm. + endmenu diff -Nru a/drivers/serial/Makefile b/drivers/serial/Makefile --- a/drivers/serial/Makefile 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/Makefile 2005-03-30 16:58:48 -08:00 @@ -48,6 +48,7 @@ obj-$(CONFIG_SERIAL_M32R_SIO) += m32r_sio.o obj-$(CONFIG_SERIAL_MPSC) += mpsc.o obj-$(CONFIG_ETRAX_SERIAL) += crisv10.o +obj-$(CONFIG_SERIAL_JSM) += jsm/ obj-$(CONFIG_SERIAL_TXX9) += serial_txx9.o obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o obj-$(CONFIG_BLK_DEV_SGIIOC4) += ioc4_serial.o diff -Nru a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c --- a/drivers/serial/au1x00_uart.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/serial/au1x00_uart.c 2005-03-30 16:58:47 -08:00 @@ -320,7 +320,9 @@ ignore_char: *status = serial_inp(up, UART_LSR); } while ((*status & UART_LSR_DR) && (max_count-- > 0)); + spin_unlock(&up->port.lock); tty_flip_buffer_push(tty); + spin_lock(&up->port.lock); } static _INLINE_ void transmit_chars(struct uart_8250_port *up) @@ -1242,57 +1244,6 @@ .cons = SERIAL8250_CONSOLE, }; -/* - * register_serial and unregister_serial allows for 16x50 serial ports to be - * configured at run-time, to support PCMCIA modems. - */ - -static int __register_serial(struct serial_struct *req, int line) -{ - struct uart_port port; - - port.iobase = req->port; - port.membase = req->iomem_base; - port.irq = req->irq; - port.uartclk = req->baud_base * 16; - port.fifosize = req->xmit_fifo_size; - port.regshift = req->iomem_reg_shift; - port.iotype = req->io_type; - port.flags = req->flags | UPF_BOOT_AUTOCONF; - port.mapbase = req->iomap_base; - port.line = line; - - if (HIGH_BITS_OFFSET) - port.iobase |= (long) req->port_high << HIGH_BITS_OFFSET; - - /* - * If a clock rate wasn't specified by the low level - * driver, then default to the standard clock rate. - */ - if (port.uartclk == 0) - port.uartclk = BASE_BAUD * 16; - - return uart_register_port(&serial8250_reg, &port); -} - -/** - * register_serial - configure a 16x50 serial port at runtime - * @req: request structure - * - * Configure the serial port specified by the request. If the - * port exists and is in use an error is returned. If the port - * is not currently in the table it is added. - * - * The port is then probed and if necessary the IRQ is autodetected - * If this fails an error is returned. - * - * On success the port is ready to use and the line number is returned. - */ -int register_serial(struct serial_struct *req) -{ - return __register_serial(req, -1); -} - int __init early_serial_setup(struct uart_port *port) { serial8250_isa_init_ports(); @@ -1302,18 +1253,6 @@ } /** - * unregister_serial - remove a 16x50 serial port at runtime - * @line: serial line number - * - * Remove one serial port. This may be called from interrupt - * context. - */ -void unregister_serial(int line) -{ - uart_unregister_port(&serial8250_reg, line); -} - -/** * serial8250_suspend_port - suspend one serial port * @line: serial line number * @level: the level of port suspension, as per uart_suspend_port @@ -1366,8 +1305,6 @@ module_init(serial8250_init); module_exit(serial8250_exit); -EXPORT_SYMBOL(register_serial); -EXPORT_SYMBOL(unregister_serial); EXPORT_SYMBOL(serial8250_suspend_port); EXPORT_SYMBOL(serial8250_resume_port); diff -Nru a/drivers/serial/imx.c b/drivers/serial/imx.c --- a/drivers/serial/imx.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/serial/imx.c 2005-03-30 16:58:50 -08:00 @@ -22,6 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * [29-Mar-2005] Mike Lee + * Added hardware handshake */ #include @@ -427,6 +429,11 @@ ucr2 = UCR2_WS | UCR2_SRST | UCR2_IRTS; else ucr2 = UCR2_SRST | UCR2_IRTS; + + if (termios->c_cflag & CRTSCTS) { + ucr2 &= ~UCR2_IRTS; + ucr2 |= UCR2_CTSC; + } if (termios->c_cflag & CSTOPB) ucr2 |= UCR2_STPB; diff -Nru a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c --- a/drivers/serial/ioc4_serial.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/ioc4_serial.c 2005-03-30 16:58:48 -08:00 @@ -2665,7 +2665,7 @@ __FUNCTION__, (void *)the_port, (void *)port)); - the_port->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&the_port->lock); /* membase, iobase and mapbase just need to be non-0 */ the_port->membase = (unsigned char __iomem *)1; the_port->line = the_port->iobase = ii; diff -Nru a/drivers/serial/jsm/Makefile b/drivers/serial/jsm/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/jsm/Makefile 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,8 @@ +# +# Makefile for Jasmine adapter +# + +obj-$(CONFIG_SERIAL_JSM) += jsm.o + +jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o + diff -Nru a/drivers/serial/jsm/jsm.h b/drivers/serial/jsm/jsm.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/jsm/jsm.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,437 @@ +/************************************************************************ + * Copyright 2003 Digi International (www.digi.com) + * + * Copyright (C) 2004 IBM Corporation. All rights reserved. + * + * 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, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 * Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + * + * Contact Information: + * Scott H Kilau + * Wendy Xiong + * + ***********************************************************************/ + +#ifndef __JSM_DRIVER_H +#define __JSM_DRIVER_H + +#include +#include +#include /* To pick up the varions Linux types */ +#include +#include +#include + +/* + * Debugging levels can be set using debug insmod variable + * They can also be compiled out completely. + */ +enum { + DBG_INIT = 0x01, + DBG_BASIC = 0x02, + DBG_CORE = 0x04, + DBG_OPEN = 0x08, + DBG_CLOSE = 0x10, + DBG_READ = 0x20, + DBG_WRITE = 0x40, + DBG_IOCTL = 0x80, + DBG_PROC = 0x100, + DBG_PARAM = 0x200, + DBG_PSCAN = 0x400, + DBG_EVENT = 0x800, + DBG_DRAIN = 0x1000, + DBG_MSIGS = 0x2000, + DBG_MGMT = 0x4000, + DBG_INTR = 0x8000, + DBG_CARR = 0x10000, +}; + +#define jsm_printk(nlevel, klevel, pdev, fmt, args...) \ + if ((DBG_##nlevel & jsm_debug)) \ + dev_printk(KERN_##klevel, pdev->dev, fmt, ## args) + +#define MAXPORTS 8 +#define MAX_STOPS_SENT 5 + +/* Board type definitions */ + +#define T_NEO 0000 +#define T_CLASSIC 0001 +#define T_PCIBUS 0400 + +/* Board State Definitions */ + +#define BD_RUNNING 0x0 +#define BD_REASON 0x7f +#define BD_NOTFOUND 0x1 +#define BD_NOIOPORT 0x2 +#define BD_NOMEM 0x3 +#define BD_NOBIOS 0x4 +#define BD_NOFEP 0x5 +#define BD_FAILED 0x6 +#define BD_ALLOCATED 0x7 +#define BD_TRIBOOT 0x8 +#define BD_BADKME 0x80 + + +/* 4 extra for alignment play space */ +#define WRITEBUFLEN ((4096) + 4) +#define MYFLIPLEN N_TTY_BUF_SIZE + +#define JSM_VERSION "jsm: 1.1-1-INKERNEL" +#define JSM_PARTNUM "40002438_A-INKERNEL" + +/* + * All the possible states the driver can be while being loaded. + */ +enum { + DRIVER_INITIALIZED = 0, + DRIVER_READY +}; + +/* + * All the possible states the board can be while booting up. + */ +enum { + BOARD_FAILED = 0, + BOARD_FOUND, + BOARD_READY +}; + +struct board_id { + u8 *name; + u32 maxports; +}; + +struct jsm_board; +struct jsm_channel; + +/************************************************************************ + * Per board operations structure * + ************************************************************************/ +struct board_ops { + irqreturn_t (*intr) (int irq, void *voidbrd, struct pt_regs *regs); + void (*uart_init) (struct jsm_channel *ch); + void (*uart_off) (struct jsm_channel *ch); + void (*param) (struct jsm_channel *ch); + void (*assert_modem_signals) (struct jsm_channel *ch); + void (*flush_uart_write) (struct jsm_channel *ch); + void (*flush_uart_read) (struct jsm_channel *ch); + void (*disable_receiver) (struct jsm_channel *ch); + void (*enable_receiver) (struct jsm_channel *ch); + void (*send_break) (struct jsm_channel *ch); + void (*clear_break) (struct jsm_channel *ch, int); + void (*send_start_character) (struct jsm_channel *ch); + void (*send_stop_character) (struct jsm_channel *ch); + void (*copy_data_from_queue_to_uart) (struct jsm_channel *ch); + u32 (*get_uart_bytes_left) (struct jsm_channel *ch); + void (*send_immediate_char) (struct jsm_channel *ch, unsigned char); +}; + + +/* + * Per-board information + */ +struct jsm_board +{ + int boardnum; /* Board number: 0-32 */ + + int type; /* Type of board */ + char *name; /* Product Name */ + u8 rev; /* PCI revision ID */ + struct pci_dev *pci_dev; + u32 maxports; /* MAX ports this board can handle */ + + spinlock_t bd_lock; /* Used to protect board */ + + spinlock_t bd_intr_lock; /* Used to protect the poller tasklet and + * the interrupt routine from each other. + */ + + u32 state; /* State of card. */ + wait_queue_head_t state_wait; /* Place to sleep on for state change */ + + u32 nasync; /* Number of ports on card */ + + u32 irq; /* Interrupt request number */ + u64 intr_count; /* Count of interrupts */ + + u64 membase; /* Start of base memory of the card */ + u64 membase_end; /* End of base memory of the card */ + + u8 *re_map_membase;/* Remapped memory of the card */ + + u64 iobase; /* Start of io base of the card */ + u64 iobase_end; /* End of io base of the card */ + + u32 bd_uart_offset; /* Space between each UART */ + + struct jsm_channel *channels[MAXPORTS]; /* array of pointers to our channels. */ + char *flipbuf; /* Our flip buffer, alloced if board is found */ + + u16 dpatype; /* The board "type", as defined by DPA */ + u16 dpastatus; /* The board "status", as defined by DPA */ + + u32 bd_dividend; /* Board/UARTs specific dividend */ + + struct board_ops *bd_ops; + + struct list_head jsm_board_entry; +}; + +/************************************************************************ + * Device flag definitions for ch_flags. + ************************************************************************/ +#define CH_PRON 0x0001 /* Printer on string */ +#define CH_STOP 0x0002 /* Output is stopped */ +#define CH_STOPI 0x0004 /* Input is stopped */ +#define CH_CD 0x0008 /* Carrier is present */ +#define CH_FCAR 0x0010 /* Carrier forced on */ +#define CH_HANGUP 0x0020 /* Hangup received */ + +#define CH_RECEIVER_OFF 0x0040 /* Receiver is off */ +#define CH_OPENING 0x0080 /* Port in fragile open state */ +#define CH_CLOSING 0x0100 /* Port in fragile close state */ +#define CH_FIFO_ENABLED 0x0200 /* Port has FIFOs enabled */ +#define CH_TX_FIFO_EMPTY 0x0400 /* TX Fifo is completely empty */ +#define CH_TX_FIFO_LWM 0x0800 /* TX Fifo is below Low Water */ +#define CH_BREAK_SENDING 0x1000 /* Break is being sent */ +#define CH_LOOPBACK 0x2000 /* Channel is in lookback mode */ +#define CH_FLIPBUF_IN_USE 0x4000 /* Channel's flipbuf is in use */ +#define CH_BAUD0 0x08000 /* Used for checking B0 transitions */ + +/* Our Read/Error/Write queue sizes */ +#define RQUEUEMASK 0x1FFF /* 8 K - 1 */ +#define EQUEUEMASK 0x1FFF /* 8 K - 1 */ +#define WQUEUEMASK 0x0FFF /* 4 K - 1 */ +#define RQUEUESIZE (RQUEUEMASK + 1) +#define EQUEUESIZE RQUEUESIZE +#define WQUEUESIZE (WQUEUEMASK + 1) + + +/************************************************************************ + * Channel information structure. + ************************************************************************/ +struct jsm_channel { + struct uart_port uart_port; + struct jsm_board *ch_bd; /* Board structure pointer */ + + spinlock_t ch_lock; /* provide for serialization */ + wait_queue_head_t ch_flags_wait; + + u32 ch_portnum; /* Port number, 0 offset. */ + u32 ch_open_count; /* open count */ + u32 ch_flags; /* Channel flags */ + + u64 ch_close_delay; /* How long we should drop RTS/DTR for */ + + u64 ch_cpstime; /* Time for CPS calculations */ + + tcflag_t ch_c_iflag; /* channel iflags */ + tcflag_t ch_c_cflag; /* channel cflags */ + tcflag_t ch_c_oflag; /* channel oflags */ + tcflag_t ch_c_lflag; /* channel lflags */ + u8 ch_stopc; /* Stop character */ + u8 ch_startc; /* Start character */ + + u32 ch_old_baud; /* Cache of the current baud */ + u32 ch_custom_speed;/* Custom baud, if set */ + + u32 ch_wopen; /* Waiting for open process cnt */ + + u8 ch_mostat; /* FEP output modem status */ + u8 ch_mistat; /* FEP input modem status */ + + struct neo_uart_struct *ch_neo_uart; /* Pointer to the "mapped" UART struct */ + u8 ch_cached_lsr; /* Cached value of the LSR register */ + + u8 *ch_rqueue; /* Our read queue buffer - malloc'ed */ + u16 ch_r_head; /* Head location of the read queue */ + u16 ch_r_tail; /* Tail location of the read queue */ + + u8 *ch_equeue; /* Our error queue buffer - malloc'ed */ + u16 ch_e_head; /* Head location of the error queue */ + u16 ch_e_tail; /* Tail location of the error queue */ + + u8 *ch_wqueue; /* Our write queue buffer - malloc'ed */ + u16 ch_w_head; /* Head location of the write queue */ + u16 ch_w_tail; /* Tail location of the write queue */ + + u64 ch_rxcount; /* total of data received so far */ + u64 ch_txcount; /* total of data transmitted so far */ + + u8 ch_r_tlevel; /* Receive Trigger level */ + u8 ch_t_tlevel; /* Transmit Trigger level */ + + u8 ch_r_watermark; /* Receive Watermark */ + + + u32 ch_stops_sent; /* How many times I have sent a stop character + * to try to stop the other guy sending. + */ + u64 ch_err_parity; /* Count of parity errors on channel */ + u64 ch_err_frame; /* Count of framing errors on channel */ + u64 ch_err_break; /* Count of breaks on channel */ + u64 ch_err_overrun; /* Count of overruns on channel */ + + u64 ch_xon_sends; /* Count of xons transmitted */ + u64 ch_xoff_sends; /* Count of xoffs transmitted */ +}; + + +/************************************************************************ + * Per channel/port NEO UART structure * + ************************************************************************ + * Base Structure Entries Usage Meanings to Host * + * * + * W = read write R = read only * + * U = Unused. * + ************************************************************************/ + +struct neo_uart_struct { + u8 txrx; /* WR RHR/THR - Holding Reg */ + u8 ier; /* WR IER - Interrupt Enable Reg */ + u8 isr_fcr; /* WR ISR/FCR - Interrupt Status Reg/Fifo Control Reg */ + u8 lcr; /* WR LCR - Line Control Reg */ + u8 mcr; /* WR MCR - Modem Control Reg */ + u8 lsr; /* WR LSR - Line Status Reg */ + u8 msr; /* WR MSR - Modem Status Reg */ + u8 spr; /* WR SPR - Scratch Pad Reg */ + u8 fctr; /* WR FCTR - Feature Control Reg */ + u8 efr; /* WR EFR - Enhanced Function Reg */ + u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ + u8 rfifo; /* WR RXCNT/RXTRG - Recieve FIFO Reg */ + u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ + u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ + u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ + u8 xonchar2; /* WR XON 2 - XOn Character 2 Reg */ + + u8 reserved1[0x2ff - 0x200]; /* U Reserved by Exar */ + u8 txrxburst[64]; /* RW 64 bytes of RX/TX FIFO Data */ + u8 reserved2[0x37f - 0x340]; /* U Reserved by Exar */ + u8 rxburst_with_errors[64]; /* R 64 bytes of RX FIFO Data + LSR */ +}; + +/* Where to read the extended interrupt register (32bits instead of 8bits) */ +#define UART_17158_POLL_ADDR_OFFSET 0x80 + +/* + * These are the redefinitions for the FCTR on the XR17C158, since + * Exar made them different than their earlier design. (XR16C854) + */ + +/* These are only applicable when table D is selected */ +#define UART_17158_FCTR_RTS_NODELAY 0x00 +#define UART_17158_FCTR_RTS_4DELAY 0x01 +#define UART_17158_FCTR_RTS_6DELAY 0x02 +#define UART_17158_FCTR_RTS_8DELAY 0x03 +#define UART_17158_FCTR_RTS_12DELAY 0x12 +#define UART_17158_FCTR_RTS_16DELAY 0x05 +#define UART_17158_FCTR_RTS_20DELAY 0x13 +#define UART_17158_FCTR_RTS_24DELAY 0x06 +#define UART_17158_FCTR_RTS_28DELAY 0x14 +#define UART_17158_FCTR_RTS_32DELAY 0x07 +#define UART_17158_FCTR_RTS_36DELAY 0x16 +#define UART_17158_FCTR_RTS_40DELAY 0x08 +#define UART_17158_FCTR_RTS_44DELAY 0x09 +#define UART_17158_FCTR_RTS_48DELAY 0x10 +#define UART_17158_FCTR_RTS_52DELAY 0x11 + +#define UART_17158_FCTR_RTS_IRDA 0x10 +#define UART_17158_FCTR_RS485 0x20 +#define UART_17158_FCTR_TRGA 0x00 +#define UART_17158_FCTR_TRGB 0x40 +#define UART_17158_FCTR_TRGC 0x80 +#define UART_17158_FCTR_TRGD 0xC0 + +/* 17158 trigger table selects.. */ +#define UART_17158_FCTR_BIT6 0x40 +#define UART_17158_FCTR_BIT7 0x80 + +/* 17158 TX/RX memmapped buffer offsets */ +#define UART_17158_RX_FIFOSIZE 64 +#define UART_17158_TX_FIFOSIZE 64 + +/* 17158 Extended IIR's */ +#define UART_17158_IIR_RDI_TIMEOUT 0x0C /* Receiver data TIMEOUT */ +#define UART_17158_IIR_XONXOFF 0x10 /* Received an XON/XOFF char */ +#define UART_17158_IIR_HWFLOW_STATE_CHANGE 0x20 /* CTS/DSR or RTS/DTR state change */ +#define UART_17158_IIR_FIFO_ENABLED 0xC0 /* 16550 FIFOs are Enabled */ + +/* + * These are the extended interrupts that get sent + * back to us from the UART's 32bit interrupt register + */ +#define UART_17158_RX_LINE_STATUS 0x1 /* RX Ready */ +#define UART_17158_RXRDY_TIMEOUT 0x2 /* RX Ready Timeout */ +#define UART_17158_TXRDY 0x3 /* TX Ready */ +#define UART_17158_MSR 0x4 /* Modem State Change */ +#define UART_17158_TX_AND_FIFO_CLR 0x40 /* Transmitter Holding Reg Empty */ +#define UART_17158_RX_FIFO_DATA_ERROR 0x80 /* UART detected an RX FIFO Data error */ + +/* + * These are the EXTENDED definitions for the 17C158's Interrupt + * Enable Register. + */ +#define UART_17158_EFR_ECB 0x10 /* Enhanced control bit */ +#define UART_17158_EFR_IXON 0x2 /* Receiver compares Xon1/Xoff1 */ +#define UART_17158_EFR_IXOFF 0x8 /* Transmit Xon1/Xoff1 */ +#define UART_17158_EFR_RTSDTR 0x40 /* Auto RTS/DTR Flow Control Enable */ +#define UART_17158_EFR_CTSDSR 0x80 /* Auto CTS/DSR Flow COntrol Enable */ + +#define UART_17158_XOFF_DETECT 0x1 /* Indicates whether chip saw an incoming XOFF char */ +#define UART_17158_XON_DETECT 0x2 /* Indicates whether chip saw an incoming XON char */ + +#define UART_17158_IER_RSVD1 0x10 /* Reserved by Exar */ +#define UART_17158_IER_XOFF 0x20 /* Xoff Interrupt Enable */ +#define UART_17158_IER_RTSDTR 0x40 /* Output Interrupt Enable */ +#define UART_17158_IER_CTSDSR 0x80 /* Input Interrupt Enable */ + +#define PCI_DEVICE_NEO_2DB9_PCI_NAME "Neo 2 - DB9 Universal PCI" +#define PCI_DEVICE_NEO_2DB9PRI_PCI_NAME "Neo 2 - DB9 Universal PCI - Powered Ring Indicator" +#define PCI_DEVICE_NEO_2RJ45_PCI_NAME "Neo 2 - RJ45 Universal PCI" +#define PCI_DEVICE_NEO_2RJ45PRI_PCI_NAME "Neo 2 - RJ45 Universal PCI - Powered Ring Indicator" + +/* + * Our Global Variables. + */ +extern struct uart_driver jsm_uart_driver; +extern struct board_ops jsm_neo_ops; +extern int jsm_debug; +extern int jsm_rawreadok; + +extern int jsm_driver_state; /* The state of the driver */ +extern char *jsm_driver_state_text[];/* Array of driver state text */ + +extern spinlock_t jsm_board_head_lock; +extern struct list_head jsm_board_head; + +/************************************************************************* + * + * Prototypes for non-static functions used in more than one module + * + *************************************************************************/ +int jsm_tty_write(struct uart_port *port); +int jsm_tty_init(struct jsm_board *); +int jsm_uart_port_init(struct jsm_board *); +int jsm_remove_uart_port(struct jsm_board *); +void jsm_input(struct jsm_channel *ch); +void jsm_carrier(struct jsm_channel *ch); +void jsm_check_queue_flow_control(struct jsm_channel *ch); + +void jsm_create_driver_sysfiles(struct device_driver *); +void jsm_remove_driver_sysfiles(struct device_driver *); + +#endif diff -Nru a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/jsm/jsm_driver.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,404 @@ +/************************************************************************ + * Copyright 2003 Digi International (www.digi.com) + * + * Copyright (C) 2004 IBM Corporation. All rights reserved. + * + * 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, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 * Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + * + * Contact Information: + * Scott H Kilau + * Wendy Xiong + * + ***********************************************************************/ +#include +#include + +#include "jsm.h" + +MODULE_AUTHOR("Digi International, http://www.digi.com"); +MODULE_DESCRIPTION("Driver for the Digi International Neo PCI based product line"); +MODULE_SUPPORTED_DEVICE("jsm"); + +#define JSM_DRIVER_NAME "jsm" +#define NR_PORTS 32 +#define JSM_MINOR_START 0 + +struct uart_driver jsm_uart_driver = { + .owner = THIS_MODULE, + .driver_name = JSM_DRIVER_NAME, + .dev_name = "ttyn", + .major = 253, + .minor = JSM_MINOR_START, + .nr = NR_PORTS, + .cons = NULL, +}; + +int jsm_debug; +int jsm_rawreadok; +module_param(jsm_debug, int, 0); +module_param(jsm_rawreadok, int, 0); +MODULE_PARM_DESC(jsm_debug, "Driver debugging level"); +MODULE_PARM_DESC(jsm_rawreadok, "Bypass flip buffers on input"); + +/* + * Globals + */ +int jsm_driver_state = DRIVER_INITIALIZED; +spinlock_t jsm_board_head_lock = SPIN_LOCK_UNLOCKED; +LIST_HEAD(jsm_board_head); + +static struct pci_device_id jsm_pci_tbl[] = { + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9), 0, 0, 0 }, + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9PRI), 0, 0, 1 }, + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45), 0, 0, 2 }, + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 }, + { 0,} /* 0 terminated list. */ +}; +MODULE_DEVICE_TABLE(pci, jsm_pci_tbl); + +static struct board_id jsm_Ids[] = { + { PCI_DEVICE_NEO_2DB9_PCI_NAME, 2 }, + { PCI_DEVICE_NEO_2DB9PRI_PCI_NAME, 2 }, + { PCI_DEVICE_NEO_2RJ45_PCI_NAME, 2 }, + { PCI_DEVICE_NEO_2RJ45PRI_PCI_NAME, 2 }, + { NULL, 0 } +}; + +char *jsm_driver_state_text[] = { + "Driver Initialized", + "Driver Ready." +}; + +static int jsm_finalize_board_init(struct jsm_board *brd) +{ + int rc = 0; + + jsm_printk(INIT, INFO, &brd->pci_dev, "start\n"); + + if (brd->irq) { + rc = request_irq(brd->irq, brd->bd_ops->intr, SA_INTERRUPT|SA_SHIRQ, "JSM", brd); + + if (rc) { + printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); + brd->state = BOARD_FAILED; + brd->dpastatus = BD_NOFEP; + rc = -ENODEV; + } else + jsm_printk(INIT, INFO, &brd->pci_dev, + "Requested and received usage of IRQ %d\n", brd->irq); + } + return rc; +} + +/* + * jsm_found_board() + * + * A board has been found, init it. + */ +static int jsm_found_board(struct pci_dev *pdev, int id) +{ + struct jsm_board *brd; + int i = 0; + int rc = 0; + struct list_head *tmp; + struct jsm_board *cur_board_entry; + unsigned long lock_flags; + int adapter_count = 0; + int retval; + + brd = kmalloc(sizeof(struct jsm_board), GFP_KERNEL); + if (!brd) { + dev_err(&pdev->dev, "memory allocation for board structure failed\n"); + return -ENOMEM; + } + memset(brd, 0, sizeof(struct jsm_board)); + + spin_lock_irqsave(&jsm_board_head_lock, lock_flags); + list_for_each(tmp, &jsm_board_head) { + cur_board_entry = + list_entry(tmp, struct jsm_board, + jsm_board_entry); + if (cur_board_entry->boardnum != adapter_count) { + break; + } + adapter_count++; + } + + list_add_tail(&brd->jsm_board_entry, &jsm_board_head); + spin_unlock_irqrestore(&jsm_board_head_lock, lock_flags); + + /* store the info for the board we've found */ + brd->boardnum = adapter_count; + brd->pci_dev = pdev; + brd->name = jsm_Ids[id].name; + brd->maxports = jsm_Ids[id].maxports; + brd->dpastatus = BD_NOFEP; + init_waitqueue_head(&brd->state_wait); + + spin_lock_init(&brd->bd_lock); + spin_lock_init(&brd->bd_intr_lock); + + brd->state = BOARD_FOUND; + + for (i = 0; i < brd->maxports; i++) + brd->channels[i] = NULL; + + /* store which revision we have */ + pci_read_config_byte(pdev, PCI_REVISION_ID, &brd->rev); + + brd->irq = pdev->irq; + + switch(brd->pci_dev->device) { + + case PCI_DEVICE_ID_NEO_2DB9: + case PCI_DEVICE_ID_NEO_2DB9PRI: + case PCI_DEVICE_ID_NEO_2RJ45: + case PCI_DEVICE_ID_NEO_2RJ45PRI: + + /* + * This chip is set up 100% when we get to it. + * No need to enable global interrupts or anything. + */ + brd->dpatype = T_NEO | T_PCIBUS; + + jsm_printk(INIT, INFO, &brd->pci_dev, + "jsm_found_board - NEO adapter\n"); + + /* get the PCI Base Address Registers */ + brd->membase = pci_resource_start(pdev, 0); + brd->membase_end = pci_resource_end(pdev, 0); + + if (brd->membase & 1) + brd->membase &= ~3; + else + brd->membase &= ~15; + + /* Assign the board_ops struct */ + brd->bd_ops = &jsm_neo_ops; + + brd->bd_uart_offset = 0x200; + brd->bd_dividend = 921600; + + brd->re_map_membase = ioremap(brd->membase, 0x1000); + jsm_printk(INIT, INFO, &brd->pci_dev, + "remapped mem: 0x%p\n", brd->re_map_membase); + if (!brd->re_map_membase) { + kfree(brd); + dev_err(&pdev->dev, "card has no PCI Memory resources, failing board.\n"); + return -ENOMEM; + } + break; + + default: + dev_err(&pdev->dev, "Did not find any compatible Neo or Classic PCI boards in system.\n"); + kfree(brd); + return -ENXIO; + } + + /* + * Do tty device initialization. + */ + rc = jsm_finalize_board_init(brd); + if (rc < 0) { + dev_err(&pdev->dev, "Can't finalize board init (%d)\n", rc); + brd->state = BOARD_FAILED; + retval = -ENXIO; + goto failed0; + } + + rc = jsm_tty_init(brd); + if (rc < 0) { + dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc); + brd->state = BOARD_FAILED; + retval = -ENXIO; + goto failed1; + } + + rc = jsm_uart_port_init(brd); + if (rc < 0) { + dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc); + brd->state = BOARD_FAILED; + retval = -ENXIO; + goto failed1; + } + + brd->state = BOARD_READY; + brd->dpastatus = BD_RUNNING; + + /* Log the information about the board */ + dev_info(&pdev->dev, "board %d: %s (rev %d), irq %d\n",adapter_count, brd->name, brd->rev, brd->irq); + + /* + * allocate flip buffer for board. + * + * Okay to malloc with GFP_KERNEL, we are not at interrupt + * context, and there are no locks held. + */ + brd->flipbuf = kmalloc(MYFLIPLEN, GFP_KERNEL); + if (!brd->flipbuf) { + dev_err(&pdev->dev, "memory allocation for flipbuf failed\n"); + brd->state = BOARD_FAILED; + retval = -ENOMEM; + goto failed1; + } + memset(brd->flipbuf, 0, MYFLIPLEN); + + jsm_create_driver_sysfiles(pdev->dev.driver); + + wake_up_interruptible(&brd->state_wait); + return 0; +failed1: + free_irq(brd->irq, brd); +failed0: + kfree(brd); + iounmap(brd->re_map_membase); + return retval; +} + +/* returns count (>= 0), or negative on error */ +static int jsm_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) +{ + int rc; + + rc = pci_enable_device(pdev); + if (rc) { + dev_err(&pdev->dev, "Device enable FAILED\n"); + return rc; + } + + if ((rc = pci_request_regions(pdev, "jsm"))) { + dev_err(&pdev->dev, "pci_request_region FAILED\n"); + pci_disable_device(pdev); + return rc; + } + + if ((rc = jsm_found_board(pdev, ent->driver_data))) { + dev_err(&pdev->dev, "jsm_found_board FAILED\n"); + pci_release_regions(pdev); + pci_disable_device(pdev); + return rc; + } + return rc; +} + + +/* + * jsm_cleanup_board() + * + * Free all the memory associated with a board + */ +static void jsm_cleanup_board(struct jsm_board *brd) +{ + int i = 0; + + free_irq(brd->irq, brd); + iounmap(brd->re_map_membase); + + /* Free all allocated channels structs */ + for (i = 0; i < brd->maxports; i++) { + if (brd->channels[i]) { + if (brd->channels[i]->ch_rqueue) + kfree(brd->channels[i]->ch_rqueue); + if (brd->channels[i]->ch_equeue) + kfree(brd->channels[i]->ch_equeue); + if (brd->channels[i]->ch_wqueue) + kfree(brd->channels[i]->ch_wqueue); + kfree(brd->channels[i]); + } + } + + pci_release_regions(brd->pci_dev); + pci_disable_device(brd->pci_dev); + kfree(brd->flipbuf); + kfree(brd); +} + +static void jsm_remove_one(struct pci_dev *dev) +{ + unsigned long lock_flags; + struct list_head *tmp; + struct jsm_board *brd; + + spin_lock_irqsave(&jsm_board_head_lock, lock_flags); + list_for_each(tmp, &jsm_board_head) { + brd = list_entry(tmp, struct jsm_board, + jsm_board_entry); + if ( brd != NULL && brd->pci_dev == dev) { + jsm_remove_uart_port(brd); + jsm_cleanup_board(brd); + list_del(&brd->jsm_board_entry); + break; + } + } + spin_unlock_irqrestore(&jsm_board_head_lock, lock_flags); + return; +} + +struct pci_driver jsm_driver = { + .name = "jsm", + .probe = jsm_init_one, + .id_table = jsm_pci_tbl, + .remove = __devexit_p(jsm_remove_one), +}; + +/* + * jsm_init_module() + * + * Module load. This is where it all starts. + */ +static int __init jsm_init_module(void) +{ + int rc = 0; + + printk(KERN_INFO "%s, Digi International Part Number %s\n", + JSM_VERSION, JSM_VERSION); + + /* + * Initialize global stuff + */ + + rc = uart_register_driver(&jsm_uart_driver); + if (rc < 0) { + return rc; + } + + rc = pci_register_driver(&jsm_driver); + if (rc < 0) { + uart_unregister_driver(&jsm_uart_driver); + return rc; + } + jsm_driver_state = DRIVER_READY; + + return rc; +} + +module_init(jsm_init_module); + +/* + * jsm_exit_module() + * + * Module unload. This is where it all ends. + */ +static void __exit jsm_exit_module(void) +{ + jsm_remove_driver_sysfiles(&jsm_driver.driver); + + pci_unregister_driver(&jsm_driver); + + uart_unregister_driver(&jsm_uart_driver); +} +module_exit(jsm_exit_module); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/jsm/jsm_neo.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,1427 @@ +/************************************************************************ + * Copyright 2003 Digi International (www.digi.com) + * + * Copyright (C) 2004 IBM Corporation. All rights reserved. + * + * 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, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 * Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + * + * Contact Information: + * Scott H Kilau + * Wendy Xiong + * + ***********************************************************************/ +#include /* For udelay */ +#include /* For the various UART offsets */ +#include +#include +#include + +#include "jsm.h" /* Driver main header file */ + +static u32 jsm_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; + +/* + * This function allows calls to ensure that all outstanding + * PCI writes have been completed, by doing a PCI read against + * a non-destructive, read-only location on the Neo card. + * + * In this case, we are reading the DVID (Read-only Device Identification) + * value of the Neo card. + */ +static inline void neo_pci_posting_flush(struct jsm_board *bd) +{ + readb(bd->re_map_membase + 0x8D); +} + +static void neo_set_cts_flow_control(struct jsm_channel *ch) +{ + u8 ier = readb(&ch->ch_neo_uart->ier); + u8 efr = readb(&ch->ch_neo_uart->efr); + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "Setting CTSFLOW\n"); + + /* Turn on auto CTS flow control */ + ier |= (UART_17158_IER_CTSDSR); + efr |= (UART_17158_EFR_ECB | UART_17158_EFR_CTSDSR); + + /* Turn off auto Xon flow control */ + efr &= ~(UART_17158_EFR_IXON); + + /* Why? Becuz Exar's spec says we have to zero it out before setting it */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Turn on UART enhanced bits */ + writeb(efr, &ch->ch_neo_uart->efr); + + /* Turn on table D, with 8 char hi/low watermarks */ + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), &ch->ch_neo_uart->fctr); + + /* Feed the UART our trigger levels */ + writeb(8, &ch->ch_neo_uart->tfifo); + ch->ch_t_tlevel = 8; + + writeb(ier, &ch->ch_neo_uart->ier); +} + +static void neo_set_rts_flow_control(struct jsm_channel *ch) +{ + u8 ier = readb(&ch->ch_neo_uart->ier); + u8 efr = readb(&ch->ch_neo_uart->efr); + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "Setting RTSFLOW\n"); + + /* Turn on auto RTS flow control */ + ier |= (UART_17158_IER_RTSDTR); + efr |= (UART_17158_EFR_ECB | UART_17158_EFR_RTSDTR); + + /* Turn off auto Xoff flow control */ + ier &= ~(UART_17158_IER_XOFF); + efr &= ~(UART_17158_EFR_IXOFF); + + /* Why? Becuz Exar's spec says we have to zero it out before setting it */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Turn on UART enhanced bits */ + writeb(efr, &ch->ch_neo_uart->efr); + + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), &ch->ch_neo_uart->fctr); + ch->ch_r_watermark = 4; + + writeb(56, &ch->ch_neo_uart->rfifo); + ch->ch_r_tlevel = 56; + + writeb(ier, &ch->ch_neo_uart->ier); + + /* + * From the Neo UART spec sheet: + * The auto RTS/DTR function must be started by asserting + * RTS/DTR# output pin (MCR bit-0 or 1 to logic 1 after + * it is enabled. + */ + ch->ch_mostat |= (UART_MCR_RTS); +} + + +static void neo_set_ixon_flow_control(struct jsm_channel *ch) +{ + u8 ier = readb(&ch->ch_neo_uart->ier); + u8 efr = readb(&ch->ch_neo_uart->efr); + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "Setting IXON FLOW\n"); + + /* Turn off auto CTS flow control */ + ier &= ~(UART_17158_IER_CTSDSR); + efr &= ~(UART_17158_EFR_CTSDSR); + + /* Turn on auto Xon flow control */ + efr |= (UART_17158_EFR_ECB | UART_17158_EFR_IXON); + + /* Why? Becuz Exar's spec says we have to zero it out before setting it */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Turn on UART enhanced bits */ + writeb(efr, &ch->ch_neo_uart->efr); + + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + ch->ch_r_watermark = 4; + + writeb(32, &ch->ch_neo_uart->rfifo); + ch->ch_r_tlevel = 32; + + /* Tell UART what start/stop chars it should be looking for */ + writeb(ch->ch_startc, &ch->ch_neo_uart->xonchar1); + writeb(0, &ch->ch_neo_uart->xonchar2); + + writeb(ch->ch_stopc, &ch->ch_neo_uart->xoffchar1); + writeb(0, &ch->ch_neo_uart->xoffchar2); + + writeb(ier, &ch->ch_neo_uart->ier); +} + +static void neo_set_ixoff_flow_control(struct jsm_channel *ch) +{ + u8 ier = readb(&ch->ch_neo_uart->ier); + u8 efr = readb(&ch->ch_neo_uart->efr); + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "Setting IXOFF FLOW\n"); + + /* Turn off auto RTS flow control */ + ier &= ~(UART_17158_IER_RTSDTR); + efr &= ~(UART_17158_EFR_RTSDTR); + + /* Turn on auto Xoff flow control */ + ier |= (UART_17158_IER_XOFF); + efr |= (UART_17158_EFR_ECB | UART_17158_EFR_IXOFF); + + /* Why? Becuz Exar's spec says we have to zero it out before setting it */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Turn on UART enhanced bits */ + writeb(efr, &ch->ch_neo_uart->efr); + + /* Turn on table D, with 8 char hi/low watermarks */ + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + + writeb(8, &ch->ch_neo_uart->tfifo); + ch->ch_t_tlevel = 8; + + /* Tell UART what start/stop chars it should be looking for */ + writeb(ch->ch_startc, &ch->ch_neo_uart->xonchar1); + writeb(0, &ch->ch_neo_uart->xonchar2); + + writeb(ch->ch_stopc, &ch->ch_neo_uart->xoffchar1); + writeb(0, &ch->ch_neo_uart->xoffchar2); + + writeb(ier, &ch->ch_neo_uart->ier); +} + +static void neo_set_no_input_flow_control(struct jsm_channel *ch) +{ + u8 ier = readb(&ch->ch_neo_uart->ier); + u8 efr = readb(&ch->ch_neo_uart->efr); + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "Unsetting Input FLOW\n"); + + /* Turn off auto RTS flow control */ + ier &= ~(UART_17158_IER_RTSDTR); + efr &= ~(UART_17158_EFR_RTSDTR); + + /* Turn off auto Xoff flow control */ + ier &= ~(UART_17158_IER_XOFF); + if (ch->ch_c_iflag & IXON) + efr &= ~(UART_17158_EFR_IXOFF); + else + efr &= ~(UART_17158_EFR_ECB | UART_17158_EFR_IXOFF); + + /* Why? Becuz Exar's spec says we have to zero it out before setting it */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Turn on UART enhanced bits */ + writeb(efr, &ch->ch_neo_uart->efr); + + /* Turn on table D, with 8 char hi/low watermarks */ + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + + ch->ch_r_watermark = 0; + + writeb(16, &ch->ch_neo_uart->tfifo); + ch->ch_t_tlevel = 16; + + writeb(16, &ch->ch_neo_uart->rfifo); + ch->ch_r_tlevel = 16; + + writeb(ier, &ch->ch_neo_uart->ier); +} + +static void neo_set_no_output_flow_control(struct jsm_channel *ch) +{ + u8 ier = readb(&ch->ch_neo_uart->ier); + u8 efr = readb(&ch->ch_neo_uart->efr); + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "Unsetting Output FLOW\n"); + + /* Turn off auto CTS flow control */ + ier &= ~(UART_17158_IER_CTSDSR); + efr &= ~(UART_17158_EFR_CTSDSR); + + /* Turn off auto Xon flow control */ + if (ch->ch_c_iflag & IXOFF) + efr &= ~(UART_17158_EFR_IXON); + else + efr &= ~(UART_17158_EFR_ECB | UART_17158_EFR_IXON); + + /* Why? Becuz Exar's spec says we have to zero it out before setting it */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Turn on UART enhanced bits */ + writeb(efr, &ch->ch_neo_uart->efr); + + /* Turn on table D, with 8 char hi/low watermarks */ + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + + ch->ch_r_watermark = 0; + + writeb(16, &ch->ch_neo_uart->tfifo); + ch->ch_t_tlevel = 16; + + writeb(16, &ch->ch_neo_uart->rfifo); + ch->ch_r_tlevel = 16; + + writeb(ier, &ch->ch_neo_uart->ier); +} + +static inline void neo_set_new_start_stop_chars(struct jsm_channel *ch) +{ + + /* if hardware flow control is set, then skip this whole thing */ + if (ch->ch_c_cflag & CRTSCTS) + return; + + jsm_printk(PARAM, INFO, &ch->ch_bd->pci_dev, "start\n"); + + /* Tell UART what start/stop chars it should be looking for */ + writeb(ch->ch_startc, &ch->ch_neo_uart->xonchar1); + writeb(0, &ch->ch_neo_uart->xonchar2); + + writeb(ch->ch_stopc, &ch->ch_neo_uart->xoffchar1); + writeb(0, &ch->ch_neo_uart->xoffchar2); +} + +static void neo_copy_data_from_uart_to_queue(struct jsm_channel *ch) +{ + int qleft = 0; + u8 linestatus = 0; + u8 error_mask = 0; + int n = 0; + int total = 0; + u16 head; + u16 tail; + + if (!ch) + return; + + /* cache head and tail of queue */ + head = ch->ch_r_head & RQUEUEMASK; + tail = ch->ch_r_tail & RQUEUEMASK; + + /* Get our cached LSR */ + linestatus = ch->ch_cached_lsr; + ch->ch_cached_lsr = 0; + + /* Store how much space we have left in the queue */ + if ((qleft = tail - head - 1) < 0) + qleft += RQUEUEMASK + 1; + + /* + * If the UART is not in FIFO mode, force the FIFO copy to + * NOT be run, by setting total to 0. + * + * On the other hand, if the UART IS in FIFO mode, then ask + * the UART to give us an approximation of data it has RX'ed. + */ + if (!(ch->ch_flags & CH_FIFO_ENABLED)) + total = 0; + else { + total = readb(&ch->ch_neo_uart->rfifo); + + /* + * EXAR chip bug - RX FIFO COUNT - Fudge factor. + * + * This resolves a problem/bug with the Exar chip that sometimes + * returns a bogus value in the rfifo register. + * The count can be any where from 0-3 bytes "off". + * Bizarre, but true. + */ + total -= 3; + } + + /* + * Finally, bound the copy to make sure we don't overflow + * our own queue... + * The byte by byte copy loop below this loop this will + * deal with the queue overflow possibility. + */ + total = min(total, qleft); + + while (total > 0) { + /* + * Grab the linestatus register, we need to check + * to see if there are any errors in the FIFO. + */ + linestatus = readb(&ch->ch_neo_uart->lsr); + + /* + * Break out if there is a FIFO error somewhere. + * This will allow us to go byte by byte down below, + * finding the exact location of the error. + */ + if (linestatus & UART_17158_RX_FIFO_DATA_ERROR) + break; + + /* Make sure we don't go over the end of our queue */ + n = min(((u32) total), (RQUEUESIZE - (u32) head)); + + /* + * Cut down n even further if needed, this is to fix + * a problem with memcpy_fromio() with the Neo on the + * IBM pSeries platform. + * 15 bytes max appears to be the magic number. + */ + n = min((u32) n, (u32) 12); + + /* + * Since we are grabbing the linestatus register, which + * will reset some bits after our read, we need to ensure + * we don't miss our TX FIFO emptys. + */ + if (linestatus & (UART_LSR_THRE | UART_17158_TX_AND_FIFO_CLR)) + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + + linestatus = 0; + + /* Copy data from uart to the queue */ + memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, n); + /* + * Since RX_FIFO_DATA_ERROR was 0, we are guarenteed + * that all the data currently in the FIFO is free of + * breaks and parity/frame/orun errors. + */ + memset(ch->ch_equeue + head, 0, n); + + /* Add to and flip head if needed */ + head = (head + n) & RQUEUEMASK; + total -= n; + qleft -= n; + ch->ch_rxcount += n; + } + + /* + * Create a mask to determine whether we should + * insert the character (if any) into our queue. + */ + if (ch->ch_c_iflag & IGNBRK) + error_mask |= UART_LSR_BI; + + /* + * Now cleanup any leftover bytes still in the UART. + * Also deal with any possible queue overflow here as well. + */ + while (1) { + + /* + * Its possible we have a linestatus from the loop above + * this, so we "OR" on any extra bits. + */ + linestatus |= readb(&ch->ch_neo_uart->lsr); + + /* + * If the chip tells us there is no more data pending to + * be read, we can then leave. + * But before we do, cache the linestatus, just in case. + */ + if (!(linestatus & UART_LSR_DR)) { + ch->ch_cached_lsr = linestatus; + break; + } + + /* No need to store this bit */ + linestatus &= ~UART_LSR_DR; + + /* + * Since we are grabbing the linestatus register, which + * will reset some bits after our read, we need to ensure + * we don't miss our TX FIFO emptys. + */ + if (linestatus & (UART_LSR_THRE | UART_17158_TX_AND_FIFO_CLR)) { + linestatus &= ~(UART_LSR_THRE | UART_17158_TX_AND_FIFO_CLR); + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + } + + /* + * Discard character if we are ignoring the error mask. + */ + if (linestatus & error_mask) { + u8 discard; + linestatus = 0; + memcpy_fromio(&discard, &ch->ch_neo_uart->txrxburst, 1); + continue; + } + + /* + * If our queue is full, we have no choice but to drop some data. + * The assumption is that HWFLOW or SWFLOW should have stopped + * things way way before we got to this point. + * + * I decided that I wanted to ditch the oldest data first, + * I hope thats okay with everyone? Yes? Good. + */ + while (qleft < 1) { + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "Queue full, dropping DATA:%x LSR:%x\n", + ch->ch_rqueue[tail], ch->ch_equeue[tail]); + + ch->ch_r_tail = tail = (tail + 1) & RQUEUEMASK; + ch->ch_err_overrun++; + qleft++; + } + + memcpy_fromio(ch->ch_rqueue + head, &ch->ch_neo_uart->txrxburst, 1); + ch->ch_equeue[head] = (u8) linestatus; + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "DATA/LSR pair: %x %x\n", ch->ch_rqueue[head], ch->ch_equeue[head]); + + /* Ditch any remaining linestatus value. */ + linestatus = 0; + + /* Add to and flip head if needed */ + head = (head + 1) & RQUEUEMASK; + + qleft--; + ch->ch_rxcount++; + } + + /* + * Write new final heads to channel structure. + */ + ch->ch_r_head = head & RQUEUEMASK; + ch->ch_e_head = head & EQUEUEMASK; + jsm_input(ch); +} + +static void neo_copy_data_from_queue_to_uart(struct jsm_channel *ch) +{ + u16 head; + u16 tail; + int n; + int s; + int qlen; + u32 len_written = 0; + + if (!ch) + return; + + /* No data to write to the UART */ + if (ch->ch_w_tail == ch->ch_w_head) + return; + + /* If port is "stopped", don't send any data to the UART */ + if ((ch->ch_flags & CH_STOP) || (ch->ch_flags & CH_BREAK_SENDING)) + return; + /* + * If FIFOs are disabled. Send data directly to txrx register + */ + if (!(ch->ch_flags & CH_FIFO_ENABLED)) { + u8 lsrbits = readb(&ch->ch_neo_uart->lsr); + + ch->ch_cached_lsr |= lsrbits; + if (ch->ch_cached_lsr & UART_LSR_THRE) { + ch->ch_cached_lsr &= ~(UART_LSR_THRE); + + writeb(ch->ch_wqueue[ch->ch_w_tail], &ch->ch_neo_uart->txrx); + jsm_printk(WRITE, INFO, &ch->ch_bd->pci_dev, + "Tx data: %x\n", ch->ch_wqueue[ch->ch_w_head]); + ch->ch_w_tail++; + ch->ch_w_tail &= WQUEUEMASK; + ch->ch_txcount++; + } + return; + } + + /* + * We have to do it this way, because of the EXAR TXFIFO count bug. + */ + if (!(ch->ch_flags & (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM))) + return; + + len_written = 0; + n = UART_17158_TX_FIFOSIZE - ch->ch_t_tlevel; + + /* cache head and tail of queue */ + head = ch->ch_w_head & WQUEUEMASK; + tail = ch->ch_w_tail & WQUEUEMASK; + qlen = (head - tail) & WQUEUEMASK; + + /* Find minimum of the FIFO space, versus queue length */ + n = min(n, qlen); + + while (n > 0) { + + s = ((head >= tail) ? head : WQUEUESIZE) - tail; + s = min(s, n); + + if (s <= 0) + break; + + memcpy_toio(&ch->ch_neo_uart->txrxburst, ch->ch_wqueue + tail, s); + /* Add and flip queue if needed */ + tail = (tail + s) & WQUEUEMASK; + n -= s; + ch->ch_txcount += s; + len_written += s; + } + + /* Update the final tail */ + ch->ch_w_tail = tail & WQUEUEMASK; + + if (len_written >= ch->ch_t_tlevel) + ch->ch_flags &= ~(CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + + if (!jsm_tty_write(&ch->uart_port)) + uart_write_wakeup(&ch->uart_port); +} + +static void neo_parse_modem(struct jsm_channel *ch, u8 signals) +{ + u8 msignals = signals; + + jsm_printk(MSIGS, INFO, &ch->ch_bd->pci_dev, + "neo_parse_modem: port: %d msignals: %x\n", ch->ch_portnum, msignals); + + if (!ch) + return; + + /* Scrub off lower bits. They signify delta's, which I don't care about */ + msignals &= 0xf0; + + if (msignals & UART_MSR_DCD) + ch->ch_mistat |= UART_MSR_DCD; + else + ch->ch_mistat &= ~UART_MSR_DCD; + + if (msignals & UART_MSR_DSR) + ch->ch_mistat |= UART_MSR_DSR; + else + ch->ch_mistat &= ~UART_MSR_DSR; + + if (msignals & UART_MSR_RI) + ch->ch_mistat |= UART_MSR_RI; + else + ch->ch_mistat &= ~UART_MSR_RI; + + if (msignals & UART_MSR_CTS) + ch->ch_mistat |= UART_MSR_CTS; + else + ch->ch_mistat &= ~UART_MSR_CTS; + + jsm_printk(MSIGS, INFO, &ch->ch_bd->pci_dev, + "Port: %d DTR: %d RTS: %d CTS: %d DSR: %d " "RI: %d CD: %d\n", + ch->ch_portnum, + !!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_DTR), + !!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_RTS), + !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_CTS), + !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DSR), + !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_RI), + !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DCD)); +} + +/* Make the UART raise any of the output signals we want up */ +static void neo_assert_modem_signals(struct jsm_channel *ch) +{ + u8 out; + + if (!ch) + return; + + out = ch->ch_mostat; + + writeb(out, &ch->ch_neo_uart->mcr); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); +} + +/* + * Flush the WRITE FIFO on the Neo. + * + * NOTE: Channel lock MUST be held before calling this function! + */ +static void neo_flush_uart_write(struct jsm_channel *ch) +{ + u8 tmp = 0; + int i = 0; + + if (!ch) + return; + + writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_XMIT), &ch->ch_neo_uart->isr_fcr); + + for (i = 0; i < 10; i++) { + + /* Check to see if the UART feels it completely flushed the FIFO. */ + tmp = readb(&ch->ch_neo_uart->isr_fcr); + if (tmp & 4) { + jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, + "Still flushing TX UART... i: %d\n", i); + udelay(10); + } + else + break; + } + + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); +} + + +/* + * Flush the READ FIFO on the Neo. + * + * NOTE: Channel lock MUST be held before calling this function! + */ +static void neo_flush_uart_read(struct jsm_channel *ch) +{ + u8 tmp = 0; + int i = 0; + + if (!ch) + return; + + writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR), &ch->ch_neo_uart->isr_fcr); + + for (i = 0; i < 10; i++) { + + /* Check to see if the UART feels it completely flushed the FIFO. */ + tmp = readb(&ch->ch_neo_uart->isr_fcr); + if (tmp & 2) { + jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, + "Still flushing RX UART... i: %d\n", i); + udelay(10); + } + else + break; + } +} + +/* + * No locks are assumed to be held when calling this function. + */ +void neo_clear_break(struct jsm_channel *ch, int force) +{ + u64 lock_flags; + + spin_lock_irqsave(&ch->ch_lock, lock_flags); + + /* Turn break off, and unset some variables */ + if (ch->ch_flags & CH_BREAK_SENDING) { + u8 temp = readb(&ch->ch_neo_uart->lcr); + writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); + + ch->ch_flags &= ~(CH_BREAK_SENDING); + jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, + "clear break Finishing UART_LCR_SBC! finished: %lx\n", jiffies); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); + } + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); +} + +/* + * Parse the ISR register. + */ +static inline void neo_parse_isr(struct jsm_board *brd, u32 port) +{ + struct jsm_channel *ch; + u8 isr; + u8 cause; + u64 lock_flags; + + if (!brd) + return; + + if (port > brd->maxports) + return; + + ch = brd->channels[port]; + if (!ch) + return; + + /* Here we try to figure out what caused the interrupt to happen */ + while (1) { + + isr = readb(&ch->ch_neo_uart->isr_fcr); + + /* Bail if no pending interrupt */ + if (isr & UART_IIR_NO_INT) + break; + + /* + * Yank off the upper 2 bits, which just show that the FIFO's are enabled. + */ + isr &= ~(UART_17158_IIR_FIFO_ENABLED); + + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "%s:%d isr: %x\n", __FILE__, __LINE__, isr); + + if (isr & (UART_17158_IIR_RDI_TIMEOUT | UART_IIR_RDI)) { + /* Read data from uart -> queue */ + neo_copy_data_from_uart_to_queue(ch); + + /* Call our tty layer to enforce queue flow control if needed. */ + spin_lock_irqsave(&ch->ch_lock, lock_flags); + jsm_check_queue_flow_control(ch); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + } + + if (isr & UART_IIR_THRI) { + /* Transfer data (if any) from Write Queue -> UART. */ + spin_lock_irqsave(&ch->ch_lock, lock_flags); + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + neo_copy_data_from_queue_to_uart(ch); + } + + if (isr & UART_17158_IIR_XONXOFF) { + cause = readb(&ch->ch_neo_uart->xoffchar1); + + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "Port %d. Got ISR_XONXOFF: cause:%x\n", port, cause); + + /* + * Since the UART detected either an XON or + * XOFF match, we need to figure out which + * one it was, so we can suspend or resume data flow. + */ + spin_lock_irqsave(&ch->ch_lock, lock_flags); + if (cause == UART_17158_XON_DETECT) { + /* Is output stopped right now, if so, resume it */ + if (brd->channels[port]->ch_flags & CH_STOP) { + ch->ch_flags &= ~(CH_STOP); + } + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "Port %d. XON detected in incoming data\n", port); + } + else if (cause == UART_17158_XOFF_DETECT) { + if (!(brd->channels[port]->ch_flags & CH_STOP)) { + ch->ch_flags |= CH_STOP; + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "Setting CH_STOP\n"); + } + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "Port: %d. XOFF detected in incoming data\n", port); + } + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + } + + if (isr & UART_17158_IIR_HWFLOW_STATE_CHANGE) { + /* + * If we get here, this means the hardware is doing auto flow control. + * Check to see whether RTS/DTR or CTS/DSR caused this interrupt. + */ + cause = readb(&ch->ch_neo_uart->mcr); + + /* Which pin is doing auto flow? RTS or DTR? */ + spin_lock_irqsave(&ch->ch_lock, lock_flags); + if ((cause & 0x4) == 0) { + if (cause & UART_MCR_RTS) + ch->ch_mostat |= UART_MCR_RTS; + else + ch->ch_mostat &= ~(UART_MCR_RTS); + } else { + if (cause & UART_MCR_DTR) + ch->ch_mostat |= UART_MCR_DTR; + else + ch->ch_mostat &= ~(UART_MCR_DTR); + } + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + } + + /* Parse any modem signal changes */ + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "MOD_STAT: sending to parse_modem_sigs\n"); + neo_parse_modem(ch, readb(&ch->ch_neo_uart->msr)); + } +} + +static inline void neo_parse_lsr(struct jsm_board *brd, u32 port) +{ + struct jsm_channel *ch; + int linestatus; + u64 lock_flags; + + if (!brd) + return; + + if (port > brd->maxports) + return; + + ch = brd->channels[port]; + if (!ch) + return; + + linestatus = readb(&ch->ch_neo_uart->lsr); + + jsm_printk(INTR, INFO, &ch->ch_bd->pci_dev, + "%s:%d port: %d linestatus: %x\n", __FILE__, __LINE__, port, linestatus); + + ch->ch_cached_lsr |= linestatus; + + if (ch->ch_cached_lsr & UART_LSR_DR) { + /* Read data from uart -> queue */ + neo_copy_data_from_uart_to_queue(ch); + spin_lock_irqsave(&ch->ch_lock, lock_flags); + jsm_check_queue_flow_control(ch); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + } + + /* + * This is a special flag. It indicates that at least 1 + * RX error (parity, framing, or break) has happened. + * Mark this in our struct, which will tell me that I have + *to do the special RX+LSR read for this FIFO load. + */ + if (linestatus & UART_17158_RX_FIFO_DATA_ERROR) + jsm_printk(INTR, DEBUG, &ch->ch_bd->pci_dev, + "%s:%d Port: %d Got an RX error, need to parse LSR\n", + __FILE__, __LINE__, port); + + /* + * The next 3 tests should *NOT* happen, as the above test + * should encapsulate all 3... At least, thats what Exar says. + */ + + if (linestatus & UART_LSR_PE) { + ch->ch_err_parity++; + jsm_printk(INTR, DEBUG, &ch->ch_bd->pci_dev, + "%s:%d Port: %d. PAR ERR!\n", __FILE__, __LINE__, port); + } + + if (linestatus & UART_LSR_FE) { + ch->ch_err_frame++; + jsm_printk(INTR, DEBUG, &ch->ch_bd->pci_dev, + "%s:%d Port: %d. FRM ERR!\n", __FILE__, __LINE__, port); + } + + if (linestatus & UART_LSR_BI) { + ch->ch_err_break++; + jsm_printk(INTR, DEBUG, &ch->ch_bd->pci_dev, + "%s:%d Port: %d. BRK INTR!\n", __FILE__, __LINE__, port); + } + + if (linestatus & UART_LSR_OE) { + /* + * Rx Oruns. Exar says that an orun will NOT corrupt + * the FIFO. It will just replace the holding register + * with this new data byte. So basically just ignore this. + * Probably we should eventually have an orun stat in our driver... + */ + ch->ch_err_overrun++; + jsm_printk(INTR, DEBUG, &ch->ch_bd->pci_dev, + "%s:%d Port: %d. Rx Overrun!\n", __FILE__, __LINE__, port); + } + + if (linestatus & UART_LSR_THRE) { + spin_lock_irqsave(&ch->ch_lock, lock_flags); + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + + /* Transfer data (if any) from Write Queue -> UART. */ + neo_copy_data_from_queue_to_uart(ch); + } + else if (linestatus & UART_17158_TX_AND_FIFO_CLR) { + spin_lock_irqsave(&ch->ch_lock, lock_flags); + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + + /* Transfer data (if any) from Write Queue -> UART. */ + neo_copy_data_from_queue_to_uart(ch); + } +} + +/* + * neo_param() + * Send any/all changes to the line to the UART. + */ +static void neo_param(struct jsm_channel *ch) +{ + u8 lcr = 0; + u8 uart_lcr = 0; + u8 ier = 0; + u32 baud = 9600; + int quot = 0; + struct jsm_board *bd; + + bd = ch->ch_bd; + if (!bd) + return; + + /* + * If baud rate is zero, flush queues, and set mval to drop DTR. + */ + if ((ch->ch_c_cflag & (CBAUD)) == 0) { + ch->ch_r_head = ch->ch_r_tail = 0; + ch->ch_e_head = ch->ch_e_tail = 0; + ch->ch_w_head = ch->ch_w_tail = 0; + + neo_flush_uart_write(ch); + neo_flush_uart_read(ch); + + ch->ch_flags |= (CH_BAUD0); + ch->ch_mostat &= ~(UART_MCR_RTS | UART_MCR_DTR); + neo_assert_modem_signals(ch); + ch->ch_old_baud = 0; + return; + + } else if (ch->ch_custom_speed) { + baud = ch->ch_custom_speed; + if (ch->ch_flags & CH_BAUD0) + ch->ch_flags &= ~(CH_BAUD0); + } else { + int iindex = 0; + int jindex = 0; + + const u64 bauds[4][16] = { + { + 0, 50, 75, 110, + 134, 150, 200, 300, + 600, 1200, 1800, 2400, + 4800, 9600, 19200, 38400 }, + { + 0, 57600, 115200, 230400, + 460800, 150, 200, 921600, + 600, 1200, 1800, 2400, + 4800, 9600, 19200, 38400 }, + { + 0, 57600, 76800, 115200, + 131657, 153600, 230400, 460800, + 921600, 1200, 1800, 2400, + 4800, 9600, 19200, 38400 }, + { + 0, 57600, 115200, 230400, + 460800, 150, 200, 921600, + 600, 1200, 1800, 2400, + 4800, 9600, 19200, 38400 } + }; + + baud = C_BAUD(ch->uart_port.info->tty) & 0xff; + + if (ch->ch_c_cflag & CBAUDEX) + iindex = 1; + + jindex = baud; + + if ((iindex >= 0) && (iindex < 4) && (jindex >= 0) && (jindex < 16)) + baud = bauds[iindex][jindex]; + else { + jsm_printk(IOCTL, DEBUG, &ch->ch_bd->pci_dev, + "baud indices were out of range (%d)(%d)", + iindex, jindex); + baud = 0; + } + + if (baud == 0) + baud = 9600; + + if (ch->ch_flags & CH_BAUD0) + ch->ch_flags &= ~(CH_BAUD0); + } + + if (ch->ch_c_cflag & PARENB) + lcr |= UART_LCR_PARITY; + + if (!(ch->ch_c_cflag & PARODD)) + lcr |= UART_LCR_EPAR; + + /* + * Not all platforms support mark/space parity, + * so this will hide behind an ifdef. + */ +#ifdef CMSPAR + if (ch->ch_c_cflag & CMSPAR) + lcr |= UART_LCR_SPAR; +#endif + + if (ch->ch_c_cflag & CSTOPB) + lcr |= UART_LCR_STOP; + + switch (ch->ch_c_cflag & CSIZE) { + case CS5: + lcr |= UART_LCR_WLEN5; + break; + case CS6: + lcr |= UART_LCR_WLEN6; + break; + case CS7: + lcr |= UART_LCR_WLEN7; + break; + case CS8: + default: + lcr |= UART_LCR_WLEN8; + break; + } + + ier = readb(&ch->ch_neo_uart->ier); + uart_lcr = readb(&ch->ch_neo_uart->lcr); + + if (baud == 0) + baud = 9600; + + quot = ch->ch_bd->bd_dividend / baud; + + if (quot != 0) { + ch->ch_old_baud = baud; + writeb(UART_LCR_DLAB, &ch->ch_neo_uart->lcr); + writeb((quot & 0xff), &ch->ch_neo_uart->txrx); + writeb((quot >> 8), &ch->ch_neo_uart->ier); + writeb(lcr, &ch->ch_neo_uart->lcr); + } + + if (uart_lcr != lcr) + writeb(lcr, &ch->ch_neo_uart->lcr); + + if (ch->ch_c_cflag & CREAD) + ier |= (UART_IER_RDI | UART_IER_RLSI); + + ier |= (UART_IER_THRI | UART_IER_MSI); + + writeb(ier, &ch->ch_neo_uart->ier); + + /* Set new start/stop chars */ + neo_set_new_start_stop_chars(ch); + + if (ch->ch_c_cflag & CRTSCTS) + neo_set_cts_flow_control(ch); + else if (ch->ch_c_iflag & IXON) { + /* If start/stop is set to disable, then we should disable flow control */ + if ((ch->ch_startc == __DISABLED_CHAR) || (ch->ch_stopc == __DISABLED_CHAR)) + neo_set_no_output_flow_control(ch); + else + neo_set_ixon_flow_control(ch); + } + else + neo_set_no_output_flow_control(ch); + + if (ch->ch_c_cflag & CRTSCTS) + neo_set_rts_flow_control(ch); + else if (ch->ch_c_iflag & IXOFF) { + /* If start/stop is set to disable, then we should disable flow control */ + if ((ch->ch_startc == __DISABLED_CHAR) || (ch->ch_stopc == __DISABLED_CHAR)) + neo_set_no_input_flow_control(ch); + else + neo_set_ixoff_flow_control(ch); + } + else + neo_set_no_input_flow_control(ch); + /* + * Adjust the RX FIFO Trigger level if baud is less than 9600. + * Not exactly elegant, but this is needed because of the Exar chip's + * delay on firing off the RX FIFO interrupt on slower baud rates. + */ + if (baud < 9600) { + writeb(1, &ch->ch_neo_uart->rfifo); + ch->ch_r_tlevel = 1; + } + + neo_assert_modem_signals(ch); + + /* Get current status of the modem signals now */ + neo_parse_modem(ch, readb(&ch->ch_neo_uart->msr)); + return; +} + +/* + * jsm_neo_intr() + * + * Neo specific interrupt handler. + */ +static irqreturn_t neo_intr(int irq, void *voidbrd, struct pt_regs *regs) +{ + struct jsm_board *brd = (struct jsm_board *) voidbrd; + struct jsm_channel *ch; + int port = 0; + int type = 0; + int current_port; + u32 tmp; + u32 uart_poll; + unsigned long lock_flags; + unsigned long lock_flags2; + int outofloop_count = 0; + + brd->intr_count++; + + /* Lock out the slow poller from running on this board. */ + spin_lock_irqsave(&brd->bd_intr_lock, lock_flags); + + /* + * Read in "extended" IRQ information from the 32bit Neo register. + * Bits 0-7: What port triggered the interrupt. + * Bits 8-31: Each 3bits indicate what type of interrupt occurred. + */ + uart_poll = readl(brd->re_map_membase + UART_17158_POLL_ADDR_OFFSET); + + jsm_printk(INTR, INFO, &brd->pci_dev, + "%s:%d uart_poll: %x\n", __FILE__, __LINE__, uart_poll); + + if (!uart_poll) { + jsm_printk(INTR, INFO, &brd->pci_dev, + "Kernel interrupted to me, but no pending interrupts...\n"); + spin_unlock_irqrestore(&brd->bd_intr_lock, lock_flags); + return IRQ_NONE; + } + + /* At this point, we have at least SOMETHING to service, dig further... */ + + current_port = 0; + + /* Loop on each port */ + while (((uart_poll & 0xff) != 0) && (outofloop_count < 0xff)){ + + tmp = uart_poll; + outofloop_count++; + + /* Check current port to see if it has interrupt pending */ + if ((tmp & jsm_offset_table[current_port]) != 0) { + port = current_port; + type = tmp >> (8 + (port * 3)); + type &= 0x7; + } else { + current_port++; + continue; + } + + jsm_printk(INTR, INFO, &brd->pci_dev, + "%s:%d port: %x type: %x\n", __FILE__, __LINE__, port, type); + + /* Remove this port + type from uart_poll */ + uart_poll &= ~(jsm_offset_table[port]); + + if (!type) { + /* If no type, just ignore it, and move onto next port */ + jsm_printk(INTR, ERR, &brd->pci_dev, + "Interrupt with no type! port: %d\n", port); + continue; + } + + /* Switch on type of interrupt we have */ + switch (type) { + + case UART_17158_RXRDY_TIMEOUT: + /* + * RXRDY Time-out is cleared by reading data in the + * RX FIFO until it falls below the trigger level. + */ + + /* Verify the port is in range. */ + if (port > brd->nasync) + continue; + + ch = brd->channels[port]; + neo_copy_data_from_uart_to_queue(ch); + + /* Call our tty layer to enforce queue flow control if needed. */ + spin_lock_irqsave(&ch->ch_lock, lock_flags2); + jsm_check_queue_flow_control(ch); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags2); + + continue; + + case UART_17158_RX_LINE_STATUS: + /* + * RXRDY and RX LINE Status (logic OR of LSR[4:1]) + */ + neo_parse_lsr(brd, port); + continue; + + case UART_17158_TXRDY: + /* + * TXRDY interrupt clears after reading ISR register for the UART channel. + */ + + /* + * Yes, this is odd... + * Why would I check EVERY possibility of type of + * interrupt, when we know its TXRDY??? + * Becuz for some reason, even tho we got triggered for TXRDY, + * it seems to be occassionally wrong. Instead of TX, which + * it should be, I was getting things like RXDY too. Weird. + */ + neo_parse_isr(brd, port); + continue; + + case UART_17158_MSR: + /* + * MSR or flow control was seen. + */ + neo_parse_isr(brd, port); + continue; + + default: + /* + * The UART triggered us with a bogus interrupt type. + * It appears the Exar chip, when REALLY bogged down, will throw + * these once and awhile. + * Its harmless, just ignore it and move on. + */ + jsm_printk(INTR, ERR, &brd->pci_dev, + "%s:%d Unknown Interrupt type: %x\n", __FILE__, __LINE__, type); + continue; + } + } + + spin_unlock_irqrestore(&brd->bd_intr_lock, lock_flags); + + jsm_printk(INTR, INFO, &brd->pci_dev, "finish.\n"); + return IRQ_HANDLED; +} + +/* + * Neo specific way of turning off the receiver. + * Used as a way to enforce queue flow control when in + * hardware flow control mode. + */ +static void neo_disable_receiver(struct jsm_channel *ch) +{ + u8 tmp = readb(&ch->ch_neo_uart->ier); + tmp &= ~(UART_IER_RDI); + writeb(tmp, &ch->ch_neo_uart->ier); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); +} + + +/* + * Neo specific way of turning on the receiver. + * Used as a way to un-enforce queue flow control when in + * hardware flow control mode. + */ +static void neo_enable_receiver(struct jsm_channel *ch) +{ + u8 tmp = readb(&ch->ch_neo_uart->ier); + tmp |= (UART_IER_RDI); + writeb(tmp, &ch->ch_neo_uart->ier); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); +} + +static void neo_send_start_character(struct jsm_channel *ch) +{ + if (!ch) + return; + + if (ch->ch_startc != __DISABLED_CHAR) { + ch->ch_xon_sends++; + writeb(ch->ch_startc, &ch->ch_neo_uart->txrx); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); + } +} + +static void neo_send_stop_character(struct jsm_channel *ch) +{ + if (!ch) + return; + + if (ch->ch_stopc != __DISABLED_CHAR) { + ch->ch_xoff_sends++; + writeb(ch->ch_stopc, &ch->ch_neo_uart->txrx); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); + } +} + +/* + * neo_uart_init + */ +static void neo_uart_init(struct jsm_channel *ch) +{ + writeb(0, &ch->ch_neo_uart->ier); + writeb(0, &ch->ch_neo_uart->efr); + writeb(UART_EFR_ECB, &ch->ch_neo_uart->efr); + + /* Clear out UART and FIFO */ + readb(&ch->ch_neo_uart->txrx); + writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT), &ch->ch_neo_uart->isr_fcr); + readb(&ch->ch_neo_uart->lsr); + readb(&ch->ch_neo_uart->msr); + + ch->ch_flags |= CH_FIFO_ENABLED; + + /* Assert any signals we want up */ + writeb(ch->ch_mostat, &ch->ch_neo_uart->mcr); +} + +/* + * Make the UART completely turn off. + */ +static void neo_uart_off(struct jsm_channel *ch) +{ + /* Turn off UART enhanced bits */ + writeb(0, &ch->ch_neo_uart->efr); + + /* Stop all interrupts from occurring. */ + writeb(0, &ch->ch_neo_uart->ier); +} + +static u32 neo_get_uart_bytes_left(struct jsm_channel *ch) +{ + u8 left = 0; + u8 lsr = readb(&ch->ch_neo_uart->lsr); + + /* We must cache the LSR as some of the bits get reset once read... */ + ch->ch_cached_lsr |= lsr; + + /* Determine whether the Transmitter is empty or not */ + if (!(lsr & UART_LSR_TEMT)) + left = 1; + else { + ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); + left = 0; + } + + return left; +} + +/* Channel lock MUST be held by the calling function! */ +static void neo_send_break(struct jsm_channel *ch) +{ + /* + * Set the time we should stop sending the break. + * If we are already sending a break, toss away the existing + * time to stop, and use this new value instead. + */ + + /* Tell the UART to start sending the break */ + if (!(ch->ch_flags & CH_BREAK_SENDING)) { + u8 temp = readb(&ch->ch_neo_uart->lcr); + writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr); + ch->ch_flags |= (CH_BREAK_SENDING); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); + } +} + +/* + * neo_send_immediate_char. + * + * Sends a specific character as soon as possible to the UART, + * jumping over any bytes that might be in the write queue. + * + * The channel lock MUST be held by the calling function. + */ +static void neo_send_immediate_char(struct jsm_channel *ch, unsigned char c) +{ + if (!ch) + return; + + writeb(c, &ch->ch_neo_uart->txrx); + + /* flush write operation */ + neo_pci_posting_flush(ch->ch_bd); +} + +struct board_ops jsm_neo_ops = { + .intr = neo_intr, + .uart_init = neo_uart_init, + .uart_off = neo_uart_off, + .param = neo_param, + .assert_modem_signals = neo_assert_modem_signals, + .flush_uart_write = neo_flush_uart_write, + .flush_uart_read = neo_flush_uart_read, + .disable_receiver = neo_disable_receiver, + .enable_receiver = neo_enable_receiver, + .send_break = neo_send_break, + .clear_break = neo_clear_break, + .send_start_character = neo_send_start_character, + .send_stop_character = neo_send_stop_character, + .copy_data_from_queue_to_uart = neo_copy_data_from_queue_to_uart, + .get_uart_bytes_left = neo_get_uart_bytes_left, + .send_immediate_char = neo_send_immediate_char +}; diff -Nru a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/serial/jsm/jsm_tty.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,1043 @@ +/************************************************************************ + * Copyright 2003 Digi International (www.digi.com) + * + * Copyright (C) 2004 IBM Corporation. All rights reserved. + * + * 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, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 * Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + * + * Contact Information: + * Scott H Kilau + * Wendy Xiong + * + ***********************************************************************/ +#include +#include +#include +#include /* For udelay */ +#include + +#include "jsm.h" + +static inline int jsm_get_mstat(struct jsm_channel *ch) +{ + unsigned char mstat; + unsigned char result; + + jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, "start\n"); + + mstat = (ch->ch_mostat | ch->ch_mistat); + + result = 0; + + if (mstat & UART_MCR_DTR) + result |= TIOCM_DTR; + if (mstat & UART_MCR_RTS) + result |= TIOCM_RTS; + if (mstat & UART_MSR_CTS) + result |= TIOCM_CTS; + if (mstat & UART_MSR_DSR) + result |= TIOCM_DSR; + if (mstat & UART_MSR_RI) + result |= TIOCM_RI; + if (mstat & UART_MSR_DCD) + result |= TIOCM_CD; + + jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, "finish\n"); + return result; +} + +static unsigned int jsm_tty_tx_empty(struct uart_port *port) +{ + return TIOCSER_TEMT; +} + +/* + * Return modem signals to ld. + */ +static unsigned int jsm_tty_get_mctrl(struct uart_port *port) +{ + int result; + struct jsm_channel *channel = (struct jsm_channel *)port; + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "start\n"); + + result = jsm_get_mstat(channel); + + if (result < 0) + return -ENXIO; + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "finish\n"); + + return result; +} + +/* + * jsm_set_modem_info() + * + * Set modem signals, called by ld. + */ +static void jsm_tty_set_mctrl(struct uart_port *port, unsigned int mctrl) +{ + struct jsm_channel *channel = (struct jsm_channel *)port; + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "start\n"); + + if (mctrl & TIOCM_RTS) + channel->ch_mostat |= UART_MCR_RTS; + else + channel->ch_mostat &= ~UART_MCR_RTS; + + if (mctrl & TIOCM_DTR) + channel->ch_mostat |= UART_MCR_DTR; + else + channel->ch_mostat &= ~UART_MCR_DTR; + + channel->ch_bd->bd_ops->assert_modem_signals(channel); + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "finish\n"); + udelay(10); +} + +static void jsm_tty_start_tx(struct uart_port *port, unsigned int tty_start) +{ + struct jsm_channel *channel = (struct jsm_channel *)port; + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "start\n"); + + channel->ch_flags &= ~(CH_STOP); + jsm_tty_write(port); + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "finish\n"); +} + +static void jsm_tty_stop_tx(struct uart_port *port, unsigned int tty_stop) +{ + struct jsm_channel *channel = (struct jsm_channel *)port; + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "start\n"); + + channel->ch_flags |= (CH_STOP); + + jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "finish\n"); +} + +static void jsm_tty_send_xchar(struct uart_port *port, char ch) +{ + unsigned long lock_flags; + struct jsm_channel *channel = (struct jsm_channel *)port; + + spin_lock_irqsave(&port->lock, lock_flags); + if (ch == port->info->tty->termios->c_cc[VSTART]) + channel->ch_bd->bd_ops->send_start_character(channel); + + if (ch == port->info->tty->termios->c_cc[VSTOP]) + channel->ch_bd->bd_ops->send_stop_character(channel); + spin_unlock_irqrestore(&port->lock, lock_flags); +} + +static void jsm_tty_stop_rx(struct uart_port *port) +{ + struct jsm_channel *channel = (struct jsm_channel *)port; + + channel->ch_bd->bd_ops->disable_receiver(channel); +} + +static void jsm_tty_break(struct uart_port *port, int break_state) +{ + unsigned long lock_flags; + struct jsm_channel *channel = (struct jsm_channel *)port; + + spin_lock_irqsave(&port->lock, lock_flags); + if (break_state == -1) + channel->ch_bd->bd_ops->send_break(channel); + else + channel->ch_bd->bd_ops->clear_break(channel, 0); + + spin_unlock_irqrestore(&port->lock, lock_flags); +} + +static int jsm_tty_open(struct uart_port *port) +{ + struct jsm_board *brd; + int rc = 0; + struct jsm_channel *channel = (struct jsm_channel *)port; + + /* Get board pointer from our array of majors we have allocated */ + brd = channel->ch_bd; + + /* + * Allocate channel buffers for read/write/error. + * Set flag, so we don't get trounced on. + */ + channel->ch_flags |= (CH_OPENING); + + /* Drop locks, as malloc with GFP_KERNEL can sleep */ + + if (!channel->ch_rqueue) { + channel->ch_rqueue = (u8 *) kmalloc(RQUEUESIZE, GFP_KERNEL); + if (!channel->ch_rqueue) { + jsm_printk(INIT, ERR, &channel->ch_bd->pci_dev, + "unable to allocate read queue buf"); + return -ENOMEM; + } + memset(channel->ch_rqueue, 0, RQUEUESIZE); + } + if (!channel->ch_equeue) { + channel->ch_equeue = (u8 *) kmalloc(EQUEUESIZE, GFP_KERNEL); + if (!channel->ch_equeue) { + jsm_printk(INIT, ERR, &channel->ch_bd->pci_dev, + "unable to allocate error queue buf"); + return -ENOMEM; + } + memset(channel->ch_equeue, 0, EQUEUESIZE); + } + if (!channel->ch_wqueue) { + channel->ch_wqueue = (u8 *) kmalloc(WQUEUESIZE, GFP_KERNEL); + if (!channel->ch_wqueue) { + jsm_printk(INIT, ERR, &channel->ch_bd->pci_dev, + "unable to allocate write queue buf"); + return -ENOMEM; + } + memset(channel->ch_wqueue, 0, WQUEUESIZE); + } + + channel->ch_flags &= ~(CH_OPENING); + /* + * Initialize if neither terminal is open. + */ + jsm_printk(OPEN, INFO, &channel->ch_bd->pci_dev, + "jsm_open: initializing channel in open...\n"); + + /* + * Flush input queues. + */ + channel->ch_r_head = channel->ch_r_tail = 0; + channel->ch_e_head = channel->ch_e_tail = 0; + channel->ch_w_head = channel->ch_w_tail = 0; + + brd->bd_ops->flush_uart_write(channel); + brd->bd_ops->flush_uart_read(channel); + + channel->ch_flags = 0; + channel->ch_cached_lsr = 0; + channel->ch_stops_sent = 0; + + channel->ch_c_cflag = port->info->tty->termios->c_cflag; + channel->ch_c_iflag = port->info->tty->termios->c_iflag; + channel->ch_c_oflag = port->info->tty->termios->c_oflag; + channel->ch_c_lflag = port->info->tty->termios->c_lflag; + channel->ch_startc = port->info->tty->termios->c_cc[VSTART]; + channel->ch_stopc = port->info->tty->termios->c_cc[VSTOP]; + + /* Tell UART to init itself */ + brd->bd_ops->uart_init(channel); + + /* + * Run param in case we changed anything + */ + brd->bd_ops->param(channel); + + jsm_carrier(channel); + + channel->ch_open_count++; + + jsm_printk(OPEN, INFO, &channel->ch_bd->pci_dev, "finish\n"); + return rc; +} + +static void jsm_tty_close(struct uart_port *port) +{ + struct jsm_board *bd; + struct termios *ts; + struct jsm_channel *channel = (struct jsm_channel *)port; + + jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "start\n"); + + bd = channel->ch_bd; + ts = channel->uart_port.info->tty->termios; + + channel->ch_flags &= ~(CH_STOPI); + + channel->ch_open_count--; + + /* + * If we have HUPCL set, lower DTR and RTS + */ + if (channel->ch_c_cflag & HUPCL) { + jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, + "Close. HUPCL set, dropping DTR/RTS\n"); + + /* Drop RTS/DTR */ + channel->ch_mostat &= ~(UART_MCR_DTR | UART_MCR_RTS); + bd->bd_ops->assert_modem_signals(channel); + } + + channel->ch_old_baud = 0; + + /* Turn off UART interrupts for this port */ + channel->ch_bd->bd_ops->uart_off(channel); + + jsm_printk(CLOSE, INFO, &channel->ch_bd->pci_dev, "finish\n"); +} + +static void jsm_tty_set_termios(struct uart_port *port, + struct termios *termios, + struct termios *old_termios) +{ + unsigned long lock_flags; + struct jsm_channel *channel = (struct jsm_channel *)port; + + spin_lock_irqsave(&port->lock, lock_flags); + channel->ch_c_cflag = termios->c_cflag; + channel->ch_c_iflag = termios->c_iflag; + channel->ch_c_oflag = termios->c_oflag; + channel->ch_c_lflag = termios->c_lflag; + channel->ch_startc = termios->c_cc[VSTART]; + channel->ch_stopc = termios->c_cc[VSTOP]; + + channel->ch_bd->bd_ops->param(channel); + jsm_carrier(channel); + spin_unlock_irqrestore(&port->lock, lock_flags); +} + +static const char *jsm_tty_type(struct uart_port *port) +{ + return "jsm"; +} + +static void jsm_tty_release_port(struct uart_port *port) +{ +} + +static int jsm_tty_request_port(struct uart_port *port) +{ + return 0; +} + +static void jsm_config_port(struct uart_port *port, int flags) +{ + port->type = PORT_JSM; +} + +static struct uart_ops jsm_ops = { + .tx_empty = jsm_tty_tx_empty, + .set_mctrl = jsm_tty_set_mctrl, + .get_mctrl = jsm_tty_get_mctrl, + .stop_tx = jsm_tty_stop_tx, + .start_tx = jsm_tty_start_tx, + .send_xchar = jsm_tty_send_xchar, + .stop_rx = jsm_tty_stop_rx, + .break_ctl = jsm_tty_break, + .startup = jsm_tty_open, + .shutdown = jsm_tty_close, + .set_termios = jsm_tty_set_termios, + .type = jsm_tty_type, + .release_port = jsm_tty_release_port, + .request_port = jsm_tty_request_port, + .config_port = jsm_config_port, +}; + +/* + * jsm_tty_init() + * + * Init the tty subsystem. Called once per board after board has been + * downloaded and init'ed. + */ +int jsm_tty_init(struct jsm_board *brd) +{ + int i; + u8 *vaddr; + struct jsm_channel *ch; + + if (!brd) + return -ENXIO; + + jsm_printk(INIT, INFO, &brd->pci_dev, "start\n"); + + /* + * Initialize board structure elements. + */ + + vaddr = brd->re_map_membase; + + brd->nasync = brd->maxports; + + /* + * Allocate channel memory that might not have been allocated + * when the driver was first loaded. + */ + for (i = 0; i < brd->nasync; i++) { + if (!brd->channels[i]) { + + /* + * Okay to malloc with GFP_KERNEL, we are not at + * interrupt context, and there are no locks held. + */ + brd->channels[i] = kmalloc(sizeof(struct jsm_channel), GFP_KERNEL); + if (!brd->channels[i]) { + jsm_printk(CORE, ERR, &brd->pci_dev, + "%s:%d Unable to allocate memory for channel struct\n", + __FILE__, __LINE__); + } + memset(brd->channels[i], 0, sizeof(struct jsm_channel)); + } + } + + ch = brd->channels[0]; + vaddr = brd->re_map_membase; + + /* Set up channel variables */ + for (i = 0; i < brd->nasync; i++, ch = brd->channels[i]) { + + if (!brd->channels[i]) + continue; + + spin_lock_init(&ch->ch_lock); + + if (brd->bd_uart_offset == 0x200) + ch->ch_neo_uart = (struct neo_uart_struct *) ((u64) vaddr + + (brd->bd_uart_offset * i)); + + ch->ch_bd = brd; + ch->ch_portnum = i; + + /* .25 second delay */ + ch->ch_close_delay = 250; + + init_waitqueue_head(&ch->ch_flags_wait); + } + + jsm_printk(INIT, INFO, &brd->pci_dev, "finish\n"); + return 0; +} + +int jsm_uart_port_init(struct jsm_board *brd) +{ + int i; + u8 *vaddr; + struct jsm_channel *ch; + + if (!brd) + return -ENXIO; + + jsm_printk(INIT, INFO, &brd->pci_dev, "start\n"); + + /* + * Initialize board structure elements. + */ + + vaddr = brd->re_map_membase; + brd->nasync = brd->maxports; + + /* Set up channel variables */ + for (i = 0; i < brd->nasync; i++, ch = brd->channels[i]) { + + if (!brd->channels[i]) + continue; + + brd->channels[i]->uart_port.irq = brd->irq; + brd->channels[i]->uart_port.type = PORT_JSM; + brd->channels[i]->uart_port.iotype = UPIO_MEM; + brd->channels[i]->uart_port.membase = brd->re_map_membase; + brd->channels[i]->uart_port.fifosize = 16; + brd->channels[i]->uart_port.ops = &jsm_ops; + brd->channels[i]->uart_port.line = brd->channels[i]->ch_portnum + brd->boardnum * 2; + if (uart_add_one_port (&jsm_uart_driver, &brd->channels[i]->uart_port)) + printk(KERN_INFO "Added device failed\n"); + else + printk(KERN_INFO "Added device \n"); + } + + jsm_printk(INIT, INFO, &brd->pci_dev, "finish\n"); + return 0; +} + +int jsm_remove_uart_port(struct jsm_board *brd) +{ + int i; + struct jsm_channel *ch; + + if (!brd) + return -ENXIO; + + jsm_printk(INIT, INFO, &brd->pci_dev, "start\n"); + + /* + * Initialize board structure elements. + */ + + brd->nasync = brd->maxports; + + /* Set up channel variables */ + for (i = 0; i < brd->nasync; i++) { + + if (!brd->channels[i]) + continue; + + ch = brd->channels[i]; + + uart_remove_one_port(&jsm_uart_driver, &brd->channels[i]->uart_port); + } + + jsm_printk(INIT, INFO, &brd->pci_dev, "finish\n"); + return 0; +} + +void jsm_input(struct jsm_channel *ch) +{ + struct jsm_board *bd; + struct tty_struct *tp; + u32 rmask; + u16 head; + u16 tail; + int data_len; + u64 lock_flags; + int flip_len; + int len = 0; + int n = 0; + char *buf = NULL; + char *buf2 = NULL; + int s = 0; + int i = 0; + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, "start\n"); + + if (!ch) + return; + + tp = ch->uart_port.info->tty; + + bd = ch->ch_bd; + if(!bd) + return; + + spin_lock_irqsave(&ch->ch_lock, lock_flags); + + /* + *Figure the number of characters in the buffer. + *Exit immediately if none. + */ + + rmask = RQUEUEMASK; + + head = ch->ch_r_head & rmask; + tail = ch->ch_r_tail & rmask; + + data_len = (head - tail) & rmask; + if (data_len == 0) { + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + return; + } + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, "start\n"); + + /* + *If the device is not open, or CREAD is off, flush + *input data and return immediately. + */ + if (!tp || + !(tp->termios->c_cflag & CREAD) ) { + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "input. dropping %d bytes on port %d...\n", data_len, ch->ch_portnum); + ch->ch_r_head = tail; + + /* Force queue flow control to be released, if needed */ + jsm_check_queue_flow_control(ch); + + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + return; + } + + /* + * If we are throttled, simply don't read any data. + */ + if (ch->ch_flags & CH_STOPI) { + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "Port %d throttled, not reading any data. head: %x tail: %x\n", + ch->ch_portnum, head, tail); + return; + } + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, "start 2\n"); + + /* + * If the rxbuf is empty and we are not throttled, put as much + * as we can directly into the linux TTY flip buffer. + * The jsm_rawreadok case takes advantage of carnal knowledge that + * the char_buf and the flag_buf are next to each other and + * are each of (2 * TTY_FLIPBUF_SIZE) size. + * + * NOTE: if(!tty->real_raw), the call to ldisc.receive_buf + *actually still uses the flag buffer, so you can't + *use it for input data + */ + if (jsm_rawreadok) { + if (tp->real_raw) + flip_len = MYFLIPLEN; + else + flip_len = 2 * TTY_FLIPBUF_SIZE; + } else + flip_len = TTY_FLIPBUF_SIZE - tp->flip.count; + + len = min(data_len, flip_len); + len = min(len, (N_TTY_BUF_SIZE - 1) - tp->read_cnt); + + if (len <= 0) { + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, "jsm_input 1\n"); + return; + } + + /* + * If we're bypassing flip buffers on rx, we can blast it + * right into the beginning of the buffer. + */ + if (jsm_rawreadok) { + if (tp->real_raw) { + if (ch->ch_flags & CH_FLIPBUF_IN_USE) { + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "JSM - FLIPBUF in use. delaying input\n"); + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + return; + } + ch->ch_flags |= CH_FLIPBUF_IN_USE; + buf = ch->ch_bd->flipbuf; + buf2 = NULL; + } else { + buf = tp->flip.char_buf; + buf2 = tp->flip.flag_buf; + } + } else { + buf = tp->flip.char_buf_ptr; + buf2 = tp->flip.flag_buf_ptr; + } + + n = len; + + /* + * n now contains the most amount of data we can copy, + * bounded either by the flip buffer size or the amount + * of data the card actually has pending... + */ + while (n) { + s = ((head >= tail) ? head : RQUEUESIZE) - tail; + s = min(s, n); + + if (s <= 0) + break; + + memcpy(buf, ch->ch_rqueue + tail, s); + + /* buf2 is only set when port isn't raw */ + if (buf2) + memcpy(buf2, ch->ch_equeue + tail, s); + + tail += s; + buf += s; + if (buf2) + buf2 += s; + n -= s; + /* Flip queue if needed */ + tail &= rmask; + } + + /* + * In high performance mode, we don't have to update + * flag_buf or any of the counts or pointers into flip buf. + */ + if (!jsm_rawreadok) { + if (I_PARMRK(tp) || I_BRKINT(tp) || I_INPCK(tp)) { + for (i = 0; i < len; i++) { + /* + * Give the Linux ld the flags in the + * format it likes. + */ + if (tp->flip.flag_buf_ptr[i] & UART_LSR_BI) + tp->flip.flag_buf_ptr[i] = TTY_BREAK; + else if (tp->flip.flag_buf_ptr[i] & UART_LSR_PE) + tp->flip.flag_buf_ptr[i] = TTY_PARITY; + else if (tp->flip.flag_buf_ptr[i] & UART_LSR_FE) + tp->flip.flag_buf_ptr[i] = TTY_FRAME; + else + tp->flip.flag_buf_ptr[i] = TTY_NORMAL; + } + } else { + memset(tp->flip.flag_buf_ptr, 0, len); + } + + tp->flip.char_buf_ptr += len; + tp->flip.flag_buf_ptr += len; + tp->flip.count += len; + } + else if (!tp->real_raw) { + if (I_PARMRK(tp) || I_BRKINT(tp) || I_INPCK(tp)) { + for (i = 0; i < len; i++) { + /* + * Give the Linux ld the flags in the + * format it likes. + */ + if (tp->flip.flag_buf_ptr[i] & UART_LSR_BI) + tp->flip.flag_buf_ptr[i] = TTY_BREAK; + else if (tp->flip.flag_buf_ptr[i] & UART_LSR_PE) + tp->flip.flag_buf_ptr[i] = TTY_PARITY; + else if (tp->flip.flag_buf_ptr[i] & UART_LSR_FE) + tp->flip.flag_buf_ptr[i] = TTY_FRAME; + else + tp->flip.flag_buf_ptr[i] = TTY_NORMAL; + } + } else + memset(tp->flip.flag_buf, 0, len); + } + + /* + * If we're doing raw reads, jam it right into the + * line disc bypassing the flip buffers. + */ + if (jsm_rawreadok) { + if (tp->real_raw) { + ch->ch_r_tail = tail & rmask; + ch->ch_e_tail = tail & rmask; + + jsm_check_queue_flow_control(ch); + + /* !!! WE *MUST* LET GO OF ALL LOCKS BEFORE CALLING RECEIVE BUF !!! */ + + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "jsm_input. %d real_raw len:%d calling receive_buf for board %d\n", + __LINE__, len, ch->ch_bd->boardnum); + tp->ldisc.receive_buf(tp, ch->ch_bd->flipbuf, NULL, len); + + /* Allow use of channel flip buffer again */ + spin_lock_irqsave(&ch->ch_lock, lock_flags); + ch->ch_flags &= ~CH_FLIPBUF_IN_USE; + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + + } else { + ch->ch_r_tail = tail & rmask; + ch->ch_e_tail = tail & rmask; + + jsm_check_queue_flow_control(ch); + + /* !!! WE *MUST* LET GO OF ALL LOCKS BEFORE CALLING RECEIVE BUF !!! */ + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "jsm_input. %d not real_raw len:%d calling receive_buf for board %d\n", + __LINE__, len, ch->ch_bd->boardnum); + + tp->ldisc.receive_buf(tp, tp->flip.char_buf, tp->flip.flag_buf, len); + } + } else { + ch->ch_r_tail = tail & rmask; + ch->ch_e_tail = tail & rmask; + + jsm_check_queue_flow_control(ch); + + spin_unlock_irqrestore(&ch->ch_lock, lock_flags); + + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "jsm_input. %d not jsm_read raw okay scheduling flip\n", __LINE__); + tty_schedule_flip(tp); + } + + jsm_printk(IOCTL, INFO, &ch->ch_bd->pci_dev, "finish\n"); +} + +void jsm_carrier(struct jsm_channel *ch) +{ + struct jsm_board *bd; + + int virt_carrier = 0; + int phys_carrier = 0; + + jsm_printk(CARR, INFO, &ch->ch_bd->pci_dev, "start\n"); + if (!ch) + return; + + bd = ch->ch_bd; + + if (!bd) + return; + + if (ch->ch_mistat & UART_MSR_DCD) { + jsm_printk(CARR, INFO, &ch->ch_bd->pci_dev, + "mistat: %x D_CD: %x\n", ch->ch_mistat, ch->ch_mistat & UART_MSR_DCD); + phys_carrier = 1; + } + + if (ch->ch_c_cflag & CLOCAL) + virt_carrier = 1; + + jsm_printk(CARR, INFO, &ch->ch_bd->pci_dev, + "DCD: physical: %d virt: %d\n", phys_carrier, virt_carrier); + + /* + * Test for a VIRTUAL carrier transition to HIGH. + */ + if (((ch->ch_flags & CH_FCAR) == 0) && (virt_carrier == 1)) { + + /* + * When carrier rises, wake any threads waiting + * for carrier in the open routine. + */ + + jsm_printk(CARR, INFO, &ch->ch_bd->pci_dev, + "carrier: virt DCD rose\n"); + + if (waitqueue_active(&(ch->ch_flags_wait))) + wake_up_interruptible(&ch->ch_flags_wait); + } + + /* + * Test for a PHYSICAL carrier transition to HIGH. + */ + if (((ch->ch_flags & CH_CD) == 0) && (phys_carrier == 1)) { + + /* + * When carrier rises, wake any threads waiting + * for carrier in the open routine. + */ + + jsm_printk(CARR, INFO, &ch->ch_bd->pci_dev, + "carrier: physical DCD rose\n"); + + if (waitqueue_active(&(ch->ch_flags_wait))) + wake_up_interruptible(&ch->ch_flags_wait); + } + + /* + * Test for a PHYSICAL transition to low, so long as we aren't + * currently ignoring physical transitions (which is what "virtual + * carrier" indicates). + * + * The transition of the virtual carrier to low really doesn't + * matter... it really only means "ignore carrier state", not + * "make pretend that carrier is there". + */ + if ((virt_carrier == 0) && ((ch->ch_flags & CH_CD) != 0) + && (phys_carrier == 0)) { + /* + * When carrier drops: + * + * Drop carrier on all open units. + * + * Flush queues, waking up any task waiting in the + * line discipline. + * + * Send a hangup to the control terminal. + * + * Enable all select calls. + */ + if (waitqueue_active(&(ch->ch_flags_wait))) + wake_up_interruptible(&ch->ch_flags_wait); + } + + /* + * Make sure that our cached values reflect the current reality. + */ + if (virt_carrier == 1) + ch->ch_flags |= CH_FCAR; + else + ch->ch_flags &= ~CH_FCAR; + + if (phys_carrier == 1) + ch->ch_flags |= CH_CD; + else + ch->ch_flags &= ~CH_CD; +} + + +void jsm_check_queue_flow_control(struct jsm_channel *ch) +{ + int qleft = 0; + + /* Store how much space we have left in the queue */ + if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0) + qleft += RQUEUEMASK + 1; + + /* + * Check to see if we should enforce flow control on our queue because + * the ld (or user) isn't reading data out of our queue fast enuf. + * + * NOTE: This is done based on what the current flow control of the + * port is set for. + * + * 1) HWFLOW (RTS) - Turn off the UART's Receive interrupt. + * This will cause the UART's FIFO to back up, and force + * the RTS signal to be dropped. + * 2) SWFLOW (IXOFF) - Keep trying to send a stop character to + * the other side, in hopes it will stop sending data to us. + * 3) NONE - Nothing we can do. We will simply drop any extra data + * that gets sent into us when the queue fills up. + */ + if (qleft < 256) { + /* HWFLOW */ + if (ch->ch_c_cflag & CRTSCTS) { + if(!(ch->ch_flags & CH_RECEIVER_OFF)) { + ch->ch_bd->bd_ops->disable_receiver(ch); + ch->ch_flags |= (CH_RECEIVER_OFF); + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "Internal queue hit hilevel mark (%d)! Turning off interrupts.\n", + qleft); + } + } + /* SWFLOW */ + else if (ch->ch_c_iflag & IXOFF) { + if (ch->ch_stops_sent <= MAX_STOPS_SENT) { + ch->ch_bd->bd_ops->send_stop_character(ch); + ch->ch_stops_sent++; + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "Sending stop char! Times sent: %x\n", ch->ch_stops_sent); + } + } + } + + /* + * Check to see if we should unenforce flow control because + * ld (or user) finally read enuf data out of our queue. + * + * NOTE: This is done based on what the current flow control of the + * port is set for. + * + * 1) HWFLOW (RTS) - Turn back on the UART's Receive interrupt. + * This will cause the UART's FIFO to raise RTS back up, + * which will allow the other side to start sending data again. + * 2) SWFLOW (IXOFF) - Send a start character to + * the other side, so it will start sending data to us again. + * 3) NONE - Do nothing. Since we didn't do anything to turn off the + * other side, we don't need to do anything now. + */ + if (qleft > (RQUEUESIZE / 2)) { + /* HWFLOW */ + if (ch->ch_c_cflag & CRTSCTS) { + if (ch->ch_flags & CH_RECEIVER_OFF) { + ch->ch_bd->bd_ops->enable_receiver(ch); + ch->ch_flags &= ~(CH_RECEIVER_OFF); + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, + "Internal queue hit lowlevel mark (%d)! Turning on interrupts.\n", + qleft); + } + } + /* SWFLOW */ + else if (ch->ch_c_iflag & IXOFF && ch->ch_stops_sent) { + ch->ch_stops_sent = 0; + ch->ch_bd->bd_ops->send_start_character(ch); + jsm_printk(READ, INFO, &ch->ch_bd->pci_dev, "Sending start char!\n"); + } + } +} + +/* + * jsm_tty_write() + * + * Take data from the user or kernel and send it out to the FEP. + * In here exists all the Transparent Print magic as well. + */ +int jsm_tty_write(struct uart_port *port) +{ + int bufcount = 0, n = 0; + int data_count = 0,data_count1 =0; + u16 head; + u16 tail; + u16 tmask; + u32 remain; + int temp_tail = port->info->xmit.tail; + struct jsm_channel *channel = (struct jsm_channel *)port; + + tmask = WQUEUEMASK; + head = (channel->ch_w_head) & tmask; + tail = (channel->ch_w_tail) & tmask; + + if ((bufcount = tail - head - 1) < 0) + bufcount += WQUEUESIZE; + + n = bufcount; + + n = min(n, 56); + remain = WQUEUESIZE - head; + + data_count = 0; + if (n >= remain) { + n -= remain; + while ((port->info->xmit.head != temp_tail) && + (data_count < remain)) { + channel->ch_wqueue[head++] = + port->info->xmit.buf[temp_tail]; + + temp_tail++; + temp_tail &= (UART_XMIT_SIZE - 1); + data_count++; + } + if (data_count == remain) head = 0; + } + + data_count1 = 0; + if (n > 0) { + remain = n; + while ((port->info->xmit.head != temp_tail) && + (data_count1 < remain)) { + channel->ch_wqueue[head++] = + port->info->xmit.buf[temp_tail]; + + temp_tail++; + temp_tail &= (UART_XMIT_SIZE - 1); + data_count1++; + + } + } + + port->info->xmit.tail = temp_tail; + + data_count += data_count1; + if (data_count) { + head &= tmask; + channel->ch_w_head = head; + } + + if (data_count) { + channel->ch_bd->bd_ops->copy_data_from_queue_to_uart(channel); + } + + return data_count; +} + +static ssize_t jsm_driver_version_show(struct device_driver *ddp, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "%s\n", JSM_VERSION); +} +static DRIVER_ATTR(version, S_IRUSR, jsm_driver_version_show, NULL); + +static ssize_t jsm_driver_state_show(struct device_driver *ddp, char *buf) +{ + return snprintf(buf, PAGE_SIZE, "%s\n", jsm_driver_state_text[jsm_driver_state]); +} +static DRIVER_ATTR(state, S_IRUSR, jsm_driver_state_show, NULL); + +void jsm_create_driver_sysfiles(struct device_driver *driverfs) +{ + driver_create_file(driverfs, &driver_attr_version); + driver_create_file(driverfs, &driver_attr_state); +} + +void jsm_remove_driver_sysfiles(struct device_driver *driverfs) +{ + driver_remove_file(driverfs, &driver_attr_version); + driver_remove_file(driverfs, &driver_attr_state); +} diff -Nru a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c --- a/drivers/serial/m32r_sio.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/serial/m32r_sio.c 2005-03-30 16:58:50 -08:00 @@ -26,6 +26,11 @@ * serial.c driver, and is currently the preferred form. */ #include + +#if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#define SUPPORT_SYSRQ +#endif + #include #include #include @@ -40,12 +45,8 @@ #include #include -#if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - -#define PORT_SIO 1 -#define PORT_MAX_SIO 1 +#define PORT_M32R_BASE PORT_M32R_SIO +#define PORT_INDEX(x) (x - PORT_M32R_BASE + 1) #define BAUD_RATE 115200 #include @@ -83,44 +84,20 @@ */ #define is_real_interrupt(irq) ((irq) != 0) -/* - * This converts from our new CONFIG_ symbols to the symbols - * that asm/serial.h expects. You _NEED_ to comment out the - * linux/config.h include contained inside asm/serial.h for - * this to work. - */ -#undef CONFIG_SERIAL_MANY_PORTS -#undef CONFIG_SERIAL_DETECT_IRQ -#undef CONFIG_SERIAL_MULTIPORT -#undef CONFIG_HUB6 - -#ifdef CONFIG_SERIAL_M32R_SIO_DETECT_IRQ -#define CONFIG_SERIAL_DETECT_IRQ 1 -#endif -#ifdef CONFIG_SERIAL_M32R_SIO_MULTIPORT -#define CONFIG_SERIAL_MULTIPORT 1 -#endif -#ifdef CONFIG_SERIAL_M32R_SIO_MANY_PORTS -#define CONFIG_SERIAL_MANY_PORTS 1 -#endif +#include /* - * HUB6 is always on. This will be removed once the header - * files have been cleaned. + * SERIAL_PORT_DFNS tells us about built-in ports that have no + * standard enumeration mechanism. Platforms that can find all + * serial ports via mechanisms like ACPI or PCI need not supply it. */ -#define CONFIG_HUB6 1 - -#include +#ifndef SERIAL_PORT_DFNS +#define SERIAL_PORT_DFNS +#endif -#ifdef CONFIG_SERIAL_M32R_PLDSIO static struct old_serial_port old_serial_port[] = { - { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, STD_COM_FLAGS }, + SERIAL_PORT_DFNS /* defined in asm/serial.h */ }; -#else -static struct old_serial_port old_serial_port[] = { - { 0, BASE_BAUD, M32R_SIO_OFFSET, M32R_IRQ_SIO0_R, STD_COM_FLAGS }, -}; -#endif #define UART_NR ARRAY_SIZE(old_serial_port) @@ -153,9 +130,17 @@ /* * Here we define the default xmit fifo size used for each type of UART. */ -static const struct serial_uart_config uart_config[PORT_MAX_SIO+1] = { - { "unknown", 1, 0 }, - { "M32RSIO", 1, 0 } +static const struct serial_uart_config uart_config[] = { + [PORT_UNKNOWN] = { + .name = "unknown", + .dfl_xmit_fifo_size = 1, + .flags = 0, + }, + [PORT_INDEX(PORT_M32R_SIO)] = { + .name = "M32RSIO", + .dfl_xmit_fifo_size = 1, + .flags = 0, + }, }; #ifdef CONFIG_SERIAL_M32R_PLDSIO @@ -460,7 +445,6 @@ if (status & 0x04) receive_chars(up, &status, regs); - // check_modem_status(up); if (status & 0x01) transmit_chars(up); } @@ -842,13 +826,12 @@ int ret = 0; switch (up->port.iotype) { - case SERIAL_IO_MEM: + case UPIO_MEM: if (up->port.mapbase) { #ifdef CONFIG_SERIAL_M32R_PLDSIO *res = request_mem_region(up->port.mapbase, size, "serial"); #else start = up->port.mapbase; - start += UART_RSA_BASE << up->port.regshift; *res = request_mem_region(start, size, "serial"); #endif if (!*res) @@ -856,8 +839,7 @@ } break; - case SERIAL_IO_HUB6: - case SERIAL_IO_PORT: + case UPIO_PORT: *res = request_region(up->port.iobase, size, "serial"); if (!*res) ret = -EBUSY; @@ -866,55 +848,15 @@ return ret; } -static int -m32r_sio_request_rsa_resource(struct uart_sio_port *up, struct resource **res) -{ - unsigned int size = 8 << up->port.regshift; - unsigned long start; - int ret = 0; - - switch (up->port.iotype) { - case SERIAL_IO_MEM: - if (up->port.mapbase) { - start = up->port.mapbase; - start += UART_RSA_BASE << up->port.regshift; -#ifdef CONFIG_SERIAL_M32R_PLDSIO - *res = request_mem_region(start, size, "serial-rsa"); -#else - *res = request_mem_region(up->port.mapbase, size, "serial-rsa"); -#endif - if (!*res) - ret = -EBUSY; - } - break; - - case SERIAL_IO_HUB6: - case SERIAL_IO_PORT: - start = up->port.iobase; - start += UART_RSA_BASE << up->port.regshift; - *res = request_region(up->port.iobase, size, "serial-rsa"); - if (!*res) - ret = -EBUSY; - break; - } - - return ret; -} - static void m32r_sio_release_port(struct uart_port *port) { struct uart_sio_port *up = (struct uart_sio_port *)port; unsigned long start, offset = 0, size = 0; - if (up->port.type == PORT_RSA) { - offset = UART_RSA_BASE << up->port.regshift; - size = 8; - } - size <<= up->port.regshift; switch (up->port.iotype) { - case SERIAL_IO_MEM: + case UPIO_MEM: if (up->port.mapbase) { /* * Unmap the area. @@ -930,8 +872,7 @@ } break; - case SERIAL_IO_HUB6: - case SERIAL_IO_PORT: + case UPIO_PORT: start = up->port.iobase; if (size) @@ -947,14 +888,9 @@ static int m32r_sio_request_port(struct uart_port *port) { struct uart_sio_port *up = (struct uart_sio_port *)port; - struct resource *res = NULL, *res_rsa = NULL; + struct resource *res = NULL; int ret = 0; - if (up->port.type == PORT_RSA){ - ret = m32r_sio_request_rsa_resource(up, &res_rsa); - if (ret < 0) - return ret; - } ret = m32r_sio_request_std_resource(up, &res); /* @@ -969,11 +905,10 @@ } if (ret < 0) { - if (res_rsa) - release_resource(res_rsa); if (res) release_resource(res); } + return ret; } @@ -983,7 +918,7 @@ spin_lock_irqsave(&up->port.lock, flags); - up->port.type = PORT_SIO; + up->port.type = (PORT_M32R_SIO - PORT_M32R_BASE + 1); up->port.fifosize = uart_config[up->port.type].dfl_xmit_fifo_size; spin_unlock_irqrestore(&up->port.lock, flags); @@ -994,8 +929,7 @@ { if (ser->irq >= NR_IRQS || ser->irq < 0 || ser->baud_base < 9600 || ser->type < PORT_UNKNOWN || - ser->type > PORT_MAX_SIO || ser->type == PORT_CIRRUS || - ser->type == PORT_STARTECH) + ser->type >= ARRAY_SIZE(uart_config)) return -EINVAL; return 0; } @@ -1048,7 +982,6 @@ up->port.irq = irq_canonicalize(old_serial_port[i].irq); up->port.uartclk = old_serial_port[i].baud_base * 16; up->port.flags = old_serial_port[i].flags; - up->port.hub6 = old_serial_port[i].hub6; up->port.membase = old_serial_port[i].iomem_base; up->port.iotype = old_serial_port[i].io_type; up->port.regshift = old_serial_port[i].iomem_reg_shift; @@ -1255,7 +1188,7 @@ } /** - * register_serial - configure a 16x50 serial port at runtime + * register_m32r_sio - configure a 16x50 serial port at runtime * @req: request structure * * Configure the serial port specified by the request. If the @@ -1272,7 +1205,7 @@ return __register_m32r_sio(req, -1); } -int __init early_m32r_sio_setup(struct uart_port *port) +int __init early_serial_setup(struct uart_port *port) { m32r_sio_isa_init_ports(); m32r_sio_ports[port->line].port = *port; @@ -1282,7 +1215,7 @@ } /** - * unregister_serial - remove a 16x50 serial port at runtime + * unregister_m32r_sio - remove a 16x50 serial port at runtime * @line: serial line number * * Remove one serial port. This may be called from interrupt @@ -1293,20 +1226,6 @@ uart_unregister_port(&m32r_sio_reg, line); } -/* - * This is for ISAPNP only. - */ -void m32r_sio_get_irq_map(unsigned int *map) -{ - int i; - - for (i = 0; i < UART_NR; i++) { - if (m32r_sio_ports[i].port.type != PORT_UNKNOWN && - m32r_sio_ports[i].port.irq < 16) - *map |= 1 << m32r_sio_ports[i].port.irq; - } -} - /** * m32r_sio_suspend_port - suspend one serial port * @line: serial line number @@ -1361,7 +1280,6 @@ EXPORT_SYMBOL(register_m32r_sio); EXPORT_SYMBOL(unregister_m32r_sio); -EXPORT_SYMBOL(m32r_sio_get_irq_map); EXPORT_SYMBOL(m32r_sio_suspend_port); EXPORT_SYMBOL(m32r_sio_resume_port); diff -Nru a/drivers/serial/m32r_sio.h b/drivers/serial/m32r_sio.h --- a/drivers/serial/m32r_sio.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/m32r_sio.h 2005-03-30 16:58:48 -08:00 @@ -36,7 +36,6 @@ unsigned int port; unsigned int irq; unsigned int flags; - unsigned char hub6; unsigned char io_type; unsigned char *iomem_base; unsigned short iomem_reg_shift; diff -Nru a/drivers/serial/m32r_sio_reg.h b/drivers/serial/m32r_sio_reg.h --- a/drivers/serial/m32r_sio_reg.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/m32r_sio_reg.h 2005-03-30 16:58:48 -08:00 @@ -104,31 +104,6 @@ #define UART_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) /* - * These are the definitions for the FIFO Control Register - * (16650 only) - */ -#define UART_FCR_ENABLE_FIFO 0x01 /* Enable the FIFO */ -#define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */ -#define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */ -#define UART_FCR_DMA_SELECT 0x08 /* For DMA applications */ -#define UART_FCR_TRIGGER_MASK 0xC0 /* Mask for the FIFO trigger range */ -#define UART_FCR_TRIGGER_1 0x00 /* Mask for trigger set at 1 */ -#define UART_FCR_TRIGGER_4 0x40 /* Mask for trigger set at 4 */ -#define UART_FCR_TRIGGER_8 0x80 /* Mask for trigger set at 8 */ -#define UART_FCR_TRIGGER_14 0xC0 /* Mask for trigger set at 14 */ -/* 16650 redefinitions */ -#define UART_FCR6_R_TRIGGER_8 0x00 /* Mask for receive trigger set at 1 */ -#define UART_FCR6_R_TRIGGER_16 0x40 /* Mask for receive trigger set at 4 */ -#define UART_FCR6_R_TRIGGER_24 0x80 /* Mask for receive trigger set at 8 */ -#define UART_FCR6_R_TRIGGER_28 0xC0 /* Mask for receive trigger set at 14 */ -#define UART_FCR6_T_TRIGGER_16 0x00 /* Mask for transmit trigger set at 16 */ -#define UART_FCR6_T_TRIGGER_8 0x10 /* Mask for transmit trigger set at 8 */ -#define UART_FCR6_T_TRIGGER_24 0x20 /* Mask for transmit trigger set at 24 */ -#define UART_FCR6_T_TRIGGER_30 0x30 /* Mask for transmit trigger set at 30 */ -/* TI 16750 definitions */ -#define UART_FCR7_64BYTE 0x20 /* Go into 64 byte mode */ - -/* * These are the definitions for the Line Control Register * * Note: if the word length is 5 bits (UART_LCR_WLEN5), then setting @@ -174,170 +149,5 @@ #define UART_IER_RLSI 0x08 /* Enable receiver line status interrupt */ #define UART_IER_THRI 0x03 /* Enable Transmitter holding register int. */ #define UART_IER_RDI 0x04 /* Enable receiver data interrupt */ -/* - * Sleep mode for ST16650 and TI16750. - * Note that for 16650, EFR-bit 4 must be selected as well. - */ -#define UART_IERX_SLEEP 0x10 /* Enable sleep mode */ - -/* - * These are the definitions for the Modem Control Register - */ -#define UART_MCR_LOOP 0x10 /* Enable loopback test mode */ -#define UART_MCR_OUT2 0x08 /* Out2 complement */ -#define UART_MCR_OUT1 0x04 /* Out1 complement */ -#define UART_MCR_RTS 0x02 /* RTS complement */ -#define UART_MCR_DTR 0x01 /* DTR complement */ - -/* - * These are the definitions for the Modem Status Register - */ -#define UART_MSR_DCD 0x80 /* Data Carrier Detect */ -#define UART_MSR_RI 0x40 /* Ring Indicator */ -#define UART_MSR_DSR 0x20 /* Data Set Ready */ -#define UART_MSR_CTS 0x10 /* Clear to Send */ -#define UART_MSR_DDCD 0x08 /* Delta DCD */ -#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */ -#define UART_MSR_DDSR 0x02 /* Delta DSR */ -#define UART_MSR_DCTS 0x01 /* Delta CTS */ -#define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */ - -/* - * These are the definitions for the Extended Features Register - * (StarTech 16C660 only, when DLAB=1) - */ -#define UART_EFR_CTS 0x80 /* CTS flow control */ -#define UART_EFR_RTS 0x40 /* RTS flow control */ -#define UART_EFR_SCD 0x20 /* Special character detect */ -#define UART_EFR_ECB 0x10 /* Enhanced control bit */ -/* - * the low four bits control software flow control - */ - -/* - * These register definitions are for the 16C950 - */ -#define UART_ASR 0x01 /* Additional Status Register */ -#define UART_RFL 0x03 /* Receiver FIFO level */ -#define UART_TFL 0x04 /* Transmitter FIFO level */ -#define UART_ICR 0x05 /* Index Control Register */ - -/* The 16950 ICR registers */ -#define UART_ACR 0x00 /* Additional Control Register */ -#define UART_CPR 0x01 /* Clock Prescalar Register */ -#define UART_TCR 0x02 /* Times Clock Register */ -#define UART_CKS 0x03 /* Clock Select Register */ -#define UART_TTL 0x04 /* Transmitter Interrupt Trigger Level */ -#define UART_RTL 0x05 /* Receiver Interrupt Trigger Level */ -#define UART_FCL 0x06 /* Flow Control Level Lower */ -#define UART_FCH 0x07 /* Flow Control Level Higher */ -#define UART_ID1 0x08 /* ID #1 */ -#define UART_ID2 0x09 /* ID #2 */ -#define UART_ID3 0x0A /* ID #3 */ -#define UART_REV 0x0B /* Revision */ -#define UART_CSR 0x0C /* Channel Software Reset */ -#define UART_NMR 0x0D /* Nine-bit Mode Register */ -#define UART_CTR 0xFF - -/* - * The 16C950 Additional Control Reigster - */ -#define UART_ACR_RXDIS 0x01 /* Receiver disable */ -#define UART_ACR_TXDIS 0x02 /* Receiver disable */ -#define UART_ACR_DSRFC 0x04 /* DSR Flow Control */ -#define UART_ACR_TLENB 0x20 /* 950 trigger levels enable */ -#define UART_ACR_ICRRD 0x40 /* ICR Read enable */ -#define UART_ACR_ASREN 0x80 /* Additional status enable */ - -/* - * These are the definitions for the Feature Control Register - * (XR16C85x only, when LCR=bf; doubles with the Interrupt Enable - * Register, UART register #1) - */ -#define UART_FCTR_RTS_NODELAY 0x00 /* RTS flow control delay */ -#define UART_FCTR_RTS_4DELAY 0x01 -#define UART_FCTR_RTS_6DELAY 0x02 -#define UART_FCTR_RTS_8DELAY 0x03 -#define UART_FCTR_IRDA 0x04 /* IrDa data encode select */ -#define UART_FCTR_TX_INT 0x08 /* Tx interrupt type select */ -#define UART_FCTR_TRGA 0x00 /* Tx/Rx 550 trigger table select */ -#define UART_FCTR_TRGB 0x10 /* Tx/Rx 650 trigger table select */ -#define UART_FCTR_TRGC 0x20 /* Tx/Rx 654 trigger table select */ -#define UART_FCTR_TRGD 0x30 /* Tx/Rx 850 programmable trigger select */ -#define UART_FCTR_SCR_SWAP 0x40 /* Scratch pad register swap */ -#define UART_FCTR_RX 0x00 /* Programmable trigger mode select */ -#define UART_FCTR_TX 0x80 /* Programmable trigger mode select */ - -/* - * These are the definitions for the Enhanced Mode Select Register - * (XR16C85x only, when LCR=bf and FCTR bit 6=1; doubles with the - * Scratch register, UART register #7) - */ -#define UART_EMSR_FIFO_COUNT 0x01 /* Rx/Tx select */ -#define UART_EMSR_ALT_COUNT 0x02 /* Alternating count select */ - -/* - * These are the definitions for the Programmable Trigger - * Register (XR16C85x only, when LCR=bf; doubles with the UART RX/TX - * register, UART register #0) - */ -#define UART_TRG_1 0x01 -#define UART_TRG_4 0x04 -#define UART_TRG_8 0x08 -#define UART_TRG_16 0x10 -#define UART_TRG_32 0x20 -#define UART_TRG_64 0x40 -#define UART_TRG_96 0x60 -#define UART_TRG_120 0x78 -#define UART_TRG_128 0x80 - -/* - * These definitions are for the RSA-DV II/S card, from - * - * Kiyokazu SUTO - */ - -#define UART_RSA_BASE (-8) - -#define UART_RSA_MSR ((UART_RSA_BASE) + 0) /* I/O: Mode Select Register */ - -#define UART_RSA_MSR_SWAP (1 << 0) /* Swap low/high 8 bytes in I/O port addr */ -#define UART_RSA_MSR_FIFO (1 << 2) /* Enable the external FIFO */ -#define UART_RSA_MSR_FLOW (1 << 3) /* Enable the auto RTS/CTS flow control */ -#define UART_RSA_MSR_ITYP (1 << 4) /* Level (1) / Edge triger (0) */ - -#define UART_RSA_IER ((UART_RSA_BASE) + 1) /* I/O: Interrupt Enable Register */ - -#define UART_RSA_IER_Rx_FIFO_H (1 << 0) /* Enable Rx FIFO half full int. */ -#define UART_RSA_IER_Tx_FIFO_H (1 << 1) /* Enable Tx FIFO half full int. */ -#define UART_RSA_IER_Tx_FIFO_E (1 << 2) /* Enable Tx FIFO empty int. */ -#define UART_RSA_IER_Rx_TOUT (1 << 3) /* Enable char receive timeout int */ -#define UART_RSA_IER_TIMER (1 << 4) /* Enable timer interrupt */ - -#define UART_RSA_SRR ((UART_RSA_BASE) + 2) /* IN: Status Read Register */ - -#define UART_RSA_SRR_Tx_FIFO_NEMP (1 << 0) /* Tx FIFO is not empty (1) */ -#define UART_RSA_SRR_Tx_FIFO_NHFL (1 << 1) /* Tx FIFO is not half full (1) */ -#define UART_RSA_SRR_Tx_FIFO_NFUL (1 << 2) /* Tx FIFO is not full (1) */ -#define UART_RSA_SRR_Rx_FIFO_NEMP (1 << 3) /* Rx FIFO is not empty (1) */ -#define UART_RSA_SRR_Rx_FIFO_NHFL (1 << 4) /* Rx FIFO is not half full (1) */ -#define UART_RSA_SRR_Rx_FIFO_NFUL (1 << 5) /* Rx FIFO is not full (1) */ -#define UART_RSA_SRR_Rx_TOUT (1 << 6) /* Character reception timeout occurred (1) */ -#define UART_RSA_SRR_TIMER (1 << 7) /* Timer interrupt occurred */ - -#define UART_RSA_FRR ((UART_RSA_BASE) + 2) /* OUT: FIFO Reset Register */ - -#define UART_RSA_TIVSR ((UART_RSA_BASE) + 3) /* I/O: Timer Interval Value Set Register */ - -#define UART_RSA_TCR ((UART_RSA_BASE) + 4) /* OUT: Timer Control Register */ - -#define UART_RSA_TCR_SWITCH (1 << 0) /* Timer on */ - -/* - * The RSA DSV/II board has two fixed clock frequencies. One is the - * standard rate, and the other is 8 times faster. - */ -#define SERIAL_RSA_BAUD_BASE (921600) -#define SERIAL_RSA_BAUD_BASE_LO (SERIAL_RSA_BAUD_BASE / 8) #endif /* _M32R_SIO_REG_H */ diff -Nru a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c --- a/drivers/serial/mcfserial.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/mcfserial.c 2005-03-30 16:58:48 -08:00 @@ -138,18 +138,6 @@ /* - * tmp_buf is used as a temporary buffer by serial_write. We need to - * lock it in case the copy_from_user blocks while swapping in a page, - * and some other program tries to do a serial write at the same time. - * Since the lock will only come under contention when the system is - * swapping and available memory is low, it makes sense to share one - * buffer across all the serial ports, since it significantly saves - * memory if large numbers of serial ports are open. - */ -static unsigned char mcfrs_tmp_buf[4096]; /* This is cheating */ -static DECLARE_MUTEX(mcfrs_tmp_buf_sem); - -/* * Forware declarations... */ static void mcfrs_change_speed(struct mcf_serial *info); diff -Nru a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c --- a/drivers/serial/mpc52xx_uart.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/mpc52xx_uart.c 2005-03-30 16:58:48 -08:00 @@ -86,7 +86,7 @@ * the console_init */ -#define PSC(port) ((struct mpc52xx_psc *)((port)->membase)) +#define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase)) /* Forward declaration of the interruption handling routine */ @@ -190,7 +190,7 @@ static int mpc52xx_uart_startup(struct uart_port *port) { - struct mpc52xx_psc *psc = PSC(port); + struct mpc52xx_psc __iomem *psc = PSC(port); /* Reset/activate the port, clear and enable interrupts */ out_8(&psc->command,MPC52xx_PSC_RST_RX); @@ -217,7 +217,7 @@ static void mpc52xx_uart_shutdown(struct uart_port *port) { - struct mpc52xx_psc *psc = PSC(port); + struct mpc52xx_psc __iomem *psc = PSC(port); /* Shut down the port, interrupt and all */ out_8(&psc->command,MPC52xx_PSC_RST_RX); @@ -231,7 +231,7 @@ mpc52xx_uart_set_termios(struct uart_port *port, struct termios *new, struct termios *old) { - struct mpc52xx_psc *psc = PSC(port); + struct mpc52xx_psc __iomem *psc = PSC(port); unsigned long flags; unsigned char mr1, mr2; unsigned short ctr; @@ -562,7 +562,7 @@ mpc52xx_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits, int *flow) { - struct mpc52xx_psc *psc = PSC(port); + struct mpc52xx_psc __iomem *psc = PSC(port); unsigned char mr1; /* Read the mode registers */ @@ -592,7 +592,7 @@ mpc52xx_console_write(struct console *co, const char *s, unsigned int count) { struct uart_port *port = &mpc52xx_uart_ports[co->index]; - struct mpc52xx_psc *psc = PSC(port); + struct mpc52xx_psc __iomem *psc = PSC(port); unsigned int i, j; /* Disable interrupts */ diff -Nru a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c --- a/drivers/serial/serial_core.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/serial/serial_core.c 2005-03-30 16:58:47 -08:00 @@ -2233,7 +2233,7 @@ /* * Are the two ports equivalent? */ -static int uart_match_port(struct uart_port *port1, struct uart_port *port2) +int uart_match_port(struct uart_port *port1, struct uart_port *port2) { if (port1->iotype != port2->iotype) return 0; @@ -2249,6 +2249,7 @@ } return 0; } +EXPORT_SYMBOL(uart_match_port); /* * Try to find an unused uart_state slot for a port. diff -Nru a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c --- a/drivers/serial/serial_cs.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/serial/serial_cs.c 2005-03-30 16:58:48 -08:00 @@ -289,7 +289,8 @@ /*====================================================================*/ -static int setup_serial(struct serial_info * info, kio_addr_t iobase, int irq) +static int setup_serial(client_handle_t handle, struct serial_info * info, + kio_addr_t iobase, int irq) { struct uart_port port; int line; @@ -299,6 +300,7 @@ port.irq = irq; port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; port.uartclk = 1843200; + port.dev = &handle_to_dev(handle); if (buggy_uart) port.flags |= UPF_BUGGY_UART; line = serial8250_register_port(&port); @@ -376,7 +378,7 @@ info->slave = 1; } if (info->slave) - return setup_serial(info, port, config.AssignedIRQ); + return setup_serial(handle, info, port, config.AssignedIRQ); } link->conf.Vcc = config.Vcc; @@ -451,7 +453,7 @@ return -1; } - return setup_serial(info, link->io.BasePort1, link->irq.AssignedIRQ); + return setup_serial(handle, info, link->io.BasePort1, link->irq.AssignedIRQ); } static int multi_config(dev_link_t * link) @@ -546,21 +548,21 @@ 8 registers are for the UART, the others are extra registers */ if (info->manfid == MANFID_OXSEMI) { if (cf->index == 1 || cf->index == 3) { - setup_serial(info, base2, link->irq.AssignedIRQ); + setup_serial(handle, info, base2, link->irq.AssignedIRQ); outb(12, link->io.BasePort1 + 1); } else { - setup_serial(info, link->io.BasePort1, link->irq.AssignedIRQ); + setup_serial(handle, info, link->io.BasePort1, link->irq.AssignedIRQ); outb(12, base2 + 1); } return 0; } - setup_serial(info, link->io.BasePort1, link->irq.AssignedIRQ); + setup_serial(handle, info, link->io.BasePort1, link->irq.AssignedIRQ); /* The Nokia cards are not really multiport cards */ if (info->manfid == MANFID_NOKIA) return 0; for (i = 0; i < info->multi - 1; i++) - setup_serial(info, base2 + (8 * i), link->irq.AssignedIRQ); + setup_serial(handle, info, base2 + (8 * i), link->irq.AssignedIRQ); return 0; } diff -Nru a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c --- a/drivers/telephony/ixj.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/telephony/ixj.c 2005-03-30 16:58:47 -08:00 @@ -5949,10 +5949,10 @@ j->cadence_f[lcp->filter].off3 = lcp->off3; j->cadence_f[lcp->filter].off3min = 0; j->cadence_f[lcp->filter].off3max = 0; - kfree(lcp); if(ixjdebug & 0x0002) { printk(KERN_INFO "Cadence %d loaded\n", lcp->filter); } + kfree(lcp); return 0; } diff -Nru a/drivers/usb/Makefile b/drivers/usb/Makefile --- a/drivers/usb/Makefile 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/Makefile 2005-03-30 16:58:50 -08:00 @@ -50,8 +50,8 @@ obj-$(CONFIG_USB_PEGASUS) += net/ obj-$(CONFIG_USB_RTL8150) += net/ obj-$(CONFIG_USB_USBNET) += net/ +obj-$(CONFIG_USB_ZD1201) += net/ -obj-$(CONFIG_USB_HPUSBSCSI) += image/ obj-$(CONFIG_USB_MDC800) += image/ obj-$(CONFIG_USB_MICROTEK) += image/ diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c --- a/drivers/usb/class/usb-midi.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/class/usb-midi.c 2005-03-30 16:58:50 -08:00 @@ -992,7 +992,7 @@ endPoint &= 0x0f; /* Silently force endPoint to lie in range 0 to 15. */ pipe = usb_rcvbulkpipe( d, endPoint ); - bufSize = usb_maxpacket( d, pipe, usb_pipein(pipe) ); + bufSize = usb_maxpacket( d, pipe, 0 ); /* usb_pipein() = ! usb_pipeout() = true for an in Endpoint */ ep = (struct midi_in_endpoint *)kmalloc(sizeof(struct midi_in_endpoint), GFP_KERNEL); @@ -1063,7 +1063,7 @@ endPoint &= 0x0f; pipe = usb_sndbulkpipe( d, endPoint ); - bufSize = usb_maxpacket( d, pipe, usb_pipeout(pipe) ); + bufSize = usb_maxpacket( d, pipe, 1 ); ep = (struct midi_out_endpoint *)kmalloc(sizeof(struct midi_out_endpoint), GFP_KERNEL); if ( !ep ) { @@ -1451,8 +1451,6 @@ } else { if ( oep < 15 ) { pins = oep+1; - if ( pins > 16 ) - pins = 16; u->out[oep].endpoint = p1[2]; u->out[oep].cableId = ( 1 << pins ) - 1; if ( u->out[oep].cableId ) diff -Nru a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c --- a/drivers/usb/core/buffer.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/core/buffer.c 2005-03-30 16:58:50 -08:00 @@ -76,7 +76,6 @@ } return 0; } -EXPORT_SYMBOL (hcd_buffer_create); /** @@ -98,7 +97,6 @@ } } } -EXPORT_SYMBOL (hcd_buffer_destroy); /* sometimes alloc/free could use kmalloc with SLAB_DMA, for diff -Nru a/drivers/usb/core/config.c b/drivers/usb/core/config.c --- a/drivers/usb/core/config.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/core/config.c 2005-03-30 16:58:47 -08:00 @@ -221,7 +221,7 @@ return buffer - buffer0 + i; } -int usb_parse_configuration(struct device *ddev, int cfgidx, +static int usb_parse_configuration(struct device *ddev, int cfgidx, struct usb_host_config *config, unsigned char *buffer, int size) { unsigned char *buffer0 = buffer; @@ -420,8 +420,8 @@ for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { struct usb_host_config *cf = &dev->config[c]; - if (cf->string) - kfree(cf->string); + kfree(cf->string); + cf->string = NULL; for (i = 0; i < cf->desc.bNumInterfaces; i++) { if (cf->intf_cache[i]) diff -Nru a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c --- a/drivers/usb/core/devices.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/core/devices.c 2005-03-30 16:58:50 -08:00 @@ -460,7 +460,7 @@ return 0; if (level > MAX_TOPO_LEVEL) - return total_written; + return 0; /* allocate 2^1 pages = 8K (on i386); should be more than enough for one device */ if (!(pages_start = (char*) __get_free_pages(GFP_KERNEL,1))) return -ENOMEM; @@ -527,10 +527,7 @@ length = *nbytes; if (copy_to_user(*buffer, pages_start + *skip_bytes, length)) { free_pages((unsigned long)pages_start, 1); - - if (total_written == 0) - return -EFAULT; - return total_written; + return -EFAULT; } *nbytes -= length; *file_offset += length; diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c --- a/drivers/usb/core/hcd-pci.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/core/hcd-pci.c 2005-03-30 16:58:48 -08:00 @@ -226,8 +226,8 @@ /* entry if root hub wasn't yet suspended ... from sysfs, * without autosuspend, or if USB_SUSPEND isn't configured. */ - case USB_STATE_RUNNING: - hcd->state = USB_STATE_QUIESCING; + case HC_STATE_RUNNING: + hcd->state = HC_STATE_QUIESCING; retval = hcd->driver->suspend (hcd, state); if (retval) { dev_dbg (hcd->self.controller, @@ -235,7 +235,7 @@ retval); break; } - hcd->state = HCD_STATE_SUSPENDED; + hcd->state = HC_STATE_SUSPENDED; /* FALLTHROUGH */ /* entry with CONFIG_USB_SUSPEND, or hcds that autosuspend: the @@ -245,7 +245,7 @@ * FIXME only CONFIG_USB_SUSPEND guarantees hub_suspend() will * have been called, otherwise root hub timers still run ... */ - case HCD_STATE_SUSPENDED: + case HC_STATE_SUSPENDED: if (state <= dev->current_state) break; @@ -311,7 +311,7 @@ int has_pci_pm; hcd = pci_get_drvdata(dev); - if (hcd->state != HCD_STATE_SUSPENDED) { + if (hcd->state != HC_STATE_SUSPENDED) { dev_dbg (hcd->self.controller, "can't resume, not suspended!\n"); return 0; @@ -323,7 +323,7 @@ pci_state(dev->current_state), has_pci_pm ? "" : " (legacy)"); - hcd->state = USB_STATE_RESUMING; + hcd->state = HC_STATE_RESUMING; if (has_pci_pm) pci_set_power_state (dev, 0); @@ -343,7 +343,7 @@ #endif retval = hcd->driver->resume (hcd); - if (!HCD_IS_RUNNING (hcd->state)) { + if (!HC_IS_RUNNING (hcd->state)) { dev_dbg (hcd->self.controller, "resume fail, retval %d\n", retval); usb_hc_died (hcd); diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/core/hcd.c 2005-03-30 16:58:49 -08:00 @@ -101,6 +101,9 @@ DECLARE_MUTEX (usb_bus_list_lock); /* exported only for usbfs */ EXPORT_SYMBOL_GPL (usb_bus_list_lock); +/* used for controlling access to virtual root hubs */ +static DEFINE_SPINLOCK(hcd_root_hub_lock); + /* used when updating hcd data */ static DEFINE_SPINLOCK(hcd_data_lock); @@ -455,7 +458,7 @@ default: /* non-generic request */ - if (HCD_IS_SUSPENDED (hcd->state)) + if (HC_IS_SUSPENDED (hcd->state)) status = -EAGAIN; else { switch (typeReq) { @@ -701,7 +704,7 @@ * This code is used to initialize a usb_bus structure, memory for which is * separately managed. */ -void usb_bus_init (struct usb_bus *bus) +static void usb_bus_init (struct usb_bus *bus) { memset (&bus->devmap, 0, sizeof(struct usb_devmap)); @@ -719,7 +722,6 @@ class_device_initialize(&bus->class_dev); bus->class_dev.class = &usb_host_class; } -EXPORT_SYMBOL (usb_bus_init); /** * usb_alloc_bus - creates a new USB host controller structure @@ -745,7 +747,6 @@ bus->op = op; return bus; } -EXPORT_SYMBOL (usb_alloc_bus); /*-------------------------------------------------------------------------*/ @@ -757,7 +758,7 @@ * Assigns a bus number, and links the controller into usbcore data * structures so that it can be seen by scanning the bus list. */ -int usb_register_bus(struct usb_bus *bus) +static int usb_register_bus(struct usb_bus *bus) { int busnum; int retval; @@ -792,7 +793,6 @@ dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum); return 0; } -EXPORT_SYMBOL (usb_register_bus); /** * usb_deregister_bus - deregisters the USB host controller @@ -802,7 +802,7 @@ * Recycles the bus number, and unlinks the controller from usbcore data * structures so that it won't be seen by scanning the bus list. */ -void usb_deregister_bus (struct usb_bus *bus) +static void usb_deregister_bus (struct usb_bus *bus) { dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum); @@ -822,12 +822,11 @@ class_device_del(&bus->class_dev); } -EXPORT_SYMBOL (usb_deregister_bus); /** - * usb_register_root_hub - called by HCD to register its root hub + * usb_hcd_register_root_hub - called by HCD to register its root hub * @usb_dev: the usb root hub device to be registered. - * @parent_dev: the parent device of this root hub. + * @hcd: host controller for this root hub * * The USB host controller calls this function to register the root hub * properly with the USB subsystem. It sets up the device properly in @@ -835,11 +834,20 @@ * then calls usb_new_device() to register the usb device. It also * assigns the root hub's USB address (always 1). */ -int usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev) +int usb_hcd_register_root_hub (struct usb_device *usb_dev, struct usb_hcd *hcd) { + struct device *parent_dev = hcd->self.controller; const int devnum = 1; int retval; + /* hcd->driver->start() reported can_wakeup, probably with + * assistance from board's boot firmware. + * NOTE: normal devices won't enable wakeup by default. + */ + if (hcd->can_wakeup) + dev_dbg (parent_dev, "supports USB remote wakeup\n"); + hcd->remote_wakeup = hcd->can_wakeup; + usb_dev->devnum = devnum; usb_dev->bus->devnum_next = devnum + 1; memset (&usb_dev->bus->devmap.devicemap, 0, @@ -869,9 +877,20 @@ usb_dev->dev.bus_id, retval); } up (&usb_bus_list_lock); + + if (retval == 0) { + spin_lock_irq (&hcd_root_hub_lock); + hcd->rh_registered = 1; + spin_unlock_irq (&hcd_root_hub_lock); + + /* Did the HC die before the root hub was registered? */ + if (hcd->state == HC_STATE_HALT) + usb_hc_died (hcd); /* This time clean up */ + } + return retval; } -EXPORT_SYMBOL (usb_register_root_hub); +EXPORT_SYMBOL_GPL(usb_hcd_register_root_hub); /*-------------------------------------------------------------------------*/ @@ -1112,8 +1131,8 @@ else if (unlikely (urb->reject)) status = -EPERM; else switch (hcd->state) { - case USB_STATE_RUNNING: - case USB_STATE_RESUMING: + case HC_STATE_RUNNING: + case HC_STATE_RESUMING: usb_get_dev (urb->dev); list_add_tail (&urb->urb_list, &ep->urb_list); status = 0; @@ -1187,7 +1206,7 @@ static int hcd_get_frame_number (struct usb_device *udev) { struct usb_hcd *hcd = (struct usb_hcd *)udev->bus->hcpriv; - if (!HCD_IS_RUNNING (hcd->state)) + if (!HC_IS_RUNNING (hcd->state)) return -ESHUTDOWN; return hcd->driver->get_frame_number (hcd); } @@ -1269,7 +1288,7 @@ * halted ~= no unlink handshake is needed * suspended, resuming == should never happen */ - WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT); + WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT); /* insist the urb is still queued */ list_for_each(tmp, &ep->urb_list) { @@ -1336,7 +1355,7 @@ hcd = udev->bus->hcpriv; - WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT); + WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT); local_irq_disable (); @@ -1423,7 +1442,31 @@ return 0; } +/** + * usb_hcd_resume_root_hub - called by HCD to resume its root hub + * @hcd: host controller for this root hub + * + * The USB host controller calls this function when its root hub is + * suspended (with the remote wakeup feature enabled) and a remote + * wakeup request is received. It queues a request for khubd to + * resume the root hub. + */ +void usb_hcd_resume_root_hub (struct usb_hcd *hcd) +{ + unsigned long flags; + + spin_lock_irqsave (&hcd_root_hub_lock, flags); + if (hcd->rh_registered) + usb_resume_root_hub (hcd->self.root_hub); + spin_unlock_irqrestore (&hcd_root_hub_lock, flags); +} + +#else +void usb_hcd_resume_root_hub (struct usb_hcd *hcd) +{ +} #endif +EXPORT_SYMBOL_GPL(usb_hcd_resume_root_hub); /*-------------------------------------------------------------------------*/ @@ -1547,17 +1590,16 @@ struct usb_hcd *hcd = __hcd; int start = hcd->state; - if (start == USB_STATE_HALT) + if (start == HC_STATE_HALT) return IRQ_NONE; if (hcd->driver->irq (hcd, r) == IRQ_NONE) return IRQ_NONE; hcd->saw_irq = 1; - if (hcd->state != start && hcd->state == USB_STATE_HALT) + if (hcd->state != start && hcd->state == HC_STATE_HALT) usb_hc_died (hcd); return IRQ_HANDLED; } -EXPORT_SYMBOL (usb_hcd_irq); /*-------------------------------------------------------------------------*/ @@ -1571,12 +1613,21 @@ */ void usb_hc_died (struct usb_hcd *hcd) { + unsigned long flags; + dev_err (hcd->self.controller, "HC died; cleaning up\n"); - /* make khubd clean up old urbs and devices */ - usb_set_device_state(hcd->self.root_hub, USB_STATE_NOTATTACHED); - mod_timer(&hcd->rh_timer, jiffies); + spin_lock_irqsave (&hcd_root_hub_lock, flags); + if (hcd->rh_registered) { + + /* make khubd clean up old urbs and devices */ + usb_set_device_state (hcd->self.root_hub, + USB_STATE_NOTATTACHED); + usb_kick_khubd (hcd->self.root_hub); + } + spin_unlock_irqrestore (&hcd_root_hub_lock, flags); } +EXPORT_SYMBOL_GPL (usb_hc_died); /*-------------------------------------------------------------------------*/ @@ -1688,13 +1739,15 @@ hcd->irq = irqnum; dev_info(hcd->self.controller, "irq %s, %s 0x%08llx\n", bufp, (hcd->driver->flags & HCD_MEMORY) ? - "io mem" : "io base", hcd->rsrc_start); + "io mem" : "io base", + (unsigned long long)hcd->rsrc_start); } else { hcd->irq = -1; if (hcd->rsrc_start) dev_info(hcd->self.controller, "%s 0x%08llx\n", (hcd->driver->flags & HCD_MEMORY) ? - "io mem" : "io base", hcd->rsrc_start); + "io mem" : "io base", + (unsigned long long)hcd->rsrc_start); } if ((retval = hcd->driver->start(hcd)) < 0) { @@ -1727,14 +1780,17 @@ { dev_info(hcd->self.controller, "remove, state %x\n", hcd->state); - if (HCD_IS_RUNNING (hcd->state)) - hcd->state = USB_STATE_QUIESCING; + if (HC_IS_RUNNING (hcd->state)) + hcd->state = HC_STATE_QUIESCING; dev_dbg(hcd->self.controller, "roothub graceful disconnect\n"); + spin_lock_irq (&hcd_root_hub_lock); + hcd->rh_registered = 0; + spin_unlock_irq (&hcd_root_hub_lock); usb_disconnect(&hcd->self.root_hub); hcd->driver->stop(hcd); - hcd->state = USB_STATE_HALT; + hcd->state = HC_STATE_HALT; if (hcd->irq >= 0) free_irq(hcd->irq, hcd); diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/core/hcd.h 2005-03-30 16:58:48 -08:00 @@ -74,6 +74,8 @@ unsigned saw_irq : 1; unsigned can_wakeup:1; /* hw supports wakeup? */ unsigned remote_wakeup:1;/* sw should use wakeup? */ + unsigned rh_registered:1;/* is root hub registered? */ + int irq; /* irq allocated */ void __iomem *regs; /* device memory/io */ u64 rsrc_start; /* memory/io resource start */ @@ -87,14 +89,14 @@ # define __SUSPEND 0x04 # define __TRANSIENT 0x80 -# define USB_STATE_HALT 0 -# define USB_STATE_RUNNING (__ACTIVE) -# define USB_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE) -# define USB_STATE_RESUMING (__SUSPEND|__TRANSIENT) -# define HCD_STATE_SUSPENDED (__SUSPEND) +# define HC_STATE_HALT 0 +# define HC_STATE_RUNNING (__ACTIVE) +# define HC_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE) +# define HC_STATE_RESUMING (__SUSPEND|__TRANSIENT) +# define HC_STATE_SUSPENDED (__SUSPEND) -#define HCD_IS_RUNNING(state) ((state) & __ACTIVE) -#define HCD_IS_SUSPENDED(state) ((state) & __SUSPEND) +#define HC_IS_RUNNING(state) ((state) & __ACTIVE) +#define HC_IS_SUSPENDED(state) ((state) & __SUSPEND) /* more shared queuing code would be good; it should support * smarter scheduling, handle transaction translators, etc; @@ -208,7 +210,6 @@ }; extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); -extern void usb_bus_init (struct usb_bus *bus); extern struct usb_hcd *usb_create_hcd (const struct hc_driver *driver, struct device *dev, char *bus_name); @@ -340,25 +341,10 @@ extern struct usb_bus *usb_alloc_bus (struct usb_operations *); -extern int usb_register_bus (struct usb_bus *); -extern void usb_deregister_bus (struct usb_bus *); - -extern int usb_register_root_hub (struct usb_device *usb_dev, - struct device *parent_dev); - -static inline int hcd_register_root (struct usb_device *usb_dev, - struct usb_hcd *hcd) -{ - /* hcd->driver->start() reported can_wakeup, probably with - * assistance from board's boot firmware. - * NOTE: normal devices won't enable wakeup by default. - */ - if (hcd->can_wakeup) - dev_dbg (hcd->self.controller, "supports USB remote wakeup\n"); - hcd->remote_wakeup = hcd->can_wakeup; +extern int usb_hcd_register_root_hub (struct usb_device *usb_dev, + struct usb_hcd *hcd); - return usb_register_root_hub (usb_dev, hcd->self.controller); -} +extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd); extern void usb_set_device_state(struct usb_device *udev, enum usb_device_state new_state); diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/core/hub.c 2005-03-30 16:58:48 -08:00 @@ -289,6 +289,11 @@ spin_unlock_irqrestore(&hub_event_lock, flags); } +void usb_kick_khubd(struct usb_device *hdev) +{ + kick_khubd(hdev_to_hub(hdev)); +} + /* completion function, fires on port status changes and various faults */ static void hub_irq(struct urb *urb, struct pt_regs *regs) @@ -1383,8 +1388,13 @@ dev_err(hub->intfdev, "cannot reset port %d (err = %d)\n", port1, status); - else + else { status = hub_port_wait_reset(hub, port1, udev, delay); + if (status) + dev_dbg(hub->intfdev, + "port_wait_reset: err = %d\n", + status); + } /* return on disconnect or reset */ switch (status) { @@ -1533,7 +1543,8 @@ * Linux (2.6) currently has NO mechanisms to initiate that: no khubd * timer, no SRP, no requests through sysfs. */ -int __usb_suspend_device (struct usb_device *udev, int port1, pm_message_t state) +static int __usb_suspend_device (struct usb_device *udev, int port1, + pm_message_t state) { int status; @@ -1614,9 +1625,11 @@ struct usb_bus *bus = udev->bus; if (bus && bus->op->hub_suspend) { status = bus->op->hub_suspend (bus); - if (status == 0) + if (status == 0) { + dev_dbg(&udev->dev, "usb suspend\n"); usb_set_device_state(udev, USB_STATE_SUSPENDED); + } } else status = -EOPNOTSUPP; } else @@ -1646,7 +1659,7 @@ * * Returns 0 on success, else negative errno. */ -int usb_suspend_device(struct usb_device *udev, u32 state) +int usb_suspend_device(struct usb_device *udev, pm_message_t state) { int port1, status; @@ -1834,9 +1847,11 @@ } else status = -EOPNOTSUPP; if (status == 0) { + dev_dbg(&udev->dev, "usb resume\n"); /* TRSMRCY = 10 msec */ msleep(10); usb_set_device_state (udev, USB_STATE_CONFIGURED); + udev->dev.power.power_state = PMSG_ON; status = hub_resume (udev ->actconfig->interface[0]); } @@ -1955,13 +1970,22 @@ } intf->dev.power.power_state = PMSG_ON; + hub->resume_root_hub = 0; hub_activate(hub); return 0; } +void usb_resume_root_hub(struct usb_device *hdev) +{ + struct usb_hub *hub = hdev_to_hub(hdev); + + hub->resume_root_hub = 1; + kick_khubd(hub); +} + #else /* !CONFIG_USB_SUSPEND */ -int usb_suspend_device(struct usb_device *udev, u32 state) +int usb_suspend_device(struct usb_device *udev, pm_message_t state) { return 0; } @@ -2615,15 +2639,30 @@ (u16) hub->event_bits[0]); usb_get_intf(intf); + i = hub->resume_root_hub; spin_unlock_irq(&hub_event_lock); + /* Is this is a root hub wanting to be resumed? */ + if (i) + usb_resume_device(hdev); + /* Lock the device, then check to see if we were * disconnected while waiting for the lock to succeed. */ if (locktree(hdev) < 0) { usb_put_intf(intf); continue; } - if (hub != usb_get_intfdata(intf) || hub->quiescing) + if (hub != usb_get_intfdata(intf)) + goto loop; + + /* If the hub has died, clean up after it */ + if (hdev->state == USB_STATE_NOTATTACHED) { + hub_pre_reset(hub); + goto loop; + } + + /* If this is an inactive or suspended hub, do nothing */ + if (hub->quiescing) goto loop; if (hub->error) { @@ -2643,6 +2682,8 @@ /* deal with port status changes */ for (i = 1; i <= hub->descriptor->bNbrPorts; i++) { + if (test_bit(i, hub->busy_bits)) + continue; connect_change = test_bit(i, hub->change_bits); if (!test_and_clear_bit(i, hub->event_bits) && !connect_change && !hub->activating) @@ -2948,6 +2989,7 @@ hub_pre_reset(hub); } + set_bit(port1, parent_hub->busy_bits); for (i = 0; i < SET_CONFIG_TRIES; ++i) { /* ep0 maxpacket size may change; let the HCD know about it. @@ -2957,6 +2999,7 @@ if (ret >= 0) break; } + clear_bit(port1, parent_hub->busy_bits); if (ret < 0) goto re_enumerate; diff -Nru a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h --- a/drivers/usb/core/hub.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/core/hub.h 2005-03-30 16:58:47 -08:00 @@ -205,6 +205,7 @@ unsigned long event_bits[1]; /* status change bitmask */ unsigned long change_bits[1]; /* ports with logical connect status change */ + unsigned long busy_bits[1]; /* ports being reset */ #if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */ #error event_bits[] is too short! #endif @@ -216,6 +217,7 @@ unsigned quiescing:1; unsigned activating:1; + unsigned resume_root_hub:1; unsigned has_indicators:1; enum hub_led_mode indicator[USB_MAXCHILDREN]; diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/core/message.c 2005-03-30 16:58:47 -08:00 @@ -90,8 +90,10 @@ /*-------------------------------------------------------------------*/ // returns status (negative) or length (positive) -int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, - struct usb_ctrlrequest *cmd, void *data, int len, int timeout) +static int usb_internal_control_msg(struct usb_device *usb_dev, + unsigned int pipe, + struct usb_ctrlrequest *cmd, + void *data, int len, int timeout) { struct urb *urb; int retv; @@ -1041,8 +1043,8 @@ * * Enables all the endpoints for the interface's current altsetting. */ -void usb_enable_interface(struct usb_device *dev, - struct usb_interface *intf) +static void usb_enable_interface(struct usb_device *dev, + struct usb_interface *intf) { struct usb_host_interface *alt = intf->cur_altsetting; int i; diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/core/usb.c 2005-03-30 16:58:48 -08:00 @@ -60,7 +60,7 @@ const char *usbcore_name = "usbcore"; -int nousb; /* Disable USB when built into kernel image */ +static int nousb; /* Disable USB when built into kernel image */ /* Not honored on modular build */ static DECLARE_RWSEM(usb_all_devices_rwsem); @@ -86,7 +86,7 @@ static int usb_generic_driver_data; /* called from driver core with usb_bus_type.subsys writelock */ -int usb_probe_interface(struct device *dev) +static int usb_probe_interface(struct device *dev) { struct usb_interface * intf = to_usb_interface(dev); struct usb_driver * driver = to_usb_driver(dev->driver); @@ -114,7 +114,7 @@ } /* called from driver core with usb_bus_type.subsys writelock */ -int usb_unbind_interface(struct device *dev) +static int usb_unbind_interface(struct device *dev) { struct usb_interface *intf = to_usb_interface(dev); struct usb_driver *driver = to_usb_driver(intf->dev.driver); @@ -615,6 +615,33 @@ alt->desc.bInterfaceSubClass, alt->desc.bInterfaceProtocol)) return -ENOMEM; + + if (add_hotplug_env_var(envp, num_envp, &i, + buffer, buffer_size, &length, + "MODALIAS=usb:v%04Xp%04Xdl%04Xdh%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X", + le16_to_cpu(usb_dev->descriptor.idVendor), + le16_to_cpu(usb_dev->descriptor.idProduct), + le16_to_cpu(usb_dev->descriptor.bcdDevice), + le16_to_cpu(usb_dev->descriptor.bcdDevice), + usb_dev->descriptor.bDeviceClass, + usb_dev->descriptor.bDeviceSubClass, + usb_dev->descriptor.bDeviceProtocol, + alt->desc.bInterfaceClass, + alt->desc.bInterfaceSubClass, + alt->desc.bInterfaceProtocol)) + return -ENOMEM; + } else { + if (add_hotplug_env_var(envp, num_envp, &i, + buffer, buffer_size, &length, + "MODALIAS=usb:v%04Xp%04Xdl%04Xdh%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*", + le16_to_cpu(usb_dev->descriptor.idVendor), + le16_to_cpu(usb_dev->descriptor.idProduct), + le16_to_cpu(usb_dev->descriptor.bcdDevice), + le16_to_cpu(usb_dev->descriptor.bcdDevice), + usb_dev->descriptor.bDeviceClass, + usb_dev->descriptor.bDeviceSubClass, + usb_dev->descriptor.bDeviceProtocol)) + return -ENOMEM; } envp[i] = NULL; @@ -1148,6 +1175,7 @@ * * Reverse the effect of this call with usb_buffer_unmap(). */ +#if 0 struct urb *usb_buffer_map (struct urb *urb) { struct usb_bus *bus; @@ -1177,6 +1205,7 @@ | URB_NO_SETUP_DMA_MAP); return urb; } +#endif /* 0 */ /* XXX DISABLED, no users currently. If you wish to re-enable this * XXX please determine whether the sync is to transfer ownership of @@ -1221,6 +1250,7 @@ * * Reverses the effect of usb_buffer_map(). */ +#if 0 void usb_buffer_unmap (struct urb *urb) { struct usb_bus *bus; @@ -1247,6 +1277,7 @@ urb->transfer_flags &= ~(URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP); } +#endif /* 0 */ /** * usb_buffer_map_sg - create scatterlist DMA mapping(s) for an endpoint @@ -1527,11 +1558,11 @@ EXPORT_SYMBOL (usb_buffer_alloc); EXPORT_SYMBOL (usb_buffer_free); -EXPORT_SYMBOL (usb_buffer_map); #if 0 +EXPORT_SYMBOL (usb_buffer_map); EXPORT_SYMBOL (usb_buffer_dmasync); -#endif EXPORT_SYMBOL (usb_buffer_unmap); +#endif EXPORT_SYMBOL (usb_buffer_map_sg); #if 0 diff -Nru a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h --- a/drivers/usb/core/usb.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/core/usb.h 2005-03-30 16:58:47 -08:00 @@ -4,8 +4,6 @@ extern void usb_remove_sysfs_dev_files (struct usb_device *dev); extern void usb_create_sysfs_intf_files (struct usb_interface *intf); extern void usb_remove_sysfs_intf_files (struct usb_interface *intf); -extern int usb_probe_interface (struct device *dev); -extern int usb_unbind_interface (struct device *dev); extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr); extern void usb_disable_interface (struct usb_device *dev, @@ -13,15 +11,15 @@ extern void usb_release_interface_cache(struct kref *ref); extern void usb_disable_device (struct usb_device *dev, int skip_ep0); -extern void usb_enable_interface (struct usb_device *dev, - struct usb_interface *intf); - extern int usb_get_device_descriptor(struct usb_device *dev, unsigned int size); extern int usb_set_configuration(struct usb_device *dev, int configuration); extern void usb_lock_all_devices(void); extern void usb_unlock_all_devices(void); + +extern void usb_kick_khubd(struct usb_device *dev); +extern void usb_resume_root_hub(struct usb_device *dev); /* for labeling diagnostics */ extern const char *usbcore_name; diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig --- a/drivers/usb/gadget/Kconfig 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/gadget/Kconfig 2005-03-30 16:58:48 -08:00 @@ -135,21 +135,6 @@ depends on USB_GADGET_GOKU default USB_GADGET -# this could be built elsewhere (doesn't yet exist) -config USB_GADGET_SA1100 - boolean "SA 1100" - depends on ARCH_SA1100 - help - Intel's SA-1100 is an ARM-4 processor with an integrated - full speed USB 1.1 device controller. - - It has two fixed-function endpoints, as well as endpoint - zero (for control transfers). - -config USB_SA1100 - tristate - depends on USB_GADGET_SA1100 - default USB_GADGET config USB_GADGET_LH7A40X boolean "LH7A40X" @@ -163,34 +148,6 @@ default USB_GADGET -config USB_GADGET_DUMMY_HCD - boolean "Dummy HCD (DEVELOPMENT)" - depends on USB && EXPERIMENTAL - select USB_GADGET_DUALSPEED - help - This host controller driver emulates USB, looping all data transfer - requests back to a USB "gadget driver" in the same host. The host - side is the master; the gadget side is the slave. Gadget drivers - can be high, full, or low speed; and they have access to endpoints - like those from NET2280, PXA2xx, or SA1100 hardware. - - This may help in some stages of creating a driver to embed in a - Linux device, since it lets you debug several parts of the gadget - driver without its hardware or drivers being involved. - - Since such a gadget side driver needs to interoperate with a host - side Linux-USB device driver, this may help to debug both sides - of a USB protocol stack. - - Say "y" to link the driver statically, or "m" to build a - dynamically linked module called "dummy_hcd" and force all - gadget drivers to also be dynamically linked. - -config USB_DUMMY_HCD - tristate - depends on USB_GADGET_DUMMY_HCD - default USB_GADGET - config USB_GADGET_OMAP boolean "OMAP USB Device Controller" depends on ARCH_OMAP @@ -222,6 +179,38 @@ Select this only if your OMAP board has a Mini-AB connector. + +config USB_GADGET_DUMMY_HCD + boolean "Dummy HCD (DEVELOPMENT)" + depends on USB && EXPERIMENTAL + select USB_GADGET_DUALSPEED + help + This host controller driver emulates USB, looping all data transfer + requests back to a USB "gadget driver" in the same host. The host + side is the master; the gadget side is the slave. Gadget drivers + can be high, full, or low speed; and they have access to endpoints + like those from NET2280, PXA2xx, or SA1100 hardware. + + This may help in some stages of creating a driver to embed in a + Linux device, since it lets you debug several parts of the gadget + driver without its hardware or drivers being involved. + + Since such a gadget side driver needs to interoperate with a host + side Linux-USB device driver, this may help to debug both sides + of a USB protocol stack. + + Say "y" to link the driver statically, or "m" to build a + dynamically linked module called "dummy_hcd" and force all + gadget drivers to also be dynamically linked. + +config USB_DUMMY_HCD + tristate + depends on USB_GADGET_DUMMY_HCD + default USB_GADGET + +# NOTE: Please keep dummy_hcd LAST so that "real hardware" appears +# first and will be selected by default. + endchoice config USB_GADGET_DUALSPEED @@ -355,8 +344,6 @@ config USB_FILE_STORAGE tristate "File-backed Storage Gadget" - # we don't support the SA1100 because of its limitations - depends on USB_GADGET_SA1100 = n help The File-backed Storage Gadget acts as a USB Mass Storage disk drive. As its storage repository it can use a regular diff -Nru a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c --- a/drivers/usb/gadget/config.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/gadget/config.c 2005-03-30 16:58:47 -08:00 @@ -25,6 +25,7 @@ #include #include +#include /** diff -Nru a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c --- a/drivers/usb/gadget/dummy_hcd.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/gadget/dummy_hcd.c 2005-03-30 16:58:47 -08:00 @@ -1647,11 +1647,11 @@ return -ENOMEM; /* root hub enters addressed state... */ - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; root->speed = USB_SPEED_HIGH; /* ...then configured, so khubd sees us. */ - if ((retval = hcd_register_root (root, hcd)) != 0) { + if ((retval = usb_hcd_register_root_hub (root, hcd)) != 0) { goto err1; } @@ -1669,7 +1669,7 @@ usb_disconnect (&hcd->self.root_hub); err1: usb_put_dev (root); - hcd->state = USB_STATE_QUIESCING; + hcd->state = HC_STATE_QUIESCING; return retval; } diff -Nru a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c --- a/drivers/usb/gadget/ether.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/gadget/ether.c 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,7 @@ /* * ether.c -- Ethernet gadget driver, with CDC and non-CDC options * - * Copyright (C) 2003-2004 David Brownell + * Copyright (C) 2003-2005 David Brownell * Copyright (C) 2003-2004 Robert Schwebel, Benedikt Spranger * * This program is free software; you can redistribute it and/or modify @@ -98,12 +98,18 @@ #define rndis_exit() do{}while(0) #endif +/* CDC and RNDIS support the same host-chosen outgoing packet filters. */ +#define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ + |USB_CDC_PACKET_TYPE_DIRECTED) + + /*-------------------------------------------------------------------------*/ struct eth_dev { spinlock_t lock; struct usb_gadget *gadget; struct usb_request *req; /* for control responses */ + struct usb_request *stat_req; /* for cdc & rndis status */ u8 config; struct usb_ep *in_ep, *out_ep, *status_ep; @@ -199,7 +205,7 @@ /* initial value, changed by "ifconfig usb0 hw ether xx:xx:xx:xx:xx:xx" */ static char *__initdata dev_addr; module_param(dev_addr, charp, S_IRUGO); -MODULE_PARM_DESC(iProduct, "Device Ethernet Address"); +MODULE_PARM_DESC(dev_addr, "Device Ethernet Address"); /* this address is invisible to ifconfig */ static char *__initdata host_addr; @@ -243,6 +249,10 @@ #define DEV_CONFIG_CDC #endif +#ifdef CONFIG_USB_GADGET_AT91 +#define DEV_CONFIG_CDC +#endif + /* For CDC-incapable hardware, choose the simple cdc subset. * Anything that talks bulk (without notable bugs) can do this. @@ -266,8 +276,39 @@ /*-------------------------------------------------------------------------*/ +/* "main" config is either CDC, or its simple subset */ +static inline int is_cdc(struct eth_dev *dev) +{ +#if !defined(DEV_CONFIG_SUBSET) + return 1; /* only cdc possible */ +#elif !defined (DEV_CONFIG_CDC) + return 0; /* only subset possible */ +#else + return dev->cdc; /* depends on what hardware we found */ +#endif +} + +/* "secondary" RNDIS config may sometimes be activated */ +static inline int rndis_active(struct eth_dev *dev) +{ +#ifdef CONFIG_USB_ETH_RNDIS + return dev->rndis; +#else + return 0; +#endif +} + +#define subset_active(dev) (!is_cdc(dev) && !rndis_active(dev)) +#define cdc_active(dev) ( is_cdc(dev) && !rndis_active(dev)) + + + #define DEFAULT_QLEN 2 /* double buffering by default */ +/* peak bulk transfer bits-per-second */ +#define HS_BPS (13 * 512 * 8 * 1000 * 8) +#define FS_BPS (19 * 64 * 1 * 1000 * 8) + #ifdef CONFIG_USB_GADGET_DUALSPEED static unsigned qmult = 5; @@ -281,12 +322,12 @@ /* also defer IRQs on highspeed TX */ #define TX_DELAY qmult -#define BITRATE(g) ((g->speed == USB_SPEED_HIGH) ? 4800000 : 120000) +#define BITRATE(g) (((g)->speed == USB_SPEED_HIGH) ? HS_BPS : FS_BPS) #else /* full speed (low speed doesn't do bulk) */ #define qlen(gadget) DEFAULT_QLEN -#define BITRATE(g) (12000) +#define BITRATE(g) FS_BPS #endif @@ -519,9 +560,8 @@ #if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS) /* include the status endpoint if we can, even where it's optional. - * use small wMaxPacketSize, since many "interrupt" endpoints have - * very small fifos and it's no big deal if CDC_NOTIFY_SPEED_CHANGE - * takes two packets. also default to a big transfer interval, to + * use wMaxPacketSize big enough to fit CDC_NOTIFY_SPEED_CHANGE in one + * packet, to simplify cancelation; and a big transfer interval, to * waste less bandwidth. * * some drivers (like Linux 2.4 cdc-ether!) "need" it to exist even @@ -534,7 +574,7 @@ */ #define LOG2_STATUS_INTERVAL_MSEC 5 /* 1 << 5 == 32 msec */ -#define STATUS_BYTECOUNT 8 /* 8 byte header + data */ +#define STATUS_BYTECOUNT 16 /* 8 byte header + data */ static struct usb_endpoint_descriptor fs_status_desc = { @@ -916,14 +956,12 @@ if (strcmp (ep->name, EP_IN_NAME) == 0) { d = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc); ep->driver_data = dev; - dev->in_ep = ep; dev->in = d; /* one endpoint just reads OUT packets */ } else if (strcmp (ep->name, EP_OUT_NAME) == 0) { d = ep_desc (dev->gadget, &hs_sink_desc, &fs_sink_desc); ep->driver_data = dev; - dev->out_ep = ep; dev->out = d; /* optional status/notification endpoint */ @@ -937,7 +975,6 @@ return result; ep->driver_data = dev; - dev->status_ep = ep; dev->status = d; } return 0; @@ -964,7 +1001,6 @@ return result; ep->driver_data = dev; - dev->in_ep = ep; dev->in = d; /* one endpoint just reads OUT packets */ @@ -975,7 +1011,6 @@ return result; ep->driver_data = dev; - dev->out_ep = ep; dev->out = d; } @@ -1006,7 +1041,6 @@ result = usb_ep_enable (ep, d); if (result == 0) { ep->driver_data = dev; - dev->status_ep = ep; dev->status = d; continue; } @@ -1034,22 +1068,19 @@ /* on error, disable any endpoints */ if (result < 0) { #if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS) - if (dev->status_ep) + if (dev->status) (void) usb_ep_disable (dev->status_ep); #endif - dev->status_ep = NULL; dev->status = NULL; #if defined(DEV_CONFIG_SUBSET) || defined(CONFIG_USB_ETH_RNDIS) if (dev->rndis || !dev->cdc) { - if (dev->in_ep) + if (dev->in) (void) usb_ep_disable (dev->in_ep); - if (dev->out_ep) + if (dev->out) (void) usb_ep_disable (dev->out_ep); } #endif - dev->in_ep = NULL; dev->in = NULL; - dev->out_ep = NULL; dev->out = NULL; } else @@ -1089,7 +1120,7 @@ /* disable endpoints, forcing (synchronous) completion of * pending i/o. then free the requests. */ - if (dev->in_ep) { + if (dev->in) { usb_ep_disable (dev->in_ep); while (likely (!list_empty (&dev->tx_reqs))) { req = container_of (dev->tx_reqs.next, @@ -1097,9 +1128,8 @@ list_del (&req->list); usb_ep_free_request (dev->in_ep, req); } - dev->in_ep = NULL; } - if (dev->out_ep) { + if (dev->out) { usb_ep_disable (dev->out_ep); while (likely (!list_empty (&dev->rx_reqs))) { req = container_of (dev->rx_reqs.next, @@ -1107,12 +1137,10 @@ list_del (&req->list); usb_ep_free_request (dev->out_ep, req); } - dev->out_ep = NULL; } - if (dev->status_ep) { + if (dev->status) { usb_ep_disable (dev->status_ep); - dev->status_ep = NULL; } dev->config = 0; } @@ -1213,28 +1241,22 @@ event->wLength = __constant_cpu_to_le16 (8); /* SPEED_CHANGE data is up/down speeds in bits/sec */ - data [0] = data [1] = cpu_to_le32( - (dev->gadget->speed == USB_SPEED_HIGH) - ? (13 * 512 * 8 * 1000 * 8) - : (19 * 64 * 1 * 1000 * 8)); + data [0] = data [1] = cpu_to_le32 (BITRATE (dev->gadget)); - req->length = 16; + req->length = STATUS_BYTECOUNT; value = usb_ep_queue (ep, req, GFP_ATOMIC); DEBUG (dev, "send SPEED_CHANGE --> %d\n", value); if (value == 0) return; - } else + } else if (value != -ECONNRESET) DEBUG (dev, "event %02x --> %d\n", event->bNotificationType, value); - - /* free when done */ - usb_ep_free_buffer (ep, req->buf, req->dma, 16); - usb_ep_free_request (ep, req); + event->bmRequestType = 0xff; } static void issue_start_status (struct eth_dev *dev) { - struct usb_request *req; + struct usb_request *req = dev->stat_req; struct usb_cdc_notification *event; int value; @@ -1250,21 +1272,6 @@ usb_ep_disable (dev->status_ep); usb_ep_enable (dev->status_ep, dev->status); - /* FIXME make these allocations static like dev->req */ - req = usb_ep_alloc_request (dev->status_ep, GFP_ATOMIC); - if (req == 0) { - DEBUG (dev, "status ENOMEM\n"); - return; - } - req->buf = usb_ep_alloc_buffer (dev->status_ep, 16, - &dev->req->dma, GFP_ATOMIC); - if (req->buf == 0) { - DEBUG (dev, "status buf ENOMEM\n"); -free_req: - usb_ep_free_request (dev->status_ep, req); - return; - } - /* 3.8.1 says to issue first NETWORK_CONNECTION, then * a SPEED_CHANGE. could be useful in some configs. */ @@ -1275,15 +1282,11 @@ event->wIndex = __constant_cpu_to_le16 (1); event->wLength = 0; - req->length = 8; + req->length = sizeof *event; req->complete = eth_status_complete; value = usb_ep_queue (dev->status_ep, req, GFP_ATOMIC); - if (value < 0) { + if (value < 0) DEBUG (dev, "status buf queue --> %d\n", value); - usb_ep_free_buffer (dev->status_ep, - req->buf, dev->req->dma, 16); - goto free_req; - } } #endif @@ -1431,7 +1434,7 @@ case 0: /* control/master intf */ if (wValue != 0) break; - if (dev->status_ep) { + if (dev->status) { usb_ep_disable (dev->status_ep); usb_ep_enable (dev->status_ep, dev->status); } @@ -1450,8 +1453,9 @@ if (wValue == 1) { usb_ep_enable (dev->in_ep, dev->in); usb_ep_enable (dev->out_ep, dev->out); + dev->cdc_filter = DEFAULT_FILTER; netif_carrier_on (dev->net); - if (dev->status_ep) + if (dev->status) issue_start_status (dev); if (netif_running (dev->net)) { spin_unlock (&dev->lock); @@ -1502,14 +1506,18 @@ || wLength != 0 || wIndex > 1) break; - DEBUG (dev, "NOP packet filter %04x\n", wValue); - /* NOTE: table 62 has 5 filter bits to reduce traffic, - * and we "must" support multicast and promiscuous. - * this NOP implements a bad filter (always promisc) - */ + DEBUG (dev, "packet filter %02x\n", wValue); dev->cdc_filter = wValue; value = 0; break; + + /* and potentially: + * case USB_CDC_SET_ETHERNET_MULTICAST_FILTERS: + * case USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER: + * case USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER: + * case USB_CDC_GET_ETHERNET_STATISTIC: + */ + #endif /* DEV_CONFIG_CDC */ #ifdef CONFIG_USB_ETH_RNDIS @@ -1904,6 +1912,14 @@ netif_wake_queue (dev->net); } +static inline int eth_is_promisc (struct eth_dev *dev) +{ + /* no filters for the CDC subset; always promisc */ + if (subset_active (dev)) + return 1; + return dev->cdc_filter & USB_CDC_PACKET_TYPE_PROMISCUOUS; +} + static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) { struct eth_dev *dev = netdev_priv(net); @@ -1912,10 +1928,27 @@ struct usb_request *req = NULL; unsigned long flags; - /* FIXME check dev->cdc_filter to decide whether to send this, - * instead of acting as if USB_CDC_PACKET_TYPE_PROMISCUOUS were - * always set. RNDIS has the same kind of outgoing filter. - */ + /* apply outgoing CDC or RNDIS filters */ + if (!eth_is_promisc (dev)) { + u8 *dest = skb->data; + + if (dest [0] & 0x01) { + u16 type; + + /* ignores USB_CDC_PACKET_TYPE_MULTICAST and host + * SET_ETHERNET_MULTICAST_FILTERS requests + */ + if (memcmp (dest, net->broadcast, ETH_ALEN) == 0) + type = USB_CDC_PACKET_TYPE_BROADCAST; + else + type = USB_CDC_PACKET_TYPE_ALL_MULTICAST; + if (!(dev->cdc_filter & type)) { + dev_kfree_skb_any (skb); + return 0; + } + } + /* ignores USB_CDC_PACKET_TYPE_DIRECTED */ + } spin_lock_irqsave (&dev->lock, flags); req = container_of (dev->tx_reqs.next, struct usb_request, list); @@ -2137,6 +2170,30 @@ /*-------------------------------------------------------------------------*/ +static struct usb_request *eth_req_alloc (struct usb_ep *ep, unsigned size) +{ + struct usb_request *req; + + req = usb_ep_alloc_request (ep, GFP_KERNEL); + if (!req) + return NULL; + + req->buf = kmalloc (size, GFP_KERNEL); + if (!req->buf) { + usb_ep_free_request (ep, req); + req = NULL; + } + return req; +} + +static void +eth_req_free (struct usb_ep *ep, struct usb_request *req) +{ + kfree (req->buf); + usb_ep_free_request (ep, req); +} + + static void eth_unbind (struct usb_gadget *gadget) { @@ -2150,12 +2207,13 @@ /* we've already been disconnected ... no i/o is active */ if (dev->req) { - usb_ep_free_buffer (gadget->ep0, - dev->req->buf, dev->req->dma, - USB_BUFSIZ); - usb_ep_free_request (gadget->ep0, dev->req); + eth_req_free (gadget->ep0, dev->req); dev->req = NULL; } + if (dev->stat_req) { + eth_req_free (dev->status_ep, dev->stat_req); + dev->stat_req = NULL; + } unregister_netdev (dev->net); free_netdev(dev->net); @@ -2201,7 +2259,7 @@ struct eth_dev *dev; struct net_device *net; u8 cdc = 1, zlp = 1, rndis = 1; - struct usb_ep *ep; + struct usb_ep *in_ep, *out_ep, *status_ep = NULL; int status = -ENOMEM; /* these flags are only ever cleared; compiler take note */ @@ -2251,6 +2309,8 @@ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211); } else if (gadget_is_s3c2410(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212); + } else if (gadget_is_at91(gadget)) { + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213); } else { /* can't assume CDC works. don't want to default to * anything less functional on CDC-capable hardware, @@ -2308,32 +2368,32 @@ /* all we really need is bulk IN/OUT */ usb_ep_autoconfig_reset (gadget); - ep = usb_ep_autoconfig (gadget, &fs_source_desc); - if (!ep) { + in_ep = usb_ep_autoconfig (gadget, &fs_source_desc); + if (!in_ep) { autoconf_fail: dev_err (&gadget->dev, "can't autoconfigure on %s\n", gadget->name); return -ENODEV; } - EP_IN_NAME = ep->name; - ep->driver_data = ep; /* claim */ + EP_IN_NAME = in_ep->name; + in_ep->driver_data = in_ep; /* claim */ - ep = usb_ep_autoconfig (gadget, &fs_sink_desc); - if (!ep) + out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc); + if (!out_ep) goto autoconf_fail; - EP_OUT_NAME = ep->name; - ep->driver_data = ep; /* claim */ + EP_OUT_NAME = out_ep->name; + out_ep->driver_data = out_ep; /* claim */ #if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS) /* CDC Ethernet control interface doesn't require a status endpoint. * Since some hosts expect one, try to allocate one anyway. */ if (cdc || rndis) { - ep = usb_ep_autoconfig (gadget, &fs_status_desc); - if (ep) { - EP_STATUS_NAME = ep->name; - ep->driver_data = ep; /* claim */ + status_ep = usb_ep_autoconfig (gadget, &fs_status_desc); + if (status_ep) { + EP_STATUS_NAME = status_ep->name; + status_ep->driver_data = status_ep; /* claim */ } else if (rndis) { dev_err (&gadget->dev, "can't run RNDIS on %s\n", @@ -2409,6 +2469,10 @@ dev->cdc = cdc; dev->zlp = zlp; + dev->in_ep = in_ep; + dev->out_ep = out_ep; + dev->status_ep = status_ep; + /* Module params for these addresses should come from ID proms. * The host side address is used with CDC and RNDIS, and commonly * ends up in a persistent config database. @@ -2442,16 +2506,20 @@ // set_multicast_list SET_ETHTOOL_OPS(net, &ops); - /* preallocate control response and buffer */ - dev->req = usb_ep_alloc_request (gadget->ep0, GFP_KERNEL); + /* preallocate control message data and buffer */ + dev->req = eth_req_alloc (gadget->ep0, USB_BUFSIZ); if (!dev->req) goto fail; dev->req->complete = eth_setup_complete; - dev->req->buf = usb_ep_alloc_buffer (gadget->ep0, USB_BUFSIZ, - &dev->req->dma, GFP_KERNEL); - if (!dev->req->buf) { - usb_ep_free_request (gadget->ep0, dev->req); - goto fail; + + /* ... and maybe likewise for status transfer */ + if (dev->status_ep) { + dev->stat_req = eth_req_alloc (dev->status_ep, + STATUS_BYTECOUNT); + if (!dev->stat_req) { + eth_req_free (gadget->ep0, dev->req); + goto fail; + } } /* finish hookup to lower layer ... */ diff -Nru a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c --- a/drivers/usb/gadget/file_storage.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/gadget/file_storage.c 2005-03-30 16:58:51 -08:00 @@ -1,7 +1,7 @@ /* * file_storage.c -- File-backed USB Storage Gadget, for USB development * - * Copyright (C) 2003, 2004 Alan Stern + * Copyright (C) 2003-2005 Alan Stern * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -832,6 +832,8 @@ #define STRING_MANUFACTURER 1 #define STRING_PRODUCT 2 #define STRING_SERIAL 3 +#define STRING_CONFIG 4 +#define STRING_INTERFACE 5 /* There is only one configuration. */ #define CONFIG_VALUE 1 @@ -863,6 +865,7 @@ /* wTotalLength computed by usb_gadget_config_buf() */ .bNumInterfaces = 1, .bConfigurationValue = CONFIG_VALUE, + .iConfiguration = STRING_CONFIG, .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, .bMaxPower = 1, // self-powered }; @@ -886,6 +889,7 @@ .bInterfaceClass = USB_CLASS_MASS_STORAGE, .bInterfaceSubClass = USB_SC_SCSI, // Adjusted during fsg_bind() .bInterfaceProtocol = USB_PR_BULK, // Adjusted during fsg_bind() + .iInterface = STRING_INTERFACE, }; /* Three full-speed endpoint descriptors: bulk-in, bulk-out, @@ -1009,7 +1013,7 @@ /* The CBI specification limits the serial string to 12 uppercase hexadecimal * characters. */ -static char manufacturer[50]; +static char manufacturer[64]; static char serial[13]; /* Static strings, in UTF-8 (for simplicity we use only ASCII characters) */ @@ -1017,6 +1021,8 @@ {STRING_MANUFACTURER, manufacturer}, {STRING_PRODUCT, longname}, {STRING_SERIAL, serial}, + {STRING_CONFIG, "Self-powered"}, + {STRING_INTERFACE, "Mass Storage"}, {} }; @@ -1270,6 +1276,8 @@ { struct usb_request *req = fsg->ep0req; int value = -EOPNOTSUPP; + u16 w_index = ctrl->wIndex; + u16 w_length = ctrl->wLength; if (!fsg->config) return value; @@ -1282,7 +1290,7 @@ if (ctrl->bRequestType != (USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE)) break; - if (ctrl->wIndex != 0) { + if (w_index != 0) { value = -EDOM; break; } @@ -1298,13 +1306,13 @@ if (ctrl->bRequestType != (USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE)) break; - if (ctrl->wIndex != 0) { + if (w_index != 0) { value = -EDOM; break; } VDBG(fsg, "get max LUN\n"); *(u8 *) req->buf = fsg->nluns - 1; - value = min(ctrl->wLength, (u16) 1); + value = min(w_length, (u16) 1); break; } } @@ -1317,15 +1325,15 @@ if (ctrl->bRequestType != (USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE)) break; - if (ctrl->wIndex != 0) { + if (w_index != 0) { value = -EDOM; break; } - if (ctrl->wLength > MAX_COMMAND_SIZE) { + if (w_length > MAX_COMMAND_SIZE) { value = -EOVERFLOW; break; } - value = ctrl->wLength; + value = w_length; fsg->ep0req->context = received_cbi_adsc; break; } @@ -1336,7 +1344,7 @@ "unknown class-specific control req " "%02x.%02x v%04x i%04x l%u\n", ctrl->bRequestType, ctrl->bRequest, - ctrl->wValue, ctrl->wIndex, ctrl->wLength); + ctrl->wValue, w_index, w_length); return value; } @@ -1350,6 +1358,9 @@ { struct usb_request *req = fsg->ep0req; int value = -EOPNOTSUPP; + u16 w_index = ctrl->wIndex; + u16 w_value = ctrl->wValue; + u16 w_length = ctrl->wLength; /* Usually this just stores reply data in the pre-allocated ep0 buffer, * but config change events will also reconfigure hardware. */ @@ -1359,11 +1370,11 @@ if (ctrl->bRequestType != (USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE)) break; - switch (ctrl->wValue >> 8) { + switch (w_value >> 8) { case USB_DT_DEVICE: VDBG(fsg, "get device descriptor\n"); - value = min(ctrl->wLength, (u16) sizeof device_desc); + value = min(w_length, (u16) sizeof device_desc); memcpy(req->buf, &device_desc, value); break; #ifdef CONFIG_USB_GADGET_DUALSPEED @@ -1371,7 +1382,7 @@ VDBG(fsg, "get device qualifier\n"); if (!fsg->gadget->is_dualspeed) break; - value = min(ctrl->wLength, (u16) sizeof dev_qualifier); + value = min(w_length, (u16) sizeof dev_qualifier); memcpy(req->buf, &dev_qualifier, value); break; @@ -1388,10 +1399,10 @@ #endif value = populate_config_buf(fsg->gadget, req->buf, - ctrl->wValue >> 8, - ctrl->wValue & 0xff); + w_value >> 8, + w_value & 0xff); if (value >= 0) - value = min(ctrl->wLength, (u16) value); + value = min(w_length, (u16) value); break; case USB_DT_STRING: @@ -1399,9 +1410,9 @@ /* wIndex == language code */ value = usb_gadget_get_string(&stringtab, - ctrl->wValue & 0xff, req->buf); + w_value & 0xff, req->buf); if (value >= 0) - value = min(ctrl->wLength, (u16) value); + value = min(w_length, (u16) value); break; } break; @@ -1412,8 +1423,8 @@ USB_RECIP_DEVICE)) break; VDBG(fsg, "set configuration\n"); - if (ctrl->wValue == CONFIG_VALUE || ctrl->wValue == 0) { - fsg->new_config = ctrl->wValue; + if (w_value == CONFIG_VALUE || w_value == 0) { + fsg->new_config = w_value; /* Raise an exception to wipe out previous transaction * state (queued bufs, etc) and set the new config. */ @@ -1427,14 +1438,14 @@ break; VDBG(fsg, "get configuration\n"); *(u8 *) req->buf = fsg->config; - value = min(ctrl->wLength, (u16) 1); + value = min(w_length, (u16) 1); break; case USB_REQ_SET_INTERFACE: if (ctrl->bRequestType != (USB_DIR_OUT| USB_TYPE_STANDARD | USB_RECIP_INTERFACE)) break; - if (fsg->config && ctrl->wIndex == 0) { + if (fsg->config && w_index == 0) { /* Raise an exception to wipe out previous transaction * state (queued bufs, etc) and install the new @@ -1449,20 +1460,20 @@ break; if (!fsg->config) break; - if (ctrl->wIndex != 0) { + if (w_index != 0) { value = -EDOM; break; } VDBG(fsg, "get interface\n"); *(u8 *) req->buf = 0; - value = min(ctrl->wLength, (u16) 1); + value = min(w_length, (u16) 1); break; default: VDBG(fsg, "unknown control req %02x.%02x v%04x i%04x l%u\n", ctrl->bRequestType, ctrl->bRequest, - ctrl->wValue, ctrl->wIndex, ctrl->wLength); + w_value, w_index, w_length); } return value; @@ -3740,6 +3751,10 @@ mod_data.release = 0x0310; else if (gadget_is_pxa27x(fsg->gadget)) mod_data.release = 0x0311; + else if (gadget_is_s3c2410(gadget)) + mod_data.release = 0x0312; + else if (gadget_is_at91(fsg->gadget)) + mod_data.release = 0x0313; else { WARN(fsg, "controller '%s' not recognized\n", fsg->gadget->name); diff -Nru a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h --- a/drivers/usb/gadget/gadget_chips.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/gadget/gadget_chips.h 2005-03-30 16:58:47 -08:00 @@ -80,7 +80,12 @@ #define gadget_is_s3c2410(g) 0 #endif -// CONFIG_USB_GADGET_AT91RM9200 +#ifdef CONFIG_USB_GADGET_AT91 +#define gadget_is_at91(g) !strcmp("at91_udc", (g)->name) +#else +#define gadget_is_at91(g) 0 +#endif + // CONFIG_USB_GADGET_SX2 // CONFIG_USB_GADGET_AU1X00 // ... diff -Nru a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c --- a/drivers/usb/gadget/inode.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/gadget/inode.c 2005-03-30 16:58:49 -08:00 @@ -1318,6 +1318,8 @@ struct usb_request *req = dev->req; int value = -EOPNOTSUPP; struct usb_gadgetfs_event *event; + u16 w_value = ctrl->wValue; + u16 w_length = ctrl->wLength; spin_lock (&dev->lock); dev->setup_abort = 0; @@ -1378,17 +1380,17 @@ case USB_REQ_GET_DESCRIPTOR: if (ctrl->bRequestType != USB_DIR_IN) goto unrecognized; - switch (ctrl->wValue >> 8) { + switch (w_value >> 8) { case USB_DT_DEVICE: - value = min (ctrl->wLength, (u16) sizeof *dev->dev); + value = min (w_length, (u16) sizeof *dev->dev); req->buf = dev->dev; break; #ifdef HIGHSPEED case USB_DT_DEVICE_QUALIFIER: if (!dev->hs_config) break; - value = min (ctrl->wLength, (u16) + value = min (w_length, (u16) sizeof (struct usb_qualifier_descriptor)); make_qualifier (dev); break; @@ -1397,10 +1399,10 @@ #endif case USB_DT_CONFIG: value = config_buf (dev, - ctrl->wValue >> 8, - ctrl->wValue & 0xff); + w_value >> 8, + w_value & 0xff); if (value >= 0) - value = min (ctrl->wLength, (u16) value); + value = min (w_length, (u16) value); break; case USB_DT_STRING: goto unrecognized; @@ -1414,7 +1416,7 @@ case USB_REQ_SET_CONFIGURATION: if (ctrl->bRequestType != 0) break; - if (0 == (u8) ctrl->wValue) { + if (0 == (u8) w_value) { value = 0; dev->current_config = 0; usb_gadget_vbus_draw(gadget, 8 /* mA */ ); @@ -1432,7 +1434,7 @@ power = dev->config->bMaxPower; } - if (config == (u8) ctrl->wValue) { + if (config == (u8) w_value) { value = 0; dev->current_config = config; usb_gadget_vbus_draw(gadget, 2 * power); @@ -1463,7 +1465,7 @@ if (ctrl->bRequestType != 0x80) break; *(u8 *)req->buf = dev->current_config; - value = min (ctrl->wLength, (u16) 1); + value = min (w_length, (u16) 1); break; #endif @@ -1472,7 +1474,7 @@ VDEBUG (dev, "%s req%02x.%02x v%04x i%04x l%d\n", dev->usermode_setup ? "delegate" : "fail", ctrl->bRequestType, ctrl->bRequest, - ctrl->wValue, ctrl->wIndex, ctrl->wLength); + w_value, le16_to_cpu(ctrl->wIndex), w_length); /* if there's an ep0 reader, don't stall */ if (dev->usermode_setup) { @@ -1485,9 +1487,9 @@ value = 0; /* read DATA stage for OUT right away */ - if (unlikely (!dev->setup_in && ctrl->wLength)) { + if (unlikely (!dev->setup_in && w_length)) { value = setup_req (gadget->ep0, dev->req, - ctrl->wLength); + w_length); if (value < 0) break; value = usb_ep_queue (gadget->ep0, dev->req, @@ -1513,8 +1515,7 @@ /* proceed with data transfer and status phases? */ if (value >= 0 && dev->state != STATE_SETUP) { req->length = value; - req->zero = value < ctrl->wLength - && (value % gadget->ep0->maxpacket) == 0; + req->zero = value < w_length; value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC); if (value < 0) { DBG (dev, "ep_queue --> %d\n", value); diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c --- a/drivers/usb/gadget/net2280.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/gadget/net2280.c 2005-03-30 16:58:47 -08:00 @@ -1270,7 +1270,7 @@ } spin_unlock_irqrestore (&ep->dev->lock, flags); - return req ? 0 : -EOPNOTSUPP; + return 0; } /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c --- a/drivers/usb/gadget/pxa2xx_udc.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/gadget/pxa2xx_udc.c 2005-03-30 16:58:49 -08:00 @@ -310,7 +310,7 @@ /* flush fifo (mostly for IN buffers) */ pxa2xx_ep_fifo_flush (_ep); - ep->desc = 0; + ep->desc = NULL; ep->stopped = 1; DBG(DBG_VERBOSE, "%s disabled\n", _ep->name); @@ -334,7 +334,7 @@ req = kmalloc (sizeof *req, gfp_flags); if (!req) - return 0; + return NULL; memset (req, 0, sizeof *req); INIT_LIST_HEAD (&req->queue); @@ -369,7 +369,11 @@ retval = kmalloc (bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM)); if (retval) +#ifdef USE_DMA *dma = virt_to_bus (retval); +#else + *dma = (dma_addr_t)~0; +#endif return retval; } @@ -411,7 +415,6 @@ static inline void ep0_idle (struct pxa2xx_udc *dev) { dev->ep0state = EP0_IDLE; - LED_EP0_OFF; } static int @@ -930,7 +933,7 @@ case EP0_IN_DATA_PHASE: dev->stats.write.ops++; if (write_ep0_fifo(ep, req)) - req = 0; + req = NULL; break; case EP0_OUT_DATA_PHASE: @@ -940,7 +943,8 @@ DBG(DBG_VERBOSE, "ep0 config ack%s\n", dev->has_cfr ? "" : " raced"); if (dev->has_cfr) - UDCCFR = UDCCFR_AREN|UDCCFR_ACM; + UDCCFR = UDCCFR_AREN|UDCCFR_ACM + |UDCCFR_MB1; done(ep, req, 0); dev->ep0state = EP0_END_XFER; local_irq_restore (flags); @@ -952,7 +956,7 @@ && read_ep0_fifo(ep, req))) { ep0_idle(dev); done(ep, req, 0); - req = 0; + req = NULL; } break; @@ -970,10 +974,10 @@ } else if ((ep->bEndpointAddress & USB_DIR_IN) != 0 && (*ep->reg_udccs & UDCCS_BI_TFS) != 0 && write_fifo(ep, req)) { - req = 0; + req = NULL; } else if ((*ep->reg_udccs & UDCCS_BO_RFS) != 0 && read_fifo(ep, req)) { - req = 0; + req = NULL; } if (likely (req && ep->desc) && ep->dma < 0) @@ -1094,7 +1098,6 @@ start_watchdog(ep->dev); ep->dev->req_pending = 0; ep->dev->ep0state = EP0_STALL; - LED_EP0_OFF; /* and bulk/intr endpoints like dropping stalls too */ } else { @@ -1194,13 +1197,71 @@ return 0; } +static void stop_activity(struct pxa2xx_udc *, struct usb_gadget_driver *); +static void udc_enable (struct pxa2xx_udc *); +static void udc_disable(struct pxa2xx_udc *); + +/* We disable the UDC -- and its 48 MHz clock -- whenever it's not + * in active use. + */ +static int pullup(struct pxa2xx_udc *udc, int is_active) +{ + is_active = is_active && udc->vbus && udc->pullup; + DMSG("%s\n", is_active ? "active" : "inactive"); + if (is_active) + udc_enable(udc); + else { + if (udc->gadget.speed != USB_SPEED_UNKNOWN) { + DMSG("disconnect %s\n", udc->driver + ? udc->driver->driver.name + : "(no driver)"); + stop_activity(udc, udc->driver); + } + udc_disable(udc); + } + return 0; +} + +/* VBUS reporting logically comes from a transceiver */ +static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active) +{ + struct pxa2xx_udc *udc; + + udc = container_of(_gadget, struct pxa2xx_udc, gadget); + udc->vbus = is_active = (is_active != 0); + DMSG("vbus %s\n", is_active ? "supplied" : "inactive"); + pullup(udc, is_active); + return 0; +} + +/* drivers may have software control over D+ pullup */ +static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active) +{ + struct pxa2xx_udc *udc; + + udc = container_of(_gadget, struct pxa2xx_udc, gadget); + + /* not all boards support pullup control */ + if (!udc->mach->udc_command) + return -EOPNOTSUPP; + + is_active = (is_active != 0); + udc->pullup = is_active; + pullup(udc, is_active); + return 0; +} + static const struct usb_gadget_ops pxa2xx_udc_ops = { - .get_frame = pxa2xx_udc_get_frame, - .wakeup = pxa2xx_udc_wakeup, - // current versions must always be self-powered + .get_frame = pxa2xx_udc_get_frame, + .wakeup = pxa2xx_udc_wakeup, + .vbus_session = pxa2xx_udc_vbus_session, + .pullup = pxa2xx_udc_pullup, + + // .vbus_draw ... boards may consume current from VBUS, up to + // 100-500mA based on config. the 500uA suspend ceiling means + // that exclusively vbus-powered PXA designs violate USB specs. }; - /*-------------------------------------------------------------------------*/ #ifdef CONFIG_USB_GADGET_DEBUG_FILES @@ -1427,7 +1488,7 @@ if (i != 0) list_add_tail (&ep->ep.ep_list, &dev->gadget.ep_list); - ep->desc = 0; + ep->desc = NULL; ep->stopped = 0; INIT_LIST_HEAD (&ep->queue); ep->pio_irqs = ep->dma_irqs = 0; @@ -1446,6 +1507,7 @@ #ifdef CONFIG_ARCH_PXA /* Enable clock for USB device */ pxa_set_cken(CKEN11_USB, 1); + udelay(5); #endif /* try to clear these bits before we enable the udc */ @@ -1469,7 +1531,7 @@ /* pxa255 (a0+) can avoid a set_config race that could * prevent gadget drivers from configuring correctly */ - UDCCFR = UDCCFR_ACM; + UDCCFR = UDCCFR_ACM | UDCCFR_MB1; } else { /* "USB test mode" for pxa250 errata 40-42 (stepping a0, a1) * which could result in missing packets and interrupts. @@ -1498,18 +1560,13 @@ } #endif - /* caller must be able to sleep in order to cope - * with startup transients. - */ - msleep(100); - /* enable suspend/resume and reset irqs */ udc_clear_mask_UDCCR(UDCCR_SRM | UDCCR_REM); /* enable ep0 irqs */ UICR0 &= ~UICR0_IM0; - /* if hardware supports it, connect to usb and wait for host */ + /* if hardware supports it, pullup D+ and wait for reset */ let_usb_appear(); } @@ -1540,6 +1597,7 @@ /* first hook up the driver ... */ dev->driver = driver; dev->gadget.dev.driver = &driver->driver; + dev->pullup = 1; device_add (&dev->gadget.dev); retval = driver->bind(&dev->gadget); @@ -1548,18 +1606,17 @@ driver->driver.name, retval); device_del (&dev->gadget.dev); - dev->driver = 0; - dev->gadget.dev.driver = 0; + dev->driver = NULL; + dev->gadget.dev.driver = NULL; return retval; } device_create_file(dev->dev, &dev_attr_function); /* ... then enable host detection and ep0; and we're ready * for set_configuration as well as eventual disconnect. - * NOTE: this shouldn't power up until later. */ DMSG("registered gadget driver '%s'\n", driver->driver.name); - udc_enable(dev); + pullup(dev, 1); dump_state(dev); return 0; } @@ -1572,7 +1629,7 @@ /* don't disconnect drivers more than once */ if (dev->gadget.speed == USB_SPEED_UNKNOWN) - driver = 0; + driver = NULL; dev->gadget.speed = USB_SPEED_UNKNOWN; /* prevent new request submissions, kill any outstanding requests */ @@ -1603,12 +1660,12 @@ return -EINVAL; local_irq_disable(); - udc_disable(dev); + pullup(dev, 0); stop_activity(dev, driver); local_irq_enable(); driver->unbind(&dev->gadget); - dev->driver = 0; + dev->driver = NULL; device_del (&dev->gadget.dev); device_remove_file(dev->dev, &dev_attr_function); @@ -1624,61 +1681,41 @@ #ifdef CONFIG_ARCH_LUBBOCK -/* Lubbock can report connect or disconnect irqs. Likely more hardware - * could support it as a timer callback. - * - * FIXME for better power management, keep the hardware powered down - * until a host is powering the link. means scheduling work later - * in some task that can udc_enable(). +/* Lubbock has separate connect and disconnect irqs. More typical designs + * use one GPIO as the VBUS IRQ, and another to control the D+ pullup. */ -#define enable_disconnect_irq() \ - if (machine_is_lubbock()) { enable_irq(LUBBOCK_USB_DISC_IRQ); } -#define disable_disconnect_irq() \ - if (machine_is_lubbock()) { disable_irq(LUBBOCK_USB_DISC_IRQ); } - static irqreturn_t -usb_connection_irq(int irq, void *_dev, struct pt_regs *r) +lubbock_vbus_irq(int irq, void *_dev, struct pt_regs *r) { struct pxa2xx_udc *dev = _dev; + int vbus; dev->stats.irqs++; HEX_DISPLAY(dev->stats.irqs); - - if (!is_usb_connected()) { - LED_CONNECTED_OFF; - disable_disconnect_irq(); - /* report disconnect just once */ - if (dev->gadget.speed != USB_SPEED_UNKNOWN) { - DMSG("disconnect %s\n", - dev->driver ? dev->driver->driver.name : 0); - stop_activity(dev, dev->driver); - - // udc_disable (dev); - // no more udc irqs - // maybe "ACTION=disconnect /sbin/hotplug gadget". - } - } else if (dev->gadget.speed == USB_SPEED_UNKNOWN) { + switch (irq) { + case LUBBOCK_USB_IRQ: LED_CONNECTED_ON; - - DMSG("?? connect irq ??\n"); - - // if there's no driver bound, ignore; else - // udc_enable (dev); - // UDC irqs drive the rest. - // maybe "ACTION=connect /sbin/hotplug gadget". + vbus = 1; + disable_irq(LUBBOCK_USB_IRQ); + enable_irq(LUBBOCK_USB_DISC_IRQ); + break; + case LUBBOCK_USB_DISC_IRQ: + LED_CONNECTED_OFF; + vbus = 0; + disable_irq(LUBBOCK_USB_DISC_IRQ); + enable_irq(LUBBOCK_USB_IRQ); + break; + default: + return IRQ_NONE; } + + pxa2xx_udc_vbus_session(&dev->gadget, vbus); return IRQ_HANDLED; } #endif -#ifndef enable_disconnect_irq -#warning USB disconnect() is not yet reported. -#define enable_disconnect_irq() do {} while (0) -#define disable_disconnect_irq() do {} while (0) -#endif - /*-------------------------------------------------------------------------*/ @@ -1720,7 +1757,7 @@ } u; if (list_empty(&ep->queue)) - req = 0; + req = NULL; else req = list_entry(ep->queue.next, struct pxa2xx_request, queue); @@ -1764,14 +1801,11 @@ goto bad_setup; got_setup: - le16_to_cpus (&u.r.wValue); - le16_to_cpus (&u.r.wIndex); - le16_to_cpus (&u.r.wLength); - - LED_EP0_ON; DBG(DBG_VERBOSE, "SETUP %02x.%02x v%04x i%04x l%04x\n", u.r.bRequestType, u.r.bRequest, - u.r.wValue, u.r.wIndex, u.r.wLength); + le16_to_cpu(u.r.wValue), + le16_to_cpu(u.r.wIndex), + le16_to_cpu(u.r.wLength)); /* cope with automagic for some standard requests. */ dev->req_std = (u.r.bRequestType & USB_TYPE_MASK) @@ -1803,7 +1837,8 @@ * - ep reset doesn't include halt(?). */ DMSG("broken set_interface (%d/%d)\n", - u.r.wIndex, u.r.wValue); + le16_to_cpu(u.r.wIndex), + le16_to_cpu(u.r.wValue)); goto config_change; } break; @@ -1847,7 +1882,6 @@ ep0start(dev, UDCCS0_FST|UDCCS0_FTF, "stall"); start_watchdog(dev); dev->ep0state = EP0_STALL; - LED_EP0_OFF; /* deferred i/o == no response yet */ } else if (dev->req_pending) { @@ -1948,7 +1982,7 @@ req = list_entry(ep->queue.next, struct pxa2xx_request, queue); else - req = 0; + req = NULL; // TODO check FST handling @@ -2050,8 +2084,6 @@ if ((UDCCR & UDCCR_UDA) == 0) { DBG(DBG_VERBOSE, "USB reset start\n"); - if (dev->gadget.speed != USB_SPEED_UNKNOWN) - disable_disconnect_irq(); /* reset driver and endpoints, * in case that's not yet done @@ -2059,12 +2091,11 @@ stop_activity (dev, dev->driver); } else { - INFO("USB reset\n"); + DBG(DBG_VERBOSE, "USB reset end\n"); dev->gadget.speed = USB_SPEED_FULL; LED_CONNECTED_ON; memset(&dev->stats, 0, sizeof dev->stats); /* driver and endpoints are still reset */ - enable_disconnect_irq(); } } else { @@ -2478,6 +2509,8 @@ udc_disable(dev); udc_reinit(dev); + dev->vbus = is_usb_connected(); + /* irq setup after old hardware state is cleaned up */ retval = request_irq(IRQ_USB, pxa2xx_udc_irq, SA_INTERRUPT, driver_name, dev); @@ -2490,18 +2523,32 @@ #ifdef CONFIG_ARCH_LUBBOCK if (machine_is_lubbock()) { - disable_irq(LUBBOCK_USB_DISC_IRQ); retval = request_irq(LUBBOCK_USB_DISC_IRQ, - usb_connection_irq, - SA_INTERRUPT /* OOPSING | SA_SAMPLE_RANDOM */, + lubbock_vbus_irq, + SA_INTERRUPT | SA_SAMPLE_RANDOM, driver_name, dev); if (retval != 0) { - enable_irq(LUBBOCK_USB_DISC_IRQ); printk(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, LUBBOCK_USB_DISC_IRQ, retval); +lubbock_fail0: + free_irq(IRQ_USB, dev); return -EBUSY; } - dev->got_disc = 1; + retval = request_irq(LUBBOCK_USB_IRQ, + lubbock_vbus_irq, + SA_INTERRUPT | SA_SAMPLE_RANDOM, + driver_name, dev); + if (retval != 0) { + printk(KERN_ERR "%s: can't get irq %i, err %d\n", + driver_name, LUBBOCK_USB_IRQ, retval); + free_irq(LUBBOCK_USB_DISC_IRQ, dev); + goto lubbock_fail0; + } +#ifdef DEBUG + /* with U-Boot (but not BLOB), hex is off by default */ + HEX_DISPLAY(dev->stats.irqs); + LUB_DISC_BLNK_LED &= 0xff; +#endif } #endif create_proc_files(); @@ -2510,7 +2557,7 @@ } static int __exit pxa2xx_udc_remove(struct device *_dev) { - struct pxa2xx_udc *dev = _dev->driver_data; + struct pxa2xx_udc *dev = dev_get_drvdata(_dev); udc_disable(dev); remove_proc_files(); @@ -2520,26 +2567,66 @@ free_irq(IRQ_USB, dev); dev->got_irq = 0; } - if (machine_is_lubbock() && dev->got_disc) { + if (machine_is_lubbock()) { free_irq(LUBBOCK_USB_DISC_IRQ, dev); - dev->got_disc = 0; + free_irq(LUBBOCK_USB_IRQ, dev); } - dev_set_drvdata(_dev, 0); - the_controller = 0; + dev_set_drvdata(_dev, NULL); + the_controller = NULL; return 0; } /*-------------------------------------------------------------------------*/ +#ifdef CONFIG_PM + +/* USB suspend (controlled by the host) and system suspend (controlled + * by the PXA) don't necessarily work well together. If USB is active, + * the 48 MHz clock is required; so the system can't enter 33 MHz idle + * mode, or any deeper PM saving state. + * + * For now, we punt and forcibly disconnect from the USB host when PXA + * enters any suspend state. While we're disconnected, we always disable + * the 48MHz USB clock ... allowing PXA sleep and/or 33 MHz idle states. + * Boards without software pullup control shouldn't use those states. + * VBUS IRQs should probably be ignored so that the PXA device just acts + * "dead" to USB hosts until system resume. + */ +static int pxa2xx_udc_suspend(struct device *dev, u32 state, u32 level) +{ + struct pxa2xx_udc *udc = dev_get_drvdata(dev); + + if (level == SUSPEND_POWER_DOWN) { + if (!udc->mach->udc_command) + WARN("USB host won't detect disconnect!\n"); + pullup(udc, 0); + } + return 0; +} + +static int pxa2xx_udc_resume(struct device *dev, u32 level) +{ + struct pxa2xx_udc *udc = dev_get_drvdata(dev); + + if (level == RESUME_POWER_ON) + pullup(udc, 1); + return 0; +} + +#else +#define pxa2xx_udc_suspend NULL +#define pxa2xx_udc_resume NULL +#endif + +/*-------------------------------------------------------------------------*/ + static struct device_driver udc_driver = { .name = "pxa2xx-udc", .bus = &platform_bus_type, .probe = pxa2xx_udc_probe, .remove = __exit_p(pxa2xx_udc_remove), - - // FIXME power management support - // .suspend = ... disable UDC - // .resume = ... re-enable UDC + .suspend = pxa2xx_udc_suspend, + .resume = pxa2xx_udc_resume, }; static int __init udc_init(void) diff -Nru a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h --- a/drivers/usb/gadget/pxa2xx_udc.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/gadget/pxa2xx_udc.h 2005-03-30 16:58:50 -08:00 @@ -40,6 +40,9 @@ #define UDCCFR_AREN (1 << 7) /* ACK response enable (now) */ #define UDCCFR_ACM (1 << 2) /* ACK control mode (wait for AREN) */ +/* latest pxa255 errata define new "must be one" bits in UDCCFR */ +#define UDCCFR_MB1 (0xff & ~(UDCCFR_AREN|UDCCFR_ACM)) + /*-------------------------------------------------------------------------*/ struct pxa2xx_udc; @@ -120,7 +123,8 @@ enum ep0_state ep0state; struct udc_stats stats; unsigned got_irq : 1, - got_disc : 1, + vbus : 1, + pullup : 1, has_cfr : 1, req_pending : 1, req_std : 1, @@ -143,14 +147,7 @@ #ifdef DEBUG #define HEX_DISPLAY(n) if (machine_is_lubbock()) { LUB_HEXLED = (n); } - -#define LED_CONNECTED_ON if (machine_is_lubbock()) { \ - DISCRETE_LED_ON(D26); } -#define LED_CONNECTED_OFF if(machine_is_lubbock()) { \ - DISCRETE_LED_OFF(D26); LUB_HEXLED = 0; } -#define LED_EP0_ON if (machine_is_lubbock()) { DISCRETE_LED_ON(D25); } -#define LED_EP0_OFF if (machine_is_lubbock()) { DISCRETE_LED_OFF(D25); } -#endif /* DEBUG */ +#endif #endif @@ -161,13 +158,19 @@ #define HEX_DISPLAY(n) do {} while(0) #endif +#ifdef DEBUG +#include + +#define LED_CONNECTED_ON leds_event(led_green_on) +#define LED_CONNECTED_OFF do { \ + leds_event(led_green_off); \ + HEX_DISPLAY(0); \ + } while(0) +#endif + #ifndef LED_CONNECTED_ON #define LED_CONNECTED_ON do {} while(0) #define LED_CONNECTED_OFF do {} while(0) -#endif -#ifndef LED_EP0_ON -#define LED_EP0_ON do {} while (0) -#define LED_EP0_OFF do {} while (0) #endif /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c --- a/drivers/usb/gadget/rndis.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/gadget/rndis.c 2005-03-30 16:58:47 -08:00 @@ -74,7 +74,7 @@ static rndis_params rndis_per_dev_params [RNDIS_MAX_CONFIGS]; /* Driver Version */ -static const u32 rndis_driver_version = __constant_cpu_to_le32 (1); +static const __le32 rndis_driver_version = __constant_cpu_to_le32 (1); /* Function Prototypes */ static int rndis_init_response (int configNr, rndis_init_msg_type *buf); @@ -92,7 +92,7 @@ { int retval = -ENOTSUPP; u32 length = 0; - u32 *tmp; + __le32 *tmp; int i, count; rndis_query_cmplt_type *resp; @@ -110,7 +110,7 @@ DEBUG ("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__); length = sizeof (oid_supported_list); count = length / sizeof (u32); - tmp = (u32 *) ((u8 *)resp + 24); + tmp = (__le32 *) ((u8 *)resp + 24); for (i = 0; i < count; i++) tmp[i] = cpu_to_le32 (oid_supported_list[i]); retval = 0; @@ -126,7 +126,7 @@ * reddite ergo quae sunt Caesaris Caesari * et quae sunt Dei Deo! */ - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; @@ -134,7 +134,7 @@ case OID_GEN_MEDIA_SUPPORTED: DEBUG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].medium); retval = 0; break; @@ -144,7 +144,7 @@ DEBUG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__); length = 4; /* one medium, one transport... (maybe you do it better) */ - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].medium); retval = 0; break; @@ -154,11 +154,11 @@ DEBUG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__); if (rndis_per_dev_params [configNr].dev) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].dev->mtu); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -169,9 +169,9 @@ length = 4; if (rndis_per_dev_params [configNr].media_state == NDIS_MEDIA_STATE_DISCONNECTED) - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); else - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].speed); retval = 0; break; @@ -181,7 +181,7 @@ DEBUG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__); if (rndis_per_dev_params [configNr].dev) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].dev->mtu); retval = 0; } @@ -192,7 +192,7 @@ DEBUG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__); if (rndis_per_dev_params [configNr].dev) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].dev->mtu); retval = 0; } @@ -202,7 +202,7 @@ case OID_GEN_VENDOR_ID: DEBUG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].vendorID); retval = 0; break; @@ -220,7 +220,7 @@ DEBUG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__); length = 4; /* Created as LE */ - *((u32 *) resp + 6) = rndis_driver_version; + *((__le32 *) resp + 6) = rndis_driver_version; retval = 0; break; @@ -228,7 +228,7 @@ case OID_GEN_CURRENT_PACKET_FILTER: DEBUG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params[configNr].filter); retval = 0; break; @@ -237,7 +237,7 @@ case OID_GEN_MAXIMUM_TOTAL_SIZE: DEBUG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = __constant_cpu_to_le32( + *((__le32 *) resp + 6) = __constant_cpu_to_le32( RNDIS_MAX_TOTAL_SIZE); retval = 0; break; @@ -246,7 +246,7 @@ case OID_GEN_MEDIA_CONNECT_STATUS: DEBUG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .media_state); retval = 0; @@ -255,7 +255,7 @@ case OID_GEN_PHYSICAL_MEDIUM: DEBUG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; @@ -266,7 +266,7 @@ case OID_GEN_MAC_OPTIONS: /* from WinME */ DEBUG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = __constant_cpu_to_le32( + *((__le32 *) resp + 6) = __constant_cpu_to_le32( NDIS_MAC_OPTION_RECEIVE_SERIALIZED | NDIS_MAC_OPTION_FULL_DUPLEX); retval = 0; @@ -279,13 +279,13 @@ DEBUG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].stats->tx_packets - rndis_per_dev_params [configNr].stats->tx_errors - rndis_per_dev_params [configNr].stats->tx_dropped); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -295,13 +295,13 @@ DEBUG("%s: OID_GEN_RCV_OK\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr].stats->rx_packets - rndis_per_dev_params [configNr].stats->rx_errors - rndis_per_dev_params [configNr].stats->rx_dropped); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -311,12 +311,12 @@ DEBUG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->tx_errors); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -325,12 +325,12 @@ case OID_GEN_RCV_ERROR: DEBUG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->rx_errors); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -339,12 +339,12 @@ case OID_GEN_RCV_NO_BUFFER: DEBUG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->rx_dropped); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -359,7 +359,7 @@ */ if (rndis_per_dev_params [configNr].stats) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( (rndis_per_dev_params [configNr] .stats->tx_packets - rndis_per_dev_params [configNr] @@ -369,7 +369,7 @@ * 123); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -379,7 +379,7 @@ /* dito */ if (rndis_per_dev_params [configNr].stats) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( (rndis_per_dev_params [configNr] .stats->tx_packets - rndis_per_dev_params [configNr] @@ -389,7 +389,7 @@ / 123); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -397,12 +397,12 @@ case OID_GEN_MULTICAST_BYTES_XMIT: DEBUG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->multicast*1234); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -410,12 +410,12 @@ case OID_GEN_MULTICAST_FRAMES_XMIT: DEBUG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->multicast); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -423,12 +423,12 @@ case OID_GEN_BROADCAST_BYTES_XMIT: DEBUG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->tx_packets/42*255); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -436,37 +436,37 @@ case OID_GEN_BROADCAST_FRAMES_XMIT: DEBUG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->tx_packets/42); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; case OID_GEN_DIRECTED_BYTES_RCV: DEBUG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__); - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; case OID_GEN_DIRECTED_FRAMES_RCV: DEBUG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__); - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; case OID_GEN_MULTICAST_BYTES_RCV: DEBUG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->multicast * 1111); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -474,12 +474,12 @@ case OID_GEN_MULTICAST_FRAMES_RCV: DEBUG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->multicast); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -487,12 +487,12 @@ case OID_GEN_BROADCAST_BYTES_RCV: DEBUG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->rx_packets/42*255); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -500,12 +500,12 @@ case OID_GEN_BROADCAST_FRAMES_RCV: DEBUG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->rx_packets/42); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -513,19 +513,19 @@ case OID_GEN_RCV_CRC_ERROR: DEBUG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->rx_crc_errors); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; case OID_GEN_TRANSMIT_QUEUE_LENGTH: DEBUG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__); - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; #endif /* RNDIS_OPTIONAL_STATS */ @@ -542,7 +542,7 @@ length); retval = 0; } else { - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; } break; @@ -564,7 +564,7 @@ DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); length = 4; /* Multicast base address only */ - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0xE0000000); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0xE0000000); retval = 0; break; @@ -573,7 +573,7 @@ DEBUG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__); length = 4; /* Multicast base address only */ - *((u32 *) resp + 6) = __constant_cpu_to_le32 (1); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (1); retval = 0; break; @@ -589,7 +589,7 @@ if (rndis_per_dev_params [configNr].stats) { length = 4; - *((u32 *) resp + 6) = cpu_to_le32 ( + *((__le32 *) resp + 6) = cpu_to_le32 ( rndis_per_dev_params [configNr] .stats->rx_frame_errors); retval = 0; @@ -600,7 +600,7 @@ case OID_802_3_XMIT_ONE_COLLISION: DEBUG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; @@ -608,7 +608,7 @@ case OID_802_3_XMIT_MORE_COLLISIONS: DEBUG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__); length = 4; - *((u32 *) resp + 6) = __constant_cpu_to_le32 (0); + *((__le32 *) resp + 6) = __constant_cpu_to_le32 (0); retval = 0; break; @@ -734,7 +734,7 @@ * PROMISCUOUS, DIRECTED, * MULTICAST, ALL_MULTICAST, BROADCAST */ - params->filter = cpu_to_le32p((u32 *)buf); + params->filter = le32_to_cpup((__le32 *)buf); DEBUG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n", __FUNCTION__, params->filter); @@ -866,7 +866,7 @@ resp->MessageLength = __constant_cpu_to_le32 (24); resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ - if (gen_ndis_query_resp (configNr, cpu_to_le32 (buf->OID), r)) { + if (gen_ndis_query_resp (configNr, le32_to_cpu (buf->OID), r)) { /* OID not supported */ resp->Status = __constant_cpu_to_le32 ( RNDIS_STATUS_NOT_SUPPORTED); @@ -893,8 +893,8 @@ resp = (rndis_set_cmplt_type *) r->buf; if (!resp) return -ENOMEM; - BufLength = cpu_to_le32 (buf->InformationBufferLength); - BufOffset = cpu_to_le32 (buf->InformationBufferOffset); + BufLength = le32_to_cpu (buf->InformationBufferLength); + BufOffset = le32_to_cpu (buf->InformationBufferOffset); #ifdef VERBOSE DEBUG("%s: Length: %d\n", __FUNCTION__, BufLength); @@ -911,7 +911,7 @@ resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_SET_CMPLT); resp->MessageLength = __constant_cpu_to_le32 (16); resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ - if (gen_ndis_set_resp (configNr, cpu_to_le32 (buf->OID), + if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID), ((u8 *) buf) + 8 + BufOffset, BufLength, r)) resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED); else resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); @@ -1030,15 +1030,16 @@ */ int rndis_msg_parser (u8 configNr, u8 *buf) { - u32 MsgType, MsgLength, *tmp; + u32 MsgType, MsgLength; + __le32 *tmp; struct rndis_params *params; if (!buf) return -ENOMEM; - tmp = (u32 *) buf; - MsgType = cpu_to_le32p(tmp++); - MsgLength = cpu_to_le32p(tmp++); + tmp = (__le32 *) buf; + MsgType = le32_to_cpup(tmp++); + MsgLength = le32_to_cpup(tmp++); if (configNr >= RNDIS_MAX_CONFIGS) return -ENOTSUPP; @@ -1187,15 +1188,16 @@ void rndis_add_hdr (struct sk_buff *skb) { - if (!skb) return; - skb_push (skb, sizeof (struct rndis_packet_msg_type)); - memset (skb->data, 0, sizeof (struct rndis_packet_msg_type)); - *((u32 *) skb->data) = __constant_cpu_to_le32 (1); - *((u32 *) skb->data + 1) = cpu_to_le32(skb->len); - *((u32 *) skb->data + 2) = __constant_cpu_to_le32 (36); - *((u32 *) skb->data + 3) = cpu_to_le32(skb->len - 44); - - return; + struct rndis_packet_msg_type *header; + + if (!skb) + return; + header = (void *) skb_push (skb, sizeof *header); + memset (header, 0, sizeof *header); + header->MessageType = __constant_cpu_to_le32 (1); + header->MessageLength = cpu_to_le32(skb->len); + header->DataOffset = __constant_cpu_to_le32 (36); + header->OOBDataOffset = cpu_to_le32(skb->len - 44); } void rndis_free_response (int configNr, u8 *buf) @@ -1253,15 +1255,16 @@ int rndis_rm_hdr (u8 *buf, u32 *length) { - u32 i, messageLen, dataOffset, *tmp; + u32 i, messageLen, dataOffset; + __le32 *tmp; - tmp = (u32 *) buf; + tmp = (__le32 *) buf; if (!buf || !length) return -1; - if (cpu_to_le32p(tmp++) != 1) return -1; + if (le32_to_cpup(tmp++) != 1) return -1; - messageLen = cpu_to_le32p(tmp++); - dataOffset = cpu_to_le32p(tmp++) + 8; + messageLen = le32_to_cpup(tmp++); + dataOffset = le32_to_cpup(tmp++) + 8; if (messageLen < dataOffset || messageLen > *length) return -1; diff -Nru a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h --- a/drivers/usb/gadget/rndis.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/gadget/rndis.h 2005-03-30 16:58:47 -08:00 @@ -154,139 +154,139 @@ typedef struct rndis_init_msg_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 MajorVersion; - u32 MinorVersion; - u32 MaxTransferSize; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 MajorVersion; + __le32 MinorVersion; + __le32 MaxTransferSize; } rndis_init_msg_type; typedef struct rndis_init_cmplt_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 Status; - u32 MajorVersion; - u32 MinorVersion; - u32 DeviceFlags; - u32 Medium; - u32 MaxPacketsPerTransfer; - u32 MaxTransferSize; - u32 PacketAlignmentFactor; - u32 AFListOffset; - u32 AFListSize; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 Status; + __le32 MajorVersion; + __le32 MinorVersion; + __le32 DeviceFlags; + __le32 Medium; + __le32 MaxPacketsPerTransfer; + __le32 MaxTransferSize; + __le32 PacketAlignmentFactor; + __le32 AFListOffset; + __le32 AFListSize; } rndis_init_cmplt_type; typedef struct rndis_halt_msg_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; } rndis_halt_msg_type; typedef struct rndis_query_msg_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 OID; - u32 InformationBufferLength; - u32 InformationBufferOffset; - u32 DeviceVcHandle; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 OID; + __le32 InformationBufferLength; + __le32 InformationBufferOffset; + __le32 DeviceVcHandle; } rndis_query_msg_type; typedef struct rndis_query_cmplt_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 Status; - u32 InformationBufferLength; - u32 InformationBufferOffset; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 Status; + __le32 InformationBufferLength; + __le32 InformationBufferOffset; } rndis_query_cmplt_type; typedef struct rndis_set_msg_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 OID; - u32 InformationBufferLength; - u32 InformationBufferOffset; - u32 DeviceVcHandle; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 OID; + __le32 InformationBufferLength; + __le32 InformationBufferOffset; + __le32 DeviceVcHandle; } rndis_set_msg_type; typedef struct rndis_set_cmplt_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 Status; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 Status; } rndis_set_cmplt_type; typedef struct rndis_reset_msg_type { - u32 MessageType; - u32 MessageLength; - u32 Reserved; + __le32 MessageType; + __le32 MessageLength; + __le32 Reserved; } rndis_reset_msg_type; typedef struct rndis_reset_cmplt_type { - u32 MessageType; - u32 MessageLength; - u32 Status; - u32 AddressingReset; + __le32 MessageType; + __le32 MessageLength; + __le32 Status; + __le32 AddressingReset; } rndis_reset_cmplt_type; typedef struct rndis_indicate_status_msg_type { - u32 MessageType; - u32 MessageLength; - u32 Status; - u32 StatusBufferLength; - u32 StatusBufferOffset; + __le32 MessageType; + __le32 MessageLength; + __le32 Status; + __le32 StatusBufferLength; + __le32 StatusBufferOffset; } rndis_indicate_status_msg_type; typedef struct rndis_keepalive_msg_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; } rndis_keepalive_msg_type; typedef struct rndis_keepalive_cmplt_type { - u32 MessageType; - u32 MessageLength; - u32 RequestID; - u32 Status; + __le32 MessageType; + __le32 MessageLength; + __le32 RequestID; + __le32 Status; } rndis_keepalive_cmplt_type; struct rndis_packet_msg_type { - u32 MessageType; - u32 MessageLength; - u32 DataOffset; - u32 DataLength; - u32 OOBDataOffset; - u32 OOBDataLength; - u32 NumOOBDataElements; - u32 PerPacketInfoOffset; - u32 PerPacketInfoLength; - u32 VcHandle; - u32 Reserved; + __le32 MessageType; + __le32 MessageLength; + __le32 DataOffset; + __le32 DataLength; + __le32 OOBDataOffset; + __le32 OOBDataLength; + __le32 NumOOBDataElements; + __le32 PerPacketInfoOffset; + __le32 PerPacketInfoLength; + __le32 VcHandle; + __le32 Reserved; }; struct rndis_config_parameter { - u32 ParameterNameOffset; - u32 ParameterNameLength; - u32 ParameterType; - u32 ParameterValueOffset; - u32 ParameterValueLength; + __le32 ParameterNameOffset; + __le32 ParameterNameLength; + __le32 ParameterType; + __le32 ParameterValueOffset; + __le32 ParameterValueLength; }; /* implementation specific */ diff -Nru a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c --- a/drivers/usb/gadget/serial.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/gadget/serial.c 2005-03-30 16:58:49 -08:00 @@ -1461,6 +1461,9 @@ } else if (gadget_is_s3c2410(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0012); + } else if (gadget_is_at91(gadget)) { + gs_device_desc.bcdDevice = + __constant_cpu_to_le16(GS_VERSION_NUM|0x0013); } else { printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n", gadget->name); diff -Nru a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c --- a/drivers/usb/gadget/usbstring.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/gadget/usbstring.c 2005-03-30 16:58:51 -08:00 @@ -20,7 +20,7 @@ #include -static int utf8_to_utf16le(const char *s, u16 *cp, unsigned len) +static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len) { int count = 0; u8 c; @@ -126,7 +126,7 @@ /* string descriptors have length, tag, then UTF16-LE text */ len = min ((size_t) 126, strlen (s->s)); memset (buf + 2, 0, 2 * len); /* zero all the bytes */ - len = utf8_to_utf16le(s->s, (u16 *)&buf[2], len); + len = utf8_to_utf16le(s->s, (__le16 *)&buf[2], len); if (len < 0) return -EINVAL; buf [0] = (len + 1) * 2; diff -Nru a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c --- a/drivers/usb/gadget/zero.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/gadget/zero.c 2005-03-30 16:58:48 -08:00 @@ -919,6 +919,9 @@ struct zero_dev *dev = get_gadget_data (gadget); struct usb_request *req = dev->req; int value = -EOPNOTSUPP; + u16 w_index = ctrl->wIndex; + u16 w_value = ctrl->wValue; + u16 w_length = ctrl->wLength; /* usually this stores reply data in the pre-allocated ep0 buffer, * but config change events will reconfigure hardware. @@ -929,17 +932,17 @@ case USB_REQ_GET_DESCRIPTOR: if (ctrl->bRequestType != USB_DIR_IN) goto unknown; - switch (ctrl->wValue >> 8) { + switch (w_value >> 8) { case USB_DT_DEVICE: - value = min (ctrl->wLength, (u16) sizeof device_desc); + value = min (w_length, (u16) sizeof device_desc); memcpy (req->buf, &device_desc, value); break; #ifdef CONFIG_USB_GADGET_DUALSPEED case USB_DT_DEVICE_QUALIFIER: if (!gadget->is_dualspeed) break; - value = min (ctrl->wLength, (u16) sizeof dev_qualifier); + value = min (w_length, (u16) sizeof dev_qualifier); memcpy (req->buf, &dev_qualifier, value); break; @@ -950,10 +953,10 @@ #endif /* CONFIG_USB_GADGET_DUALSPEED */ case USB_DT_CONFIG: value = config_buf (gadget, req->buf, - ctrl->wValue >> 8, - ctrl->wValue & 0xff); + w_value >> 8, + w_value & 0xff); if (value >= 0) - value = min (ctrl->wLength, (u16) value); + value = min (w_length, (u16) value); break; case USB_DT_STRING: @@ -963,9 +966,9 @@ * any UTF-8 characters */ value = usb_gadget_get_string (&stringtab, - ctrl->wValue & 0xff, req->buf); + w_value & 0xff, req->buf); if (value >= 0) - value = min (ctrl->wLength, (u16) value); + value = min (w_length, (u16) value); break; } break; @@ -981,14 +984,14 @@ else VDBG (dev, "HNP inactive\n"); spin_lock (&dev->lock); - value = zero_set_config (dev, ctrl->wValue, GFP_ATOMIC); + value = zero_set_config (dev, w_value, GFP_ATOMIC); spin_unlock (&dev->lock); break; case USB_REQ_GET_CONFIGURATION: if (ctrl->bRequestType != USB_DIR_IN) goto unknown; *(u8 *)req->buf = dev->config; - value = min (ctrl->wLength, (u16) 1); + value = min (w_length, (u16) 1); break; /* until we add altsetting support, or other interfaces, @@ -999,7 +1002,7 @@ if (ctrl->bRequestType != USB_RECIP_INTERFACE) goto unknown; spin_lock (&dev->lock); - if (dev->config && ctrl->wIndex == 0 && ctrl->wValue == 0) { + if (dev->config && w_index == 0 && w_value == 0) { u8 config = dev->config; /* resets interface configuration, forgets about @@ -1020,12 +1023,12 @@ goto unknown; if (!dev->config) break; - if (ctrl->wIndex != 0) { + if (w_index != 0) { value = -EDOM; break; } *(u8 *)req->buf = 0; - value = min (ctrl->wLength, (u16) 1); + value = min (w_length, (u16) 1); break; /* @@ -1036,23 +1039,23 @@ case 0x5b: /* control WRITE test -- fill the buffer */ if (ctrl->bRequestType != (USB_DIR_OUT|USB_TYPE_VENDOR)) goto unknown; - if (ctrl->wValue || ctrl->wIndex) + if (w_value || w_index) break; /* just read that many bytes into the buffer */ - if (ctrl->wLength > USB_BUFSIZ) + if (w_length > USB_BUFSIZ) break; - value = ctrl->wLength; + value = w_length; break; case 0x5c: /* control READ test -- return the buffer */ if (ctrl->bRequestType != (USB_DIR_IN|USB_TYPE_VENDOR)) goto unknown; - if (ctrl->wValue || ctrl->wIndex) + if (w_value || w_index) break; /* expect those bytes are still in the buffer; send back */ - if (ctrl->wLength > USB_BUFSIZ - || ctrl->wLength != req->length) + if (w_length > USB_BUFSIZ + || w_length != req->length) break; - value = ctrl->wLength; + value = w_length; break; default: @@ -1060,14 +1063,13 @@ VDBG (dev, "unknown control req%02x.%02x v%04x i%04x l%d\n", ctrl->bRequestType, ctrl->bRequest, - ctrl->wValue, ctrl->wIndex, ctrl->wLength); + w_value, w_index, w_length); } /* respond with data transfer before status phase? */ if (value >= 0) { req->length = value; - req->zero = value < ctrl->wLength - && (value % gadget->ep0->maxpacket) == 0; + req->zero = value < w_length; value = usb_ep_queue (gadget->ep0, req, GFP_ATOMIC); if (value < 0) { DBG (dev, "ep_queue --> %d\n", value); @@ -1193,6 +1195,8 @@ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211); } else if (gadget_is_s3c2410(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212); + } else if (gadget_is_at91(gadget)) { + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213); } else { /* gadget zero is so simple (for now, no altsettings) that * it SHOULD NOT have problems with bulk-capable hardware. diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/host/ehci-hcd.c 2005-03-30 16:58:51 -08:00 @@ -212,7 +212,7 @@ command |= CMD_RESET; dbg_cmd (ehci, "reset", command); writel (command, &ehci->regs->command); - ehci_to_hcd(ehci)->state = USB_STATE_HALT; + ehci_to_hcd(ehci)->state = HC_STATE_HALT; ehci->next_statechange = jiffies; retval = handshake (&ehci->regs->command, CMD_RESET, 0, 250 * 1000); @@ -231,7 +231,7 @@ u32 temp; #ifdef DEBUG - if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) + if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) BUG (); #endif @@ -240,7 +240,7 @@ temp &= STS_ASS | STS_PSS; if (handshake (&ehci->regs->status, STS_ASS | STS_PSS, temp, 16 * 125) != 0) { - ehci_to_hcd(ehci)->state = USB_STATE_HALT; + ehci_to_hcd(ehci)->state = HC_STATE_HALT; return; } @@ -252,7 +252,7 @@ /* hardware can take 16 microframes to turn off ... */ if (handshake (&ehci->regs->status, STS_ASS | STS_PSS, 0, 16 * 125) != 0) { - ehci_to_hcd(ehci)->state = USB_STATE_HALT; + ehci_to_hcd(ehci)->state = HC_STATE_HALT; return; } } @@ -615,7 +615,7 @@ register_reboot_notifier (&ehci->reboot_notifier); } - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; writel (FLAG_CF, &ehci->regs->configured_flag); readl (&ehci->regs->command); /* unblock posted write */ @@ -635,8 +635,8 @@ * Before this point the HC was idle/ready. After, khubd * and device drivers may start it running. */ - if (first && hcd_register_root (udev, hcd) != 0) { - if (hcd->state == USB_STATE_RUNNING) + if (first && usb_hcd_register_root_hub (udev, hcd) != 0) { + if (hcd->state == HC_STATE_RUNNING) ehci_quiesce (ehci); ehci_reset (ehci); usb_put_dev (udev); @@ -672,7 +672,7 @@ del_timer_sync (&ehci->watchdog); spin_lock_irq(&ehci->lock); - if (HCD_IS_RUNNING (hcd->state)) + if (HC_IS_RUNNING (hcd->state)) ehci_quiesce (ehci); ehci_reset (ehci); @@ -839,7 +839,7 @@ * misplace IRQs, and should let us run completely without IRQs. * such lossage has been observed on both VT6202 and VT8235. */ - if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) && + if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state) && (ehci->async->qh_next.ptr != NULL || ehci->periodic_sched != 0)) timer_action (ehci, TIMER_IO_WATCHDOG); @@ -1000,7 +1000,7 @@ /* if we need to use IAA and it's busy, defer */ if (qh->qh_state == QH_STATE_LINKED && ehci->reclaim - && HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) { + && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) { struct ehci_qh *last; for (last = ehci->reclaim; @@ -1011,7 +1011,7 @@ last->reclaim = qh; /* bypass IAA if the hc can't care */ - } else if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->reclaim) + } else if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->reclaim) end_unlink_async (ehci, NULL); /* something else might have unlinked the qh by now */ @@ -1059,7 +1059,7 @@ /* reschedule QH iff another request is queued */ if (!list_empty (&qh->qtd_list) - && HCD_IS_RUNNING (hcd->state)) { + && HC_IS_RUNNING (hcd->state)) { int status; status = qh_schedule (ehci, qh); @@ -1115,7 +1115,7 @@ goto idle_timeout; } - if (!HCD_IS_RUNNING (hcd->state)) + if (!HC_IS_RUNNING (hcd->state)) qh->qh_state = QH_STATE_IDLE; switch (qh->qh_state) { case QH_STATE_LINKED: diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c --- a/drivers/usb/host/ehci-hub.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/host/ehci-hub.c 2005-03-30 16:58:50 -08:00 @@ -42,9 +42,9 @@ spin_lock_irq (&ehci->lock); /* stop schedules, clean any completed work */ - if (HCD_IS_RUNNING(hcd->state)) { + if (HC_IS_RUNNING(hcd->state)) { ehci_quiesce (ehci); - hcd->state = USB_STATE_QUIESCING; + hcd->state = HC_STATE_QUIESCING; } ehci->command = readl (&ehci->regs->command); if (ehci->reclaim) @@ -73,7 +73,7 @@ /* turn off now-idle HC */ ehci_halt (ehci); - hcd->state = HCD_STATE_SUSPENDED; + hcd->state = HC_STATE_SUSPENDED; ehci->next_statechange = jiffies + msecs_to_jiffies(10); spin_unlock_irq (&ehci->lock); @@ -145,7 +145,7 @@ } ehci->next_statechange = jiffies + msecs_to_jiffies(5); - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; /* Now we can safely re-enable irqs */ if (intr_enable) @@ -212,7 +212,7 @@ unsigned long flags; /* if !USB_SUSPEND, root hub timers won't get shut down ... */ - if (!HCD_IS_RUNNING(hcd->state)) + if (!HC_IS_RUNNING(hcd->state)) return 0; /* init status to no-changes */ diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c --- a/drivers/usb/host/ehci-q.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/host/ehci-q.c 2005-03-30 16:58:50 -08:00 @@ -338,23 +338,24 @@ if ((token & QTD_STS_HALT) != 0) { stopped = 1; - /* magic dummy for some short reads; qh won't advance */ + /* magic dummy for some short reads; qh won't advance. + * that silicon quirk can kick in with this dummy too. + */ } else if (IS_SHORT_READ (token) - && (qh->hw_alt_next & QTD_MASK) - == ehci->async->hw_alt_next) { + && !(qtd->hw_alt_next & EHCI_LIST_END)) { stopped = 1; goto halt; } /* stop scanning when we reach qtds the hc is using */ } else if (likely (!stopped - && HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))) { + && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))) { break; } else { stopped = 1; - if (unlikely (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state))) + if (unlikely (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state))) urb->status = -ESHUTDOWN; /* ignore active urbs unless some previous qtd @@ -522,7 +523,7 @@ else buf = 0; - // FIXME this 'buf' check break some zlps... + /* for zero length DATA stages, STATUS is always IN */ if (!buf || is_input) token |= (1 /* "in" */ << 8); /* else it's already initted to "out" pid (0 << 8) */ @@ -780,7 +781,7 @@ (void) handshake (&ehci->regs->status, STS_ASS, 0, 150); cmd |= CMD_ASE | CMD_RUN; writel (cmd, &ehci->regs->command); - ehci_to_hcd(ehci)->state = USB_STATE_RUNNING; + ehci_to_hcd(ehci)->state = HC_STATE_RUNNING; /* posted write need not be known to HC yet ... */ } } @@ -959,7 +960,7 @@ qh_completions (ehci, qh, regs); if (!list_empty (&qh->qtd_list) - && HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) + && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) qh_link_async (ehci, qh); else { qh_put (qh); // refcount from async list @@ -967,7 +968,7 @@ /* it's not free to turn the async schedule on/off; leave it * active but idle for a while once it empties. */ - if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state) + if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state) && ehci->async->qh_next.qh == NULL) timer_action (ehci, TIMER_ASYNC_OFF); } @@ -998,7 +999,7 @@ /* stop async schedule right now? */ if (unlikely (qh == ehci->async)) { /* can't get here without STS_ASS set */ - if (ehci_to_hcd(ehci)->state != USB_STATE_HALT) { + if (ehci_to_hcd(ehci)->state != HC_STATE_HALT) { writel (cmd & ~CMD_ASE, &ehci->regs->command); wmb (); // handshake later, if we need to @@ -1018,7 +1019,7 @@ prev->qh_next = qh->qh_next; wmb (); - if (unlikely (ehci_to_hcd(ehci)->state == USB_STATE_HALT)) { + if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) { /* if (unlikely (qh->reclaim != 0)) * this will recurse, probably not much */ diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c --- a/drivers/usb/host/ehci-sched.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/host/ehci-sched.c 2005-03-30 16:58:51 -08:00 @@ -208,7 +208,7 @@ here = here.qh->qh_next; continue; case Q_TYPE_SITD: - if (same_tt (dev, here.itd->urb->dev)) { + if (same_tt (dev, here.sitd->urb->dev)) { u16 mask; mask = le32_to_cpu (here.sitd @@ -218,7 +218,7 @@ if (mask & uf_mask) break; } - type = Q_NEXT_TYPE (here.qh->hw_next); + type = Q_NEXT_TYPE (here.sitd->hw_next); here = here.sitd->sitd_next; continue; // case Q_TYPE_FSTN: @@ -249,14 +249,14 @@ */ status = handshake (&ehci->regs->status, STS_PSS, 0, 9 * 125); if (status != 0) { - ehci_to_hcd(ehci)->state = USB_STATE_HALT; + ehci_to_hcd(ehci)->state = HC_STATE_HALT; return status; } cmd = readl (&ehci->regs->command) | CMD_PSE; writel (cmd, &ehci->regs->command); /* posted write ... PSS happens later */ - ehci_to_hcd(ehci)->state = USB_STATE_RUNNING; + ehci_to_hcd(ehci)->state = HC_STATE_RUNNING; /* make sure ehci_work scans these */ ehci->next_uframe = readl (&ehci->regs->frame_index) @@ -274,7 +274,7 @@ */ status = handshake (&ehci->regs->status, STS_PSS, STS_PSS, 9 * 125); if (status != 0) { - ehci_to_hcd(ehci)->state = USB_STATE_HALT; + ehci_to_hcd(ehci)->state = HC_STATE_HALT; return status; } @@ -1180,7 +1180,10 @@ return status; ready: + /* report high speed start in uframes; full speed, in frames */ urb->start_frame = stream->next_uframe; + if (!stream->highspeed) + urb->start_frame >>= 3; return 0; } @@ -1504,18 +1507,17 @@ /* might need to cross a buffer page within a td */ packet->bufp = buf; - buf += length; - packet->buf1 = buf & ~0x0fff; + packet->buf1 = (buf + length) & ~0x0fff; if (packet->buf1 != (buf & ~(u64)0x0fff)) packet->cross = 1; /* OUT uses multiple start-splits */ if (stream->bEndpointAddress & USB_DIR_IN) continue; - length = 1 + (length / 188); - packet->buf1 |= length; + length = (length + 187) / 188; if (length > 1) /* BEGIN vs ALL */ - packet->buf1 |= 1 << 3; + length |= 1 << 3; + packet->buf1 |= length; } } @@ -1610,10 +1612,9 @@ sitd->hw_buf_hi [0] = cpu_to_le32 (bufp >> 32); sitd->hw_buf [1] = cpu_to_le32 (uf->buf1); - if (uf->cross) { + if (uf->cross) bufp += 4096; - sitd->hw_buf_hi [1] = cpu_to_le32 (bufp >> 32); - } + sitd->hw_buf_hi [1] = cpu_to_le32 (bufp >> 32); sitd->index = index; } @@ -1650,7 +1651,7 @@ ehci_to_hcd(ehci)->self.bandwidth_allocated += stream->bandwidth; ehci_vdbg (ehci, - "sched dev%s ep%d%s-iso [%d] %dms/%04x\n", + "sched devp %s ep%d%s-iso [%d] %dms/%04x\n", urb->dev->devpath, stream->bEndpointAddress & 0x0f, (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", (next_uframe >> 3) % ehci->periodic_size, @@ -1697,7 +1698,7 @@ /*-------------------------------------------------------------------------*/ #define SITD_ERRS (SITD_STS_ERR | SITD_STS_DBE | SITD_STS_BABBLE \ - | SITD_STS_XACT | SITD_STS_MMF | SITD_STS_STS) + | SITD_STS_XACT | SITD_STS_MMF) static unsigned sitd_complete ( @@ -1780,12 +1781,6 @@ unsigned long flags; struct ehci_iso_stream *stream; - // FIXME remove when csplits behave - if (usb_pipein(urb->pipe)) { - ehci_dbg (ehci, "no iso-IN split transactions yet\n"); - return -ENOMEM; - } - /* Get iso_stream head */ stream = iso_stream_find (ehci, urb); if (stream == NULL) { @@ -1864,7 +1859,7 @@ * Touches as few pages as possible: cache-friendly. */ now_uframe = ehci->next_uframe; - if (HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) + if (HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) clock = readl (&ehci->regs->frame_index); else clock = now_uframe + mod - 1; @@ -1898,7 +1893,7 @@ union ehci_shadow temp; int live; - live = HCD_IS_RUNNING (ehci_to_hcd(ehci)->state); + live = HC_IS_RUNNING (ehci_to_hcd(ehci)->state); switch (type) { case Q_TYPE_QH: /* handle any completions */ @@ -1987,7 +1982,7 @@ if (now_uframe == clock) { unsigned now; - if (!HCD_IS_RUNNING (ehci_to_hcd(ehci)->state)) + if (!HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) break; ehci->next_uframe = now_uframe; now = readl (&ehci->regs->frame_index) % mod; diff -Nru a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h --- a/drivers/usb/host/ehci.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/host/ehci.h 2005-03-30 16:58:50 -08:00 @@ -430,7 +430,7 @@ __le32 transaction; /* itd->hw_transaction[i] |= */ u8 cross; /* buf crosses pages */ /* for full speed OUT splits */ - u16 buf1; + u32 buf1; }; /* temporary schedule data for packets from iso urbs (both speeds) diff -Nru a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c --- a/drivers/usb/host/ohci-dbg.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/host/ohci-dbg.c 2005-03-30 16:58:50 -08:00 @@ -193,6 +193,10 @@ maybe_print_eds (controller, "donehead", ohci_readl (controller, ®s->donehead), next, size); + + /* broken fminterval means traffic won't flow! */ + ohci_dbg (controller, "fminterval %08x\n", + ohci_readl (controller, ®s->fminterval)); } #define dbg_port_sw(hc,num,value,next,size) \ @@ -620,9 +624,11 @@ ohci_dbg_sw (ohci, &next, &size, "bus %s, device %s\n" + "%s\n" "%s version " DRIVER_VERSION "\n", hcd->self.controller->bus->name, hcd->self.controller->bus_id, + hcd->product_desc, hcd_name); if (bus->controller->power.power_state) { diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/host/ohci-hcd.c 2005-03-30 16:58:47 -08:00 @@ -252,7 +252,7 @@ spin_lock_irqsave (&ohci->lock, flags); /* don't submit to a dead HC */ - if (!HCD_IS_RUNNING(hcd->state)) { + if (!HC_IS_RUNNING(hcd->state)) { retval = -ENODEV; goto fail; } @@ -320,7 +320,7 @@ #endif spin_lock_irqsave (&ohci->lock, flags); - if (HCD_IS_RUNNING(hcd->state)) { + if (HC_IS_RUNNING(hcd->state)) { urb_priv_t *urb_priv; /* Unless an IRQ completed the unlink while it was being @@ -367,7 +367,7 @@ rescan: spin_lock_irqsave (&ohci->lock, flags); - if (!HCD_IS_RUNNING (hcd->state)) { + if (!HC_IS_RUNNING (hcd->state)) { sanitize: ed->state = ED_IDLE; finish_unlinks (ohci, 0, NULL); @@ -587,7 +587,6 @@ // flush those writes (void) ohci_readl (ohci, &ohci->regs->control); } - ohci_writel (ohci, ohci->fminterval, &ohci->regs->fminterval); /* Tell the controller where the control and bulk lists are * The lists are empty now. */ @@ -620,7 +619,7 @@ ohci->hc_control &= OHCI_CTRL_RWC; ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); - ohci_to_hcd(ohci)->state = USB_STATE_RUNNING; + ohci_to_hcd(ohci)->state = HC_STATE_RUNNING; /* wake on ConnectStatusChange, matching external hubs */ ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status); @@ -656,7 +655,7 @@ // POTPGT delay is bits 24-31, in 2 ms units. mdelay ((temp >> 23) & 0x1fe); bus = &ohci_to_hcd(ohci)->self; - ohci_to_hcd(ohci)->state = USB_STATE_RUNNING; + ohci_to_hcd(ohci)->state = HC_STATE_RUNNING; ohci_dump (ohci, 1); @@ -675,7 +674,7 @@ } udev->speed = USB_SPEED_FULL; - if (hcd_register_root (udev, ohci_to_hcd(ohci)) != 0) { + if (usb_hcd_register_root_hub (udev, ohci_to_hcd(ohci)) != 0) { usb_put_dev (udev); disable (ohci); ohci->hc_control &= ~OHCI_CTRL_HCFS; @@ -728,16 +727,17 @@ if (ints & OHCI_INTR_RD) { ohci_vdbg (ohci, "resume detect\n"); - schedule_work(&ohci->rh_resume); + if (hcd->state != HC_STATE_QUIESCING) + schedule_work(&ohci->rh_resume); } if (ints & OHCI_INTR_WDH) { - if (HCD_IS_RUNNING(hcd->state)) + if (HC_IS_RUNNING(hcd->state)) ohci_writel (ohci, OHCI_INTR_WDH, ®s->intrdisable); spin_lock (&ohci->lock); dl_done_list (ohci, ptregs); spin_unlock (&ohci->lock); - if (HCD_IS_RUNNING(hcd->state)) + if (HC_IS_RUNNING(hcd->state)) ohci_writel (ohci, OHCI_INTR_WDH, ®s->intrenable); } @@ -750,11 +750,11 @@ if (ohci->ed_rm_list) finish_unlinks (ohci, ohci_frame_no(ohci), ptregs); if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list - && HCD_IS_RUNNING(hcd->state)) + && HC_IS_RUNNING(hcd->state)) ohci_writel (ohci, OHCI_INTR_SF, ®s->intrdisable); spin_unlock (&ohci->lock); - if (HCD_IS_RUNNING(hcd->state)) { + if (HC_IS_RUNNING(hcd->state)) { ohci_writel (ohci, ints, ®s->intrstatus); ohci_writel (ohci, OHCI_INTR_MIE, ®s->intrenable); // flush those writes diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c --- a/drivers/usb/host/ohci-hub.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/host/ohci-hub.c 2005-03-30 16:58:47 -08:00 @@ -73,7 +73,7 @@ ohci_dbg (ohci, "suspend root hub\n"); /* First stop any processing */ - hcd->state = USB_STATE_QUIESCING; + hcd->state = HC_STATE_QUIESCING; if (ohci->hc_control & OHCI_SCHED_ENABLES) { int limit; @@ -119,7 +119,7 @@ done: if (status == 0) - hcd->state = HCD_STATE_SUSPENDED; + hcd->state = HC_STATE_SUSPENDED; spin_unlock_irqrestore (&ohci->lock, flags); return status; } @@ -147,7 +147,7 @@ if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { /* this can happen after suspend-to-disk */ - if (hcd->state == USB_STATE_RESUMING) { + if (hcd->state == HC_STATE_RESUMING) { ohci_dbg (ohci, "BIOS/SMM active, control %03x\n", ohci->hc_control); status = -EBUSY; @@ -169,7 +169,7 @@ ohci_info (ohci, "wakeup\n"); break; case OHCI_USB_OPER: - ohci_dbg (ohci, "odd resume\n"); + ohci_dbg (ohci, "already resumed\n"); status = 0; break; default: /* RESET, we lost power */ @@ -197,8 +197,8 @@ &ohci->regs->roothub.portstatus [temp]); } - /* Some controllers (lucent) need extra-long delays */ - hcd->state = USB_STATE_RESUMING; + /* Some controllers (lucent erratum) need extra-long delays */ + hcd->state = HC_STATE_RESUMING; mdelay (20 /* usb 11.5.1.10 */ + 15); temp = ohci_readl (ohci, &ohci->regs->control); @@ -216,6 +216,7 @@ ohci_writel (ohci, 0, &ohci->regs->ed_periodcurrent); ohci_writel (ohci, (u32) ohci->hcca_dma, &ohci->regs->hcca); + /* Sometimes PCI D3 suspend trashes frame timings ... */ periodic_reinit (ohci); /* interrupts might have been disabled */ @@ -272,7 +273,7 @@ (void) ohci_readl (ohci, &ohci->regs->control); } - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; return 0; } @@ -313,7 +314,7 @@ * letting khubd or root hub timer see state changes. */ if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER - || !HCD_IS_RUNNING(hcd->state)) { + || !HC_IS_RUNNING(hcd->state)) { can_suspend = 0; goto done; } @@ -378,7 +379,7 @@ ) { ohci_vdbg (ohci, "autosuspend\n"); (void) ohci_hub_suspend (hcd); - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; usb_unlock_device (hcd->self.root_hub); } #endif diff -Nru a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c --- a/drivers/usb/host/ohci-omap.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/host/ohci-omap.c 2005-03-30 16:58:49 -08:00 @@ -2,16 +2,14 @@ * OHCI HCD (Host Controller Driver) for USB. * * (C) Copyright 1999 Roman Weissgaerber - * (C) Copyright 2000-2004 David Brownell + * (C) Copyright 2000-2005 David Brownell * (C) Copyright 2002 Hewlett-Packard Company * * OMAP Bus Glue * - * Written by Christopher Hoover - * Based on fragments of previous driver by Russell King et al. - * - * Modified for OMAP from ohci-sa1111.c by Tony Lindgren + * Modified for OMAP by Tony Lindgren * Based on the 2.4 OMAP OHCI driver originally done by MontaVista Software Inc. + * and on ohci-sa1111.c by Christopher Hoover * * This file is licenced under the GPL. */ @@ -26,8 +24,20 @@ #include #include #include +#include + + +/* OMAP-1510 OHCI has its own MMU for DMA */ +#define OMAP1510_LB_MEMSIZE 32 /* Should be same as SDRAM size */ +#define OMAP1510_LB_CLOCK_DIV 0xfffec10c +#define OMAP1510_LB_MMU_CTL 0xfffec208 +#define OMAP1510_LB_MMU_LCK 0xfffec224 +#define OMAP1510_LB_MMU_LD_TLB 0xfffec228 +#define OMAP1510_LB_MMU_CAM_H 0xfffec22c +#define OMAP1510_LB_MMU_CAM_L 0xfffec230 +#define OMAP1510_LB_MMU_RAM_H 0xfffec234 +#define OMAP1510_LB_MMU_RAM_L 0xfffec238 -#include "ohci-omap.h" #ifndef CONFIG_ARCH_OMAP #error "This file is OMAP bus glue. CONFIG_OMAP must be defined." @@ -52,45 +62,17 @@ extern int usb_disabled(void); extern int ocpi_enable(void); -/* - * OHCI clock initialization for OMAP-1510 and 16xx - */ -static int omap_ohci_clock_power(int on) +static struct clk *usb_host_ck; + +static void omap_ohci_clock_power(int on) { if (on) { - /* for 1510, 48MHz DPLL is set up in usb init */ - - if (cpu_is_omap16xx()) { - /* Enable OHCI */ - omap_writel(omap_readl(ULPD_SOFT_REQ) | SOFT_USB_OTG_REQ, - ULPD_SOFT_REQ); - - /* USB host clock request if not using OTG */ - omap_writel(omap_readl(ULPD_SOFT_REQ) | SOFT_USB_REQ, - ULPD_SOFT_REQ); - - omap_writel(omap_readl(ULPD_STATUS_REQ) | USB_HOST_DPLL_REQ, - ULPD_STATUS_REQ); - } - - /* Enable 48MHz clock to USB */ - omap_writel(omap_readl(ULPD_CLOCK_CTRL) | USB_MCLK_EN, - ULPD_CLOCK_CTRL); - - omap_writel(omap_readl(ARM_IDLECT2) | (1 << EN_LBFREECK) | (1 << EN_LBCK), - ARM_IDLECT2); - - omap_writel(omap_readl(MOD_CONF_CTRL_0) | USB_HOST_HHC_UHOST_EN, - MOD_CONF_CTRL_0); + clk_enable(usb_host_ck); + /* guesstimate for T5 == 1x 32K clock + APLL lock time */ + udelay(100); } else { - /* Disable 48MHz clock to USB */ - omap_writel(omap_readl(ULPD_CLOCK_CTRL) & ~USB_MCLK_EN, - ULPD_CLOCK_CTRL); - - /* FIXME: The DPLL stays on for now */ + clk_disable(usb_host_ck); } - - return 0; } /* @@ -204,7 +186,7 @@ /* boards can use OTG transceivers in non-OTG modes */ need_transceiver = need_transceiver - || machine_is_omap_h2(); + || machine_is_omap_h2() || machine_is_omap_h3(); if (cpu_is_omap16xx()) ocpi_enable(); @@ -261,7 +243,7 @@ omap_cfg_reg(W4_USB_HIGHZ); } ohci_writel(ohci, rh, &ohci->regs->roothub.a); - // distrust_firmware = 0; + distrust_firmware = 0; } /* FIXME khubd hub requests should manage power switching */ @@ -278,21 +260,14 @@ static void omap_stop_hc(struct platform_device *pdev) { dev_dbg(&pdev->dev, "stopping USB Controller\n"); - - /* - * FIXME: Put the USB host controller into reset. - */ - - /* - * FIXME: Stop the USB clock. - */ - //omap_disable_device(dev); - + omap_ohci_clock_power(0); } /*-------------------------------------------------------------------------*/ +void usb_hcd_omap_remove (struct usb_hcd *, struct platform_device *); + /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ @@ -309,7 +284,7 @@ struct platform_device *pdev) { int retval; - struct usb_hcd *hcd; + struct usb_hcd *hcd = 0; struct ohci_hcd *ohci; if (pdev->num_resources != 2) { @@ -319,14 +294,20 @@ } if (pdev->resource[0].flags != IORESOURCE_MEM - || pdev->resource[1].flags != IORESOURCE_IRQ) { + || pdev->resource[1].flags != IORESOURCE_IRQ) { printk(KERN_ERR "hcd probe: invalid resource type\n"); return -ENODEV; } + usb_host_ck = clk_get(0, "usb_hhc_ck"); + if (IS_ERR(usb_host_ck)) + return PTR_ERR(usb_host_ck); + hcd = usb_create_hcd (driver, &pdev->dev, pdev->dev.bus_id); - if (!hcd) - return -ENOMEM; + if (!hcd) { + retval = -ENOMEM; + goto err0; + } hcd->rsrc_start = pdev->resource[0].start; hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; @@ -336,9 +317,7 @@ goto err1; } - /* FIXME: Cast to pointer from integer of different size! - * Needs ioremap */ - hcd->regs = (void __iomem *) (u32) hcd->rsrc_start; + hcd->regs = (void __iomem *) (int) IO_ADDRESS(hcd->rsrc_start); ohci = hcd_to_ohci(hcd); ohci_hcd_init(ohci); @@ -347,20 +326,21 @@ if (retval < 0) goto err2; - retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); + retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), SA_INTERRUPT); if (retval == 0) return retval; omap_stop_hc(pdev); - err2: +err2: release_mem_region(hcd->rsrc_start, hcd->rsrc_len); - err1: +err1: usb_put_hcd(hcd); +err0: + clk_put(usb_host_ck); return retval; } -/* may be called without controller electrically present */ /* may be called with controller, bus, and devices active */ /** @@ -381,6 +361,7 @@ omap_stop_hc(pdev); release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_put_hcd(hcd); + clk_put(usb_host_ck); } /*-------------------------------------------------------------------------*/ @@ -397,7 +378,7 @@ writel(OHCI_CTRL_RWC, &ohci->regs->control); if ((ret = ohci_run (ohci)) < 0) { - err ("can't start %s", hcd->self.bus_name); + dev_err(hcd->self.controller, "can't start\n"); ohci_stop (hcd); return ret; } @@ -466,13 +447,14 @@ (void) otg_set_host(ohci->transceiver, 0); put_device(ohci->transceiver->dev); } + dev_set_drvdata(dev, NULL); return 0; } /*-------------------------------------------------------------------------*/ -#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) +#ifdef CONFIG_PM /* states match PCI usage, always suspending the root hub except that * 4 ~= D3cold (ACPI D3) with clock off (resume sees reset). @@ -493,13 +475,12 @@ status = ohci_hub_suspend(ohci_to_hcd(ohci)); if (status == 0) { if (state >= 4) { - /* power off + reset */ - OTG_SYSCON_2_REG &= ~UHOST_EN; + omap_ohci_clock_power(0); ohci_to_hcd(ohci)->self.root_hub->state = USB_STATE_SUSPENDED; state = 4; } - ohci_to_hcd(ohci)->state = HCD_STATE_SUSPENDED; + ohci_to_hcd(ohci)->state = HC_STATE_SUSPENDED; dev->power.power_state = state; } up(&ohci_to_hcd(ohci)->self.root_hub->serialize); @@ -521,7 +502,7 @@ if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; - OTG_SYSCON_2_REG |= UHOST_EN; + omap_ohci_clock_power(1); /* FALLTHROUGH */ default: dev_dbg(dev, "resume from %d\n", dev->power.power_state); @@ -552,7 +533,7 @@ .bus = &platform_bus_type, .probe = ohci_hcd_omap_drv_probe, .remove = ohci_hcd_omap_drv_remove, -#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) +#ifdef CONFIG_PM .suspend = ohci_omap_suspend, .resume = ohci_omap_resume, #endif diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c --- a/drivers/usb/host/ohci-q.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/host/ohci-q.c 2005-03-30 16:58:50 -08:00 @@ -172,7 +172,7 @@ { int branch; - if (ohci_to_hcd(ohci)->state == USB_STATE_QUIESCING) + if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING) return -EAGAIN; ed->state = ED_OPER; @@ -663,7 +663,7 @@ /* NOTE: mishandles transfers >8K, some >4K */ td_fill (ohci, info, data, data_len, urb, cnt++); } - info = is_out + info = (is_out || data_len == 0) ? TD_CC | TD_DP_IN | TD_T_DATA1 : TD_CC | TD_DP_OUT | TD_T_DATA1; td_fill (ohci, info, data, 0, urb, cnt++); @@ -923,7 +923,7 @@ /* only take off EDs that the HC isn't using, accounting for * frame counter wraps and EDs with partially retired TDs */ - if (likely (regs && HCD_IS_RUNNING(ohci_to_hcd(ohci)->state))) { + if (likely (regs && HC_IS_RUNNING(ohci_to_hcd(ohci)->state))) { if (tick_before (tick, ed->tick)) { skip_ed: last = &ed->ed_next; @@ -1005,7 +1005,7 @@ /* but if there's work queued, reschedule */ if (!list_empty (&ed->td_list)) { - if (HCD_IS_RUNNING(ohci_to_hcd(ohci)->state)) + if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state)) ed_schedule (ohci, ed); } @@ -1014,8 +1014,8 @@ } /* maybe reenable control and bulk lists */ - if (HCD_IS_RUNNING(ohci_to_hcd(ohci)->state) - && ohci_to_hcd(ohci)->state != USB_STATE_QUIESCING + if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state) + && ohci_to_hcd(ohci)->state != HC_STATE_QUIESCING && !ohci->ed_rm_list) { u32 command = 0, control = 0; diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h --- a/drivers/usb/host/ohci.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/host/ohci.h 2005-03-30 16:58:50 -08:00 @@ -594,17 +594,21 @@ static inline void disable (struct ohci_hcd *ohci) { - ohci_to_hcd(ohci)->state = USB_STATE_HALT; + ohci_to_hcd(ohci)->state = HC_STATE_HALT; } #define FI 0x2edf /* 12000 bits per frame (-1) */ #define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) +#define FIT (1 << 31) #define LSTHRESH 0x628 /* lowspeed bit threshold */ -static inline void periodic_reinit (struct ohci_hcd *ohci) +static void periodic_reinit (struct ohci_hcd *ohci) { - u32 fi = ohci->fminterval & 0x0ffff; + u32 fi = ohci->fminterval & 0x03fff; + u32 fit = ohci_readl(ohci, &ohci->regs->fminterval) & FIT; + ohci_writel (ohci, (fit ^ FIT) | ohci->fminterval, + &ohci->regs->fminterval); ohci_writel (ohci, ((9 * fi) / 10) & 0x3fff, &ohci->regs->periodicstart); } diff -Nru a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c --- a/drivers/usb/host/sl811-hcd.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/host/sl811-hcd.c 2005-03-30 16:58:48 -08:00 @@ -101,12 +101,12 @@ sl811->port1 = (1 << USB_PORT_FEAT_POWER); sl811->irq_enable = SL11H_INTMASK_INSRMV; - hcd->self.controller->power.power_state = PM_SUSPEND_ON; + hcd->self.controller->power.power_state = PMSG_ON; } else { sl811->port1 = 0; sl811->irq_enable = 0; - hcd->state = USB_STATE_HALT; - hcd->self.controller->power.power_state = PM_SUSPEND_DISK; + hcd->state = HC_STATE_HALT; + hcd->self.controller->power.power_state = PMSG_SUSPEND; } sl811->ctrl1 = 0; sl811_write(sl811, SL11H_IRQ_ENABLE, 0); @@ -834,7 +834,7 @@ /* don't submit to a dead or disabled port */ if (!(sl811->port1 & (1 << USB_PORT_FEAT_ENABLE)) - || !HCD_IS_RUNNING(hcd->state)) { + || !HC_IS_RUNNING(hcd->state)) { retval = -ENODEV; goto fail; } @@ -1562,12 +1562,12 @@ return -ENOMEM; udev->speed = USB_SPEED_FULL; - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; if (sl811->board) hcd->can_wakeup = sl811->board->can_wakeup; - if (hcd_register_root(udev, hcd) != 0) { + if (usb_hcd_register_root_hub(udev, hcd) != 0) { usb_put_dev(udev); sl811h_stop(hcd); return -ENODEV; @@ -1772,7 +1772,7 @@ */ static int -sl811h_suspend(struct device *dev, u32 state, u32 phase) +sl811h_suspend(struct device *dev, pm_message_t state, u32 phase) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct sl811 *sl811 = hcd_to_sl811(hcd); @@ -1809,7 +1809,7 @@ return 0; } - dev->power.power_state = PM_SUSPEND_ON; + dev->power.power_state = PMSG_ON; return sl811h_hub_resume(hcd); } diff -Nru a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c --- a/drivers/usb/host/uhci-debug.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/host/uhci-debug.c 2005-03-30 16:58:47 -08:00 @@ -406,7 +406,7 @@ struct uhci_td *td; struct list_head *tmp, *head; - spin_lock_irqsave(&uhci->schedule_lock, flags); + spin_lock_irqsave(&uhci->lock, flags); out += sprintf(out, "HC status\n"); out += uhci_show_status(uhci, out, len - (out - buf)); @@ -492,7 +492,7 @@ if (debug > 2) out += uhci_show_lists(uhci, out, len - (out - buf)); - spin_unlock_irqrestore(&uhci->schedule_lock, flags); + spin_unlock_irqrestore(&uhci->lock, flags); return out - buf; } diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/host/uhci-hcd.c 2005-03-30 16:58:51 -08:00 @@ -89,7 +89,7 @@ static kmem_cache_t *uhci_up_cachep; /* urb_priv */ -static unsigned int uhci_get_current_frame_number(struct uhci_hcd *uhci); +static void uhci_get_current_frame_number(struct uhci_hcd *uhci); static void hc_state_transitions(struct uhci_hcd *uhci); /* If a transfer is still active after this much time, turn off FSBR */ @@ -113,15 +113,9 @@ struct uhci_hcd *uhci = hcd_to_uhci(hcd); struct urb_priv *up; unsigned long flags; - int called_uhci_finish_completion = 0; - spin_lock_irqsave(&uhci->schedule_lock, flags); - if (!list_empty(&uhci->urb_remove_list) && - uhci_get_current_frame_number(uhci) != uhci->urb_remove_age) { - uhci_remove_pending_urbps(uhci); - uhci_finish_completion(hcd, NULL); - called_uhci_finish_completion = 1; - } + spin_lock_irqsave(&uhci->lock, flags); + uhci_scan_schedule(uhci, NULL); list_for_each_entry(up, &uhci->urb_list, urb_list) { struct urb *u = up->urb; @@ -134,11 +128,6 @@ spin_unlock(&u->lock); } - spin_unlock_irqrestore(&uhci->schedule_lock, flags); - - /* Wake up anyone waiting for an URB to complete */ - if (called_uhci_finish_completion) - wake_up_all(&uhci->waitqh); /* Really disable FSBR */ if (!uhci->fsbr && uhci->fsbrtimeout && time_after_eq(jiffies, uhci->fsbrtimeout)) { @@ -149,9 +138,10 @@ /* Poll for and perform state transitions */ hc_state_transitions(uhci); if (unlikely(uhci->suspended_ports && uhci->state != UHCI_SUSPENDED)) - uhci_check_resume(uhci); + uhci_check_ports(uhci); init_stall_timer(hcd); + spin_unlock_irqrestore(&uhci->lock, flags); } static int init_stall_timer(struct usb_hcd *hcd) @@ -172,8 +162,6 @@ struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned long io_addr = uhci->io_addr; unsigned short status; - struct urb_priv *urbp, *tmp; - unsigned int age; /* * Read the interrupt status, and write it back to clear the @@ -202,37 +190,9 @@ if (status & USBSTS_RD) uhci->resume_detect = 1; - spin_lock(&uhci->schedule_lock); - - age = uhci_get_current_frame_number(uhci); - if (age != uhci->qh_remove_age) - uhci_free_pending_qhs(uhci); - if (age != uhci->td_remove_age) - uhci_free_pending_tds(uhci); - if (age != uhci->urb_remove_age) - uhci_remove_pending_urbps(uhci); - - if (list_empty(&uhci->urb_remove_list) && - list_empty(&uhci->td_remove_list) && - list_empty(&uhci->qh_remove_list)) - uhci_clear_next_interrupt(uhci); - else - uhci_set_next_interrupt(uhci); - - /* Walk the list of pending URBs to see which ones completed - * (must be _safe because uhci_transfer_result() dequeues URBs) */ - list_for_each_entry_safe(urbp, tmp, &uhci->urb_list, urb_list) { - struct urb *urb = urbp->urb; - - /* Checks the status and does all of the magic necessary */ - uhci_transfer_result(uhci, urb); - } - uhci_finish_completion(hcd, regs); - - spin_unlock(&uhci->schedule_lock); - - /* Wake up anyone waiting for an URB to complete */ - wake_up_all(&uhci->waitqh); + spin_lock(&uhci->lock); + uhci_scan_schedule(uhci, regs); + spin_unlock(&uhci->lock); return IRQ_HANDLED; } @@ -256,6 +216,7 @@ /* Another 10ms delay */ msleep(10); uhci->resume_detect = 0; + uhci->is_stopped = UHCI_IS_STOPPED; } static void suspend_hc(struct uhci_hcd *uhci) @@ -266,6 +227,12 @@ uhci->state = UHCI_SUSPENDED; uhci->resume_detect = 0; outw(USBCMD_EGSM, io_addr + USBCMD); + + /* FIXME: Wait for the controller to actually stop */ + uhci_get_current_frame_number(uhci); + uhci->is_stopped = UHCI_IS_STOPPED; + + uhci_scan_schedule(uhci, NULL); } static void wakeup_hc(struct uhci_hcd *uhci) @@ -280,6 +247,7 @@ outw(USBCMD_FGR | USBCMD_EGSM, io_addr + USBCMD); uhci->state = UHCI_RESUMING_1; uhci->state_end = jiffies + msecs_to_jiffies(20); + uhci->is_stopped = 0; break; case UHCI_RESUMING_1: /* End global resume */ @@ -386,11 +354,13 @@ } /* - * returns the current frame number for a USB bus/controller. + * Store the current frame number in uhci->frame_number if the controller + * is runnning */ -static unsigned int uhci_get_current_frame_number(struct uhci_hcd *uhci) +static void uhci_get_current_frame_number(struct uhci_hcd *uhci) { - return inw(uhci->io_addr + USBFRNUM); + if (!uhci->is_stopped) + uhci->frame_number = inw(uhci->io_addr + USBFRNUM); } static int start_hc(struct uhci_hcd *uhci) @@ -413,6 +383,9 @@ msleep(1); } + /* Mark controller as running before we enable interrupts */ + uhci_to_hcd(uhci)->state = HC_STATE_RUNNING; + /* Turn on PIRQ and all interrupts */ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, USBLEGSUP_DEFAULT); @@ -427,8 +400,8 @@ uhci->state = UHCI_RUNNING_GRACE; uhci->state_end = jiffies + HZ; outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD); + uhci->is_stopped = 0; - uhci_to_hcd(uhci)->state = USB_STATE_RUNNING; return 0; } @@ -524,7 +497,7 @@ uhci->fsbr = 0; uhci->fsbrtimeout = 0; - spin_lock_init(&uhci->schedule_lock); + spin_lock_init(&uhci->lock); INIT_LIST_HEAD(&uhci->qh_remove_list); INIT_LIST_HEAD(&uhci->td_remove_list); @@ -678,7 +651,7 @@ udev->speed = USB_SPEED_FULL; - if (hcd_register_root(udev, hcd) != 0) { + if (usb_hcd_register_root_hub(udev, hcd) != 0) { dev_err(uhci_dev(uhci), "unable to start root hub\n"); retval = -ENOMEM; goto err_start_root_hub; @@ -733,26 +706,11 @@ struct uhci_hcd *uhci = hcd_to_uhci(hcd); del_timer_sync(&uhci->stall_timer); - - /* - * At this point, we're guaranteed that no new connects can be made - * to this bus since there are no more parents - */ - reset_hc(uhci); - spin_lock_irq(&uhci->schedule_lock); - uhci_free_pending_qhs(uhci); - uhci_free_pending_tds(uhci); - uhci_remove_pending_urbps(uhci); - uhci_finish_completion(hcd, NULL); - - uhci_free_pending_qhs(uhci); - uhci_free_pending_tds(uhci); - spin_unlock_irq(&uhci->schedule_lock); - - /* Wake up anyone waiting for an URB to complete */ - wake_up_all(&uhci->waitqh); + spin_lock_irq(&uhci->lock); + uhci_scan_schedule(uhci, NULL); + spin_unlock_irq(&uhci->lock); release_uhci(uhci); } @@ -762,13 +720,19 @@ { struct uhci_hcd *uhci = hcd_to_uhci(hcd); + spin_lock_irq(&uhci->lock); + /* Don't try to suspend broken motherboards, reset instead */ - if (suspend_allowed(uhci)) { + if (suspend_allowed(uhci)) suspend_hc(uhci); - uhci->saved_framenumber = - inw(uhci->io_addr + USBFRNUM) & 0x3ff; - } else + else { + spin_unlock_irq(&uhci->lock); reset_hc(uhci); + spin_lock_irq(&uhci->lock); + uhci_scan_schedule(uhci, NULL); + } + + spin_unlock_irq(&uhci->lock); return 0; } @@ -779,6 +743,8 @@ pci_set_master(to_pci_dev(uhci_dev(uhci))); + spin_lock_irq(&uhci->lock); + if (uhci->state == UHCI_SUSPENDED) { /* @@ -789,7 +755,7 @@ */ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0); - outw(uhci->saved_framenumber, uhci->io_addr + USBFRNUM); + outw(uhci->frame_number, uhci->io_addr + USBFRNUM); outl(uhci->fl->dma_handle, uhci->io_addr + USBFLBASEADD); outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | USBINTR_SP, uhci->io_addr + USBINTR); @@ -797,11 +763,15 @@ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, USBLEGSUP_DEFAULT); } else { + spin_unlock_irq(&uhci->lock); reset_hc(uhci); if ((rc = start_hc(uhci)) != 0) return rc; + spin_lock_irq(&uhci->lock); } - hcd->state = USB_STATE_RUNNING; + hcd->state = HC_STATE_RUNNING; + + spin_unlock_irq(&uhci->lock); return 0; } #endif @@ -817,7 +787,17 @@ static int uhci_hcd_get_frame_number(struct usb_hcd *hcd) { - return uhci_get_current_frame_number(hcd_to_uhci(hcd)); + struct uhci_hcd *uhci = hcd_to_uhci(hcd); + int frame_number; + unsigned long flags; + + /* Minimize latency by avoiding the spinlock */ + local_irq_save(flags); + rmb(); + frame_number = (uhci->is_stopped ? uhci->frame_number : + inw(uhci->io_addr + USBFRNUM)); + local_irq_restore(flags); + return frame_number; } static const char hcd_name[] = "uhci_hcd"; diff -Nru a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h --- a/drivers/usb/host/uhci-hcd.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/host/uhci-hcd.h 2005-03-30 16:58:49 -08:00 @@ -358,39 +358,44 @@ struct uhci_td *term_td; /* Terminating TD, see UHCI bug */ struct uhci_qh *skelqh[UHCI_NUM_SKELQH]; /* Skeleton QH's */ - spinlock_t schedule_lock; - struct uhci_frame_list *fl; /* P: uhci->schedule_lock */ + spinlock_t lock; + struct uhci_frame_list *fl; /* P: uhci->lock */ int fsbr; /* Full-speed bandwidth reclamation */ unsigned long fsbrtimeout; /* FSBR delay */ enum uhci_state state; /* FIXME: needs a spinlock */ unsigned long state_end; /* Time of next transition */ - int resume_detect; /* Need a Global Resume */ - unsigned int saved_framenumber; /* Save during PM suspend */ + unsigned int frame_number; /* As of last check */ + unsigned int is_stopped; +#define UHCI_IS_STOPPED 9999 /* Larger than a frame # */ + + unsigned int scan_in_progress:1; /* Schedule scan is running */ + unsigned int need_rescan:1; /* Redo the schedule scan */ + unsigned int resume_detect:1; /* Need a Global Resume */ - /* Support for port suspend/resume */ + /* Support for port suspend/resume/reset */ unsigned long port_c_suspend; /* Bit-arrays of ports */ unsigned long suspended_ports; unsigned long resuming_ports; - unsigned long resume_timeout; /* Time to stop signalling */ + unsigned long ports_timeout; /* Time to stop signalling */ /* Main list of URB's currently controlled by this HC */ - struct list_head urb_list; /* P: uhci->schedule_lock */ + struct list_head urb_list; /* P: uhci->lock */ /* List of QH's that are done, but waiting to be unlinked (race) */ - struct list_head qh_remove_list; /* P: uhci->schedule_lock */ + struct list_head qh_remove_list; /* P: uhci->lock */ unsigned int qh_remove_age; /* Age in frames */ /* List of TD's that are done, but waiting to be freed (race) */ - struct list_head td_remove_list; /* P: uhci->schedule_lock */ + struct list_head td_remove_list; /* P: uhci->lock */ unsigned int td_remove_age; /* Age in frames */ /* List of asynchronously unlinked URB's */ - struct list_head urb_remove_list; /* P: uhci->schedule_lock */ + struct list_head urb_remove_list; /* P: uhci->lock */ unsigned int urb_remove_age; /* Age in frames */ /* List of URB's awaiting completion callback */ - struct list_head complete_list; /* P: uhci->schedule_lock */ + struct list_head complete_list; /* P: uhci->lock */ int rh_numports; @@ -436,13 +441,13 @@ * Locking in uhci.c * * Almost everything relating to the hardware schedule and processing - * of URBs is protected by uhci->schedule_lock. urb->status is protected - * by urb->lock; that's the one exception. + * of URBs is protected by uhci->lock. urb->status is protected by + * urb->lock; that's the one exception. * - * To prevent deadlocks, never lock uhci->schedule_lock while holding - * urb->lock. The safe order of locking is: + * To prevent deadlocks, never lock uhci->lock while holding urb->lock. + * The safe order of locking is: * - * #1 uhci->schedule_lock + * #1 uhci->lock * #2 urb->lock */ diff -Nru a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c --- a/drivers/usb/host/uhci-hub.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/host/uhci-hub.c 2005-03-30 16:58:47 -08:00 @@ -66,7 +66,6 @@ /* UHCI controllers don't automatically stop resume signalling after 20 msec, * so we have to poll and check timeouts in order to take care of it. - * FIXME: Synchronize access to these fields by a spinlock. */ static void uhci_finish_suspend(struct uhci_hcd *uhci, int port, unsigned long port_addr) @@ -87,22 +86,37 @@ } } -static void uhci_check_resume(struct uhci_hcd *uhci) +static void uhci_check_ports(struct uhci_hcd *uhci) { unsigned int port; unsigned long port_addr; + int status; for (port = 0; port < uhci->rh_numports; ++port) { port_addr = uhci->io_addr + USBPORTSC1 + 2 * port; - if (unlikely(inw(port_addr) & USBPORTSC_RD)) { + status = inw(port_addr); + if (unlikely(status & USBPORTSC_PR)) { + if (time_after_eq(jiffies, uhci->ports_timeout)) { + CLR_RH_PORTSTAT(USBPORTSC_PR); + udelay(10); + + /* If the port was enabled before, turning + * reset on caused a port enable change. + * Turning reset off causes a port connect + * status change. Clear these changes. */ + CLR_RH_PORTSTAT(USBPORTSC_CSC | USBPORTSC_PEC); + SET_RH_PORTSTAT(USBPORTSC_PE); + } + } + if (unlikely(status & USBPORTSC_RD)) { if (!test_bit(port, &uhci->resuming_ports)) { /* Port received a wakeup request */ set_bit(port, &uhci->resuming_ports); - uhci->resume_timeout = jiffies + + uhci->ports_timeout = jiffies + msecs_to_jiffies(20); } else if (time_after_eq(jiffies, - uhci->resume_timeout)) { + uhci->ports_timeout)) { uhci_finish_suspend(uhci, port, port_addr); } } @@ -118,7 +132,9 @@ unsigned int port = wIndex - 1; unsigned long port_addr = uhci->io_addr + USBPORTSC1 + 2 * port; u16 wPortChange, wPortStatus; + unsigned long flags; + spin_lock_irqsave(&uhci->lock, flags); switch (typeReq) { case GetHubStatus: @@ -128,9 +144,7 @@ if (port >= uhci->rh_numports) goto err; - if (uhci->resuming_ports) - uhci_check_resume(uhci); - + uhci_check_ports(uhci); status = inw(port_addr); /* Intel controllers report the OverCurrent bit active on. @@ -203,15 +217,12 @@ OK(0); case USB_PORT_FEAT_RESET: SET_RH_PORTSTAT(USBPORTSC_PR); - mdelay(50); /* USB v1.1 7.1.7.3 */ - CLR_RH_PORTSTAT(USBPORTSC_PR); - udelay(10); /* Reset terminates Resume signalling */ uhci_finish_suspend(uhci, port, port_addr); - SET_RH_PORTSTAT(USBPORTSC_PE); - mdelay(10); - CLR_RH_PORTSTAT(USBPORTSC_PEC|USBPORTSC_CSC); + + /* USB v2.0 7.1.7.5 */ + uhci->ports_timeout = jiffies + msecs_to_jiffies(50); OK(0); case USB_PORT_FEAT_POWER: /* UHCI has no power switching */ @@ -238,8 +249,6 @@ if (test_bit(port, &uhci->suspended_ports) && !test_and_set_bit(port, &uhci->resuming_ports)) { - uhci->resume_timeout = jiffies + - msecs_to_jiffies(20); SET_RH_PORTSTAT(USBPORTSC_RD); /* The controller won't allow RD to be set @@ -249,6 +258,10 @@ if (!(inw(port_addr) & USBPORTSC_RD)) uhci_finish_suspend(uhci, port, port_addr); + else + /* USB v2.0 7.1.7.7 */ + uhci->ports_timeout = jiffies + + msecs_to_jiffies(20); } OK(0); case USB_PORT_FEAT_C_SUSPEND: @@ -280,6 +293,7 @@ err: retval = -EPIPE; } + spin_unlock_irqrestore(&uhci->lock, flags); return retval; } diff -Nru a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c --- a/drivers/usb/host/uhci-q.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/host/uhci-q.c 2005-03-30 16:58:47 -08:00 @@ -264,7 +264,6 @@ { struct uhci_qh *pqh; __le32 newlink; - unsigned int age; if (!qh) return; @@ -310,10 +309,10 @@ list_del_init(&qh->urbp->queue_list); qh->urbp = NULL; - age = uhci_get_current_frame_number(uhci); - if (age != uhci->qh_remove_age) { + uhci_get_current_frame_number(uhci); + if (uhci->frame_number + uhci->is_stopped != uhci->qh_remove_age) { uhci_free_pending_qhs(uhci); - uhci->qh_remove_age = age; + uhci->qh_remove_age = uhci->frame_number; } /* Check to see if the remove list is empty. Set the IOC bit */ @@ -492,7 +491,6 @@ { struct uhci_td *td, *tmp; struct urb_priv *urbp; - unsigned int age; urbp = (struct urb_priv *)urb->hcpriv; if (!urbp) @@ -502,10 +500,10 @@ dev_warn(uhci_dev(uhci), "urb %p still on uhci->urb_list " "or uhci->remove_list!\n", urb); - age = uhci_get_current_frame_number(uhci); - if (age != uhci->td_remove_age) { + uhci_get_current_frame_number(uhci); + if (uhci->frame_number + uhci->is_stopped != uhci->td_remove_age) { uhci_free_pending_tds(uhci); - uhci->td_remove_age = age; + uhci->td_remove_age = uhci->frame_number; } /* Check to see if the remove list is empty. Set the IOC bit */ @@ -1063,11 +1061,11 @@ limits = isochronous_find_limits(uhci, urb, &start, &end); if (urb->transfer_flags & URB_ISO_ASAP) { - if (limits) - urb->start_frame = - (uhci_get_current_frame_number(uhci) + - 10) & (UHCI_NUMFRAMES - 1); - else + if (limits) { + uhci_get_current_frame_number(uhci); + urb->start_frame = (uhci->frame_number + 10) + & (UHCI_NUMFRAMES - 1); + } else urb->start_frame = end; } else { urb->start_frame &= (UHCI_NUMFRAMES - 1); @@ -1184,7 +1182,7 @@ struct urb *eurb; int bustime; - spin_lock_irqsave(&uhci->schedule_lock, flags); + spin_lock_irqsave(&uhci->lock, flags); ret = urb->status; if (ret != -EINPROGRESS) /* URB already unlinked! */ @@ -1242,7 +1240,7 @@ ret = 0; out: - spin_unlock_irqrestore(&uhci->schedule_lock, flags); + spin_unlock_irqrestore(&uhci->lock, flags); return ret; } @@ -1371,9 +1369,8 @@ struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned long flags; struct urb_priv *urbp; - unsigned int age; - spin_lock_irqsave(&uhci->schedule_lock, flags); + spin_lock_irqsave(&uhci->lock, flags); urbp = urb->hcpriv; if (!urbp) /* URB was never linked! */ goto done; @@ -1381,10 +1378,10 @@ uhci_unlink_generic(uhci, urb); - age = uhci_get_current_frame_number(uhci); - if (age != uhci->urb_remove_age) { + uhci_get_current_frame_number(uhci); + if (uhci->frame_number + uhci->is_stopped != uhci->urb_remove_age) { uhci_remove_pending_urbps(uhci); - uhci->urb_remove_age = age; + uhci->urb_remove_age = uhci->frame_number; } /* If we're the first, set the next interrupt bit */ @@ -1393,7 +1390,7 @@ list_add_tail(&urbp->urb_list, &uhci->urb_remove_list); done: - spin_unlock_irqrestore(&uhci->schedule_lock, flags); + spin_unlock_irqrestore(&uhci->lock, flags); return 0; } @@ -1455,28 +1452,27 @@ static void uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs) -__releases(uhci->schedule_lock) -__acquires(uhci->schedule_lock) +__releases(uhci->lock) +__acquires(uhci->lock) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_destroy_urb_priv(uhci, urb); - spin_unlock(&uhci->schedule_lock); + spin_unlock(&uhci->lock); usb_hcd_giveback_urb(hcd, urb, regs); - spin_lock(&uhci->schedule_lock); + spin_lock(&uhci->lock); } -static void uhci_finish_completion(struct usb_hcd *hcd, struct pt_regs *regs) +static void uhci_finish_completion(struct uhci_hcd *uhci, struct pt_regs *regs) { - struct uhci_hcd *uhci = hcd_to_uhci(hcd); struct urb_priv *urbp, *tmp; list_for_each_entry_safe(urbp, tmp, &uhci->complete_list, urb_list) { struct urb *urb = urbp->urb; list_del_init(&urbp->urb_list); - uhci_finish_urb(hcd, urb, regs); + uhci_finish_urb(uhci_to_hcd(uhci), urb, regs); } } @@ -1485,4 +1481,59 @@ /* Splice the urb_remove_list onto the end of the complete_list */ list_splice_init(&uhci->urb_remove_list, uhci->complete_list.prev); +} + +/* Process events in the schedule, but only in one thread at a time */ +static void uhci_scan_schedule(struct uhci_hcd *uhci, struct pt_regs *regs) +{ + struct urb_priv *urbp, *tmp; + + /* Don't allow re-entrant calls */ + if (uhci->scan_in_progress) { + uhci->need_rescan = 1; + return; + } + uhci->scan_in_progress = 1; + rescan: + uhci->need_rescan = 0; + + uhci_get_current_frame_number(uhci); + + if (uhci->frame_number + uhci->is_stopped != uhci->qh_remove_age) + uhci_free_pending_qhs(uhci); + if (uhci->frame_number + uhci->is_stopped != uhci->td_remove_age) + uhci_free_pending_tds(uhci); + if (uhci->frame_number + uhci->is_stopped != uhci->urb_remove_age) + uhci_remove_pending_urbps(uhci); + + /* Walk the list of pending URBs to see which ones completed + * (must be _safe because uhci_transfer_result() dequeues URBs) */ + list_for_each_entry_safe(urbp, tmp, &uhci->urb_list, urb_list) { + struct urb *urb = urbp->urb; + + /* Checks the status and does all of the magic necessary */ + uhci_transfer_result(uhci, urb); + } + uhci_finish_completion(uhci, regs); + + /* If the controller is stopped, we can finish these off right now */ + if (uhci->is_stopped) { + uhci_free_pending_qhs(uhci); + uhci_free_pending_tds(uhci); + uhci_remove_pending_urbps(uhci); + } + + if (uhci->need_rescan) + goto rescan; + uhci->scan_in_progress = 0; + + if (list_empty(&uhci->urb_remove_list) && + list_empty(&uhci->td_remove_list) && + list_empty(&uhci->qh_remove_list)) + uhci_clear_next_interrupt(uhci); + else + uhci_set_next_interrupt(uhci); + + /* Wake up anyone waiting for an URB to complete */ + wake_up_all(&uhci->waitqh); } diff -Nru a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig --- a/drivers/usb/image/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/image/Kconfig 2005-03-30 16:58:47 -08:00 @@ -28,14 +28,3 @@ The scanner will appear as a scsi generic device to the rest of the system. Scsi support is required. This driver can be compiled as a module, called microtek. - -config USB_HPUSBSCSI - tristate "HP53xx USB scanner support" - depends on USB && SCSI && BROKEN - help - Say Y here if you want support for the HP 53xx series of scanners - and the Minolta Scan Dual. - The scanner will be accessible as a SCSI device. - Please note that recent versions of SANE use usbfs, not this driver. - This can be compiled as a module, called hpusbscsi. - diff -Nru a/drivers/usb/image/Makefile b/drivers/usb/image/Makefile --- a/drivers/usb/image/Makefile 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/image/Makefile 2005-03-30 16:58:50 -08:00 @@ -3,5 +3,4 @@ # obj-$(CONFIG_USB_MDC800) += mdc800.o -obj-$(CONFIG_USB_HPUSBSCSI) += hpusbscsi.o obj-$(CONFIG_USB_MICROTEK) += microtek.o diff -Nru a/drivers/usb/image/hpusbscsi.c b/drivers/usb/image/hpusbscsi.c --- a/drivers/usb/image/hpusbscsi.c 2005-03-30 16:58:51 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,523 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../scsi/scsi.h" -#include - -#include "hpusbscsi.h" - -#define DEBUG(x...) \ - printk( KERN_DEBUG x ) - -static char *states[]={"FREE", "BEGINNING", "WORKING", "ERROR", "WAIT", "PREMATURE"}; - -#define TRACE_STATE printk(KERN_DEBUG"hpusbscsi->state = %s at line %d\n", states[hpusbscsi->state], __LINE__) - -static Scsi_Host_Template hpusbscsi_scsi_host_template = { - .module = THIS_MODULE, - .name = "hpusbscsi", - .proc_name = "hpusbscsi", - .queuecommand = hpusbscsi_scsi_queuecommand, - .eh_abort_handler = hpusbscsi_scsi_abort, - .eh_host_reset_handler = hpusbscsi_scsi_host_reset, - .sg_tablesize = SG_ALL, - .can_queue = 1, - .this_id = -1, - .cmd_per_lun = 1, - .use_clustering = 1, - .emulated = 1, -}; - -static int -hpusbscsi_usb_probe(struct usb_interface *intf, - const struct usb_device_id *id) -{ - struct usb_device *dev = interface_to_usbdev(intf); - struct usb_host_interface *altsetting = intf->cur_altsetting; - struct hpusbscsi *new; - int error = -ENOMEM; - int i; - - if (altsetting->desc.bNumEndpoints != 3) { - printk (KERN_ERR "Wrong number of endpoints\n"); - return -ENODEV; - } - - new = kmalloc(sizeof(struct hpusbscsi), GFP_KERNEL); - if (!new) - return -ENOMEM; - memset(new, 0, sizeof(struct hpusbscsi)); - new->dataurb = usb_alloc_urb(0, GFP_KERNEL); - if (!new->dataurb) - goto out_kfree; - new->controlurb = usb_alloc_urb(0, GFP_KERNEL); - if (!new->controlurb) - goto out_free_dataurb; - - new->dev = dev; - init_waitqueue_head(&new->pending); - init_waitqueue_head(&new->deathrow); - - error = -ENODEV; - for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { - if ((altsetting->endpoint[i].desc. - bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_BULK) { - if (altsetting->endpoint[i].desc. - bEndpointAddress & USB_DIR_IN) { - new->ep_in = - altsetting->endpoint[i].desc. - bEndpointAddress & - USB_ENDPOINT_NUMBER_MASK; - } else { - new->ep_out = - altsetting->endpoint[i].desc. - bEndpointAddress & - USB_ENDPOINT_NUMBER_MASK; - } - } else { - new->ep_int = - altsetting->endpoint[i].desc. - bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; - new->interrupt_interval= altsetting->endpoint[i].desc. - bInterval; - } - } - - /* build and submit an interrupt URB for status byte handling */ - usb_fill_int_urb(new->controlurb, new->dev, - usb_rcvintpipe(new->dev, new->ep_int), - &new->scsi_state_byte, 1, - control_interrupt_callback,new, - new->interrupt_interval); - - if (usb_submit_urb(new->controlurb, GFP_KERNEL) < 0) - goto out_free_controlurb; - - /* In host->hostdata we store a pointer to desc */ - new->host = scsi_host_alloc(&hpusbscsi_scsi_host_template, sizeof(new)); - if (!new->host) - goto out_kill_controlurb; - - new->host->hostdata[0] = (unsigned long)new; - scsi_add_host(new->host, &intf->dev); /* XXX handle failure */ - scsi_scan_host(new->host); - - new->sense_command[0] = REQUEST_SENSE; - new->sense_command[4] = HPUSBSCSI_SENSE_LENGTH; - - usb_set_intfdata(intf, new); - return 0; - - out_kill_controlurb: - usb_kill_urb(new->controlurb); - out_free_controlurb: - usb_free_urb(new->controlurb); - out_free_dataurb: - usb_free_urb(new->dataurb); - out_kfree: - kfree(new); - return error; -} - -static void -hpusbscsi_usb_disconnect(struct usb_interface *intf) -{ - struct hpusbscsi *desc = usb_get_intfdata(intf); - - usb_set_intfdata(intf, NULL); - - scsi_remove_host(desc->host); - usb_kill_urb(desc->controlurb); - scsi_host_put(desc->host); - - usb_free_urb(desc->controlurb); - usb_free_urb(desc->dataurb); - kfree(desc); -} - -static struct usb_device_id hpusbscsi_usb_ids[] = { - {USB_DEVICE (0x03f0, 0x0701)}, /* HP 53xx */ - {USB_DEVICE (0x03f0, 0x0801)}, /* HP 7400 */ - {USB_DEVICE (0x0638, 0x0268)}, /*iVina 1200U */ - {USB_DEVICE (0x0638, 0x026a)}, /*Scan Dual II */ - {USB_DEVICE (0x0638, 0x0A13)}, /*Avision AV600U */ - {USB_DEVICE (0x0638, 0x0A16)}, /*Avision DS610CU Scancopier */ - {USB_DEVICE (0x0638, 0x0A18)}, /*Avision AV600U Plus */ - {USB_DEVICE (0x0638, 0x0A23)}, /*Avision AV220 */ - {USB_DEVICE (0x0638, 0x0A24)}, /*Avision AV210 */ - {USB_DEVICE (0x0686, 0x4004)}, /*Minolta Elite II */ - {} /* Terminating entry */ -}; - -MODULE_DEVICE_TABLE (usb, hpusbscsi_usb_ids); -MODULE_LICENSE("GPL"); - - -static struct usb_driver hpusbscsi_usb_driver = { - .owner = THIS_MODULE, - .name ="hpusbscsi", - .probe =hpusbscsi_usb_probe, - .disconnect =hpusbscsi_usb_disconnect, - .id_table =hpusbscsi_usb_ids, -}; - -/* module initialisation */ - -static int __init -hpusbscsi_init (void) -{ - return usb_register(&hpusbscsi_usb_driver); -} - -static void __exit -hpusbscsi_exit (void) -{ - usb_deregister(&hpusbscsi_usb_driver); -} - -module_init (hpusbscsi_init); -module_exit (hpusbscsi_exit); - -static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback) -{ - struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->device->host->hostdata[0]); - usb_complete_t usb_callback; - int res; - - /* we don't answer for anything but our single device on any faked host controller */ - if ( srb->device->lun || srb->device->id || srb->device->channel ) { - if (callback) { - srb->result = DID_BAD_TARGET; - callback(srb); - } - goto out; - } - - /* Now we need to decide which callback to give to the urb we send the command with */ - - if (!srb->bufflen) { - if (srb->cmnd[0] == REQUEST_SENSE){ - hpusbscsi->current_data_pipe = usb_rcvbulkpipe(hpusbscsi->dev, hpusbscsi->ep_in); - usb_callback = request_sense_callback; - } else { - usb_callback = simple_command_callback; - } - } else { - if (likely(srb->use_sg)) { - usb_callback = scatter_gather_callback; - hpusbscsi->fragment = 0; - } else { - usb_callback = simple_payload_callback; - } - /* Now we find out which direction data is to be transferred in */ - hpusbscsi->current_data_pipe = DIRECTION_IS_IN(srb->cmnd[0]) ? - usb_rcvbulkpipe(hpusbscsi->dev, hpusbscsi->ep_in) - : - usb_sndbulkpipe(hpusbscsi->dev, hpusbscsi->ep_out) - ; - } - - - TRACE_STATE; - - /* We zero the sense buffer to avoid confusing user space */ - memset(srb->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); - - hpusbscsi->state = HP_STATE_BEGINNING; - TRACE_STATE; - - /* We prepare the urb for writing out the scsi command */ - usb_fill_bulk_urb( - hpusbscsi->dataurb, - hpusbscsi->dev, - usb_sndbulkpipe(hpusbscsi->dev,hpusbscsi->ep_out), - srb->cmnd, - srb->cmd_len, - usb_callback, - hpusbscsi - ); - hpusbscsi->scallback = callback; - hpusbscsi->srb = srb; - - res = usb_submit_urb(hpusbscsi->dataurb, GFP_ATOMIC); - if (unlikely(res)) { - hpusbscsi->state = HP_STATE_FREE; - TRACE_STATE; - if (likely(callback != NULL)) { - srb->result = DID_ERROR; - callback(srb); - } - } - -out: - return 0; -} - -static int hpusbscsi_scsi_host_reset (Scsi_Cmnd *srb) -{ - struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->device->host->hostdata[0]); - - printk(KERN_DEBUG"SCSI reset requested.\n"); - //usb_reset_device(hpusbscsi->dev); - //printk(KERN_DEBUG"SCSI reset completed.\n"); - hpusbscsi->state = HP_STATE_FREE; - - return 0; -} - -static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb) -{ - struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->device->host->hostdata[0]); - printk(KERN_DEBUG"Requested is canceled.\n"); - - usb_kill_urb(hpusbscsi->dataurb); - usb_kill_urb(hpusbscsi->controlurb); - hpusbscsi->state = HP_STATE_FREE; - - return SCSI_ABORT_PENDING; -} - -/* usb interrupt handlers - they are all running IN INTERRUPT ! */ - -static void handle_usb_error (struct hpusbscsi *hpusbscsi) -{ - if (likely(hpusbscsi->scallback != NULL)) { - hpusbscsi->srb->result = DID_ERROR; - hpusbscsi->scallback(hpusbscsi->srb); - } - hpusbscsi->state = HP_STATE_FREE; -} - -static void control_interrupt_callback (struct urb *u, struct pt_regs *regs) -{ - struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; - u8 scsi_state; - -DEBUG("Getting status byte %d \n",hpusbscsi->scsi_state_byte); - if(unlikely(u->status < 0)) { - if (likely(hpusbscsi->state != HP_STATE_FREE)) - handle_usb_error(hpusbscsi); - if (u->status == -ECONNRESET || u->status == -ENOENT || u->status == -ESHUTDOWN) - return; - else - goto resub; - } - - scsi_state = hpusbscsi->scsi_state_byte; - if (hpusbscsi->state != HP_STATE_ERROR) { - hpusbscsi->srb->result &= SCSI_ERR_MASK; - hpusbscsi->srb->result |= scsi_state; - } - - if (scsi_state == CHECK_CONDITION << 1) { - if (hpusbscsi->state == HP_STATE_WAIT) { - issue_request_sense(hpusbscsi); - } else { - /* we request sense after an eventual data transfer */ - hpusbscsi->state = HP_STATE_ERROR; - } - } - - if (hpusbscsi->scallback != NULL && hpusbscsi->state == HP_STATE_WAIT && scsi_state != CHECK_CONDITION <<1 ) - /* we do a callback to the scsi layer if and only if all data has been transferred */ - hpusbscsi->scallback(hpusbscsi->srb); - - TRACE_STATE; - switch (hpusbscsi->state) { - case HP_STATE_WAIT: - hpusbscsi->state = HP_STATE_FREE; - TRACE_STATE; - break; - case HP_STATE_WORKING: - case HP_STATE_BEGINNING: - hpusbscsi->state = HP_STATE_PREMATURE; - TRACE_STATE; - break; - case HP_STATE_ERROR: - break; - default: - printk(KERN_ERR"hpusbscsi: Unexpected status report.\n"); - TRACE_STATE; - hpusbscsi->state = HP_STATE_FREE; - TRACE_STATE; - break; - } -resub: - usb_submit_urb(u, GFP_ATOMIC); -} - -static void simple_command_callback(struct urb *u, struct pt_regs *regs) -{ - struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; - if (unlikely(u->status<0)) { - handle_usb_error(hpusbscsi); - return; - } - TRACE_STATE; - if (hpusbscsi->state != HP_STATE_PREMATURE) { - TRACE_STATE; - hpusbscsi->state = HP_STATE_WAIT; - } else { - if (likely(hpusbscsi->scallback != NULL)) - hpusbscsi->scallback(hpusbscsi->srb); - hpusbscsi->state = HP_STATE_FREE; - TRACE_STATE; - } -} - -static void scatter_gather_callback(struct urb *u, struct pt_regs *regs) -{ - struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; - struct scatterlist *sg = hpusbscsi->srb->buffer; - usb_complete_t callback; - int res; - - DEBUG("Going through scatter/gather\n"); - if (unlikely(u->status < 0)) { - handle_usb_error(hpusbscsi); - return; - } - - if (hpusbscsi->fragment + 1 != hpusbscsi->srb->use_sg) - callback = scatter_gather_callback; - else - callback = simple_done; - - TRACE_STATE; - if (hpusbscsi->state != HP_STATE_PREMATURE) - hpusbscsi->state = HP_STATE_WORKING; - TRACE_STATE; - - usb_fill_bulk_urb( - u, - hpusbscsi->dev, - hpusbscsi->current_data_pipe, - page_address(sg[hpusbscsi->fragment].page) + - sg[hpusbscsi->fragment].offset, - sg[hpusbscsi->fragment++].length, - callback, - hpusbscsi - ); - - res = usb_submit_urb(u, GFP_ATOMIC); - if (unlikely(res)) - handle_usb_error(hpusbscsi); - TRACE_STATE; -} - -static void simple_done (struct urb *u, struct pt_regs *regs) -{ - struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; - - if (unlikely(u->status < 0)) { - handle_usb_error(hpusbscsi); - return; - } - DEBUG("Data transfer done\n"); - TRACE_STATE; - if (hpusbscsi->state != HP_STATE_PREMATURE) { - if (unlikely(u->status < 0)) { - handle_usb_error(hpusbscsi); - } else { - if (hpusbscsi->state != HP_STATE_ERROR) { - hpusbscsi->state = HP_STATE_WAIT; - } else { - issue_request_sense(hpusbscsi); - } - } - } else { - if (likely(hpusbscsi->scallback != NULL)) - hpusbscsi->scallback(hpusbscsi->srb); - hpusbscsi->state = HP_STATE_FREE; - } -} - -static void simple_payload_callback (struct urb *u, struct pt_regs *regs) -{ - struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; - int res; - - if (unlikely(u->status<0)) { - handle_usb_error(hpusbscsi); - return; - } - - usb_fill_bulk_urb( - u, - hpusbscsi->dev, - hpusbscsi->current_data_pipe, - hpusbscsi->srb->buffer, - hpusbscsi->srb->bufflen, - simple_done, - hpusbscsi - ); - - res = usb_submit_urb(u, GFP_ATOMIC); - if (unlikely(res)) { - handle_usb_error(hpusbscsi); - return; - } - TRACE_STATE; - if (hpusbscsi->state != HP_STATE_PREMATURE) { - hpusbscsi->state = HP_STATE_WORKING; - TRACE_STATE; - } -} - -static void request_sense_callback (struct urb *u, struct pt_regs *regs) -{ - struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context; - - if (u->status<0) { - handle_usb_error(hpusbscsi); - return; - } - - usb_fill_bulk_urb( - u, - hpusbscsi->dev, - hpusbscsi->current_data_pipe, - hpusbscsi->srb->sense_buffer, - SCSI_SENSE_BUFFERSIZE, - simple_done, - hpusbscsi - ); - - if (0 > usb_submit_urb(u, GFP_ATOMIC)) { - handle_usb_error(hpusbscsi); - return; - } - if (hpusbscsi->state != HP_STATE_PREMATURE && hpusbscsi->state != HP_STATE_ERROR) - hpusbscsi->state = HP_STATE_WORKING; -} - -static void issue_request_sense (struct hpusbscsi *hpusbscsi) -{ - usb_fill_bulk_urb( - hpusbscsi->dataurb, - hpusbscsi->dev, - usb_sndbulkpipe(hpusbscsi->dev, hpusbscsi->ep_out), - &hpusbscsi->sense_command, - SENSE_COMMAND_SIZE, - request_sense_callback, - hpusbscsi - ); - - hpusbscsi->current_data_pipe = usb_rcvbulkpipe(hpusbscsi->dev, hpusbscsi->ep_in); - - if (0 > usb_submit_urb(hpusbscsi->dataurb, GFP_ATOMIC)) { - handle_usb_error(hpusbscsi); - } -} - - diff -Nru a/drivers/usb/image/hpusbscsi.h b/drivers/usb/image/hpusbscsi.h --- a/drivers/usb/image/hpusbscsi.h 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,73 +0,0 @@ -/* Header file for the hpusbscsi driver */ -/* (C) Copyright 2001 Oliver Neukum */ -/* sponsored by the Linux Usb Project */ -/* large parts based on or taken from code by John Fremlin and Matt Dharm */ -/* this file is licensed under the GPL */ - -/* A big thanks to Jose for untiring testing */ - -typedef void (*scsi_callback)(Scsi_Cmnd *); - -#define SENSE_COMMAND_SIZE 6 -#define HPUSBSCSI_SENSE_LENGTH 0x16 - -struct hpusbscsi -{ - struct usb_device *dev; /* NULL indicates unplugged device */ - int ep_out; - int ep_in; - int ep_int; - int interrupt_interval; - int number; - int fragment; - struct Scsi_Host *host; - - scsi_callback scallback; - Scsi_Cmnd *srb; - - - wait_queue_head_t pending; - wait_queue_head_t deathrow; - - struct urb *dataurb; - struct urb *controlurb; - - - int state; - int current_data_pipe; - u8 sense_command[SENSE_COMMAND_SIZE]; - u8 scsi_state_byte; -}; - -#define SCSI_ERR_MASK ~0x3fu - -static const unsigned char scsi_command_direction[256/8] = { - 0x28, 0x81, 0x14, 0x14, 0x20, 0x01, 0x90, 0x77, - 0x0C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -#define DIRECTION_IS_IN(x) ((scsi_command_direction[x>>3] >> (x & 7)) & 1) - -static void simple_command_callback(struct urb *u, struct pt_regs *regs); -static void scatter_gather_callback(struct urb *u, struct pt_regs *regs); -static void simple_payload_callback (struct urb *u, struct pt_regs *regs); -static void request_sense_callback (struct urb *u, struct pt_regs *regs); -static void control_interrupt_callback (struct urb *u, struct pt_regs *regs); -static void simple_done (struct urb *u, struct pt_regs *regs); -static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback); -static int hpusbscsi_scsi_host_reset (Scsi_Cmnd *srb); -static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb); -static void issue_request_sense (struct hpusbscsi *hpusbscsi); - -/* defines for internal driver state */ -#define HP_STATE_FREE 0 /*ready for next request */ -#define HP_STATE_BEGINNING 1 /*command being transferred */ -#define HP_STATE_WORKING 2 /* data transfer stage */ -#define HP_STATE_ERROR 3 /* error has been reported */ -#define HP_STATE_WAIT 4 /* waiting for status transfer */ -#define HP_STATE_PREMATURE 5 /* status prematurely reported */ - - - diff -Nru a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c --- a/drivers/usb/image/microtek.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/image/microtek.c 2005-03-30 16:58:50 -08:00 @@ -703,6 +703,7 @@ int ep_in_set[3]; /* this will break if we have more than three endpoints which is why we check */ int *ep_in_current = ep_in_set; + int err_retval = -ENOMEM; struct mts_desc * new_desc; struct vendor_product const* p; @@ -809,7 +810,10 @@ goto out_free_urb; new_desc->host->hostdata[0] = (unsigned long)new_desc; - scsi_add_host(new_desc->host, NULL); /* XXX handle failure */ + if (scsi_add_host(new_desc->host, NULL)) { + err_retval = -EIO; + goto out_free_urb; + } scsi_scan_host(new_desc->host); usb_set_intfdata(intf, new_desc); @@ -820,7 +824,7 @@ out_kfree: kfree(new_desc); out: - return -ENOMEM; + return err_retval; } static void mts_usb_disconnect (struct usb_interface *intf) diff -Nru a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c --- a/drivers/usb/input/aiptek.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/input/aiptek.c 2005-03-30 16:58:49 -08:00 @@ -794,7 +794,7 @@ * manufacturing revisions. In any event, we consider these * IDs to not be model-specific nor unique. */ -struct usb_device_id aiptek_ids[] = { +static const struct usb_device_id aiptek_ids[] = { {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x01)}, {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x10)}, {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20)}, diff -Nru a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c --- a/drivers/usb/media/ibmcam.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/media/ibmcam.c 2005-03-30 16:58:48 -08:00 @@ -1036,7 +1036,8 @@ * History: * 1/21/00 Created. */ -void ibmcam_ProcessIsocData(struct uvd *uvd, struct usbvideo_frame *frame) +static void ibmcam_ProcessIsocData(struct uvd *uvd, + struct usbvideo_frame *frame) { enum ParseState newstate; long copylen = 0; diff -Nru a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c --- a/drivers/usb/media/pwc/pwc-ctrl.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/media/pwc/pwc-ctrl.c 2005-03-30 16:58:47 -08:00 @@ -151,7 +151,7 @@ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, \ value, \ pdev->vcinterface, \ - &buf, buflen, HZ / 2) + &buf, buflen, 500) #define RecvControlMsg(request, value, buflen) \ usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0), \ @@ -159,7 +159,7 @@ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, \ value, \ pdev->vcinterface, \ - &buf, buflen, HZ / 2) + &buf, buflen, 500) #if PWC_DEBUG @@ -194,7 +194,7 @@ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, VIDEO_OUTPUT_CONTROL_FORMATTER, index, - buf, buflen, HZ); + buf, buflen, 1000); } @@ -341,7 +341,7 @@ static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) { - const struct Kiara_table_entry *pChoose = 0; + const struct Kiara_table_entry *pChoose = NULL; int fps, ret; unsigned char buf[12]; struct Kiara_table_entry RawEntry = {6, 773, 1272, {0xAD, 0xF4, 0x10, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}}; @@ -1087,7 +1087,7 @@ return 0; } -int pwc_mpt_reset(struct pwc_device *pdev, int flags) +static int pwc_mpt_reset(struct pwc_device *pdev, int flags) { unsigned char buf; diff -Nru a/drivers/usb/media/pwc/pwc-dec23.c b/drivers/usb/media/pwc/pwc-dec23.c --- a/drivers/usb/media/pwc/pwc-dec23.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/media/pwc/pwc-dec23.c 2005-03-30 16:58:51 -08:00 @@ -87,7 +87,7 @@ * Timon: 0 <= ver <= 15 * */ -void fill_table_color(unsigned int version, const unsigned int *romtable, +static void fill_table_color(unsigned int version, const unsigned int *romtable, unsigned char *p0004, unsigned char *p8004) { @@ -150,7 +150,7 @@ * precision = (pdev->xx + pdev->yy) * */ -void fill_table_dc00_d800(unsigned int precision, unsigned int *pdc00, unsigned int *pd800) +static void fill_table_dc00_d800(unsigned int precision, unsigned int *pdc00, unsigned int *pd800) { int i; unsigned int offset1, offset2; diff -Nru a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c --- a/drivers/usb/media/pwc/pwc-if.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/media/pwc/pwc-if.c 2005-03-30 16:58:49 -08:00 @@ -141,7 +141,7 @@ static int pwc_video_open(struct inode *inode, struct file *file); static int pwc_video_close(struct inode *inode, struct file *file); -static ssize_t pwc_video_read(struct file *file, char *buf, +static ssize_t pwc_video_read(struct file *file, char __user * buf, size_t count, loff_t *ppos); static unsigned int pwc_video_poll(struct file *file, poll_table *wait); static int pwc_video_ioctl(struct inode *inode, struct file *file, @@ -322,7 +322,7 @@ case 730: case 740: case 750: - Trace(TRACE_MEMORY,"private_data(%d)\n",sizeof(struct pwc_dec23_private)); + Trace(TRACE_MEMORY,"private_data(%Zd)\n",sizeof(struct pwc_dec23_private)); kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */ break; case 645: @@ -618,7 +618,7 @@ int i, fst, flen; int awake; struct pwc_frame_buf *fbuf; - unsigned char *fillptr = 0, *iso_buf = 0; + unsigned char *fillptr = NULL, *iso_buf = NULL; awake = 0; pdev = (struct pwc_device *)urb->context; @@ -844,7 +844,7 @@ pdev->vmax_packet_size = -1; for (i = 0; i < idesc->desc.bNumEndpoints; i++) if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) { - pdev->vmax_packet_size = idesc->endpoint[i].desc.wMaxPacketSize; + pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize); break; } @@ -1170,7 +1170,7 @@ device is tricky anyhow. */ -static ssize_t pwc_video_read(struct file *file, char *buf, +static ssize_t pwc_video_read(struct file *file, char __user * buf, size_t count, loff_t *ppos) { struct video_device *vdev = file->private_data; @@ -1179,7 +1179,7 @@ DECLARE_WAITQUEUE(wait, current); int bytes_to_read; - Trace(TRACE_READ, "video_read(0x%p, %p, %d) called.\n", vdev, buf, count); + Trace(TRACE_READ, "video_read(0x%p, %p, %Zd) called.\n", vdev, buf, count); if (vdev == NULL) return -EFAULT; pdev = vdev->priv; @@ -1653,7 +1653,8 @@ /* Check if we can handle this device */ Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n", - udev->descriptor.idVendor, udev->descriptor.idProduct, + le16_to_cpu(udev->descriptor.idVendor), + le16_to_cpu(udev->descriptor.idProduct), intf->altsetting->desc.bInterfaceNumber); /* the interfaces are probed one by one. We are only interested in the @@ -1663,8 +1664,8 @@ if (intf->altsetting->desc.bInterfaceNumber > 0) return -ENODEV; - vendor_id = udev->descriptor.idVendor; - product_id = udev->descriptor.idProduct; + vendor_id = le16_to_cpu(udev->descriptor.idVendor); + product_id = le16_to_cpu(udev->descriptor.idProduct); if (vendor_id == 0x0471) { switch (product_id) { @@ -1896,7 +1897,7 @@ } init_MUTEX(&pdev->modlock); - pdev->ptrlock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&pdev->ptrlock); pdev->udev = udev; init_waitqueue_head(&pdev->frameq); @@ -1915,7 +1916,7 @@ pdev->vdev->owner = THIS_MODULE; video_set_drvdata(pdev->vdev, pdev); - pdev->release = udev->descriptor.bcdDevice; + pdev->release = le16_to_cpu(udev->descriptor.bcdDevice); Trace(TRACE_PROBE, "Release: %04x\n", pdev->release); /* Now search device_hint[] table for a match, so we can hint a node number. */ @@ -2027,7 +2028,7 @@ * Initialization code & module stuff */ -static char *size = NULL; +static char size[10]; static int fps = 0; static int fbufs = 0; static int mbufs = 0; @@ -2036,23 +2037,23 @@ static int leds[2] = { -1, -1 }; static char *dev_hint[MAX_DEV_HINTS] = { }; -MODULE_PARM(size, "s"); +module_param_string(size, size, sizeof(size), 0); MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); -MODULE_PARM(fps, "i"); +module_param(fps, int, 0000); MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); -MODULE_PARM(fbufs, "i"); +module_param(fbufs, int, 0000); MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve"); -MODULE_PARM(mbufs, "i"); +module_param(mbufs, int, 0000); MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers"); -MODULE_PARM(trace, "i"); +module_param(trace, int, 0000); MODULE_PARM_DESC(trace, "For debugging purposes"); -MODULE_PARM(power_save, "i"); +module_param(power_save, bool, 0000); MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off"); -MODULE_PARM(compression, "i"); +module_param(compression, int, 0000); MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)"); -MODULE_PARM(leds, "2i"); +module_param_array(leds, int, NULL, 0000); MODULE_PARM_DESC(leds, "LED on,off time in milliseconds"); -MODULE_PARM(dev_hint, "0-20s"); +module_param_array(dev_hint, charp, NULL, 0000); MODULE_PARM_DESC(dev_hint, "Device node hints"); MODULE_DESCRIPTION("Philips & OEM USB webcam driver"); @@ -2078,7 +2079,7 @@ Info("Default framerate set to %d.\n", default_fps); } - if (size) { + if (size[0]) { /* string; try matching with array */ for (sz = 0; sz < PSZ_MAX; sz++) { if (!strcmp(sizenames[sz], size)) { /* Found! */ diff -Nru a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c --- a/drivers/usb/media/usbvideo.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/media/usbvideo.c 2005-03-30 16:58:50 -08:00 @@ -1814,11 +1814,11 @@ { int i, j; - if (uvd->debug > 1) - info("%s($%p)", __FUNCTION__, uvd); - if ((uvd == NULL) || (!uvd->streaming) || (uvd->dev == NULL)) return; + + if (uvd->debug > 1) + info("%s($%p)", __FUNCTION__, uvd); /* Unschedule all of the iso td's */ for (i=0; i < USBVIDEO_NUMSBUF; i++) { diff -Nru a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c --- a/drivers/usb/misc/emi26.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/misc/emi26.c 2005-03-30 16:58:48 -08:00 @@ -30,6 +30,7 @@ #define EMI26_VENDOR_ID 0x086a /* Emagic Soft-und Hardware GmBH */ #define EMI26_PRODUCT_ID 0x0100 /* EMI 2|6 without firmware */ +#define EMI26B_PRODUCT_ID 0x0102 /* EMI 2|6 without firmware */ #define ANCHOR_LOAD_INTERNAL 0xA0 /* Vendor specific request code for Anchor Upload/Download (This one is implemented in the core) */ #define ANCHOR_LOAD_EXTERNAL 0xA3 /* This command is not implemented in the core. Requires firmware */ @@ -203,6 +204,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(EMI26_VENDOR_ID, EMI26_PRODUCT_ID) }, + { USB_DEVICE(EMI26_VENDOR_ID, EMI26B_PRODUCT_ID) }, { } /* Terminating entry */ }; diff -Nru a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c --- a/drivers/usb/misc/rio500.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/misc/rio500.c 2005-03-30 16:58:49 -08:00 @@ -40,6 +40,7 @@ #include #include #include +#include #include "rio500_usb.h" @@ -264,6 +265,7 @@ write_rio(struct file *file, const char __user *buffer, size_t count, loff_t * ppos) { + DEFINE_WAIT(wait); struct rio_usb_data *rio = &rio_instance; unsigned long copy_size; @@ -319,7 +321,9 @@ errn = -ETIME; goto error; } - interruptible_sleep_on_timeout(&rio-> wait_q, NAK_TIMEOUT); + prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE); + schedule_timeout(NAK_TIMEOUT); + finish_wait(&rio->wait_q, &wait); continue; } else if (!result && partial) { obuf += partial; @@ -349,6 +353,7 @@ static ssize_t read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos) { + DEFINE_WAIT(wait); struct rio_usb_data *rio = &rio_instance; ssize_t read_count; unsigned int partial; @@ -399,8 +404,9 @@ err("read_rio: maxretry timeout"); return -ETIME; } - interruptible_sleep_on_timeout(&rio->wait_q, - NAK_TIMEOUT); + prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE); + schedule_timeout(NAK_TIMEOUT); + finish_wait(&rio->wait_q, &wait); continue; } else if (result != -EREMOTEIO) { up(&(rio->lock)); diff -Nru a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c --- a/drivers/usb/misc/sisusbvga/sisusb.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/misc/sisusbvga/sisusb.c 2005-03-30 16:58:49 -08:00 @@ -564,7 +564,7 @@ struct sisusb_packet *packet) { int ret; - int bytes_transferred = 0; + ssize_t bytes_transferred = 0; __le32 tmp; if (len == 6) @@ -601,7 +601,7 @@ unsigned int tflags) { int ret; - int bytes_transferred = 0; + ssize_t bytes_transferred = 0; __le32 tmp; if (len == 6) @@ -983,7 +983,7 @@ msgcount++; if (msgcount < 500) printk(KERN_ERR - "sisusbvga[%d]: Wrote %d of " + "sisusbvga[%d]: Wrote %Zd of " "%d bytes, error %d\n", sisusb->minor, *bytes_written, length, ret); @@ -1381,7 +1381,8 @@ static int sisusb_clear_vram(struct sisusb_usb_data *sisusb, u32 address, int length) { - int ret, i, j; + int ret, i; + ssize_t j; if (address < sisusb->vrambase) return 1; @@ -2271,7 +2272,7 @@ /* fops */ -int +static int sisusb_open(struct inode *inode, struct file *file) { struct sisusb_usb_data *sisusb; @@ -2361,7 +2362,7 @@ kfree(sisusb); } -int +static int sisusb_release(struct inode *inode, struct file *file) { struct sisusb_usb_data *sisusb; @@ -2399,7 +2400,7 @@ return 0; } -ssize_t +static ssize_t sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { struct sisusb_usb_data *sisusb; @@ -2540,7 +2541,7 @@ return errno ? errno : bytes_read; } -ssize_t +static ssize_t sisusb_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { diff -Nru a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c --- a/drivers/usb/misc/usblcd.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/misc/usblcd.c 2005-03-30 16:58:47 -08:00 @@ -1,14 +1,16 @@ /***************************************************************************** * USBLCD Kernel Driver * - * See http://www.usblcd.de for Hardware and Documentation. * - * Version 1.03 * - * (C) 2002 Adams IT Services * + * Version 1.05 * + * (C) 2005 Georges Toth * * * * This file is licensed under the GPL. See COPYING in the package. * - * Based on rio500.c by Cesar Miquel (miquel@df.uba.ar) which is based on * - * hp_scanner.c by David E. Nelson (dnelson@jump.net) * + * Based on usb-skeleton.c 2.0 by Greg Kroah-Hartman (greg@kroah.com) * * * - * 23.7.02 RA changed minor device number to the official assigned one * + * * + * 28.02.05 Complete rewrite of the original usblcd.c driver, * + * based on usb_skeleton.c. * + * This new driver allows more than one USB-LCD to be connected * + * and controlled, at once * *****************************************************************************/ #include #include @@ -18,74 +20,129 @@ #include #include -#define DRIVER_VERSION "USBLCD Driver Version 1.04" +#define DRIVER_VERSION "USBLCD Driver Version 1.05" #define USBLCD_MINOR 144 #define IOCTL_GET_HARD_VERSION 1 #define IOCTL_GET_DRV_VERSION 2 -/* stall/wait timeout for USBLCD */ -#define NAK_TIMEOUT (10*HZ) -#define IBUF_SIZE 0x1000 -#define OBUF_SIZE 0x10000 +static struct usb_device_id id_table [] = { + { .idVendor = 0x10D2, .match_flags = USB_DEVICE_ID_MATCH_VENDOR, }, + { }, +}; +MODULE_DEVICE_TABLE (usb, id_table); + -struct lcd_usb_data { - struct usb_device *lcd_dev; /* init: probe_lcd */ - unsigned int ifnum; /* Interface number of the USB device */ - int isopen; /* nz if open */ - int present; /* Device is present on the bus */ - char *obuf, *ibuf; /* transfer buffers */ - char bulk_in_ep, bulk_out_ep; /* Endpoint assignments */ - wait_queue_head_t wait_q; /* for timeouts */ +struct usb_lcd { + struct usb_device * udev; /* init: probe_lcd */ + struct usb_interface * interface; /* the interface for this device */ + unsigned char * bulk_in_buffer; /* the buffer to receive data */ + size_t bulk_in_size; /* the size of the receive buffer */ + __u8 bulk_in_endpointAddr; /* the address of the bulk in endpoint */ + __u8 bulk_out_endpointAddr; /* the address of the bulk out endpoint */ + struct kref kref; }; +#define to_lcd_dev(d) container_of(d, struct usb_lcd, kref) + +static struct usb_driver lcd_driver; + + +static void lcd_delete(struct kref *kref) +{ + struct usb_lcd *dev = to_lcd_dev(kref); + + usb_put_dev(dev->udev); + kfree (dev->bulk_in_buffer); + kfree (dev); +} -static struct lcd_usb_data lcd_instance; -static int open_lcd(struct inode *inode, struct file *file) +static int lcd_open(struct inode *inode, struct file *file) { - struct lcd_usb_data *lcd = &lcd_instance; + struct usb_lcd *dev; + struct usb_interface *interface; + int subminor; + int retval = 0; + + subminor = iminor(inode); + + interface = usb_find_interface(&lcd_driver, subminor); + if (!interface) { + err ("USBLCD: %s - error, can't find device for minor %d", + __FUNCTION__, subminor); + retval = -ENODEV; + goto exit; + } - if (lcd->isopen || !lcd->present) { - return -EBUSY; + dev = usb_get_intfdata(interface); + if (!dev) { + retval = -ENODEV; + goto exit; } - lcd->isopen = 1; - init_waitqueue_head(&lcd->wait_q); + /* increment our usage count for the device */ + kref_get(&dev->kref); - info("USBLCD opened."); + /* save our object in the file's private structure */ + file->private_data = dev; - return 0; +exit: + return retval; } -static int close_lcd(struct inode *inode, struct file *file) +static int lcd_release(struct inode *inode, struct file *file) { - struct lcd_usb_data *lcd = &lcd_instance; + struct usb_lcd *dev; - lcd->isopen = 0; + dev = (struct usb_lcd *)file->private_data; + if (dev == NULL) + return -ENODEV; - info("USBLCD closed."); + /* decrement the count on our device */ + kref_put(&dev->kref, lcd_delete); return 0; } -static int -ioctl_lcd(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +static ssize_t lcd_read(struct file *file, char __user * buffer, size_t count, loff_t *ppos) +{ + struct usb_lcd *dev; + int retval = 0; + + dev = (struct usb_lcd *)file->private_data; + + /* do a blocking bulk read to get data from the device */ + retval = usb_bulk_msg(dev->udev, + usb_rcvbulkpipe(dev->udev, dev->bulk_in_endpointAddr), + dev->bulk_in_buffer, + min(dev->bulk_in_size, count), + &count, 10000); + + /* if the read was successful, copy the data to userspace */ + if (!retval) { + if (copy_to_user(buffer, dev->bulk_in_buffer, count)) + retval = -EFAULT; + else + retval = count; + } + + return retval; +} + +static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - struct lcd_usb_data *lcd = &lcd_instance; + struct usb_lcd *dev; u16 bcdDevice; char buf[30]; - /* Sanity check to make sure lcd is connected, powered, etc */ - if (lcd == NULL || - lcd->present == 0 || - lcd->lcd_dev == NULL) - return -1; - + dev = (struct usb_lcd *)file->private_data; + if (dev == NULL) + return -ENODEV; + switch (cmd) { case IOCTL_GET_HARD_VERSION: - bcdDevice = le16_to_cpu((lcd->lcd_dev)->descriptor.bcdDevice); + bcdDevice = le16_to_cpu((dev->udev)->descriptor.bcdDevice); sprintf(buf,"%1d%1d.%1d%1d", (bcdDevice & 0xF000)>>12, (bcdDevice & 0xF00)>>8, @@ -107,269 +164,240 @@ return 0; } -static ssize_t -write_lcd(struct file *file, const char __user *buffer, - size_t count, loff_t * ppos) -{ - struct lcd_usb_data *lcd = &lcd_instance; - - unsigned long copy_size; - unsigned long bytes_written = 0; - unsigned int partial; - - int result = 0; - int maxretry; - - /* Sanity check to make sure lcd is connected, powered, etc */ - if (lcd == NULL || - lcd->present == 0 || - lcd->lcd_dev == NULL) - return -1; - - do { - unsigned long thistime; - char *obuf = lcd->obuf; - - thistime = copy_size = - (count >= OBUF_SIZE) ? OBUF_SIZE : count; - if (copy_from_user(lcd->obuf, buffer, copy_size)) - return -EFAULT; - maxretry = 5; - while (thistime) { - if (!lcd->lcd_dev) - return -ENODEV; - if (signal_pending(current)) { - return bytes_written ? bytes_written : -EINTR; - } +static void lcd_write_bulk_callback(struct urb *urb, struct pt_regs *regs) +{ + struct usb_lcd *dev; - result = usb_bulk_msg(lcd->lcd_dev, - usb_sndbulkpipe(lcd->lcd_dev, 1), - obuf, thistime, &partial, 10000); - - dbg("write stats: result:%d thistime:%lu partial:%u", - result, thistime, partial); - - if (result == -ETIMEDOUT) { /* NAK - so hold for a while */ - if (!maxretry--) { - return -ETIME; - } - interruptible_sleep_on_timeout(&lcd-> wait_q, NAK_TIMEOUT); - continue; - } else if (!result && partial) { - obuf += partial; - thistime -= partial; - } else - break; - }; - if (result) { - err("Write Whoops - %x", result); - return -EIO; - } - bytes_written += copy_size; - count -= copy_size; - buffer += copy_size; - } while (count > 0); + dev = (struct usb_lcd *)urb->context; - return bytes_written ? bytes_written : -EIO; + /* sync/async unlink faults aren't errors */ + if (urb->status && + !(urb->status == -ENOENT || + urb->status == -ECONNRESET || + urb->status == -ESHUTDOWN)) { + dbg("USBLCD: %s - nonzero write bulk status received: %d", + __FUNCTION__, urb->status); + } + + /* free up our allocated buffer */ + usb_buffer_free(urb->dev, urb->transfer_buffer_length, + urb->transfer_buffer, urb->transfer_dma); } -static ssize_t -read_lcd(struct file *file, char __user *buffer, size_t count, loff_t * ppos) +static ssize_t lcd_write(struct file *file, const char __user * user_buffer, size_t count, loff_t *ppos) { - struct lcd_usb_data *lcd = &lcd_instance; - ssize_t read_count; - unsigned int partial; - int this_read; - int result; - int maxretry = 10; - char *ibuf = lcd->ibuf; - - /* Sanity check to make sure lcd is connected, powered, etc */ - if (lcd == NULL || - lcd->present == 0 || - lcd->lcd_dev == NULL) - return -1; - - read_count = 0; - - while (count > 0) { - if (signal_pending(current)) { - return read_count ? read_count : -EINTR; - } - if (!lcd->lcd_dev) - return -ENODEV; - this_read = (count >= IBUF_SIZE) ? IBUF_SIZE : count; - - result = usb_bulk_msg(lcd->lcd_dev, - usb_rcvbulkpipe(lcd->lcd_dev, 0), - ibuf, this_read, &partial, - 8000); - - dbg(KERN_DEBUG "read stats: result:%d this_read:%u partial:%u", - result, this_read, partial); - - if (partial) { - count = this_read = partial; - } else if (result == -ETIMEDOUT || result == 15) { /* FIXME: 15 ??? */ - if (!maxretry--) { - err("read_lcd: maxretry timeout"); - return -ETIME; - } - interruptible_sleep_on_timeout(&lcd->wait_q, - NAK_TIMEOUT); - continue; - } else if (result != -EREMOTEIO) { - err("Read Whoops - result:%u partial:%u this_read:%u", - result, partial, this_read); - return -EIO; - } else { - return (0); - } - - if (this_read) { - if (copy_to_user(buffer, ibuf, this_read)) - return -EFAULT; - count -= this_read; - read_count += this_read; - buffer += this_read; - } + struct usb_lcd *dev; + int retval = 0; + struct urb *urb = NULL; + char *buf = NULL; + + dev = (struct usb_lcd *)file->private_data; + + /* verify that we actually have some data to write */ + if (count == 0) + goto exit; + + /* create a urb, and a buffer for it, and copy the data to the urb */ + urb = usb_alloc_urb(0, GFP_KERNEL); + if (!urb) { + retval = -ENOMEM; + goto error; + } + + buf = usb_buffer_alloc(dev->udev, count, GFP_KERNEL, &urb->transfer_dma); + if (!buf) { + retval = -ENOMEM; + goto error; } - return read_count; + + if (copy_from_user(buf, user_buffer, count)) { + retval = -EFAULT; + goto error; + } + + /* initialize the urb properly */ + usb_fill_bulk_urb(urb, dev->udev, + usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr), + buf, count, lcd_write_bulk_callback, dev); + urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + + /* send the data out the bulk port */ + retval = usb_submit_urb(urb, GFP_KERNEL); + if (retval) { + err("USBLCD: %s - failed submitting write urb, error %d", __FUNCTION__, retval); + goto error; + } + + /* release our reference to this urb, the USB core will eventually free it entirely */ + usb_free_urb(urb); + +exit: + return count; + +error: + usb_buffer_free(dev->udev, count, buf, urb->transfer_dma); + usb_free_urb(urb); + return retval; } -static struct -file_operations usb_lcd_fops = { - .owner = THIS_MODULE, - .read = read_lcd, - .write = write_lcd, - .ioctl = ioctl_lcd, - .open = open_lcd, - .release = close_lcd, +static struct file_operations lcd_fops = { + .owner = THIS_MODULE, + .read = lcd_read, + .write = lcd_write, + .open = lcd_open, + .ioctl = lcd_ioctl, + .release = lcd_release, }; -static struct usb_class_driver usb_lcd_class = { - .name = "usb/lcd%d", - .fops = &usb_lcd_fops, - .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, - .minor_base = USBLCD_MINOR, +/* + * * usb class driver info in order to get a minor number from the usb core, + * * and to have the device registered with devfs and the driver core + * */ +static struct usb_class_driver lcd_class = { + .name = "usb/lcd%d", + .fops = &lcd_fops, + .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, + .minor_base = USBLCD_MINOR, }; -static int probe_lcd(struct usb_interface *intf, const struct usb_device_id *id) +static int lcd_probe(struct usb_interface *interface, const struct usb_device_id *id) { - struct usb_device *dev = interface_to_usbdev(intf); - struct lcd_usb_data *lcd = &lcd_instance; + struct usb_lcd *dev = NULL; + struct usb_host_interface *iface_desc; + struct usb_endpoint_descriptor *endpoint; + size_t buffer_size; int i; - int retval; + int retval = -ENOMEM; - if (le16_to_cpu(dev->descriptor.idProduct) != 0x0001) { - warn(KERN_INFO "USBLCD model not supported."); - return -ENODEV; + /* allocate memory for our device state and initialize it */ + dev = kmalloc(sizeof(*dev), GFP_KERNEL); + if (dev == NULL) { + err("Out of memory"); + goto error; } + memset(dev, 0x00, sizeof(*dev)); + kref_init(&dev->kref); + + dev->udev = usb_get_dev(interface_to_usbdev(interface)); + dev->interface = interface; - if (lcd->present == 1) { - warn(KERN_INFO "Multiple USBLCDs are not supported!"); + if (le16_to_cpu(dev->udev->descriptor.idProduct) != 0x0001) { + warn(KERN_INFO "USBLCD model not supported."); return -ENODEV; } + + /* set up the endpoint information */ + /* use only the first bulk-in and bulk-out endpoints */ + iface_desc = interface->cur_altsetting; + for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { + endpoint = &iface_desc->endpoint[i].desc; + + if (!dev->bulk_in_endpointAddr && + (endpoint->bEndpointAddress & USB_DIR_IN) && + ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) + == USB_ENDPOINT_XFER_BULK)) { + /* we found a bulk in endpoint */ + buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); + dev->bulk_in_size = buffer_size; + dev->bulk_in_endpointAddr = endpoint->bEndpointAddress; + dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL); + if (!dev->bulk_in_buffer) { + err("Could not allocate bulk_in_buffer"); + goto error; + } + } - i = le16_to_cpu(dev->descriptor.bcdDevice); - - info("USBLCD Version %1d%1d.%1d%1d found at address %d", - (i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF), - dev->devnum); - - - - lcd->present = 1; - lcd->lcd_dev = dev; - - if (!(lcd->obuf = (char *) kmalloc(OBUF_SIZE, GFP_KERNEL))) { - err("probe_lcd: Not enough memory for the output buffer"); - return -ENOMEM; + if (!dev->bulk_out_endpointAddr && + !(endpoint->bEndpointAddress & USB_DIR_IN) && + ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) + == USB_ENDPOINT_XFER_BULK)) { + /* we found a bulk out endpoint */ + dev->bulk_out_endpointAddr = endpoint->bEndpointAddress; + } } - dbg("probe_lcd: obuf address:%p", lcd->obuf); - - if (!(lcd->ibuf = (char *) kmalloc(IBUF_SIZE, GFP_KERNEL))) { - err("probe_lcd: Not enough memory for the input buffer"); - kfree(lcd->obuf); - return -ENOMEM; + if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) { + err("Could not find both bulk-in and bulk-out endpoints"); + goto error; } - dbg("probe_lcd: ibuf address:%p", lcd->ibuf); - retval = usb_register_dev(intf, &usb_lcd_class); + /* save our data pointer in this interface device */ + usb_set_intfdata(interface, dev); + + /* we can register the device now, as it is ready */ + retval = usb_register_dev(interface, &lcd_class); if (retval) { + /* something prevented us from registering this driver */ err("Not able to get a minor for this device."); - kfree(lcd->obuf); - kfree(lcd->ibuf); - return -ENOMEM; + usb_set_intfdata(interface, NULL); + goto error; } - usb_set_intfdata (intf, lcd); + i = le16_to_cpu(dev->udev->descriptor.bcdDevice); + + info("USBLCD Version %1d%1d.%1d%1d found at address %d", + (i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF), + dev->udev->devnum); + + /* let the user know what node this device is now attached to */ + info("USB LCD device now attached to USBLCD-%d", interface->minor); return 0; + +error: + if (dev) + kref_put(&dev->kref, lcd_delete); + return retval; } -static void disconnect_lcd(struct usb_interface *intf) +static void lcd_disconnect(struct usb_interface *interface) { - struct lcd_usb_data *lcd = usb_get_intfdata (intf); + struct usb_lcd *dev; + int minor = interface->minor; - usb_set_intfdata (intf, NULL); - if (lcd) { - usb_deregister_dev(intf, &usb_lcd_class); - - if (lcd->isopen) { - lcd->isopen = 0; - /* better let it finish - the release will do whats needed */ - lcd->lcd_dev = NULL; - return; - } - kfree(lcd->ibuf); - kfree(lcd->obuf); + /* prevent skel_open() from racing skel_disconnect() */ + lock_kernel(); - info("USBLCD disconnected."); + dev = usb_get_intfdata(interface); + usb_set_intfdata(interface, NULL); - lcd->present = 0; - } -} + /* give back our minor */ + usb_deregister_dev(interface, &lcd_class); + + unlock_kernel(); -static struct usb_device_id id_table [] = { - { .idVendor = 0x10D2, .match_flags = USB_DEVICE_ID_MATCH_VENDOR, }, - {}, -}; + /* decrement our usage count */ + kref_put(&dev->kref, lcd_delete); -MODULE_DEVICE_TABLE (usb, id_table); + info("USB LCD #%d now disconnected", minor); +} static struct usb_driver lcd_driver = { .owner = THIS_MODULE, .name = "usblcd", - .probe = (void *)probe_lcd, - .disconnect = disconnect_lcd, + .probe = lcd_probe, + .disconnect = lcd_disconnect, .id_table = id_table, }; static int __init usb_lcd_init(void) { - int retval; - retval = usb_register(&lcd_driver); - if (retval) - goto out; - - info("%s (C) Adams IT Services http://www.usblcd.de", DRIVER_VERSION); - info("USBLCD support registered."); -out: - return retval; + int result; + + result = usb_register(&lcd_driver); + if (result) + err("usb_register failed. Error number %d", result); + + return result; } -static void __exit usb_lcd_cleanup(void) +static void __exit usb_lcd_exit(void) { - struct lcd_usb_data *lcd = &lcd_instance; - - lcd->present = 0; usb_deregister(&lcd_driver); } module_init(usb_lcd_init); -module_exit(usb_lcd_cleanup); +module_exit(usb_lcd_exit); -MODULE_AUTHOR("Adams IT Services "); +MODULE_AUTHOR("Georges Toth "); MODULE_DESCRIPTION(DRIVER_VERSION); MODULE_LICENSE("GPL"); diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c --- a/drivers/usb/misc/usbtest.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/misc/usbtest.c 2005-03-30 16:58:50 -08:00 @@ -851,7 +851,7 @@ */ urb = kmalloc (param->sglen * sizeof (struct urb *), SLAB_KERNEL); if (!urb) - goto cleanup; + return -ENOMEM; memset (urb, 0, param->sglen * sizeof (struct urb *)); for (i = 0; i < param->sglen; i++) { int pipe = usb_rcvctrlpipe (udev, 0); diff -Nru a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c --- a/drivers/usb/mon/mon_text.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/mon/mon_text.c 2005-03-30 16:58:47 -08:00 @@ -261,6 +261,7 @@ struct mon_event_text *ep; int cnt, limit; char *pbuf; + char udir, utype; int data_len, i; add_wait_queue(&rp->wait, &waita); @@ -290,9 +291,18 @@ pbuf = rp->printf_buf; limit = rp->printf_size; + udir = usb_pipein(ep->pipe) ? 'i' : 'o'; + switch (usb_pipetype(ep->pipe)) { + case PIPE_ISOCHRONOUS: utype = 'Z'; break; + case PIPE_INTERRUPT: utype = 'I'; break; + case PIPE_CONTROL: utype = 'C'; break; + default: /* PIPE_BULK */ utype = 'B'; + } cnt += snprintf(pbuf + cnt, limit - cnt, - "%lx %u %c %08x %d %d", - ep->id, ep->tstamp, ep->type, ep->pipe, ep->status, ep->length); + "%lx %u %c %c%c:%03u:%02u %d %d", + ep->id, ep->tstamp, ep->type, + utype, udir, usb_pipedevice(ep->pipe), usb_pipeendpoint(ep->pipe), + ep->status, ep->length); if ((data_len = ep->length) > 0) { if (ep->data_flag == 0) { diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c --- a/drivers/usb/net/catc.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/net/catc.c 2005-03-30 16:58:48 -08:00 @@ -664,7 +664,8 @@ } } -void catc_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +static void catc_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) { struct catc *catc = netdev_priv(dev); strncpy(info->driver, driver_name, ETHTOOL_BUSINFO_LEN); diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/net/kaweth.c 2005-03-30 16:58:49 -08:00 @@ -594,7 +594,7 @@ struct sk_buff *skb; - if(unlikely(urb->status == -ECONNRESET || urb->status == -ECONNABORTED || urb->status == -ESHUTDOWN)) + if(unlikely(urb->status == -ECONNRESET || urb->status == -ESHUTDOWN)) /* we are killed - set a flag and wake the disconnect handler */ { kaweth->end = 1; diff -Nru a/drivers/usb/net/kawethfw.h b/drivers/usb/net/kawethfw.h --- a/drivers/usb/net/kawethfw.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/net/kawethfw.h 2005-03-30 16:58:49 -08:00 @@ -551,7 +551,7 @@ }; -const int len_kaweth_trigger_code = sizeof(kaweth_trigger_code); -const int len_kaweth_trigger_code_fix = sizeof(kaweth_trigger_code_fix); -const int len_kaweth_new_code = sizeof(kaweth_new_code); -const int len_kaweth_new_code_fix = sizeof(kaweth_new_code_fix); +static const int len_kaweth_trigger_code = sizeof(kaweth_trigger_code); +static const int len_kaweth_trigger_code_fix = sizeof(kaweth_trigger_code_fix); +static const int len_kaweth_new_code = sizeof(kaweth_new_code); +static const int len_kaweth_new_code_fix = sizeof(kaweth_new_code_fix); diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c --- a/drivers/usb/net/pegasus.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/net/pegasus.c 2005-03-30 16:58:50 -08:00 @@ -85,6 +85,11 @@ MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)"); MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0"); +/* use ethtool to change the level for any given device */ +static int msg_level = -1; +module_param (msg_level, int, 0); +MODULE_PARM_DESC (msg_level, "Override default message level"); + MODULE_DEVICE_TABLE(usb, pegasus_ids); static int update_eth_regs_async(pegasus_t *); @@ -110,7 +115,9 @@ case -ENOENT: break; default: - warn("%s: status %d", __FUNCTION__, urb->status); + if (netif_msg_drv(pegasus)) + dev_err(&pegasus->intf->dev, "%s, status %d\n", + __FUNCTION__, urb->status); } pegasus->flags &= ~ETH_REGS_CHANGED; wake_up(&pegasus->ctrl_wait); @@ -125,7 +132,9 @@ buffer = kmalloc(size, GFP_KERNEL); if (!buffer) { - warn("%s: looks like we're out of memory", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "out of memory in %s\n", + __FUNCTION__); return -ENOMEM; } add_wait_queue(&pegasus->ctrl_wait, &wait); @@ -152,7 +161,9 @@ /* using ATOMIC, we'd never wake up if we slept */ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - err("%s: BAD CTRLs %d", __FUNCTION__, ret); + if (netif_msg_drv(pegasus)) + dev_err(&pegasus->intf->dev, "%s, status %d\n", + __FUNCTION__, ret); goto out; } @@ -174,7 +185,9 @@ buffer = kmalloc(size, GFP_KERNEL); if (!buffer) { - warn("%s: looks like we're out of memory", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "out of memory in %s\n", + __FUNCTION__); return -ENOMEM; } memcpy(buffer, data, size); @@ -202,7 +215,9 @@ set_current_state(TASK_UNINTERRUPTIBLE); if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - err("%s: BAD CTRL %d", __FUNCTION__, ret); + if (netif_msg_drv(pegasus)) + dev_err(&pegasus->intf->dev, "%s, status %d\n", + __FUNCTION__, ret); goto out; } @@ -222,7 +237,9 @@ tmp = kmalloc(1, GFP_KERNEL); if (!tmp) { - warn("%s: looks like we're out of memory", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "out of memory in %s\n", + __FUNCTION__); return -ENOMEM; } memcpy(tmp, &data, 1); @@ -249,7 +266,9 @@ set_current_state(TASK_UNINTERRUPTIBLE); if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - err("%s: BAD CTRL %d", __FUNCTION__, ret); + if (netif_msg_drv(pegasus)) + dev_err(&pegasus->intf->dev, "%s, status %d\n", + __FUNCTION__, ret); goto out; } @@ -278,8 +297,9 @@ pegasus->eth_regs, 3, ctrl_callback, pegasus); if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) - err("%s: BAD CTRL %d, flgs %x", __FUNCTION__, ret, - pegasus->flags); + if (netif_msg_drv(pegasus)) + dev_err(&pegasus->intf->dev, "%s, status %d\n", + __FUNCTION__, ret); return ret; } @@ -289,21 +309,23 @@ int i; __u8 data[4] = { phy, 0, 0, indx }; __le16 regdi; + int ret; - set_register(pegasus, PhyCtrl, 0); - set_registers(pegasus, PhyAddr, sizeof (data), data); - set_register(pegasus, PhyCtrl, (indx | PHY_READ)); + ret = set_register(pegasus, PhyCtrl, 0); + ret = set_registers(pegasus, PhyAddr, sizeof (data), data); + ret = set_register(pegasus, PhyCtrl, (indx | PHY_READ)); for (i = 0; i < REG_TIMEOUT; i++) { - get_registers(pegasus, PhyCtrl, 1, data); + ret = get_registers(pegasus, PhyCtrl, 1, data); if (data[0] & PHY_DONE) break; } if (i < REG_TIMEOUT) { - get_registers(pegasus, PhyData, 2, ®di); + ret = get_registers(pegasus, PhyData, 2, ®di); *regd = le16_to_cpu(regdi); return 1; } - warn("%s: failed", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__); return 0; } @@ -311,7 +333,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int loc) { pegasus_t *pegasus = (pegasus_t *) netdev_priv(dev); - __le16 res; + u16 res; read_mii_word(pegasus, phy_id, loc, &res); return (int)res; @@ -321,20 +343,23 @@ { int i; __u8 data[4] = { phy, 0, 0, indx }; + int ret; - *(data + 1) = cpu_to_le16p(®d); - set_register(pegasus, PhyCtrl, 0); - set_registers(pegasus, PhyAddr, sizeof(data), data); - set_register(pegasus, PhyCtrl, (indx | PHY_WRITE)); + data[1] = (u8) regd; + data[2] = (u8) (regd >> 8); + ret = set_register(pegasus, PhyCtrl, 0); + ret = set_registers(pegasus, PhyAddr, sizeof(data), data); + ret = set_register(pegasus, PhyCtrl, (indx | PHY_WRITE)); for (i = 0; i < REG_TIMEOUT; i++) { - get_registers(pegasus, PhyCtrl, 1, data); + ret = get_registers(pegasus, PhyCtrl, 1, data); if (data[0] & PHY_DONE) break; } if (i < REG_TIMEOUT) return 0; - warn("%s: failed", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__); return 1; } @@ -350,23 +375,25 @@ int i; __u8 tmp; __le16 retdatai; + int ret; - set_register(pegasus, EpromCtrl, 0); - set_register(pegasus, EpromOffset, index); - set_register(pegasus, EpromCtrl, EPROM_READ); + ret = set_register(pegasus, EpromCtrl, 0); + ret = set_register(pegasus, EpromOffset, index); + ret = set_register(pegasus, EpromCtrl, EPROM_READ); for (i = 0; i < REG_TIMEOUT; i++) { - get_registers(pegasus, EpromCtrl, 1, &tmp); + ret = get_registers(pegasus, EpromCtrl, 1, &tmp); if (tmp & EPROM_DONE) break; } if (i < REG_TIMEOUT) { - get_registers(pegasus, EpromData, 2, &retdatai); + ret = get_registers(pegasus, EpromData, 2, &retdatai); *retdata = le16_to_cpu(retdatai); return 0; } - warn("%s: failed", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__); return -1; } @@ -374,40 +401,44 @@ static inline void enable_eprom_write(pegasus_t * pegasus) { __u8 tmp; + int ret; - get_registers(pegasus, EthCtrl2, 1, &tmp); - set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE); + ret = get_registers(pegasus, EthCtrl2, 1, &tmp); + ret = set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE); } static inline void disable_eprom_write(pegasus_t * pegasus) { __u8 tmp; + int ret; - get_registers(pegasus, EthCtrl2, 1, &tmp); - set_register(pegasus, EpromCtrl, 0); - set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE); + ret = get_registers(pegasus, EthCtrl2, 1, &tmp); + ret = set_register(pegasus, EpromCtrl, 0); + ret = set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE); } static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data) { int i; __u8 tmp, d[4] = { 0x3f, 0, 0, EPROM_WRITE }; + int ret; - set_registers(pegasus, EpromOffset, 4, d); + ret = set_registers(pegasus, EpromOffset, 4, d); enable_eprom_write(pegasus); - set_register(pegasus, EpromOffset, index); - set_registers(pegasus, EpromData, 2, &data); - set_register(pegasus, EpromCtrl, EPROM_WRITE); + ret = set_register(pegasus, EpromOffset, index); + ret = set_registers(pegasus, EpromData, 2, &data); + ret = set_register(pegasus, EpromCtrl, EPROM_WRITE); for (i = 0; i < REG_TIMEOUT; i++) { - get_registers(pegasus, EpromCtrl, 1, &tmp); + ret = get_registers(pegasus, EpromCtrl, 1, &tmp); if (tmp & EPROM_DONE) break; } disable_eprom_write(pegasus); if (i < REG_TIMEOUT) return 0; - warn("%s: failed", __FUNCTION__); + if (netif_msg_drv(pegasus)) + dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__); return -1; } #endif /* PEGASUS_WRITE_EEPROM */ @@ -426,9 +457,10 @@ static void set_ethernet_addr(pegasus_t * pegasus) { __u8 node_id[6]; + int ret; get_node_id(pegasus, node_id); - set_registers(pegasus, EthID, sizeof (node_id), node_id); + ret = set_registers(pegasus, EthID, sizeof (node_id), node_id); memcpy(pegasus->net->dev_addr, node_id, sizeof (node_id)); } @@ -436,19 +468,20 @@ { __u8 data = 0x8; int i; + int ret; - set_register(pegasus, EthCtrl1, data); + ret = set_register(pegasus, EthCtrl1, data); for (i = 0; i < REG_TIMEOUT; i++) { - get_registers(pegasus, EthCtrl1, 1, &data); + ret = get_registers(pegasus, EthCtrl1, 1, &data); if (~data & 0x08) { if (loopback & 1) break; if (mii_mode && (pegasus->features & HAS_HOME_PNA)) - set_register(pegasus, Gpio1, 0x34); + ret = set_register(pegasus, Gpio1, 0x34); else - set_register(pegasus, Gpio1, 0x26); - set_register(pegasus, Gpio0, pegasus->features); - set_register(pegasus, Gpio0, DEFAULT_GPIO_SET); + ret = set_register(pegasus, Gpio1, 0x26); + ret = set_register(pegasus, Gpio0, pegasus->features); + ret = set_register(pegasus, Gpio0, DEFAULT_GPIO_SET); break; } } @@ -457,8 +490,8 @@ if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS || usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) { - set_register(pegasus, Gpio0, 0x24); - set_register(pegasus, Gpio0, 0x26); + ret = set_register(pegasus, Gpio0, 0x24); + ret = set_register(pegasus, Gpio0, 0x26); } if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_ELCON) { __u16 auxmode; @@ -474,6 +507,7 @@ __u16 linkpart; __u8 data[4]; pegasus_t *pegasus = netdev_priv(dev); + int ret; read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart); data[0] = 0xc9; @@ -487,7 +521,7 @@ data[2] = (loopback & 1) ? 0x09 : 0x01; memcpy(pegasus->eth_regs, data, sizeof (data)); - set_registers(pegasus, EthCtrl0, 3, data); + ret = set_registers(pegasus, EthCtrl0, 3, data); if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS || usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) { @@ -550,48 +584,56 @@ pegasus_t *pegasus = urb->context; struct net_device *net; int rx_status, count = urb->actual_length; + u8 *buf = urb->transfer_buffer; __u16 pkt_len; - if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING)) + if (!pegasus) return; net = pegasus->net; - if (!netif_device_present(net)) + if (!netif_device_present(net) || !netif_running(net)) return; switch (urb->status) { case 0: break; case -ETIMEDOUT: - dbg("%s: reset MAC", net->name); + if (netif_msg_rx_err(pegasus)) + pr_debug("%s: reset MAC\n", net->name); pegasus->flags &= ~PEGASUS_RX_BUSY; break; case -EPIPE: /* stall, or disconnect from TT */ /* FIXME schedule work to clear the halt */ - warn("%s: no rx stall recovery", net->name); + if (netif_msg_rx_err(pegasus)) + printk(KERN_WARNING "%s: no rx stall recovery\n", + net->name); return; case -ENOENT: case -ECONNRESET: case -ESHUTDOWN: - dbg("%s: rx unlink, %d", net->name, urb->status); + if (netif_msg_ifdown(pegasus)) + pr_debug("%s: rx unlink, %d\n", net->name, urb->status); return; default: - dbg("%s: RX status %d", net->name, urb->status); + if (netif_msg_rx_err(pegasus)) + pr_debug("%s: RX status %d\n", net->name, urb->status); goto goon; } - if (!count) + if (!count || count < 4) goto goon; - rx_status = le32_to_cpu(*(__le32 *) (urb->transfer_buffer + count - 4)); - if (rx_status & 0x000e0000) { - dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000); + rx_status = buf[count - 2]; + if (rx_status & 0x1e) { + if (netif_msg_rx_err(pegasus)) + pr_debug("%s: RX packet error %x\n", + net->name, rx_status); pegasus->stats.rx_errors++; - if (rx_status & 0x060000) + if (rx_status & 0x06) // long or runt pegasus->stats.rx_length_errors++; - if (rx_status & 0x080000) + if (rx_status & 0x08) pegasus->stats.rx_crc_errors++; - if (rx_status & 0x100000) + if (rx_status & 0x10) // extra bits pegasus->stats.rx_frame_errors++; goto goon; } @@ -600,7 +642,10 @@ pkt_len &= 0x0fff; pegasus->rx_skb->data += 2; } else { - pkt_len = (rx_status & 0xfff) - 8; + pkt_len = buf[count - 3] << 8; + pkt_len += buf[count - 4]; + pkt_len &= 0xfff; + pkt_len -= 8; } /* @@ -658,7 +703,9 @@ pegasus->rx_skb = pull_skb(pegasus); } if (pegasus->rx_skb == NULL) { - warn("wow, low on memory"); + if (netif_msg_rx_err(pegasus)) + printk(KERN_WARNING "%s: low on memory\n", + pegasus->net->name); tasklet_schedule(&pegasus->rx_tl); goto done; } @@ -682,25 +729,29 @@ pegasus_t *pegasus = urb->context; struct net_device *net = pegasus->net; - if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING)) + if (!pegasus) return; - if (!netif_device_present(net)) + if (!netif_device_present(net) || !netif_running(net)) return; switch (urb->status) { case -EPIPE: /* FIXME schedule_work() to clear the tx halt */ netif_stop_queue(net); - warn("%s: no tx stall recovery", net->name); + if (netif_msg_tx_err(pegasus)) + printk(KERN_WARNING "%s: no tx stall recovery\n", + net->name); return; case -ENOENT: case -ECONNRESET: case -ESHUTDOWN: - dbg("%s: tx unlink, %d", net->name, urb->status); + if (netif_msg_ifdown(pegasus)) + pr_debug("%s: tx unlink, %d\n", net->name, urb->status); return; default: - info("%s: TX status %d", net->name, urb->status); + if (netif_msg_tx_err(pegasus)) + pr_info("%s: TX status %d\n", net->name, urb->status); /* FALL THROUGH */ case 0: break; @@ -731,7 +782,9 @@ /* some Pegasus-I products report LOTS of data * toggle errors... avoid log spamming */ - pr_debug("%s: intr status %d\n", net->name, urb->status); + if (netif_msg_timer(pegasus)) + pr_debug("%s: intr status %d\n", net->name, + urb->status); } if (urb->actual_length >= 6) { @@ -763,7 +816,7 @@ } status = usb_submit_urb(urb, SLAB_ATOMIC); - if (status) + if (status && netif_msg_timer(pegasus)) printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n", net->name, status); } @@ -771,7 +824,8 @@ static void pegasus_tx_timeout(struct net_device *net) { pegasus_t *pegasus = netdev_priv(net); - printk(KERN_WARNING "%s: tx timeout\n", net->name); + if (netif_msg_timer(pegasus)) + printk(KERN_WARNING "%s: tx timeout\n", net->name); pegasus->tx_urb->transfer_flags |= URB_ASYNC_UNLINK; usb_unlink_urb(pegasus->tx_urb); pegasus->stats.tx_errors++; @@ -793,7 +847,9 @@ pegasus->tx_buff, count, write_bulk_callback, pegasus); if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) { - warn("failed tx_urb %d", res); + if (netif_msg_tx_err(pegasus)) + printk(KERN_WARNING "%s: fail tx, %d\n", + net->name, res); switch (res) { case -EPIPE: /* stall, or disconnect from TT */ /* cleanup should already have been scheduled */ @@ -822,8 +878,9 @@ static inline void disable_net_traffic(pegasus_t * pegasus) { int tmp = 0; + int ret; - set_registers(pegasus, EthCtrl0, 2, &tmp); + ret = set_registers(pegasus, EthCtrl0, 2, &tmp); } static inline void get_interrupt_interval(pegasus_t * pegasus) @@ -832,8 +889,10 @@ read_eprom_word(pegasus, 4, (__u16 *) data); if (data[1] < 0x80) { - info("intr interval will be changed from %ums to %ums", - data[1], 0x80); + if (netif_msg_timer(pegasus)) + dev_info(&pegasus->intf->dev, + "intr interval changed from %ums to %ums\n", + data[1], 0x80); data[1] = 0x80; #ifdef PEGASUS_WRITE_EEPROM write_eprom_word(pegasus, 4, *(__u16 *) data); @@ -845,7 +904,7 @@ static void set_carrier(struct net_device *net) { pegasus_t *pegasus = netdev_priv(net); - __le16 tmp; + u16 tmp; if (read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) return; @@ -912,24 +971,32 @@ if (!pegasus->rx_skb) return -ENOMEM; - set_registers(pegasus, EthID, 6, net->dev_addr); + res = set_registers(pegasus, EthID, 6, net->dev_addr); usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb, usb_rcvbulkpipe(pegasus->usb, 1), pegasus->rx_skb->data, PEGASUS_MTU + 8, read_bulk_callback, pegasus); - if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) - warn("%s: failed rx_urb %d", __FUNCTION__, res); + if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { + if (netif_msg_ifup(pegasus)) + pr_debug("%s: failed rx_urb, %d", net->name, res); + goto exit; + } + usb_fill_int_urb(pegasus->intr_urb, pegasus->usb, usb_rcvintpipe(pegasus->usb, 3), pegasus->intr_buff, sizeof (pegasus->intr_buff), intr_callback, pegasus, pegasus->intr_interval); - if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) - warn("%s: failed intr_urb %d", __FUNCTION__, res); - netif_start_queue(net); - pegasus->flags |= PEGASUS_RUNNING; + if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { + if (netif_msg_ifup(pegasus)) + pr_debug("%s: failed intr_urb, %d\n", net->name, res); + usb_kill_urb(pegasus->rx_urb); + goto exit; + } if ((res = enable_net_traffic(net, pegasus->usb))) { - err("can't enable_net_traffic() - %d", res); + if (netif_msg_ifup(pegasus)) + pr_debug("%s: can't enable_net_traffic() - %d\n", + net->name, res); res = -EIO; usb_kill_urb(pegasus->rx_urb); usb_kill_urb(pegasus->intr_urb); @@ -937,6 +1004,9 @@ goto exit; } set_carrier(net); + netif_start_queue(net); + if (netif_msg_ifup(pegasus)) + pr_debug("%s: open\n", net->name); res = 0; exit: return res; @@ -946,7 +1016,6 @@ { pegasus_t *pegasus = netdev_priv(net); - pegasus->flags &= ~PEGASUS_RUNNING; netif_stop_queue(net); if (!(pegasus->flags & PEGASUS_UNPLUG)) disable_net_traffic(pegasus); @@ -956,7 +1025,8 @@ return 0; } -void pegasus_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +static void pegasus_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) { pegasus_t *pegasus = netdev_priv(dev); strncpy(info->driver, driver_name, sizeof (info->driver) - 1); @@ -989,6 +1059,7 @@ reg78 |= 0x80; if (wol->wolopts & WAKE_PHY) reg78 |= 0x40; + /* FIXME this 0x10 bit still needs to get set in the chip... */ if (wol->wolopts) pegasus->eth_regs[0] |= 0x10; else @@ -1041,13 +1112,13 @@ static u32 pegasus_get_msglevel(struct net_device *dev) { pegasus_t *pegasus = netdev_priv(dev); - return pegasus->msg_level; + return pegasus->msg_enable; } static void pegasus_set_msglevel(struct net_device *dev, u32 v) { pegasus_t *pegasus = netdev_priv(dev); - pegasus->msg_level = v; + pegasus->msg_enable = v; } static struct ethtool_ops ops = { @@ -1093,12 +1164,14 @@ if (net->flags & IFF_PROMISC) { pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; - pr_info("%s: Promiscuous mode enabled.\n", net->name); + if (netif_msg_link(pegasus)) + pr_info("%s: Promiscuous mode enabled.\n", net->name); } else if ((net->mc_count > multicast_filter_limit) || (net->flags & IFF_ALLMULTI)) { pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; - pr_info("%s: set allmulti\n", net->name); + if (netif_msg_link(pegasus)) + pr_info("%s: set allmulti\n", net->name); } else { pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST; pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; @@ -1127,17 +1200,18 @@ static inline void setup_pegasus_II(pegasus_t * pegasus) { __u8 data = 0xa5; + int ret; - set_register(pegasus, Reg1d, 0); - set_register(pegasus, Reg7b, 1); + ret = set_register(pegasus, Reg1d, 0); + ret = set_register(pegasus, Reg7b, 1); mdelay(100); if ((pegasus->features & HAS_HOME_PNA) && mii_mode) - set_register(pegasus, Reg7b, 0); + ret = set_register(pegasus, Reg7b, 0); else - set_register(pegasus, Reg7b, 2); + ret = set_register(pegasus, Reg7b, 2); - set_register(pegasus, 0x83, data); - get_registers(pegasus, 0x83, 1, &data); + ret = set_register(pegasus, 0x83, data); + ret = get_registers(pegasus, 0x83, 1, &data); if (data == 0xa5) { pegasus->chip = 0x8513; @@ -1145,21 +1219,21 @@ pegasus->chip = 0; } - set_register(pegasus, 0x80, 0xc0); - set_register(pegasus, 0x83, 0xff); - set_register(pegasus, 0x84, 0x01); + ret = set_register(pegasus, 0x80, 0xc0); + ret = set_register(pegasus, 0x83, 0xff); + ret = set_register(pegasus, 0x84, 0x01); if (pegasus->features & HAS_HOME_PNA && mii_mode) - set_register(pegasus, Reg81, 6); + ret = set_register(pegasus, Reg81, 6); else - set_register(pegasus, Reg81, 2); + ret = set_register(pegasus, Reg81, 2); } -struct workqueue_struct *pegasus_workqueue = NULL; +static struct workqueue_struct *pegasus_workqueue = NULL; #define CARRIER_CHECK_DELAY (2 * HZ) -void check_carrier(void *data) +static void check_carrier(void *data) { pegasus_t *pegasus = data; set_carrier(pegasus->net); @@ -1181,7 +1255,7 @@ usb_get_dev(dev); net = alloc_etherdev(sizeof(struct pegasus)); if (!net) { - err("out of memory allocating device structure"); + dev_err(&intf->dev, "can't allocate %s\n", "device"); goto out; } @@ -1190,13 +1264,16 @@ pegasus->dev_index = dev_index; init_waitqueue_head(&pegasus->ctrl_wait); - if (!alloc_urbs(pegasus)) + if (!alloc_urbs(pegasus)) { + dev_err(&intf->dev, "can't allocate %s\n", "urbs"); goto out1; + } tasklet_init(&pegasus->rx_tl, rx_fixup, (unsigned long) pegasus); INIT_WORK(&pegasus->carrier_check, check_carrier, pegasus); + pegasus->intf = intf; pegasus->usb = dev; pegasus->net = net; SET_MODULE_OWNER(net); @@ -1215,6 +1292,8 @@ pegasus->mii.phy_id_mask = 0x1f; pegasus->mii.reg_num_mask = 0x1f; spin_lock_init(&pegasus->rx_pool_lock); + pegasus->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV + | NETIF_MSG_PROBE | NETIF_MSG_LINK); pegasus->features = usb_dev_id[dev_index].private; get_interrupt_interval(pegasus); @@ -1241,8 +1320,15 @@ res = register_netdev(net); if (res) goto out3; - queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check, CARRIER_CHECK_DELAY); - pr_info("%s: %s\n", net->name, usb_dev_id[dev_index].name); + queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check, + CARRIER_CHECK_DELAY); + + dev_info(&intf->dev, "%s, %s, %02x:%02x:%02x:%02x:%02x:%02x\n", + net->name, + usb_dev_id[dev_index].name, + net->dev_addr [0], net->dev_addr [1], + net->dev_addr [2], net->dev_addr [3], + net->dev_addr [4], net->dev_addr [5]); return 0; out3: @@ -1263,7 +1349,7 @@ usb_set_intfdata(intf, NULL); if (!pegasus) { - warn("unregistering non-existent device"); + dev_dbg(&intf->dev, "unregistering non-bound device?\n"); return; } diff -Nru a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h --- a/drivers/usb/net/pegasus.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/net/pegasus.h 2005-03-30 16:58:50 -08:00 @@ -29,7 +29,6 @@ #define DEFAULT_GPIO_SET 0x26 #define PEGASUS_PRESENT 0x00000001 -#define PEGASUS_RUNNING 0x00000002 #define PEGASUS_TX_BUSY 0x00000004 #define PEGASUS_RX_BUSY 0x00000008 #define CTRL_URB_RUNNING 0x00000010 @@ -86,12 +85,13 @@ typedef struct pegasus { struct usb_device *usb; + struct usb_interface *intf; struct net_device *net; struct net_device_stats stats; struct mii_if_info mii; unsigned flags; unsigned features; - u32 msg_level; + u32 msg_enable; u32 wolopts; int dev_index; int intr_interval; diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/net/usbnet.c 2005-03-30 16:58:49 -08:00 @@ -185,13 +185,14 @@ // i/o info: pipes etc unsigned in, out; + struct usb_host_endpoint *status; unsigned maxpacket; struct timer_list delay; // protocol/interface state struct net_device *net; struct net_device_stats stats; - int msg_level; + int msg_enable; unsigned long data [5]; struct mii_if_info mii; @@ -200,6 +201,7 @@ struct sk_buff_head rxq; struct sk_buff_head txq; struct sk_buff_head done; + struct urb *interrupt; struct tasklet_struct bh; struct work_struct kevent; @@ -207,6 +209,7 @@ # define EVENT_TX_HALT 0 # define EVENT_RX_HALT 1 # define EVENT_RX_MEMORY 2 +# define EVENT_STS_SPLIT 3 }; // device-specific info used by the driver @@ -237,6 +240,9 @@ /* see if peer is connected ... can sleep */ int (*check_connect)(struct usbnet *); + /* for status polling */ + void (*status)(struct usbnet *, struct urb *); + /* fixup rx packet (strip framing) */ int (*rx_fixup)(struct usbnet *dev, struct sk_buff *skb); @@ -272,9 +278,9 @@ static const char driver_name [] = "usbnet"; /* use ethtool to change the level for any given device */ -static int msg_level = 1; +static int msg_level = -1; module_param (msg_level, int, 0); -MODULE_PARM_DESC (msg_level, "Initial message level (default = 1)"); +MODULE_PARM_DESC (msg_level, "Override default message level"); #ifdef DEBUG @@ -290,9 +296,7 @@ printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg) #define devinfo(usbnet, fmt, arg...) \ - do { if ((usbnet)->msg_level >= 1) \ printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ - } while (0) /*-------------------------------------------------------------------------*/ @@ -312,38 +316,52 @@ get_endpoints (struct usbnet *dev, struct usb_interface *intf) { int tmp; - struct usb_host_interface *alt; - struct usb_host_endpoint *in, *out; + struct usb_host_interface *alt = NULL; + struct usb_host_endpoint *in = NULL, *out = NULL; + struct usb_host_endpoint *status = NULL; for (tmp = 0; tmp < intf->num_altsetting; tmp++) { unsigned ep; - in = out = NULL; + in = out = status = NULL; alt = intf->altsetting + tmp; /* take the first altsetting with in-bulk + out-bulk; + * remember any status endpoint, just in case; * ignore other endpoints and altsetttings. */ for (ep = 0; ep < alt->desc.bNumEndpoints; ep++) { struct usb_host_endpoint *e; + int intr = 0; e = alt->endpoint + ep; - if (e->desc.bmAttributes != USB_ENDPOINT_XFER_BULK) + switch (e->desc.bmAttributes) { + case USB_ENDPOINT_XFER_INT: + if (!(e->desc.bEndpointAddress & USB_DIR_IN)) + continue; + intr = 1; + /* FALLTHROUGH */ + case USB_ENDPOINT_XFER_BULK: + break; + default: continue; + } if (e->desc.bEndpointAddress & USB_DIR_IN) { - if (!in) + if (!intr && !in) in = e; + else if (intr && !status) + status = e; } else { if (!out) out = e; } - if (in && out) - goto found; } + if (in && out) + break; } - return -EINVAL; + if (!alt || !in || !out) + return -EINVAL; -found: if (alt->desc.bAlternateSetting != 0 || !(dev->driver_info->flags & FLAG_NO_SETINT)) { tmp = usb_set_interface (dev->udev, alt->desc.bInterfaceNumber, @@ -356,9 +374,48 @@ in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); dev->out = usb_sndbulkpipe (dev->udev, out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); + dev->status = status; return 0; } +static void intr_complete (struct urb *urb, struct pt_regs *regs); + +static int init_status (struct usbnet *dev, struct usb_interface *intf) +{ + char *buf = NULL; + unsigned pipe = 0; + unsigned maxp; + unsigned period; + + if (!dev->driver_info->status) + return 0; + + pipe = usb_rcvintpipe (dev->udev, + dev->status->desc.bEndpointAddress + & USB_ENDPOINT_NUMBER_MASK); + maxp = usb_maxpacket (dev->udev, pipe, 0); + + /* avoid 1 msec chatter: min 8 msec poll rate */ + period = max ((int) dev->status->desc.bInterval, + (dev->udev->speed == USB_SPEED_HIGH) ? 7 : 3); + + buf = kmalloc (maxp, SLAB_KERNEL); + if (buf) { + dev->interrupt = usb_alloc_urb (0, SLAB_KERNEL); + if (!dev->interrupt) { + kfree (buf); + return -ENOMEM; + } else { + usb_fill_int_urb(dev->interrupt, dev->udev, pipe, + buf, maxp, intr_complete, dev, period); + dev_dbg(&intf->dev, + "status ep%din, %d bytes period %d\n", + usb_pipeendpoint(pipe), maxp, period); + } + } + return 0; +} + static void skb_return (struct usbnet *dev, struct sk_buff *skb) { int status; @@ -368,13 +425,12 @@ dev->stats.rx_packets++; dev->stats.rx_bytes += skb->len; -#ifdef VERBOSE - devdbg (dev, "< rx, len %d, type 0x%x", - skb->len + sizeof (struct ethhdr), skb->protocol); -#endif + if (netif_msg_rx_status (dev)) + devdbg (dev, "< rx, len %d, type 0x%x", + skb->len + sizeof (struct ethhdr), skb->protocol); memset (skb->cb, 0, sizeof (struct skb_data)); status = netif_rx (skb); - if (status != NET_RX_SUCCESS) + if (status != NET_RX_SUCCESS && netif_msg_rx_err (dev)) devdbg (dev, "netif_rx status %d", status); } @@ -1414,6 +1470,29 @@ usb_driver_release_interface (&usbnet_driver, info->data); return status; } + + /* status endpoint: optional for CDC Ethernet, not RNDIS (or ACM) */ + dev->status = NULL; + if (info->control->cur_altsetting->desc.bNumEndpoints == 1) { + struct usb_endpoint_descriptor *desc; + + dev->status = &info->control->cur_altsetting->endpoint [0]; + desc = &dev->status->desc; + if (desc->bmAttributes != USB_ENDPOINT_XFER_INT + || !(desc->bEndpointAddress & USB_DIR_IN) + || (le16_to_cpu(desc->wMaxPacketSize) + < sizeof (struct usb_cdc_notification)) + || !desc->bInterval) { + dev_dbg (&intf->dev, "bad notification endpoint\n"); + dev->status = NULL; + } + } + if (rndis && !dev->status) { + dev_dbg (&intf->dev, "missing RNDIS status endpoint\n"); + usb_set_intfdata(info->data, NULL); + usb_driver_release_interface (&usbnet_driver, info->data); + return -ENODEV; + } return 0; bad_desc: @@ -1442,6 +1521,56 @@ } } + +static void dumpspeed (struct usbnet *dev, __le32 *speeds) +{ + if (netif_msg_timer (dev)) + devinfo (dev, "link speeds: %u kbps up, %u kbps down", + __le32_to_cpu(speeds[0]) / 1000, + __le32_to_cpu(speeds[1]) / 1000); +} + +static void cdc_status (struct usbnet *dev, struct urb *urb) +{ + struct usb_cdc_notification *event; + + if (urb->actual_length < sizeof *event) + return; + + /* SPEED_CHANGE can get split into two 8-byte packets */ + if (test_and_clear_bit (EVENT_STS_SPLIT, &dev->flags)) { + dumpspeed (dev, (__le32 *) urb->transfer_buffer); + return; + } + + event = urb->transfer_buffer; + switch (event->bNotificationType) { + case USB_CDC_NOTIFY_NETWORK_CONNECTION: + if (netif_msg_timer (dev)) + devdbg (dev, "CDC: carrier %s", + event->wValue ? "on" : "off"); + if (event->wValue) + netif_carrier_on(dev->net); + else + netif_carrier_off(dev->net); + break; + case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */ + if (netif_msg_timer (dev)) + devdbg (dev, "CDC: speed change (len %d)", + urb->actual_length); + if (urb->actual_length != (sizeof *event + 8)) + set_bit (EVENT_STS_SPLIT, &dev->flags); + else + dumpspeed (dev, (__le32 *) &event[1]); + break; + // case USB_CDC_NOTIFY_RESPONSE_AVAILABLE: /* RNDIS; or unsolicited */ + default: + deverr (dev, "CDC: unexpected notification %02x!", + event->bNotificationType); + break; + } +} + #endif /* NEED_GENERIC_CDC */ @@ -1520,6 +1649,7 @@ // .check_connect = cdc_check_connect, .bind = cdc_bind, .unbind = cdc_unbind, + .status = cdc_status, }; #endif /* CONFIG_USB_CDCETHER */ @@ -2051,7 +2181,8 @@ static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl) { -#ifdef DEBUG + if (!netif_msg_link (dev)) + return; devdbg (dev, "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s;" " this%s%s;" " other%s%s; r/o 0x%x", @@ -2069,7 +2200,6 @@ (usbctl & USBCTL_DISCONN_THIS) ? " DIS" : "", usbctl & ~USBCTL_WRITABLE_MASK ); -#endif } /*-------------------------------------------------------------------------*/ @@ -2096,7 +2226,8 @@ static inline void nc_dump_status (struct usbnet *dev, u16 status) { -#ifdef DEBUG + if (!netif_msg_link (dev)) + return; devdbg (dev, "net1080 %s-%s status 0x%x:" " this (%c) PKT=%d%s%s%s;" " other PKT=%d%s%s%s; unspec 0x%x", @@ -2119,7 +2250,6 @@ status & STATUS_UNSPEC_MASK ); -#endif } /*-------------------------------------------------------------------------*/ @@ -2134,15 +2264,10 @@ static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl) { -#ifdef DEBUG - devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d", - dev->udev->bus->bus_name, dev->udev->devpath, - ttl, - - TTL_THIS (ttl), - TTL_OTHER (ttl) - ); -#endif + if (netif_msg_link (dev)) + devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d", + dev->udev->bus->bus_name, dev->udev->devpath, + ttl, TTL_THIS (ttl), TTL_OTHER (ttl)); } /*-------------------------------------------------------------------------*/ @@ -2164,14 +2289,14 @@ goto done; } status = *vp; - // nc_dump_status (dev, status); + nc_dump_status (dev, status); if ((retval = nc_register_read (dev, REG_USBCTL, vp)) < 0) { dbg ("can't read USBCTL, %d", retval); goto done; } usbctl = *vp; - // nc_dump_usbctl (dev, usbctl); + nc_dump_usbctl (dev, usbctl); nc_register_write (dev, REG_USBCTL, USBCTL_FLUSH_THIS | USBCTL_FLUSH_OTHER); @@ -2187,7 +2312,7 @@ MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) ); dbg ("%s: assigned TTL, %d ms", dev->net->name, NC_READ_TTL_MS); - if (dev->msg_level >= 2) + if (netif_msg_link (dev)) devinfo (dev, "port %c, peer %sconnected", (status & STATUS_PORT_A) ? 'A' : 'B', (status & STATUS_CONN_OTHER) ? "" : "dis" @@ -2268,7 +2393,8 @@ return; } - devdbg (dev, "flush net1080; too many framing errors"); + if (netif_msg_rx_err (dev)) + devdbg (dev, "flush net1080; too many framing errors"); dev->frame_errors = 0; } } @@ -2526,11 +2652,17 @@ * For the current version of that driver, the main way that framing is * nonstandard (also from perspective of the CDC ethernet model!) is a * crc32, added to help detect when some sa1100 usb-to-memory DMA errata - * haven't been fully worked around. + * haven't been fully worked around. Also, all Zaurii use the same + * default Ethernet address. * * PXA based models use the same framing, and also can't implement * set_interface properly. * + * All known Zaurii lie about their standards conformance. Most lie by + * saying they support CDC Ethernet. Some lie and say they support CDC + * MDLM (as if for access to cell phone modems). Someone, please beat + * on Sharp for a while with a cluestick. + * *-------------------------------------------------------------------------*/ static struct sk_buff * @@ -2582,6 +2714,13 @@ }; #define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info) +static const struct driver_info zaurus_pxa_mdlm_info = { + .description = "Sharp Zaurus, PXA-255 based", + .flags = FLAG_FRAMING_Z, + .check_connect = always_connected, + .tx_fixup = zaurus_tx_fixup, +}; + static const struct driver_info olympus_mxl_info = { .description = "Olympus R1000", .flags = FLAG_FRAMING_Z, @@ -2715,7 +2854,8 @@ size = (sizeof (struct ethhdr) + dev->net->mtu); if ((skb = alloc_skb (size + NET_IP_ALIGN, flags)) == NULL) { - devdbg (dev, "no rx skb"); + if (netif_msg_rx_err (dev)) + devdbg (dev, "no rx skb"); defer_kevent (dev, EVENT_RX_MEMORY); usb_free_urb (urb); return; @@ -2745,18 +2885,21 @@ defer_kevent (dev, EVENT_RX_MEMORY); break; case -ENODEV: - devdbg (dev, "device gone"); + if (netif_msg_ifdown (dev)) + devdbg (dev, "device gone"); netif_device_detach (dev->net); break; default: - devdbg (dev, "rx submit, %d", retval); + if (netif_msg_rx_err (dev)) + devdbg (dev, "rx submit, %d", retval); tasklet_schedule (&dev->bh); break; case 0: __skb_queue_tail (&dev->rxq, skb); } } else { - devdbg (dev, "rx: stopped"); + if (netif_msg_ifdown (dev)) + devdbg (dev, "rx: stopped"); retval = -ENOLINK; } spin_unlock_irqrestore (&dev->rxq.lock, lockflags); @@ -2779,7 +2922,8 @@ if (skb->len) skb_return (dev, skb); else { - devdbg (dev, "drop"); + if (netif_msg_rx_err (dev)) + devdbg (dev, "drop"); error: dev->stats.rx_errors++; skb_queue_tail (&dev->done, skb); @@ -2806,7 +2950,8 @@ entry->state = rx_cleanup; dev->stats.rx_errors++; dev->stats.rx_length_errors++; - devdbg (dev, "rx length %d", skb->len); + if (netif_msg_rx_err (dev)) + devdbg (dev, "rx length %d", skb->len); } break; @@ -2822,9 +2967,8 @@ // software-driven interface shutdown case -ECONNRESET: // async unlink case -ESHUTDOWN: // hardware gone -#ifdef VERBOSE - devdbg (dev, "rx shutdown, code %d", urb_status); -#endif + if (netif_msg_ifdown (dev)) + devdbg (dev, "rx shutdown, code %d", urb_status); goto block; // we get controller i/o faults during khubd disconnect() delays. @@ -2836,7 +2980,8 @@ dev->stats.rx_errors++; if (!timer_pending (&dev->delay)) { mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); - devdbg (dev, "rx throttle %d", urb_status); + if (netif_msg_link (dev)) + devdbg (dev, "rx throttle %d", urb_status); } block: entry->state = rx_cleanup; @@ -2852,7 +2997,8 @@ default: entry->state = rx_cleanup; dev->stats.rx_errors++; - devdbg (dev, "rx status %d", urb_status); + if (netif_msg_rx_err (dev)) + devdbg (dev, "rx status %d", urb_status); break; } @@ -2866,9 +3012,43 @@ } usb_free_urb (urb); } -#ifdef VERBOSE - devdbg (dev, "no read resubmitted"); -#endif /* VERBOSE */ + if (netif_msg_rx_err (dev)) + devdbg (dev, "no read resubmitted"); +} + +static void intr_complete (struct urb *urb, struct pt_regs *regs) +{ + struct usbnet *dev = urb->context; + int status = urb->status; + + switch (status) { + /* success */ + case 0: + dev->driver_info->status(dev, urb); + break; + + /* software-driven interface shutdown */ + case -ENOENT: // urb killed + case -ESHUTDOWN: // hardware gone + if (netif_msg_ifdown (dev)) + devdbg (dev, "intr shutdown, code %d", status); + return; + + /* NOTE: not throttling like RX/TX, since this endpoint + * already polls infrequently + */ + default: + devdbg (dev, "intr status %d", status); + break; + } + + if (!netif_running (dev->net)) + return; + + memset(urb->transfer_buffer, 0, urb->transfer_buffer_length); + status = usb_submit_urb (urb, GFP_ATOMIC); + if (status != 0 && netif_msg_timer (dev)) + deverr(dev, "intr resubmit --> %d", status); } /*-------------------------------------------------------------------------*/ @@ -2917,7 +3097,7 @@ netif_stop_queue (net); - if (dev->msg_level >= 2) + if (netif_msg_ifdown (dev)) devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld", dev->stats.rx_packets, dev->stats.tx_packets, dev->stats.rx_errors, dev->stats.tx_errors @@ -2933,11 +3113,14 @@ && skb_queue_len (&dev->txq) && skb_queue_len (&dev->done)) { msleep(UNLINK_TIMEOUT_MS); - devdbg (dev, "waited for %d urb completions", temp); + if (netif_msg_ifdown (dev)) + devdbg (dev, "waited for %d urb completions", temp); } dev->wait = NULL; remove_wait_queue (&unlink_wakeup, &wait); + usb_kill_urb(dev->interrupt); + /* deferred work (task, timer, softirq) must also stop. * can't flush_scheduled_work() until we drop rtnl (later), * else workers could deadlock; so make workers a NOP. @@ -2963,21 +3146,34 @@ // put into "known safe" state if (info->reset && (retval = info->reset (dev)) < 0) { - devinfo (dev, "open reset fail (%d) usbnet usb-%s-%s, %s", - retval, - dev->udev->bus->bus_name, dev->udev->devpath, + if (netif_msg_ifup (dev)) + devinfo (dev, + "open reset fail (%d) usbnet usb-%s-%s, %s", + retval, + dev->udev->bus->bus_name, dev->udev->devpath, info->description); goto done; } // insist peer be connected if (info->check_connect && (retval = info->check_connect (dev)) < 0) { - devdbg (dev, "can't open; %d", retval); + if (netif_msg_ifup (dev)) + devdbg (dev, "can't open; %d", retval); goto done; } + /* start any status interrupt transfer */ + if (dev->interrupt) { + retval = usb_submit_urb (dev->interrupt, GFP_KERNEL); + if (retval < 0) { + if (netif_msg_ifup (dev)) + deverr (dev, "intr submit %d", retval); + goto done; + } + } + netif_start_queue (net); - if (dev->msg_level >= 2) { + if (netif_msg_ifup (dev)) { char *framing; if (dev->driver_info->flags & FLAG_FRAMING_NC) @@ -3034,14 +3230,14 @@ { struct usbnet *dev = netdev_priv(net); - return dev->msg_level; + return dev->msg_enable; } static void usbnet_set_msglevel (struct net_device *net, u32 level) { struct usbnet *dev = netdev_priv(net); - dev->msg_level = level; + dev->msg_enable = level; } static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd) @@ -3074,10 +3270,11 @@ if (test_bit (EVENT_TX_HALT, &dev->flags)) { unlink_urbs (dev, &dev->txq); status = usb_clear_halt (dev->udev, dev->out); - if (status < 0 && status != -EPIPE) - deverr (dev, "can't clear tx halt, status %d", - status); - else { + if (status < 0 && status != -EPIPE) { + if (netif_msg_tx_err (dev)) + deverr (dev, "can't clear tx halt, status %d", + status); + } else { clear_bit (EVENT_TX_HALT, &dev->flags); netif_wake_queue (dev->net); } @@ -3085,10 +3282,11 @@ if (test_bit (EVENT_RX_HALT, &dev->flags)) { unlink_urbs (dev, &dev->rxq); status = usb_clear_halt (dev->udev, dev->in); - if (status < 0 && status != -EPIPE) - deverr (dev, "can't clear rx halt, status %d", - status); - else { + if (status < 0 && status != -EPIPE) { + if (netif_msg_rx_err (dev)) + deverr (dev, "can't clear rx halt, status %d", + status); + } else { clear_bit (EVENT_RX_HALT, &dev->flags); tasklet_schedule (&dev->bh); } @@ -3133,6 +3331,11 @@ defer_kevent (dev, EVENT_TX_HALT); break; + /* software-driven interface shutdown */ + case -ECONNRESET: // async unlink + case -ESHUTDOWN: // hardware gone + break; + // like rx, tx gets controller i/o faults during khubd delays // and so it uses the same throttling mechanism. case -EPROTO: // ehci @@ -3141,12 +3344,15 @@ if (!timer_pending (&dev->delay)) { mod_timer (&dev->delay, jiffies + THROTTLE_JIFFIES); - devdbg (dev, "tx throttle %d", urb->status); + if (netif_msg_link (dev)) + devdbg (dev, "tx throttle %d", + urb->status); } netif_stop_queue (dev->net); break; default: - devdbg (dev, "tx err %d", entry->urb->status); + if (netif_msg_tx_err (dev)) + devdbg (dev, "tx err %d", entry->urb->status); break; } } @@ -3189,14 +3395,16 @@ if (info->tx_fixup) { skb = info->tx_fixup (dev, skb, GFP_ATOMIC); if (!skb) { - devdbg (dev, "can't tx_fixup skb"); + if (netif_msg_tx_err (dev)) + devdbg (dev, "can't tx_fixup skb"); goto drop; } } length = skb->len; if (!(urb = usb_alloc_urb (0, GFP_ATOMIC))) { - devdbg (dev, "no urb"); + if (netif_msg_tx_err (dev)) + devdbg (dev, "no urb"); goto drop; } @@ -3254,7 +3462,8 @@ defer_kevent (dev, EVENT_TX_HALT); break; default: - devdbg (dev, "tx: submit urb err %d", retval); + if (netif_msg_tx_err (dev)) + devdbg (dev, "tx: submit urb err %d", retval); break; case 0: net->trans_start = jiffies; @@ -3265,18 +3474,17 @@ spin_unlock_irqrestore (&dev->txq.lock, flags); if (retval) { - devdbg (dev, "drop, code %d", retval); + if (netif_msg_tx_err (dev)) + devdbg (dev, "drop, code %d", retval); drop: retval = NET_XMIT_SUCCESS; dev->stats.tx_dropped++; if (skb) dev_kfree_skb_any (skb); usb_free_urb (urb); -#ifdef VERBOSE - } else { + } else if (netif_msg_tx_queued (dev)) { devdbg (dev, "> tx, len %d, type 0x%x", length, skb->protocol); -#endif } return retval; } @@ -3333,7 +3541,7 @@ if (urb != NULL) rx_submit (dev, urb, GFP_ATOMIC); } - if (temp != dev->rxq.qlen) + if (temp != dev->rxq.qlen && netif_msg_link (dev)) devdbg (dev, "rxqlen %d --> %d", temp, dev->rxq.qlen); if (dev->rxq.qlen < qlen) @@ -3367,9 +3575,10 @@ xdev = interface_to_usbdev (intf); - devinfo (dev, "unregister usbnet usb-%s-%s, %s", - xdev->bus->bus_name, xdev->devpath, - dev->driver_info->description); + if (netif_msg_probe (dev)) + devinfo (dev, "unregister usbnet usb-%s-%s, %s", + xdev->bus->bus_name, xdev->devpath, + dev->driver_info->description); net = dev->net; unregister_netdev (net); @@ -3423,7 +3632,8 @@ dev = netdev_priv(net); dev->udev = xdev; dev->driver_info = info; - dev->msg_level = msg_level; + dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV + | NETIF_MSG_PROBE | NETIF_MSG_LINK); skb_queue_head_init (&dev->rxq); skb_queue_head_init (&dev->txq); skb_queue_head_init (&dev->done); @@ -3442,7 +3652,7 @@ #if 0 // dma_supported() is deeply broken on almost all architectures // possible with some EHCI controllers - if (dma_supported (&udev->dev, 0xffffffffffffffffULL)) + if (dma_supported (&udev->dev, DMA_64BIT_MASK)) net->features |= NETIF_F_HIGHDMA; #endif @@ -3479,6 +3689,9 @@ status = 0; } + + if (status == 0 && dev->status) + status = init_status (dev, udev); if (status < 0) goto out1; @@ -3488,9 +3701,14 @@ status = register_netdev (net); if (status) goto out3; - devinfo (dev, "register usbnet at usb-%s-%s, %s", - xdev->bus->bus_name, xdev->devpath, - dev->driver_info->description); + if (netif_msg_probe (dev)) + devinfo (dev, "register usbnet at usb-%s-%s, %s, " + "%02x:%02x:%02x:%02x:%02x:%02x", + xdev->bus->bus_name, xdev->devpath, + dev->driver_info->description, + net->dev_addr [0], net->dev_addr [1], + net->dev_addr [2], net->dev_addr [3], + net->dev_addr [4], net->dev_addr [5]); // ok, it's ready to go. usb_set_intfdata (udev, dev); @@ -3729,6 +3947,7 @@ * Same idea as above, but different framing. * * PXA-2xx based models are also lying-about-cdc. + * Some models don't even tell the same lies ... * * NOTE: OpenZaurus versions with 2.6 kernels won't use these entries, * unlike the older ones with 2.4 "embedix" kernels. @@ -3786,9 +4005,25 @@ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE, .idVendor = 0x04DD, + /* reported with some C860 units */ .idProduct = 0x9050, /* C-860 */ ZAURUS_MASTER_INTERFACE, .driver_info = ZAURUS_PXA_INFO, +#ifdef CONFIG_USB_ZAURUS + /* at least some (reports vary) C-860 units have very different + * lies about their standards support. + */ +}, { + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO + | USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x04DD, + /* reported with some C860 units */ + .idProduct = 0x9031, /* C-860 */ + .bInterfaceClass = USB_CLASS_COMM, + .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM, + .bInterfaceProtocol = USB_CDC_PROTO_NONE, + .driver_info = (unsigned long) &zaurus_pxa_mdlm_info, +#endif }, /* Olympus has some models with a Zaurus-compatible option. diff -Nru a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c --- a/drivers/usb/net/zd1201.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/net/zd1201.c 2005-03-30 16:58:50 -08:00 @@ -673,7 +673,7 @@ return 0; err = zd1201_docmd(zd, ZD1201_CMDCODE_ENABLE, 0, 0, 0); - if (!err); + if (!err) zd->mac_enabled = 1; if (zd->monitor) @@ -690,7 +690,7 @@ return 0; if (zd->monitor) { err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 0); - if (err); + if (err) return err; } diff -Nru a/drivers/usb/net/zd1201.h b/drivers/usb/net/zd1201.h --- a/drivers/usb/net/zd1201.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/net/zd1201.h 2005-03-30 16:58:48 -08:00 @@ -141,7 +141,7 @@ #define ZD1201_RATEB5 4 /* 5.5 really, but 5 is shorter :) */ #define ZD1201_RATEB11 8 -#define ZD1201_CNFAUTHENTICATION_OPENSYSTEM 0 -#define ZD1201_CNFAUTHENTICATION_SHAREDKEY 1 +#define ZD1201_CNFAUTHENTICATION_OPENSYSTEM 0x0001 +#define ZD1201_CNFAUTHENTICATION_SHAREDKEY 0x0002 #endif /* _INCLUDE_ZD1201_H_ */ diff -Nru a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig --- a/drivers/usb/serial/Kconfig 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/serial/Kconfig 2005-03-30 16:58:51 -08:00 @@ -89,6 +89,16 @@ To compile this driver as a module, choose M here: the module will be called digi_acceleport. +config USB_SERIAL_CP2101 + tristate "USB CP2101 UART Bridge Controller" + depends on USB_SERIAL && EXPERIMENTAL + help + Say Y here if you want to use a CP2101/CP2102 based USB to RS232 + converter. + + To compile this driver as a module, choose M here: the + module will be called cp2101. + config USB_SERIAL_CYPRESS_M8 tristate "USB Cypress M8 USB Serial Driver" depends on USB_SERIAL && EXPERIMENTAL diff -Nru a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile --- a/drivers/usb/serial/Makefile 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/serial/Makefile 2005-03-30 16:58:47 -08:00 @@ -12,6 +12,7 @@ usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y) obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o +obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o obj-$(CONFIG_USB_SERIAL_CYPRESS_M8) += cypress_m8.o obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o diff -Nru a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/serial/cp2101.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,591 @@ +/* + * Silicon Laboratories CP2101/CP2102 USB to RS232 serial adaptor driver + * + * Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version + * 2 as published by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "usb-serial.h" + +/* + * Version Information + */ +#define DRIVER_VERSION "v0.03" +#define DRIVER_DESC "Silicon Labs CP2101/CP2102 RS232 serial adaptor driver" + +/* + * Function Prototypes + */ +static int cp2101_open(struct usb_serial_port*, struct file*); +static void cp2101_cleanup(struct usb_serial_port*); +static void cp2101_close(struct usb_serial_port*, struct file*); +static void cp2101_get_termios(struct usb_serial_port*); +static void cp2101_set_termios(struct usb_serial_port*, struct termios*); +static void cp2101_break_ctl(struct usb_serial_port*, int); +static int cp2101_startup (struct usb_serial *); +static void cp2101_shutdown(struct usb_serial*); + + +static int debug; + +static struct usb_device_id id_table [] = { + {USB_DEVICE(0x10c4, 0xea60) }, /*Silicon labs factory default*/ + {USB_DEVICE(0x10ab, 0x10c5) }, /*Siemens MC60 Cable*/ + { } /* Terminating Entry*/ +}; + +MODULE_DEVICE_TABLE (usb, id_table); + +static struct usb_driver cp2101_driver = { + .owner = THIS_MODULE, + .name = "CP2101", + .probe = usb_serial_probe, + .disconnect = usb_serial_disconnect, + .id_table = id_table, +}; + +static struct usb_serial_device_type cp2101_device = { + .owner = THIS_MODULE, + .name = "CP2101", + .id_table = id_table, + .num_interrupt_in = 0, + .num_bulk_in = 0, + .num_bulk_out = 0, + .num_ports = 1, + .open = cp2101_open, + .close = cp2101_close, + .break_ctl = cp2101_break_ctl, + .set_termios = cp2101_set_termios, + .attach = cp2101_startup, + .shutdown = cp2101_shutdown, +}; + +/*Config request types*/ +#define REQTYPE_HOST_TO_DEVICE 0x41 +#define REQTYPE_DEVICE_TO_HOST 0xc1 + +/*Config SET requests. To GET, add 1 to the request number*/ +#define CP2101_UART 0x00 /*Enable / Disable*/ +#define CP2101_BAUDRATE 0x01 /*(BAUD_RATE_GEN_FREQ / baudrate)*/ +#define CP2101_BITS 0x03 /*0x(0)(data bits)(parity)(stop bits)*/ +#define CP2101_BREAK 0x05 /*On / Off*/ +#define CP2101_DTRRTS 0x07 /*101 / 202 ???*/ +#define CP2101_CONFIG_16 0x13 /*16 bytes of config data ???*/ +#define CP2101_CONFIG_6 0x19 /*6 bytes of config data ???*/ + +/*CP2101_UART*/ +#define UART_ENABLE 0x0001 +#define UART_DISABLE 0x0000 + +/*CP2101_BAUDRATE*/ +#define BAUD_RATE_GEN_FREQ 0x384000 + +/*CP2101_BITS*/ +#define BITS_DATA_MASK 0X0f00 +#define BITS_DATA_6 0X0600 +#define BITS_DATA_7 0X0700 +#define BITS_DATA_8 0X0800 +#define BITS_DATA_9 0X0900 + +#define BITS_PARITY_MASK 0x00f0 +#define BITS_PARITY_NONE 0x0000 +#define BITS_PARITY_ODD 0x0010 +#define BITS_PARITY_EVEN 0x0020 +#define BITS_PARITY_MARK 0x0030 +#define BITS_PARITY_SPACE 0x0040 + +#define BITS_STOP_MASK 0x000f +#define BITS_STOP_1 0x0000 +#define BITS_STOP_1_5 0x0001 +#define BITS_STOP_2 0x0002 +#define BREAK_ON 0x0000 +#define BREAK_OFF 0x0001 + + +static int cp2101_get_config(struct usb_serial_port* port, u8 request) +{ + struct usb_serial *serial = port->serial; + unsigned char buf[4]; + unsigned int value; + int result, i; + + /*For get requests, the request number must be incremented*/ + request++; + + /*Issue the request, attempting to read 4 bytes*/ + result = usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev, 0), + request, REQTYPE_DEVICE_TO_HOST, 0x0000, + 0, buf, 4, 300); + + if (result < 0) { + dev_err(&port->dev, "%s - Unable to send config request, " + "request=0x%x result=%d\n", + __FUNCTION__, request, result); + return result; + } + + /*Assemble each byte read into an integer value*/ + value = 0; + for (i=0; i<4 && iserial; + int result; + result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), + request, REQTYPE_HOST_TO_DEVICE, value, + 0, NULL, 0, 300); + + if (result <0) { + dev_err(&port->dev, "%s - Unable to send config request, " + "request=0x%x value=0x%x result=%d\n", + __FUNCTION__, request, value, result); + return result; + } + + dbg(" %s - request=0x%x value=0x%x result=%d", + __FUNCTION__, request, value, result); + + return 0; +} + +static int cp2101_open (struct usb_serial_port *port, struct file *filp) +{ + struct usb_serial *serial = port->serial; + int result; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if (cp2101_set_config(port, CP2101_UART, UART_ENABLE)) { + dev_err(&port->dev, "%s - Unable to enable UART\n", + __FUNCTION__); + return -EPROTO; + } + + /* Start reading from the device */ + usb_fill_bulk_urb (port->read_urb, serial->dev, + usb_rcvbulkpipe(serial->dev, + port->bulk_in_endpointAddress), + port->read_urb->transfer_buffer, + port->read_urb->transfer_buffer_length, + serial->type->read_bulk_callback, + port); + result = usb_submit_urb(port->read_urb, GFP_KERNEL); + if (result) { + dev_err(&port->dev, "%s - failed resubmitting read urb, " + "error %d\n", __FUNCTION__, result); + return result; + } + + /*Configure the termios structure*/ + cp2101_get_termios(port); + + return 0; +} + +static void cp2101_cleanup (struct usb_serial_port *port) +{ + struct usb_serial *serial = port->serial; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if (serial->dev) { + /* shutdown any bulk reads that might be going on */ + if (serial->num_bulk_out) + usb_kill_urb(port->write_urb); + if (serial->num_bulk_in) + usb_kill_urb(port->read_urb); + } +} + +static void cp2101_close (struct usb_serial_port *port, struct file * filp) +{ + dbg("%s - port %d", __FUNCTION__, port->number); + + /* shutdown our urbs */ + dbg("%s - shutting down urbs", __FUNCTION__); + usb_kill_urb(port->write_urb); + usb_kill_urb(port->read_urb); + + cp2101_set_config(port, CP2101_UART, UART_DISABLE); +} + +/* cp2101_get_termios*/ +/* Reads the baud rate, data bits, parity and stop bits from the device*/ +/* Corrects any unsupported values*/ +/* Configures the termios structure to reflect the state of the device*/ +static void cp2101_get_termios (struct usb_serial_port *port) +{ + unsigned int cflag; + int baud; + int bits; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if ((!port->tty) || (!port->tty->termios)) { + dbg("%s - no tty structures", __FUNCTION__); + return; + } + cflag = port->tty->termios->c_cflag; + + baud = cp2101_get_config(port, CP2101_BAUDRATE); + /*Convert to baudrate*/ + if (baud) + baud = BAUD_RATE_GEN_FREQ / baud; + + dbg("%s - baud rate = %d", __FUNCTION__, baud); + cflag &= ~CBAUD; + switch (baud) { + /* The baud rates which are commented out below + * appear to be supported by the device + * but are non-standard + */ + case 600: cflag |= B600; break; + case 1200: cflag |= B1200; break; + case 1800: cflag |= B1800; break; + case 2400: cflag |= B2400; break; + case 4800: cflag |= B4800; break; + /*case 7200: cflag |= B7200; break;*/ + case 9600: cflag |= B9600; break; + /*case 14400: cflag |= B14400; break;*/ + case 19200: cflag |= B19200; break; + /*case 28800: cflag |= B28800; break;*/ + case 38400: cflag |= B38400; break; + /*case 55854: cflag |= B55054; break;*/ + case 57600: cflag |= B57600; break; + case 115200: cflag |= B115200; break; + /*case 127117: cflag |= B127117; break;*/ + case 230400: cflag |= B230400; break; + case 460800: cflag |= B460800; break; + case 921600: cflag |= B921600; break; + /*case 3686400: cflag |= B3686400; break;*/ + default: + dbg("%s - Baud rate is not supported, " + "using 9600 baud", __FUNCTION__); + cflag |= B9600; + cp2101_set_config(port, CP2101_BAUDRATE, + (BAUD_RATE_GEN_FREQ/9600)); + break; + } + + bits = cp2101_get_config(port, CP2101_BITS); + cflag &= ~CSIZE; + switch(bits & BITS_DATA_MASK) { + case BITS_DATA_6: + dbg("%s - data bits = 6", __FUNCTION__); + cflag |= CS6; + break; + case BITS_DATA_7: + dbg("%s - data bits = 7", __FUNCTION__); + cflag |= CS7; + break; + case BITS_DATA_8: + dbg("%s - data bits = 8", __FUNCTION__); + cflag |= CS8; + break; + case BITS_DATA_9: + dbg("%s - data bits = 9 (not supported, " + "using 8 data bits)", __FUNCTION__); + cflag |= CS8; + bits &= ~BITS_DATA_MASK; + bits |= BITS_DATA_8; + cp2101_set_config(port, CP2101_BITS, bits); + break; + default: + dbg("%s - Unknown number of data bits, " + "using 8", __FUNCTION__); + cflag |= CS8; + bits &= ~BITS_DATA_MASK; + bits |= BITS_DATA_8; + cp2101_set_config(port, CP2101_BITS, bits); + break; + } + + switch(bits & BITS_PARITY_MASK) { + case BITS_PARITY_NONE: + dbg("%s - parity = NONE", __FUNCTION__); + cflag &= ~PARENB; + break; + case BITS_PARITY_ODD: + dbg("%s - parity = ODD", __FUNCTION__); + cflag |= (PARENB|PARODD); + break; + case BITS_PARITY_EVEN: + dbg("%s - parity = EVEN", __FUNCTION__); + cflag &= ~PARODD; + cflag |= PARENB; + break; + case BITS_PARITY_MARK: + dbg("%s - parity = MARK (not supported, " + "disabling parity)", __FUNCTION__); + cflag &= ~PARENB; + bits &= ~BITS_PARITY_MASK; + cp2101_set_config(port, CP2101_BITS, bits); + break; + case BITS_PARITY_SPACE: + dbg("%s - parity = SPACE (not supported, " + "disabling parity)", __FUNCTION__); + cflag &= ~PARENB; + bits &= ~BITS_PARITY_MASK; + cp2101_set_config(port, CP2101_BITS, bits); + break; + default: + dbg("%s - Unknown parity mode, " + "disabling parity", __FUNCTION__); + cflag &= ~PARENB; + bits &= ~BITS_PARITY_MASK; + cp2101_set_config(port, CP2101_BITS, bits); + break; + } + + cflag &= ~CSTOPB; + switch(bits & BITS_STOP_MASK) { + case BITS_STOP_1: + dbg("%s - stop bits = 1", __FUNCTION__); + break; + case BITS_STOP_1_5: + dbg("%s - stop bits = 1.5 (not supported, " + "using 1 stop bit", __FUNCTION__); + bits &= ~BITS_STOP_MASK; + cp2101_set_config(port, CP2101_BITS, bits); + break; + case BITS_STOP_2: + dbg("%s - stop bits = 2", __FUNCTION__); + cflag |= CSTOPB; + break; + default: + dbg("%s - Unknown number of stop bits, " + "using 1 stop bit", __FUNCTION__); + bits &= ~BITS_STOP_MASK; + cp2101_set_config(port, CP2101_BITS, bits); + break; + } + + port->tty->termios->c_cflag = cflag; +} + +static void cp2101_set_termios (struct usb_serial_port *port, + struct termios *old_termios) +{ + unsigned int cflag, old_cflag=0; + int baud=0; + int bits; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if ((!port->tty) || (!port->tty->termios)) { + dbg("%s - no tty structures", __FUNCTION__); + return; + } + cflag = port->tty->termios->c_cflag; + + /* check that they really want us to change something */ + if (old_termios) { + if ((cflag == old_termios->c_cflag) && + (RELEVANT_IFLAG(port->tty->termios->c_iflag) + == RELEVANT_IFLAG(old_termios->c_iflag))) { + dbg("%s - nothing to change...", __FUNCTION__); + return; + } + + old_cflag = old_termios->c_cflag; + } + + /* If the baud rate is to be updated*/ + if ((cflag & CBAUD) != (old_cflag & CBAUD)) { + switch (cflag & CBAUD) { + /* The baud rates which are commented out below + * appear to be supported by the device + * but are non-standard + */ + case B0: baud = 0; break; + case B600: baud = 600; break; + case B1200: baud = 1200; break; + case B1800: baud = 1800; break; + case B2400: baud = 2400; break; + case B4800: baud = 4800; break; + /*case B7200: baud = 7200; break;*/ + case B9600: baud = 9600; break; + /*ase B14400: baud = 14400; break;*/ + case B19200: baud = 19200; break; + /*case B28800: baud = 28800; break;*/ + case B38400: baud = 38400; break; + /*case B55854: baud = 55054; break;*/ + case B57600: baud = 57600; break; + case B115200: baud = 115200; break; + /*case B127117: baud = 127117; break;*/ + case B230400: baud = 230400; break; + case B460800: baud = 460800; break; + case B921600: baud = 921600; break; + /*case B3686400: baud = 3686400; break;*/ + default: + dev_err(&port->dev, "cp2101 driver does not " + "support the baudrate requested\n"); + break; + } + + if (baud) { + dbg("%s - Setting baud rate to %d baud", __FUNCTION__, + baud); + if (cp2101_set_config(port, CP2101_BAUDRATE, + (BAUD_RATE_GEN_FREQ / baud))) + dev_err(&port->dev, "Baud rate requested not " + "supported by device\n"); + } + } + + /*If the number of data bits is to be updated*/ + if ((cflag & CSIZE) != (old_cflag & CSIZE)) { + bits = cp2101_get_config(port, CP2101_BITS); + bits &= ~BITS_DATA_MASK; + switch (cflag & CSIZE) { + case CS6: + bits |= BITS_DATA_6; + dbg("%s - data bits = 6", __FUNCTION__); + break; + case CS7: + bits |= BITS_DATA_7; + dbg("%s - data bits = 7", __FUNCTION__); + break; + case CS8: + bits |= BITS_DATA_8; + dbg("%s - data bits = 8", __FUNCTION__); + break; + /*case CS9: + bits |= BITS_DATA_9; + dbg("%s - data bits = 9", __FUNCTION__); + break;*/ + default: + dev_err(&port->dev, "cp2101 driver does not " + "support the number of bits requested," + " using 8 bit mode\n"); + bits |= BITS_DATA_8; + break; + } + if (cp2101_set_config(port, CP2101_BITS, bits)) + dev_err(&port->dev, "Number of data bits requested " + "not supported by device\n"); + } + + if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD))) { + bits = cp2101_get_config(port, CP2101_BITS); + bits &= ~BITS_PARITY_MASK; + if (cflag & PARENB) { + if (cflag & PARODD) { + bits |= BITS_PARITY_ODD; + dbg("%s - parity = ODD", __FUNCTION__); + } else { + bits |= BITS_PARITY_EVEN; + dbg("%s - parity = EVEN", __FUNCTION__); + } + } + if (cp2101_set_config(port, CP2101_BITS, bits)) + dev_err(&port->dev, "Parity mode not supported " + "by device\n"); + } + + if ((cflag & CSTOPB) != (old_cflag & CSTOPB)) { + bits = cp2101_get_config(port, CP2101_BITS); + bits &= ~BITS_STOP_MASK; + if (cflag & CSTOPB) { + bits |= BITS_STOP_2; + dbg("%s - stop bits = 2", __FUNCTION__); + } else { + bits |= BITS_STOP_1; + dbg("%s - stop bits = 1", __FUNCTION__); + } + if (cp2101_set_config(port, CP2101_BITS, bits)) + dev_err(&port->dev, "Number of stop bits requested " + "not supported by device\n"); + } +} + +static void cp2101_break_ctl (struct usb_serial_port *port, int break_state) +{ + u16 state; + + dbg("%s - port %d", __FUNCTION__, port->number); + if (break_state == 0) + state = BREAK_OFF; + else + state = BREAK_ON; + dbg("%s - turning break %s", __FUNCTION__, + state==BREAK_OFF ? "off" : "on"); + cp2101_set_config(port, CP2101_BREAK, state); +} + +static int cp2101_startup (struct usb_serial *serial) +{ + /*CP2101 buffers behave strangely unless device is reset*/ + usb_reset_device(serial->dev); + return 0; +} + +static void cp2101_shutdown (struct usb_serial *serial) +{ + int i; + + dbg("%s", __FUNCTION__); + + /* stop reads and writes on all ports */ + for (i=0; i < serial->num_ports; ++i) { + cp2101_cleanup(serial->port[i]); + } +} + +static int __init cp2101_init (void) +{ + int retval; + + retval = usb_serial_register(&cp2101_device); + if (retval) + return retval; /*Failed to register*/ + + retval = usb_register(&cp2101_driver); + if (retval) { + /*Failed to register*/ + usb_serial_deregister(&cp2101_device); + return retval; + } + + /*Success*/ + info(DRIVER_DESC " " DRIVER_VERSION); + return 0; +} + +static void __exit cp2101_exit (void) +{ + usb_deregister (&cp2101_driver); + usb_serial_deregister (&cp2101_device); +} + +module_init(cp2101_init); +module_exit(cp2101_exit); + +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_VERSION(DRIVER_VERSION); +MODULE_LICENSE("GPL"); + +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable verbose debugging messages"); diff -Nru a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c --- a/drivers/usb/serial/digi_acceleport.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/serial/digi_acceleport.c 2005-03-30 16:58:48 -08:00 @@ -246,6 +246,7 @@ #include #include #include +#include #include "usb-serial.h" /* Defines */ @@ -573,23 +574,14 @@ wait_queue_head_t *q, long timeout, spinlock_t *lock, unsigned long flags ) { + DEFINE_WAIT(wait); - wait_queue_t wait; - - - init_waitqueue_entry( &wait, current ); - - set_current_state( TASK_INTERRUPTIBLE ); - - add_wait_queue( q, &wait ); - - spin_unlock_irqrestore( lock, flags ); - + prepare_to_wait(q, &wait, TASK_UNINTERRUPTIBLE); + spin_unlock_irqrestore(lock, flags); timeout = schedule_timeout(timeout); + finish_wait(q, &wait); - remove_wait_queue( q, &wait ); - - return( timeout ); + return timeout; } @@ -1528,7 +1520,7 @@ static void digi_close( struct usb_serial_port *port, struct file *filp ) { - + DEFINE_WAIT(wait); int ret; unsigned char buf[32]; struct tty_struct *tty = port->tty; @@ -1604,8 +1596,9 @@ dbg( "digi_close: write oob failed, ret=%d", ret ); /* wait for final commands on oob port to complete */ - interruptible_sleep_on_timeout( &priv->dp_flush_wait, - DIGI_CLOSE_TIMEOUT ); + prepare_to_wait(&priv->dp_flush_wait, &wait, TASK_UNINTERRUPTIBLE); + schedule_timeout(DIGI_CLOSE_TIMEOUT); + finish_wait(&priv->dp_flush_wait, &wait); /* shutdown any outstanding bulk writes */ usb_kill_urb(port->write_urb); @@ -2002,7 +1995,7 @@ } else if( opcode == DIGI_CMD_IFLUSH_FIFO ) { - wake_up_interruptible( &priv->dp_flush_wait ); + wake_up( &priv->dp_flush_wait ); } diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c --- a/drivers/usb/serial/ftdi_sio.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/serial/ftdi_sio.c 2005-03-30 16:58:49 -08:00 @@ -626,6 +626,13 @@ .id_table = id_table_combined, }; +static char *ftdi_chip_name[] = { + [SIO] = "SIO", /* the serial part of FT8U100AX */ + [FT8U232AM] = "FT8U232AM", + [FT232BM] = "FT232BM", + [FT2232C] = "FT2232C", +}; + /* Constants for read urb and write urb */ #define BUFSZ 512 @@ -1004,7 +1011,6 @@ struct ftdi_private *priv = usb_get_serial_port_data(port); __u32 div_value = 0; int div_okay = 1; - char *chip_name = ""; int baud; /* @@ -1049,7 +1055,6 @@ if (!baud) baud = 9600; switch(priv->chip_type) { case SIO: /* SIO chip */ - chip_name = "SIO"; switch(baud) { case 300: div_value = ftdi_sio_b300; break; case 600: div_value = ftdi_sio_b600; break; @@ -1069,7 +1074,6 @@ } break; case FT8U232AM: /* 8U232AM chip */ - chip_name = "FT8U232AM"; if (baud <= 3000000) { div_value = ftdi_232am_baud_to_divisor(baud); } else { @@ -1080,11 +1084,6 @@ break; case FT232BM: /* FT232BM chip */ case FT2232C: /* FT2232C chip */ - if (priv->chip_type == FT2232C) { - chip_name = "FT2232C"; - } else { - chip_name = "FT232BM"; - } if (baud <= 3000000) { div_value = ftdi_232bm_baud_to_divisor(baud); } else { @@ -1097,7 +1096,8 @@ if (div_okay) { dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s", - __FUNCTION__, baud, (unsigned long)div_value, chip_name); + __FUNCTION__, baud, (unsigned long)div_value, + ftdi_chip_name[priv->chip_type]); } return(div_value); @@ -1187,7 +1187,7 @@ * *************************************************************************** */ -ssize_t show_latency_timer(struct device *dev, char *buf) +static ssize_t show_latency_timer(struct device *dev, char *buf) { struct usb_serial_port *port = to_usb_serial_port(dev); struct ftdi_private *priv = usb_get_serial_port_data(port); @@ -1214,7 +1214,8 @@ } /* Write a new value of the latency timer, in units of milliseconds. */ -ssize_t store_latency_timer(struct device *dev, const char *valbuf, size_t count) +static ssize_t store_latency_timer(struct device *dev, const char *valbuf, + size_t count) { struct usb_serial_port *port = to_usb_serial_port(dev); struct ftdi_private *priv = usb_get_serial_port_data(port); @@ -1244,7 +1245,8 @@ /* Write an event character directly to the FTDI register. The ASCII value is in the low 8 bits, with the enable bit in the 9th bit. */ -ssize_t store_event_char(struct device *dev, const char *valbuf, size_t count) +static ssize_t store_event_char(struct device *dev, const char *valbuf, + size_t count) { struct usb_serial_port *port = to_usb_serial_port(dev); struct ftdi_private *priv = usb_get_serial_port_data(port); @@ -1272,10 +1274,10 @@ return count; } -static DEVICE_ATTR(latency_timer, S_IWUGO | S_IRUGO, show_latency_timer, store_latency_timer); -static DEVICE_ATTR(event_char, S_IWUGO, NULL, store_event_char); +static DEVICE_ATTR(latency_timer, S_IWUSR | S_IRUGO, show_latency_timer, store_latency_timer); +static DEVICE_ATTR(event_char, S_IWUSR, NULL, store_event_char); -void create_sysfs_attrs(struct usb_serial *serial) +static void create_sysfs_attrs(struct usb_serial *serial) { struct ftdi_private *priv; struct usb_device *udev; @@ -1285,14 +1287,18 @@ priv = usb_get_serial_port_data(serial->port[0]); udev = serial->dev; - if (priv->chip_type == FT232BM) { - dbg("sysfs attributes for FT232BM"); + /* XXX I've no idea if the original SIO supports the event_char + * sysfs parameter, so I'm playing it safe. */ + if (priv->chip_type != SIO) { + dbg("sysfs attributes for %s", ftdi_chip_name[priv->chip_type]); device_create_file(&udev->dev, &dev_attr_event_char); - device_create_file(&udev->dev, &dev_attr_latency_timer); + if (priv->chip_type == FT232BM || priv->chip_type == FT2232C) { + device_create_file(&udev->dev, &dev_attr_latency_timer); + } } } -void remove_sysfs_attrs(struct usb_serial *serial) +static void remove_sysfs_attrs(struct usb_serial *serial) { struct ftdi_private *priv; struct usb_device *udev; @@ -1302,9 +1308,12 @@ priv = usb_get_serial_port_data(serial->port[0]); udev = serial->dev; - if (priv->chip_type == FT232BM) { + /* XXX see create_sysfs_attrs */ + if (priv->chip_type != SIO) { device_remove_file(&udev->dev, &dev_attr_event_char); - device_remove_file(&udev->dev, &dev_attr_latency_timer); + if (priv->chip_type == FT232BM || priv->chip_type == FT2232C) { + device_remove_file(&udev->dev, &dev_attr_latency_timer); + } } } @@ -1406,6 +1415,8 @@ priv->chip_type = FT8U232AM; priv->baud_base = 48000000 / 2; /* Would be / 16, but FTDI supports 0.125, 0.25 and 0.5 divisor fractions! */ + create_sysfs_attrs(serial); + return (0); } /* ftdi_8U232AM_startup */ @@ -1457,6 +1468,8 @@ } priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */ + create_sysfs_attrs(serial); + return (0); } /* ftdi_FT2232C_startup */ diff -Nru a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c --- a/drivers/usb/serial/garmin_gps.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/serial/garmin_gps.c 2005-03-30 16:58:49 -08:00 @@ -614,8 +614,8 @@ * * return <0 on error, 0 if packet is incomplete or > 0 if packet was sent */ -int gsp_send(struct garmin_data * garmin_data_p, const unsigned char *buf, - int count) +static int gsp_send(struct garmin_data * garmin_data_p, + const unsigned char *buf, int count) { const unsigned char *src; unsigned char *dst; diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/serial/io_edgeport.c 2005-03-30 16:58:47 -08:00 @@ -3110,4 +3110,4 @@ MODULE_PARM_DESC(debug, "Debug enabled or not"); module_param(low_latency, bool, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(debug, "Low latency enabled or not"); +MODULE_PARM_DESC(low_latency, "Low latency enabled or not"); diff -Nru a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c --- a/drivers/usb/serial/ipw.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/serial/ipw.c 2005-03-30 16:58:48 -08:00 @@ -457,7 +457,7 @@ -int usb_ipw_init(void) +static int usb_ipw_init(void) { int retval; @@ -473,7 +473,7 @@ return 0; } -void usb_ipw_exit(void) +static void usb_ipw_exit(void) { usb_deregister(&usb_ipw_driver); usb_serial_deregister(&ipw_device); diff -Nru a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c --- a/drivers/usb/serial/kl5kusb105.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/serial/kl5kusb105.c 2005-03-30 16:58:49 -08:00 @@ -236,7 +236,7 @@ 0, /* value */ 0, /* index */ status_buf, KLSI_STATUSBUF_LEN, - 10*HZ + 10000 ); if (rc < 0) err("Reading line status failed (error = %d)", rc); diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c --- a/drivers/usb/serial/mct_u232.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/serial/mct_u232.c 2005-03-30 16:58:49 -08:00 @@ -195,16 +195,16 @@ } } else { switch (value) { - case B300: value = 300; - case B600: value = 600; - case B1200: value = 1200; - case B2400: value = 2400; - case B4800: value = 4800; - case B9600: value = 9600; - case B19200: value = 19200; - case B38400: value = 38400; - case B57600: value = 57600; - case B115200: value = 115200; + case B300: value = 300; break; + case B600: value = 600; break; + case B1200: value = 1200; break; + case B2400: value = 2400; break; + case B4800: value = 4800; break; + case B9600: value = 9600; break; + case B19200: value = 19200; break; + case B38400: value = 38400; break; + case B57600: value = 57600; break; + case B115200: value = 115200; break; default: err("MCT USB-RS232: unsupported baudrate request 0x%x," " using default of B9600", value); @@ -646,7 +646,7 @@ else new_state &= ~(TIOCM_DTR | TIOCM_RTS); if (new_state != control_state) { - mct_u232_set_modem_ctrl(serial, control_state); + mct_u232_set_modem_ctrl(serial, new_state); control_state = new_state; } diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/serial/usb-serial.c 2005-03-30 16:58:51 -08:00 @@ -1418,11 +1418,11 @@ /* If the usb-serial core is built into the core, the usb-serial drivers need these symbols to load properly as modules. */ -EXPORT_SYMBOL(usb_serial_register); -EXPORT_SYMBOL(usb_serial_deregister); -EXPORT_SYMBOL(usb_serial_probe); -EXPORT_SYMBOL(usb_serial_disconnect); -EXPORT_SYMBOL(usb_serial_port_softint); +EXPORT_SYMBOL_GPL(usb_serial_register); +EXPORT_SYMBOL_GPL(usb_serial_deregister); +EXPORT_SYMBOL_GPL(usb_serial_probe); +EXPORT_SYMBOL_GPL(usb_serial_disconnect); +EXPORT_SYMBOL_GPL(usb_serial_port_softint); /* Module information */ diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/serial/visor.c 2005-03-30 16:58:48 -08:00 @@ -243,6 +243,8 @@ .driver_info = (kernel_ulong_t)&palm_os_4_probe }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID), .driver_info = (kernel_ulong_t)&palm_os_4_probe }, + { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID), + .driver_info = (kernel_ulong_t)&palm_os_4_probe }, { }, /* optional parameter entry */ { } /* Terminating entry */ }; @@ -287,6 +289,7 @@ { USB_DEVICE(GARMIN_VENDOR_ID, GARMIN_IQUE_3600_ID) }, { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) }, + { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID) }, { }, /* optional parameter entry */ { } /* Terminating entry */ }; @@ -386,6 +389,7 @@ int bytes_in; int bytes_out; int outstanding_urbs; + int throttled; }; /* number of outstanding urbs to prevent userspace DoS from happening */ @@ -415,6 +419,7 @@ priv->bytes_in = 0; priv->bytes_out = 0; priv->outstanding_urbs = 0; + priv->throttled = 0; spin_unlock_irqrestore(&priv->lock, flags); /* @@ -602,6 +607,7 @@ struct tty_struct *tty; unsigned long flags; int i; + int throttled; int result; dbg("%s - port %d", __FUNCTION__, port->number); @@ -627,18 +633,21 @@ } spin_lock_irqsave(&priv->lock, flags); priv->bytes_in += urb->actual_length; + throttled = priv->throttled; spin_unlock_irqrestore(&priv->lock, flags); - /* Continue trying to always read */ - usb_fill_bulk_urb (port->read_urb, port->serial->dev, - usb_rcvbulkpipe(port->serial->dev, - port->bulk_in_endpointAddress), - port->read_urb->transfer_buffer, - port->read_urb->transfer_buffer_length, - visor_read_bulk_callback, port); - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); - if (result) - dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); + /* Continue trying to always read if we should */ + if (!throttled) { + usb_fill_bulk_urb (port->read_urb, port->serial->dev, + usb_rcvbulkpipe(port->serial->dev, + port->bulk_in_endpointAddress), + port->read_urb->transfer_buffer, + port->read_urb->transfer_buffer_length, + visor_read_bulk_callback, port); + result = usb_submit_urb(port->read_urb, GFP_ATOMIC); + if (result) + dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); + } return; } @@ -683,16 +692,26 @@ static void visor_throttle (struct usb_serial_port *port) { + struct visor_private *priv = usb_get_serial_port_data(port); + unsigned long flags; + dbg("%s - port %d", __FUNCTION__, port->number); - usb_kill_urb(port->read_urb); + spin_lock_irqsave(&priv->lock, flags); + priv->throttled = 1; + spin_unlock_irqrestore(&priv->lock, flags); } static void visor_unthrottle (struct usb_serial_port *port) { + struct visor_private *priv = usb_get_serial_port_data(port); + unsigned long flags; int result; dbg("%s - port %d", __FUNCTION__, port->number); + spin_lock_irqsave(&priv->lock, flags); + priv->throttled = 0; + spin_unlock_irqrestore(&priv->lock, flags); port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb, GFP_ATOMIC); diff -Nru a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h --- a/drivers/usb/serial/visor.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/serial/visor.h 2005-03-30 16:58:50 -08:00 @@ -58,6 +58,9 @@ #define KYOCERA_VENDOR_ID 0x0C88 #define KYOCERA_7135_ID 0x0021 +#define FOSSIL_VENDOR_ID 0x0E67 +#define FOSSIL_ABACUS_ID 0x0002 + /**************************************************************************** * Handspring Visor Vendor specific request codes (bRequest values) * A big thank you to Handspring for providing the following information. diff -Nru a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig --- a/drivers/usb/storage/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/storage/Kconfig 2005-03-30 16:58:50 -08:00 @@ -31,28 +31,6 @@ Say Y here in order to have the USB Mass Storage code generate verbose debugging messages. -config USB_STORAGE_RW_DETECT - bool "USB Mass Storage Write-Protected Media Detection (EXPERIMENTAL)" - depends on USB_STORAGE && EXPERIMENTAL - help - Say Y here in order to have the USB Mass Storage code indicate to - the SCSI layer that using MODE SENSE(6) and MODE SENSE(10) to - determine if the media is write-protected is a good thing to do. - - Many devices have historically had trouble with these commands, - hence the default 2.6.x behavior has been to suppress their use. - 2.4.x used these commands with (at best) mixed results, often - crashing the firmware of the device. However, the SCSI layer now - issues these commands in a manner more consistent with other - "popular" OSes, in an attempt to improve compatibility. - - Saying Y here allows these commands to be sent to a USB device. - If you find a device this doesn't work for, switch to N and let - us know at - - If you say N here, the kernel will assume that all disk-like USB - devices are write-enabled. - config USB_STORAGE_DATAFAB bool "Datafab Compact Flash Reader support (EXPERIMENTAL)" depends on USB_STORAGE && EXPERIMENTAL diff -Nru a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c --- a/drivers/usb/storage/datafab.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/storage/datafab.c 2005-03-30 16:58:50 -08:00 @@ -57,9 +57,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "datafab.h" diff -Nru a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h --- a/drivers/usb/storage/debug.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/storage/debug.h 2005-03-30 16:58:50 -08:00 @@ -47,8 +47,6 @@ #include #include -struct scsi_cmnd; - #define USB_STORAGE "usb-storage: " #ifdef CONFIG_USB_STORAGE_DEBUG diff -Nru a/drivers/usb/storage/dpcm.c b/drivers/usb/storage/dpcm.c --- a/drivers/usb/storage/dpcm.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/storage/dpcm.c 2005-03-30 16:58:49 -08:00 @@ -34,9 +34,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "dpcm.h" #include "sddr09.h" diff -Nru a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c --- a/drivers/usb/storage/freecom.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/usb/storage/freecom.c 2005-03-30 16:58:50 -08:00 @@ -34,9 +34,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "freecom.h" diff -Nru a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c --- a/drivers/usb/storage/initializers.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/storage/initializers.c 2005-03-30 16:58:48 -08:00 @@ -39,6 +39,8 @@ #include #include + +#include "usb.h" #include "initializers.h" #include "debug.h" #include "transport.h" diff -Nru a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c --- a/drivers/usb/storage/isd200.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/storage/isd200.c 2005-03-30 16:58:51 -08:00 @@ -54,9 +54,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "scsiglue.h" #include "isd200.h" diff -Nru a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c --- a/drivers/usb/storage/jumpshot.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/storage/jumpshot.c 2005-03-30 16:58:47 -08:00 @@ -54,9 +54,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "jumpshot.h" diff -Nru a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c --- a/drivers/usb/storage/protocol.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/storage/protocol.c 2005-03-30 16:58:47 -08:00 @@ -47,8 +47,9 @@ #include #include #include -#include "protocol.h" + #include "usb.h" +#include "protocol.h" #include "debug.h" #include "scsiglue.h" #include "transport.h" diff -Nru a/drivers/usb/storage/protocol.h b/drivers/usb/storage/protocol.h --- a/drivers/usb/storage/protocol.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/storage/protocol.h 2005-03-30 16:58:48 -08:00 @@ -41,9 +41,6 @@ #ifndef _PROTOCOL_H_ #define _PROTOCOL_H_ -struct scsi_cmnd; -struct us_data; - /* Sub Classes */ #define US_SC_RBC 0x01 /* Typically, flash devices */ diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c --- a/drivers/usb/storage/scsiglue.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/storage/scsiglue.c 2005-03-30 16:58:48 -08:00 @@ -53,10 +53,9 @@ #include #include #include -#include -#include "scsiglue.h" #include "usb.h" +#include "scsiglue.h" #include "debug.h" #include "transport.h" #include "protocol.h" @@ -83,7 +82,7 @@ static int slave_configure(struct scsi_device *sdev) { - struct us_data *us = (struct us_data *) sdev->host->hostdata[0]; + struct us_data *us = host_to_us(sdev->host); /* Scatter-gather buffers (all but the last) must have a length * divisible by the bulk maxpacket size. Otherwise a data packet @@ -137,18 +136,20 @@ * 192 bytes (that's what Windows uses). */ sdev->use_192_bytes_for_3f = 1; + /* Some devices don't like MODE SENSE with page=0x3f, + * which is the command used for checking if a device + * is write-protected. Now that we tell the sd driver + * to do a 192-byte transfer with this command the + * majority of devices work fine, but a few still can't + * handle it. The sd driver will simply assume those + * devices are write-enabled. */ + if (us->flags & US_FL_NO_WP_DETECT) + sdev->skip_ms_page_3f = 1; + /* A number of devices have problems with MODE SENSE for * page x08, so we will skip it. */ sdev->skip_ms_page_8 = 1; -#ifndef CONFIG_USB_STORAGE_RW_DETECT - /* Some devices may not like MODE SENSE with page=0x3f. - * Now that we're using 192-byte transfers this may no - * longer be a problem. So this will be a configuration - * option. */ - sdev->skip_ms_page_3f = 1; -#endif - /* Some disks return the total number of blocks in response * to READ CAPACITY rather than the highest block number. * If this device makes that mistake, tell the sd driver. */ @@ -173,14 +174,13 @@ } /* queue a command */ -/* This is always called with scsi_lock(srb->host) held */ +/* This is always called with scsi_lock(host) held */ static int queuecommand(struct scsi_cmnd *srb, void (*done)(struct scsi_cmnd *)) { - struct us_data *us = (struct us_data *)srb->device->host->hostdata[0]; + struct us_data *us = host_to_us(srb->device->host); US_DEBUGP("%s called\n", __FUNCTION__); - srb->host_scribble = (unsigned char *)us; /* check for state-transition errors */ if (us->srb != NULL) { @@ -210,11 +210,10 @@ ***********************************************************************/ /* Command timeout and abort */ -/* This is always called with scsi_lock(srb->host) held */ -static int command_abort(struct scsi_cmnd *srb ) +/* This is always called with scsi_lock(host) held */ +static int command_abort(struct scsi_cmnd *srb) { - struct Scsi_Host *host = srb->device->host; - struct us_data *us = (struct us_data *) host->hostdata[0]; + struct us_data *us = host_to_us(srb->device->host); US_DEBUGP("%s called\n", __FUNCTION__); @@ -234,13 +233,13 @@ set_bit(US_FLIDX_ABORTING, &us->flags); usb_stor_stop_transport(us); } - scsi_unlock(host); + scsi_unlock(us_to_host(us)); /* Wait for the aborted command to finish */ wait_for_completion(&us->notify); /* Reacquire the lock and allow USB transfers to resume */ - scsi_lock(host); + scsi_lock(us_to_host(us)); clear_bit(US_FLIDX_ABORTING, &us->flags); clear_bit(US_FLIDX_TIMED_OUT, &us->flags); return SUCCESS; @@ -248,15 +247,15 @@ /* This invokes the transport reset mechanism to reset the state of the * device */ -/* This is always called with scsi_lock(srb->host) held */ +/* This is always called with scsi_lock(host) held */ static int device_reset(struct scsi_cmnd *srb) { - struct us_data *us = (struct us_data *)srb->device->host->hostdata[0]; + struct us_data *us = host_to_us(srb->device->host); int result; US_DEBUGP("%s called\n", __FUNCTION__); - scsi_unlock(srb->device->host); + scsi_unlock(us_to_host(us)); /* lock the device pointers and do the reset */ down(&(us->dev_semaphore)); @@ -268,22 +267,22 @@ up(&(us->dev_semaphore)); /* lock the host for the return */ - scsi_lock(srb->device->host); + scsi_lock(us_to_host(us)); return result; } /* This resets the device's USB port. */ /* It refuses to work if there's more than one interface in * the device, so that other users are not affected. */ -/* This is always called with scsi_lock(srb->host) held */ +/* This is always called with scsi_lock(host) held */ static int bus_reset(struct scsi_cmnd *srb) { - struct us_data *us = (struct us_data *)srb->device->host->hostdata[0]; + struct us_data *us = host_to_us(srb->device->host); int result, rc; US_DEBUGP("%s called\n", __FUNCTION__); - scsi_unlock(srb->device->host); + scsi_unlock(us_to_host(us)); /* The USB subsystem doesn't handle synchronisation between * a device's several drivers. Therefore we reset only devices @@ -311,7 +310,7 @@ up(&(us->dev_semaphore)); /* lock the host for the return */ - scsi_lock(srb->device->host); + scsi_lock(us_to_host(us)); return result < 0 ? FAILED : SUCCESS; } @@ -321,11 +320,12 @@ void usb_stor_report_device_reset(struct us_data *us) { int i; + struct Scsi_Host *host = us_to_host(us); - scsi_report_device_reset(us->host, 0, 0); + scsi_report_device_reset(host, 0, 0); if (us->flags & US_FL_SCM_MULT_TARG) { - for (i = 1; i < us->host->max_id; ++i) - scsi_report_device_reset(us->host, 0, i); + for (i = 1; i < host->max_id; ++i) + scsi_report_device_reset(host, 0, i); } } @@ -337,41 +337,41 @@ #undef SPRINTF #define SPRINTF(args...) \ do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0) -#define DO_FLAG(a) \ - do { if (us->flags & US_FL_##a) pos += sprintf(pos, " " #a); } while(0) -static int proc_info (struct Scsi_Host *hostptr, char *buffer, char **start, off_t offset, - int length, int inout) +static int proc_info (struct Scsi_Host *host, char *buffer, + char **start, off_t offset, int length, int inout) { - struct us_data *us; + struct us_data *us = host_to_us(host); char *pos = buffer; + const char *string; /* if someone is sending us data, just throw it away */ if (inout) return length; - us = (struct us_data*)hostptr->hostdata[0]; - /* print the controller name */ - SPRINTF(" Host scsi%d: usb-storage\n", hostptr->host_no); + SPRINTF(" Host scsi%d: usb-storage\n", host->host_no); /* print product, vendor, and serial number strings */ if (us->pusb_dev->manufacturer) - SPRINTF(" Vendor: %s\n", us->pusb_dev->manufacturer); + string = us->pusb_dev->manufacturer; else if (us->unusual_dev->vendorName) - SPRINTF(" Vendor: %s\n", us->unusual_dev->vendorName); + string = us->unusual_dev->vendorName; else - SPRINTF(" Vendor: Unknown\n"); + string = "Unknown"; + SPRINTF(" Vendor: %s\n", string); if (us->pusb_dev->product) - SPRINTF(" Product: %s\n", us->pusb_dev->product); + string = us->pusb_dev->product; else if (us->unusual_dev->productName) - SPRINTF(" Product: %s\n", us->unusual_dev->productName); + string = us->unusual_dev->productName; else - SPRINTF(" Product: Unknown\n"); + string = "Unknown"; + SPRINTF(" Product: %s\n", string); if (us->pusb_dev->serial) - SPRINTF("Serial Number: %s\n", us->pusb_dev->serial); + string = us->pusb_dev->serial; else - SPRINTF("Serial Number: None\n"); + string = "None"; + SPRINTF("Serial Number: %s\n", string); /* show the protocol and transport */ SPRINTF(" Protocol: %s\n", us->protocol_name); @@ -381,10 +381,10 @@ if (pos < buffer + length) { pos += sprintf(pos, " Quirks:"); - DO_FLAG(SINGLE_LUN); - DO_FLAG(SCM_MULT_TARG); - DO_FLAG(FIX_INQUIRY); - DO_FLAG(FIX_CAPACITY); +#define US_FLAG(name, value) \ + if (us->flags & value) pos += sprintf(pos, " " #name); +US_DO_ALL_FLAGS +#undef US_FLAG *(pos++) = '\n'; } @@ -488,15 +488,6 @@ /* module management */ .module = THIS_MODULE -}; - -/* For a device that is "Not Ready" */ -unsigned char usb_stor_sense_notready[18] = { - [0] = 0x70, /* current error */ - [2] = 0x02, /* not ready */ - [7] = 0x0a, /* additional length */ - [12] = 0x04, /* not ready */ - [13] = 0x03 /* manual intervention */ }; /* To Report "Illegal Request: Invalid Field in CDB */ diff -Nru a/drivers/usb/storage/scsiglue.h b/drivers/usb/storage/scsiglue.h --- a/drivers/usb/storage/scsiglue.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/storage/scsiglue.h 2005-03-30 16:58:49 -08:00 @@ -41,14 +41,8 @@ #ifndef _SCSIGLUE_H_ #define _SCSIGLUE_H_ -#include - -struct us_data; -struct scsi_cmnd; - extern void usb_stor_report_device_reset(struct us_data *us); -extern unsigned char usb_stor_sense_notready[18]; extern unsigned char usb_stor_sense_invalidCDB[18]; extern struct scsi_host_template usb_stor_host_template; diff -Nru a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c --- a/drivers/usb/storage/sddr09.c 2005-03-30 16:58:51 -08:00 +++ b/drivers/usb/storage/sddr09.c 2005-03-30 16:58:51 -08:00 @@ -48,9 +48,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "sddr09.h" diff -Nru a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c --- a/drivers/usb/storage/sddr55.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/storage/sddr55.c 2005-03-30 16:58:48 -08:00 @@ -31,9 +31,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "sddr55.h" diff -Nru a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c --- a/drivers/usb/storage/shuttle_usbat.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/storage/shuttle_usbat.c 2005-03-30 16:58:47 -08:00 @@ -51,9 +51,9 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" -#include "usb.h" #include "debug.h" #include "shuttle_usbat.h" @@ -61,7 +61,10 @@ #define LSB_of(s) ((s)&0xFF) #define MSB_of(s) ((s)>>8) -int transferred = 0; +static int transferred = 0; + +static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us); +static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us); /* * Convenience function to produce an ATAPI read/write sectors command @@ -872,8 +875,8 @@ /* * Set the transport function based on the device type */ -int usbat_set_transport(struct us_data *us, - struct usbat_info *info) +static int usbat_set_transport(struct us_data *us, + struct usbat_info *info) { int rc; @@ -1417,7 +1420,7 @@ /* * Transport for the HP 8200e */ -int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) +static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) { int result; unsigned char *status = us->iobuf; @@ -1560,7 +1563,7 @@ /* * Transport for USBAT02-based CompactFlash and similar storage devices */ -int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us) +static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us) { int rc; struct usbat_info *info = (struct usbat_info *) (us->extra); diff -Nru a/drivers/usb/storage/shuttle_usbat.h b/drivers/usb/storage/shuttle_usbat.h --- a/drivers/usb/storage/shuttle_usbat.h 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/storage/shuttle_usbat.h 2005-03-30 16:58:47 -08:00 @@ -105,10 +105,6 @@ #define USBAT_FEAT_ET1 0x02 #define USBAT_FEAT_ET2 0x01 -/* Transport functions */ -int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us); -int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us); - extern int usbat_transport(struct scsi_cmnd *srb, struct us_data *us); extern int init_usbat(struct us_data *us); diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c --- a/drivers/usb/storage/transport.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/storage/transport.c 2005-03-30 16:58:48 -08:00 @@ -54,10 +54,10 @@ #include #include +#include "usb.h" #include "transport.h" #include "protocol.h" #include "scsiglue.h" -#include "usb.h" #include "debug.h" @@ -383,7 +383,8 @@ * This routine always uses us->recv_intr_pipe as the pipe and * us->ep_bInterval as the interrupt interval. */ -int usb_stor_intr_transfer(struct us_data *us, void *buf, unsigned int length) +static int usb_stor_intr_transfer(struct us_data *us, void *buf, + unsigned int length) { int result; unsigned int pipe = us->recv_intr_pipe; @@ -436,7 +437,7 @@ * This function does basically the same thing as usb_stor_bulk_transfer_buf() * above, but it uses the usbcore scatter-gather library. */ -int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe, +static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe, struct scatterlist *sg, int num_sg, unsigned int length, unsigned int *act_len) { @@ -1138,11 +1139,11 @@ * RESETTING bit, and clear the ABORTING bit so that the reset * may proceed. */ - scsi_lock(us->host); + scsi_lock(us_to_host(us)); usb_stor_report_device_reset(us); set_bit(US_FLIDX_RESETTING, &us->flags); clear_bit(US_FLIDX_ABORTING, &us->flags); - scsi_unlock(us->host); + scsi_unlock(us_to_host(us)); /* A 20-second timeout may seem rather long, but a LaCie * StudioDrive USB2 device takes 16+ seconds to get going @@ -1158,7 +1159,7 @@ /* Give the device some time to recover from the reset, * but don't delay disconnect processing. */ - wait_event_interruptible_timeout(us->dev_reset_wait, + wait_event_interruptible_timeout(us->delay_wait, test_bit(US_FLIDX_DISCONNECTING, &us->flags), HZ*6); if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { diff -Nru a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h --- a/drivers/usb/storage/transport.h 2005-03-30 16:58:48 -08:00 +++ b/drivers/usb/storage/transport.h 2005-03-30 16:58:48 -08:00 @@ -43,9 +43,6 @@ #include #include -#include "usb.h" - -struct scsi_cmnd; /* Protocols */ @@ -169,13 +166,8 @@ extern int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe, u8 request, u8 requesttype, u16 value, u16 index, void *data, u16 size); -extern int usb_stor_intr_transfer(struct us_data *us, void *buf, - unsigned int length); extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe, void *buf, unsigned int length, unsigned int *act_len); -extern int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe, - struct scatterlist *sg, int num_sg, unsigned int length, - unsigned int *act_len); extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe, void *buf, unsigned int length, int use_sg, int *residual); diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h --- a/drivers/usb/storage/unusual_devs.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/storage/unusual_devs.h 2005-03-30 16:58:49 -08:00 @@ -130,6 +130,15 @@ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), +/* BENQ DC5330 + * Reported by Manuel Fombuena and + * Frank Copeland */ +UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, + "Tekom Technologies, Inc", + "300_CAMERA", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_IGNORE_RESIDUE ), + /* Reported by Simon Levitt * This entry needs Sub and Proto fields */ UNUSUAL_DEV( 0x04b8, 0x0601, 0x0100, 0x0100, @@ -340,7 +349,7 @@ "Sony", "DSC-S30/S70/S75/505V/F505/F707/F717/P8", US_SC_SCSI, US_PR_DEVICE, NULL, - US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE ), + US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), /* This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0500, @@ -365,6 +374,13 @@ 0 ), #endif +/* Submitted by Olaf Hering, SuSE Bugzilla #49049 */ +UNUSUAL_DEV( 0x054c, 0x002c, 0x0501, 0x0501, + "Sony", + "USB Floppy Drive", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_SINGLE_LUN ), + UNUSUAL_DEV( 0x054c, 0x002d, 0x0100, 0x0100, "Sony", "Memorystick MSAC-US1", @@ -508,6 +524,12 @@ US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), +UNUSUAL_DEV( 0x05ac, 0x1205, 0x0001, 0x0001, + "Apple", + "iPod", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY ), + #ifdef CONFIG_USB_STORAGE_JUMPSHOT UNUSUAL_DEV( 0x05dc, 0x0001, 0x0000, 0x0001, "Lexar", @@ -612,20 +634,6 @@ US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN ), -UNUSUAL_DEV( 0x0781, 0x0002, 0x0009, 0x0009, - "Sandisk", - "ImageMate SDDR-31", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_SER ), - -#ifdef CONFIG_USB_STORAGE_USBAT -UNUSUAL_DEV( 0x0781, 0x0005, 0x0005, 0x0005, - "Sandisk", - "ImageMate SDDR-05b", - US_SC_SCSI, US_PR_SCM_ATAPI, init_usbat, - US_FL_SINGLE_LUN), -#endif - UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x0100, "Sandisk", "ImageMate SDDR-12", @@ -697,6 +705,13 @@ US_SC_SCSI, US_PR_DATAFAB, NULL, 0 ), +/* Reported by Josef Reisinger */ +UNUSUAL_DEV( 0x07c4, 0xa002, 0x0000, 0xffff, + "Datafab/Unknown", + "MD2/MD3 Disk enclosure", + US_SC_SCSI, US_PR_DATAFAB, NULL, + US_FL_SINGLE_LUN ), + UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff, "Datafab/Unknown", "Datafab-based Reader", @@ -930,6 +945,13 @@ "Flash Disk", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), + +/* Reported by Michael Stattmann */ +UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, + "Sony Ericsson", + "V800-Vodafone 802", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_NO_WP_DETECT ), /* Reported by Kevin Cernekee * Tested on hardware version 1.10. diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c --- a/drivers/usb/storage/usb.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/usb/storage/usb.c 2005-03-30 16:58:47 -08:00 @@ -51,6 +51,9 @@ #include #include #include +#include +#include +#include #include #include @@ -89,10 +92,6 @@ #endif -#include -#include -#include - /* Some informational data */ MODULE_AUTHOR("Matthew Dharm "); MODULE_DESCRIPTION("USB Mass Storage driver for Linux"); @@ -103,6 +102,13 @@ MODULE_PARM_DESC(delay_use, "seconds to delay before using a new device"); +/* These are used to make sure the module doesn't unload before all the + * threads have exited. + */ +static atomic_t total_threads = ATOMIC_INIT(0); +static DECLARE_COMPLETION(threads_gone); + + static int storage_probe(struct usb_interface *iface, const struct usb_device_id *id); @@ -225,7 +231,7 @@ { NULL } }; -struct usb_driver usb_storage_driver = { +static struct usb_driver usb_storage_driver = { .owner = THIS_MODULE, .name = "usb-storage", .probe = storage_probe, @@ -278,7 +284,7 @@ static int usb_stor_control_thread(void * __us) { struct us_data *us = (struct us_data *)__us; - struct Scsi_Host *host = us->host; + struct Scsi_Host *host = us_to_host(us); lock_kernel(); @@ -287,11 +293,13 @@ * so get rid of all our resources. */ daemonize("usb-storage"); - current->flags |= PF_NOFREEZE; - unlock_kernel(); + /* acquire a reference to the host, so it won't be deallocated + * until we're ready to exit */ + scsi_host_get(host); + /* signal that we've started the thread */ complete(&(us->notify)); @@ -305,9 +313,9 @@ /* lock the device pointers */ down(&(us->dev_semaphore)); - /* if us->srb is NULL, we are being asked to exit */ - if (us->srb == NULL) { - US_DEBUGP("-- exit command received\n"); + /* if the device has disconnected, we are free to exit */ + if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { + US_DEBUGP("-- exiting\n"); up(&(us->dev_semaphore)); break; } @@ -321,12 +329,6 @@ goto SkipForAbort; } - /* don't do anything if we are disconnecting */ - if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { - US_DEBUGP("No command during disconnect\n"); - goto SkipForDisconnect; - } - scsi_unlock(host); /* reject the command if the direction indicator @@ -394,7 +396,6 @@ complete(&(us->notify)); /* finished working on this command */ -SkipForDisconnect: us->srb = NULL; scsi_unlock(host); @@ -402,6 +403,8 @@ up(&(us->dev_semaphore)); } /* for (;;) */ + scsi_host_put(host); + /* notify the exit routine that we're actually exiting now * * complete()/wait_for_completion() is similar to up()/down(), @@ -416,7 +419,7 @@ * This is important in preemption kernels, which transfer the flow * of execution immediately upon a complete(). */ - complete_and_exit(&(us->notify), 0); + complete_and_exit(&threads_gone, 0); } /*********************************************************************** @@ -757,20 +760,6 @@ up(&us->dev_semaphore); - /* - * Since this is a new device, we need to register a SCSI - * host definition with the higher SCSI layers. - */ - us->host = scsi_host_alloc(&usb_stor_host_template, sizeof(us)); - if (!us->host) { - printk(KERN_WARNING USB_STORAGE - "Unable to allocate the scsi host\n"); - return -EBUSY; - } - - /* Set the hostdata to prepare for scanning */ - us->host->hostdata[0] = (unsigned long) us; - /* Start up our control thread */ p = kernel_thread(usb_stor_control_thread, us, CLONE_VM); if (p < 0) { @@ -779,6 +768,7 @@ return p; } us->pid = p; + atomic_inc(&total_threads); /* Wait for the thread to start */ wait_for_completion(&(us->notify)); @@ -787,37 +777,16 @@ } /* Release all our dynamic resources */ -void usb_stor_release_resources(struct us_data *us) +static void usb_stor_release_resources(struct us_data *us) { US_DEBUGP("-- %s\n", __FUNCTION__); - /* Kill the control thread. The SCSI host must already have been - * removed so it won't try to queue any more commands. + /* Tell the control thread to exit. The SCSI host must + * already have been removed so it won't try to queue + * any more commands. */ - if (us->pid) { - - /* Wait for the thread to be idle */ - down(&us->dev_semaphore); - US_DEBUGP("-- sending exit command to thread\n"); - - /* If the SCSI midlayer queued a final command just before - * scsi_remove_host() was called, us->srb might not be - * NULL. We can overwrite it safely, because the midlayer - * will not wait for the command to finish. Also the - * control thread will already have been awakened. - * That's okay, an extra up() on us->sema won't hurt. - * - * Enqueue the command, wake up the thread, and wait for - * notification that it has exited. - */ - scsi_lock(us->host); - us->srb = NULL; - scsi_unlock(us->host); - up(&us->dev_semaphore); - - up(&us->sema); - wait_for_completion(&us->notify); - } + US_DEBUGP("-- sending exit command to thread\n"); + up(&us->sema); /* Call the destructor routine, if it exists */ if (us->extra_destructor) { @@ -825,16 +794,9 @@ us->extra_destructor(us->extra); } - /* Finish the host removal sequence */ - if (us->host) - scsi_host_put(us->host); - /* Free the extra data and the URB */ - if (us->extra) - kfree(us->extra); - if (us->current_urb) - usb_free_urb(us->current_urb); - + kfree(us->extra); + usb_free_urb(us->current_urb); } /* Dissociate from the USB device */ @@ -852,9 +814,6 @@ /* Remove our private data from the interface */ usb_set_intfdata(us->pusb_intf, NULL); - - /* Free the structure itself */ - kfree(us); } /* Thread to carry out delayed SCSI-device scanning */ @@ -870,6 +829,13 @@ daemonize("usb-stor-scan"); unlock_kernel(); + /* Acquire a reference to the host, so it won't be deallocated + * until we're ready to exit */ + scsi_host_get(us_to_host(us)); + + /* Signal that we've started the thread */ + complete(&(us->notify)); + printk(KERN_DEBUG "usb-storage: device found at %d\n", us->pusb_dev->devnum); @@ -878,7 +844,7 @@ printk(KERN_DEBUG "usb-storage: waiting for device " "to settle before scanning\n"); retry: - wait_event_interruptible_timeout(us->scsi_scan_wait, + wait_event_interruptible_timeout(us->delay_wait, test_bit(US_FLIDX_DISCONNECTING, &us->flags), delay_use * HZ); if (current->flags & PF_FREEZE) { @@ -889,11 +855,14 @@ /* If the device is still connected, perform the scanning */ if (!test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { - scsi_scan_host(us->host); + scsi_scan_host(us_to_host(us)); printk(KERN_DEBUG "usb-storage: device scan complete\n"); + + /* Should we unbind if no devices were detected? */ } - complete_and_exit(&us->scsi_scan_done, 0); + scsi_host_put(us_to_host(us)); + complete_and_exit(&threads_gone, 0); } @@ -901,25 +870,30 @@ static int storage_probe(struct usb_interface *intf, const struct usb_device_id *id) { + struct Scsi_Host *host; struct us_data *us; const int id_index = id - storage_usb_ids; int result; US_DEBUGP("USB Mass Storage device detected\n"); - /* Allocate the us_data structure and initialize the mutexes */ - us = (struct us_data *) kmalloc(sizeof(*us), GFP_KERNEL); - if (!us) { - printk(KERN_WARNING USB_STORAGE "Out of memory\n"); + /* + * Ask the SCSI layer to allocate a host structure, with extra + * space at the end for our private us_data structure. + */ + host = scsi_host_alloc(&usb_stor_host_template, sizeof(*us)); + if (!host) { + printk(KERN_WARNING USB_STORAGE + "Unable to allocate the scsi host\n"); return -ENOMEM; } + + us = host_to_us(host); memset(us, 0, sizeof(struct us_data)); init_MUTEX(&(us->dev_semaphore)); init_MUTEX_LOCKED(&(us->sema)); init_completion(&(us->notify)); - init_waitqueue_head(&us->dev_reset_wait); - init_waitqueue_head(&us->scsi_scan_wait); - init_completion(&us->scsi_scan_done); + init_waitqueue_head(&us->delay_wait); /* Associate the us_data structure with the USB device */ result = associate_dev(us, intf); @@ -972,7 +946,7 @@ result = usb_stor_acquire_resources(us); if (result) goto BadDevice; - result = scsi_add_host(us->host, &intf->dev); + result = scsi_add_host(host, &intf->dev); if (result) { printk(KERN_WARNING USB_STORAGE "Unable to add the scsi host\n"); @@ -984,17 +958,23 @@ if (result < 0) { printk(KERN_WARNING USB_STORAGE "Unable to start the device-scanning thread\n"); - scsi_remove_host(us->host); + scsi_remove_host(host); goto BadDevice; } + atomic_inc(&total_threads); + + /* Wait for the thread to start */ + wait_for_completion(&(us->notify)); return 0; /* We come here if there are any problems */ BadDevice: US_DEBUGP("storage_probe() failed\n"); + set_bit(US_FLIDX_DISCONNECTING, &us->flags); usb_stor_release_resources(us); dissociate_dev(us); + scsi_host_put(host); return result; } @@ -1006,24 +986,26 @@ US_DEBUGP("storage_disconnect() called\n"); /* Prevent new USB transfers, stop the current command, and - * interrupt a device-reset delay */ + * interrupt a SCSI-scan or device-reset delay */ set_bit(US_FLIDX_DISCONNECTING, &us->flags); usb_stor_stop_transport(us); - wake_up(&us->dev_reset_wait); + wake_up(&us->delay_wait); - /* Interrupt the SCSI-device-scanning thread's time delay, and - * wait for the thread to finish */ - wake_up(&us->scsi_scan_wait); - wait_for_completion(&us->scsi_scan_done); + /* It doesn't matter if the SCSI-scanning thread is still running. + * The thread will exit when it sees the DISCONNECTING flag. */ /* Wait for the current command to finish, then remove the host */ down(&us->dev_semaphore); up(&us->dev_semaphore); - scsi_remove_host(us->host); + scsi_remove_host(us_to_host(us)); /* Wait for everything to become idle and release all our resources */ usb_stor_release_resources(us); dissociate_dev(us); + + /* Drop our reference to the host; the SCSI core will free it + * (and "us" along with it) when the refcount becomes 0. */ + scsi_host_put(us_to_host(us)); } /*********************************************************************** @@ -1053,6 +1035,16 @@ */ US_DEBUGP("-- calling usb_deregister()\n"); usb_deregister(&usb_storage_driver) ; + + /* Don't return until all of our control and scanning threads + * have exited. Since each thread signals threads_gone as its + * last act, we have to call wait_for_completion the right number + * of times. + */ + while (atomic_read(&total_threads) > 0) { + wait_for_completion(&threads_gone); + atomic_dec(&total_threads); + } } module_init(usb_stor_init); diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h --- a/drivers/usb/storage/usb.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/usb/storage/usb.h 2005-03-30 16:58:49 -08:00 @@ -48,6 +48,7 @@ #include #include #include +#include struct us_data; struct scsi_cmnd; @@ -65,18 +66,35 @@ unsigned int flags; }; -/* Flag definitions: these entries are static */ -#define US_FL_SINGLE_LUN 0x00000001 /* allow access to only LUN 0 */ -#define US_FL_MODE_XLATE 0 /* [no longer used] */ -#define US_FL_NEED_OVERRIDE 0x00000004 /* unusual_devs entry is necessary */ -#define US_FL_IGNORE_SER 0 /* [no longer used] */ -#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */ -#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs faking */ -#define US_FL_FIX_CAPACITY 0x00000080 /* READ CAPACITY response too big */ -#define US_FL_IGNORE_RESIDUE 0x00000100 /* reported residue is wrong */ -#define US_FL_BULK32 0x00000200 /* Uses 32-byte CBW length */ -#define US_FL_NOT_LOCKABLE 0x00000400 /* PREVENT/ALLOW not supported */ -#define US_FL_GO_SLOW 0x00000800 /* Need delay after Command phase */ +/* + * Static flag definitions. We use this roundabout technique so that the + * proc_info() routine can automatically display a message for each flag. + */ +#define US_DO_ALL_FLAGS \ + US_FLAG(SINGLE_LUN, 0x00000001) \ + /* allow access to only LUN 0 */ \ + US_FLAG(NEED_OVERRIDE, 0x00000002) \ + /* unusual_devs entry is necessary */ \ + US_FLAG(SCM_MULT_TARG, 0x00000004) \ + /* supports multiple targets */ \ + US_FLAG(FIX_INQUIRY, 0x00000008) \ + /* INQUIRY response needs faking */ \ + US_FLAG(FIX_CAPACITY, 0x00000010) \ + /* READ CAPACITY response too big */ \ + US_FLAG(IGNORE_RESIDUE, 0x00000020) \ + /* reported residue is wrong */ \ + US_FLAG(BULK32, 0x00000040) \ + /* Uses 32-byte CBW length */ \ + US_FLAG(NOT_LOCKABLE, 0x00000080) \ + /* PREVENT/ALLOW not supported */ \ + US_FLAG(GO_SLOW, 0x00000100) \ + /* Need delay after Command phase */ \ + US_FLAG(NO_WP_DETECT, 0x00000200) \ + /* Don't check for write-protect */ \ + +#define US_FLAG(name, value) US_FL_##name = value , +enum { US_DO_ALL_FLAGS }; +#undef US_FLAG /* Dynamic flag definitions: used in set_bit() etc. */ #define US_FLIDX_URB_ACTIVE 18 /* 0x00040000 current_urb is in use */ @@ -139,7 +157,6 @@ proto_cmnd proto_handler; /* protocol handler */ /* SCSI interfaces */ - struct Scsi_Host *host; /* our dummy host data */ struct scsi_cmnd *srb; /* current srb */ /* thread information */ @@ -154,19 +171,22 @@ dma_addr_t iobuf_dma; /* mutual exclusion and synchronization structures */ - struct semaphore sema; /* to sleep thread on */ - struct completion notify; /* thread begin/end */ - wait_queue_head_t dev_reset_wait; /* wait during reset */ - wait_queue_head_t scsi_scan_wait; /* wait before scanning */ - struct completion scsi_scan_done; /* scan thread end */ + struct semaphore sema; /* to sleep thread on */ + struct completion notify; /* thread begin/end */ + wait_queue_head_t delay_wait; /* wait during scan, reset */ /* subdriver information */ void *extra; /* Any extra data */ extra_data_destructor extra_destructor;/* extra data destructor */ }; -/* The structure which defines our driver */ -extern struct usb_driver usb_storage_driver; +/* Convert between us_data and the corresponding Scsi_Host */ +static struct Scsi_Host inline *us_to_host(struct us_data *us) { + return container_of((void *) us, struct Scsi_Host, hostdata); +} +static struct us_data inline *host_to_us(struct Scsi_Host *host) { + return (struct us_data *) host->hostdata; +} /* Function to fill an inquiry response. See usb.c for details */ extern void fill_inquiry_response(struct us_data *us, diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig --- a/drivers/video/Kconfig 2005-03-30 16:58:47 -08:00 +++ b/drivers/video/Kconfig 2005-03-30 16:58:47 -08:00 @@ -160,7 +160,7 @@ config FB_ACORN bool "Acorn VIDC support" - depends on (FB = y) && ARM && ARCH_ACORN + depends on (FB = y) && ARM && (ARCH_ACORN || ARCH_CLPS7500) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT diff -Nru a/drivers/video/acornfb.c b/drivers/video/acornfb.c --- a/drivers/video/acornfb.c 2005-03-30 16:58:50 -08:00 +++ b/drivers/video/acornfb.c 2005-03-30 16:58:50 -08:00 @@ -909,7 +909,7 @@ * some updates to the screen occasionally, but process switches * should cause the caches and buffers to be flushed often enough. */ - if (io_remap_page_range(vma, vma->vm_start, off, + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; diff -Nru a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c --- a/drivers/video/aty/aty128fb.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/video/aty/aty128fb.c 2005-03-30 16:58:48 -08:00 @@ -166,7 +166,7 @@ static int aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent); static void aty128_remove(struct pci_dev *pdev); -static int aty128_pci_suspend(struct pci_dev *pdev, u32 state); +static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state); static int aty128_pci_resume(struct pci_dev *pdev); static int aty128_do_resume(struct pci_dev *pdev); @@ -2327,7 +2327,7 @@ } } -static int aty128_pci_suspend(struct pci_dev *pdev, u32 state) +static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct fb_info *info = pci_get_drvdata(pdev); struct aty128fb_par *par = info->par; @@ -2432,7 +2432,7 @@ par->lock_blank = 0; aty128fb_blank(0, info); - pdev->dev.power.power_state = 0; + pdev->dev.power.power_state = PMSG_ON; printk(KERN_DEBUG "aty128fb: resumed !\n"); diff -Nru a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c --- a/drivers/video/aty/atyfb_base.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/video/aty/atyfb_base.c 2005-03-30 16:58:49 -08:00 @@ -2016,7 +2016,7 @@ return timeout ? 0 : -EIO; } -static int atyfb_pci_suspend(struct pci_dev *pdev, u32 state) +static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct fb_info *info = pci_get_drvdata(pdev); struct atyfb_par *par = (struct atyfb_par *) info->par; @@ -2091,7 +2091,7 @@ release_console_sem(); - pdev->dev.power.power_state = 0; + pdev->dev.power.power_state = PMSG_ON; return 0; } diff -Nru a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c --- a/drivers/video/aty/radeon_pm.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/video/aty/radeon_pm.c 2005-03-30 16:58:49 -08:00 @@ -2521,7 +2521,7 @@ static/*extern*/ int susdisking = 0; -int radeonfb_pci_suspend(struct pci_dev *pdev, u32 state) +int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct fb_info *info = pci_get_drvdata(pdev); struct radeonfb_info *rinfo = info->par; @@ -2704,7 +2704,7 @@ else if (rinfo->dynclk == 0) radeon_pm_disable_dynamic_mode(rinfo); - pdev->dev.power.power_state = 0; + pdev->dev.power.power_state = PMSG_ON; bail: release_console_sem(); diff -Nru a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h --- a/drivers/video/aty/radeonfb.h 2005-03-30 16:58:50 -08:00 +++ b/drivers/video/aty/radeonfb.h 2005-03-30 16:58:50 -08:00 @@ -608,7 +608,7 @@ extern int radeon_probe_i2c_connector(struct radeonfb_info *rinfo, int conn, u8 **out_edid); /* PM Functions */ -extern int radeonfb_pci_suspend(struct pci_dev *pdev, u32 state); +extern int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state); extern int radeonfb_pci_resume(struct pci_dev *pdev); extern void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk); extern void radeonfb_pm_exit(struct radeonfb_info *rinfo); diff -Nru a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c --- a/drivers/video/au1100fb.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/video/au1100fb.c 2005-03-30 16:58:47 -08:00 @@ -408,7 +408,7 @@ /* This is an IO map - tell maydump to skip this VMA */ vma->vm_flags |= VM_IO; - if (io_remap_page_range(vma, vma->vm_start, off, + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) { return -EAGAIN; diff -Nru a/drivers/video/controlfb.c b/drivers/video/controlfb.c --- a/drivers/video/controlfb.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/video/controlfb.c 2005-03-30 16:58:47 -08:00 @@ -315,7 +315,7 @@ return -EINVAL; off += start; vma->vm_pgoff = off >> PAGE_SHIFT; - if (io_remap_page_range(vma, vma->vm_start, off, + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; diff -Nru a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c --- a/drivers/video/cyber2000fb.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/video/cyber2000fb.c 2005-03-30 16:58:47 -08:00 @@ -1668,7 +1668,7 @@ } } -static int cyberpro_pci_suspend(struct pci_dev *dev, u32 state) +static int cyberpro_pci_suspend(struct pci_dev *dev, pm_message_t state) { return 0; } diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/video/fbmem.c 2005-03-30 16:58:47 -08:00 @@ -940,8 +940,8 @@ /* This is an IO map - tell maydump to skip this VMA */ vma->vm_flags |= VM_IO | VM_RESERVED; #if defined(__sparc_v9__) - if (io_remap_page_range(vma, vma->vm_start, off, - vma->vm_end - vma->vm_start, vma->vm_page_prot, 0)) + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; #else #if defined(__mc68000__) @@ -957,7 +957,9 @@ } #endif #elif defined(__powerpc__) - pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; + vma->vm_page_prot = phys_mem_access_prot(file, off, + vma->vm_end - vma->vm_start, + vma->vm_page_prot); #elif defined(__alpha__) /* Caching is off in the I/O space quadrant by design. */ #elif defined(__i386__) || defined(__x86_64__) @@ -977,7 +979,7 @@ #else #warning What do we have to do here?? #endif - if (io_remap_page_range(vma, vma->vm_start, off, + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; #endif /* !__sparc_v9__ */ diff -Nru a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c --- a/drivers/video/i810/i810_main.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/video/i810/i810_main.c 2005-03-30 16:58:48 -08:00 @@ -1492,7 +1492,7 @@ /*********************************************************************** * Power Management * ***********************************************************************/ -static int i810fb_suspend(struct pci_dev *dev, u32 state) +static int i810fb_suspend(struct pci_dev *dev, pm_message_t state) { struct fb_info *info = pci_get_drvdata(dev); struct i810fb_par *par = (struct i810fb_par *) info->par; @@ -1524,7 +1524,7 @@ pci_disable_device(dev); } pci_save_state(dev); - pci_set_power_state(dev, state); + pci_set_power_state(dev, pci_choose_state(dev, state)); return 0; } @@ -1538,7 +1538,7 @@ return 0; pci_restore_state(dev); - pci_set_power_state(dev, 0); + pci_set_power_state(dev, PCI_D0); pci_enable_device(dev); agp_bind_memory(par->i810_gtt.i810_fb_memory, par->fb.offset); diff -Nru a/drivers/video/i810/i810_main.h b/drivers/video/i810/i810_main.h --- a/drivers/video/i810/i810_main.h 2005-03-30 16:58:49 -08:00 +++ b/drivers/video/i810/i810_main.h 2005-03-30 16:58:49 -08:00 @@ -18,7 +18,7 @@ const struct pci_device_id *entry); static void __exit i810fb_remove_pci(struct pci_dev *dev); static int i810fb_resume(struct pci_dev *dev); -static int i810fb_suspend(struct pci_dev *dev, u32 state); +static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); /* * voffset - framebuffer offset in MiB from aperture start address. In order for diff -Nru a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c --- a/drivers/video/sa1100fb.c 2005-03-30 16:58:47 -08:00 +++ b/drivers/video/sa1100fb.c 2005-03-30 16:58:47 -08:00 @@ -836,7 +836,7 @@ vma->vm_pgoff = off >> PAGE_SHIFT; vma->vm_flags |= VM_IO; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - return io_remap_page_range(vma, vma->vm_start, off, + return io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot); } diff -Nru a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c --- a/drivers/video/sbuslib.c 2005-03-30 16:58:48 -08:00 +++ b/drivers/video/sbuslib.c 2005-03-30 16:58:48 -08:00 @@ -74,10 +74,12 @@ } if (page + map_size > size) map_size = size - page; - r = io_remap_page_range(vma, + r = io_remap_pfn_range(vma, vma->vm_start + page, - map_offset, map_size, - vma->vm_page_prot, iospace); + MK_IOSPACE_PFN(iospace, + map_offset >> PAGE_SHIFT), + map_size, + vma->vm_page_prot); if (r) return -EAGAIN; page += map_size; diff -Nru a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c --- a/drivers/zorro/zorro.c 2005-03-30 16:58:49 -08:00 +++ b/drivers/zorro/zorro.c 2005-03-30 16:58:49 -08:00 @@ -134,7 +134,7 @@ if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) return 0; - printk("Zorro: Probing AutoConfig expansion devices: %d device%s\n", + pr_info("Zorro: Probing AutoConfig expansion devices: %d device%s\n", zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); /* Initialize the Zorro bus */ diff -Nru a/fs/Kconfig b/fs/Kconfig --- a/fs/Kconfig 2005-03-30 16:58:49 -08:00 +++ b/fs/Kconfig 2005-03-30 16:58:49 -08:00 @@ -936,6 +936,7 @@ config HFSPLUS_FS tristate "Apple Extended HFS file system support" select NLS + select NLS_UTF8 help If you say Y here, you will be able to mount extended format Macintosh-formatted hard drive partitions with full read-write access. diff -Nru a/fs/afs/kafsasyncd.c b/fs/afs/kafsasyncd.c --- a/fs/afs/kafsasyncd.c 2005-03-30 16:58:50 -08:00 +++ b/fs/afs/kafsasyncd.c 2005-03-30 16:58:50 -08:00 @@ -116,6 +116,8 @@ remove_wait_queue(&kafsasyncd_sleepq, &myself); set_current_state(TASK_RUNNING); + try_to_freeze(PF_FREEZE); + /* discard pending signals */ afs_discard_my_signals(); diff -Nru a/fs/afs/kafstimod.c b/fs/afs/kafstimod.c --- a/fs/afs/kafstimod.c 2005-03-30 16:58:51 -08:00 +++ b/fs/afs/kafstimod.c 2005-03-30 16:58:51 -08:00 @@ -91,6 +91,8 @@ complete_and_exit(&kafstimod_dead, 0); } + try_to_freeze(PF_FREEZE); + /* discard pending signals */ afs_discard_my_signals(); diff -Nru a/fs/attr.c b/fs/attr.c --- a/fs/attr.c 2005-03-30 16:58:47 -08:00 +++ b/fs/attr.c 2005-03-30 16:58:47 -08:00 @@ -135,13 +135,16 @@ int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode = inode->i_mode; + mode_t mode; int error; - struct timespec now = current_fs_time(inode->i_sb); + struct timespec now; unsigned int ia_valid = attr->ia_valid; if (!inode) BUG(); + + mode = inode->i_mode; + now = current_fs_time(inode->i_sb); attr->ia_ctime = now; if (!(ia_valid & ATTR_ATIME_SET)) diff -Nru a/fs/bad_inode.c b/fs/bad_inode.c --- a/fs/bad_inode.c 2005-03-30 16:58:50 -08:00 +++ b/fs/bad_inode.c 2005-03-30 16:58:50 -08:00 @@ -15,17 +15,6 @@ #include #include -/* - * The follow_link operation is special: it must behave as a no-op - * so that a bad root inode can at least be unmounted. To do this - * we must dput() the base and return the dentry with a dget(). - */ -static int bad_follow_link(struct dentry *dent, struct nameidata *nd) -{ - nd_set_link(nd, ERR_PTR(-EIO)); - return 0; -} - static int return_EIO(void) { return -EIO; @@ -70,7 +59,8 @@ .mknod = EIO_ERROR, .rename = EIO_ERROR, .readlink = EIO_ERROR, - .follow_link = bad_follow_link, + /* follow_link must be no-op, otherwise unmounting this inode + won't work */ .truncate = EIO_ERROR, .permission = EIO_ERROR, .getattr = EIO_ERROR, diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c --- a/fs/binfmt_aout.c 2005-03-30 16:58:50 -08:00 +++ b/fs/binfmt_aout.c 2005-03-30 16:58:50 -08:00 @@ -317,7 +317,7 @@ (current->mm->start_brk = N_BSSADDR(ex)); current->mm->free_area_cache = current->mm->mmap_base; - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); current->mm->mmap = NULL; compute_creds(bprm); current->flags &= ~PF_FORKNOEXEC; diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c 2005-03-30 16:58:48 -08:00 +++ b/fs/binfmt_elf.c 2005-03-30 16:58:48 -08:00 @@ -773,7 +773,7 @@ /* Do this so that we can load the interpreter, if need be. We will change some of these later */ - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); current->mm->free_area_cache = current->mm->mmap_base; retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP), executable_stack); @@ -1026,6 +1026,7 @@ static int load_elf_library(struct file *file) { struct elf_phdr *elf_phdata; + struct elf_phdr *eppnt; unsigned long elf_bss, bss, len; int retval, error, i, j; struct elfhdr elf_ex; @@ -1049,44 +1050,47 @@ /* j < ELF_MIN_ALIGN because elf_ex.e_phnum <= 2 */ error = -ENOMEM; - elf_phdata = (struct elf_phdr *) kmalloc(j, GFP_KERNEL); + elf_phdata = kmalloc(j, GFP_KERNEL); if (!elf_phdata) goto out; + eppnt = elf_phdata; error = -ENOEXEC; - retval = kernel_read(file, elf_ex.e_phoff, (char *) elf_phdata, j); + retval = kernel_read(file, elf_ex.e_phoff, (char *)eppnt, j); if (retval != j) goto out_free_ph; for (j = 0, i = 0; ip_type == PT_LOAD) j++; + if ((eppnt + i)->p_type == PT_LOAD) + j++; if (j != 1) goto out_free_ph; - while (elf_phdata->p_type != PT_LOAD) elf_phdata++; + while (eppnt->p_type != PT_LOAD) + eppnt++; /* Now use mmap to map the library into memory. */ down_write(¤t->mm->mmap_sem); error = do_mmap(file, - ELF_PAGESTART(elf_phdata->p_vaddr), - (elf_phdata->p_filesz + - ELF_PAGEOFFSET(elf_phdata->p_vaddr)), + ELF_PAGESTART(eppnt->p_vaddr), + (eppnt->p_filesz + + ELF_PAGEOFFSET(eppnt->p_vaddr)), PROT_READ | PROT_WRITE | PROT_EXEC, MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE, - (elf_phdata->p_offset - - ELF_PAGEOFFSET(elf_phdata->p_vaddr))); + (eppnt->p_offset - + ELF_PAGEOFFSET(eppnt->p_vaddr))); up_write(¤t->mm->mmap_sem); - if (error != ELF_PAGESTART(elf_phdata->p_vaddr)) + if (error != ELF_PAGESTART(eppnt->p_vaddr)) goto out_free_ph; - elf_bss = elf_phdata->p_vaddr + elf_phdata->p_filesz; + elf_bss = eppnt->p_vaddr + eppnt->p_filesz; if (padzero(elf_bss)) { error = -EFAULT; goto out_free_ph; } - len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1); - bss = elf_phdata->p_memsz + elf_phdata->p_vaddr; + len = ELF_PAGESTART(eppnt->p_filesz + eppnt->p_vaddr + ELF_MIN_ALIGN - 1); + bss = eppnt->p_memsz + eppnt->p_vaddr; if (bss > len) { down_write(¤t->mm->mmap_sem); do_brk(len, bss - len); diff -Nru a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c --- a/fs/binfmt_elf_fdpic.c 2005-03-30 16:58:48 -08:00 +++ b/fs/binfmt_elf_fdpic.c 2005-03-30 16:58:48 -08:00 @@ -299,7 +299,7 @@ /* do this so that we can load the interpreter, if need be * - we will change some of these later */ - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); #ifdef CONFIG_MMU retval = setup_arg_pages(bprm, current->mm->start_stack, executable_stack); diff -Nru a/fs/binfmt_flat.c b/fs/binfmt_flat.c --- a/fs/binfmt_flat.c 2005-03-30 16:58:47 -08:00 +++ b/fs/binfmt_flat.c 2005-03-30 16:58:47 -08:00 @@ -650,7 +650,7 @@ current->mm->start_brk = datapos + data_len + bss_len; current->mm->brk = (current->mm->start_brk + 3) & ~3; current->mm->context.end_brk = memp + ksize((void *) memp) - stack_len; - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); } if (flags & FLAT_FLAG_KTRACE) diff -Nru a/fs/binfmt_som.c b/fs/binfmt_som.c --- a/fs/binfmt_som.c 2005-03-30 16:58:48 -08:00 +++ b/fs/binfmt_som.c 2005-03-30 16:58:48 -08:00 @@ -259,7 +259,7 @@ create_som_tables(bprm); current->mm->start_stack = bprm->p; - current->mm->rss = 0; + set_mm_counter(current->mm, rss, 0); #if 0 printk("(start_brk) %08lx\n" , (unsigned long) current->mm->start_brk); diff -Nru a/fs/bio.c b/fs/bio.c --- a/fs/bio.c 2005-03-30 16:58:49 -08:00 +++ b/fs/bio.c 2005-03-30 16:58:49 -08:00 @@ -74,7 +74,7 @@ */ static struct bio_set *fs_bio_set; -static inline struct bio_vec *bvec_alloc_bs(int gfp_mask, int nr, unsigned long *idx, struct bio_set *bs) +static inline struct bio_vec *bvec_alloc_bs(unsigned int __nocast gfp_mask, int nr, unsigned long *idx, struct bio_set *bs) { struct bio_vec *bvl; struct biovec_slab *bp; @@ -149,7 +149,7 @@ * allocate bio and iovecs from the memory pools specified by the * bio_set structure. **/ -struct bio *bio_alloc_bioset(int gfp_mask, int nr_iovecs, struct bio_set *bs) +struct bio *bio_alloc_bioset(unsigned int __nocast gfp_mask, int nr_iovecs, struct bio_set *bs) { struct bio *bio = mempool_alloc(bs->bio_pool, gfp_mask); @@ -177,7 +177,7 @@ return bio; } -struct bio *bio_alloc(int gfp_mask, int nr_iovecs) +struct bio *bio_alloc(unsigned int __nocast gfp_mask, int nr_iovecs) { return bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set); } @@ -271,7 +271,7 @@ * * Like __bio_clone, only also allocates the returned bio */ -struct bio *bio_clone(struct bio *bio, int gfp_mask) +struct bio *bio_clone(struct bio *bio, unsigned int __nocast gfp_mask) { struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set); @@ -934,7 +934,7 @@ return bp; } -static void *bio_pair_alloc(int gfp_flags, void *data) +static void *bio_pair_alloc(unsigned int __nocast gfp_flags, void *data) { return kmalloc(sizeof(struct bio_pair), gfp_flags); } diff -Nru a/fs/buffer.c b/fs/buffer.c --- a/fs/buffer.c 2005-03-30 16:58:49 -08:00 +++ b/fs/buffer.c 2005-03-30 16:58:49 -08:00 @@ -3052,7 +3052,7 @@ buffer_heads_over_limit = (tot > max_buffer_heads); } -struct buffer_head *alloc_buffer_head(int gfp_flags) +struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags) { struct buffer_head *ret = kmem_cache_alloc(bh_cachep, gfp_flags); if (ret) { diff -Nru a/fs/cifs/CHANGES b/fs/cifs/CHANGES --- a/fs/cifs/CHANGES 2005-03-30 16:58:50 -08:00 +++ b/fs/cifs/CHANGES 2005-03-30 16:58:50 -08:00 @@ -1,9 +1,25 @@ +Version 1.31 +------------ +Fix oops in ls when Transact2 FindFirst (or FindNext) returns more than one +transact response for an SMB request and search entry split across two frames. +Fix updates of DOS attributes and time fields so that files on NT4 servers +do not get marked delete on close. Display sizes of cifs buffer pools in +cifs stats. Fix oops in unmount when cifsd thread being killed by +shutdown. Add generic readv/writev and aio support. Report inode numbers +consistently in readdir and lookup (when serverino mount option is +specified use the inode number that the server reports - for both lookup +and readdir, otherwise by default the locally generated inode number is used +for inodes created in either path since servers are not always able to +provide unique inode numbers when exporting multiple volumes from under one +sharename). + Version 1.30 ------------ Allow new nouser_xattr mount parm to disable xattr support for user namespace. Do not flag user_xattr mount parm in dmesg. Retry failures setting file time (mostly affects NT4 servers) by retry with handle based network operation. Add new POSIX Query FS Info for returning statfs info more accurately. +Handle passwords with multiple commas in them. Version 1.29 ------------ diff -Nru a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c --- a/fs/cifs/cifs_debug.c 2005-03-30 16:58:48 -08:00 +++ b/fs/cifs/cifs_debug.c 2005-03-30 16:58:48 -08:00 @@ -199,13 +199,13 @@ length += item_length; buf += item_length; item_length = - sprintf(buf,"SMB Request/Response Buffer: %d\n", - bufAllocCount.counter); + sprintf(buf,"SMB Request/Response Buffer: %d Pool size: %d\n", + bufAllocCount.counter,cifs_min_rcv + tcpSesAllocCount.counter); length += item_length; buf += item_length; item_length = - sprintf(buf,"SMB Small Req/Resp Buffer: %d\n", - smBufAllocCount.counter); + sprintf(buf,"SMB Small Req/Resp Buffer: %d Pool size: %d\n", + smBufAllocCount.counter,cifs_min_small); length += item_length; buf += item_length; item_length = diff -Nru a/fs/cifs/cifsencrypt.h b/fs/cifs/cifsencrypt.h --- a/fs/cifs/cifsencrypt.h 2005-03-30 16:58:48 -08:00 +++ b/fs/cifs/cifsencrypt.h 2005-03-30 16:58:48 -08:00 @@ -28,7 +28,7 @@ extern void E_P16(unsigned char *p14, unsigned char *p16); extern void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24); extern void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out); -extern void E_old_pw_hash(unsigned char *p14, unsigned char *in, unsigned char *out); +extern void E_old_pw_hash(unsigned char *, unsigned char *, unsigned char *); diff -Nru a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c --- a/fs/cifs/cifsfs.c 2005-03-30 16:58:49 -08:00 +++ b/fs/cifs/cifsfs.c 2005-03-30 16:58:49 -08:00 @@ -57,6 +57,7 @@ unsigned int extended_security = 0; unsigned int ntlmv2_support = 0; unsigned int sign_CIFS_PDUs = 1; +extern struct task_struct * oplockThread; /* remove sparse warning */ struct task_struct * oplockThread = NULL; unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; module_param(CIFSMaxBufSize, int, 0); @@ -66,13 +67,19 @@ MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64"); unsigned int cifs_min_small = 30; module_param(cifs_min_small, int, 0); -MODULE_PARM_DESC(cifs_small_rcv,"Small network buffers in pool. Default: 30 Range: 2 to 256"); +MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 Range: 2 to 256"); unsigned int cifs_max_pending = CIFS_MAX_REQ; module_param(cifs_max_pending, int, 0); MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 50 Range: 2 to 256"); static DECLARE_COMPLETION(cifs_oplock_exited); +extern mempool_t *cifs_sm_req_poolp; +extern mempool_t *cifs_req_poolp; +extern mempool_t *cifs_mid_poolp; + +extern kmem_cache_t *cifs_oplock_cachep; + static int cifs_read_super(struct super_block *sb, void *data, const char *devname, int silent) @@ -229,9 +236,7 @@ cifs_alloc_inode(struct super_block *sb) { struct cifsInodeInfo *cifs_inode; - cifs_inode = - (struct cifsInodeInfo *) kmem_cache_alloc(cifs_inode_cachep, - SLAB_KERNEL); + cifs_inode = kmem_cache_alloc(cifs_inode_cachep, SLAB_KERNEL); if (!cifs_inode) return NULL; cifs_inode->cifsAttrs = 0x20; /* default */ @@ -438,28 +443,13 @@ cifs_read_wrapper(struct file * file, char __user *read_data, size_t read_size, loff_t * poffset) { - if(file == NULL) - return -EIO; - else if(file->f_dentry == NULL) + if(file->f_dentry == NULL) return -EIO; else if(file->f_dentry->d_inode == NULL) return -EIO; cFYI(1,("In read_wrapper size %zd at %lld",read_size,*poffset)); -#ifdef CONFIG_CIFS_EXPERIMENTAL - /* check whether we can cache writes locally */ - if(file->f_dentry->d_sb) { - struct cifs_sb_info *cifs_sb; - cifs_sb = CIFS_SB(file->f_dentry->d_sb); - if(cifs_sb != NULL) { - if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) - return cifs_user_read(file,read_data, - read_size,poffset); - } - } -#endif /* CIFS_EXPERIMENTAL */ - if(CIFS_I(file->f_dentry->d_inode)->clientCanCacheRead) { return generic_file_read(file,read_data,read_size,poffset); } else { @@ -483,28 +473,13 @@ { ssize_t written; - if(file == NULL) - return -EIO; - else if(file->f_dentry == NULL) + if(file->f_dentry == NULL) return -EIO; else if(file->f_dentry->d_inode == NULL) return -EIO; cFYI(1,("In write_wrapper size %zd at %lld",write_size,*poffset)); -#ifdef CONFIG_CIFS_EXPERIMENTAL /* BB fixme - fix user char * to kernel char * mapping here BB */ - /* check whether we can cache writes locally */ - if(file->f_dentry->d_sb) { - struct cifs_sb_info *cifs_sb; - cifs_sb = CIFS_SB(file->f_dentry->d_sb); - if(cifs_sb != NULL) { - if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) { - return cifs_user_write(file,write_data, - write_size,poffset); - } - } - } -#endif /* CIFS_EXPERIMENTAL */ written = generic_file_write(file,write_data,write_size,poffset); if(!CIFS_I(file->f_dentry->d_inode)->clientCanCacheAll) { if(file->f_dentry->d_inode->i_mapping) { @@ -585,6 +560,26 @@ .mmap = cifs_file_mmap, .sendfile = generic_file_sendfile, #ifdef CONFIG_CIFS_EXPERIMENTAL + .readv = generic_file_readv, + .writev = generic_file_writev, + .aio_read = generic_file_aio_read, + .aio_write = generic_file_aio_write, + .dir_notify = cifs_dir_notify, +#endif /* CONFIG_CIFS_EXPERIMENTAL */ +}; + +struct file_operations cifs_file_direct_ops = { + /* no mmap, no aio, no readv - + BB reevaluate whether they can be done with directio, no cache */ + .read = cifs_user_read, + .write = cifs_user_write, + .open = cifs_open, + .release = cifs_close, + .lock = cifs_lock, + .fsync = cifs_fsync, + .flush = cifs_flush, + .sendfile = generic_file_sendfile, /* BB removeme BB */ +#ifdef CONFIG_CIFS_EXPERIMENTAL .dir_notify = cifs_dir_notify, #endif /* CONFIG_CIFS_EXPERIMENTAL */ }; @@ -601,7 +596,7 @@ static void cifs_init_once(void *inode, kmem_cache_t * cachep, unsigned long flags) { - struct cifsInodeInfo *cifsi = (struct cifsInodeInfo *) inode; + struct cifsInodeInfo *cifsi = inode; if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR) { @@ -654,7 +649,7 @@ cifs_min_rcv = 1; else if (cifs_min_rcv > 64) { cifs_min_rcv = 64; - cFYI(1,("cifs_min_rcv set to maximum (64)")); + cERROR(1,("cifs_min_rcv set to maximum (64)")); } cifs_req_poolp = mempool_create(cifs_min_rcv, diff -Nru a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h --- a/fs/cifs/cifsfs.h 2005-03-30 16:58:47 -08:00 +++ b/fs/cifs/cifsfs.h 2005-03-30 16:58:47 -08:00 @@ -42,8 +42,10 @@ /* Functions related to inodes */ extern struct inode_operations cifs_dir_inode_ops; -extern int cifs_create(struct inode *, struct dentry *, int, struct nameidata *); -extern struct dentry *cifs_lookup(struct inode *, struct dentry *, struct nameidata *); +extern int cifs_create(struct inode *, struct dentry *, int, + struct nameidata *); +extern struct dentry * cifs_lookup(struct inode *, struct dentry *, + struct nameidata *); extern int cifs_unlink(struct inode *, struct dentry *); extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); extern int cifs_mknod(struct inode *, struct dentry *, int, dev_t); @@ -60,6 +62,7 @@ /* Functions related to files and directories */ extern struct file_operations cifs_file_ops; +extern struct file_operations cifs_file_direct_ops; /* if directio mount */ extern int cifs_open(struct inode *inode, struct file *file); extern int cifs_close(struct inode *inode, struct file *file); extern int cifs_closedir(struct inode *inode, struct file *file); @@ -82,7 +85,8 @@ /* Functions related to symlinks */ extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd); extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd); -extern int cifs_readlink(struct dentry *direntry, char __user *buffer, int buflen); +extern int cifs_readlink(struct dentry *direntry, char __user *buffer, + int buflen); extern int cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname); extern int cifs_removexattr(struct dentry *, const char *); @@ -90,5 +94,5 @@ size_t, int); extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); -#define CIFS_VERSION "1.30" +#define CIFS_VERSION "1.31" #endif /* _CIFSFS_H */ diff -Nru a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h --- a/fs/cifs/cifsglob.h 2005-03-30 16:58:47 -08:00 +++ b/fs/cifs/cifsglob.h 2005-03-30 16:58:47 -08:00 @@ -176,6 +176,7 @@ enum statusEnum status; __u32 sequence_number; /* needed for CIFS PDU signature */ __u16 ipc_tid; /* special tid for connection to IPC share */ + __u16 flags; char mac_signing_key[CIFS_SESSION_KEY_SIZE + 16]; char *serverOS; /* name of operating system underlying the server */ char *serverNOS; /* name of network operating system that the server is running */ @@ -188,6 +189,8 @@ char domainName[MAX_USERNAME_SIZE + 1]; char * password; }; +/* session flags */ +#define CIFS_SES_NT4 1 /* * there is one of these for each connection to a resource on a particular diff -Nru a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h --- a/fs/cifs/cifspdu.h 2005-03-30 16:58:50 -08:00 +++ b/fs/cifs/cifspdu.h 2005-03-30 16:58:50 -08:00 @@ -36,6 +36,7 @@ #define SMB_COM_CLOSE 0x04 /* triv req/rsp, timestamp ignored */ #define SMB_COM_DELETE 0x06 /* trivial response */ #define SMB_COM_RENAME 0x07 /* trivial response */ +#define SMB_COM_SETATTR 0x09 /* trivial response */ #define SMB_COM_LOCKING_ANDX 0x24 /* trivial response */ #define SMB_COM_COPY 0x29 /* trivial rsp, fail filename ignrd*/ #define SMB_COM_READ_ANDX 0x2E @@ -864,6 +865,24 @@ struct smb_hdr hdr; /* wct = 0 */ __u16 ByteCount; /* bct = 0 */ } CREATE_DIRECTORY_RSP; + +typedef struct smb_com_setattr_req { + struct smb_hdr hdr; /* wct = 8 */ + __le16 attr; + __le16 time_low; + __le16 time_high; + __le16 reserved[5]; /* must be zero */ + __u16 ByteCount; + __u8 BufferFormat; /* 4 = ASCII */ + unsigned char fileName[1]; +} SETATTR_REQ; + +typedef struct smb_com_setattr_rsp { + struct smb_hdr hdr; /* wct = 0 */ + __u16 ByteCount; /* bct = 0 */ +} SETATTR_RSP; + +/* empty wct response to setattr */ /***************************************************/ /* NT Transact structure defintions follow */ diff -Nru a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h --- a/fs/cifs/cifsproto.h 2005-03-30 16:58:50 -08:00 +++ b/fs/cifs/cifsproto.h 2005-03-30 16:58:50 -08:00 @@ -137,10 +137,11 @@ const struct nls_table *nls_codepage); extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, const FILE_BASIC_INFO * data, __u16 fid); -extern int CIFSSMBSetTimesLegacy(int xid, struct cifsTconInfo *tcon, - char *fileName, FILE_BASIC_INFO * data, +#if 0 +extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, + char *fileName, __u16 dos_attributes, const struct nls_table *nls_codepage); - +#endif /* possibly unneeded function */ extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName, __u64 size,int setAllocationSizeFlag, const struct nls_table *nls_codepage); diff -Nru a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c --- a/fs/cifs/cifssmb.c 2005-03-30 16:58:47 -08:00 +++ b/fs/cifs/cifssmb.c 2005-03-30 16:58:47 -08:00 @@ -2613,23 +2613,86 @@ int rc = 0; TRANSACTION2_QPI_REQ *pSMB = NULL; TRANSACTION2_QPI_RSP *pSMBr = NULL; + int name_len, bytes_returned; + __u16 params, byte_count; - cFYI(1,("In GetSrvInodeNumber for %s",searchName)); + cFYI(1,("In GetSrvInodeNum for %s",searchName)); if(tcon == NULL) return -ENODEV; - cFYI(1, ("In QPathInfo path %s", searchName)); GetInodeNumberRetry: rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, (void **) &pSMBr); if (rc) return rc; -/* BB add missing code here */ - if (pSMB) - cifs_buf_release(pSMB); - + if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { + name_len = + cifs_strtoUCS((wchar_t *) pSMB->FileName, searchName, + PATH_MAX,nls_codepage); + name_len++; /* trailing null */ + name_len *= 2; + } else { /* BB improve the check for buffer overruns BB */ + name_len = strnlen(searchName, PATH_MAX); + name_len++; /* trailing null */ + strncpy(pSMB->FileName, searchName, name_len); + } + + params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ; + pSMB->TotalDataCount = 0; + pSMB->MaxParameterCount = cpu_to_le16(2); + /* BB find exact max data count below from sess structure BB */ + pSMB->MaxDataCount = cpu_to_le16(4000); + pSMB->MaxSetupCount = 0; + pSMB->Reserved = 0; + pSMB->Flags = 0; + pSMB->Timeout = 0; + pSMB->Reserved2 = 0; + pSMB->ParameterOffset = cpu_to_le16(offsetof( + struct smb_com_transaction2_qpi_req ,InformationLevel) - 4); + pSMB->DataCount = 0; + pSMB->DataOffset = 0; + pSMB->SetupCount = 1; + pSMB->Reserved3 = 0; + pSMB->SubCommand = cpu_to_le16(TRANS2_QUERY_PATH_INFORMATION); + byte_count = params + 1 /* pad */ ; + pSMB->TotalParameterCount = cpu_to_le16(params); + pSMB->ParameterCount = pSMB->TotalParameterCount; + pSMB->InformationLevel = cpu_to_le16(SMB_QUERY_FILE_INTERNAL_INFO); + pSMB->Reserved4 = 0; + pSMB->hdr.smb_buf_length += byte_count; + pSMB->ByteCount = cpu_to_le16(byte_count); + + rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, + (struct smb_hdr *) pSMBr, &bytes_returned, 0); + if (rc) { + cFYI(1, ("error %d in QueryInternalInfo", rc)); + } else { + /* decode response */ + rc = validate_t2((struct smb_t2_rsp *)pSMBr); + if (rc || (pSMBr->ByteCount < 2)) + /* BB also check enough total bytes returned */ + /* If rc should we check for EOPNOSUPP and + disable the srvino flag? or in caller? */ + rc = -EIO; /* bad smb */ + else { + __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); + __u16 count = le16_to_cpu(pSMBr->t2.DataCount); + struct file_internal_info * pfinfo; + /* BB Do we need a cast or hash here ? */ + if(count < 8) { + cFYI(1, ("Illegal size ret in QryIntrnlInf")); + rc = -EIO; + goto GetInodeNumOut; + } + pfinfo = (struct file_internal_info *) + (data_offset + (char *) &pSMBr->hdr.Protocol); + *inode_number = pfinfo->UniqueId; + } + } +GetInodeNumOut: + cifs_buf_release(pSMB); if (rc == -EAGAIN) goto GetInodeNumberRetry; return rc; @@ -3526,85 +3589,58 @@ return rc; } +/* Can not be used to set time stamps yet (due to old DOS time format) */ +/* Can be used to set attributes */ +#if 0 /* Possibly not needed - since it turns out that strangely NT4 has a bug + handling it anyway and NT4 was what we thought it would be needed for + Do not delete it until we prove whether needed for Win9x though */ int -CIFSSMBSetTimesLegacy(int xid, struct cifsTconInfo *tcon, char *fileName, - FILE_BASIC_INFO * data, const struct nls_table *nls_codepage) +CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, char *fileName, + __u16 dos_attrs, const struct nls_table *nls_codepage) { - TRANSACTION2_SPI_REQ *pSMB = NULL; - TRANSACTION2_SPI_RSP *pSMBr = NULL; - FILE_INFO_STANDARD *pfinfo; - int name_len; + SETATTR_REQ *pSMB = NULL; + SETATTR_RSP *pSMBr = NULL; int rc = 0; - int bytes_returned = 0; - char *data_offset; - __u16 params, param_offset, count, offset, byte_count; + int bytes_returned; + int name_len; - cFYI(1, ("In SetTimesLegacy")); + cFYI(1, ("In SetAttrLegacy")); -SetTimesRetryLegacy: - rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, +SetAttrLgcyRetry: + rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB, (void **) &pSMBr); if (rc) return rc; if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { name_len = - cifs_strtoUCS((wchar_t *) pSMB->FileName, fileName, PATH_MAX - /* find define for this maxpathcomponent */ - , nls_codepage); - name_len++; /* trailing null */ + cifs_strtoUCS((wchar_t *) pSMB->fileName, fileName, + PATH_MAX, nls_codepage); + name_len++; /* trailing null */ name_len *= 2; - } else { /* BB improve the check for buffer overruns BB */ + } else { /* BB improve the check for buffer overruns BB */ name_len = strnlen(fileName, PATH_MAX); - name_len++; /* trailing null */ - strncpy(pSMB->FileName, fileName, name_len); + name_len++; /* trailing null */ + strncpy(pSMB->fileName, fileName, name_len); } -/* BB fixme - we have to map to FILE_STANDARD_INFO (level 1 info - in parent function, from the better and ususal FILE_BASIC_INFO */ - params = 6 + name_len; - pSMB->MaxParameterCount = cpu_to_le16(2); - pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ - pSMB->MaxSetupCount = 0; - pSMB->Reserved = 0; - pSMB->Flags = 0; - pSMB->Timeout = 0; - pSMB->Reserved2 = 0; - param_offset = offsetof(struct smb_com_transaction2_spi_req, - InformationLevel) - 4; - offset = param_offset + params; - data_offset = (char *) (&pSMB->hdr.Protocol) + offset; - pfinfo = (FILE_INFO_STANDARD *)data_offset; - /* BB add conversion for FILE_BASIC_INFO data struct to - FILE_INFO_STANDARD finfo struct */ - pSMB->ParameterOffset = cpu_to_le16(param_offset); - pSMB->DataOffset = cpu_to_le16(offset); - pSMB->SetupCount = 1; - pSMB->Reserved3 = 0; - pSMB->SubCommand = cpu_to_le16(TRANS2_SET_PATH_INFORMATION); - count = sizeof(FILE_INFO_STANDARD); - byte_count = 3 /* pad */ + params + count; - - pSMB->DataCount = cpu_to_le16(count); - pSMB->ParameterCount = cpu_to_le16(params); - pSMB->TotalDataCount = pSMB->DataCount; - pSMB->TotalParameterCount = pSMB->ParameterCount; - pSMB->InformationLevel = cpu_to_le16(SMB_INFO_STANDARD); - pSMB->Reserved4 = 0; - pSMB->hdr.smb_buf_length += byte_count; - pSMB->ByteCount = cpu_to_le16(byte_count); + pSMB->attr = cpu_to_le16(dos_attrs); + pSMB->BufferFormat = 0x04; + pSMB->hdr.smb_buf_length += name_len + 1; + pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { - cFYI(1, ("SetPathInfo (times legacy) returned %d", rc)); + cFYI(1, ("Error in LegacySetAttr = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) - goto SetTimesRetryLegacy; + goto SetAttrLgcyRetry; return rc; } +#endif /* temporarily unneeded SetAttr legacy function */ int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon, diff -Nru a/fs/cifs/connect.c b/fs/cifs/connect.c --- a/fs/cifs/connect.c 2005-03-30 16:58:50 -08:00 +++ b/fs/cifs/connect.c 2005-03-30 16:58:50 -08:00 @@ -470,7 +470,7 @@ } static void * -cifs_kcalloc(size_t size, int type) +cifs_kcalloc(size_t size, unsigned int __nocast type) { void *addr; addr = kmalloc(size, type); @@ -543,9 +543,18 @@ return 1; } } else if (strnicmp(data, "pass", 4) == 0) { - if (!value || !*value) { + if (!value) { vol->password = NULL; continue; + } else if(value[0] == 0) { + /* check if string begins with double comma + since that would mean the password really + does start with a comma, and would not + indicate an empty string */ + if(value[1] != separator[0]) { + vol->password = NULL; + continue; + } } temp_len = strlen(value); /* removed password length check, NTLM passwords @@ -560,15 +569,20 @@ /* NB: password legally can have multiple commas and the only illegal character in a password is null */ - + if ((value[temp_len] == 0) && (value[temp_len+1] == separator[0])) { /* reinsert comma */ value[temp_len] = separator[0]; temp_len+=2; /* move after the second comma */ while(value[temp_len] != 0) { - if((value[temp_len] == separator[0]) && (value[temp_len+1] != separator[0])) { - /* single comma indicating start of next parm */ - break; + if (value[temp_len] == separator[0]) { + if (value[temp_len+1] == separator[0]) { + temp_len++; /* skip second comma */ + } else { + /* single comma indicating start + of next parm */ + break; + } } temp_len++; } @@ -576,10 +590,12 @@ options = NULL; } else { value[temp_len] = 0; - /* move options to point to start of next parm */ + /* point option to start of next parm */ options = value + temp_len + 1; } - /* go from value to (value + temp_len) condensing double commas to singles */ + /* go from value to value + temp_len condensing + double commas to singles. Note that this ends up + allocating a few bytes too many, which is ok */ vol->password = cifs_kcalloc(temp_len, GFP_KERNEL); for(i=0,j=0;ipassword[j] = value[i]; @@ -588,8 +604,7 @@ i++; } } - /* value[temp_len] is zeroed above so - vol->password[temp_len] guaranteed to be null */ + vol->password[j] = 0; } else { vol->password = cifs_kcalloc(temp_len + 1, GFP_KERNEL); strcpy(vol->password, value); @@ -1182,6 +1197,7 @@ } if (volume_info.username) { + /* BB fixme parse for domain name here */ cFYI(1, ("Username: %s ", volume_info.username)); } else { @@ -1564,7 +1580,8 @@ if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; - capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | CAP_LARGE_WRITE_X | CAP_LARGE_READ_X; + capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | + CAP_LARGE_WRITE_X | CAP_LARGE_READ_X; if (ses->capabilities & CAP_UNICODE) { smb_buffer->Flags2 |= SMBFLG2_UNICODE; capabilities |= CAP_UNICODE; @@ -1591,7 +1608,7 @@ bcc_ptr += CIFS_SESSION_KEY_SIZE; if (ses->capabilities & CAP_UNICODE) { - if ((long) bcc_ptr % 2) { /* must be word aligned for Unicode */ + if ((long) bcc_ptr % 2) { /* must be word aligned for Unicode */ *bcc_ptr = 0; bcc_ptr++; } @@ -1601,7 +1618,8 @@ bytes_returned = cifs_strtoUCS((wchar_t *) bcc_ptr, user, 100, nls_codepage); - bcc_ptr += 2 * bytes_returned; /* convert num 16 bit words to bytes */ + /* convert number of 16 bit words to bytes */ + bcc_ptr += 2 * bytes_returned; bcc_ptr += 2; /* trailing null */ if (domain == NULL) bytes_returned = @@ -1618,8 +1636,8 @@ 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bytes_returned = - cifs_strtoUCS((wchar_t *) bcc_ptr, system_utsname.release, 32, - nls_codepage); + cifs_strtoUCS((wchar_t *) bcc_ptr, system_utsname.release, + 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bcc_ptr += 2; bytes_returned = @@ -1705,6 +1723,11 @@ bcc_ptr += 2 * (len + 1); ses->serverNOS[2 * len] = 0; ses->serverNOS[1 + (2 * len)] = 0; + if(strncmp(ses->serverNOS, + "NT LAN Manager 4",16) == 0) { + cFYI(1,("NT4 server")); + ses->flags |= CIFS_SES_NT4; + } remaining_words -= len + 1; if (remaining_words > 0) { len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); @@ -2909,7 +2932,8 @@ return 0; } else if (rc == -ESHUTDOWN) { cFYI(1,("Waking up socket by sending it signal")); - send_sig(SIGKILL,cifsd_task,1); + if(cifsd_task) + send_sig(SIGKILL,cifsd_task,1); rc = 0; } /* else - we have an smb session left on this socket do not kill cifsd */ diff -Nru a/fs/cifs/file.c b/fs/cifs/file.c --- a/fs/cifs/file.c 2005-03-30 16:58:50 -08:00 +++ b/fs/cifs/file.c 2005-03-30 16:58:50 -08:00 @@ -35,8 +35,117 @@ #include "cifs_debug.h" #include "cifs_fs_sb.h" -int -cifs_open(struct inode *inode, struct file *file) +static inline struct cifsFileInfo *cifs_init_private( + struct cifsFileInfo *private_data, struct inode *inode, + struct file *file, __u16 netfid) +{ + memset(private_data, 0, sizeof(struct cifsFileInfo)); + private_data->netfid = netfid; + private_data->pid = current->tgid; + init_MUTEX(&private_data->fh_sem); + private_data->pfile = file; /* needed for writepage */ + private_data->pInode = inode; + private_data->invalidHandle = FALSE; + private_data->closePend = FALSE; + + return private_data; +} + +static inline int cifs_convert_flags(unsigned int flags) +{ + if ((flags & O_ACCMODE) == O_RDONLY) + return GENERIC_READ; + else if ((flags & O_ACCMODE) == O_WRONLY) + return GENERIC_WRITE; + else if ((flags & O_ACCMODE) == O_RDWR) { + /* GENERIC_ALL is too much permission to request + can cause unnecessary access denied on create */ + /* return GENERIC_ALL; */ + return (GENERIC_READ | GENERIC_WRITE); + } + + return 0x20197; +} + +static inline int cifs_get_disposition(unsigned int flags) +{ + if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) + return FILE_CREATE; + else if ((flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) + return FILE_OVERWRITE_IF; + else if ((flags & O_CREAT) == O_CREAT) + return FILE_OPEN_IF; + else + return FILE_OPEN; +} + +/* all arguments to this function must be checked for validity in caller */ +static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, + struct cifsInodeInfo *pCifsInode, struct cifsFileInfo *pCifsFile, + struct cifsTconInfo *pTcon, int *oplock, FILE_ALL_INFO *buf, + char *full_path, int xid) +{ + struct timespec temp; + int rc; + + /* want handles we can use to read with first + in the list so we do not have to walk the + list to search for one in prepare_write */ + if ((file->f_flags & O_ACCMODE) == O_WRONLY) { + list_add_tail(&pCifsFile->flist, + &pCifsInode->openFileList); + } else { + list_add(&pCifsFile->flist, + &pCifsInode->openFileList); + } + write_unlock(&GlobalSMBSeslock); + write_unlock(&file->f_owner.lock); + if (pCifsInode->clientCanCacheRead) { + /* we have the inode open somewhere else + no need to discard cache data */ + goto client_can_cache; + } + + /* BB need same check in cifs_create too? */ + /* if not oplocked, invalidate inode pages if mtime or file + size changed */ + temp = cifs_NTtimeToUnix(le64_to_cpu(buf->LastWriteTime)); + if (timespec_equal(&file->f_dentry->d_inode->i_mtime, &temp) && + (file->f_dentry->d_inode->i_size == + (loff_t)le64_to_cpu(buf->EndOfFile))) { + cFYI(1, ("inode unchanged on server")); + } else { + if (file->f_dentry->d_inode->i_mapping) { + /* BB no need to lock inode until after invalidate + since namei code should already have it locked? */ + filemap_fdatawrite(file->f_dentry->d_inode->i_mapping); + filemap_fdatawait(file->f_dentry->d_inode->i_mapping); + } + cFYI(1, ("invalidating remote inode since open detected it " + "changed")); + invalidate_remote_inode(file->f_dentry->d_inode); + } + +client_can_cache: + if (pTcon->ses->capabilities & CAP_UNIX) + rc = cifs_get_inode_info_unix(&file->f_dentry->d_inode, + full_path, inode->i_sb, xid); + else + rc = cifs_get_inode_info(&file->f_dentry->d_inode, + full_path, buf, inode->i_sb, xid); + + if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) { + pCifsInode->clientCanCacheAll = TRUE; + pCifsInode->clientCanCacheRead = TRUE; + cFYI(1, ("Exclusive Oplock granted on inode %p", + file->f_dentry->d_inode)); + } else if ((*oplock & 0xF) == OPLOCK_READ) + pCifsInode->clientCanCacheRead = TRUE; + + return rc; +} + +int cifs_open(struct inode *inode, struct file *file) { int rc = -EACCES; int xid, oplock; @@ -44,12 +153,12 @@ struct cifsTconInfo *pTcon; struct cifsFileInfo *pCifsFile; struct cifsInodeInfo *pCifsInode; - struct list_head * tmp; + struct list_head *tmp; char *full_path = NULL; - int desiredAccess = 0x20197; + int desiredAccess; int disposition; __u16 netfid; - FILE_ALL_INFO * buf = NULL; + FILE_ALL_INFO *buf = NULL; xid = GetXid(); @@ -57,48 +166,46 @@ pTcon = cifs_sb->tcon; if (file->f_flags & O_CREAT) { - /* search inode for this file and fill in file->private_data = */ + /* search inode for this file and fill in file->private_data */ pCifsInode = CIFS_I(file->f_dentry->d_inode); read_lock(&GlobalSMBSeslock); - list_for_each(tmp, &pCifsInode->openFileList) { - pCifsFile = list_entry(tmp,struct cifsFileInfo, flist); - if((pCifsFile->pfile == NULL)&& (pCifsFile->pid == current->tgid)){ - /* mode set in cifs_create */ - pCifsFile->pfile = file; /* needed for writepage */ + list_for_each(tmp, &pCifsInode->openFileList) { + pCifsFile = list_entry(tmp, struct cifsFileInfo, + flist); + if ((pCifsFile->pfile == NULL) && + (pCifsFile->pid == current->tgid)) { + /* mode set in cifs_create */ + + /* needed for writepage */ + pCifsFile->pfile = file; + file->private_data = pCifsFile; break; } } read_unlock(&GlobalSMBSeslock); - if(file->private_data != NULL) { + if (file->private_data != NULL) { rc = 0; FreeXid(xid); return rc; } else { - if(file->f_flags & O_EXCL) - cERROR(1,("could not find file instance for new file %p ",file)); + if (file->f_flags & O_EXCL) + cERROR(1, ("could not find file instance for " + "new file %p ", file)); } } down(&inode->i_sb->s_vfs_rename_sem); full_path = build_path_from_dentry(file->f_dentry); up(&inode->i_sb->s_vfs_rename_sem); - if(full_path == NULL) { + if (full_path == NULL) { FreeXid(xid); return -ENOMEM; } - cFYI(1, (" inode = 0x%p file flags are 0x%x for %s", inode, file->f_flags,full_path)); - if ((file->f_flags & O_ACCMODE) == O_RDONLY) - desiredAccess = GENERIC_READ; - else if ((file->f_flags & O_ACCMODE) == O_WRONLY) - desiredAccess = GENERIC_WRITE; - else if ((file->f_flags & O_ACCMODE) == O_RDWR) { - /* GENERIC_ALL is too much permission to request */ - /* can cause unnecessary access denied on create */ - /* desiredAccess = GENERIC_ALL; */ - desiredAccess = GENERIC_READ | GENERIC_WRITE; - } + cFYI(1, (" inode = 0x%p file flags are 0x%x for %s", + inode, file->f_flags, full_path)); + desiredAccess = cifs_convert_flags(file->f_flags); /********************************************************************* * open flag mapping table: @@ -124,14 +231,7 @@ * O_FASYNC, O_NOFOLLOW, O_NONBLOCK need further investigation *********************************************************************/ - if((file->f_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) - disposition = FILE_CREATE; - else if((file->f_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC)) - disposition = FILE_OVERWRITE_IF; - else if((file->f_flags & O_CREAT) == O_CREAT) - disposition = FILE_OPEN_IF; - else - disposition = FILE_OPEN; + disposition = cifs_get_disposition(file->f_flags); if (oplockEnabled) oplock = REQ_OPLOCK; @@ -140,125 +240,73 @@ /* BB pass O_SYNC flag through on file attributes .. BB */ - /* Also refresh inode by passing in file_info buf returned by SMBOpen - and calling get_inode_info with returned buf (at least - helps non-Unix server case */ + /* Also refresh inode by passing in file_info buf returned by SMBOpen + and calling get_inode_info with returned buf (at least helps + non-Unix server case) */ /* BB we can not do this if this is the second open of a file - and the first handle has writebehind data, we might be - able to simply do a filemap_fdatawrite/filemap_fdatawait first */ - buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL); - if(buf== NULL) { - if (full_path) - kfree(full_path); - FreeXid(xid); - return -ENOMEM; + and the first handle has writebehind data, we might be + able to simply do a filemap_fdatawrite/filemap_fdatawait first */ + buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); + if (!buf) { + rc = -ENOMEM; + goto out; } rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess, - CREATE_NOT_DIR, &netfid, &oplock, buf, cifs_sb->local_nls); + CREATE_NOT_DIR, &netfid, &oplock, buf, + cifs_sb->local_nls); if (rc) { cFYI(1, ("cifs_open returned 0x%x ", rc)); - cFYI(1, ("oplock: %d ", oplock)); + goto out; + } + file->private_data = + kmalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); + if (file->private_data == NULL) { + rc = -ENOMEM; + goto out; + } + pCifsFile = cifs_init_private(file->private_data, inode, file, netfid); + write_lock(&file->f_owner.lock); + write_lock(&GlobalSMBSeslock); + list_add(&pCifsFile->tlist, &pTcon->openFileList); + + pCifsInode = CIFS_I(file->f_dentry->d_inode); + if (pCifsInode) { + rc = cifs_open_inode_helper(inode, file, pCifsInode, + pCifsFile, pTcon, + &oplock, buf, full_path, xid); } else { - file->private_data = - kmalloc(sizeof (struct cifsFileInfo), GFP_KERNEL); - if (file->private_data) { - memset(file->private_data, 0, sizeof(struct cifsFileInfo)); - pCifsFile = (struct cifsFileInfo *) file->private_data; - pCifsFile->netfid = netfid; - pCifsFile->pid = current->tgid; - init_MUTEX(&pCifsFile->fh_sem); - pCifsFile->pfile = file; /* needed for writepage */ - pCifsFile->pInode = inode; - pCifsFile->invalidHandle = FALSE; - pCifsFile->closePend = FALSE; - write_lock(&file->f_owner.lock); - write_lock(&GlobalSMBSeslock); - list_add(&pCifsFile->tlist,&pTcon->openFileList); - pCifsInode = CIFS_I(file->f_dentry->d_inode); - if(pCifsInode) { - /* want handles we can use to read with first */ - /* in the list so we do not have to walk the */ - /* list to search for one in prepare_write */ - if ((file->f_flags & O_ACCMODE) == O_WRONLY) { - list_add_tail(&pCifsFile->flist,&pCifsInode->openFileList); - } else { - list_add(&pCifsFile->flist,&pCifsInode->openFileList); - } - write_unlock(&GlobalSMBSeslock); - write_unlock(&file->f_owner.lock); - if(pCifsInode->clientCanCacheRead) { - /* we have the inode open somewhere else - no need to discard cache data */ - } else { - if(buf) { - /* BB need same check in cifs_create too? */ - - /* if not oplocked, invalidate inode pages if mtime - or file size changed */ - struct timespec temp; - temp = cifs_NTtimeToUnix(le64_to_cpu(buf->LastWriteTime)); - if(timespec_equal(&file->f_dentry->d_inode->i_mtime,&temp) && - (file->f_dentry->d_inode->i_size == (loff_t)le64_to_cpu(buf->EndOfFile))) { - cFYI(1,("inode unchanged on server")); - } else { - if(file->f_dentry->d_inode->i_mapping) { - /* BB no need to lock inode until after invalidate*/ - /* since namei code should already have it locked?*/ - filemap_fdatawrite(file->f_dentry->d_inode->i_mapping); - filemap_fdatawait(file->f_dentry->d_inode->i_mapping); - } - cFYI(1,("invalidating remote inode since open detected it changed")); - invalidate_remote_inode(file->f_dentry->d_inode); - } - } - } - if (pTcon->ses->capabilities & CAP_UNIX) - rc = cifs_get_inode_info_unix(&file->f_dentry->d_inode, - full_path, inode->i_sb,xid); - else - rc = cifs_get_inode_info(&file->f_dentry->d_inode, - full_path, buf, inode->i_sb,xid); + write_unlock(&GlobalSMBSeslock); + write_unlock(&file->f_owner.lock); + } - if((oplock & 0xF) == OPLOCK_EXCLUSIVE) { - pCifsInode->clientCanCacheAll = TRUE; - pCifsInode->clientCanCacheRead = TRUE; - cFYI(1,("Exclusive Oplock granted on inode %p",file->f_dentry->d_inode)); - } else if((oplock & 0xF) == OPLOCK_READ) - pCifsInode->clientCanCacheRead = TRUE; - } else { - write_unlock(&GlobalSMBSeslock); - write_unlock(&file->f_owner.lock); - } - if(oplock & CIFS_CREATE_ACTION) { - /* time to set mode which we can not set earlier due - to problems creating new read-only files */ - if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) - CIFSSMBUnixSetPerms(xid, pTcon, full_path, inode->i_mode, - (__u64)-1, - (__u64)-1, - 0 /* dev */, - cifs_sb->local_nls); - else {/* BB implement via Windows security descriptors */ - /* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/ - /* in the meantime could set r/o dos attribute when perms are eg: - mode & 0222 == 0 */ - } - } + if (oplock & CIFS_CREATE_ACTION) { + /* time to set mode which we can not set earlier due to + problems creating new read-only files */ + if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) { + CIFSSMBUnixSetPerms(xid, pTcon, full_path, + inode->i_mode, + (__u64)-1, (__u64)-1, 0 /* dev */, + cifs_sb->local_nls); + } else { + /* BB implement via Windows security descriptors eg + CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, + -1, -1, local_nls); + in the meantime could set r/o dos attribute when + perms are eg: mode & 0222 == 0 */ } } - if (buf) - kfree(buf); - if (full_path) - kfree(full_path); +out: + kfree(buf); + kfree(full_path); FreeXid(xid); return rc; } /* Try to reaquire byte range locks that were released when session */ /* to server was lost */ -static int cifs_relock_file(struct cifsFileInfo * cifsFile) +static int cifs_relock_file(struct cifsFileInfo *cifsFile) { int rc = 0; @@ -267,7 +315,8 @@ return rc; } -static int cifs_reopen_file(struct inode *inode, struct file *file, int can_flush) +static int cifs_reopen_file(struct inode *inode, struct file *file, + int can_flush) { int rc = -EACCES; int xid, oplock; @@ -276,78 +325,69 @@ struct cifsFileInfo *pCifsFile; struct cifsInodeInfo *pCifsInode; char *full_path = NULL; - int desiredAccess = 0x20197; + int desiredAccess; int disposition = FILE_OPEN; __u16 netfid; - if(inode == NULL) + if (inode == NULL) return -EBADF; if (file->private_data) { - pCifsFile = (struct cifsFileInfo *) file->private_data; + pCifsFile = (struct cifsFileInfo *)file->private_data; } else return -EBADF; xid = GetXid(); down(&pCifsFile->fh_sem); - if(pCifsFile->invalidHandle == FALSE) { + if (pCifsFile->invalidHandle == FALSE) { up(&pCifsFile->fh_sem); FreeXid(xid); return 0; } - if(file->f_dentry == NULL) { + if (file->f_dentry == NULL) { up(&pCifsFile->fh_sem); - cFYI(1,("failed file reopen, no valid name if dentry freed")); + cFYI(1, ("failed file reopen, no valid name if dentry freed")); FreeXid(xid); return -EBADF; } cifs_sb = CIFS_SB(inode->i_sb); pTcon = cifs_sb->tcon; /* can not grab rename sem here because various ops, including -those that already have the rename sem can end up causing writepage -to get called and if the server was down that means we end up here, -and we can never tell if the caller already has the rename_sem */ + those that already have the rename sem can end up causing writepage + to get called and if the server was down that means we end up here, + and we can never tell if the caller already has the rename_sem */ full_path = build_path_from_dentry(file->f_dentry); - if(full_path == NULL) { + if (full_path == NULL) { up(&pCifsFile->fh_sem); FreeXid(xid); return -ENOMEM; } - cFYI(1, (" inode = 0x%p file flags are 0x%x for %s", inode, file->f_flags,full_path)); - if ((file->f_flags & O_ACCMODE) == O_RDONLY) - desiredAccess = GENERIC_READ; - else if ((file->f_flags & O_ACCMODE) == O_WRONLY) - desiredAccess = GENERIC_WRITE; - else if ((file->f_flags & O_ACCMODE) == O_RDWR) { - /* GENERIC_ALL is too much permission to request */ - /* can cause unnecessary access denied on create */ - /* desiredAccess = GENERIC_ALL; */ - desiredAccess = GENERIC_READ | GENERIC_WRITE; - } + cFYI(1, (" inode = 0x%p file flags are 0x%x for %s", + inode, file->f_flags,full_path)); + desiredAccess = cifs_convert_flags(file->f_flags); if (oplockEnabled) oplock = REQ_OPLOCK; else oplock = FALSE; - /* Can not refresh inode by passing in file_info buf to be returned - by SMBOpen and then calling get_inode_info with returned buf - since file might have write behind data that needs to be flushed - and server version of file size can be stale. If we - knew for sure that inode was not dirty locally we could do this */ + by SMBOpen and then calling get_inode_info with returned buf + since file might have write behind data that needs to be flushed + and server version of file size can be stale. If we knew for sure + that inode was not dirty locally we could do this */ -/* buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL); - if(buf==0) { +/* buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); + if (buf == 0) { up(&pCifsFile->fh_sem); - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); return -ENOMEM; - }*/ + } */ rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess, - CREATE_NOT_DIR, &netfid, &oplock, NULL, cifs_sb->local_nls); + CREATE_NOT_DIR, &netfid, &oplock, NULL, + cifs_sb->local_nls); if (rc) { up(&pCifsFile->fh_sem); cFYI(1, ("cifs_open returned 0x%x ", rc)); @@ -357,104 +397,103 @@ pCifsFile->invalidHandle = FALSE; up(&pCifsFile->fh_sem); pCifsInode = CIFS_I(inode); - if(pCifsInode) { - if(can_flush) { + if (pCifsInode) { + if (can_flush) { filemap_fdatawrite(inode->i_mapping); filemap_fdatawait(inode->i_mapping); /* temporarily disable caching while we - go to server to get inode info */ + go to server to get inode info */ pCifsInode->clientCanCacheAll = FALSE; pCifsInode->clientCanCacheRead = FALSE; if (pTcon->ses->capabilities & CAP_UNIX) rc = cifs_get_inode_info_unix(&inode, - full_path, inode->i_sb,xid); + full_path, inode->i_sb, xid); else rc = cifs_get_inode_info(&inode, - full_path, NULL, inode->i_sb,xid); + full_path, NULL, inode->i_sb, + xid); } /* else we are writing out data to server already - and could deadlock if we tried to flush data, and - since we do not know if we have data that would - invalidate the current end of file on the server - we can not go to the server to get the new - inod info */ - if((oplock & 0xF) == OPLOCK_EXCLUSIVE) { - pCifsInode->clientCanCacheAll = TRUE; + and could deadlock if we tried to flush data, and + since we do not know if we have data that would + invalidate the current end of file on the server + we can not go to the server to get the new inod + info */ + if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { + pCifsInode->clientCanCacheAll = TRUE; pCifsInode->clientCanCacheRead = TRUE; - cFYI(1,("Exclusive Oplock granted on inode %p",file->f_dentry->d_inode)); - } else if((oplock & 0xF) == OPLOCK_READ) { + cFYI(1, ("Exclusive Oplock granted on inode %p", + file->f_dentry->d_inode)); + } else if ((oplock & 0xF) == OPLOCK_READ) { pCifsInode->clientCanCacheRead = TRUE; - pCifsInode->clientCanCacheAll = FALSE; + pCifsInode->clientCanCacheAll = FALSE; } else { pCifsInode->clientCanCacheRead = FALSE; - pCifsInode->clientCanCacheAll = FALSE; + pCifsInode->clientCanCacheAll = FALSE; } cifs_relock_file(pCifsFile); } } - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); return rc; } -int -cifs_close(struct inode *inode, struct file *file) +int cifs_close(struct inode *inode, struct file *file) { int rc = 0; int xid; struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; struct cifsFileInfo *pSMBFile = - (struct cifsFileInfo *) file->private_data; + (struct cifsFileInfo *)file->private_data; xid = GetXid(); cifs_sb = CIFS_SB(inode->i_sb); pTcon = cifs_sb->tcon; if (pSMBFile) { - pSMBFile->closePend = TRUE; + pSMBFile->closePend = TRUE; write_lock(&file->f_owner.lock); - if(pTcon) { + if (pTcon) { /* no sense reconnecting to close a file that is - already closed */ + already closed */ if (pTcon->tidStatus != CifsNeedReconnect) { write_unlock(&file->f_owner.lock); - rc = CIFSSMBClose(xid,pTcon,pSMBFile->netfid); + rc = CIFSSMBClose(xid, pTcon, + pSMBFile->netfid); write_lock(&file->f_owner.lock); } } list_del(&pSMBFile->flist); list_del(&pSMBFile->tlist); write_unlock(&file->f_owner.lock); - if(pSMBFile->search_resume_name) - kfree(pSMBFile->search_resume_name); + kfree(pSMBFile->search_resume_name); kfree(file->private_data); file->private_data = NULL; } else rc = -EBADF; - if(list_empty(&(CIFS_I(inode)->openFileList))) { - cFYI(1,("closing last open instance for inode %p",inode)); - /* if the file is not open we do not know if we can cache - info on this inode, much less write behind and read ahead */ + if (list_empty(&(CIFS_I(inode)->openFileList))) { + cFYI(1, ("closing last open instance for inode %p", inode)); + /* if the file is not open we do not know if we can cache info + on this inode, much less write behind and read ahead */ CIFS_I(inode)->clientCanCacheRead = FALSE; CIFS_I(inode)->clientCanCacheAll = FALSE; } - if((rc ==0) && CIFS_I(inode)->write_behind_rc) + if ((rc ==0) && CIFS_I(inode)->write_behind_rc) rc = CIFS_I(inode)->write_behind_rc; FreeXid(xid); return rc; } -int -cifs_closedir(struct inode *inode, struct file *file) +int cifs_closedir(struct inode *inode, struct file *file) { int rc = 0; int xid; struct cifsFileInfo *pCFileStruct = - (struct cifsFileInfo *) file->private_data; - char * ptmp; + (struct cifsFileInfo *)file->private_data; + char *ptmp; cFYI(1, ("Closedir inode = 0x%p with ", inode)); @@ -462,27 +501,28 @@ if (pCFileStruct) { struct cifsTconInfo *pTcon; - struct cifs_sb_info * cifs_sb = CIFS_SB(file->f_dentry->d_sb); + struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_dentry->d_sb); pTcon = cifs_sb->tcon; cFYI(1, ("Freeing private data in close dir")); - if(pCFileStruct->srch_inf.endOfSearch == FALSE) { + if (pCFileStruct->srch_inf.endOfSearch == FALSE) { pCFileStruct->invalidHandle = TRUE; rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid); - cFYI(1,("Closing uncompleted readdir with rc %d",rc)); - /* not much we can do if it fails anywway, ignore rc */ + cFYI(1, ("Closing uncompleted readdir with rc %d", + rc)); + /* not much we can do if it fails anyway, ignore rc */ rc = 0; } ptmp = pCFileStruct->srch_inf.ntwrk_buf_start; - if(ptmp) { - cFYI(1,("freeing smb buf in srch struct in closedir")); /* BB removeme BB */ + if (ptmp) { + /* BB removeme BB */ cFYI(1, ("freeing smb buf in srch struct in closedir")); pCFileStruct->srch_inf.ntwrk_buf_start = NULL; cifs_buf_release(ptmp); } ptmp = pCFileStruct->search_resume_name; - if(ptmp) { - cFYI(1,("freeing resume name in closedir")); /* BB removeme BB */ + if (ptmp) { + /* BB removeme BB */ cFYI(1, ("freeing resume name in closedir")); pCFileStruct->search_resume_name = NULL; kfree(ptmp); } @@ -494,8 +534,7 @@ return rc; } -int -cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) +int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) { int rc, xid; __u32 lockType = LOCKING_ANDX_LARGE_FILES; @@ -505,16 +544,15 @@ int wait_flag = FALSE; struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; - length = 1 + pfLock->fl_end - pfLock->fl_start; + length = 1 + pfLock->fl_end - pfLock->fl_start; rc = -EACCES; - xid = GetXid(); - cFYI(1, - ("Lock parm: 0x%x flockflags: 0x%x flocktype: 0x%x start: %lld end: %lld", - cmd, pfLock->fl_flags, pfLock->fl_type, pfLock->fl_start, - pfLock->fl_end)); + cFYI(1, ("Lock parm: 0x%x flockflags: " + "0x%x flocktype: 0x%x start: %lld end: %lld", + cmd, pfLock->fl_flags, pfLock->fl_type, pfLock->fl_start, + pfLock->fl_end)); if (pfLock->fl_flags & FL_POSIX) cFYI(1, ("Posix ")); @@ -525,11 +563,13 @@ wait_flag = TRUE; } if (pfLock->fl_flags & FL_ACCESS) - cFYI(1, ("Process suspended by mandatory locking - not implemented yet ")); + cFYI(1, ("Process suspended by mandatory locking - " + "not implemented yet ")); if (pfLock->fl_flags & FL_LEASE) cFYI(1, ("Lease on file - not implemented yet")); - if (pfLock->fl_flags & (~(FL_POSIX | FL_FLOCK | FL_SLEEP | FL_ACCESS | FL_LEASE))) - cFYI(1, ("Unknown lock flags 0x%x",pfLock->fl_flags)); + if (pfLock->fl_flags & + (~(FL_POSIX | FL_FLOCK | FL_SLEEP | FL_ACCESS | FL_LEASE))) + cFYI(1, ("Unknown lock flags 0x%x", pfLock->fl_flags)); if (pfLock->fl_type == F_WRLCK) { cFYI(1, ("F_WRLCK ")); @@ -561,7 +601,7 @@ if (IS_GETLK(cmd)) { rc = CIFSSMBLock(xid, pTcon, - ((struct cifsFileInfo *) file-> + ((struct cifsFileInfo *)file-> private_data)->netfid, length, pfLock->fl_start, 0, 1, lockType, @@ -576,14 +616,15 @@ 0 /* wait flag */ ); pfLock->fl_type = F_UNLCK; if (rc != 0) - cERROR(1, - ("Error unlocking previously locked range %d during test of lock ", - rc)); + cERROR(1, ("Error unlocking previously locked " + "range %d during test of lock ", + rc)); rc = 0; } else { /* if rc == ERR_SHARING_VIOLATION ? */ - rc = 0; /* do not change lock type to unlock since range in use */ + rc = 0; /* do not change lock type to unlock + since range in use */ } FreeXid(xid); @@ -601,9 +642,8 @@ return rc; } -ssize_t -cifs_user_write(struct file * file, const char __user * write_data, - size_t write_size, loff_t * poffset) +ssize_t cifs_user_write(struct file *file, const char __user *write_data, + size_t write_size, loff_t *poffset) { int rc = 0; unsigned int bytes_written = 0; @@ -611,75 +651,76 @@ struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; int xid, long_op; - struct cifsFileInfo * open_file; + struct cifsFileInfo *open_file; - if(file->f_dentry == NULL) + if (file->f_dentry == NULL) return -EBADF; cifs_sb = CIFS_SB(file->f_dentry->d_sb); - if(cifs_sb == NULL) { + if (cifs_sb == NULL) return -EBADF; - } + pTcon = cifs_sb->tcon; - /*cFYI(1, + /* cFYI(1, (" write %d bytes to offset %lld of %s", write_size, *poffset, file->f_dentry->d_name.name)); */ - if (file->private_data == NULL) { + if (file->private_data == NULL) return -EBADF; - } else { + else open_file = (struct cifsFileInfo *) file->private_data; - } xid = GetXid(); - if(file->f_dentry->d_inode == NULL) { + if (file->f_dentry->d_inode == NULL) { FreeXid(xid); return -EBADF; } if (*poffset > file->f_dentry->d_inode->i_size) - long_op = 2; /* writes past end of file can take a long time */ + long_op = 2; /* writes past end of file can take a long time */ else long_op = 1; for (total_written = 0; write_size > total_written; total_written += bytes_written) { rc = -EAGAIN; - while(rc == -EAGAIN) { - if(file->private_data == NULL) { + while (rc == -EAGAIN) { + if (file->private_data == NULL) { /* file has been closed on us */ FreeXid(xid); /* if we have gotten here we have written some data - and blocked, and the file has been freed on us - while we blocked so return what we managed to write */ + and blocked, and the file has been freed on us while + we blocked so return what we managed to write */ return total_written; } - if(open_file->closePend) { + if (open_file->closePend) { FreeXid(xid); - if(total_written) + if (total_written) return total_written; else return -EBADF; } if (open_file->invalidHandle) { - if((file->f_dentry == NULL) || - (file->f_dentry->d_inode == NULL)) { + if ((file->f_dentry == NULL) || + (file->f_dentry->d_inode == NULL)) { FreeXid(xid); return total_written; } /* we could deadlock if we called - filemap_fdatawait from here so tell - reopen_file not to flush data to server now */ + filemap_fdatawait from here so tell + reopen_file not to flush data to server + now */ rc = cifs_reopen_file(file->f_dentry->d_inode, - file,FALSE); - if(rc != 0) + file, FALSE); + if (rc != 0) break; } rc = CIFSSMBWrite(xid, pTcon, open_file->netfid, - min_t(const int,cifs_sb->wsize,write_size - total_written), + min_t(const int, cifs_sb->wsize, + write_size - total_written), *poffset, &bytes_written, NULL, write_data + total_written, long_op); } @@ -692,11 +733,12 @@ } } else *poffset += bytes_written; - long_op = FALSE; /* subsequent writes fast - 15 seconds is plenty */ + long_op = FALSE; /* subsequent writes fast - + 15 seconds is plenty */ } #ifdef CONFIG_CIFS_STATS - if(total_written > 0) { + if (total_written > 0) { atomic_inc(&pTcon->num_writes); spin_lock(&pTcon->stat_lock); pTcon->bytes_written += total_written; @@ -705,14 +747,15 @@ #endif /* since the write may have blocked check these pointers again */ - if(file->f_dentry) { - if(file->f_dentry->d_inode) { + if (file->f_dentry) { + if (file->f_dentry->d_inode) { struct inode *inode = file->f_dentry->d_inode; inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); if (total_written > 0) { if (*poffset > file->f_dentry->d_inode->i_size) - i_size_write(file->f_dentry->d_inode, *poffset); + i_size_write(file->f_dentry->d_inode, + *poffset); } mark_inode_dirty_sync(file->f_dentry->d_inode); } @@ -721,9 +764,8 @@ return total_written; } -static ssize_t -cifs_write(struct file * file, const char *write_data, - size_t write_size, loff_t * poffset) +static ssize_t cifs_write(struct file *file, const char *write_data, + size_t write_size, loff_t *poffset) { int rc = 0; unsigned int bytes_written = 0; @@ -731,76 +773,78 @@ struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; int xid, long_op; - struct cifsFileInfo * open_file; + struct cifsFileInfo *open_file; - if(file->f_dentry == NULL) + if (file->f_dentry == NULL) return -EBADF; cifs_sb = CIFS_SB(file->f_dentry->d_sb); - if(cifs_sb == NULL) { + if (cifs_sb == NULL) return -EBADF; - } + pTcon = cifs_sb->tcon; - /*cFYI(1, + /* cFYI(1, (" write %d bytes to offset %lld of %s", write_size, *poffset, file->f_dentry->d_name.name)); */ - if (file->private_data == NULL) { + if (file->private_data == NULL) return -EBADF; - } else { - open_file = (struct cifsFileInfo *) file->private_data; - } + else + open_file = (struct cifsFileInfo *)file->private_data; xid = GetXid(); - if(file->f_dentry->d_inode == NULL) { + if (file->f_dentry->d_inode == NULL) { FreeXid(xid); return -EBADF; } if (*poffset > file->f_dentry->d_inode->i_size) - long_op = 2; /* writes past end of file can take a long time */ + long_op = 2; /* writes past end of file can take a long time */ else long_op = 1; for (total_written = 0; write_size > total_written; total_written += bytes_written) { rc = -EAGAIN; - while(rc == -EAGAIN) { - if(file->private_data == NULL) { + while (rc == -EAGAIN) { + if (file->private_data == NULL) { /* file has been closed on us */ FreeXid(xid); /* if we have gotten here we have written some data - and blocked, and the file has been freed on us - while we blocked so return what we managed to write */ + and blocked, and the file has been freed on us + while we blocked so return what we managed to + write */ return total_written; } - if(open_file->closePend) { + if (open_file->closePend) { FreeXid(xid); - if(total_written) + if (total_written) return total_written; else return -EBADF; } if (open_file->invalidHandle) { - if((file->f_dentry == NULL) || + if ((file->f_dentry == NULL) || (file->f_dentry->d_inode == NULL)) { FreeXid(xid); return total_written; } /* we could deadlock if we called - filemap_fdatawait from here so tell - reopen_file not to flush data to server now */ + filemap_fdatawait from here so tell + reopen_file not to flush data to + server now */ rc = cifs_reopen_file(file->f_dentry->d_inode, - file,FALSE); - if(rc != 0) + file, FALSE); + if (rc != 0) break; } rc = CIFSSMBWrite(xid, pTcon, open_file->netfid, - min_t(const int,cifs_sb->wsize,write_size - total_written), - *poffset,&bytes_written, + min_t(const int, cifs_sb->wsize, + write_size - total_written), + *poffset, &bytes_written, write_data + total_written, NULL, long_op); } if (rc || (bytes_written == 0)) { @@ -812,11 +856,12 @@ } } else *poffset += bytes_written; - long_op = FALSE; /* subsequent writes fast - 15 seconds is plenty */ + long_op = FALSE; /* subsequent writes fast - + 15 seconds is plenty */ } #ifdef CONFIG_CIFS_STATS - if(total_written > 0) { + if (total_written > 0) { atomic_inc(&pTcon->num_writes); spin_lock(&pTcon->stat_lock); pTcon->bytes_written += total_written; @@ -825,13 +870,14 @@ #endif /* since the write may have blocked check these pointers again */ - if(file->f_dentry) { - if(file->f_dentry->d_inode) { - file->f_dentry->d_inode->i_ctime = file->f_dentry->d_inode->i_mtime = - CURRENT_TIME; + if (file->f_dentry) { + if (file->f_dentry->d_inode) { + file->f_dentry->d_inode->i_ctime = + file->f_dentry->d_inode->i_mtime = CURRENT_TIME; if (total_written > 0) { if (*poffset > file->f_dentry->d_inode->i_size) - i_size_write(file->f_dentry->d_inode, *poffset); + i_size_write(file->f_dentry->d_inode, + *poffset); } mark_inode_dirty_sync(file->f_dentry->d_inode); } @@ -840,12 +886,11 @@ return total_written; } -static int -cifs_partialpagewrite(struct page *page,unsigned from, unsigned to) +static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to) { struct address_space *mapping = page->mapping; loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT; - char * write_data; + char *write_data; int rc = -EFAULT; int bytes_written = 0; struct cifs_sb_info *cifs_sb; @@ -856,11 +901,8 @@ struct list_head *tmp; struct list_head *tmp1; - if (!mapping) { - return -EFAULT; - } else if(!mapping->host) { + if (!mapping || !mapping->host) return -EFAULT; - } inode = page->mapping->host; cifs_sb = CIFS_SB(inode->i_sb); @@ -870,64 +912,65 @@ write_data = kmap(page); write_data += from; - if((to > PAGE_CACHE_SIZE) || (from > to)) { + if ((to > PAGE_CACHE_SIZE) || (from > to)) { kunmap(page); return -EIO; } /* racing with truncate? */ - if(offset > mapping->host->i_size) { + if (offset > mapping->host->i_size) { kunmap(page); return 0; /* don't care */ } /* check to make sure that we are not extending the file */ - if(mapping->host->i_size - offset < (loff_t)to) + if (mapping->host->i_size - offset < (loff_t)to) to = (unsigned)(mapping->host->i_size - offset); - cifsInode = CIFS_I(mapping->host); read_lock(&GlobalSMBSeslock); /* BB we should start at the end */ list_for_each_safe(tmp, tmp1, &cifsInode->openFileList) { - open_file = list_entry(tmp,struct cifsFileInfo, flist); - if(open_file->closePend) + open_file = list_entry(tmp, struct cifsFileInfo, flist); + if (open_file->closePend) continue; /* We check if file is open for writing first */ - if((open_file->pfile) && + if ((open_file->pfile) && ((open_file->pfile->f_flags & O_RDWR) || (open_file->pfile->f_flags & O_WRONLY))) { read_unlock(&GlobalSMBSeslock); - bytes_written = cifs_write(open_file->pfile, write_data, - to-from, &offset); + bytes_written = cifs_write(open_file->pfile, + write_data, to-from, + &offset); read_lock(&GlobalSMBSeslock); /* Does mm or vfs already set times? */ - inode->i_atime = inode->i_mtime = current_fs_time(inode->i_sb); + inode->i_atime = + inode->i_mtime = current_fs_time(inode->i_sb); if ((bytes_written > 0) && (offset)) { rc = 0; - } else if(bytes_written < 0) { - if(rc == -EBADF) { - /* have seen a case in which - kernel seemed to have closed/freed a file - even with writes active so we might as well - see if there are other file structs to try - for the same inode before giving up */ + } else if (bytes_written < 0) { + if (rc == -EBADF) { + /* have seen a case in which kernel seemed to + have closed/freed a file even with writes + active so we might as well see if there are + other file structs to try for the same + inode before giving up */ continue; } else rc = bytes_written; } - break; /* now that we found a valid file handle - and tried to write to it we are done, no - sense continuing to loop looking for another */ + break; /* now that we found a valid file handle and + tried to write to it we are done, no sense + continuing to loop looking for another */ } - if(tmp->next == NULL) { - cFYI(1,("File instance %p removed",tmp)); + if (tmp->next == NULL) { + cFYI(1, ("File instance %p removed", tmp)); break; } } read_unlock(&GlobalSMBSeslock); - if(open_file == NULL) { - cFYI(1,("No writeable filehandles for inode")); + if (open_file == NULL) { + cFYI(1, ("No writeable filehandles for inode")); rc = -EIO; } @@ -936,25 +979,24 @@ } #if 0 -static int -cifs_writepages(struct address_space *mapping, struct writeback_control *wbc) +static int cifs_writepages(struct address_space *mapping, + struct writeback_control *wbc) { int rc = -EFAULT; int xid; xid = GetXid(); - /* Find contiguous pages then iterate through repeating */ -/* call 16K write then Setpageuptodate or if LARGE_WRITE_X -support then send larger writes via kevec so as to eliminate -a memcpy */ + /* Find contiguous pages then iterate through repeating + call 16K write then Setpageuptodate or if LARGE_WRITE_X + support then send larger writes via kevec so as to eliminate + a memcpy */ FreeXid(xid); return rc; } #endif -static int -cifs_writepage(struct page* page, struct writeback_control *wbc) +static int cifs_writepage(struct page* page, struct writeback_control *wbc) { int rc = -EFAULT; int xid; @@ -963,10 +1005,10 @@ /* BB add check for wbc flags */ page_cache_get(page); if (!PageUptodate(page)) { - cFYI(1,("ppw - page not up to date")); + cFYI(1, ("ppw - page not up to date")); } - rc = cifs_partialpagewrite(page,0,PAGE_CACHE_SIZE); + rc = cifs_partialpagewrite(page, 0, PAGE_CACHE_SIZE); SetPageUptodate(page); /* BB add check for error and Clearuptodate? */ unlock_page(page); page_cache_release(page); @@ -974,66 +1016,67 @@ return rc; } -static int -cifs_commit_write(struct file *file, struct page *page, unsigned offset, - unsigned to) +static int cifs_commit_write(struct file *file, struct page *page, + unsigned offset, unsigned to) { int xid; int rc = 0; struct inode *inode = page->mapping->host; loff_t position = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; - char * page_data; + char *page_data; xid = GetXid(); - cFYI(1,("commit write for page %p up to position %lld for %d",page,position,to)); - if (position > inode->i_size){ + cFYI(1, ("commit write for page %p up to position %lld for %d", + page, position, to)); + if (position > inode->i_size) { i_size_write(inode, position); - /*if (file->private_data == NULL) { + /* if (file->private_data == NULL) { rc = -EBADF; } else { open_file = (struct cifsFileInfo *)file->private_data; cifs_sb = CIFS_SB(inode->i_sb); rc = -EAGAIN; - while(rc == -EAGAIN) { - if((open_file->invalidHandle) && - (!open_file->closePend)) { - rc = cifs_reopen_file(file->f_dentry->d_inode,file); - if(rc != 0) + while (rc == -EAGAIN) { + if ((open_file->invalidHandle) && + (!open_file->closePend)) { + rc = cifs_reopen_file( + file->f_dentry->d_inode, file); + if (rc != 0) break; } - if(!open_file->closePend) { - rc = CIFSSMBSetFileSize(xid, cifs_sb->tcon, - position, open_file->netfid, - open_file->pid,FALSE); + if (!open_file->closePend) { + rc = CIFSSMBSetFileSize(xid, + cifs_sb->tcon, position, + open_file->netfid, + open_file->pid, FALSE); } else { rc = -EBADF; break; } } - cFYI(1,(" SetEOF (commit write) rc = %d",rc)); - }*/ + cFYI(1, (" SetEOF (commit write) rc = %d", rc)); + } */ } if (!PageUptodate(page)) { position = ((loff_t)page->index << PAGE_CACHE_SHIFT) + offset; /* can not rely on (or let) writepage write this data */ - if(to < offset) { - cFYI(1,("Illegal offsets, can not copy from %d to %d", - offset,to)); + if (to < offset) { + cFYI(1, ("Illegal offsets, can not copy from %d to %d", + offset, to)); FreeXid(xid); return rc; } - /* this is probably better than directly calling - partialpage_write since in this function - the file handle is known which we might as well - leverage */ - /* BB check if anything else missing out of ppw */ - /* such as updating last write time */ + /* this is probably better than directly calling + partialpage_write since in this function the file handle is + known which we might as well leverage */ + /* BB check if anything else missing out of ppw + such as updating last write time */ page_data = kmap(page); - rc = cifs_write(file, page_data+offset,to-offset, - &position); - if(rc > 0) + rc = cifs_write(file, page_data + offset, to-offset, + &position); + if (rc > 0) rc = 0; - /* else if rc < 0 should we set writebehind rc? */ + /* else if (rc < 0) should we set writebehind rc? */ kunmap(page); } else { set_page_dirty(page); @@ -1043,12 +1086,11 @@ return rc; } -int -cifs_fsync(struct file *file, struct dentry *dentry, int datasync) +int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) { int xid; int rc = 0; - struct inode * inode = file->f_dentry->d_inode; + struct inode *inode = file->f_dentry->d_inode; xid = GetXid(); @@ -1056,14 +1098,13 @@ dentry->d_name.name, datasync)); rc = filemap_fdatawrite(inode->i_mapping); - if(rc == 0) + if (rc == 0) CIFS_I(inode)->write_behind_rc = 0; FreeXid(xid); return rc; } -/* static int -cifs_sync_page(struct page *page) +/* static int cifs_sync_page(struct page *page) { struct address_space *mapping; struct inode *inode; @@ -1071,18 +1112,18 @@ unsigned int rpages = 0; int rc = 0; - cFYI(1,("sync page %p",page)); + cFYI(1, ("sync page %p",page)); mapping = page->mapping; if (!mapping) return 0; inode = mapping->host; if (!inode) - return 0;*/ + return 0; */ /* fill in rpages then - result = cifs_pagein_inode(inode, index, rpages); *//* BB finish */ + result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ -/* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index)); +/* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index)); if (rc < 0) return rc; @@ -1092,35 +1133,32 @@ /* * As file closes, flush all cached write data for this inode checking * for write behind errors. - * */ int cifs_flush(struct file *file) { struct inode * inode = file->f_dentry->d_inode; int rc = 0; - /* Rather than do the steps manually: */ - /* lock the inode for writing */ - /* loop through pages looking for write behind data (dirty pages) */ - /* coalesce into contiguous 16K (or smaller) chunks to write to server */ - /* send to server (prefer in parallel) */ - /* deal with writebehind errors */ - /* unlock inode for writing */ - /* filemapfdatawrite appears easier for the time being */ + /* Rather than do the steps manually: + lock the inode for writing + loop through pages looking for write behind data (dirty pages) + coalesce into contiguous 16K (or smaller) chunks to write to server + send to server (prefer in parallel) + deal with writebehind errors + unlock inode for writing + filemapfdatawrite appears easier for the time being */ rc = filemap_fdatawrite(inode->i_mapping); - if(rc == 0) /* reset wb rc if we were able to write out dirty pages */ + if (!rc) /* reset wb rc if we were able to write out dirty pages */ CIFS_I(inode)->write_behind_rc = 0; - cFYI(1,("Flush inode %p file %p rc %d",inode,file,rc)); + cFYI(1, ("Flush inode %p file %p rc %d",inode,file,rc)); return rc; } - -ssize_t -cifs_user_read(struct file * file, char __user *read_data, size_t read_size, - loff_t * poffset) +ssize_t cifs_user_read(struct file *file, char __user *read_data, + size_t read_size, loff_t *poffset) { int rc = -EACCES; unsigned int bytes_read = 0; @@ -1129,10 +1167,10 @@ struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; int xid; - struct cifsFileInfo * open_file; - char * smb_read_data; - char __user * current_offset; - struct smb_com_read_rsp * pSMBr; + struct cifsFileInfo *open_file; + char *smb_read_data; + char __user *current_offset; + struct smb_com_read_rsp *pSMBr; xid = GetXid(); cifs_sb = CIFS_SB(file->f_dentry->d_sb); @@ -1144,19 +1182,22 @@ } open_file = (struct cifsFileInfo *)file->private_data; - if((file->f_flags & O_ACCMODE) == O_WRONLY) { - cFYI(1,("attempting read on write only file instance")); + if ((file->f_flags & O_ACCMODE) == O_WRONLY) { + cFYI(1, ("attempting read on write only file instance")); } - for (total_read = 0,current_offset=read_data; read_size > total_read; - total_read += bytes_read,current_offset+=bytes_read) { - current_read_size = min_t(const int,read_size - total_read,cifs_sb->rsize); + for (total_read = 0, current_offset = read_data; + read_size > total_read; + total_read += bytes_read, current_offset += bytes_read) { + current_read_size = min_t(const int, read_size - total_read, + cifs_sb->rsize); rc = -EAGAIN; smb_read_data = NULL; - while(rc == -EAGAIN) { - if ((open_file->invalidHandle) && (!open_file->closePend)) { + while (rc == -EAGAIN) { + if ((open_file->invalidHandle) && + (!open_file->closePend)) { rc = cifs_reopen_file(file->f_dentry->d_inode, - file,TRUE); - if(rc != 0) + file, TRUE); + if (rc != 0) break; } @@ -1166,13 +1207,15 @@ &bytes_read, &smb_read_data); pSMBr = (struct smb_com_read_rsp *)smb_read_data; - if(copy_to_user(current_offset,smb_read_data + 4/* RFC1001 hdr*/ - + le16_to_cpu(pSMBr->DataOffset), bytes_read)) { + if (copy_to_user(current_offset, + smb_read_data + 4 /* RFC1001 hdr */ + + le16_to_cpu(pSMBr->DataOffset), + bytes_read)) { rc = -EFAULT; FreeXid(xid); return rc; } - if(smb_read_data) { + if (smb_read_data) { cifs_buf_release(smb_read_data); smb_read_data = NULL; } @@ -1199,9 +1242,8 @@ } -static ssize_t -cifs_read(struct file * file, char *read_data, size_t read_size, - loff_t * poffset) +static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, + loff_t *poffset) { int rc = -EACCES; unsigned int bytes_read = 0; @@ -1210,8 +1252,8 @@ struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; int xid; - char * current_offset; - struct cifsFileInfo * open_file; + char *current_offset; + struct cifsFileInfo *open_file; xid = GetXid(); cifs_sb = CIFS_SB(file->f_dentry->d_sb); @@ -1223,19 +1265,21 @@ } open_file = (struct cifsFileInfo *)file->private_data; - if((file->f_flags & O_ACCMODE) == O_WRONLY) { - cFYI(1,("attempting read on write only file instance")); - } + if ((file->f_flags & O_ACCMODE) == O_WRONLY) + cFYI(1, ("attempting read on write only file instance")); - for (total_read = 0,current_offset=read_data; read_size > total_read; - total_read += bytes_read,current_offset+=bytes_read) { - current_read_size = min_t(const int,read_size - total_read,cifs_sb->rsize); + for (total_read = 0, current_offset = read_data; + read_size > total_read; + total_read += bytes_read, current_offset += bytes_read) { + current_read_size = min_t(const int, read_size - total_read, + cifs_sb->rsize); rc = -EAGAIN; - while(rc == -EAGAIN) { - if ((open_file->invalidHandle) && (!open_file->closePend)) { + while (rc == -EAGAIN) { + if ((open_file->invalidHandle) && + (!open_file->closePend)) { rc = cifs_reopen_file(file->f_dentry->d_inode, - file,TRUE); - if(rc != 0) + file, TRUE); + if (rc != 0) break; } @@ -1265,26 +1309,15 @@ return total_read; } -int cifs_file_mmap(struct file * file, struct vm_area_struct * vma) +int cifs_file_mmap(struct file *file, struct vm_area_struct *vma) { - struct dentry * dentry = file->f_dentry; - int rc, xid; - -#ifdef CIFS_EXPERIMENTAL /* BB fixme reenable when cifs_read_wrapper fixed */ - if(dentry->d_sb) { - struct cifs_sb_info *cifs_sb; - cifs_sb = CIFS_SB(sb); - if(cifs_sb != NULL) { - if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) - return -ENODEV - } - } -#endif /* CIFS_EXPERIMENTAL */ + struct dentry *dentry = file->f_dentry; + int rc, xid; xid = GetXid(); rc = cifs_revalidate(dentry); if (rc) { - cFYI(1,("Validation prior to mmap failed, error=%d", rc)); + cFYI(1, ("Validation prior to mmap failed, error=%d", rc)); FreeXid(xid); return rc; } @@ -1295,37 +1328,39 @@ static void cifs_copy_cache_pages(struct address_space *mapping, - struct list_head *pages, int bytes_read, - char *data,struct pagevec * plru_pvec) + struct list_head *pages, int bytes_read, char *data, + struct pagevec *plru_pvec) { struct page *page; - char * target; + char *target; while (bytes_read > 0) { - if(list_empty(pages)) + if (list_empty(pages)) break; page = list_entry(pages->prev, struct page, lru); list_del(&page->lru); - if (add_to_page_cache(page, mapping, page->index, GFP_KERNEL)) { + if (add_to_page_cache(page, mapping, page->index, + GFP_KERNEL)) { page_cache_release(page); - cFYI(1,("Add page cache failed")); + cFYI(1, ("Add page cache failed")); continue; } target = kmap_atomic(page,KM_USER0); - if(PAGE_CACHE_SIZE > bytes_read) { - memcpy(target,data,bytes_read); + if (PAGE_CACHE_SIZE > bytes_read) { + memcpy(target, data, bytes_read); /* zero the tail end of this partial page */ - memset(target+bytes_read,0,PAGE_CACHE_SIZE-bytes_read); + memset(target + bytes_read, 0, + PAGE_CACHE_SIZE - bytes_read); bytes_read = 0; } else { - memcpy(target,data,PAGE_CACHE_SIZE); + memcpy(target, data, PAGE_CACHE_SIZE); bytes_read -= PAGE_CACHE_SIZE; } - kunmap_atomic(target,KM_USER0); + kunmap_atomic(target, KM_USER0); flush_dcache_page(page); SetPageUptodate(page); @@ -1337,23 +1372,21 @@ return; } - -static int -cifs_readpages(struct file *file, struct address_space *mapping, - struct list_head *page_list, unsigned num_pages) +static int cifs_readpages(struct file *file, struct address_space *mapping, + struct list_head *page_list, unsigned num_pages) { int rc = -EACCES; int xid; loff_t offset; - struct page * page; + struct page *page; struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; int bytes_read = 0; unsigned int read_size,i; - char * smb_read_data = NULL; - struct smb_com_read_rsp * pSMBr; + char *smb_read_data = NULL; + struct smb_com_read_rsp *pSMBr; struct pagevec lru_pvec; - struct cifsFileInfo * open_file; + struct cifsFileInfo *open_file; xid = GetXid(); if (file->private_data == NULL) { @@ -1366,44 +1399,46 @@ pagevec_init(&lru_pvec, 0); - for(i = 0;iprev, struct page, lru); offset = (loff_t)page->index << PAGE_CACHE_SHIFT; /* count adjacent pages that we will read into */ contig_pages = 0; - expected_index = list_entry(page_list->prev,struct page,lru)->index; + expected_index = + list_entry(page_list->prev, struct page, lru)->index; list_for_each_entry_reverse(tmp_page,page_list,lru) { - if(tmp_page->index == expected_index) { + if (tmp_page->index == expected_index) { contig_pages++; expected_index++; - } else { + } else break; - } } - if(contig_pages + i > num_pages) { + if (contig_pages + i > num_pages) contig_pages = num_pages - i; - } - /* for reads over a certain size could initiate async read ahead */ + /* for reads over a certain size could initiate async + read ahead */ read_size = contig_pages * PAGE_CACHE_SIZE; /* Read size needs to be in multiples of one page */ - read_size = min_t(const unsigned int,read_size,cifs_sb->rsize & PAGE_CACHE_MASK); + read_size = min_t(const unsigned int, read_size, + cifs_sb->rsize & PAGE_CACHE_MASK); rc = -EAGAIN; - while(rc == -EAGAIN) { - if ((open_file->invalidHandle) && (!open_file->closePend)) { + while (rc == -EAGAIN) { + if ((open_file->invalidHandle) && + (!open_file->closePend)) { rc = cifs_reopen_file(file->f_dentry->d_inode, file, TRUE); - if(rc != 0) + if (rc != 0) break; } @@ -1412,18 +1447,19 @@ read_size, offset, &bytes_read, &smb_read_data); /* BB need to check return code here */ - if(rc== -EAGAIN) { - if(smb_read_data) { + if (rc== -EAGAIN) { + if (smb_read_data) { cifs_buf_release(smb_read_data); smb_read_data = NULL; } } } if ((rc < 0) || (smb_read_data == NULL)) { - cFYI(1,("Read error in readpages: %d",rc)); + cFYI(1, ("Read error in readpages: %d", rc)); /* clean up remaing pages off list */ while (!list_empty(page_list) && (i < num_pages)) { - page = list_entry(page_list->prev, struct page, lru); + page = list_entry(page_list->prev, struct page, + lru); list_del(&page->lru); page_cache_release(page); } @@ -1441,31 +1477,40 @@ pTcon->bytes_read += bytes_read; spin_unlock(&pTcon->stat_lock); #endif - if((int)(bytes_read & PAGE_CACHE_MASK) != bytes_read) { + if ((int)(bytes_read & PAGE_CACHE_MASK) != bytes_read) { i++; /* account for partial page */ - /* server copy of file can have smaller size than client */ - /* BB do we need to verify this common case ? this case is ok - - if we are at server EOF we will hit it on next read */ - - /* while(!list_empty(page_list) && (i < num_pages)) { - page = list_entry(page_list->prev,struct page, list); + /* server copy of file can have smaller size + than client */ + /* BB do we need to verify this common case ? + this case is ok - if we are at server EOF + we will hit it on next read */ + + /* while (!list_empty(page_list) && (i < num_pages)) { + page = list_entry(page_list->prev, + struct page, list); list_del(&page->list); page_cache_release(page); } break; */ } } else { - cFYI(1,("No bytes read (%d) at offset %lld . Cleaning remaining pages from readahead list",bytes_read,offset)); - /* BB turn off caching and do new lookup on file size at server? */ + cFYI(1, ("No bytes read (%d) at offset %lld . " + "Cleaning remaining pages from readahead list", + bytes_read, offset)); + /* BB turn off caching and do new lookup on + file size at server? */ while (!list_empty(page_list) && (i < num_pages)) { - page = list_entry(page_list->prev, struct page, lru); + page = list_entry(page_list->prev, struct page, + lru); list_del(&page->lru); - page_cache_release(page); /* BB removeme - replace with zero of page? */ + + /* BB removeme - replace with zero of page? */ + page_cache_release(page); } break; } - if(smb_read_data) { + if (smb_read_data) { cifs_buf_release(smb_read_data); smb_read_data = NULL; } @@ -1475,7 +1520,7 @@ pagevec_lru_add(&lru_pvec); /* need to free smb_read_data buf before exit */ - if(smb_read_data) { + if (smb_read_data) { cifs_buf_release(smb_read_data); smb_read_data = NULL; } @@ -1484,9 +1529,10 @@ return rc; } -static int cifs_readpage_worker(struct file *file, struct page *page, loff_t * poffset) +static int cifs_readpage_worker(struct file *file, struct page *page, + loff_t *poffset) { - char * read_data; + char *read_data; int rc; page_cache_get(page); @@ -1497,16 +1543,15 @@ if (rc < 0) goto io_error; - else { - cFYI(1,("Bytes read %d ",rc)); - } + else + cFYI(1, ("Bytes read %d ",rc)); file->f_dentry->d_inode->i_atime = current_fs_time(file->f_dentry->d_inode->i_sb); - if(PAGE_CACHE_SIZE > rc) { - memset(read_data+rc, 0, PAGE_CACHE_SIZE - rc); - } + if (PAGE_CACHE_SIZE > rc) + memset(read_data + rc, 0, PAGE_CACHE_SIZE - rc); + flush_dcache_page(page); SetPageUptodate(page); rc = 0; @@ -1517,8 +1562,7 @@ return rc; } -static int -cifs_readpage(struct file *file, struct page *page) +static int cifs_readpage(struct file *file, struct page *page) { loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT; int rc = -EACCES; @@ -1531,9 +1575,10 @@ return -EBADF; } - cFYI(1,("readpage %p at offset %d 0x%x\n",page,(int)offset,(int)offset)); + cFYI(1, ("readpage %p at offset %d 0x%x\n", + page, (int)offset, (int)offset)); - rc = cifs_readpage_worker(file,page,&offset); + rc = cifs_readpage_worker(file, page, &offset); unlock_page(page); @@ -1547,35 +1592,34 @@ refreshing the inode only on increases in the file size but this is tricky to do without racing with writebehind page caching in the current Linux kernel design */ - -int is_size_safe_to_change(struct cifsInodeInfo * cifsInode) +int is_size_safe_to_change(struct cifsInodeInfo *cifsInode) { struct list_head *tmp; struct list_head *tmp1; struct cifsFileInfo *open_file = NULL; int rc = TRUE; - if(cifsInode == NULL) + if (cifsInode == NULL) return rc; read_lock(&GlobalSMBSeslock); list_for_each_safe(tmp, tmp1, &cifsInode->openFileList) { - open_file = list_entry(tmp,struct cifsFileInfo, flist); - if(open_file == NULL) + open_file = list_entry(tmp, struct cifsFileInfo, flist); + if (open_file == NULL) break; - if(open_file->closePend) + if (open_file->closePend) continue; /* We check if file is open for writing, - BB we could supplement this with a check to see if file size - changes have been flushed to server - ie inode metadata dirty */ - if((open_file->pfile) && - ((open_file->pfile->f_flags & O_RDWR) || - (open_file->pfile->f_flags & O_WRONLY))) { - rc = FALSE; - break; + BB we could supplement this with a check to see if file size + changes have been flushed to server - ie inode metadata dirty */ + if ((open_file->pfile) && + ((open_file->pfile->f_flags & O_RDWR) || + (open_file->pfile->f_flags & O_WRONLY))) { + rc = FALSE; + break; } - if(tmp->next == NULL) { - cFYI(1,("File instance %p removed",tmp)); + if (tmp->next == NULL) { + cFYI(1, ("File instance %p removed", tmp)); break; } } @@ -1585,11 +1629,11 @@ static int cifs_prepare_write(struct file *file, struct page *page, - unsigned from, unsigned to) + unsigned from, unsigned to) { int rc = 0; loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT; - cFYI(1,("prepare write for page %p from %d to %d",page,from,to)); + cFYI(1, ("prepare write for page %p from %d to %d",page,from,to)); if (!PageUptodate(page)) { /* if (to - from != PAGE_CACHE_SIZE) { void *kaddr = kmap_atomic(page, KM_USER0); @@ -1599,33 +1643,33 @@ kunmap_atomic(kaddr, KM_USER0); } */ /* If we are writing a full page it will be up to date, - no need to read from the server */ - if((to==PAGE_CACHE_SIZE) && (from == 0)) + no need to read from the server */ + if ((to == PAGE_CACHE_SIZE) && (from == 0)) SetPageUptodate(page); /* might as well read a page, it is fast enough */ - if((file->f_flags & O_ACCMODE) != O_WRONLY) { - rc = cifs_readpage_worker(file,page,&offset); + if ((file->f_flags & O_ACCMODE) != O_WRONLY) { + rc = cifs_readpage_worker(file, page, &offset); } else { - /* should we try using another - file handle if there is one - how would we lock it - to prevent close of that handle racing with this read? */ - /* In any case this will be written out by commit_write */ + /* should we try using another file handle if there is one - + how would we lock it to prevent close of that handle + racing with this read? + In any case this will be written out by commit_write */ } } - /* BB should we pass any errors back? e.g. if we do not have read access to the file */ + /* BB should we pass any errors back? + e.g. if we do not have read access to the file */ return 0; } - struct address_space_operations cifs_addr_ops = { .readpage = cifs_readpage, .readpages = cifs_readpages, .writepage = cifs_writepage, - .prepare_write = cifs_prepare_write, + .prepare_write = cifs_prepare_write, .commit_write = cifs_commit_write, .set_page_dirty = __set_page_dirty_nobuffers, - /* .sync_page = cifs_sync_page, */ - /*.direct_IO = */ + /* .sync_page = cifs_sync_page, */ + /* .direct_IO = */ }; diff -Nru a/fs/cifs/inode.c b/fs/cifs/inode.c --- a/fs/cifs/inode.c 2005-03-30 16:58:47 -08:00 +++ b/fs/cifs/inode.c 2005-03-30 16:58:47 -08:00 @@ -30,10 +30,8 @@ #include "cifs_debug.h" #include "cifs_fs_sb.h" -int -cifs_get_inode_info_unix(struct inode **pinode, - const unsigned char *search_path, - struct super_block *sb,int xid) +int cifs_get_inode_info_unix(struct inode **pinode, + const unsigned char *search_path, struct super_block *sb, int xid) { int rc = 0; FILE_UNIX_BASIC_INFO findData; @@ -44,23 +42,24 @@ pTcon = cifs_sb->tcon; cFYI(1, (" Getting info on %s ", search_path)); - /* we could have done a find first instead but this returns more info */ + /* could have done a find first instead but this returns more info */ rc = CIFSSMBUnixQPathInfo(xid, pTcon, search_path, &findData, cifs_sb->local_nls); - /* dump_mem("\nUnixQPathInfo return data", &findData, sizeof(findData)); */ +/* dump_mem("\nUnixQPathInfo return data", &findData, + sizeof(findData)); */ if (rc) { if (rc == -EREMOTE) { tmp_path = - kmalloc(strnlen - (pTcon->treeName, - MAX_TREE_SIZE + 1) + + kmalloc(strnlen(pTcon->treeName, + MAX_TREE_SIZE + 1) + strnlen(search_path, MAX_PATHCONF) + 1, GFP_KERNEL); if (tmp_path == NULL) { return -ENOMEM; } - /* have to skip first of the double backslash of UNC name */ - strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE); + /* have to skip first of the double backslash of + UNC name */ + strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE); strncat(tmp_path, search_path, MAX_PATHCONF); rc = connect_to_dfs_path(xid, pTcon->ses, /* treename + */ tmp_path, @@ -71,7 +70,6 @@ } else if (rc) { return rc; } - } else { struct cifsInodeInfo *cifsInfo; __u32 type = le32_to_cpu(findData.Type); @@ -85,21 +83,22 @@ return -ENOMEM; /* Is an i_ino of zero legal? */ /* Are there sanity checks we can use to ensure that - the server is really filling in that field? */ + the server is really filling in that field? */ if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { - (*pinode)->i_ino = + (*pinode)->i_ino = (unsigned long)findData.UniqueId; } /* note ino incremented to unique num in new_inode */ insert_inode_hash(*pinode); } - + inode = *pinode; cifsInfo = CIFS_I(inode); cFYI(1, (" Old time %ld ", cifsInfo->time)); cifsInfo->time = jiffies; cFYI(1, (" New time %ld ", cifsInfo->time)); - atomic_set(&cifsInfo->inUse,1); /* ok to set on every refresh of inode */ + /* this is ok to set on every inode revalidate */ + atomic_set(&cifsInfo->inUse,1); inode->i_atime = cifs_NTtimeToUnix(le64_to_cpu(findData.LastAccessTime)); @@ -133,22 +132,19 @@ inode->i_nlink = le64_to_cpu(findData.Nlinks); if(is_size_safe_to_change(cifsInfo)) { - /* can not safely change the file size here if the + /* can not safely change the file size here if the client is writing to it due to potential races */ i_size_write(inode, end_of_file); -/* blksize needs to be multiple of two. So safer to default to blksize - and blkbits set in superblock so 2**blkbits and blksize will match */ -/* inode->i_blksize = - (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ - - /* This seems incredibly stupid but it turns out that - i_blocks is not related to (i_size / i_blksize), instead a - size of 512 is required to be used for calculating num blocks */ - -/* inode->i_blocks = - (inode->i_blksize - 1 + num_of_bytes) >> inode->i_blkbits;*/ + /* blksize needs to be multiple of two. So safer to default to + blksize and blkbits set in superblock so 2**blkbits and blksize + will match rather than setting to: + (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ + + /* This seems incredibly stupid but it turns out that i_blocks + is not related to (i_size / i_blksize), instead 512 byte size + is required for calculating num blocks */ /* 512 bytes (2**9) is the fake blocksize that must be used */ /* for this calculation */ @@ -156,14 +152,17 @@ } if (num_of_bytes < end_of_file) - cFYI(1, ("Server inconsistency Error: it says allocation size less than end of file ")); + cFYI(1, ("allocation size less than end of file ")); cFYI(1, - ("Size %ld and blocks %ld ", + ("Size %ld and blocks %ld", (unsigned long) inode->i_size, inode->i_blocks)); if (S_ISREG(inode->i_mode)) { cFYI(1, (" File inode ")); inode->i_op = &cifs_file_inode_ops; - inode->i_fop = &cifs_file_ops; + if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) + inode->i_fop = &cifs_file_direct_ops; + else + inode->i_fop = &cifs_file_ops; inode->i_data.a_ops = &cifs_addr_ops; } else if (S_ISDIR(inode->i_mode)) { cFYI(1, (" Directory inode")); @@ -172,7 +171,7 @@ } else if (S_ISLNK(inode->i_mode)) { cFYI(1, (" Symbolic Link inode ")); inode->i_op = &cifs_symlink_inode_ops; -/* tmp_inode->i_fop = *//* do not need to set to anything */ + /* tmp_inode->i_fop = */ /* do not need to set to anything */ } else { cFYI(1, (" Init special inode ")); init_special_inode(inode, inode->i_mode, @@ -182,9 +181,9 @@ return rc; } -int -cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path, - FILE_ALL_INFO * pfindData, struct super_block *sb, int xid) +int cifs_get_inode_info(struct inode **pinode, + const unsigned char *search_path, FILE_ALL_INFO *pfindData, + struct super_block *sb, int xid) { int rc = 0; struct cifsTconInfo *pTcon; @@ -198,18 +197,18 @@ if((pfindData == NULL) && (*pinode != NULL)) { if(CIFS_I(*pinode)->clientCanCacheRead) { - cFYI(1,("No need to revalidate inode sizes on cached file ")); + cFYI(1,("No need to revalidate cached inode sizes")); return rc; } } /* if file info not passed in then get it from server */ if(pfindData == NULL) { - buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL); + buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); if(buf == NULL) return -ENOMEM; pfindData = (FILE_ALL_INFO *)buf; - /* could do find first instead but this returns more info */ + /* could do find first instead but this returns more info */ rc = CIFSSMBQPathInfo(xid, pTcon, search_path, pfindData, cifs_sb->local_nls); } @@ -223,8 +222,7 @@ strnlen(search_path, MAX_PATHCONF) + 1, GFP_KERNEL); if (tmp_path == NULL) { - if(buf) - kfree(buf); + kfree(buf); return -ENOMEM; } @@ -236,8 +234,7 @@ kfree(tmp_path); /* BB fix up inode etc. */ } else if (rc) { - if(buf) - kfree(buf); + kfree(buf); return rc; } } else { @@ -247,23 +244,38 @@ /* get new inode */ if (*pinode == NULL) { *pinode = new_inode(sb); - if(*pinode == NULL) + if (*pinode == NULL) return -ENOMEM; - /* Is an i_ino of zero legal? */ - /* Are there sanity checks we can use to ensure that - the server is really filling in that field? */ - - /* We can not use the IndexNumber from either - Windows or Samba as it is frequently set to zero */ - /* There may be higher info levels that work but - Are there Windows server or network appliances - for which IndexNumber field is not guaranteed unique? */ - - /* if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { - (*pinode)->i_ino = - (unsigned long)pfindData->IndexNumber; - } */ /*NB: ino incremented to unique num in new_inode*/ - + /* Is an i_ino of zero legal? Can we use that to check + if the server supports returning inode numbers? Are + there other sanity checks we can use to ensure that + the server is really filling in that field? */ + + /* We can not use the IndexNumber field by default from + Windows or Samba (in ALL_INFO buf) but we can request + it explicitly. It may not be unique presumably if + the server has multiple devices mounted under one + share */ + + /* There may be higher info levels that work but are + there Windows server or network appliances for which + IndexNumber field is not guaranteed unique? */ + +#ifdef CONFIG_CIFS_EXPERIMENTAL + if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM){ + int rc1 = 0; + __u64 inode_num; + + rc1 = CIFSGetSrvInodeNumber(xid, pTcon, + search_path, &inode_num, + cifs_sb->local_nls); + if(rc1) { + cFYI(1,("GetSrvInodeNum rc %d", rc1)); + /* BB EOPNOSUPP disable SERVER_INUM? */ + } else /* do we need cast or hash to ino? */ + (*pinode)->i_ino = inode_num; + } /* else ino incremented to unique num in new_inode*/ +#endif /* CIFS_EXPERIMENTAL */ insert_inode_hash(*pinode); } inode = *pinode; @@ -273,10 +285,10 @@ cifsInfo->time = jiffies; cFYI(1, (" New time %ld ", cifsInfo->time)); -/* blksize needs to be multiple of two. So safer to default to blksize - and blkbits set in superblock so 2**blkbits and blksize will match */ -/* inode->i_blksize = - (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ + /* blksize needs to be multiple of two. So safer to default to + blksize and blkbits set in superblock so 2**blkbits and blksize + will match rather than setting to: + (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ /* Linux can not store file creation time unfortunately so we ignore it */ inode->i_atime = @@ -285,56 +297,60 @@ cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime)); inode->i_ctime = cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); - cFYI(0, - (" Attributes came in as 0x%x ", attr)); + cFYI(0, (" Attributes came in as 0x%x ", attr)); /* set default mode. will override for dirs below */ - if(atomic_read(&cifsInfo->inUse) == 0) + if (atomic_read(&cifsInfo->inUse) == 0) /* new inode, can safely set these fields */ inode->i_mode = cifs_sb->mnt_file_mode; /* if (attr & ATTR_REPARSE) */ -/* We no longer handle these as symlinks because we could not */ -/* follow them due to the absolute path with drive letter */ + /* We no longer handle these as symlinks because we could not + follow them due to the absolute path with drive letter */ if (attr & ATTR_DIRECTORY) { - /* override default perms since we do not do byte range locking on dirs */ + /* override default perms since we do not do byte range locking + on dirs */ inode->i_mode = cifs_sb->mnt_dir_mode; inode->i_mode |= S_IFDIR; } else { inode->i_mode |= S_IFREG; - /* treat the dos attribute of read-only as read-only mode e.g. 555 */ - if(cifsInfo->cifsAttrs & ATTR_READONLY) + /* treat the dos attribute of read-only as read-only + mode e.g. 555 */ + if (cifsInfo->cifsAttrs & ATTR_READONLY) inode->i_mode &= ~(S_IWUGO); - /* BB add code here - validate if device or weird share or device type? */ + /* BB add code here - + validate if device or weird share or device type? */ } - if(is_size_safe_to_change(cifsInfo)) { - /* can not safely change the file size here if the - client is writing to it due to potential races */ - + if (is_size_safe_to_change(cifsInfo)) { + /* can not safely change the file size here if the + client is writing to it due to potential races */ i_size_write(inode,le64_to_cpu(pfindData->EndOfFile)); - /* 512 bytes (2**9) is the fake blocksize that must be used */ - /* for this calculation */ - inode->i_blocks = (512 - 1 + le64_to_cpu(pfindData->AllocationSize)) - >> 9; + /* 512 bytes (2**9) is the fake blocksize that must be + used for this calculation */ + inode->i_blocks = (512 - 1 + le64_to_cpu( + pfindData->AllocationSize)) >> 9; } inode->i_nlink = le32_to_cpu(pfindData->NumberOfLinks); /* BB fill in uid and gid here? with help from winbind? - or retrieve from NTFS stream extended attribute */ - if(atomic_read(&cifsInfo->inUse) == 0) { + or retrieve from NTFS stream extended attribute */ + if (atomic_read(&cifsInfo->inUse) == 0) { inode->i_uid = cifs_sb->mnt_uid; inode->i_gid = cifs_sb->mnt_gid; /* set so we do not keep refreshing these fields with - bad data after user has changed them in memory */ + bad data after user has changed them in memory */ atomic_set(&cifsInfo->inUse,1); } - + if (S_ISREG(inode->i_mode)) { cFYI(1, (" File inode ")); inode->i_op = &cifs_file_inode_ops; - inode->i_fop = &cifs_file_ops; + if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) + inode->i_fop = &cifs_file_direct_ops; + else + inode->i_fop = &cifs_file_ops; inode->i_data.a_ops = &cifs_addr_ops; } else if (S_ISDIR(inode->i_mode)) { cFYI(1, (" Directory inode ")); @@ -348,14 +364,13 @@ inode->i_rdev); } } - if(buf) - kfree(buf); + kfree(buf); return rc; } -void -cifs_read_inode(struct inode *inode) -{ /* gets root inode */ +/* gets root inode */ +void cifs_read_inode(struct inode *inode) +{ int xid; struct cifs_sb_info *cifs_sb; @@ -369,8 +384,7 @@ _FreeXid(xid); } -int -cifs_unlink(struct inode *inode, struct dentry *direntry) +int cifs_unlink(struct inode *inode, struct dentry *direntry) { int rc = 0; int xid; @@ -378,7 +392,7 @@ struct cifsTconInfo *pTcon; char *full_path = NULL; struct cifsInodeInfo *cifsInode; - FILE_BASIC_INFO * pinfo_buf; + FILE_BASIC_INFO *pinfo_buf; cFYI(1, (" cifs_unlink, inode = 0x%p with ", inode)); @@ -387,12 +401,12 @@ cifs_sb = CIFS_SB(inode->i_sb); pTcon = cifs_sb->tcon; -/* Unlink can be called from rename so we can not grab - the sem here since we deadlock otherwise */ + /* Unlink can be called from rename so we can not grab the sem here + since we deadlock otherwise */ /* down(&direntry->d_sb->s_vfs_rename_sem);*/ full_path = build_path_from_dentry(direntry); /* up(&direntry->d_sb->s_vfs_rename_sem);*/ - if(full_path == NULL) { + if (full_path == NULL) { FreeXid(xid); return -ENOMEM; } @@ -406,39 +420,76 @@ int oplock = FALSE; __u16 netfid; - rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE, - CREATE_NOT_DIR | CREATE_DELETE_ON_CLOSE, - &netfid, &oplock, NULL, cifs_sb->local_nls); - if(rc==0) { - CIFSSMBRenameOpenFile(xid,pTcon,netfid, - NULL, cifs_sb->local_nls); + rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE, + CREATE_NOT_DIR | CREATE_DELETE_ON_CLOSE, + &netfid, &oplock, NULL, cifs_sb->local_nls); + if (rc==0) { + CIFSSMBRenameOpenFile(xid, pTcon, netfid, NULL, + cifs_sb->local_nls); CIFSSMBClose(xid, pTcon, netfid); direntry->d_inode->i_nlink--; } } else if (rc == -EACCES) { /* try only if r/o attribute set in local lookup data? */ - pinfo_buf = (FILE_BASIC_INFO *)kmalloc(sizeof(FILE_BASIC_INFO),GFP_KERNEL); - if(pinfo_buf) { - memset(pinfo_buf,0,sizeof(FILE_BASIC_INFO)); - /* ATTRS set to normal clears r/o bit */ + pinfo_buf = kmalloc(sizeof(FILE_BASIC_INFO), GFP_KERNEL); + if (pinfo_buf) { + memset(pinfo_buf, 0, sizeof(FILE_BASIC_INFO)); + /* ATTRS set to normal clears r/o bit */ pinfo_buf->Attributes = cpu_to_le32(ATTR_NORMAL); - rc = CIFSSMBSetTimes(xid, pTcon, full_path, pinfo_buf, - cifs_sb->local_nls); + if (!(pTcon->ses->flags & CIFS_SES_NT4)) + rc = CIFSSMBSetTimes(xid, pTcon, full_path, + pinfo_buf, + cifs_sb->local_nls); + else + rc = -EOPNOTSUPP; + + if (rc == -EOPNOTSUPP) { + int oplock = FALSE; + __u16 netfid; + /* rc = CIFSSMBSetAttrLegacy(xid, pTcon, + full_path, + (__u16)ATTR_NORMAL, + cifs_sb->local_nls); + For some strange reason it seems that NT4 eats the + old setattr call without actually setting the + attributes so on to the third attempted workaround + */ + + /* BB could scan to see if we already have it open + and pass in pid of opener to function */ + rc = CIFSSMBOpen(xid, pTcon, full_path, + FILE_OPEN, SYNCHRONIZE | + FILE_WRITE_ATTRIBUTES, 0, + &netfid, &oplock, NULL, + cifs_sb->local_nls); + if (rc==0) { + rc = CIFSSMBSetFileTimes(xid, pTcon, + pinfo_buf, + netfid); + CIFSSMBClose(xid, pTcon, netfid); + } + } kfree(pinfo_buf); } - if(rc==0) { - rc = CIFSSMBDelFile(xid, pTcon, full_path, cifs_sb->local_nls); + if (rc==0) { + rc = CIFSSMBDelFile(xid, pTcon, full_path, + cifs_sb->local_nls); if (!rc) { direntry->d_inode->i_nlink--; } else if (rc == -ETXTBSY) { int oplock = FALSE; __u16 netfid; - rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE, - CREATE_NOT_DIR | CREATE_DELETE_ON_CLOSE, - &netfid, &oplock, NULL, cifs_sb->local_nls); - if(rc==0) { - CIFSSMBRenameOpenFile(xid,pTcon,netfid,NULL,cifs_sb->local_nls); + rc = CIFSSMBOpen(xid, pTcon, full_path, + FILE_OPEN, DELETE, + CREATE_NOT_DIR | + CREATE_DELETE_ON_CLOSE, + &netfid, &oplock, NULL, + cifs_sb->local_nls); + if (rc==0) { + CIFSSMBRenameOpenFile(xid, pTcon, + netfid, NULL, + cifs_sb->local_nls); CIFSSMBClose(xid, pTcon, netfid); direntry->d_inode->i_nlink--; } @@ -447,20 +498,19 @@ } } cifsInode = CIFS_I(direntry->d_inode); - cifsInode->time = 0; /* will force revalidate to get info when needed */ + cifsInode->time = 0; /* will force revalidate to get info when + needed */ direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = - current_fs_time(inode->i_sb); + current_fs_time(inode->i_sb); cifsInode = CIFS_I(inode); cifsInode->time = 0; /* force revalidate of dir as well */ - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); return rc; } -int -cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) +int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) { int rc = 0; int xid; @@ -479,7 +529,7 @@ down(&inode->i_sb->s_vfs_rename_sem); full_path = build_path_from_dentry(direntry); up(&inode->i_sb->s_vfs_rename_sem); - if(full_path == NULL) { + if (full_path == NULL) { FreeXid(xid); return -ENOMEM; } @@ -494,40 +544,39 @@ rc = cifs_get_inode_info_unix(&newinode, full_path, inode->i_sb,xid); else - rc = cifs_get_inode_info(&newinode, full_path,NULL, + rc = cifs_get_inode_info(&newinode, full_path, NULL, inode->i_sb,xid); direntry->d_op = &cifs_dentry_ops; d_instantiate(direntry, newinode); - if(direntry->d_inode) + if (direntry->d_inode) direntry->d_inode->i_nlink = 2; if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { - CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, - (__u64)current->euid, - (__u64)current->egid, - 0 /* dev_t */, - cifs_sb->local_nls); + CIFSSMBUnixSetPerms(xid, pTcon, full_path, + mode, + (__u64)current->euid, + (__u64)current->egid, + 0 /* dev_t */, + cifs_sb->local_nls); } else { - CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, - (__u64)-1, - (__u64)-1, - 0 /* dev_t */, - cifs_sb->local_nls); + CIFSSMBUnixSetPerms(xid, pTcon, full_path, + mode, (__u64)-1, + (__u64)-1, 0 /* dev_t */, + cifs_sb->local_nls); } - else { /* BB to be implemented via Windows secrty descriptors*/ - /* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/ + else { + /* BB to be implemented via Windows secrty descriptors + eg CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, + -1, -1, local_nls); */ } } - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); - return rc; } -int -cifs_rmdir(struct inode *inode, struct dentry *direntry) +int cifs_rmdir(struct inode *inode, struct dentry *direntry) { int rc = 0; int xid; @@ -546,7 +595,7 @@ down(&inode->i_sb->s_vfs_rename_sem); full_path = build_path_from_dentry(direntry); up(&inode->i_sb->s_vfs_rename_sem); - if(full_path == NULL) { + if (full_path == NULL) { FreeXid(xid); return -ENOMEM; } @@ -560,19 +609,18 @@ } cifsInode = CIFS_I(direntry->d_inode); - cifsInode->time = 0; /* force revalidate to go get info when needed */ + cifsInode->time = 0; /* force revalidate to go get info when + needed */ direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = - current_fs_time(inode->i_sb); + current_fs_time(inode->i_sb); - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); return rc; } -int -cifs_rename(struct inode *source_inode, struct dentry *source_direntry, - struct inode *target_inode, struct dentry *target_direntry) +int cifs_rename(struct inode *source_inode, struct dentry *source_direntry, + struct inode *target_inode, struct dentry *target_direntry) { char *fromName; char *toName; @@ -589,91 +637,90 @@ pTcon = cifs_sb_source->tcon; if (pTcon != cifs_sb_target->tcon) { - FreeXid(xid); - return -EXDEV; /* BB actually could be allowed if same server, but - different share. Might eventually add support for this */ + FreeXid(xid); + return -EXDEV; /* BB actually could be allowed if same server, + but different share. + Might eventually add support for this */ } - /* we already have the rename sem so we do not need - to grab it again here to protect the path integrity */ + /* we already have the rename sem so we do not need to grab it again + here to protect the path integrity */ fromName = build_path_from_dentry(source_direntry); toName = build_path_from_dentry(target_direntry); - if((fromName == NULL) || (toName == NULL)) { + if ((fromName == NULL) || (toName == NULL)) { rc = -ENOMEM; goto cifs_rename_exit; } rc = CIFSSMBRename(xid, pTcon, fromName, toName, cifs_sb_source->local_nls); - if(rc == -EEXIST) { - /* check if they are the same file - because rename of hardlinked files is a noop */ - FILE_UNIX_BASIC_INFO * info_buf_source; - FILE_UNIX_BASIC_INFO * info_buf_target; - - info_buf_source = - kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO),GFP_KERNEL); - if(info_buf_source != NULL) { - info_buf_target = info_buf_source+1; - rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName, + if (rc == -EEXIST) { + /* check if they are the same file because rename of hardlinked + files is a noop */ + FILE_UNIX_BASIC_INFO *info_buf_source; + FILE_UNIX_BASIC_INFO *info_buf_target; + + info_buf_source = + kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); + if (info_buf_source != NULL) { + info_buf_target = info_buf_source + 1; + rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName, info_buf_source, cifs_sb_source->local_nls); - if(rc == 0) { - rc = CIFSSMBUnixQPathInfo(xid,pTcon,toName, + if (rc == 0) { + rc = CIFSSMBUnixQPathInfo(xid, pTcon, toName, info_buf_target, cifs_sb_target->local_nls); } - if((rc == 0) && - (info_buf_source->UniqueId == - info_buf_target->UniqueId)) { - /* do not rename since the files are hardlinked - which is a noop */ + if ((rc == 0) && + (info_buf_source->UniqueId == + info_buf_target->UniqueId)) { + /* do not rename since the files are hardlinked which + is a noop */ } else { /* we either can not tell the files are hardlinked - (as with Windows servers) or files are not hardlinked - so delete the target manually before renaming to - follow POSIX rather than Windows semantics */ + (as with Windows servers) or files are not + hardlinked so delete the target manually before + renaming to follow POSIX rather than Windows + semantics */ cifs_unlink(target_inode, target_direntry); - rc = CIFSSMBRename(xid, pTcon, fromName, toName, - cifs_sb_source->local_nls); + rc = CIFSSMBRename(xid, pTcon, fromName, + toName, + cifs_sb_source->local_nls); } kfree(info_buf_source); } /* if we can not get memory just leave rc as EEXIST */ } if (rc) { - cFYI(1,("rename rc %d",rc)); /* BB removeme BB */ + cFYI(1, ("rename rc %d", rc)); } - if((rc == -EIO)||(rc == -EEXIST)) { + if ((rc == -EIO) || (rc == -EEXIST)) { int oplock = FALSE; __u16 netfid; /* BB FIXME Is Generic Read correct for rename? */ /* if renaming directory - we should not say CREATE_NOT_DIR, - need to test renaming open directory, also GENERIC_READ - might not right be right access to request */ + need to test renaming open directory, also GENERIC_READ + might not right be right access to request */ rc = CIFSSMBOpen(xid, pTcon, fromName, FILE_OPEN, GENERIC_READ, - CREATE_NOT_DIR, - &netfid, &oplock, NULL, cifs_sb_source->local_nls); - if(rc==0) { - CIFSSMBRenameOpenFile(xid,pTcon,netfid, - toName, cifs_sb_source->local_nls); + CREATE_NOT_DIR, &netfid, &oplock, NULL, + cifs_sb_source->local_nls); + if (rc==0) { + CIFSSMBRenameOpenFile(xid, pTcon, netfid, toName, + cifs_sb_source->local_nls); CIFSSMBClose(xid, pTcon, netfid); } } cifs_rename_exit: - if (fromName) - kfree(fromName); - if (toName) - kfree(toName); - + kfree(fromName); + kfree(toName); FreeXid(xid); return rc; } -int -cifs_revalidate(struct dentry *direntry) +int cifs_revalidate(struct dentry *direntry) { int xid; int rc = 0; @@ -684,119 +731,120 @@ struct timespec local_mtime; int invalidate_inode = FALSE; - if(direntry->d_inode == NULL) + if (direntry->d_inode == NULL) return -ENOENT; cifsInode = CIFS_I(direntry->d_inode); - if(cifsInode == NULL) + if (cifsInode == NULL) return -ENOENT; /* no sense revalidating inode info on file that no one can write */ - if(CIFS_I(direntry->d_inode)->clientCanCacheRead) + if (CIFS_I(direntry->d_inode)->clientCanCacheRead) return rc; xid = GetXid(); cifs_sb = CIFS_SB(direntry->d_sb); - /* can not safely grab the rename sem here if - rename calls revalidate since that would deadlock */ + /* can not safely grab the rename sem here if rename calls revalidate + since that would deadlock */ full_path = build_path_from_dentry(direntry); - if(full_path == NULL) { + if (full_path == NULL) { FreeXid(xid); return -ENOMEM; } - cFYI(1, - ("Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld jiffies %ld", - full_path, direntry->d_inode, - direntry->d_inode->i_count.counter, direntry, - direntry->d_time, jiffies)); + cFYI(1, ("Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld " + "jiffies %ld", full_path, direntry->d_inode, + direntry->d_inode->i_count.counter, direntry, + direntry->d_time, jiffies)); - if (cifsInode->time == 0){ + if (cifsInode->time == 0) { /* was set to zero previously to force revalidate */ - } else if (time_before(jiffies, cifsInode->time + HZ) && lookupCacheEnabled) { - if((S_ISREG(direntry->d_inode->i_mode) == 0) || - (direntry->d_inode->i_nlink == 1)) { - if (full_path) - kfree(full_path); + } else if (time_before(jiffies, cifsInode->time + HZ) && + lookupCacheEnabled) { + if ((S_ISREG(direntry->d_inode->i_mode) == 0) || + (direntry->d_inode->i_nlink == 1)) { + kfree(full_path); FreeXid(xid); return rc; } else { - cFYI(1,("Have to revalidate file due to hardlinks")); - } + cFYI(1, ("Have to revalidate file due to hardlinks")); + } } - + /* save mtime and size */ local_mtime = direntry->d_inode->i_mtime; - local_size = direntry->d_inode->i_size; + local_size = direntry->d_inode->i_size; if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) { rc = cifs_get_inode_info_unix(&direntry->d_inode, full_path, - direntry->d_sb,xid); - if(rc) { - cFYI(1,("error on getting revalidate info %d",rc)); -/* if(rc != -ENOENT) - rc = 0; */ /* BB should we cache info on certain errors? */ + direntry->d_sb,xid); + if (rc) { + cFYI(1, ("error on getting revalidate info %d", rc)); +/* if (rc != -ENOENT) + rc = 0; */ /* BB should we cache info on + certain errors? */ } } else { rc = cifs_get_inode_info(&direntry->d_inode, full_path, NULL, - direntry->d_sb,xid); - if(rc) { - cFYI(1,("error on getting revalidate info %d",rc)); -/* if(rc != -ENOENT) - rc = 0; */ /* BB should we cache info on certain errors? */ + direntry->d_sb,xid); + if (rc) { + cFYI(1, ("error on getting revalidate info %d", rc)); +/* if (rc != -ENOENT) + rc = 0; */ /* BB should we cache info on + certain errors? */ } } /* should we remap certain errors, access denied?, to zero */ - /* if not oplocked, we invalidate inode pages if mtime - or file size had changed on server */ + /* if not oplocked, we invalidate inode pages if mtime or file size + had changed on server */ - if(timespec_equal(&local_mtime,&direntry->d_inode->i_mtime) && - (local_size == direntry->d_inode->i_size)) { - cFYI(1,("cifs_revalidate - inode unchanged")); + if (timespec_equal(&local_mtime,&direntry->d_inode->i_mtime) && + (local_size == direntry->d_inode->i_size)) { + cFYI(1, ("cifs_revalidate - inode unchanged")); } else { /* file may have changed on server */ - if(cifsInode->clientCanCacheRead) { - /* no need to invalidate inode pages since we were - the only ones who could have modified the file and - the server copy is staler than ours */ + if (cifsInode->clientCanCacheRead) { + /* no need to invalidate inode pages since we were the + only ones who could have modified the file and the + server copy is staler than ours */ } else { invalidate_inode = TRUE; } } - /* can not grab this sem since kernel filesys locking - documentation indicates i_sem may be taken by the kernel - on lookup and rename which could deadlock if we grab - the i_sem here as well */ + /* can not grab this sem since kernel filesys locking documentation + indicates i_sem may be taken by the kernel on lookup and rename + which could deadlock if we grab the i_sem here as well */ /* down(&direntry->d_inode->i_sem);*/ /* need to write out dirty pages here */ - if(direntry->d_inode->i_mapping) { - /* do we need to lock inode until after invalidate completes below? */ + if (direntry->d_inode->i_mapping) { + /* do we need to lock inode until after invalidate completes + below? */ filemap_fdatawrite(direntry->d_inode->i_mapping); } - if(invalidate_inode) { - if(direntry->d_inode->i_mapping) + if (invalidate_inode) { + if (direntry->d_inode->i_mapping) filemap_fdatawait(direntry->d_inode->i_mapping); /* may eventually have to do this for open files too */ - if(list_empty(&(cifsInode->openFileList))) { + if (list_empty(&(cifsInode->openFileList))) { /* Has changed on server - flush read ahead pages */ - cFYI(1,("Invalidating read ahead data on closed file")); + cFYI(1, ("Invalidating read ahead data on " + "closed file")); invalidate_remote_inode(direntry->d_inode); } } -/* up(&direntry->d_inode->i_sem);*/ +/* up(&direntry->d_inode->i_sem); */ - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); - return rc; } -int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) +int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, + struct kstat *stat) { int err = cifs_revalidate(dentry); if (!err) @@ -807,7 +855,7 @@ static int cifs_truncate_page(struct address_space *mapping, loff_t from) { pgoff_t index = from >> PAGE_CACHE_SHIFT; - unsigned offset = from & (PAGE_CACHE_SIZE-1); + unsigned offset = from & (PAGE_CACHE_SIZE - 1); struct page *page; char *kaddr; int rc = 0; @@ -825,8 +873,7 @@ return rc; } -int -cifs_setattr(struct dentry *direntry, struct iattr *attrs) +int cifs_setattr(struct dentry *direntry, struct iattr *attrs) { int xid; struct cifs_sb_info *cifs_sb; @@ -841,20 +888,19 @@ __u64 uid = 0xFFFFFFFFFFFFFFFFULL; __u64 gid = 0xFFFFFFFFFFFFFFFFULL; struct cifsInodeInfo *cifsInode; - struct list_head * tmp; + struct list_head *tmp; xid = GetXid(); - cFYI(1, - (" In cifs_setattr, name = %s attrs->iavalid 0x%x ", - direntry->d_name.name, attrs->ia_valid)); + cFYI(1, (" In cifs_setattr, name = %s attrs->iavalid 0x%x ", + direntry->d_name.name, attrs->ia_valid)); cifs_sb = CIFS_SB(direntry->d_inode->i_sb); pTcon = cifs_sb->tcon; down(&direntry->d_sb->s_vfs_rename_sem); full_path = build_path_from_dentry(direntry); up(&direntry->d_sb->s_vfs_rename_sem); - if(full_path == NULL) { + if (full_path == NULL) { FreeXid(xid); return -ENOMEM; } @@ -863,73 +909,84 @@ /* BB check if we need to refresh inode from server now ? BB */ /* need to flush data before changing file size on server */ - filemap_fdatawrite(direntry->d_inode->i_mapping); + filemap_fdatawrite(direntry->d_inode->i_mapping); filemap_fdatawait(direntry->d_inode->i_mapping); if (attrs->ia_valid & ATTR_SIZE) { - read_lock(&GlobalSMBSeslock); - /* To avoid spurious oplock breaks from server, in the case - of inodes that we already have open, avoid doing path - based setting of file size if we can do it by handle. - This keeps our caching token (oplock) and avoids - timeouts when the local oplock break takes longer to flush - writebehind data than the SMB timeout for the SetPathInfo - request would allow */ - list_for_each(tmp, &cifsInode->openFileList) { - open_file = list_entry(tmp,struct cifsFileInfo, flist); + read_lock(&GlobalSMBSeslock); + /* To avoid spurious oplock breaks from server, in the case of + inodes that we already have open, avoid doing path based + setting of file size if we can do it by handle. + This keeps our caching token (oplock) and avoids timeouts + when the local oplock break takes longer to flush + writebehind data than the SMB timeout for the SetPathInfo + request would allow */ + list_for_each(tmp, &cifsInode->openFileList) { + open_file = list_entry(tmp, struct cifsFileInfo, + flist); /* We check if file is open for writing first */ - if((open_file->pfile) && - ((open_file->pfile->f_flags & O_RDWR) || - (open_file->pfile->f_flags & O_WRONLY))) { - if(open_file->invalidHandle == FALSE) { - /* we found a valid, writeable network file - handle to use to try to set the file size */ + if ((open_file->pfile) && + ((open_file->pfile->f_flags & O_RDWR) || + (open_file->pfile->f_flags & O_WRONLY))) { + if (open_file->invalidHandle == FALSE) { + /* we found a valid, writeable network + file handle to use to try to set the + file size */ __u16 nfid = open_file->netfid; __u32 npid = open_file->pid; read_unlock(&GlobalSMBSeslock); found = TRUE; - rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size, - nfid,npid,FALSE); - cFYI(1,("SetFileSize by handle (setattrs) rc = %d",rc)); - /* Do not need reopen and retry on EAGAIN since we will - retry by pathname below */ - - break; /* now that we found one valid file handle no - sense continuing to loop trying others */ + rc = CIFSSMBSetFileSize(xid, pTcon, + attrs->ia_size, nfid, npid, + FALSE); + cFYI(1, ("SetFileSize by handle " + "(setattrs) rc = %d", rc)); + /* Do not need reopen and retry on + EAGAIN since we will retry by + pathname below */ + + /* now that we found one valid file + handle no sense continuing to loop + trying others, so break here */ + break; } } } - if(found == FALSE) { + if (found == FALSE) read_unlock(&GlobalSMBSeslock); - } - - if(rc != 0) { - /* Set file size by pathname rather than by handle either - because no valid, writeable file handle for it was found or - because there was an error setting it by handle */ - rc = CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size,FALSE, - cifs_sb->local_nls); - cFYI(1,(" SetEOF by path (setattrs) rc = %d",rc)); - } - - /* Server is ok setting allocation size implicitly - no need to call: */ - /*CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, TRUE, cifs_sb->local_nls);*/ + if (rc != 0) { + /* Set file size by pathname rather than by handle + either because no valid, writeable file handle for + it was found or because there was an error setting + it by handle */ + rc = CIFSSMBSetEOF(xid, pTcon, full_path, + attrs->ia_size, FALSE, + cifs_sb->local_nls); + cFYI(1, (" SetEOF by path (setattrs) rc = %d", rc)); + } + + /* Server is ok setting allocation size implicitly - no need + to call: + CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, TRUE, + cifs_sb->local_nls); + */ if (rc == 0) { rc = vmtruncate(direntry->d_inode, attrs->ia_size); - cifs_truncate_page(direntry->d_inode->i_mapping, direntry->d_inode->i_size); + cifs_truncate_page(direntry->d_inode->i_mapping, + direntry->d_inode->i_size); } } if (attrs->ia_valid & ATTR_UID) { cFYI(1, (" CIFS - UID changed to %d", attrs->ia_uid)); uid = attrs->ia_uid; - /* entry->uid = cpu_to_le16(attr->ia_uid); */ + /* entry->uid = cpu_to_le16(attr->ia_uid); */ } if (attrs->ia_valid & ATTR_GID) { cFYI(1, (" CIFS - GID changed to %d", attrs->ia_gid)); gid = attrs->ia_gid; - /* entry->gid = cpu_to_le16(attr->ia_gid); */ + /* entry->gid = cpu_to_le16(attr->ia_gid); */ } time_buf.Attributes = 0; @@ -942,19 +999,23 @@ if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) && (attrs->ia_valid & (ATTR_MODE | ATTR_GID | ATTR_UID))) rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, uid, gid, - 0 /* dev_t */, cifs_sb->local_nls); + 0 /* dev_t */, cifs_sb->local_nls); else if (attrs->ia_valid & ATTR_MODE) { - if((mode & S_IWUGO) == 0) /* not writeable */ { - if((cifsInode->cifsAttrs & ATTR_READONLY) == 0) - time_buf.Attributes = - cpu_to_le32(cifsInode->cifsAttrs | ATTR_READONLY); - } else if((mode & S_IWUGO) == S_IWUGO) { - if(cifsInode->cifsAttrs & ATTR_READONLY) - time_buf.Attributes = - cpu_to_le32(cifsInode->cifsAttrs & (~ATTR_READONLY)); - } - /* BB to be implemented - via Windows security descriptors or streams */ - /* CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,uid,gid,cifs_sb->local_nls);*/ + if ((mode & S_IWUGO) == 0) /* not writeable */ { + if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) + time_buf.Attributes = + cpu_to_le32(cifsInode->cifsAttrs | + ATTR_READONLY); + } else if ((mode & S_IWUGO) == S_IWUGO) { + if (cifsInode->cifsAttrs & ATTR_READONLY) + time_buf.Attributes = + cpu_to_le32(cifsInode->cifsAttrs & + (~ATTR_READONLY)); + } + /* BB to be implemented - + via Windows security descriptors or streams */ + /* CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, uid, gid, + cifs_sb->local_nls); */ } if (attrs->ia_valid & ATTR_ATIME) { @@ -973,56 +1034,63 @@ if (attrs->ia_valid & ATTR_CTIME) { set_time = TRUE; - cFYI(1, (" CIFS - CTIME changed ")); /* BB probably do not need */ + cFYI(1, (" CIFS - CTIME changed ")); /* BB probably no need */ time_buf.ChangeTime = cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_ctime)); } else time_buf.ChangeTime = 0; if (set_time || time_buf.Attributes) { - /* BB what if setting one attribute fails - (such as size) but time setting works */ + /* BB what if setting one attribute fails (such as size) but + time setting works? */ time_buf.CreationTime = 0; /* do not change */ /* In the future we should experiment - try setting timestamps - via Handle (SetFileInfo) instead of by path */ - rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf, - cifs_sb->local_nls); - if(rc == -EOPNOTSUPP) { + via Handle (SetFileInfo) instead of by path */ + if (!(pTcon->ses->flags & CIFS_SES_NT4)) + rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf, + cifs_sb->local_nls); + else + rc = -EOPNOTSUPP; + + if (rc == -EOPNOTSUPP) { int oplock = FALSE; __u16 netfid; - cFYI(1,("calling SetFileInfo since SetPathInfo for times not supported by this server")); - /* BB we could scan to see if we already have it open */ - /* and pass in pid of opener to function */ - rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, FILE_WRITE_ATTRIBUTES, - CREATE_NOT_DIR, &netfid, &oplock, NULL, cifs_sb->local_nls); - if(rc==0) { - rc = CIFSSMBSetFileTimes(xid, pTcon, - &time_buf, netfid); + cFYI(1, ("calling SetFileInfo since SetPathInfo for " + "times not supported by this server")); + /* BB we could scan to see if we already have it open + and pass in pid of opener to function */ + rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, + SYNCHRONIZE | FILE_WRITE_ATTRIBUTES, + CREATE_NOT_DIR, &netfid, &oplock, + NULL, cifs_sb->local_nls); + if (rc==0) { + rc = CIFSSMBSetFileTimes(xid, pTcon, &time_buf, + netfid); CIFSSMBClose(xid, pTcon, netfid); } else { /* BB For even older servers we could convert time_buf - into old DOS style which uses two second granularity */ + into old DOS style which uses two second + granularity */ /* rc = CIFSSMBSetTimesLegacy(xid, pTcon, full_path, - &time_buf, cifs_sb->local_nls); */ + &time_buf, cifs_sb->local_nls); */ } } } - /* do not need local check to inode_check_ok since the server does that */ + /* do not need local check to inode_check_ok since the server does + that */ if (!rc) rc = inode_setattr(direntry->d_inode, attrs); - if (full_path) - kfree(full_path); + kfree(full_path); FreeXid(xid); return rc; } -void -cifs_delete_inode(struct inode *inode) +void cifs_delete_inode(struct inode *inode) { cFYI(1, ("In cifs_delete_inode, inode = 0x%p ", inode)); /* may have to add back in if and when safe distributed caching of - directories added e.g. via FindNotify */ + directories added e.g. via FindNotify */ } diff -Nru a/fs/cifs/misc.c b/fs/cifs/misc.c --- a/fs/cifs/misc.c 2005-03-30 16:58:50 -08:00 +++ b/fs/cifs/misc.c 2005-03-30 16:58:50 -08:00 @@ -353,10 +353,14 @@ if (((unsigned int)length < 2 + sizeof (struct smb_hdr)) || (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4)) { if ((unsigned int)length < 2 + sizeof (struct smb_hdr)) { - cERROR(1, ("Length less than 2 + sizeof smb_hdr ")); - if (((unsigned int)length >= sizeof (struct smb_hdr) - 1) - && (smb->Status.CifsError != 0)) + if (((unsigned int)length >= + sizeof (struct smb_hdr) - 1) + && (smb->Status.CifsError != 0)) { + smb->WordCount = 0; return 0; /* some error cases do not return wct and bcc */ + } else { + cERROR(1, ("Length less than smb header size")); + } } if (len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4) diff -Nru a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h --- a/fs/cifs/ntlmssp.h 2005-03-30 16:58:47 -08:00 +++ b/fs/cifs/ntlmssp.h 2005-03-30 16:58:47 -08:00 @@ -35,7 +35,7 @@ #define NTLMSSP_NEGOTIATE_SIGN 0x0010 // Request signature capability #define NTLMSSP_NEGOTIATE_SEAL 0x0020 // Request confidentiality #define NTLMSSP_NEGOTIATE_DGRAM 0x0040 -#define NTLMSSP_NEGOTIATE_LM_KEY 0x0080 // Use LM session key for sign/seal +#define NTLMSSP_NEGOTIATE_LM_KEY 0x0080 // Use LM session key for sign/seal #define NTLMSSP_NEGOTIATE_NTLM 0x0200 // NTLM authentication #define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x1000 #define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x2000 diff -Nru a/fs/cifs/readdir.c b/fs/cifs/readdir.c --- a/fs/cifs/readdir.c 2005-03-30 16:58:48 -08:00 +++ b/fs/cifs/readdir.c 2005-03-30 16:58:48 -08:00 @@ -31,14 +31,13 @@ #include "cifs_fs_sb.h" #include "cifsfs.h" - /* BB fixme - add debug wrappers around this function to disable it fixme BB */ -/* static void dump_cifs_file_struct(struct file * file, char * label) +/* static void dump_cifs_file_struct(struct file *file, char *label) { struct cifsFileInfo * cf; if(file) { - cf = (struct cifsFileInfo *)file->private_data; + cf = file->private_data; if(cf == NULL) { cFYI(1,("empty cifs private file data")); return; @@ -59,7 +58,7 @@ /* Returns one if new inode created (which therefore needs to be hashed) */ /* Might check in the future if inode number changed so we can rehash inode */ static int construct_dentry(struct qstr *qstring, struct file *file, - struct inode **ptmp_inode, struct dentry **pnew_dentry) + struct inode **ptmp_inode, struct dentry **pnew_dentry) { struct dentry *tmp_dentry; struct cifs_sb_info *cifs_sb; @@ -106,7 +105,7 @@ } static void fill_in_inode(struct inode *tmp_inode, - FILE_DIRECTORY_INFO * pfindData, int *pobject_type) + FILE_DIRECTORY_INFO *pfindData, int *pobject_type) { struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode); struct cifs_sb_info *cifs_sb = CIFS_SB(tmp_inode->i_sb); @@ -127,17 +126,15 @@ /* treat dos attribute of read-only as read-only mode bit e.g. 555? */ /* 2767 perms - indicate mandatory locking */ /* BB fill in uid and gid here? with help from winbind? - or retrieve from NTFS stream extended attribute */ - if(atomic_read(&cifsInfo->inUse) == 0) { + or retrieve from NTFS stream extended attribute */ + if (atomic_read(&cifsInfo->inUse) == 0) { tmp_inode->i_uid = cifs_sb->mnt_uid; tmp_inode->i_gid = cifs_sb->mnt_gid; /* set default mode. will override for dirs below */ tmp_inode->i_mode = cifs_sb->mnt_file_mode; } - cFYI(0, - ("CIFS FFIRST: Attributes came in as 0x%x", - attr)); + cFYI(0,("CIFS FFIRST: Attributes came in as 0x%x",attr)); if (attr & ATTR_DIRECTORY) { *pobject_type = DT_DIR; /* override default perms since we do not lock dirs */ @@ -148,23 +145,23 @@ /* we no longer mark these because we could not follow them */ /* } else if (attr & ATTR_REPARSE) { *pobject_type = DT_LNK; - tmp_inode->i_mode |= S_IFLNK;*/ + tmp_inode->i_mode |= S_IFLNK; */ } else { *pobject_type = DT_REG; tmp_inode->i_mode |= S_IFREG; - if(attr & ATTR_READONLY) + if (attr & ATTR_READONLY) tmp_inode->i_mode &= ~(S_IWUGO); - }/* could add code here - to validate if device or weird share type? */ + } /* could add code here - to validate if device or weird share type? */ /* can not fill in nlink here as in qpathinfo version and Unx search */ - if(atomic_read(&cifsInfo->inUse) == 0) { - atomic_set(&cifsInfo->inUse,1); + if (atomic_read(&cifsInfo->inUse) == 0) { + atomic_set(&cifsInfo->inUse, 1); } - if(is_size_safe_to_change(cifsInfo)) { + if (is_size_safe_to_change(cifsInfo)) { /* can not safely change the file size here if the client is writing to it due to potential races */ - i_size_write(tmp_inode,end_of_file); + i_size_write(tmp_inode, end_of_file); /* 512 bytes (2**9) is the fake blocksize that must be used */ /* for this calculation, even though the reported blocksize is larger */ @@ -172,15 +169,18 @@ } if (allocation_size < end_of_file) - cFYI(1, ("Possible sparse file: allocation size less than end of file ")); + cFYI(1, ("May be sparse file, allocation less than file size")); cFYI(1, ("File Size %ld and blocks %ld and blocksize %ld", - (unsigned long) tmp_inode->i_size, tmp_inode->i_blocks, + (unsigned long)tmp_inode->i_size, tmp_inode->i_blocks, tmp_inode->i_blksize)); if (S_ISREG(tmp_inode->i_mode)) { cFYI(1, (" File inode ")); tmp_inode->i_op = &cifs_file_inode_ops; - tmp_inode->i_fop = &cifs_file_ops; + if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) + tmp_inode->i_fop = &cifs_file_direct_ops; + else + tmp_inode->i_fop = &cifs_file_ops; tmp_inode->i_data.a_ops = &cifs_addr_ops; } else if (S_ISDIR(tmp_inode->i_mode)) { cFYI(1, (" Directory inode")); @@ -197,9 +197,11 @@ } static void unix_fill_in_inode(struct inode *tmp_inode, - FILE_UNIX_INFO * pfindData, int *pobject_type) + FILE_UNIX_INFO *pfindData, int *pobject_type) { struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode); + struct cifs_sb_info *cifs_sb = CIFS_SB(tmp_inode->i_sb); + __u32 type = le32_to_cpu(pfindData->Type); __u64 num_of_bytes = le64_to_cpu(pfindData->NumOfBytes); __u64 end_of_file = le64_to_cpu(pfindData->EndOfFile); @@ -245,8 +247,7 @@ tmp_inode->i_gid = le64_to_cpu(pfindData->Gid); tmp_inode->i_nlink = le64_to_cpu(pfindData->Nlinks); - - if(is_size_safe_to_change(cifsInfo)) { + if (is_size_safe_to_change(cifsInfo)) { /* can not safely change the file size here if the client is writing to it due to potential races */ i_size_write(tmp_inode,end_of_file); @@ -259,7 +260,10 @@ if (S_ISREG(tmp_inode->i_mode)) { cFYI(1, ("File inode")); tmp_inode->i_op = &cifs_file_inode_ops; - tmp_inode->i_fop = &cifs_file_ops; + if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) + tmp_inode->i_fop = &cifs_file_direct_ops; + else + tmp_inode->i_fop = &cifs_file_ops; tmp_inode->i_data.a_ops = &cifs_addr_ops; } else if (S_ISDIR(tmp_inode->i_mode)) { cFYI(1, ("Directory inode")); @@ -276,8 +280,7 @@ } } - -static int initiate_cifs_search(const int xid, struct file * file) +static int initiate_cifs_search(const int xid, struct file *file) { int rc = 0; char * full_path; @@ -295,7 +298,7 @@ } else { memset(file->private_data,0,sizeof(struct cifsFileInfo)); } - cifsFile = (struct cifsFileInfo *)file->private_data; + cifsFile = file->private_data; cifsFile->invalidHandle = TRUE; cifsFile->srch_inf.endOfSearch = FALSE; @@ -322,7 +325,7 @@ /* test for Unix extensions */ if (pTcon->ses->capabilities & CAP_UNIX) { - cifsFile->srch_inf.info_level = SMB_FIND_FILE_UNIX; + cifsFile->srch_inf.info_level = SMB_FIND_FILE_UNIX; } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { cifsFile->srch_inf.info_level = SMB_FIND_FILE_ID_FULL_DIR_INFO; } else /* not srvinos - BB fixme add check for backlevel? */ { @@ -333,13 +336,12 @@ &cifsFile->netfid, &cifsFile->srch_inf); if(rc == 0) cifsFile->invalidHandle = FALSE; - if(full_path) - kfree(full_path); + kfree(full_path); return rc; } /* return length of unicode string in bytes */ -static int cifs_unicode_bytelen(char * str) +static int cifs_unicode_bytelen(char *str) { int len; __le16 * ustr = (__le16 *)str; @@ -352,7 +354,7 @@ return len << 1; } -static char * nxt_dir_entry(char * old_entry, char * end_of_smb) +static char *nxt_dir_entry(char *old_entry, char *end_of_smb) { char * new_entry; FILE_DIRECTORY_INFO * pDirInfo = (FILE_DIRECTORY_INFO *)old_entry; @@ -372,7 +374,7 @@ #define UNICODE_DOT cpu_to_le16(0x2e) /* return 0 if no match and 1 for . (current directory) and 2 for .. (parent) */ -static int cifs_entry_is_dot(char * current_entry, struct cifsFileInfo * cfile) +static int cifs_entry_is_dot(char *current_entry, struct cifsFileInfo *cfile) { int rc = 0; char * filename = NULL; @@ -444,14 +446,14 @@ assume that they are located in the findfirst return buffer.*/ /* We start counting in the buffer with entry 2 and increment for every entry (do not increment for . or .. entry) */ -static int find_cifs_entry(const int xid, struct cifsTconInfo * pTcon, - struct file * file, char ** ppCurrentEntry,int * num_to_ret) +static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, + struct file *file, char **ppCurrentEntry, int *num_to_ret) { int rc = 0; int pos_in_buf = 0; loff_t first_entry_in_buffer; loff_t index_to_find = file->f_pos; - struct cifsFileInfo * cifsFile = (struct cifsFileInfo *)file->private_data; + struct cifsFileInfo * cifsFile = file->private_data; /* check if index in the buffer */ if((cifsFile == NULL) || (ppCurrentEntry == NULL) || (num_to_ret == NULL)) @@ -467,12 +469,10 @@ cFYI(1,("search backing up - close and restart search")); cifsFile->invalidHandle = TRUE; CIFSFindClose(xid, pTcon, cifsFile->netfid); - if(cifsFile->search_resume_name) { - kfree(cifsFile->search_resume_name); - cifsFile->search_resume_name = NULL; - } + kfree(cifsFile->search_resume_name); + cifsFile->search_resume_name = NULL; if(cifsFile->srch_inf.ntwrk_buf_start) { - cFYI(1,("freeing SMB ff cache buf on search rewind")); + cFYI(1,("freeing SMB ff cache buf on search rewind")); cifs_buf_release(cifsFile->srch_inf.ntwrk_buf_start); } rc = initiate_cifs_search(xid,file); @@ -495,10 +495,11 @@ int i; char * current_entry; char * end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + - smbCalcSize((struct smb_hdr *)cifsFile->srch_inf.ntwrk_buf_start); + smbCalcSize((struct smb_hdr *) + cifsFile->srch_inf.ntwrk_buf_start); /* dump_cifs_file_struct(file,"found entry in fce "); */ - first_entry_in_buffer = cifsFile->srch_inf.index_of_last_entry - - cifsFile->srch_inf.entries_in_buffer; + first_entry_in_buffer = cifsFile->srch_inf.index_of_last_entry + - cifsFile->srch_inf.entries_in_buffer; pos_in_buf = index_to_find - first_entry_in_buffer; cFYI(1,("found entry - pos_in_buf %d",pos_in_buf)); current_entry = cifsFile->srch_inf.srch_entries_start; @@ -517,7 +518,10 @@ current_entry = nxt_dir_entry(current_entry,end_of_smb); } if((current_entry == NULL) && (i < pos_in_buf)) { - cERROR(1,("reached end of buf searching for pos in buf %d index to find %lld rc %d",pos_in_buf,index_to_find,rc)); /* BB removeme BB */ + /* BB fixme - check if we should flag this error */ + cERROR(1,("reached end of buf searching for pos in buf" + " %d index to find %lld rc %d", + pos_in_buf,index_to_find,rc)); } rc = 0; *ppCurrentEntry = current_entry; @@ -537,13 +541,14 @@ } /* inode num, inode type and filename returned */ -static int cifs_get_name_from_search_buf(struct qstr * pqst,char * current_entry, - __u16 level,unsigned int unicode,struct nls_table * nlt, - ino_t * pinum) +static int cifs_get_name_from_search_buf(struct qstr *pqst, + char *current_entry, __u16 level, unsigned int unicode, + struct cifs_sb_info * cifs_sb, ino_t *pinum) { int rc = 0; unsigned int len = 0; char * filename; + struct nls_table * nlt = cifs_sb->local_nls; *pinum = 0; @@ -559,7 +564,8 @@ } /* BB fixme - hash low and high 32 bits if not 64 bit arch BB fixme */ - *pinum = pFindData->UniqueId; + if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) + *pinum = pFindData->UniqueId; } else if(level == SMB_FIND_FILE_DIRECTORY_INFO) { FILE_DIRECTORY_INFO * pFindData = (FILE_DIRECTORY_INFO *)current_entry; @@ -598,10 +604,8 @@ return rc; } - -static int -cifs_filldir(char * pfindEntry, struct file *file, - filldir_t filldir, void *direntry,char * scratch_buf) +static int cifs_filldir(char *pfindEntry, struct file *file, + filldir_t filldir, void *direntry, char *scratch_buf) { int rc = 0; struct qstr qstring; @@ -631,7 +635,7 @@ qstring.name = scratch_buf; rc = cifs_get_name_from_search_buf(&qstring,pfindEntry, pCifsF->srch_inf.info_level, - pCifsF->srch_inf.unicode,cifs_sb->local_nls, + pCifsF->srch_inf.unicode,cifs_sb, &inum /* returned */); if(rc) @@ -665,7 +669,8 @@ return rc; } -static int cifs_save_resume_key(const char * current_entry,struct cifsFileInfo * cifsFile) +static int cifs_save_resume_key(const char *current_entry, + struct cifsFileInfo *cifsFile) { int rc = 0; unsigned int len = 0; @@ -785,7 +790,7 @@ FreeXid(xid); return rc; } - cifsFile = (struct cifsFileInfo *) file->private_data; + cifsFile = file->private_data; if (cifsFile->srch_inf.endOfSearch) { if(cifsFile->srch_inf.emptyDir) { cFYI(1, ("End of search, empty dir")); @@ -796,11 +801,10 @@ cifsFile->invalidHandle = TRUE; CIFSFindClose(xid, pTcon, cifsFile->netfid); } - if(cifsFile->search_resume_name) { - kfree(cifsFile->search_resume_name); - cifsFile->search_resume_name = NULL; - } */ -/* BB account for . and .. in f_pos */ + kfree(cifsFile->search_resume_name); + cifsFile->search_resume_name = NULL; */ + + /* BB account for . and .. in f_pos as special case */ /* dump_cifs_file_struct(file, "rdir after default ");*/ rc = find_cifs_entry(xid,pTcon, file, @@ -816,33 +820,43 @@ } cFYI(1,("loop through %d times filling dir for net buf %p", num_to_fill,cifsFile->srch_inf.ntwrk_buf_start)); - end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + - smbCalcSize((struct smb_hdr *)cifsFile->srch_inf.ntwrk_buf_start); + end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + + smbCalcSize((struct smb_hdr *) + cifsFile->srch_inf.ntwrk_buf_start); tmp_buf = kmalloc(NAME_MAX+1,GFP_KERNEL); for(i=0;(imnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) || - (cifsFile->srch_inf.info_level != something that supports server inodes)) { + + /* BB FIXME - need to enable the below code BB */ + + /* if((!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) || + (cifsFile->srch_inf.info_level != + something that supports server inodes)) { create dentry create inode - fill in inode new_inode (which makes number locally) + fill in inode new_inode (getting local i_ino) } - also create local inode for per reasons unless new mount parm says otherwise */ + also create local inode for performance reasons (so we + have a cache of inode metadata) unless this new mount + parm says otherwise */ + rc = cifs_filldir(current_entry, file, filldir, direntry,tmp_buf); file->f_pos++; if(file->f_pos == cifsFile->srch_inf.index_of_last_entry) { - cFYI(1,("last entry in buf at pos %lld %s",file->f_pos,tmp_buf)); /* BB removeme BB */ + cFYI(1,("last entry in buf at pos %lld %s", + file->f_pos,tmp_buf)); /* BB removeme BB */ cifs_save_resume_key(current_entry,cifsFile); break; } else current_entry = nxt_dir_entry(current_entry,end_of_smb); } - if(tmp_buf != NULL) - kfree(tmp_buf); + kfree(tmp_buf); break; } /* end switch */ @@ -851,4 +865,3 @@ FreeXid(xid); return rc; } - diff -Nru a/fs/dcache.c b/fs/dcache.c --- a/fs/dcache.c 2005-03-30 16:58:47 -08:00 +++ b/fs/dcache.c 2005-03-30 16:58:47 -08:00 @@ -36,6 +36,7 @@ /* #define DCACHE_DEBUG 1 */ int sysctl_vfs_cache_pressure = 100; +EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure); __cacheline_aligned_in_smp DEFINE_SPINLOCK(dcache_lock); seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED; diff -Nru a/fs/dquot.c b/fs/dquot.c --- a/fs/dquot.c 2005-03-30 16:58:49 -08:00 +++ b/fs/dquot.c 2005-03-30 16:58:49 -08:00 @@ -505,14 +505,12 @@ static int shrink_dqcache_memory(int nr, unsigned int gfp_mask) { - int ret; - - spin_lock(&dq_list_lock); - if (nr) + if (nr) { + spin_lock(&dq_list_lock); prune_dqcache(nr); - ret = dqstats.allocated_dquots; - spin_unlock(&dq_list_lock); - return ret; + spin_unlock(&dq_list_lock); + } + return (dqstats.free_dquots / 100) * sysctl_vfs_cache_pressure; } /* diff -Nru a/fs/exec.c b/fs/exec.c --- a/fs/exec.c 2005-03-30 16:58:48 -08:00 +++ b/fs/exec.c 2005-03-30 16:58:48 -08:00 @@ -326,7 +326,7 @@ pte_unmap(pte); goto out; } - mm->rss++; + inc_mm_counter(mm, rss); lru_cache_add_active(page); set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte( page, vma->vm_page_prot)))); diff -Nru a/fs/ext2/dir.c b/fs/ext2/dir.c --- a/fs/ext2/dir.c 2005-03-30 16:58:49 -08:00 +++ b/fs/ext2/dir.c 2005-03-30 16:58:49 -08:00 @@ -592,6 +592,7 @@ goto fail; } kaddr = kmap_atomic(page, KM_USER0); + memset(kaddr, 0, chunk_size); de = (struct ext2_dir_entry_2 *)kaddr; de->name_len = 1; de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(1)); diff -Nru a/fs/ext2/super.c b/fs/ext2/super.c --- a/fs/ext2/super.c 2005-03-30 16:58:49 -08:00 +++ b/fs/ext2/super.c 2005-03-30 16:58:49 -08:00 @@ -518,12 +518,18 @@ static loff_t ext2_max_size(int bits) { loff_t res = EXT2_NDIR_BLOCKS; + /* This constant is calculated to be the largest file size for a + * dense, 4k-blocksize file such that the total number of + * sectors in the file, including data and all indirect blocks, + * does not exceed 2^32. */ + const loff_t upper_limit = 0x1ff7fffd000LL; + res += 1LL << (bits-2); res += 1LL << (2*(bits-2)); res += 1LL << (3*(bits-2)); res <<= bits; - if (res > (512LL << 32) - (1 << bits)) - res = (512LL << 32) - (1 << bits); + if (res > upper_limit) + res = upper_limit; return res; } diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c --- a/fs/ext3/inode.c 2005-03-30 16:58:49 -08:00 +++ b/fs/ext3/inode.c 2005-03-30 16:58:49 -08:00 @@ -858,6 +858,12 @@ return ret; } +static int ext3_writepages_get_block(struct inode *inode, sector_t iblock, + struct buffer_head *bh, int create) +{ + return ext3_direct_io_get_blocks(inode, iblock, 1, bh, create); +} + /* * `handle' can be NULL if create is zero */ @@ -1010,7 +1016,10 @@ ret = PTR_ERR(handle); goto out; } - ret = block_prepare_write(page, from, to, ext3_get_block); + if (test_opt(inode->i_sb, NOBH)) + ret = nobh_prepare_write(page, from, to, ext3_get_block); + else + ret = block_prepare_write(page, from, to, ext3_get_block); if (ret) goto prepare_write_failed; @@ -1094,7 +1103,12 @@ new_i_size = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; if (new_i_size > EXT3_I(inode)->i_disksize) EXT3_I(inode)->i_disksize = new_i_size; - ret = generic_commit_write(file, page, from, to); + + if (test_opt(inode->i_sb, NOBH)) + ret = nobh_commit_write(file, page, from, to); + else + ret = generic_commit_write(file, page, from, to); + ret2 = ext3_journal_stop(handle); if (!ret) ret = ret2; @@ -1323,6 +1337,45 @@ return ret; } +static int +ext3_writeback_writepage_helper(struct page *page, + struct writeback_control *wbc) +{ + return block_write_full_page(page, ext3_get_block, wbc); +} + +static int +ext3_writeback_writepages(struct address_space *mapping, + struct writeback_control *wbc) +{ + struct inode *inode = mapping->host; + handle_t *handle = NULL; + int err, ret = 0; + + if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) + return ret; + + handle = ext3_journal_start(inode, ext3_writepage_trans_blocks(inode)); + if (IS_ERR(handle)) { + ret = PTR_ERR(handle); + return ret; + } + + ret = __mpage_writepages(mapping, wbc, ext3_writepages_get_block, + ext3_writeback_writepage_helper); + + /* + * Need to reaquire the handle since ext3_writepages_get_block() + * can restart the handle + */ + handle = journal_current_handle(); + + err = ext3_journal_stop(handle); + if (!ret) + ret = err; + return ret; +} + static int ext3_writeback_writepage(struct page *page, struct writeback_control *wbc) { @@ -1340,7 +1393,11 @@ goto out_fail; } - ret = block_write_full_page(page, ext3_get_block, wbc); + if (test_opt(inode->i_sb, NOBH)) + ret = nobh_writepage(page, ext3_get_block, wbc); + else + ret = block_write_full_page(page, ext3_get_block, wbc); + err = ext3_journal_stop(handle); if (!ret) ret = err; @@ -1439,6 +1496,8 @@ journal_t *journal = EXT3_JOURNAL(page->mapping->host); WARN_ON(PageChecked(page)); + if (!page_has_buffers(page)) + return 0; return journal_try_to_free_buffers(journal, page, wait); } @@ -1554,6 +1613,7 @@ .readpage = ext3_readpage, .readpages = ext3_readpages, .writepage = ext3_writeback_writepage, + .writepages = ext3_writeback_writepages, .sync_page = block_sync_page, .prepare_write = ext3_prepare_write, .commit_write = ext3_writeback_commit_write, @@ -1600,12 +1660,27 @@ unsigned blocksize, iblock, length, pos; struct inode *inode = mapping->host; struct buffer_head *bh; - int err; + int err = 0; void *kaddr; blocksize = inode->i_sb->s_blocksize; length = blocksize - (offset & (blocksize - 1)); iblock = index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits); + + /* + * For "nobh" option, we can only work if we don't need to + * read-in the page - otherwise we create buffers to do the IO. + */ + if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH)) { + if (PageUptodate(page)) { + kaddr = kmap_atomic(page, KM_USER0); + memset(kaddr + offset, 0, length); + flush_dcache_page(page); + kunmap_atomic(kaddr, KM_USER0); + set_page_dirty(page); + goto unlock; + } + } if (!page_has_buffers(page)) create_empty_buffers(page, blocksize, 0); diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c --- a/fs/ext3/super.c 2005-03-30 16:58:51 -08:00 +++ b/fs/ext3/super.c 2005-03-30 16:58:51 -08:00 @@ -576,7 +576,7 @@ Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro, Opt_nouid32, Opt_check, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov, Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, - Opt_reservation, Opt_noreservation, Opt_noload, + Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, @@ -611,6 +611,7 @@ {Opt_reservation, "reservation"}, {Opt_noreservation, "noreservation"}, {Opt_noload, "noload"}, + {Opt_nobh, "nobh"}, {Opt_commit, "commit=%u"}, {Opt_journal_update, "journal=update"}, {Opt_journal_inum, "journal=%u"}, @@ -924,6 +925,9 @@ match_int(&args[0], &option); *n_blocks_count = option; break; + case Opt_nobh: + set_opt(sbi->s_mount_opt, NOBH); + break; default: printk (KERN_ERR "EXT3-fs: Unrecognized mount option \"%s\" " @@ -1193,12 +1197,18 @@ static loff_t ext3_max_size(int bits) { loff_t res = EXT3_NDIR_BLOCKS; + /* This constant is calculated to be the largest file size for a + * dense, 4k-blocksize file such that the total number of + * sectors in the file, including data and all indirect blocks, + * does not exceed 2^32. */ + const loff_t upper_limit = 0x1ff7fffd000LL; + res += 1LL << (bits-2); res += 1LL << (2*(bits-2)); res += 1LL << (3*(bits-2)); res <<= bits; - if (res > (512LL << 32) - (1 << bits)) - res = (512LL << 32) - (1 << bits); + if (res > upper_limit) + res = upper_limit; return res; } @@ -1563,6 +1573,19 @@ break; } + if (test_opt(sb, NOBH)) { + if (sb->s_blocksize_bits != PAGE_CACHE_SHIFT) { + printk(KERN_WARNING "EXT3-fs: Ignoring nobh option " + "since filesystem blocksize doesn't match " + "pagesize\n"); + clear_opt(sbi->s_mount_opt, NOBH); + } + if (!(test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)) { + printk(KERN_WARNING "EXT3-fs: Ignoring nobh option - " + "its supported only with writeback mode\n"); + clear_opt(sbi->s_mount_opt, NOBH); + } + } /* * The journal_load will have done any necessary log recovery, * so we can safely mount the rest of the filesystem now. diff -Nru a/fs/fat/inode.c b/fs/fat/inode.c --- a/fs/fat/inode.c 2005-03-30 16:58:48 -08:00 +++ b/fs/fat/inode.c 2005-03-30 16:58:48 -08:00 @@ -431,7 +431,8 @@ static int fat_remount(struct super_block *sb, int *flags, char *data) { - *flags |= MS_NODIRATIME; + struct msdos_sb_info *sbi = MSDOS_SB(sb); + *flags |= MS_NODIRATIME | (sbi->options.isvfat ? 0 : MS_NOATIME); return 0; } diff -Nru a/fs/hfs/bnode.c b/fs/hfs/bnode.c --- a/fs/hfs/bnode.c 2005-03-30 16:58:51 -08:00 +++ b/fs/hfs/bnode.c 2005-03-30 16:58:51 -08:00 @@ -285,6 +285,10 @@ page = read_cache_page(mapping, block++, (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto fail; + if (PageError(page)) { + page_cache_release(page); + goto fail; + } #if !REF_PAGES page_cache_release(page); #endif @@ -326,12 +330,16 @@ hfs_bnode_get(node); spin_unlock(&tree->hash_lock); wait_event(node->lock_wq, !test_bit(HFS_BNODE_NEW, &node->flags)); + if (test_bit(HFS_BNODE_ERROR, &node->flags)) + goto node_error; return node; } spin_unlock(&tree->hash_lock); node = __hfs_bnode_create(tree, num); if (!node) return ERR_PTR(-ENOMEM); + if (test_bit(HFS_BNODE_ERROR, &node->flags)) + goto node_error; if (!test_bit(HFS_BNODE_NEW, &node->flags)) return node; @@ -416,6 +424,10 @@ node = __hfs_bnode_create(tree, num); if (!node) return ERR_PTR(-ENOMEM); + if (test_bit(HFS_BNODE_ERROR, &node->flags)) { + hfs_bnode_put(node); + return ERR_PTR(-EIO); + } pagep = node->page; memset(kmap(*pagep) + node->page_offset, 0, diff -Nru a/fs/hfs/extent.c b/fs/hfs/extent.c --- a/fs/hfs/extent.c 2005-03-30 16:58:48 -08:00 +++ b/fs/hfs/extent.c 2005-03-30 16:58:48 -08:00 @@ -49,22 +49,21 @@ * This function has no side-effects */ int hfs_ext_keycmp(const btree_key *key1, const btree_key *key2) { - unsigned int tmp; - int retval; + __be32 fnum1, fnum2; + __be16 block1, block2; - tmp = be32_to_cpu(key1->ext.FNum) - be32_to_cpu(key2->ext.FNum); - if (tmp != 0) { - retval = (int)tmp; - } else { - tmp = (unsigned char)key1->ext.FkType - (unsigned char)key2->ext.FkType; - if (tmp != 0) { - retval = (int)tmp; - } else { - retval = (int)(be16_to_cpu(key1->ext.FABN) - - be16_to_cpu(key2->ext.FABN)); - } - } - return retval; + fnum1 = key1->ext.FNum; + fnum2 = key2->ext.FNum; + if (fnum1 != fnum2) + return be32_to_cpu(fnum1) < be32_to_cpu(fnum2) ? -1 : 1; + if (key1->ext.FkType != key2->ext.FkType) + return key1->ext.FkType < key2->ext.FkType ? -1 : 1; + + block1 = key1->ext.FABN; + block2 = key2->ext.FABN; + if (block1 == block2) + return 0; + return be16_to_cpu(block1) < be16_to_cpu(block2) ? -1 : 1; } /* diff -Nru a/fs/hfs/inode.c b/fs/hfs/inode.c --- a/fs/hfs/inode.c 2005-03-30 16:58:50 -08:00 +++ b/fs/hfs/inode.c 2005-03-30 16:58:50 -08:00 @@ -74,12 +74,6 @@ ; else if (atomic_read(&node->refcnt)) res = 0; - else for (i = 0; i < tree->pages_per_bnode; i++) { - if (PageActive(node->page[i])) { - res = 0; - break; - } - } if (res && node) { hfs_bnode_unhash(node); hfs_bnode_free(node); @@ -103,7 +97,7 @@ spin_unlock(&tree->hash_lock); } //printk("releasepage: %lu,%x = %d\n", page->index, mask, res); - return res; + return res ? try_to_free_buffers(page) : 0; } static int hfs_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, @@ -177,14 +171,16 @@ HFS_I(inode)->flags = 0; HFS_I(inode)->rsrc_inode = NULL; HFS_I(inode)->fs_blocks = 0; - if (S_ISDIR(inode->i_mode)) { + if (S_ISDIR(mode)) { inode->i_size = 2; HFS_SB(sb)->folder_count++; if (dir->i_ino == HFS_ROOT_CNID) HFS_SB(sb)->root_dirs++; inode->i_op = &hfs_dir_inode_operations; inode->i_fop = &hfs_dir_operations; - } else if (S_ISREG(inode->i_mode)) { + inode->i_mode |= S_IRWXUGO; + inode->i_mode &= ~HFS_SB(inode->i_sb)->s_dir_umask; + } else if (S_ISREG(mode)) { HFS_I(inode)->clump_blocks = HFS_SB(sb)->clumpablks; HFS_SB(sb)->file_count++; if (dir->i_ino == HFS_ROOT_CNID) @@ -192,6 +188,10 @@ inode->i_op = &hfs_file_inode_operations; inode->i_fop = &hfs_file_operations; inode->i_mapping->a_ops = &hfs_aops; + inode->i_mode |= S_IRUGO|S_IXUGO; + if (mode & S_IWUSR) + inode->i_mode |= S_IWUGO; + inode->i_mode &= ~HFS_SB(inode->i_sb)->s_file_umask; HFS_I(inode)->phys_size = 0; HFS_I(inode)->alloc_blocks = 0; HFS_I(inode)->first_blocks = 0; @@ -320,7 +320,7 @@ inode->i_mode = S_IRUGO | S_IXUGO; if (!(rec->file.Flags & HFS_FIL_LOCK)) inode->i_mode |= S_IWUGO; - inode->i_mode &= hsb->s_file_umask; + inode->i_mode &= ~hsb->s_file_umask; inode->i_mode |= S_IFREG; inode->i_ctime = inode->i_atime = inode->i_mtime = hfs_m_to_utime(rec->file.MdDat); @@ -332,7 +332,7 @@ inode->i_ino = be32_to_cpu(rec->dir.DirID); inode->i_size = be16_to_cpu(rec->dir.Val) + 2; HFS_I(inode)->fs_blocks = 0; - inode->i_mode = S_IFDIR | (S_IRWXUGO & hsb->s_dir_umask); + inode->i_mode = S_IFDIR | (S_IRWXUGO & ~hsb->s_dir_umask); inode->i_ctime = inode->i_atime = inode->i_mtime = hfs_m_to_utime(rec->dir.MdDat); inode->i_op = &hfs_dir_inode_operations; diff -Nru a/fs/hfs/super.c b/fs/hfs/super.c --- a/fs/hfs/super.c 2005-03-30 16:58:48 -08:00 +++ b/fs/hfs/super.c 2005-03-30 16:58:48 -08:00 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "hfs_fs.h" @@ -134,6 +135,34 @@ .remount_fs = hfs_remount, }; +enum { + opt_uid, opt_gid, opt_umask, opt_file_umask, opt_dir_umask, + opt_part, opt_session, opt_type, opt_creator, opt_quiet, + opt_err +}; + +static match_table_t tokens = { + { opt_uid, "uid=%u" }, + { opt_gid, "gid=%u" }, + { opt_umask, "umask=%o" }, + { opt_file_umask, "file_umask=%o" }, + { opt_dir_umask, "dir_umask=%o" }, + { opt_part, "part=%u" }, + { opt_session, "session=%u" }, + { opt_type, "type=%s" }, + { opt_creator, "creator=%s" }, + { opt_quiet, "quiet" }, + { opt_err, NULL } +}; + +static inline int match_fourchar(substring_t *arg, u32 *result) +{ + if (arg->to - arg->from != 4) + return -EINVAL; + memcpy(result, arg->from, 4); + return 0; +} + /* * parse_options() * @@ -142,13 +171,15 @@ */ static int parse_options(char *options, struct hfs_sb_info *hsb) { - char *this_char, *value; + char *p; + substring_t args[MAX_OPT_ARGS]; + int tmp, token; /* initialize the sb with defaults */ hsb->s_uid = current->uid; hsb->s_gid = current->gid; - hsb->s_file_umask = 0644; - hsb->s_dir_umask = 0755; + hsb->s_file_umask = 0133; + hsb->s_dir_umask = 0022; hsb->s_type = hsb->s_creator = cpu_to_be32(0x3f3f3f3f); /* == '????' */ hsb->s_quiet = 0; hsb->part = -1; @@ -157,77 +188,82 @@ if (!options) return 1; - while ((this_char = strsep(&options, ",")) != 0) { - if (!*this_char) + while ((p = strsep(&options, ",")) != NULL) { + if (!*p) continue; - value = strchr(this_char, '='); - if (value) - *value++ = 0; - /* Numeric-valued options */ - if (!strcmp(this_char, "uid")) { - if (!value || !*value) - return 0; - hsb->s_uid = simple_strtoul(value, &value, 0); - if (*value) - return 0; - } else if (!strcmp(this_char, "gid")) { - if (!value || !*value) - return 0; - hsb->s_gid = simple_strtoul(value, &value, 0); - if (*value) - return 0; - } else if (!strcmp(this_char, "umask")) { - if (!value || !*value) - return 0; - hsb->s_file_umask = simple_strtoul(value, &value, 8); - hsb->s_dir_umask = hsb->s_file_umask; - if (*value) - return 0; - } else if (!strcmp(this_char, "file_umask")) { - if (!value || !*value) - return 0; - hsb->s_file_umask = simple_strtoul(value, &value, 8); - if (*value) - return 0; - } else if (!strcmp(this_char, "dir_umask")) { - if (!value || !*value) - return 0; - hsb->s_dir_umask = simple_strtoul(value, &value, 8); - if (*value) - return 0; - } else if (!strcmp(this_char, "part")) { - if (!value || !*value) - return 0; - hsb->part = simple_strtoul(value, &value, 0); - if (*value) - return 0; - } else if (!strcmp(this_char, "session")) { - if (!value || !*value) - return 0; - hsb->session = simple_strtoul(value, &value, 0); - if (*value) - return 0; - /* String-valued options */ - } else if (!strcmp(this_char, "type") && value) { - if (strlen(value) != 4) - return 0; - memcpy(&hsb->s_type, value, 4); - } else if (!strcmp(this_char, "creator") && value) { - if (strlen(value) != 4) - return 0; - memcpy(&hsb->s_creator, value, 4); - /* Boolean-valued options */ - } else if (!strcmp(this_char, "quiet")) { - if (value) - return 0; + token = match_token(p, tokens, args); + switch (token) { + case opt_uid: + if (match_int(&args[0], &tmp)) { + printk("HFS: uid requires an argument\n"); + return 0; + } + hsb->s_uid = (uid_t)tmp; + break; + case opt_gid: + if (match_int(&args[0], &tmp)) { + printk("HFS: gid requires an argument\n"); + return 0; + } + hsb->s_gid = (gid_t)tmp; + break; + case opt_umask: + if (match_octal(&args[0], &tmp)) { + printk("HFS: umask requires a value\n"); + return 0; + } + hsb->s_file_umask = (umode_t)tmp; + hsb->s_dir_umask = (umode_t)tmp; + break; + case opt_file_umask: + if (match_octal(&args[0], &tmp)) { + printk("HFS: file_umask requires a value\n"); + return 0; + } + hsb->s_file_umask = (umode_t)tmp; + break; + case opt_dir_umask: + if (match_octal(&args[0], &tmp)) { + printk("HFS: dir_umask requires a value\n"); + return 0; + } + hsb->s_dir_umask = (umode_t)tmp; + break; + case opt_part: + if (match_int(&args[0], &hsb->part)) { + printk("HFS: part requires an argument\n"); + return 0; + } + break; + case opt_session: + if (match_int(&args[0], &hsb->session)) { + printk("HFS: session requires an argument\n"); + return 0; + } + break; + case opt_type: + if (match_fourchar(&args[0], &hsb->s_type)) { + printk("HFS+-fs: type requires a 4 character value\n"); + return 0; + } + break; + case opt_creator: + if (match_fourchar(&args[0], &hsb->s_creator)) { + printk("HFS+-fs: creator requires a 4 character value\n"); + return 0; + } + break; + case opt_quiet: hsb->s_quiet = 1; - } else + break; + default: return 0; + } } hsb->s_dir_umask &= 0777; - hsb->s_file_umask &= 0777; + hsb->s_file_umask &= 0577; return 1; } diff -Nru a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c --- a/fs/hfsplus/bnode.c 2005-03-30 16:58:49 -08:00 +++ b/fs/hfsplus/bnode.c 2005-03-30 16:58:49 -08:00 @@ -446,6 +446,10 @@ page = read_cache_page(mapping, block, (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto fail; + if (PageError(page)) { + page_cache_release(page); + goto fail; + } #if !REF_PAGES page_cache_release(page); #endif @@ -487,12 +491,16 @@ hfs_bnode_get(node); spin_unlock(&tree->hash_lock); wait_event(node->lock_wq, !test_bit(HFS_BNODE_NEW, &node->flags)); + if (test_bit(HFS_BNODE_ERROR, &node->flags)) + goto node_error; return node; } spin_unlock(&tree->hash_lock); node = __hfs_bnode_create(tree, num); if (!node) return ERR_PTR(-ENOMEM); + if (test_bit(HFS_BNODE_ERROR, &node->flags)) + goto node_error; if (!test_bit(HFS_BNODE_NEW, &node->flags)) return node; @@ -579,6 +587,10 @@ node = __hfs_bnode_create(tree, num); if (!node) return ERR_PTR(-ENOMEM); + if (test_bit(HFS_BNODE_ERROR, &node->flags)) { + hfs_bnode_put(node); + return ERR_PTR(-EIO); + } pagep = node->page; memset(kmap(*pagep) + node->page_offset, 0, diff -Nru a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c --- a/fs/hfsplus/catalog.c 2005-03-30 16:58:49 -08:00 +++ b/fs/hfsplus/catalog.c 2005-03-30 16:58:49 -08:00 @@ -25,14 +25,14 @@ return hfsplus_unistrcmp(&k1->cat.name, &k2->cat.name); } -void hfsplus_cat_build_key(hfsplus_btree_key *key, u32 parent, - struct qstr *str) +void hfsplus_cat_build_key(struct super_block *sb, hfsplus_btree_key *key, + u32 parent, struct qstr *str) { int len; key->cat.parent = cpu_to_be32(parent); if (str) { - hfsplus_asc2uni(&key->cat.name, str->name, str->len); + hfsplus_asc2uni(sb, &key->cat.name, str->name, str->len); len = be16_to_cpu(key->cat.name.length); } else { key->cat.name.length = 0; @@ -113,13 +113,14 @@ } } -static int hfsplus_fill_cat_thread(hfsplus_cat_entry *entry, int type, +static int hfsplus_fill_cat_thread(struct super_block *sb, + hfsplus_cat_entry *entry, int type, u32 parentid, struct qstr *str) { entry->type = cpu_to_be16(type); entry->thread.reserved = 0; entry->thread.parentID = cpu_to_be32(parentid); - hfsplus_asc2uni(&entry->thread.nodeName, str->name, str->len); + hfsplus_asc2uni(sb, &entry->thread.nodeName, str->name, str->len); return 10 + be16_to_cpu(entry->thread.nodeName.length) * 2; } @@ -131,7 +132,7 @@ int err; u16 type; - hfsplus_cat_build_key(fd->search_key, cnid, NULL); + hfsplus_cat_build_key(sb, fd->search_key, cnid, NULL); err = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry)); if (err) return err; @@ -159,8 +160,8 @@ sb = dir->i_sb; hfs_find_init(HFSPLUS_SB(sb).cat_tree, &fd); - hfsplus_cat_build_key(fd.search_key, cnid, NULL); - entry_size = hfsplus_fill_cat_thread(&entry, S_ISDIR(inode->i_mode) ? + hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); + entry_size = hfsplus_fill_cat_thread(sb, &entry, S_ISDIR(inode->i_mode) ? HFSPLUS_FOLDER_THREAD : HFSPLUS_FILE_THREAD, dir->i_ino, str); err = hfs_brec_find(&fd); @@ -173,7 +174,7 @@ if (err) goto err2; - hfsplus_cat_build_key(fd.search_key, dir->i_ino, str); + hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, str); entry_size = hfsplus_cat_build_record(&entry, cnid, inode); err = hfs_brec_find(&fd); if (err != -ENOENT) { @@ -193,7 +194,7 @@ return 0; err1: - hfsplus_cat_build_key(fd.search_key, cnid, NULL); + hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); if (!hfs_brec_find(&fd)) hfs_brec_remove(&fd); err2: @@ -217,7 +218,7 @@ if (!str) { int len; - hfsplus_cat_build_key(fd.search_key, cnid, NULL); + hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); err = hfs_brec_find(&fd); if (err) goto out; @@ -229,7 +230,7 @@ hfs_bnode_read(fd.bnode, &fd.search_key->cat.name.unicode, off + 2, len); fd.search_key->key_len = cpu_to_be16(6 + len); } else - hfsplus_cat_build_key(fd.search_key, dir->i_ino, str); + hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, str); err = hfs_brec_find(&fd); if (err) @@ -259,7 +260,7 @@ if (err) goto out; - hfsplus_cat_build_key(fd.search_key, cnid, NULL); + hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); err = hfs_brec_find(&fd); if (err) goto out; @@ -294,7 +295,7 @@ dst_fd = src_fd; /* find the old dir entry and read the data */ - hfsplus_cat_build_key(src_fd.search_key, src_dir->i_ino, src_name); + hfsplus_cat_build_key(sb, src_fd.search_key, src_dir->i_ino, src_name); err = hfs_brec_find(&src_fd); if (err) goto out; @@ -303,7 +304,7 @@ src_fd.entrylength); /* create new dir entry with the data from the old entry */ - hfsplus_cat_build_key(dst_fd.search_key, dst_dir->i_ino, dst_name); + hfsplus_cat_build_key(sb, dst_fd.search_key, dst_dir->i_ino, dst_name); err = hfs_brec_find(&dst_fd); if (err != -ENOENT) { if (!err) @@ -319,7 +320,7 @@ mark_inode_dirty(dst_dir); /* finally remove the old entry */ - hfsplus_cat_build_key(src_fd.search_key, src_dir->i_ino, src_name); + hfsplus_cat_build_key(sb, src_fd.search_key, src_dir->i_ino, src_name); err = hfs_brec_find(&src_fd); if (err) goto out; @@ -331,7 +332,7 @@ mark_inode_dirty(src_dir); /* remove old thread entry */ - hfsplus_cat_build_key(src_fd.search_key, cnid, NULL); + hfsplus_cat_build_key(sb, src_fd.search_key, cnid, NULL); err = hfs_brec_find(&src_fd); if (err) goto out; @@ -341,8 +342,8 @@ goto out; /* create new thread entry */ - hfsplus_cat_build_key(dst_fd.search_key, cnid, NULL); - entry_size = hfsplus_fill_cat_thread(&entry, type, dst_dir->i_ino, dst_name); + hfsplus_cat_build_key(sb, dst_fd.search_key, cnid, NULL); + entry_size = hfsplus_fill_cat_thread(sb, &entry, type, dst_dir->i_ino, dst_name); err = hfs_brec_find(&dst_fd); if (err != -ENOENT) { if (!err) diff -Nru a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c --- a/fs/hfsplus/dir.c 2005-03-30 16:58:50 -08:00 +++ b/fs/hfsplus/dir.c 2005-03-30 16:58:50 -08:00 @@ -40,7 +40,7 @@ sb = dir->i_sb; dentry->d_fsdata = NULL; hfs_find_init(HFSPLUS_SB(sb).cat_tree, &fd); - hfsplus_cat_build_key(fd.search_key, dir->i_ino, &dentry->d_name); + hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, &dentry->d_name); again: err = hfs_brec_read(&fd, &entry, sizeof(entry)); if (err) { @@ -80,7 +80,7 @@ linkid = be32_to_cpu(entry.file.permissions.dev); str.len = sprintf(name, "iNode%d", linkid); str.name = name; - hfsplus_cat_build_key(fd.search_key, HFSPLUS_SB(sb).hidden_dir->i_ino, &str); + hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_SB(sb).hidden_dir->i_ino, &str); goto again; } else if (!dentry->d_fsdata) dentry->d_fsdata = (void *)(unsigned long)cnid; @@ -118,7 +118,7 @@ return 0; hfs_find_init(HFSPLUS_SB(sb).cat_tree, &fd); - hfsplus_cat_build_key(fd.search_key, inode->i_ino, NULL); + hfsplus_cat_build_key(sb, fd.search_key, inode->i_ino, NULL); err = hfs_brec_find(&fd); if (err) goto out; @@ -164,7 +164,7 @@ hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength); type = be16_to_cpu(entry.type); len = HFSPLUS_MAX_STRLEN; - err = hfsplus_uni2asc(&fd.key->cat.name, strbuf, &len); + err = hfsplus_uni2asc(sb, &fd.key->cat.name, strbuf, &len); if (err) goto out; if (type == HFSPLUS_FOLDER) { diff -Nru a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h --- a/fs/hfsplus/hfsplus_fs.h 2005-03-30 16:58:50 -08:00 +++ b/fs/hfsplus/hfsplus_fs.h 2005-03-30 16:58:50 -08:00 @@ -114,6 +114,7 @@ struct hfs_btree *attr_tree; struct inode *alloc_file; struct inode *hidden_dir; + struct nls_table *nls; /* Runtime variables */ u32 blockoffset; @@ -150,6 +151,7 @@ }; #define HFSPLUS_SB_WRITEBACKUP 0x0001 +#define HFSPLUS_SB_NODECOMPOSE 0x0002 struct hfsplus_inode_info { @@ -305,7 +307,7 @@ /* catalog.c */ int hfsplus_cat_cmp_key(hfsplus_btree_key *, hfsplus_btree_key *); -void hfsplus_cat_build_key(hfsplus_btree_key *, u32, struct qstr *); +void hfsplus_cat_build_key(struct super_block *sb, hfsplus_btree_key *, u32, struct qstr *); int hfsplus_find_cat(struct super_block *, u32, struct hfs_find_data *); int hfsplus_create_cat(u32, struct inode *, struct qstr *, struct inode *); int hfsplus_delete_cat(u32, struct inode *, struct qstr *); @@ -345,12 +347,14 @@ void fill_defaults(struct hfsplus_sb_info *); /* tables.c */ -extern u16 case_fold_table[]; +extern u16 hfsplus_case_fold_table[]; +extern u16 hfsplus_decompose_table[]; +extern u16 hfsplus_compose_table[]; /* unicode.c */ int hfsplus_unistrcmp(const struct hfsplus_unistr *, const struct hfsplus_unistr *); -int hfsplus_uni2asc(const struct hfsplus_unistr *, char *, int *); -int hfsplus_asc2uni(struct hfsplus_unistr *, const char *, int); +int hfsplus_uni2asc(struct super_block *, const struct hfsplus_unistr *, char *, int *); +int hfsplus_asc2uni(struct super_block *, struct hfsplus_unistr *, const char *, int); /* wrapper.c */ int hfsplus_read_wrapper(struct super_block *); diff -Nru a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c --- a/fs/hfsplus/inode.c 2005-03-30 16:58:47 -08:00 +++ b/fs/hfsplus/inode.c 2005-03-30 16:58:47 -08:00 @@ -71,12 +71,6 @@ ; else if (atomic_read(&node->refcnt)) res = 0; - else for (i = 0; i < tree->pages_per_bnode; i++) { - if (PageActive(node->page[i])) { - res = 0; - break; - } - } if (res && node) { hfs_bnode_unhash(node); hfs_bnode_free(node); @@ -100,7 +94,7 @@ spin_unlock(&tree->hash_lock); } //printk("releasepage: %lu,%x = %d\n", page->index, mask, res); - return res; + return res ? try_to_free_buffers(page) : 0; } static int hfsplus_get_blocks(struct inode *inode, sector_t iblock, unsigned long max_blocks, diff -Nru a/fs/hfsplus/options.c b/fs/hfsplus/options.c --- a/fs/hfsplus/options.c 2005-03-30 16:58:48 -08:00 +++ b/fs/hfsplus/options.c 2005-03-30 16:58:48 -08:00 @@ -11,8 +11,32 @@ #include #include #include +#include +#include #include "hfsplus_fs.h" +enum { + opt_creator, opt_type, + opt_umask, opt_uid, opt_gid, + opt_part, opt_session, opt_nls, + opt_nodecompose, opt_decompose, + opt_err +}; + +static match_table_t tokens = { + { opt_creator, "creator=%s" }, + { opt_type, "type=%s" }, + { opt_umask, "umask=%o" }, + { opt_uid, "uid=%u" }, + { opt_gid, "gid=%u" }, + { opt_part, "part=%u" }, + { opt_session, "session=%u" }, + { opt_nls, "nls=%s" }, + { opt_decompose, "decompose" }, + { opt_nodecompose, "nodecompose" }, + { opt_err, NULL } +}; + /* Initialize an options object to reasonable defaults */ void fill_defaults(struct hfsplus_sb_info *opts) { @@ -29,98 +53,109 @@ } /* convert a "four byte character" to a 32 bit int with error checks */ -static int fill_fourchar(u32 *result, char *input) -{ - u32 out; - int i; - - if (!result || !input || !*input || (strlen(input) != 4)) - return 0; - - for (out = 0, i = 0; i < 4; i++) { - out <<= 8; - out |= ((int)(input[i])) & 0xFF; - } - *result = out; - return 1; -} - -/* convert a string to int with error checks */ -static int fill_int(int *result, char *input, int base) +static inline int match_fourchar(substring_t *arg, u32 *result) { - char *tmp = input; - int intval; - - if (!result || !input || !*input) - return 0; - - intval = simple_strtoul(tmp, &tmp, base); - if (*tmp) - return 0; - - *result = intval; - return 1; + if (arg->to - arg->from != 4) + return -EINVAL; + memcpy(result, arg->from, 4); + return 0; } /* Parse options from mount. Returns 0 on failure */ /* input is the options passed to mount() as a string */ -int parse_options(char *input, struct hfsplus_sb_info *results) +int parse_options(char *input, struct hfsplus_sb_info *sbi) { - char *curropt, *value; - int tmp; + char *p; + substring_t args[MAX_OPT_ARGS]; + int tmp, token; if (!input) - return 1; + goto done; - while ((curropt = strsep(&input,",")) != NULL) { - if (!*curropt) + while ((p = strsep(&input, ",")) != NULL) { + if (!*p) continue; - if ((value = strchr(curropt, '=')) != NULL) - *value++ = '\0'; - - if (!strcmp(curropt, "creator")) { - if (!fill_fourchar(&(results->creator), value)) { + token = match_token(p, tokens, args); + switch (token) { + case opt_creator: + if (match_fourchar(&args[0], &sbi->creator)) { printk("HFS+-fs: creator requires a 4 character value\n"); return 0; } - } else if (!strcmp(curropt, "type")) { - if (!fill_fourchar(&(results->type), value)) { + break; + case opt_type: + if (match_fourchar(&args[0], &sbi->type)) { printk("HFS+-fs: type requires a 4 character value\n"); return 0; } - } else if (!strcmp(curropt, "umask")) { - if (!fill_int(&tmp, value, 8)) { + break; + case opt_umask: + if (match_octal(&args[0], &tmp)) { printk("HFS+-fs: umask requires a value\n"); return 0; } - results->umask = (umode_t)tmp; - } else if (!strcmp(curropt, "uid")) { - if (!fill_int(&tmp, value, 0)) { + sbi->umask = (umode_t)tmp; + break; + case opt_uid: + if (match_int(&args[0], &tmp)) { printk("HFS+-fs: uid requires an argument\n"); return 0; } - results->uid = (uid_t)tmp; - } else if (!strcmp(curropt, "gid")) { - if (!fill_int(&tmp, value, 0)) { + sbi->uid = (uid_t)tmp; + break; + case opt_gid: + if (match_int(&args[0], &tmp)) { printk("HFS+-fs: gid requires an argument\n"); return 0; } - results->gid = (gid_t)tmp; - } else if (!strcmp(curropt, "part")) { - if (!fill_int(&results->part, value, 0)) { + sbi->gid = (gid_t)tmp; + break; + case opt_part: + if (match_int(&args[0], &sbi->part)) { printk("HFS+-fs: part requires an argument\n"); return 0; } - } else if (!strcmp(curropt, "session")) { - if (!fill_int(&results->session, value, 0)) { + break; + case opt_session: + if (match_int(&args[0], &sbi->session)) { printk("HFS+-fs: session requires an argument\n"); return 0; } - } else { - printk("HFS+-fs: unknown option %s\n", curropt); + break; + case opt_nls: + if (sbi->nls) { + printk("HFS+-fs: unable to change nls mapping\n"); + return 0; + } + p = match_strdup(&args[0]); + sbi->nls = load_nls(p); + if (!sbi->nls) { + printk("HFS+-fs: unable to load nls mapping \"%s\"\n", p); + kfree(p); + return 0; + } + kfree(p); + break; + case opt_decompose: + sbi->flags &= ~HFSPLUS_SB_NODECOMPOSE; + break; + case opt_nodecompose: + sbi->flags |= HFSPLUS_SB_NODECOMPOSE; + break; + default: return 0; } + } + +done: + if (!sbi->nls) { + /* try utf8 first, as this is the old default behaviour */ + sbi->nls = load_nls("utf8"); + if (!sbi->nls) + sbi->nls = load_nls_default(); + if (!sbi->nls) + return 0; } return 1; diff -Nru a/fs/hfsplus/super.c b/fs/hfsplus/super.c --- a/fs/hfsplus/super.c 2005-03-30 16:58:47 -08:00 +++ b/fs/hfsplus/super.c 2005-03-30 16:58:47 -08:00 @@ -16,6 +16,7 @@ #include #include #include +#include static struct inode *hfsplus_alloc_inode(struct super_block *sb); static void hfsplus_destroy_inode(struct inode *inode); @@ -223,6 +224,8 @@ iput(HFSPLUS_SB(sb).alloc_file); iput(HFSPLUS_SB(sb).hidden_dir); brelse(HFSPLUS_SB(sb).s_vhbh); + if (HFSPLUS_SB(sb).nls) + unload_nls(HFSPLUS_SB(sb).nls); } static int hfsplus_statfs(struct super_block *sb, struct kstatfs *buf) @@ -280,13 +283,13 @@ struct hfs_find_data fd; struct inode *root; struct qstr str; + struct nls_table *nls = NULL; int err = -EINVAL; sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL); - if (!sbi) { - err = -ENOMEM; - goto out2; - } + if (!sbi) + return -ENOMEM; + memset(sbi, 0, sizeof(HFSPLUS_SB(sb))); sb->s_fs_info = sbi; INIT_HLIST_HEAD(&sbi->rsrc_inodes); @@ -295,7 +298,16 @@ if (!silent) printk("HFS+-fs: unable to parse mount options\n"); err = -EINVAL; - goto out2; + goto cleanup; + } + + /* temporarily use utf8 to correctly find the hidden dir below */ + nls = sbi->nls; + sbi->nls = load_nls("utf8"); + if (!nls) { + printk("HFS+: unable to load nls for utf8\n"); + err = -EINVAL; + goto cleanup; } /* Grab the volume header */ @@ -303,7 +315,7 @@ if (!silent) printk("HFS+-fs: unable to find HFS+ superblock\n"); err = -EINVAL; - goto out2; + goto cleanup; } vhdr = HFSPLUS_SB(sb).s_vhdr; @@ -376,7 +388,7 @@ str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1; str.name = HFSP_HIDDENDIR_NAME; hfs_find_init(HFSPLUS_SB(sb).cat_tree, &fd); - hfsplus_cat_build_key(fd.search_key, HFSPLUS_ROOT_CNID, &str); + hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_ROOT_CNID, &str); if (!hfs_brec_read(&fd, &entry, sizeof(entry))) { hfs_find_exit(&fd); if (entry.type != cpu_to_be16(HFSPLUS_FOLDER)) @@ -410,11 +422,14 @@ mark_inode_dirty(HFSPLUS_SB(sb).hidden_dir); } out: + unload_nls(sbi->nls); + sbi->nls = nls; return 0; cleanup: hfsplus_put_super(sb); -out2: + if (nls) + unload_nls(nls); return err; } diff -Nru a/fs/hfsplus/tables.c b/fs/hfsplus/tables.c --- a/fs/hfsplus/tables.c 2005-03-30 16:58:47 -08:00 +++ b/fs/hfsplus/tables.c 2005-03-30 16:58:47 -08:00 @@ -11,7 +11,7 @@ * (HFS Plus Volume Format) */ -u16 case_fold_table[] = { +u16 hfsplus_case_fold_table[] = { /* * The lower case table consists of a 256-entry high-byte table followed by * some number of 256-entry subtables. The high-byte table contains either an @@ -405,4 +405,2841 @@ 0xFFE8, 0xFFE9, 0xFFEA, 0xFFEB, 0xFFEC, 0xFFED, 0xFFEE, 0xFFEF, /* F */ 0xFFF0, 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4, 0xFFF5, 0xFFF6, 0xFFF7, 0xFFF8, 0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD, 0xFFFE, 0xFFFF, +}; + +u16 hfsplus_decompose_table[] = { + /* base table */ + 0x0010, 0x04c0, 0x0000, 0x06f0, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x07b0, + /* char table 0x0___ */ + 0x0020, 0x0070, 0x0160, 0x0190, 0x0230, 0x0000, 0x0000, 0x0000, + 0x0000, 0x02d0, 0x0340, 0x0360, 0x03b0, 0x03e0, 0x0400, 0x0430, + /* char table 0x00__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0030, 0x0040, 0x0050, 0x0060, + /* char values 0x00c_ */ + 0x2042, 0x204a, 0x2052, 0x205a, 0x2062, 0x206a, 0x0000, 0x2072, + 0x207a, 0x2082, 0x208a, 0x2092, 0x209a, 0x20a2, 0x20aa, 0x20b2, + /* char values 0x00d_ */ + 0x0000, 0x20ba, 0x20c2, 0x20ca, 0x20d2, 0x20da, 0x20e2, 0x0000, + 0x0000, 0x20ea, 0x20f2, 0x20fa, 0x2102, 0x210a, 0x0000, 0x0000, + /* char values 0x00e_ */ + 0x2112, 0x211a, 0x2122, 0x212a, 0x2132, 0x213a, 0x0000, 0x2142, + 0x214a, 0x2152, 0x215a, 0x2162, 0x216a, 0x2172, 0x217a, 0x2182, + /* char values 0x00f_ */ + 0x0000, 0x218a, 0x2192, 0x219a, 0x21a2, 0x21aa, 0x21b2, 0x0000, + 0x0000, 0x21ba, 0x21c2, 0x21ca, 0x21d2, 0x21da, 0x0000, 0x21e2, + /* char table 0x01__ */ + 0x0080, 0x0090, 0x00a0, 0x00b0, 0x00c0, 0x00d0, 0x00e0, 0x00f0, + 0x0000, 0x0000, 0x0100, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, + /* char values 0x010_ */ + 0x21ea, 0x21f2, 0x21fa, 0x2202, 0x220a, 0x2212, 0x221a, 0x2222, + 0x222a, 0x2232, 0x223a, 0x2242, 0x224a, 0x2252, 0x225a, 0x2262, + /* char values 0x011_ */ + 0x0000, 0x0000, 0x226a, 0x2272, 0x227a, 0x2282, 0x228a, 0x2292, + 0x229a, 0x22a2, 0x22aa, 0x22b2, 0x22ba, 0x22c2, 0x22ca, 0x22d2, + /* char values 0x012_ */ + 0x22da, 0x22e2, 0x22ea, 0x22f2, 0x22fa, 0x2302, 0x0000, 0x0000, + 0x230a, 0x2312, 0x231a, 0x2322, 0x232a, 0x2332, 0x233a, 0x2342, + /* char values 0x013_ */ + 0x234a, 0x0000, 0x0000, 0x0000, 0x2352, 0x235a, 0x2362, 0x236a, + 0x0000, 0x2372, 0x237a, 0x2382, 0x238a, 0x2392, 0x239a, 0x0000, + /* char values 0x014_ */ + 0x0000, 0x0000, 0x0000, 0x23a2, 0x23aa, 0x23b2, 0x23ba, 0x23c2, + 0x23ca, 0x0000, 0x0000, 0x0000, 0x23d2, 0x23da, 0x23e2, 0x23ea, + /* char values 0x015_ */ + 0x23f2, 0x23fa, 0x0000, 0x0000, 0x2402, 0x240a, 0x2412, 0x241a, + 0x2422, 0x242a, 0x2432, 0x243a, 0x2442, 0x244a, 0x2452, 0x245a, + /* char values 0x016_ */ + 0x2462, 0x246a, 0x2472, 0x247a, 0x2482, 0x248a, 0x0000, 0x0000, + 0x2492, 0x249a, 0x24a2, 0x24aa, 0x24b2, 0x24ba, 0x24c2, 0x24ca, + /* char values 0x017_ */ + 0x24d2, 0x24da, 0x24e2, 0x24ea, 0x24f2, 0x24fa, 0x2502, 0x250a, + 0x2512, 0x251a, 0x2522, 0x252a, 0x2532, 0x253a, 0x2542, 0x0000, + /* char values 0x01a_ */ + 0x254a, 0x2552, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x255a, + /* char values 0x01b_ */ + 0x2562, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x01c_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x256a, 0x2572, 0x257a, + /* char values 0x01d_ */ + 0x2582, 0x258a, 0x2592, 0x259a, 0x25a2, 0x25ab, 0x25b7, 0x25c3, + 0x25cf, 0x25db, 0x25e7, 0x25f3, 0x25ff, 0x0000, 0x260b, 0x2617, + /* char values 0x01e_ */ + 0x2623, 0x262f, 0x263a, 0x2642, 0x0000, 0x0000, 0x264a, 0x2652, + 0x265a, 0x2662, 0x266a, 0x2672, 0x267b, 0x2687, 0x2692, 0x269a, + /* char values 0x01f_ */ + 0x26a2, 0x0000, 0x0000, 0x0000, 0x26aa, 0x26b2, 0x0000, 0x0000, + 0x0000, 0x0000, 0x26bb, 0x26c7, 0x26d2, 0x26da, 0x26e2, 0x26ea, + /* char table 0x02__ */ + 0x0170, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x020_ */ + 0x26f2, 0x26fa, 0x2702, 0x270a, 0x2712, 0x271a, 0x2722, 0x272a, + 0x2732, 0x273a, 0x2742, 0x274a, 0x2752, 0x275a, 0x2762, 0x276a, + /* char values 0x021_ */ + 0x2772, 0x277a, 0x2782, 0x278a, 0x2792, 0x279a, 0x27a2, 0x27aa, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x03__ */ + 0x0000, 0x01a0, 0x0000, 0x0000, 0x01b0, 0x0000, 0x0000, 0x01c0, + 0x01d0, 0x01e0, 0x01f0, 0x0200, 0x0210, 0x0220, 0x0000, 0x0000, + /* char values 0x031_ */ + 0x27b2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x034_ */ + 0x27b9, 0x27bd, 0x0000, 0x27c1, 0x27c6, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x037_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x27cd, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x27d1, 0x0000, + /* char values 0x038_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x27d6, 0x27de, 0x27e5, + 0x27ea, 0x27f2, 0x27fa, 0x0000, 0x2802, 0x0000, 0x280a, 0x2812, + /* char values 0x039_ */ + 0x281b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x03a_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x2826, 0x282e, 0x2836, 0x283e, 0x2846, 0x284e, + /* char values 0x03b_ */ + 0x2857, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x03c_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x2862, 0x286a, 0x2872, 0x287a, 0x2882, 0x0000, + /* char values 0x03d_ */ + 0x0000, 0x0000, 0x0000, 0x288a, 0x2892, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x04__ */ + 0x0240, 0x0250, 0x0000, 0x0260, 0x0000, 0x0270, 0x0000, 0x0280, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0290, 0x02a0, 0x02b0, 0x02c0, + /* char values 0x040_ */ + 0x0000, 0x289a, 0x0000, 0x28a2, 0x0000, 0x0000, 0x0000, 0x28aa, + 0x0000, 0x0000, 0x0000, 0x0000, 0x28b2, 0x0000, 0x28ba, 0x0000, + /* char values 0x041_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x28c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x043_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x28ca, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x045_ */ + 0x0000, 0x28d2, 0x0000, 0x28da, 0x0000, 0x0000, 0x0000, 0x28e2, + 0x0000, 0x0000, 0x0000, 0x0000, 0x28ea, 0x0000, 0x28f2, 0x0000, + /* char values 0x047_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x28fa, 0x2902, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x04c_ */ + 0x0000, 0x290a, 0x2912, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x04d_ */ + 0x291a, 0x2922, 0x292a, 0x2932, 0x2939, 0x293d, 0x2942, 0x294a, + 0x2951, 0x2955, 0x295a, 0x2962, 0x296a, 0x2972, 0x297a, 0x2982, + /* char values 0x04e_ */ + 0x2989, 0x298d, 0x2992, 0x299a, 0x29a2, 0x29aa, 0x29b2, 0x29ba, + 0x29c1, 0x29c5, 0x29ca, 0x29d2, 0x0000, 0x0000, 0x29da, 0x29e2, + /* char values 0x04f_ */ + 0x29ea, 0x29f2, 0x29fa, 0x2a02, 0x2a0a, 0x2a12, 0x0000, 0x0000, + 0x2a1a, 0x2a22, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x09__ */ + 0x0000, 0x0000, 0x02e0, 0x02f0, 0x0000, 0x0300, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0310, 0x0320, 0x0330, 0x0000, 0x0000, + /* char values 0x092_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2a2a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x093_ */ + 0x0000, 0x2a32, 0x0000, 0x0000, 0x2a3a, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x095_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2a42, 0x2a4a, 0x2a52, 0x2a5a, 0x2a62, 0x2a6a, 0x2a72, 0x2a7a, + /* char values 0x09b_ */ + 0x2a82, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x09c_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x2a8a, 0x2a92, 0x0000, 0x0000, 0x0000, + /* char values 0x09d_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x2a9a, 0x2aa2, 0x0000, 0x2aaa, + /* char table 0x0a__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0350, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0a5_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2ab2, 0x2aba, 0x2ac2, 0x2aca, 0x0000, 0x2ad2, 0x0000, + /* char table 0x0b__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0370, 0x0380, 0x0000, 0x0000, + 0x0000, 0x0390, 0x0000, 0x0000, 0x03a0, 0x0000, 0x0000, 0x0000, + /* char values 0x0b4_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2ada, 0x0000, 0x0000, 0x2ae2, 0x2aea, 0x0000, 0x0000, 0x0000, + /* char values 0x0b5_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x2af2, 0x2afa, 0x0000, 0x2b02, + /* char values 0x0b9_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x2b0a, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0bc_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x2b12, 0x2b1a, 0x2b22, 0x0000, 0x0000, 0x0000, + /* char table 0x0c__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x03c0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x03d0, 0x0000, 0x0000, 0x0000, + /* char values 0x0c4_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2b2a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0cc_ */ + 0x2b32, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2b3a, + 0x2b42, 0x0000, 0x2b4a, 0x2b53, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x0d__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x03f0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0d4_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x2b5e, 0x2b66, 0x2b6e, 0x0000, 0x0000, 0x0000, + /* char table 0x0e__ */ + 0x0000, 0x0000, 0x0000, 0x0410, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0420, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0e3_ */ + 0x0000, 0x0000, 0x0000, 0x2b76, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0eb_ */ + 0x0000, 0x0000, 0x0000, 0x2b7e, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x0f__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0440, 0x0450, 0x0460, 0x0470, + 0x0480, 0x0490, 0x04a0, 0x04b0, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0f4_ */ + 0x0000, 0x0000, 0x0000, 0x2b86, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2b8e, 0x0000, 0x0000, + /* char values 0x0f5_ */ + 0x0000, 0x0000, 0x2b96, 0x0000, 0x0000, 0x0000, 0x0000, 0x2b9e, + 0x0000, 0x0000, 0x0000, 0x0000, 0x2ba6, 0x0000, 0x0000, 0x0000, + /* char values 0x0f6_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2bae, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0f7_ */ + 0x0000, 0x0000, 0x0000, 0x2bb6, 0x0000, 0x2bbe, 0x2bc6, 0x2bcf, + 0x2bda, 0x2be3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0f8_ */ + 0x0000, 0x2bee, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x0f9_ */ + 0x0000, 0x0000, 0x0000, 0x2bf6, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2bfe, 0x0000, 0x0000, + /* char values 0x0fa_ */ + 0x0000, 0x0000, 0x2c06, 0x0000, 0x0000, 0x0000, 0x0000, 0x2c0e, + 0x0000, 0x0000, 0x0000, 0x0000, 0x2c16, 0x0000, 0x0000, 0x0000, + /* char values 0x0fb_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2c1e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x1___ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x04d0, 0x05e0, + /* char table 0x1e__ */ + 0x04e0, 0x04f0, 0x0500, 0x0510, 0x0520, 0x0530, 0x0540, 0x0550, + 0x0560, 0x0570, 0x0580, 0x0590, 0x05a0, 0x05b0, 0x05c0, 0x05d0, + /* char values 0x1e0_ */ + 0x2c26, 0x2c2e, 0x2c36, 0x2c3e, 0x2c46, 0x2c4e, 0x2c56, 0x2c5e, + 0x2c67, 0x2c73, 0x2c7e, 0x2c86, 0x2c8e, 0x2c96, 0x2c9e, 0x2ca6, + /* char values 0x1e1_ */ + 0x2cae, 0x2cb6, 0x2cbe, 0x2cc6, 0x2ccf, 0x2cdb, 0x2ce7, 0x2cf3, + 0x2cfe, 0x2d06, 0x2d0e, 0x2d16, 0x2d1f, 0x2d2b, 0x2d36, 0x2d3e, + /* char values 0x1e2_ */ + 0x2d46, 0x2d4e, 0x2d56, 0x2d5e, 0x2d66, 0x2d6e, 0x2d76, 0x2d7e, + 0x2d86, 0x2d8e, 0x2d96, 0x2d9e, 0x2da6, 0x2dae, 0x2db7, 0x2dc3, + /* char values 0x1e3_ */ + 0x2dce, 0x2dd6, 0x2dde, 0x2de6, 0x2dee, 0x2df6, 0x2dfe, 0x2e06, + 0x2e0f, 0x2e1b, 0x2e26, 0x2e2e, 0x2e36, 0x2e3e, 0x2e46, 0x2e4e, + /* char values 0x1e4_ */ + 0x2e56, 0x2e5e, 0x2e66, 0x2e6e, 0x2e76, 0x2e7e, 0x2e86, 0x2e8e, + 0x2e96, 0x2e9e, 0x2ea6, 0x2eae, 0x2eb7, 0x2ec3, 0x2ecf, 0x2edb, + /* char values 0x1e5_ */ + 0x2ee7, 0x2ef3, 0x2eff, 0x2f0b, 0x2f16, 0x2f1e, 0x2f26, 0x2f2e, + 0x2f36, 0x2f3e, 0x2f46, 0x2f4e, 0x2f57, 0x2f63, 0x2f6e, 0x2f76, + /* char values 0x1e6_ */ + 0x2f7e, 0x2f86, 0x2f8e, 0x2f96, 0x2f9f, 0x2fab, 0x2fb7, 0x2fc3, + 0x2fcf, 0x2fdb, 0x2fe6, 0x2fee, 0x2ff6, 0x2ffe, 0x3006, 0x300e, + /* char values 0x1e7_ */ + 0x3016, 0x301e, 0x3026, 0x302e, 0x3036, 0x303e, 0x3046, 0x304e, + 0x3057, 0x3063, 0x306f, 0x307b, 0x3086, 0x308e, 0x3096, 0x309e, + /* char values 0x1e8_ */ + 0x30a6, 0x30ae, 0x30b6, 0x30be, 0x30c6, 0x30ce, 0x30d6, 0x30de, + 0x30e6, 0x30ee, 0x30f6, 0x30fe, 0x3106, 0x310e, 0x3116, 0x311e, + /* char values 0x1e9_ */ + 0x3126, 0x312e, 0x3136, 0x313e, 0x3146, 0x314e, 0x3156, 0x315e, + 0x3166, 0x316e, 0x0000, 0x3176, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x1ea_ */ + 0x317e, 0x3186, 0x318e, 0x3196, 0x319f, 0x31ab, 0x31b7, 0x31c3, + 0x31cf, 0x31db, 0x31e7, 0x31f3, 0x31ff, 0x320b, 0x3217, 0x3223, + /* char values 0x1eb_ */ + 0x322f, 0x323b, 0x3247, 0x3253, 0x325f, 0x326b, 0x3277, 0x3283, + 0x328e, 0x3296, 0x329e, 0x32a6, 0x32ae, 0x32b6, 0x32bf, 0x32cb, + /* char values 0x1ec_ */ + 0x32d7, 0x32e3, 0x32ef, 0x32fb, 0x3307, 0x3313, 0x331f, 0x332b, + 0x3336, 0x333e, 0x3346, 0x334e, 0x3356, 0x335e, 0x3366, 0x336e, + /* char values 0x1ed_ */ + 0x3377, 0x3383, 0x338f, 0x339b, 0x33a7, 0x33b3, 0x33bf, 0x33cb, + 0x33d7, 0x33e3, 0x33ef, 0x33fb, 0x3407, 0x3413, 0x341f, 0x342b, + /* char values 0x1ee_ */ + 0x3437, 0x3443, 0x344f, 0x345b, 0x3466, 0x346e, 0x3476, 0x347e, + 0x3487, 0x3493, 0x349f, 0x34ab, 0x34b7, 0x34c3, 0x34cf, 0x34db, + /* char values 0x1ef_ */ + 0x34e7, 0x34f3, 0x34fe, 0x3506, 0x350e, 0x3516, 0x351e, 0x3526, + 0x352e, 0x3536, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x1f__ */ + 0x05f0, 0x0600, 0x0610, 0x0620, 0x0630, 0x0640, 0x0650, 0x0660, + 0x0670, 0x0680, 0x0690, 0x06a0, 0x06b0, 0x06c0, 0x06d0, 0x06e0, + /* char values 0x1f0_ */ + 0x353e, 0x3546, 0x354f, 0x355b, 0x3567, 0x3573, 0x357f, 0x358b, + 0x3596, 0x359e, 0x35a7, 0x35b3, 0x35bf, 0x35cb, 0x35d7, 0x35e3, + /* char values 0x1f1_ */ + 0x35ee, 0x35f6, 0x35ff, 0x360b, 0x3617, 0x3623, 0x0000, 0x0000, + 0x362e, 0x3636, 0x363f, 0x364b, 0x3657, 0x3663, 0x0000, 0x0000, + /* char values 0x1f2_ */ + 0x366e, 0x3676, 0x367f, 0x368b, 0x3697, 0x36a3, 0x36af, 0x36bb, + 0x36c6, 0x36ce, 0x36d7, 0x36e3, 0x36ef, 0x36fb, 0x3707, 0x3713, + /* char values 0x1f3_ */ + 0x371e, 0x3726, 0x372f, 0x373b, 0x3747, 0x3753, 0x375f, 0x376b, + 0x3776, 0x377e, 0x3787, 0x3793, 0x379f, 0x37ab, 0x37b7, 0x37c3, + /* char values 0x1f4_ */ + 0x37ce, 0x37d6, 0x37df, 0x37eb, 0x37f7, 0x3803, 0x0000, 0x0000, + 0x380e, 0x3816, 0x381f, 0x382b, 0x3837, 0x3843, 0x0000, 0x0000, + /* char values 0x1f5_ */ + 0x384e, 0x3856, 0x385f, 0x386b, 0x3877, 0x3883, 0x388f, 0x389b, + 0x0000, 0x38a6, 0x0000, 0x38af, 0x0000, 0x38bb, 0x0000, 0x38c7, + /* char values 0x1f6_ */ + 0x38d2, 0x38da, 0x38e3, 0x38ef, 0x38fb, 0x3907, 0x3913, 0x391f, + 0x392a, 0x3932, 0x393b, 0x3947, 0x3953, 0x395f, 0x396b, 0x3977, + /* char values 0x1f7_ */ + 0x3982, 0x398a, 0x3992, 0x399a, 0x39a2, 0x39aa, 0x39b2, 0x39ba, + 0x39c2, 0x39ca, 0x39d2, 0x39da, 0x39e2, 0x39ea, 0x0000, 0x0000, + /* char values 0x1f8_ */ + 0x39f3, 0x39ff, 0x3a0c, 0x3a1c, 0x3a2c, 0x3a3c, 0x3a4c, 0x3a5c, + 0x3a6b, 0x3a77, 0x3a84, 0x3a94, 0x3aa4, 0x3ab4, 0x3ac4, 0x3ad4, + /* char values 0x1f9_ */ + 0x3ae3, 0x3aef, 0x3afc, 0x3b0c, 0x3b1c, 0x3b2c, 0x3b3c, 0x3b4c, + 0x3b5b, 0x3b67, 0x3b74, 0x3b84, 0x3b94, 0x3ba4, 0x3bb4, 0x3bc4, + /* char values 0x1fa_ */ + 0x3bd3, 0x3bdf, 0x3bec, 0x3bfc, 0x3c0c, 0x3c1c, 0x3c2c, 0x3c3c, + 0x3c4b, 0x3c57, 0x3c64, 0x3c74, 0x3c84, 0x3c94, 0x3ca4, 0x3cb4, + /* char values 0x1fb_ */ + 0x3cc2, 0x3cca, 0x3cd3, 0x3cde, 0x3ce7, 0x0000, 0x3cf2, 0x3cfb, + 0x3d06, 0x3d0e, 0x3d16, 0x3d1e, 0x3d26, 0x0000, 0x3d2d, 0x0000, + /* char values 0x1fc_ */ + 0x0000, 0x3d32, 0x3d3b, 0x3d46, 0x3d4f, 0x0000, 0x3d5a, 0x3d63, + 0x3d6e, 0x3d76, 0x3d7e, 0x3d86, 0x3d8e, 0x3d96, 0x3d9e, 0x3da6, + /* char values 0x1fd_ */ + 0x3dae, 0x3db6, 0x3dbf, 0x3dcb, 0x0000, 0x0000, 0x3dd6, 0x3ddf, + 0x3dea, 0x3df2, 0x3dfa, 0x3e02, 0x0000, 0x3e0a, 0x3e12, 0x3e1a, + /* char values 0x1fe_ */ + 0x3e22, 0x3e2a, 0x3e33, 0x3e3f, 0x3e4a, 0x3e52, 0x3e5a, 0x3e63, + 0x3e6e, 0x3e76, 0x3e7e, 0x3e86, 0x3e8e, 0x3e96, 0x3e9e, 0x3ea5, + /* char values 0x1ff_ */ + 0x0000, 0x0000, 0x3eab, 0x3eb6, 0x3ebf, 0x0000, 0x3eca, 0x3ed3, + 0x3ede, 0x3ee6, 0x3eee, 0x3ef6, 0x3efe, 0x3f05, 0x0000, 0x0000, + /* char table 0x3___ */ + 0x0700, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0x30__ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0710, 0x0720, 0x0730, 0x0740, + 0x0000, 0x0750, 0x0760, 0x0770, 0x0780, 0x0790, 0x0000, 0x07a0, + /* char values 0x304_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x3f0a, 0x0000, 0x3f12, 0x0000, + /* char values 0x305_ */ + 0x3f1a, 0x0000, 0x3f22, 0x0000, 0x3f2a, 0x0000, 0x3f32, 0x0000, + 0x3f3a, 0x0000, 0x3f42, 0x0000, 0x3f4a, 0x0000, 0x3f52, 0x0000, + /* char values 0x306_ */ + 0x3f5a, 0x0000, 0x3f62, 0x0000, 0x0000, 0x3f6a, 0x0000, 0x3f72, + 0x0000, 0x3f7a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x307_ */ + 0x3f82, 0x3f8a, 0x0000, 0x3f92, 0x3f9a, 0x0000, 0x3fa2, 0x3faa, + 0x0000, 0x3fb2, 0x3fba, 0x0000, 0x3fc2, 0x3fca, 0x0000, 0x0000, + /* char values 0x309_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x3fd2, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3fda, 0x0000, + /* char values 0x30a_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x3fe2, 0x0000, 0x3fea, 0x0000, + /* char values 0x30b_ */ + 0x3ff2, 0x0000, 0x3ffa, 0x0000, 0x4002, 0x0000, 0x400a, 0x0000, + 0x4012, 0x0000, 0x401a, 0x0000, 0x4022, 0x0000, 0x402a, 0x0000, + /* char values 0x30c_ */ + 0x4032, 0x0000, 0x403a, 0x0000, 0x0000, 0x4042, 0x0000, 0x404a, + 0x0000, 0x4052, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0x30d_ */ + 0x405a, 0x4062, 0x0000, 0x406a, 0x4072, 0x0000, 0x407a, 0x4082, + 0x0000, 0x408a, 0x4092, 0x0000, 0x409a, 0x40a2, 0x0000, 0x0000, + /* char values 0x30f_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x40aa, 0x0000, 0x0000, 0x40b2, + 0x40ba, 0x40c2, 0x40ca, 0x0000, 0x0000, 0x0000, 0x40d2, 0x0000, + /* char table 0xf___ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x07c0, 0x0000, 0x0000, 0x0000, 0x0000, + /* char table 0xfb__ */ + 0x0000, 0x07d0, 0x07e0, 0x07f0, 0x0800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* char values 0xfb1_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x40da, + /* char values 0xfb2_ */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x40e2, 0x40ea, 0x40f3, 0x40ff, 0x410a, 0x4112, + /* char values 0xfb3_ */ + 0x411a, 0x4122, 0x412a, 0x4132, 0x413a, 0x4142, 0x414a, 0x0000, + 0x4152, 0x415a, 0x4162, 0x416a, 0x4172, 0x0000, 0x417a, 0x0000, + /* char values 0xfb4_ */ + 0x4182, 0x418a, 0x0000, 0x4192, 0x419a, 0x0000, 0x41a2, 0x41aa, + 0x41b2, 0x41ba, 0x41c2, 0x41ca, 0x41d2, 0x41da, 0x41e2, 0x0000, + /* decomposed characters */ + 0x0041, 0x0300, 0x0041, 0x0301, 0x0041, 0x0302, 0x0041, 0x0303, + 0x0041, 0x0308, 0x0041, 0x030a, 0x0043, 0x0327, 0x0045, 0x0300, + 0x0045, 0x0301, 0x0045, 0x0302, 0x0045, 0x0308, 0x0049, 0x0300, + 0x0049, 0x0301, 0x0049, 0x0302, 0x0049, 0x0308, 0x004e, 0x0303, + 0x004f, 0x0300, 0x004f, 0x0301, 0x004f, 0x0302, 0x004f, 0x0303, + 0x004f, 0x0308, 0x0055, 0x0300, 0x0055, 0x0301, 0x0055, 0x0302, + 0x0055, 0x0308, 0x0059, 0x0301, 0x0061, 0x0300, 0x0061, 0x0301, + 0x0061, 0x0302, 0x0061, 0x0303, 0x0061, 0x0308, 0x0061, 0x030a, + 0x0063, 0x0327, 0x0065, 0x0300, 0x0065, 0x0301, 0x0065, 0x0302, + 0x0065, 0x0308, 0x0069, 0x0300, 0x0069, 0x0301, 0x0069, 0x0302, + 0x0069, 0x0308, 0x006e, 0x0303, 0x006f, 0x0300, 0x006f, 0x0301, + 0x006f, 0x0302, 0x006f, 0x0303, 0x006f, 0x0308, 0x0075, 0x0300, + 0x0075, 0x0301, 0x0075, 0x0302, 0x0075, 0x0308, 0x0079, 0x0301, + 0x0079, 0x0308, 0x0041, 0x0304, 0x0061, 0x0304, 0x0041, 0x0306, + 0x0061, 0x0306, 0x0041, 0x0328, 0x0061, 0x0328, 0x0043, 0x0301, + 0x0063, 0x0301, 0x0043, 0x0302, 0x0063, 0x0302, 0x0043, 0x0307, + 0x0063, 0x0307, 0x0043, 0x030c, 0x0063, 0x030c, 0x0044, 0x030c, + 0x0064, 0x030c, 0x0045, 0x0304, 0x0065, 0x0304, 0x0045, 0x0306, + 0x0065, 0x0306, 0x0045, 0x0307, 0x0065, 0x0307, 0x0045, 0x0328, + 0x0065, 0x0328, 0x0045, 0x030c, 0x0065, 0x030c, 0x0047, 0x0302, + 0x0067, 0x0302, 0x0047, 0x0306, 0x0067, 0x0306, 0x0047, 0x0307, + 0x0067, 0x0307, 0x0047, 0x0327, 0x0067, 0x0327, 0x0048, 0x0302, + 0x0068, 0x0302, 0x0049, 0x0303, 0x0069, 0x0303, 0x0049, 0x0304, + 0x0069, 0x0304, 0x0049, 0x0306, 0x0069, 0x0306, 0x0049, 0x0328, + 0x0069, 0x0328, 0x0049, 0x0307, 0x004a, 0x0302, 0x006a, 0x0302, + 0x004b, 0x0327, 0x006b, 0x0327, 0x004c, 0x0301, 0x006c, 0x0301, + 0x004c, 0x0327, 0x006c, 0x0327, 0x004c, 0x030c, 0x006c, 0x030c, + 0x004e, 0x0301, 0x006e, 0x0301, 0x004e, 0x0327, 0x006e, 0x0327, + 0x004e, 0x030c, 0x006e, 0x030c, 0x004f, 0x0304, 0x006f, 0x0304, + 0x004f, 0x0306, 0x006f, 0x0306, 0x004f, 0x030b, 0x006f, 0x030b, + 0x0052, 0x0301, 0x0072, 0x0301, 0x0052, 0x0327, 0x0072, 0x0327, + 0x0052, 0x030c, 0x0072, 0x030c, 0x0053, 0x0301, 0x0073, 0x0301, + 0x0053, 0x0302, 0x0073, 0x0302, 0x0053, 0x0327, 0x0073, 0x0327, + 0x0053, 0x030c, 0x0073, 0x030c, 0x0054, 0x0327, 0x0074, 0x0327, + 0x0054, 0x030c, 0x0074, 0x030c, 0x0055, 0x0303, 0x0075, 0x0303, + 0x0055, 0x0304, 0x0075, 0x0304, 0x0055, 0x0306, 0x0075, 0x0306, + 0x0055, 0x030a, 0x0075, 0x030a, 0x0055, 0x030b, 0x0075, 0x030b, + 0x0055, 0x0328, 0x0075, 0x0328, 0x0057, 0x0302, 0x0077, 0x0302, + 0x0059, 0x0302, 0x0079, 0x0302, 0x0059, 0x0308, 0x005a, 0x0301, + 0x007a, 0x0301, 0x005a, 0x0307, 0x007a, 0x0307, 0x005a, 0x030c, + 0x007a, 0x030c, 0x004f, 0x031b, 0x006f, 0x031b, 0x0055, 0x031b, + 0x0075, 0x031b, 0x0041, 0x030c, 0x0061, 0x030c, 0x0049, 0x030c, + 0x0069, 0x030c, 0x004f, 0x030c, 0x006f, 0x030c, 0x0055, 0x030c, + 0x0075, 0x030c, 0x0055, 0x0308, 0x0304, 0x0075, 0x0308, 0x0304, + 0x0055, 0x0308, 0x0301, 0x0075, 0x0308, 0x0301, 0x0055, 0x0308, + 0x030c, 0x0075, 0x0308, 0x030c, 0x0055, 0x0308, 0x0300, 0x0075, + 0x0308, 0x0300, 0x0041, 0x0308, 0x0304, 0x0061, 0x0308, 0x0304, + 0x0041, 0x0307, 0x0304, 0x0061, 0x0307, 0x0304, 0x00c6, 0x0304, + 0x00e6, 0x0304, 0x0047, 0x030c, 0x0067, 0x030c, 0x004b, 0x030c, + 0x006b, 0x030c, 0x004f, 0x0328, 0x006f, 0x0328, 0x004f, 0x0328, + 0x0304, 0x006f, 0x0328, 0x0304, 0x01b7, 0x030c, 0x0292, 0x030c, + 0x006a, 0x030c, 0x0047, 0x0301, 0x0067, 0x0301, 0x0041, 0x030a, + 0x0301, 0x0061, 0x030a, 0x0301, 0x00c6, 0x0301, 0x00e6, 0x0301, + 0x00d8, 0x0301, 0x00f8, 0x0301, 0x0041, 0x030f, 0x0061, 0x030f, + 0x0041, 0x0311, 0x0061, 0x0311, 0x0045, 0x030f, 0x0065, 0x030f, + 0x0045, 0x0311, 0x0065, 0x0311, 0x0049, 0x030f, 0x0069, 0x030f, + 0x0049, 0x0311, 0x0069, 0x0311, 0x004f, 0x030f, 0x006f, 0x030f, + 0x004f, 0x0311, 0x006f, 0x0311, 0x0052, 0x030f, 0x0072, 0x030f, + 0x0052, 0x0311, 0x0072, 0x0311, 0x0055, 0x030f, 0x0075, 0x030f, + 0x0055, 0x0311, 0x0075, 0x0311, 0x0306, 0x0307, 0x0300, 0x0301, + 0x0313, 0x0308, 0x030d, 0x02b9, 0x003b, 0x00a8, 0x030d, 0x0391, + 0x030d, 0x00b7, 0x0395, 0x030d, 0x0397, 0x030d, 0x0399, 0x030d, + 0x039f, 0x030d, 0x03a5, 0x030d, 0x03a9, 0x030d, 0x03b9, 0x0308, + 0x030d, 0x0399, 0x0308, 0x03a5, 0x0308, 0x03b1, 0x030d, 0x03b5, + 0x030d, 0x03b7, 0x030d, 0x03b9, 0x030d, 0x03c5, 0x0308, 0x030d, + 0x03b9, 0x0308, 0x03c5, 0x0308, 0x03bf, 0x030d, 0x03c5, 0x030d, + 0x03c9, 0x030d, 0x03d2, 0x030d, 0x03d2, 0x0308, 0x0415, 0x0308, + 0x0413, 0x0301, 0x0406, 0x0308, 0x041a, 0x0301, 0x0423, 0x0306, + 0x0418, 0x0306, 0x0438, 0x0306, 0x0435, 0x0308, 0x0433, 0x0301, + 0x0456, 0x0308, 0x043a, 0x0301, 0x0443, 0x0306, 0x0474, 0x030f, + 0x0475, 0x030f, 0x0416, 0x0306, 0x0436, 0x0306, 0x0410, 0x0306, + 0x0430, 0x0306, 0x0410, 0x0308, 0x0430, 0x0308, 0x00c6, 0x00e6, + 0x0415, 0x0306, 0x0435, 0x0306, 0x018f, 0x0259, 0x018f, 0x0308, + 0x0259, 0x0308, 0x0416, 0x0308, 0x0436, 0x0308, 0x0417, 0x0308, + 0x0437, 0x0308, 0x01b7, 0x0292, 0x0418, 0x0304, 0x0438, 0x0304, + 0x0418, 0x0308, 0x0438, 0x0308, 0x041e, 0x0308, 0x043e, 0x0308, + 0x019f, 0x0275, 0x019f, 0x0308, 0x0275, 0x0308, 0x0423, 0x0304, + 0x0443, 0x0304, 0x0423, 0x0308, 0x0443, 0x0308, 0x0423, 0x030b, + 0x0443, 0x030b, 0x0427, 0x0308, 0x0447, 0x0308, 0x042b, 0x0308, + 0x044b, 0x0308, 0x0928, 0x093c, 0x0930, 0x093c, 0x0933, 0x093c, + 0x0915, 0x093c, 0x0916, 0x093c, 0x0917, 0x093c, 0x091c, 0x093c, + 0x0921, 0x093c, 0x0922, 0x093c, 0x092b, 0x093c, 0x092f, 0x093c, + 0x09ac, 0x09bc, 0x09c7, 0x09be, 0x09c7, 0x09d7, 0x09a1, 0x09bc, + 0x09a2, 0x09bc, 0x09af, 0x09bc, 0x0a16, 0x0a3c, 0x0a17, 0x0a3c, + 0x0a1c, 0x0a3c, 0x0a21, 0x0a3c, 0x0a2b, 0x0a3c, 0x0b47, 0x0b56, + 0x0b47, 0x0b3e, 0x0b47, 0x0b57, 0x0b21, 0x0b3c, 0x0b22, 0x0b3c, + 0x0b2f, 0x0b3c, 0x0b92, 0x0bd7, 0x0bc6, 0x0bbe, 0x0bc7, 0x0bbe, + 0x0bc6, 0x0bd7, 0x0c46, 0x0c56, 0x0cbf, 0x0cd5, 0x0cc6, 0x0cd5, + 0x0cc6, 0x0cd6, 0x0cc6, 0x0cc2, 0x0cc6, 0x0cc2, 0x0cd5, 0x0d46, + 0x0d3e, 0x0d47, 0x0d3e, 0x0d46, 0x0d57, 0x0e4d, 0x0e32, 0x0ecd, + 0x0eb2, 0x0f42, 0x0fb7, 0x0f4c, 0x0fb7, 0x0f51, 0x0fb7, 0x0f56, + 0x0fb7, 0x0f5b, 0x0fb7, 0x0f40, 0x0fb5, 0x0f72, 0x0f71, 0x0f74, + 0x0f71, 0x0fb2, 0x0f80, 0x0fb2, 0x0f80, 0x0f71, 0x0fb3, 0x0f80, + 0x0fb3, 0x0f80, 0x0f71, 0x0f80, 0x0f71, 0x0f92, 0x0fb7, 0x0f9c, + 0x0fb7, 0x0fa1, 0x0fb7, 0x0fa6, 0x0fb7, 0x0fab, 0x0fb7, 0x0f90, + 0x0fb5, 0x0041, 0x0325, 0x0061, 0x0325, 0x0042, 0x0307, 0x0062, + 0x0307, 0x0042, 0x0323, 0x0062, 0x0323, 0x0042, 0x0331, 0x0062, + 0x0331, 0x0043, 0x0327, 0x0301, 0x0063, 0x0327, 0x0301, 0x0044, + 0x0307, 0x0064, 0x0307, 0x0044, 0x0323, 0x0064, 0x0323, 0x0044, + 0x0331, 0x0064, 0x0331, 0x0044, 0x0327, 0x0064, 0x0327, 0x0044, + 0x032d, 0x0064, 0x032d, 0x0045, 0x0304, 0x0300, 0x0065, 0x0304, + 0x0300, 0x0045, 0x0304, 0x0301, 0x0065, 0x0304, 0x0301, 0x0045, + 0x032d, 0x0065, 0x032d, 0x0045, 0x0330, 0x0065, 0x0330, 0x0045, + 0x0327, 0x0306, 0x0065, 0x0327, 0x0306, 0x0046, 0x0307, 0x0066, + 0x0307, 0x0047, 0x0304, 0x0067, 0x0304, 0x0048, 0x0307, 0x0068, + 0x0307, 0x0048, 0x0323, 0x0068, 0x0323, 0x0048, 0x0308, 0x0068, + 0x0308, 0x0048, 0x0327, 0x0068, 0x0327, 0x0048, 0x032e, 0x0068, + 0x032e, 0x0049, 0x0330, 0x0069, 0x0330, 0x0049, 0x0308, 0x0301, + 0x0069, 0x0308, 0x0301, 0x004b, 0x0301, 0x006b, 0x0301, 0x004b, + 0x0323, 0x006b, 0x0323, 0x004b, 0x0331, 0x006b, 0x0331, 0x004c, + 0x0323, 0x006c, 0x0323, 0x004c, 0x0323, 0x0304, 0x006c, 0x0323, + 0x0304, 0x004c, 0x0331, 0x006c, 0x0331, 0x004c, 0x032d, 0x006c, + 0x032d, 0x004d, 0x0301, 0x006d, 0x0301, 0x004d, 0x0307, 0x006d, + 0x0307, 0x004d, 0x0323, 0x006d, 0x0323, 0x004e, 0x0307, 0x006e, + 0x0307, 0x004e, 0x0323, 0x006e, 0x0323, 0x004e, 0x0331, 0x006e, + 0x0331, 0x004e, 0x032d, 0x006e, 0x032d, 0x004f, 0x0303, 0x0301, + 0x006f, 0x0303, 0x0301, 0x004f, 0x0303, 0x0308, 0x006f, 0x0303, + 0x0308, 0x004f, 0x0304, 0x0300, 0x006f, 0x0304, 0x0300, 0x004f, + 0x0304, 0x0301, 0x006f, 0x0304, 0x0301, 0x0050, 0x0301, 0x0070, + 0x0301, 0x0050, 0x0307, 0x0070, 0x0307, 0x0052, 0x0307, 0x0072, + 0x0307, 0x0052, 0x0323, 0x0072, 0x0323, 0x0052, 0x0323, 0x0304, + 0x0072, 0x0323, 0x0304, 0x0052, 0x0331, 0x0072, 0x0331, 0x0053, + 0x0307, 0x0073, 0x0307, 0x0053, 0x0323, 0x0073, 0x0323, 0x0053, + 0x0301, 0x0307, 0x0073, 0x0301, 0x0307, 0x0053, 0x030c, 0x0307, + 0x0073, 0x030c, 0x0307, 0x0053, 0x0323, 0x0307, 0x0073, 0x0323, + 0x0307, 0x0054, 0x0307, 0x0074, 0x0307, 0x0054, 0x0323, 0x0074, + 0x0323, 0x0054, 0x0331, 0x0074, 0x0331, 0x0054, 0x032d, 0x0074, + 0x032d, 0x0055, 0x0324, 0x0075, 0x0324, 0x0055, 0x0330, 0x0075, + 0x0330, 0x0055, 0x032d, 0x0075, 0x032d, 0x0055, 0x0303, 0x0301, + 0x0075, 0x0303, 0x0301, 0x0055, 0x0304, 0x0308, 0x0075, 0x0304, + 0x0308, 0x0056, 0x0303, 0x0076, 0x0303, 0x0056, 0x0323, 0x0076, + 0x0323, 0x0057, 0x0300, 0x0077, 0x0300, 0x0057, 0x0301, 0x0077, + 0x0301, 0x0057, 0x0308, 0x0077, 0x0308, 0x0057, 0x0307, 0x0077, + 0x0307, 0x0057, 0x0323, 0x0077, 0x0323, 0x0058, 0x0307, 0x0078, + 0x0307, 0x0058, 0x0308, 0x0078, 0x0308, 0x0059, 0x0307, 0x0079, + 0x0307, 0x005a, 0x0302, 0x007a, 0x0302, 0x005a, 0x0323, 0x007a, + 0x0323, 0x005a, 0x0331, 0x007a, 0x0331, 0x0068, 0x0331, 0x0074, + 0x0308, 0x0077, 0x030a, 0x0079, 0x030a, 0x017f, 0x0307, 0x0041, + 0x0323, 0x0061, 0x0323, 0x0041, 0x0309, 0x0061, 0x0309, 0x0041, + 0x0302, 0x0301, 0x0061, 0x0302, 0x0301, 0x0041, 0x0302, 0x0300, + 0x0061, 0x0302, 0x0300, 0x0041, 0x0302, 0x0309, 0x0061, 0x0302, + 0x0309, 0x0041, 0x0302, 0x0303, 0x0061, 0x0302, 0x0303, 0x0041, + 0x0323, 0x0302, 0x0061, 0x0323, 0x0302, 0x0041, 0x0306, 0x0301, + 0x0061, 0x0306, 0x0301, 0x0041, 0x0306, 0x0300, 0x0061, 0x0306, + 0x0300, 0x0041, 0x0306, 0x0309, 0x0061, 0x0306, 0x0309, 0x0041, + 0x0306, 0x0303, 0x0061, 0x0306, 0x0303, 0x0041, 0x0323, 0x0306, + 0x0061, 0x0323, 0x0306, 0x0045, 0x0323, 0x0065, 0x0323, 0x0045, + 0x0309, 0x0065, 0x0309, 0x0045, 0x0303, 0x0065, 0x0303, 0x0045, + 0x0302, 0x0301, 0x0065, 0x0302, 0x0301, 0x0045, 0x0302, 0x0300, + 0x0065, 0x0302, 0x0300, 0x0045, 0x0302, 0x0309, 0x0065, 0x0302, + 0x0309, 0x0045, 0x0302, 0x0303, 0x0065, 0x0302, 0x0303, 0x0045, + 0x0323, 0x0302, 0x0065, 0x0323, 0x0302, 0x0049, 0x0309, 0x0069, + 0x0309, 0x0049, 0x0323, 0x0069, 0x0323, 0x004f, 0x0323, 0x006f, + 0x0323, 0x004f, 0x0309, 0x006f, 0x0309, 0x004f, 0x0302, 0x0301, + 0x006f, 0x0302, 0x0301, 0x004f, 0x0302, 0x0300, 0x006f, 0x0302, + 0x0300, 0x004f, 0x0302, 0x0309, 0x006f, 0x0302, 0x0309, 0x004f, + 0x0302, 0x0303, 0x006f, 0x0302, 0x0303, 0x004f, 0x0323, 0x0302, + 0x006f, 0x0323, 0x0302, 0x004f, 0x031b, 0x0301, 0x006f, 0x031b, + 0x0301, 0x004f, 0x031b, 0x0300, 0x006f, 0x031b, 0x0300, 0x004f, + 0x031b, 0x0309, 0x006f, 0x031b, 0x0309, 0x004f, 0x031b, 0x0303, + 0x006f, 0x031b, 0x0303, 0x004f, 0x031b, 0x0323, 0x006f, 0x031b, + 0x0323, 0x0055, 0x0323, 0x0075, 0x0323, 0x0055, 0x0309, 0x0075, + 0x0309, 0x0055, 0x031b, 0x0301, 0x0075, 0x031b, 0x0301, 0x0055, + 0x031b, 0x0300, 0x0075, 0x031b, 0x0300, 0x0055, 0x031b, 0x0309, + 0x0075, 0x031b, 0x0309, 0x0055, 0x031b, 0x0303, 0x0075, 0x031b, + 0x0303, 0x0055, 0x031b, 0x0323, 0x0075, 0x031b, 0x0323, 0x0059, + 0x0300, 0x0079, 0x0300, 0x0059, 0x0323, 0x0079, 0x0323, 0x0059, + 0x0309, 0x0079, 0x0309, 0x0059, 0x0303, 0x0079, 0x0303, 0x03b1, + 0x0313, 0x03b1, 0x0314, 0x03b1, 0x0313, 0x0300, 0x03b1, 0x0314, + 0x0300, 0x03b1, 0x0313, 0x0301, 0x03b1, 0x0314, 0x0301, 0x03b1, + 0x0313, 0x0342, 0x03b1, 0x0314, 0x0342, 0x0391, 0x0313, 0x0391, + 0x0314, 0x0391, 0x0313, 0x0300, 0x0391, 0x0314, 0x0300, 0x0391, + 0x0313, 0x0301, 0x0391, 0x0314, 0x0301, 0x0391, 0x0313, 0x0342, + 0x0391, 0x0314, 0x0342, 0x03b5, 0x0313, 0x03b5, 0x0314, 0x03b5, + 0x0313, 0x0300, 0x03b5, 0x0314, 0x0300, 0x03b5, 0x0313, 0x0301, + 0x03b5, 0x0314, 0x0301, 0x0395, 0x0313, 0x0395, 0x0314, 0x0395, + 0x0313, 0x0300, 0x0395, 0x0314, 0x0300, 0x0395, 0x0313, 0x0301, + 0x0395, 0x0314, 0x0301, 0x03b7, 0x0313, 0x03b7, 0x0314, 0x03b7, + 0x0313, 0x0300, 0x03b7, 0x0314, 0x0300, 0x03b7, 0x0313, 0x0301, + 0x03b7, 0x0314, 0x0301, 0x03b7, 0x0313, 0x0342, 0x03b7, 0x0314, + 0x0342, 0x0397, 0x0313, 0x0397, 0x0314, 0x0397, 0x0313, 0x0300, + 0x0397, 0x0314, 0x0300, 0x0397, 0x0313, 0x0301, 0x0397, 0x0314, + 0x0301, 0x0397, 0x0313, 0x0342, 0x0397, 0x0314, 0x0342, 0x03b9, + 0x0313, 0x03b9, 0x0314, 0x03b9, 0x0313, 0x0300, 0x03b9, 0x0314, + 0x0300, 0x03b9, 0x0313, 0x0301, 0x03b9, 0x0314, 0x0301, 0x03b9, + 0x0313, 0x0342, 0x03b9, 0x0314, 0x0342, 0x0399, 0x0313, 0x0399, + 0x0314, 0x0399, 0x0313, 0x0300, 0x0399, 0x0314, 0x0300, 0x0399, + 0x0313, 0x0301, 0x0399, 0x0314, 0x0301, 0x0399, 0x0313, 0x0342, + 0x0399, 0x0314, 0x0342, 0x03bf, 0x0313, 0x03bf, 0x0314, 0x03bf, + 0x0313, 0x0300, 0x03bf, 0x0314, 0x0300, 0x03bf, 0x0313, 0x0301, + 0x03bf, 0x0314, 0x0301, 0x039f, 0x0313, 0x039f, 0x0314, 0x039f, + 0x0313, 0x0300, 0x039f, 0x0314, 0x0300, 0x039f, 0x0313, 0x0301, + 0x039f, 0x0314, 0x0301, 0x03c5, 0x0313, 0x03c5, 0x0314, 0x03c5, + 0x0313, 0x0300, 0x03c5, 0x0314, 0x0300, 0x03c5, 0x0313, 0x0301, + 0x03c5, 0x0314, 0x0301, 0x03c5, 0x0313, 0x0342, 0x03c5, 0x0314, + 0x0342, 0x03a5, 0x0314, 0x03a5, 0x0314, 0x0300, 0x03a5, 0x0314, + 0x0301, 0x03a5, 0x0314, 0x0342, 0x03c9, 0x0313, 0x03c9, 0x0314, + 0x03c9, 0x0313, 0x0300, 0x03c9, 0x0314, 0x0300, 0x03c9, 0x0313, + 0x0301, 0x03c9, 0x0314, 0x0301, 0x03c9, 0x0313, 0x0342, 0x03c9, + 0x0314, 0x0342, 0x03a9, 0x0313, 0x03a9, 0x0314, 0x03a9, 0x0313, + 0x0300, 0x03a9, 0x0314, 0x0300, 0x03a9, 0x0313, 0x0301, 0x03a9, + 0x0314, 0x0301, 0x03a9, 0x0313, 0x0342, 0x03a9, 0x0314, 0x0342, + 0x03b1, 0x0300, 0x03b1, 0x0301, 0x03b5, 0x0300, 0x03b5, 0x0301, + 0x03b7, 0x0300, 0x03b7, 0x0301, 0x03b9, 0x0300, 0x03b9, 0x0301, + 0x03bf, 0x0300, 0x03bf, 0x0301, 0x03c5, 0x0300, 0x03c5, 0x0301, + 0x03c9, 0x0300, 0x03c9, 0x0301, 0x03b1, 0x0345, 0x0313, 0x03b1, + 0x0345, 0x0314, 0x03b1, 0x0345, 0x0313, 0x0300, 0x03b1, 0x0345, + 0x0314, 0x0300, 0x03b1, 0x0345, 0x0313, 0x0301, 0x03b1, 0x0345, + 0x0314, 0x0301, 0x03b1, 0x0345, 0x0313, 0x0342, 0x03b1, 0x0345, + 0x0314, 0x0342, 0x0391, 0x0345, 0x0313, 0x0391, 0x0345, 0x0314, + 0x0391, 0x0345, 0x0313, 0x0300, 0x0391, 0x0345, 0x0314, 0x0300, + 0x0391, 0x0345, 0x0313, 0x0301, 0x0391, 0x0345, 0x0314, 0x0301, + 0x0391, 0x0345, 0x0313, 0x0342, 0x0391, 0x0345, 0x0314, 0x0342, + 0x03b7, 0x0345, 0x0313, 0x03b7, 0x0345, 0x0314, 0x03b7, 0x0345, + 0x0313, 0x0300, 0x03b7, 0x0345, 0x0314, 0x0300, 0x03b7, 0x0345, + 0x0313, 0x0301, 0x03b7, 0x0345, 0x0314, 0x0301, 0x03b7, 0x0345, + 0x0313, 0x0342, 0x03b7, 0x0345, 0x0314, 0x0342, 0x0397, 0x0345, + 0x0313, 0x0397, 0x0345, 0x0314, 0x0397, 0x0345, 0x0313, 0x0300, + 0x0397, 0x0345, 0x0314, 0x0300, 0x0397, 0x0345, 0x0313, 0x0301, + 0x0397, 0x0345, 0x0314, 0x0301, 0x0397, 0x0345, 0x0313, 0x0342, + 0x0397, 0x0345, 0x0314, 0x0342, 0x03c9, 0x0345, 0x0313, 0x03c9, + 0x0345, 0x0314, 0x03c9, 0x0345, 0x0313, 0x0300, 0x03c9, 0x0345, + 0x0314, 0x0300, 0x03c9, 0x0345, 0x0313, 0x0301, 0x03c9, 0x0345, + 0x0314, 0x0301, 0x03c9, 0x0345, 0x0313, 0x0342, 0x03c9, 0x0345, + 0x0314, 0x0342, 0x03a9, 0x0345, 0x0313, 0x03a9, 0x0345, 0x0314, + 0x03a9, 0x0345, 0x0313, 0x0300, 0x03a9, 0x0345, 0x0314, 0x0300, + 0x03a9, 0x0345, 0x0313, 0x0301, 0x03a9, 0x0345, 0x0314, 0x0301, + 0x03a9, 0x0345, 0x0313, 0x0342, 0x03a9, 0x0345, 0x0314, 0x0342, + 0x03b1, 0x0306, 0x03b1, 0x0304, 0x03b1, 0x0345, 0x0300, 0x03b1, + 0x0345, 0x03b1, 0x0345, 0x0301, 0x03b1, 0x0342, 0x03b1, 0x0345, + 0x0342, 0x0391, 0x0306, 0x0391, 0x0304, 0x0391, 0x0300, 0x0391, + 0x0301, 0x0391, 0x0345, 0x03b9, 0x00a8, 0x0342, 0x03b7, 0x0345, + 0x0300, 0x03b7, 0x0345, 0x03b7, 0x0345, 0x0301, 0x03b7, 0x0342, + 0x03b7, 0x0345, 0x0342, 0x0395, 0x0300, 0x0395, 0x0301, 0x0397, + 0x0300, 0x0397, 0x0301, 0x0397, 0x0345, 0x1fbf, 0x0300, 0x1fbf, + 0x0301, 0x1fbf, 0x0342, 0x03b9, 0x0306, 0x03b9, 0x0304, 0x03b9, + 0x0308, 0x0300, 0x03b9, 0x0308, 0x0301, 0x03b9, 0x0342, 0x03b9, + 0x0308, 0x0342, 0x0399, 0x0306, 0x0399, 0x0304, 0x0399, 0x0300, + 0x0399, 0x0301, 0x1ffe, 0x0300, 0x1ffe, 0x0301, 0x1ffe, 0x0342, + 0x03c5, 0x0306, 0x03c5, 0x0304, 0x03c5, 0x0308, 0x0300, 0x03c5, + 0x0308, 0x0301, 0x03c1, 0x0313, 0x03c1, 0x0314, 0x03c5, 0x0342, + 0x03c5, 0x0308, 0x0342, 0x03a5, 0x0306, 0x03a5, 0x0304, 0x03a5, + 0x0300, 0x03a5, 0x0301, 0x03a1, 0x0314, 0x00a8, 0x0300, 0x00a8, + 0x0301, 0x0060, 0x03c9, 0x0345, 0x0300, 0x03c9, 0x0345, 0x03bf, + 0x0345, 0x0301, 0x03c9, 0x0342, 0x03c9, 0x0345, 0x0342, 0x039f, + 0x0300, 0x039f, 0x0301, 0x03a9, 0x0300, 0x03a9, 0x0301, 0x03a9, + 0x0345, 0x00b4, 0x304b, 0x3099, 0x304d, 0x3099, 0x304f, 0x3099, + 0x3051, 0x3099, 0x3053, 0x3099, 0x3055, 0x3099, 0x3057, 0x3099, + 0x3059, 0x3099, 0x305b, 0x3099, 0x305d, 0x3099, 0x305f, 0x3099, + 0x3061, 0x3099, 0x3064, 0x3099, 0x3066, 0x3099, 0x3068, 0x3099, + 0x306f, 0x3099, 0x306f, 0x309a, 0x3072, 0x3099, 0x3072, 0x309a, + 0x3075, 0x3099, 0x3075, 0x309a, 0x3078, 0x3099, 0x3078, 0x309a, + 0x307b, 0x3099, 0x307b, 0x309a, 0x3046, 0x3099, 0x309d, 0x3099, + 0x30ab, 0x3099, 0x30ad, 0x3099, 0x30af, 0x3099, 0x30b1, 0x3099, + 0x30b3, 0x3099, 0x30b5, 0x3099, 0x30b7, 0x3099, 0x30b9, 0x3099, + 0x30bb, 0x3099, 0x30bd, 0x3099, 0x30bf, 0x3099, 0x30c1, 0x3099, + 0x30c4, 0x3099, 0x30c6, 0x3099, 0x30c8, 0x3099, 0x30cf, 0x3099, + 0x30cf, 0x309a, 0x30d2, 0x3099, 0x30d2, 0x309a, 0x30d5, 0x3099, + 0x30d5, 0x309a, 0x30d8, 0x3099, 0x30d8, 0x309a, 0x30db, 0x3099, + 0x30db, 0x309a, 0x30a6, 0x3099, 0x30ef, 0x3099, 0x30f0, 0x3099, + 0x30f1, 0x3099, 0x30f2, 0x3099, 0x30fd, 0x3099, 0x05f2, 0x05b7, + 0x05e9, 0x05c1, 0x05e9, 0x05c2, 0x05e9, 0x05bc, 0x05c1, 0x05e9, + 0x05bc, 0x05c2, 0x05d0, 0x05b7, 0x05d0, 0x05b8, 0x05d0, 0x05bc, + 0x05d1, 0x05bc, 0x05d2, 0x05bc, 0x05d3, 0x05bc, 0x05d4, 0x05bc, + 0x05d5, 0x05bc, 0x05d6, 0x05bc, 0x05d8, 0x05bc, 0x05d9, 0x05bc, + 0x05da, 0x05bc, 0x05db, 0x05bc, 0x05dc, 0x05bc, 0x05de, 0x05bc, + 0x05e0, 0x05bc, 0x05e1, 0x05bc, 0x05e3, 0x05bc, 0x05e4, 0x05bc, + 0x05e6, 0x05bc, 0x05e7, 0x05bc, 0x05e8, 0x05bc, 0x05e9, 0x05bc, + 0x05ea, 0x05bc, 0x05d5, 0x05b9, 0x05d1, 0x05bf, 0x05db, 0x05bf, + 0x05e4, 0x05bf +}; + +u16 hfsplus_compose_table[] = { + /* base */ + 0x0000, 0x0050, 0x0300, 0x00a4, 0x0301, 0x00e4, 0x0302, 0x015c, + 0x0303, 0x0192, 0x0304, 0x01b4, 0x0306, 0x01e6, 0x0307, 0x0220, + 0x0308, 0x0270, 0x0309, 0x02d2, 0x030a, 0x02ec, 0x030b, 0x02fa, + 0x030c, 0x0308, 0x030d, 0x034c, 0x030f, 0x0370, 0x0311, 0x038e, + 0x0313, 0x03a8, 0x0314, 0x03c6, 0x031b, 0x03e8, 0x0323, 0x03f2, + 0x0324, 0x0440, 0x0325, 0x0446, 0x0327, 0x044c, 0x0328, 0x047a, + 0x032d, 0x0490, 0x032e, 0x04aa, 0x0330, 0x04b0, 0x0331, 0x04be, + 0x0342, 0x04e2, 0x0345, 0x04f4, 0x05b7, 0x0504, 0x05b8, 0x050a, + 0x05b9, 0x050e, 0x05bc, 0x0512, 0x05bf, 0x0540, 0x05c1, 0x0548, + 0x05c2, 0x054c, 0x093c, 0x0550, 0x09bc, 0x0568, 0x09be, 0x0572, + 0x09d7, 0x0576, 0x0a3c, 0x057a, 0x0b3c, 0x0586, 0x0b3e, 0x058e, + 0x0b56, 0x0592, 0x0b57, 0x0596, 0x0bbe, 0x059a, 0x0bd7, 0x05a0, + 0x0c56, 0x05a6, 0x0cc2, 0x05aa, 0x0cd5, 0x05ae, 0x0cd6, 0x05b4, + 0x0d3e, 0x05b8, 0x0d57, 0x05be, 0x0e32, 0x05c2, 0x0eb2, 0x05c6, + 0x0f71, 0x05ca, 0x0f80, 0x05d2, 0x0fb5, 0x05d8, 0x0fb7, 0x05de, + 0x1100, 0x00a2, 0x1101, 0x00a2, 0x1102, 0x00a2, 0x1103, 0x00a2, + 0x1104, 0x00a2, 0x1105, 0x00a2, 0x1106, 0x00a2, 0x1107, 0x00a2, + 0x1108, 0x00a2, 0x1109, 0x00a2, 0x110a, 0x00a2, 0x110b, 0x00a2, + 0x110c, 0x00a2, 0x110d, 0x00a2, 0x110e, 0x00a2, 0x110f, 0x00a2, + 0x1110, 0x00a2, 0x1111, 0x00a2, 0x1112, 0x00a2, 0x3099, 0x05f4, + 0x309a, 0x0656, + /* hangul marker */ + 0xffff, 0x0000, + /* 0x0300 */ + 0x0340, 0x001f, 0x0041, 0x066c, 0x0045, 0x066e, 0x0049, 0x0670, + 0x004f, 0x0672, 0x0055, 0x0674, 0x0057, 0x0676, 0x0059, 0x0678, + 0x0061, 0x067a, 0x0065, 0x067c, 0x0069, 0x067e, 0x006f, 0x0680, + 0x0075, 0x0682, 0x0077, 0x0684, 0x0079, 0x0686, 0x00a8, 0x0688, + 0x0391, 0x068a, 0x0395, 0x068c, 0x0397, 0x068e, 0x0399, 0x0690, + 0x039f, 0x0692, 0x03a5, 0x0694, 0x03a9, 0x0696, 0x03b1, 0x0698, + 0x03b5, 0x069a, 0x03b7, 0x069c, 0x03b9, 0x069e, 0x03bf, 0x06a0, + 0x03c5, 0x06a2, 0x03c9, 0x06a4, 0x1fbf, 0x06a6, 0x1ffe, 0x06a8, + /* 0x0301 */ + 0x0341, 0x003b, 0x0041, 0x06aa, 0x0043, 0x06ac, 0x0045, 0x06ae, + 0x0047, 0x06b0, 0x0049, 0x06b2, 0x004b, 0x06b4, 0x004c, 0x06b6, + 0x004d, 0x06b8, 0x004e, 0x06ba, 0x004f, 0x06bc, 0x0050, 0x06be, + 0x0052, 0x06c0, 0x0053, 0x06c2, 0x0055, 0x06c6, 0x0057, 0x06c8, + 0x0059, 0x06ca, 0x005a, 0x06cc, 0x0061, 0x06ce, 0x0063, 0x06d0, + 0x0065, 0x06d2, 0x0067, 0x06d4, 0x0069, 0x06d6, 0x006b, 0x06d8, + 0x006c, 0x06da, 0x006d, 0x06dc, 0x006e, 0x06de, 0x006f, 0x06e0, + 0x0070, 0x06e2, 0x0072, 0x06e4, 0x0073, 0x06e6, 0x0075, 0x06ea, + 0x0077, 0x06ec, 0x0079, 0x06ee, 0x007a, 0x06f0, 0x00a8, 0x06f2, + 0x00c6, 0x06f4, 0x00d8, 0x06f6, 0x00e6, 0x06f8, 0x00f8, 0x06fa, + 0x0391, 0x06fc, 0x0395, 0x06fe, 0x0397, 0x0700, 0x0399, 0x0702, + 0x039f, 0x0704, 0x03a5, 0x0706, 0x03a9, 0x0708, 0x03b1, 0x070a, + 0x03b5, 0x070c, 0x03b7, 0x070e, 0x03b9, 0x0710, 0x03bf, 0x0712, + 0x03c5, 0x0714, 0x03c9, 0x0716, 0x0413, 0x0718, 0x041a, 0x071a, + 0x0433, 0x071c, 0x043a, 0x071e, 0x1fbf, 0x0720, 0x1ffe, 0x0722, + /* 0x0302 */ + 0x0000, 0x001a, 0x0041, 0x0724, 0x0043, 0x072e, 0x0045, 0x0730, + 0x0047, 0x073a, 0x0048, 0x073c, 0x0049, 0x073e, 0x004a, 0x0740, + 0x004f, 0x0742, 0x0053, 0x074c, 0x0055, 0x074e, 0x0057, 0x0750, + 0x0059, 0x0752, 0x005a, 0x0754, 0x0061, 0x0756, 0x0063, 0x0760, + 0x0065, 0x0762, 0x0067, 0x076c, 0x0068, 0x076e, 0x0069, 0x0770, + 0x006a, 0x0772, 0x006f, 0x0774, 0x0073, 0x077e, 0x0075, 0x0780, + 0x0077, 0x0782, 0x0079, 0x0784, 0x007a, 0x0786, + /* 0x0303 */ + 0x0000, 0x0010, 0x0041, 0x0788, 0x0045, 0x078a, 0x0049, 0x078c, + 0x004e, 0x078e, 0x004f, 0x0790, 0x0055, 0x0796, 0x0056, 0x079a, + 0x0059, 0x079c, 0x0061, 0x079e, 0x0065, 0x07a0, 0x0069, 0x07a2, + 0x006e, 0x07a4, 0x006f, 0x07a6, 0x0075, 0x07ac, 0x0076, 0x07b0, + 0x0079, 0x07b2, + /* 0x0304 */ + 0x0000, 0x0018, 0x0041, 0x07b4, 0x0045, 0x07b6, 0x0047, 0x07bc, + 0x0049, 0x07be, 0x004f, 0x07c0, 0x0055, 0x07c6, 0x0061, 0x07ca, + 0x0065, 0x07cc, 0x0067, 0x07d2, 0x0069, 0x07d4, 0x006f, 0x07d6, + 0x0075, 0x07dc, 0x00c6, 0x07e0, 0x00e6, 0x07e2, 0x0391, 0x07e4, + 0x0399, 0x07e6, 0x03a5, 0x07e8, 0x03b1, 0x07ea, 0x03b9, 0x07ec, + 0x03c5, 0x07ee, 0x0418, 0x07f0, 0x0423, 0x07f2, 0x0438, 0x07f4, + 0x0443, 0x07f6, + /* 0x0306 */ + 0x0000, 0x001c, 0x0041, 0x07f8, 0x0045, 0x0802, 0x0047, 0x0804, + 0x0049, 0x0806, 0x004f, 0x0808, 0x0055, 0x080a, 0x0061, 0x080c, + 0x0065, 0x0816, 0x0067, 0x0818, 0x0069, 0x081a, 0x006f, 0x081c, + 0x0075, 0x081e, 0x0391, 0x0820, 0x0399, 0x0822, 0x03a5, 0x0824, + 0x03b1, 0x0826, 0x03b9, 0x0828, 0x03c5, 0x082a, 0x0410, 0x082c, + 0x0415, 0x082e, 0x0416, 0x0830, 0x0418, 0x0832, 0x0423, 0x0834, + 0x0430, 0x0836, 0x0435, 0x0838, 0x0436, 0x083a, 0x0438, 0x083c, + 0x0443, 0x083e, + /* 0x0307 */ + 0x0000, 0x0027, 0x0041, 0x0840, 0x0042, 0x0844, 0x0043, 0x0846, + 0x0044, 0x0848, 0x0045, 0x084a, 0x0046, 0x084c, 0x0047, 0x084e, + 0x0048, 0x0850, 0x0049, 0x0852, 0x004d, 0x0854, 0x004e, 0x0856, + 0x0050, 0x0858, 0x0052, 0x085a, 0x0053, 0x085c, 0x0054, 0x085e, + 0x0057, 0x0860, 0x0058, 0x0862, 0x0059, 0x0864, 0x005a, 0x0866, + 0x0061, 0x0868, 0x0062, 0x086c, 0x0063, 0x086e, 0x0064, 0x0870, + 0x0065, 0x0872, 0x0066, 0x0874, 0x0067, 0x0876, 0x0068, 0x0878, + 0x006d, 0x087a, 0x006e, 0x087c, 0x0070, 0x087e, 0x0072, 0x0880, + 0x0073, 0x0882, 0x0074, 0x0884, 0x0077, 0x0886, 0x0078, 0x0888, + 0x0079, 0x088a, 0x007a, 0x088c, 0x017f, 0x088e, 0x0306, 0x0890, + /* 0x0308 */ + 0x0000, 0x0030, 0x0041, 0x0892, 0x0045, 0x0896, 0x0048, 0x0898, + 0x0049, 0x089a, 0x004f, 0x089e, 0x0055, 0x08a0, 0x0057, 0x08aa, + 0x0058, 0x08ac, 0x0059, 0x08ae, 0x0061, 0x08b0, 0x0065, 0x08b4, + 0x0068, 0x08b6, 0x0069, 0x08b8, 0x006f, 0x08bc, 0x0074, 0x08be, + 0x0075, 0x08c0, 0x0077, 0x08ca, 0x0078, 0x08cc, 0x0079, 0x08ce, + 0x018f, 0x08d0, 0x019f, 0x08d2, 0x0259, 0x08d4, 0x0275, 0x08d6, + 0x0399, 0x08d8, 0x03a5, 0x08da, 0x03b9, 0x08dc, 0x03c5, 0x08e6, + 0x03d2, 0x08f0, 0x0406, 0x08f2, 0x0410, 0x08f4, 0x0415, 0x08f6, + 0x0416, 0x08f8, 0x0417, 0x08fa, 0x0418, 0x08fc, 0x041e, 0x08fe, + 0x0423, 0x0900, 0x0427, 0x0902, 0x042b, 0x0904, 0x0430, 0x0906, + 0x0435, 0x0908, 0x0436, 0x090a, 0x0437, 0x090c, 0x0438, 0x090e, + 0x043e, 0x0910, 0x0443, 0x0912, 0x0447, 0x0914, 0x044b, 0x0916, + 0x0456, 0x0918, + /* 0x0309 */ + 0x0000, 0x000c, 0x0041, 0x091a, 0x0045, 0x091c, 0x0049, 0x091e, + 0x004f, 0x0920, 0x0055, 0x0922, 0x0059, 0x0924, 0x0061, 0x0926, + 0x0065, 0x0928, 0x0069, 0x092a, 0x006f, 0x092c, 0x0075, 0x092e, + 0x0079, 0x0930, + /* 0x030a */ + 0x0000, 0x0006, 0x0041, 0x0932, 0x0055, 0x0936, 0x0061, 0x0938, + 0x0075, 0x093c, 0x0077, 0x093e, 0x0079, 0x0940, + /* 0x030b */ + 0x0000, 0x0006, 0x004f, 0x0942, 0x0055, 0x0944, 0x006f, 0x0946, + 0x0075, 0x0948, 0x0423, 0x094a, 0x0443, 0x094c, + /* 0x030c */ + 0x0000, 0x0021, 0x0041, 0x094e, 0x0043, 0x0950, 0x0044, 0x0952, + 0x0045, 0x0954, 0x0047, 0x0956, 0x0049, 0x0958, 0x004b, 0x095a, + 0x004c, 0x095c, 0x004e, 0x095e, 0x004f, 0x0960, 0x0052, 0x0962, + 0x0053, 0x0964, 0x0054, 0x0968, 0x0055, 0x096a, 0x005a, 0x096c, + 0x0061, 0x096e, 0x0063, 0x0970, 0x0064, 0x0972, 0x0065, 0x0974, + 0x0067, 0x0976, 0x0069, 0x0978, 0x006a, 0x097a, 0x006b, 0x097c, + 0x006c, 0x097e, 0x006e, 0x0980, 0x006f, 0x0982, 0x0072, 0x0984, + 0x0073, 0x0986, 0x0074, 0x098a, 0x0075, 0x098c, 0x007a, 0x098e, + 0x01b7, 0x0990, 0x0292, 0x0992, + /* 0x030d */ + 0x0000, 0x0011, 0x00a8, 0x0994, 0x0308, 0x0996, 0x0391, 0x0998, + 0x0395, 0x099a, 0x0397, 0x099c, 0x0399, 0x099e, 0x039f, 0x09a0, + 0x03a5, 0x09a2, 0x03a9, 0x09a4, 0x03b1, 0x09a6, 0x03b5, 0x09a8, + 0x03b7, 0x09aa, 0x03b9, 0x09ac, 0x03bf, 0x09ae, 0x03c5, 0x09b0, + 0x03c9, 0x09b2, 0x03d2, 0x09b4, + /* 0x030f */ + 0x0000, 0x000e, 0x0041, 0x09b6, 0x0045, 0x09b8, 0x0049, 0x09ba, + 0x004f, 0x09bc, 0x0052, 0x09be, 0x0055, 0x09c0, 0x0061, 0x09c2, + 0x0065, 0x09c4, 0x0069, 0x09c6, 0x006f, 0x09c8, 0x0072, 0x09ca, + 0x0075, 0x09cc, 0x0474, 0x09ce, 0x0475, 0x09d0, + /* 0x0311 */ + 0x0000, 0x000c, 0x0041, 0x09d2, 0x0045, 0x09d4, 0x0049, 0x09d6, + 0x004f, 0x09d8, 0x0052, 0x09da, 0x0055, 0x09dc, 0x0061, 0x09de, + 0x0065, 0x09e0, 0x0069, 0x09e2, 0x006f, 0x09e4, 0x0072, 0x09e6, + 0x0075, 0x09e8, + /* 0x0313 */ + 0x0343, 0x000e, 0x0391, 0x09ea, 0x0395, 0x09f2, 0x0397, 0x09f8, + 0x0399, 0x0a00, 0x039f, 0x0a08, 0x03a9, 0x0a0e, 0x03b1, 0x0a16, + 0x03b5, 0x0a1e, 0x03b7, 0x0a24, 0x03b9, 0x0a2c, 0x03bf, 0x0a34, + 0x03c1, 0x0a3a, 0x03c5, 0x0a3c, 0x03c9, 0x0a44, + /* 0x0314 */ + 0x0000, 0x0010, 0x0391, 0x0a4c, 0x0395, 0x0a54, 0x0397, 0x0a5a, + 0x0399, 0x0a62, 0x039f, 0x0a6a, 0x03a1, 0x0a70, 0x03a5, 0x0a72, + 0x03a9, 0x0a7a, 0x03b1, 0x0a82, 0x03b5, 0x0a8a, 0x03b7, 0x0a90, + 0x03b9, 0x0a98, 0x03bf, 0x0aa0, 0x03c1, 0x0aa6, 0x03c5, 0x0aa8, + 0x03c9, 0x0ab0, + /* 0x031b */ + 0x0000, 0x0004, 0x004f, 0x0ab8, 0x0055, 0x0ac4, 0x006f, 0x0ad0, + 0x0075, 0x0adc, + /* 0x0323 */ + 0x0000, 0x0026, 0x0041, 0x0ae8, 0x0042, 0x0aee, 0x0044, 0x0af0, + 0x0045, 0x0af2, 0x0048, 0x0af6, 0x0049, 0x0af8, 0x004b, 0x0afa, + 0x004c, 0x0afc, 0x004d, 0x0b00, 0x004e, 0x0b02, 0x004f, 0x0b04, + 0x0052, 0x0b08, 0x0053, 0x0b0c, 0x0054, 0x0b10, 0x0055, 0x0b12, + 0x0056, 0x0b14, 0x0057, 0x0b16, 0x0059, 0x0b18, 0x005a, 0x0b1a, + 0x0061, 0x0b1c, 0x0062, 0x0b22, 0x0064, 0x0b24, 0x0065, 0x0b26, + 0x0068, 0x0b2a, 0x0069, 0x0b2c, 0x006b, 0x0b2e, 0x006c, 0x0b30, + 0x006d, 0x0b34, 0x006e, 0x0b36, 0x006f, 0x0b38, 0x0072, 0x0b3c, + 0x0073, 0x0b40, 0x0074, 0x0b44, 0x0075, 0x0b46, 0x0076, 0x0b48, + 0x0077, 0x0b4a, 0x0079, 0x0b4c, 0x007a, 0x0b4e, + /* 0x0324 */ + 0x0000, 0x0002, 0x0055, 0x0b50, 0x0075, 0x0b52, + /* 0x0325 */ + 0x0000, 0x0002, 0x0041, 0x0b54, 0x0061, 0x0b56, + /* 0x0327 */ + 0x0000, 0x0016, 0x0043, 0x0b58, 0x0044, 0x0b5c, 0x0045, 0x0b5e, + 0x0047, 0x0b62, 0x0048, 0x0b64, 0x004b, 0x0b66, 0x004c, 0x0b68, + 0x004e, 0x0b6a, 0x0052, 0x0b6c, 0x0053, 0x0b6e, 0x0054, 0x0b70, + 0x0063, 0x0b72, 0x0064, 0x0b76, 0x0065, 0x0b78, 0x0067, 0x0b7c, + 0x0068, 0x0b7e, 0x006b, 0x0b80, 0x006c, 0x0b82, 0x006e, 0x0b84, + 0x0072, 0x0b86, 0x0073, 0x0b88, 0x0074, 0x0b8a, + /* 0x0328 */ + 0x0000, 0x000a, 0x0041, 0x0b8c, 0x0045, 0x0b8e, 0x0049, 0x0b90, + 0x004f, 0x0b92, 0x0055, 0x0b96, 0x0061, 0x0b98, 0x0065, 0x0b9a, + 0x0069, 0x0b9c, 0x006f, 0x0b9e, 0x0075, 0x0ba2, + /* 0x032d */ + 0x0000, 0x000c, 0x0044, 0x0ba4, 0x0045, 0x0ba6, 0x004c, 0x0ba8, + 0x004e, 0x0baa, 0x0054, 0x0bac, 0x0055, 0x0bae, 0x0064, 0x0bb0, + 0x0065, 0x0bb2, 0x006c, 0x0bb4, 0x006e, 0x0bb6, 0x0074, 0x0bb8, + 0x0075, 0x0bba, + /* 0x032e */ + 0x0000, 0x0002, 0x0048, 0x0bbc, 0x0068, 0x0bbe, + /* 0x0330 */ + 0x0000, 0x0006, 0x0045, 0x0bc0, 0x0049, 0x0bc2, 0x0055, 0x0bc4, + 0x0065, 0x0bc6, 0x0069, 0x0bc8, 0x0075, 0x0bca, + /* 0x0331 */ + 0x0000, 0x0011, 0x0042, 0x0bcc, 0x0044, 0x0bce, 0x004b, 0x0bd0, + 0x004c, 0x0bd2, 0x004e, 0x0bd4, 0x0052, 0x0bd6, 0x0054, 0x0bd8, + 0x005a, 0x0bda, 0x0062, 0x0bdc, 0x0064, 0x0bde, 0x0068, 0x0be0, + 0x006b, 0x0be2, 0x006c, 0x0be4, 0x006e, 0x0be6, 0x0072, 0x0be8, + 0x0074, 0x0bea, 0x007a, 0x0bec, + /* 0x0342 */ + 0x0000, 0x0008, 0x00a8, 0x0bee, 0x03b1, 0x0bf0, 0x03b7, 0x0bf2, + 0x03b9, 0x0bf4, 0x03c5, 0x0bf6, 0x03c9, 0x0bf8, 0x1fbf, 0x0bfa, + 0x1ffe, 0x0bfc, + /* 0x0345 */ + 0x0000, 0x0007, 0x0391, 0x0bfe, 0x0397, 0x0c04, 0x03a9, 0x0c0a, + 0x03b1, 0x0c10, 0x03b7, 0x0c1c, 0x03bf, 0x0c28, 0x03c9, 0x0c2c, + /* 0x05b7 */ + 0x0000, 0x0002, 0x05d0, 0x0c36, 0x05f2, 0x0c38, + /* 0x05b8 */ + 0x0000, 0x0001, 0x05d0, 0x0c3a, + /* 0x05b9 */ + 0x0000, 0x0001, 0x05d5, 0x0c3c, + /* 0x05bc */ + 0x0000, 0x0016, 0x05d0, 0x0c3e, 0x05d1, 0x0c40, 0x05d2, 0x0c42, + 0x05d3, 0x0c44, 0x05d4, 0x0c46, 0x05d5, 0x0c48, 0x05d6, 0x0c4a, + 0x05d8, 0x0c4c, 0x05d9, 0x0c4e, 0x05da, 0x0c50, 0x05db, 0x0c52, + 0x05dc, 0x0c54, 0x05de, 0x0c56, 0x05e0, 0x0c58, 0x05e1, 0x0c5a, + 0x05e3, 0x0c5c, 0x05e4, 0x0c5e, 0x05e6, 0x0c60, 0x05e7, 0x0c62, + 0x05e8, 0x0c64, 0x05e9, 0x0c66, 0x05ea, 0x0c6c, + /* 0x05bf */ + 0x0000, 0x0003, 0x05d1, 0x0c6e, 0x05db, 0x0c70, 0x05e4, 0x0c72, + /* 0x05c1 */ + 0x0000, 0x0001, 0x05e9, 0x0c74, + /* 0x05c2 */ + 0x0000, 0x0001, 0x05e9, 0x0c76, + /* 0x093c */ + 0x0000, 0x000b, 0x0915, 0x0c78, 0x0916, 0x0c7a, 0x0917, 0x0c7c, + 0x091c, 0x0c7e, 0x0921, 0x0c80, 0x0922, 0x0c82, 0x0928, 0x0c84, + 0x092b, 0x0c86, 0x092f, 0x0c88, 0x0930, 0x0c8a, 0x0933, 0x0c8c, + /* 0x09bc */ + 0x0000, 0x0004, 0x09a1, 0x0c8e, 0x09a2, 0x0c90, 0x09ac, 0x0c92, + 0x09af, 0x0c94, + /* 0x09be */ + 0x0000, 0x0001, 0x09c7, 0x0c96, + /* 0x09d7 */ + 0x0000, 0x0001, 0x09c7, 0x0c98, + /* 0x0a3c */ + 0x0000, 0x0005, 0x0a16, 0x0c9a, 0x0a17, 0x0c9c, 0x0a1c, 0x0c9e, + 0x0a21, 0x0ca0, 0x0a2b, 0x0ca2, + /* 0x0b3c */ + 0x0000, 0x0003, 0x0b21, 0x0ca4, 0x0b22, 0x0ca6, 0x0b2f, 0x0ca8, + /* 0x0b3e */ + 0x0000, 0x0001, 0x0b47, 0x0caa, + /* 0x0b56 */ + 0x0000, 0x0001, 0x0b47, 0x0cac, + /* 0x0b57 */ + 0x0000, 0x0001, 0x0b47, 0x0cae, + /* 0x0bbe */ + 0x0000, 0x0002, 0x0bc6, 0x0cb0, 0x0bc7, 0x0cb2, + /* 0x0bd7 */ + 0x0000, 0x0002, 0x0b92, 0x0cb4, 0x0bc6, 0x0cb6, + /* 0x0c56 */ + 0x0000, 0x0001, 0x0c46, 0x0cb8, + /* 0x0cc2 */ + 0x0000, 0x0001, 0x0cc6, 0x0cba, + /* 0x0cd5 */ + 0x0000, 0x0002, 0x0cbf, 0x0cbe, 0x0cc6, 0x0cc0, + /* 0x0cd6 */ + 0x0000, 0x0001, 0x0cc6, 0x0cc2, + /* 0x0d3e */ + 0x0000, 0x0002, 0x0d46, 0x0cc4, 0x0d47, 0x0cc6, + /* 0x0d57 */ + 0x0000, 0x0001, 0x0d46, 0x0cc8, + /* 0x0e32 */ + 0x0000, 0x0001, 0x0e4d, 0x0cca, + /* 0x0eb2 */ + 0x0000, 0x0001, 0x0ecd, 0x0ccc, + /* 0x0f71 */ + 0x0000, 0x0003, 0x0f72, 0x0cce, 0x0f74, 0x0cd0, 0x0f80, 0x0cd2, + /* 0x0f80 */ + 0x0000, 0x0002, 0x0fb2, 0x0cd4, 0x0fb3, 0x0cd8, + /* 0x0fb5 */ + 0x0000, 0x0002, 0x0f40, 0x0cdc, 0x0f90, 0x0cde, + /* 0x0fb7 */ + 0x0000, 0x000a, 0x0f42, 0x0ce0, 0x0f4c, 0x0ce2, 0x0f51, 0x0ce4, + 0x0f56, 0x0ce6, 0x0f5b, 0x0ce8, 0x0f92, 0x0cea, 0x0f9c, 0x0cec, + 0x0fa1, 0x0cee, 0x0fa6, 0x0cf0, 0x0fab, 0x0cf2, + /* 0x3099 */ + 0x0000, 0x0030, 0x3046, 0x0cf4, 0x304b, 0x0cf6, 0x304d, 0x0cf8, + 0x304f, 0x0cfa, 0x3051, 0x0cfc, 0x3053, 0x0cfe, 0x3055, 0x0d00, + 0x3057, 0x0d02, 0x3059, 0x0d04, 0x305b, 0x0d06, 0x305d, 0x0d08, + 0x305f, 0x0d0a, 0x3061, 0x0d0c, 0x3064, 0x0d0e, 0x3066, 0x0d10, + 0x3068, 0x0d12, 0x306f, 0x0d14, 0x3072, 0x0d16, 0x3075, 0x0d18, + 0x3078, 0x0d1a, 0x307b, 0x0d1c, 0x309d, 0x0d1e, 0x30a6, 0x0d20, + 0x30ab, 0x0d22, 0x30ad, 0x0d24, 0x30af, 0x0d26, 0x30b1, 0x0d28, + 0x30b3, 0x0d2a, 0x30b5, 0x0d2c, 0x30b7, 0x0d2e, 0x30b9, 0x0d30, + 0x30bb, 0x0d32, 0x30bd, 0x0d34, 0x30bf, 0x0d36, 0x30c1, 0x0d38, + 0x30c4, 0x0d3a, 0x30c6, 0x0d3c, 0x30c8, 0x0d3e, 0x30cf, 0x0d40, + 0x30d2, 0x0d42, 0x30d5, 0x0d44, 0x30d8, 0x0d46, 0x30db, 0x0d48, + 0x30ef, 0x0d4a, 0x30f0, 0x0d4c, 0x30f1, 0x0d4e, 0x30f2, 0x0d50, + 0x30fd, 0x0d52, + /* 0x309a */ + 0x0000, 0x000a, 0x306f, 0x0d54, 0x3072, 0x0d56, 0x3075, 0x0d58, + 0x3078, 0x0d5a, 0x307b, 0x0d5c, 0x30cf, 0x0d5e, 0x30d2, 0x0d60, + 0x30d5, 0x0d62, 0x30d8, 0x0d64, 0x30db, 0x0d66, + /* 0x0041 0x0300 */ + 0x00c0, 0x0000, + /* 0x0045 0x0300 */ + 0x00c8, 0x0000, + /* 0x0049 0x0300 */ + 0x00cc, 0x0000, + /* 0x004f 0x0300 */ + 0x00d2, 0x0000, + /* 0x0055 0x0300 */ + 0x00d9, 0x0000, + /* 0x0057 0x0300 */ + 0x1e80, 0x0000, + /* 0x0059 0x0300 */ + 0x1ef2, 0x0000, + /* 0x0061 0x0300 */ + 0x00e0, 0x0000, + /* 0x0065 0x0300 */ + 0x00e8, 0x0000, + /* 0x0069 0x0300 */ + 0x00ec, 0x0000, + /* 0x006f 0x0300 */ + 0x00f2, 0x0000, + /* 0x0075 0x0300 */ + 0x00f9, 0x0000, + /* 0x0077 0x0300 */ + 0x1e81, 0x0000, + /* 0x0079 0x0300 */ + 0x1ef3, 0x0000, + /* 0x00a8 0x0300 */ + 0x1fed, 0x0000, + /* 0x0391 0x0300 */ + 0x1fba, 0x0000, + /* 0x0395 0x0300 */ + 0x1fc8, 0x0000, + /* 0x0397 0x0300 */ + 0x1fca, 0x0000, + /* 0x0399 0x0300 */ + 0x1fda, 0x0000, + /* 0x039f 0x0300 */ + 0x1ff8, 0x0000, + /* 0x03a5 0x0300 */ + 0x1fea, 0x0000, + /* 0x03a9 0x0300 */ + 0x1ffa, 0x0000, + /* 0x03b1 0x0300 */ + 0x1f70, 0x0000, + /* 0x03b5 0x0300 */ + 0x1f72, 0x0000, + /* 0x03b7 0x0300 */ + 0x1f74, 0x0000, + /* 0x03b9 0x0300 */ + 0x1f76, 0x0000, + /* 0x03bf 0x0300 */ + 0x1f78, 0x0000, + /* 0x03c5 0x0300 */ + 0x1f7a, 0x0000, + /* 0x03c9 0x0300 */ + 0x1f7c, 0x0000, + /* 0x1fbf 0x0300 */ + 0x1fcd, 0x0000, + /* 0x1ffe 0x0300 */ + 0x1fdd, 0x0000, + /* 0x0041 0x0301 */ + 0x00c1, 0x0000, + /* 0x0043 0x0301 */ + 0x0106, 0x0000, + /* 0x0045 0x0301 */ + 0x00c9, 0x0000, + /* 0x0047 0x0301 */ + 0x01f4, 0x0000, + /* 0x0049 0x0301 */ + 0x00cd, 0x0000, + /* 0x004b 0x0301 */ + 0x1e30, 0x0000, + /* 0x004c 0x0301 */ + 0x0139, 0x0000, + /* 0x004d 0x0301 */ + 0x1e3e, 0x0000, + /* 0x004e 0x0301 */ + 0x0143, 0x0000, + /* 0x004f 0x0301 */ + 0x00d3, 0x0000, + /* 0x0050 0x0301 */ + 0x1e54, 0x0000, + /* 0x0052 0x0301 */ + 0x0154, 0x0000, + /* 0x0053 0x0301 */ + 0x015a, 0x0001, 0x0307, 0x0d68, + /* 0x0055 0x0301 */ + 0x00da, 0x0000, + /* 0x0057 0x0301 */ + 0x1e82, 0x0000, + /* 0x0059 0x0301 */ + 0x00dd, 0x0000, + /* 0x005a 0x0301 */ + 0x0179, 0x0000, + /* 0x0061 0x0301 */ + 0x00e1, 0x0000, + /* 0x0063 0x0301 */ + 0x0107, 0x0000, + /* 0x0065 0x0301 */ + 0x00e9, 0x0000, + /* 0x0067 0x0301 */ + 0x01f5, 0x0000, + /* 0x0069 0x0301 */ + 0x00ed, 0x0000, + /* 0x006b 0x0301 */ + 0x1e31, 0x0000, + /* 0x006c 0x0301 */ + 0x013a, 0x0000, + /* 0x006d 0x0301 */ + 0x1e3f, 0x0000, + /* 0x006e 0x0301 */ + 0x0144, 0x0000, + /* 0x006f 0x0301 */ + 0x00f3, 0x0000, + /* 0x0070 0x0301 */ + 0x1e55, 0x0000, + /* 0x0072 0x0301 */ + 0x0155, 0x0000, + /* 0x0073 0x0301 */ + 0x015b, 0x0001, 0x0307, 0x0d6a, + /* 0x0075 0x0301 */ + 0x00fa, 0x0000, + /* 0x0077 0x0301 */ + 0x1e83, 0x0000, + /* 0x0079 0x0301 */ + 0x00fd, 0x0000, + /* 0x007a 0x0301 */ + 0x017a, 0x0000, + /* 0x00a8 0x0301 */ + 0x1fee, 0x0000, + /* 0x00c6 0x0301 */ + 0x01fc, 0x0000, + /* 0x00d8 0x0301 */ + 0x01fe, 0x0000, + /* 0x00e6 0x0301 */ + 0x01fd, 0x0000, + /* 0x00f8 0x0301 */ + 0x01ff, 0x0000, + /* 0x0391 0x0301 */ + 0x1fbb, 0x0000, + /* 0x0395 0x0301 */ + 0x1fc9, 0x0000, + /* 0x0397 0x0301 */ + 0x1fcb, 0x0000, + /* 0x0399 0x0301 */ + 0x1fdb, 0x0000, + /* 0x039f 0x0301 */ + 0x1ff9, 0x0000, + /* 0x03a5 0x0301 */ + 0x1feb, 0x0000, + /* 0x03a9 0x0301 */ + 0x1ffb, 0x0000, + /* 0x03b1 0x0301 */ + 0x1f71, 0x0000, + /* 0x03b5 0x0301 */ + 0x1f73, 0x0000, + /* 0x03b7 0x0301 */ + 0x1f75, 0x0000, + /* 0x03b9 0x0301 */ + 0x1f77, 0x0000, + /* 0x03bf 0x0301 */ + 0x1f79, 0x0000, + /* 0x03c5 0x0301 */ + 0x1f7b, 0x0000, + /* 0x03c9 0x0301 */ + 0x1f7d, 0x0000, + /* 0x0413 0x0301 */ + 0x0403, 0x0000, + /* 0x041a 0x0301 */ + 0x040c, 0x0000, + /* 0x0433 0x0301 */ + 0x0453, 0x0000, + /* 0x043a 0x0301 */ + 0x045c, 0x0000, + /* 0x1fbf 0x0301 */ + 0x1fce, 0x0000, + /* 0x1ffe 0x0301 */ + 0x1fde, 0x0000, + /* 0x0041 0x0302 */ + 0x00c2, 0x0004, 0x0300, 0x0d6c, 0x0301, 0x0d6e, 0x0303, 0x0d70, + 0x0309, 0x0d72, + /* 0x0043 0x0302 */ + 0x0108, 0x0000, + /* 0x0045 0x0302 */ + 0x00ca, 0x0004, 0x0300, 0x0d74, 0x0301, 0x0d76, 0x0303, 0x0d78, + 0x0309, 0x0d7a, + /* 0x0047 0x0302 */ + 0x011c, 0x0000, + /* 0x0048 0x0302 */ + 0x0124, 0x0000, + /* 0x0049 0x0302 */ + 0x00ce, 0x0000, + /* 0x004a 0x0302 */ + 0x0134, 0x0000, + /* 0x004f 0x0302 */ + 0x00d4, 0x0004, 0x0300, 0x0d7c, 0x0301, 0x0d7e, 0x0303, 0x0d80, + 0x0309, 0x0d82, + /* 0x0053 0x0302 */ + 0x015c, 0x0000, + /* 0x0055 0x0302 */ + 0x00db, 0x0000, + /* 0x0057 0x0302 */ + 0x0174, 0x0000, + /* 0x0059 0x0302 */ + 0x0176, 0x0000, + /* 0x005a 0x0302 */ + 0x1e90, 0x0000, + /* 0x0061 0x0302 */ + 0x00e2, 0x0004, 0x0300, 0x0d84, 0x0301, 0x0d86, 0x0303, 0x0d88, + 0x0309, 0x0d8a, + /* 0x0063 0x0302 */ + 0x0109, 0x0000, + /* 0x0065 0x0302 */ + 0x00ea, 0x0004, 0x0300, 0x0d8c, 0x0301, 0x0d8e, 0x0303, 0x0d90, + 0x0309, 0x0d92, + /* 0x0067 0x0302 */ + 0x011d, 0x0000, + /* 0x0068 0x0302 */ + 0x0125, 0x0000, + /* 0x0069 0x0302 */ + 0x00ee, 0x0000, + /* 0x006a 0x0302 */ + 0x0135, 0x0000, + /* 0x006f 0x0302 */ + 0x00f4, 0x0004, 0x0300, 0x0d94, 0x0301, 0x0d96, 0x0303, 0x0d98, + 0x0309, 0x0d9a, + /* 0x0073 0x0302 */ + 0x015d, 0x0000, + /* 0x0075 0x0302 */ + 0x00fb, 0x0000, + /* 0x0077 0x0302 */ + 0x0175, 0x0000, + /* 0x0079 0x0302 */ + 0x0177, 0x0000, + /* 0x007a 0x0302 */ + 0x1e91, 0x0000, + /* 0x0041 0x0303 */ + 0x00c3, 0x0000, + /* 0x0045 0x0303 */ + 0x1ebc, 0x0000, + /* 0x0049 0x0303 */ + 0x0128, 0x0000, + /* 0x004e 0x0303 */ + 0x00d1, 0x0000, + /* 0x004f 0x0303 */ + 0x00d5, 0x0002, 0x0301, 0x0d9c, 0x0308, 0x0d9e, + /* 0x0055 0x0303 */ + 0x0168, 0x0001, 0x0301, 0x0da0, + /* 0x0056 0x0303 */ + 0x1e7c, 0x0000, + /* 0x0059 0x0303 */ + 0x1ef8, 0x0000, + /* 0x0061 0x0303 */ + 0x00e3, 0x0000, + /* 0x0065 0x0303 */ + 0x1ebd, 0x0000, + /* 0x0069 0x0303 */ + 0x0129, 0x0000, + /* 0x006e 0x0303 */ + 0x00f1, 0x0000, + /* 0x006f 0x0303 */ + 0x00f5, 0x0002, 0x0301, 0x0da2, 0x0308, 0x0da4, + /* 0x0075 0x0303 */ + 0x0169, 0x0001, 0x0301, 0x0da6, + /* 0x0076 0x0303 */ + 0x1e7d, 0x0000, + /* 0x0079 0x0303 */ + 0x1ef9, 0x0000, + /* 0x0041 0x0304 */ + 0x0100, 0x0000, + /* 0x0045 0x0304 */ + 0x0112, 0x0002, 0x0300, 0x0da8, 0x0301, 0x0daa, + /* 0x0047 0x0304 */ + 0x1e20, 0x0000, + /* 0x0049 0x0304 */ + 0x012a, 0x0000, + /* 0x004f 0x0304 */ + 0x014c, 0x0002, 0x0300, 0x0dac, 0x0301, 0x0dae, + /* 0x0055 0x0304 */ + 0x016a, 0x0001, 0x0308, 0x0db0, + /* 0x0061 0x0304 */ + 0x0101, 0x0000, + /* 0x0065 0x0304 */ + 0x0113, 0x0002, 0x0300, 0x0db2, 0x0301, 0x0db4, + /* 0x0067 0x0304 */ + 0x1e21, 0x0000, + /* 0x0069 0x0304 */ + 0x012b, 0x0000, + /* 0x006f 0x0304 */ + 0x014d, 0x0002, 0x0300, 0x0db6, 0x0301, 0x0db8, + /* 0x0075 0x0304 */ + 0x016b, 0x0001, 0x0308, 0x0dba, + /* 0x00c6 0x0304 */ + 0x01e2, 0x0000, + /* 0x00e6 0x0304 */ + 0x01e3, 0x0000, + /* 0x0391 0x0304 */ + 0x1fb9, 0x0000, + /* 0x0399 0x0304 */ + 0x1fd9, 0x0000, + /* 0x03a5 0x0304 */ + 0x1fe9, 0x0000, + /* 0x03b1 0x0304 */ + 0x1fb1, 0x0000, + /* 0x03b9 0x0304 */ + 0x1fd1, 0x0000, + /* 0x03c5 0x0304 */ + 0x1fe1, 0x0000, + /* 0x0418 0x0304 */ + 0x04e2, 0x0000, + /* 0x0423 0x0304 */ + 0x04ee, 0x0000, + /* 0x0438 0x0304 */ + 0x04e3, 0x0000, + /* 0x0443 0x0304 */ + 0x04ef, 0x0000, + /* 0x0041 0x0306 */ + 0x0102, 0x0004, 0x0300, 0x0dbc, 0x0301, 0x0dbe, 0x0303, 0x0dc0, + 0x0309, 0x0dc2, + /* 0x0045 0x0306 */ + 0x0114, 0x0000, + /* 0x0047 0x0306 */ + 0x011e, 0x0000, + /* 0x0049 0x0306 */ + 0x012c, 0x0000, + /* 0x004f 0x0306 */ + 0x014e, 0x0000, + /* 0x0055 0x0306 */ + 0x016c, 0x0000, + /* 0x0061 0x0306 */ + 0x0103, 0x0004, 0x0300, 0x0dc4, 0x0301, 0x0dc6, 0x0303, 0x0dc8, + 0x0309, 0x0dca, + /* 0x0065 0x0306 */ + 0x0115, 0x0000, + /* 0x0067 0x0306 */ + 0x011f, 0x0000, + /* 0x0069 0x0306 */ + 0x012d, 0x0000, + /* 0x006f 0x0306 */ + 0x014f, 0x0000, + /* 0x0075 0x0306 */ + 0x016d, 0x0000, + /* 0x0391 0x0306 */ + 0x1fb8, 0x0000, + /* 0x0399 0x0306 */ + 0x1fd8, 0x0000, + /* 0x03a5 0x0306 */ + 0x1fe8, 0x0000, + /* 0x03b1 0x0306 */ + 0x1fb0, 0x0000, + /* 0x03b9 0x0306 */ + 0x1fd0, 0x0000, + /* 0x03c5 0x0306 */ + 0x1fe0, 0x0000, + /* 0x0410 0x0306 */ + 0x04d0, 0x0000, + /* 0x0415 0x0306 */ + 0x04d6, 0x0000, + /* 0x0416 0x0306 */ + 0x04c1, 0x0000, + /* 0x0418 0x0306 */ + 0x0419, 0x0000, + /* 0x0423 0x0306 */ + 0x040e, 0x0000, + /* 0x0430 0x0306 */ + 0x04d1, 0x0000, + /* 0x0435 0x0306 */ + 0x04d7, 0x0000, + /* 0x0436 0x0306 */ + 0x04c2, 0x0000, + /* 0x0438 0x0306 */ + 0x0439, 0x0000, + /* 0x0443 0x0306 */ + 0x045e, 0x0000, + /* 0x0041 0x0307 */ + 0x0000, 0x0001, 0x0304, 0x0dcc, + /* 0x0042 0x0307 */ + 0x1e02, 0x0000, + /* 0x0043 0x0307 */ + 0x010a, 0x0000, + /* 0x0044 0x0307 */ + 0x1e0a, 0x0000, + /* 0x0045 0x0307 */ + 0x0116, 0x0000, + /* 0x0046 0x0307 */ + 0x1e1e, 0x0000, + /* 0x0047 0x0307 */ + 0x0120, 0x0000, + /* 0x0048 0x0307 */ + 0x1e22, 0x0000, + /* 0x0049 0x0307 */ + 0x0130, 0x0000, + /* 0x004d 0x0307 */ + 0x1e40, 0x0000, + /* 0x004e 0x0307 */ + 0x1e44, 0x0000, + /* 0x0050 0x0307 */ + 0x1e56, 0x0000, + /* 0x0052 0x0307 */ + 0x1e58, 0x0000, + /* 0x0053 0x0307 */ + 0x1e60, 0x0000, + /* 0x0054 0x0307 */ + 0x1e6a, 0x0000, + /* 0x0057 0x0307 */ + 0x1e86, 0x0000, + /* 0x0058 0x0307 */ + 0x1e8a, 0x0000, + /* 0x0059 0x0307 */ + 0x1e8e, 0x0000, + /* 0x005a 0x0307 */ + 0x017b, 0x0000, + /* 0x0061 0x0307 */ + 0x0000, 0x0001, 0x0304, 0x0dce, + /* 0x0062 0x0307 */ + 0x1e03, 0x0000, + /* 0x0063 0x0307 */ + 0x010b, 0x0000, + /* 0x0064 0x0307 */ + 0x1e0b, 0x0000, + /* 0x0065 0x0307 */ + 0x0117, 0x0000, + /* 0x0066 0x0307 */ + 0x1e1f, 0x0000, + /* 0x0067 0x0307 */ + 0x0121, 0x0000, + /* 0x0068 0x0307 */ + 0x1e23, 0x0000, + /* 0x006d 0x0307 */ + 0x1e41, 0x0000, + /* 0x006e 0x0307 */ + 0x1e45, 0x0000, + /* 0x0070 0x0307 */ + 0x1e57, 0x0000, + /* 0x0072 0x0307 */ + 0x1e59, 0x0000, + /* 0x0073 0x0307 */ + 0x1e61, 0x0000, + /* 0x0074 0x0307 */ + 0x1e6b, 0x0000, + /* 0x0077 0x0307 */ + 0x1e87, 0x0000, + /* 0x0078 0x0307 */ + 0x1e8b, 0x0000, + /* 0x0079 0x0307 */ + 0x1e8f, 0x0000, + /* 0x007a 0x0307 */ + 0x017c, 0x0000, + /* 0x017f 0x0307 */ + 0x1e9b, 0x0000, + /* 0x0306 0x0307 */ + 0x0310, 0x0000, + /* 0x0041 0x0308 */ + 0x00c4, 0x0001, 0x0304, 0x0dd0, + /* 0x0045 0x0308 */ + 0x00cb, 0x0000, + /* 0x0048 0x0308 */ + 0x1e26, 0x0000, + /* 0x0049 0x0308 */ + 0x00cf, 0x0001, 0x0301, 0x0dd2, + /* 0x004f 0x0308 */ + 0x00d6, 0x0000, + /* 0x0055 0x0308 */ + 0x00dc, 0x0004, 0x0300, 0x0dd4, 0x0301, 0x0dd6, 0x0304, 0x0dd8, + 0x030c, 0x0dda, + /* 0x0057 0x0308 */ + 0x1e84, 0x0000, + /* 0x0058 0x0308 */ + 0x1e8c, 0x0000, + /* 0x0059 0x0308 */ + 0x0178, 0x0000, + /* 0x0061 0x0308 */ + 0x00e4, 0x0001, 0x0304, 0x0ddc, + /* 0x0065 0x0308 */ + 0x00eb, 0x0000, + /* 0x0068 0x0308 */ + 0x1e27, 0x0000, + /* 0x0069 0x0308 */ + 0x00ef, 0x0001, 0x0301, 0x0dde, + /* 0x006f 0x0308 */ + 0x00f6, 0x0000, + /* 0x0074 0x0308 */ + 0x1e97, 0x0000, + /* 0x0075 0x0308 */ + 0x00fc, 0x0004, 0x0300, 0x0de0, 0x0301, 0x0de2, 0x0304, 0x0de4, + 0x030c, 0x0de6, + /* 0x0077 0x0308 */ + 0x1e85, 0x0000, + /* 0x0078 0x0308 */ + 0x1e8d, 0x0000, + /* 0x0079 0x0308 */ + 0x00ff, 0x0000, + /* 0x018f 0x0308 */ + 0x04da, 0x0000, + /* 0x019f 0x0308 */ + 0x04ea, 0x0000, + /* 0x0259 0x0308 */ + 0x04db, 0x0000, + /* 0x0275 0x0308 */ + 0x04eb, 0x0000, + /* 0x0399 0x0308 */ + 0x03aa, 0x0000, + /* 0x03a5 0x0308 */ + 0x03ab, 0x0000, + /* 0x03b9 0x0308 */ + 0x03ca, 0x0004, 0x0300, 0x0de8, 0x0301, 0x0dea, 0x030d, 0x0dec, + 0x0342, 0x0dee, + /* 0x03c5 0x0308 */ + 0x03cb, 0x0004, 0x0300, 0x0df0, 0x0301, 0x0df2, 0x030d, 0x0df4, + 0x0342, 0x0df6, + /* 0x03d2 0x0308 */ + 0x03d4, 0x0000, + /* 0x0406 0x0308 */ + 0x0407, 0x0000, + /* 0x0410 0x0308 */ + 0x04d2, 0x0000, + /* 0x0415 0x0308 */ + 0x0401, 0x0000, + /* 0x0416 0x0308 */ + 0x04dc, 0x0000, + /* 0x0417 0x0308 */ + 0x04de, 0x0000, + /* 0x0418 0x0308 */ + 0x04e4, 0x0000, + /* 0x041e 0x0308 */ + 0x04e6, 0x0000, + /* 0x0423 0x0308 */ + 0x04f0, 0x0000, + /* 0x0427 0x0308 */ + 0x04f4, 0x0000, + /* 0x042b 0x0308 */ + 0x04f8, 0x0000, + /* 0x0430 0x0308 */ + 0x04d3, 0x0000, + /* 0x0435 0x0308 */ + 0x0451, 0x0000, + /* 0x0436 0x0308 */ + 0x04dd, 0x0000, + /* 0x0437 0x0308 */ + 0x04df, 0x0000, + /* 0x0438 0x0308 */ + 0x04e5, 0x0000, + /* 0x043e 0x0308 */ + 0x04e7, 0x0000, + /* 0x0443 0x0308 */ + 0x04f1, 0x0000, + /* 0x0447 0x0308 */ + 0x04f5, 0x0000, + /* 0x044b 0x0308 */ + 0x04f9, 0x0000, + /* 0x0456 0x0308 */ + 0x0457, 0x0000, + /* 0x0041 0x0309 */ + 0x1ea2, 0x0000, + /* 0x0045 0x0309 */ + 0x1eba, 0x0000, + /* 0x0049 0x0309 */ + 0x1ec8, 0x0000, + /* 0x004f 0x0309 */ + 0x1ece, 0x0000, + /* 0x0055 0x0309 */ + 0x1ee6, 0x0000, + /* 0x0059 0x0309 */ + 0x1ef6, 0x0000, + /* 0x0061 0x0309 */ + 0x1ea3, 0x0000, + /* 0x0065 0x0309 */ + 0x1ebb, 0x0000, + /* 0x0069 0x0309 */ + 0x1ec9, 0x0000, + /* 0x006f 0x0309 */ + 0x1ecf, 0x0000, + /* 0x0075 0x0309 */ + 0x1ee7, 0x0000, + /* 0x0079 0x0309 */ + 0x1ef7, 0x0000, + /* 0x0041 0x030a */ + 0x00c5, 0x0001, 0x0301, 0x0df8, + /* 0x0055 0x030a */ + 0x016e, 0x0000, + /* 0x0061 0x030a */ + 0x00e5, 0x0001, 0x0301, 0x0dfa, + /* 0x0075 0x030a */ + 0x016f, 0x0000, + /* 0x0077 0x030a */ + 0x1e98, 0x0000, + /* 0x0079 0x030a */ + 0x1e99, 0x0000, + /* 0x004f 0x030b */ + 0x0150, 0x0000, + /* 0x0055 0x030b */ + 0x0170, 0x0000, + /* 0x006f 0x030b */ + 0x0151, 0x0000, + /* 0x0075 0x030b */ + 0x0171, 0x0000, + /* 0x0423 0x030b */ + 0x04f2, 0x0000, + /* 0x0443 0x030b */ + 0x04f3, 0x0000, + /* 0x0041 0x030c */ + 0x01cd, 0x0000, + /* 0x0043 0x030c */ + 0x010c, 0x0000, + /* 0x0044 0x030c */ + 0x010e, 0x0000, + /* 0x0045 0x030c */ + 0x011a, 0x0000, + /* 0x0047 0x030c */ + 0x01e6, 0x0000, + /* 0x0049 0x030c */ + 0x01cf, 0x0000, + /* 0x004b 0x030c */ + 0x01e8, 0x0000, + /* 0x004c 0x030c */ + 0x013d, 0x0000, + /* 0x004e 0x030c */ + 0x0147, 0x0000, + /* 0x004f 0x030c */ + 0x01d1, 0x0000, + /* 0x0052 0x030c */ + 0x0158, 0x0000, + /* 0x0053 0x030c */ + 0x0160, 0x0001, 0x0307, 0x0dfc, + /* 0x0054 0x030c */ + 0x0164, 0x0000, + /* 0x0055 0x030c */ + 0x01d3, 0x0000, + /* 0x005a 0x030c */ + 0x017d, 0x0000, + /* 0x0061 0x030c */ + 0x01ce, 0x0000, + /* 0x0063 0x030c */ + 0x010d, 0x0000, + /* 0x0064 0x030c */ + 0x010f, 0x0000, + /* 0x0065 0x030c */ + 0x011b, 0x0000, + /* 0x0067 0x030c */ + 0x01e7, 0x0000, + /* 0x0069 0x030c */ + 0x01d0, 0x0000, + /* 0x006a 0x030c */ + 0x01f0, 0x0000, + /* 0x006b 0x030c */ + 0x01e9, 0x0000, + /* 0x006c 0x030c */ + 0x013e, 0x0000, + /* 0x006e 0x030c */ + 0x0148, 0x0000, + /* 0x006f 0x030c */ + 0x01d2, 0x0000, + /* 0x0072 0x030c */ + 0x0159, 0x0000, + /* 0x0073 0x030c */ + 0x0161, 0x0001, 0x0307, 0x0dfe, + /* 0x0074 0x030c */ + 0x0165, 0x0000, + /* 0x0075 0x030c */ + 0x01d4, 0x0000, + /* 0x007a 0x030c */ + 0x017e, 0x0000, + /* 0x01b7 0x030c */ + 0x01ee, 0x0000, + /* 0x0292 0x030c */ + 0x01ef, 0x0000, + /* 0x00a8 0x030d */ + 0x0385, 0x0000, + /* 0x0308 0x030d */ + 0x0344, 0x0000, + /* 0x0391 0x030d */ + 0x0386, 0x0000, + /* 0x0395 0x030d */ + 0x0388, 0x0000, + /* 0x0397 0x030d */ + 0x0389, 0x0000, + /* 0x0399 0x030d */ + 0x038a, 0x0000, + /* 0x039f 0x030d */ + 0x038c, 0x0000, + /* 0x03a5 0x030d */ + 0x038e, 0x0000, + /* 0x03a9 0x030d */ + 0x038f, 0x0000, + /* 0x03b1 0x030d */ + 0x03ac, 0x0000, + /* 0x03b5 0x030d */ + 0x03ad, 0x0000, + /* 0x03b7 0x030d */ + 0x03ae, 0x0000, + /* 0x03b9 0x030d */ + 0x03af, 0x0000, + /* 0x03bf 0x030d */ + 0x03cc, 0x0000, + /* 0x03c5 0x030d */ + 0x03cd, 0x0000, + /* 0x03c9 0x030d */ + 0x03ce, 0x0000, + /* 0x03d2 0x030d */ + 0x03d3, 0x0000, + /* 0x0041 0x030f */ + 0x0200, 0x0000, + /* 0x0045 0x030f */ + 0x0204, 0x0000, + /* 0x0049 0x030f */ + 0x0208, 0x0000, + /* 0x004f 0x030f */ + 0x020c, 0x0000, + /* 0x0052 0x030f */ + 0x0210, 0x0000, + /* 0x0055 0x030f */ + 0x0214, 0x0000, + /* 0x0061 0x030f */ + 0x0201, 0x0000, + /* 0x0065 0x030f */ + 0x0205, 0x0000, + /* 0x0069 0x030f */ + 0x0209, 0x0000, + /* 0x006f 0x030f */ + 0x020d, 0x0000, + /* 0x0072 0x030f */ + 0x0211, 0x0000, + /* 0x0075 0x030f */ + 0x0215, 0x0000, + /* 0x0474 0x030f */ + 0x0476, 0x0000, + /* 0x0475 0x030f */ + 0x0477, 0x0000, + /* 0x0041 0x0311 */ + 0x0202, 0x0000, + /* 0x0045 0x0311 */ + 0x0206, 0x0000, + /* 0x0049 0x0311 */ + 0x020a, 0x0000, + /* 0x004f 0x0311 */ + 0x020e, 0x0000, + /* 0x0052 0x0311 */ + 0x0212, 0x0000, + /* 0x0055 0x0311 */ + 0x0216, 0x0000, + /* 0x0061 0x0311 */ + 0x0203, 0x0000, + /* 0x0065 0x0311 */ + 0x0207, 0x0000, + /* 0x0069 0x0311 */ + 0x020b, 0x0000, + /* 0x006f 0x0311 */ + 0x020f, 0x0000, + /* 0x0072 0x0311 */ + 0x0213, 0x0000, + /* 0x0075 0x0311 */ + 0x0217, 0x0000, + /* 0x0391 0x0313 */ + 0x1f08, 0x0003, 0x0300, 0x0e00, 0x0301, 0x0e02, 0x0342, 0x0e04, + /* 0x0395 0x0313 */ + 0x1f18, 0x0002, 0x0300, 0x0e06, 0x0301, 0x0e08, + /* 0x0397 0x0313 */ + 0x1f28, 0x0003, 0x0300, 0x0e0a, 0x0301, 0x0e0c, 0x0342, 0x0e0e, + /* 0x0399 0x0313 */ + 0x1f38, 0x0003, 0x0300, 0x0e10, 0x0301, 0x0e12, 0x0342, 0x0e14, + /* 0x039f 0x0313 */ + 0x1f48, 0x0002, 0x0300, 0x0e16, 0x0301, 0x0e18, + /* 0x03a9 0x0313 */ + 0x1f68, 0x0003, 0x0300, 0x0e1a, 0x0301, 0x0e1c, 0x0342, 0x0e1e, + /* 0x03b1 0x0313 */ + 0x1f00, 0x0003, 0x0300, 0x0e20, 0x0301, 0x0e22, 0x0342, 0x0e24, + /* 0x03b5 0x0313 */ + 0x1f10, 0x0002, 0x0300, 0x0e26, 0x0301, 0x0e28, + /* 0x03b7 0x0313 */ + 0x1f20, 0x0003, 0x0300, 0x0e2a, 0x0301, 0x0e2c, 0x0342, 0x0e2e, + /* 0x03b9 0x0313 */ + 0x1f30, 0x0003, 0x0300, 0x0e30, 0x0301, 0x0e32, 0x0342, 0x0e34, + /* 0x03bf 0x0313 */ + 0x1f40, 0x0002, 0x0300, 0x0e36, 0x0301, 0x0e38, + /* 0x03c1 0x0313 */ + 0x1fe4, 0x0000, + /* 0x03c5 0x0313 */ + 0x1f50, 0x0003, 0x0300, 0x0e3a, 0x0301, 0x0e3c, 0x0342, 0x0e3e, + /* 0x03c9 0x0313 */ + 0x1f60, 0x0003, 0x0300, 0x0e40, 0x0301, 0x0e42, 0x0342, 0x0e44, + /* 0x0391 0x0314 */ + 0x1f09, 0x0003, 0x0300, 0x0e46, 0x0301, 0x0e48, 0x0342, 0x0e4a, + /* 0x0395 0x0314 */ + 0x1f19, 0x0002, 0x0300, 0x0e4c, 0x0301, 0x0e4e, + /* 0x0397 0x0314 */ + 0x1f29, 0x0003, 0x0300, 0x0e50, 0x0301, 0x0e52, 0x0342, 0x0e54, + /* 0x0399 0x0314 */ + 0x1f39, 0x0003, 0x0300, 0x0e56, 0x0301, 0x0e58, 0x0342, 0x0e5a, + /* 0x039f 0x0314 */ + 0x1f49, 0x0002, 0x0300, 0x0e5c, 0x0301, 0x0e5e, + /* 0x03a1 0x0314 */ + 0x1fec, 0x0000, + /* 0x03a5 0x0314 */ + 0x1f59, 0x0003, 0x0300, 0x0e60, 0x0301, 0x0e62, 0x0342, 0x0e64, + /* 0x03a9 0x0314 */ + 0x1f69, 0x0003, 0x0300, 0x0e66, 0x0301, 0x0e68, 0x0342, 0x0e6a, + /* 0x03b1 0x0314 */ + 0x1f01, 0x0003, 0x0300, 0x0e6c, 0x0301, 0x0e6e, 0x0342, 0x0e70, + /* 0x03b5 0x0314 */ + 0x1f11, 0x0002, 0x0300, 0x0e72, 0x0301, 0x0e74, + /* 0x03b7 0x0314 */ + 0x1f21, 0x0003, 0x0300, 0x0e76, 0x0301, 0x0e78, 0x0342, 0x0e7a, + /* 0x03b9 0x0314 */ + 0x1f31, 0x0003, 0x0300, 0x0e7c, 0x0301, 0x0e7e, 0x0342, 0x0e80, + /* 0x03bf 0x0314 */ + 0x1f41, 0x0002, 0x0300, 0x0e82, 0x0301, 0x0e84, + /* 0x03c1 0x0314 */ + 0x1fe5, 0x0000, + /* 0x03c5 0x0314 */ + 0x1f51, 0x0003, 0x0300, 0x0e86, 0x0301, 0x0e88, 0x0342, 0x0e8a, + /* 0x03c9 0x0314 */ + 0x1f61, 0x0003, 0x0300, 0x0e8c, 0x0301, 0x0e8e, 0x0342, 0x0e90, + /* 0x004f 0x031b */ + 0x01a0, 0x0005, 0x0300, 0x0e92, 0x0301, 0x0e94, 0x0303, 0x0e96, + 0x0309, 0x0e98, 0x0323, 0x0e9a, + /* 0x0055 0x031b */ + 0x01af, 0x0005, 0x0300, 0x0e9c, 0x0301, 0x0e9e, 0x0303, 0x0ea0, + 0x0309, 0x0ea2, 0x0323, 0x0ea4, + /* 0x006f 0x031b */ + 0x01a1, 0x0005, 0x0300, 0x0ea6, 0x0301, 0x0ea8, 0x0303, 0x0eaa, + 0x0309, 0x0eac, 0x0323, 0x0eae, + /* 0x0075 0x031b */ + 0x01b0, 0x0005, 0x0300, 0x0eb0, 0x0301, 0x0eb2, 0x0303, 0x0eb4, + 0x0309, 0x0eb6, 0x0323, 0x0eb8, + /* 0x0041 0x0323 */ + 0x1ea0, 0x0002, 0x0302, 0x0eba, 0x0306, 0x0ebc, + /* 0x0042 0x0323 */ + 0x1e04, 0x0000, + /* 0x0044 0x0323 */ + 0x1e0c, 0x0000, + /* 0x0045 0x0323 */ + 0x1eb8, 0x0001, 0x0302, 0x0ebe, + /* 0x0048 0x0323 */ + 0x1e24, 0x0000, + /* 0x0049 0x0323 */ + 0x1eca, 0x0000, + /* 0x004b 0x0323 */ + 0x1e32, 0x0000, + /* 0x004c 0x0323 */ + 0x1e36, 0x0001, 0x0304, 0x0ec0, + /* 0x004d 0x0323 */ + 0x1e42, 0x0000, + /* 0x004e 0x0323 */ + 0x1e46, 0x0000, + /* 0x004f 0x0323 */ + 0x1ecc, 0x0001, 0x0302, 0x0ec2, + /* 0x0052 0x0323 */ + 0x1e5a, 0x0001, 0x0304, 0x0ec4, + /* 0x0053 0x0323 */ + 0x1e62, 0x0001, 0x0307, 0x0ec6, + /* 0x0054 0x0323 */ + 0x1e6c, 0x0000, + /* 0x0055 0x0323 */ + 0x1ee4, 0x0000, + /* 0x0056 0x0323 */ + 0x1e7e, 0x0000, + /* 0x0057 0x0323 */ + 0x1e88, 0x0000, + /* 0x0059 0x0323 */ + 0x1ef4, 0x0000, + /* 0x005a 0x0323 */ + 0x1e92, 0x0000, + /* 0x0061 0x0323 */ + 0x1ea1, 0x0002, 0x0302, 0x0ec8, 0x0306, 0x0eca, + /* 0x0062 0x0323 */ + 0x1e05, 0x0000, + /* 0x0064 0x0323 */ + 0x1e0d, 0x0000, + /* 0x0065 0x0323 */ + 0x1eb9, 0x0001, 0x0302, 0x0ecc, + /* 0x0068 0x0323 */ + 0x1e25, 0x0000, + /* 0x0069 0x0323 */ + 0x1ecb, 0x0000, + /* 0x006b 0x0323 */ + 0x1e33, 0x0000, + /* 0x006c 0x0323 */ + 0x1e37, 0x0001, 0x0304, 0x0ece, + /* 0x006d 0x0323 */ + 0x1e43, 0x0000, + /* 0x006e 0x0323 */ + 0x1e47, 0x0000, + /* 0x006f 0x0323 */ + 0x1ecd, 0x0001, 0x0302, 0x0ed0, + /* 0x0072 0x0323 */ + 0x1e5b, 0x0001, 0x0304, 0x0ed2, + /* 0x0073 0x0323 */ + 0x1e63, 0x0001, 0x0307, 0x0ed4, + /* 0x0074 0x0323 */ + 0x1e6d, 0x0000, + /* 0x0075 0x0323 */ + 0x1ee5, 0x0000, + /* 0x0076 0x0323 */ + 0x1e7f, 0x0000, + /* 0x0077 0x0323 */ + 0x1e89, 0x0000, + /* 0x0079 0x0323 */ + 0x1ef5, 0x0000, + /* 0x007a 0x0323 */ + 0x1e93, 0x0000, + /* 0x0055 0x0324 */ + 0x1e72, 0x0000, + /* 0x0075 0x0324 */ + 0x1e73, 0x0000, + /* 0x0041 0x0325 */ + 0x1e00, 0x0000, + /* 0x0061 0x0325 */ + 0x1e01, 0x0000, + /* 0x0043 0x0327 */ + 0x00c7, 0x0001, 0x0301, 0x0ed6, + /* 0x0044 0x0327 */ + 0x1e10, 0x0000, + /* 0x0045 0x0327 */ + 0x0000, 0x0001, 0x0306, 0x0ed8, + /* 0x0047 0x0327 */ + 0x0122, 0x0000, + /* 0x0048 0x0327 */ + 0x1e28, 0x0000, + /* 0x004b 0x0327 */ + 0x0136, 0x0000, + /* 0x004c 0x0327 */ + 0x013b, 0x0000, + /* 0x004e 0x0327 */ + 0x0145, 0x0000, + /* 0x0052 0x0327 */ + 0x0156, 0x0000, + /* 0x0053 0x0327 */ + 0x015e, 0x0000, + /* 0x0054 0x0327 */ + 0x0162, 0x0000, + /* 0x0063 0x0327 */ + 0x00e7, 0x0001, 0x0301, 0x0eda, + /* 0x0064 0x0327 */ + 0x1e11, 0x0000, + /* 0x0065 0x0327 */ + 0x0000, 0x0001, 0x0306, 0x0edc, + /* 0x0067 0x0327 */ + 0x0123, 0x0000, + /* 0x0068 0x0327 */ + 0x1e29, 0x0000, + /* 0x006b 0x0327 */ + 0x0137, 0x0000, + /* 0x006c 0x0327 */ + 0x013c, 0x0000, + /* 0x006e 0x0327 */ + 0x0146, 0x0000, + /* 0x0072 0x0327 */ + 0x0157, 0x0000, + /* 0x0073 0x0327 */ + 0x015f, 0x0000, + /* 0x0074 0x0327 */ + 0x0163, 0x0000, + /* 0x0041 0x0328 */ + 0x0104, 0x0000, + /* 0x0045 0x0328 */ + 0x0118, 0x0000, + /* 0x0049 0x0328 */ + 0x012e, 0x0000, + /* 0x004f 0x0328 */ + 0x01ea, 0x0001, 0x0304, 0x0ede, + /* 0x0055 0x0328 */ + 0x0172, 0x0000, + /* 0x0061 0x0328 */ + 0x0105, 0x0000, + /* 0x0065 0x0328 */ + 0x0119, 0x0000, + /* 0x0069 0x0328 */ + 0x012f, 0x0000, + /* 0x006f 0x0328 */ + 0x01eb, 0x0001, 0x0304, 0x0ee0, + /* 0x0075 0x0328 */ + 0x0173, 0x0000, + /* 0x0044 0x032d */ + 0x1e12, 0x0000, + /* 0x0045 0x032d */ + 0x1e18, 0x0000, + /* 0x004c 0x032d */ + 0x1e3c, 0x0000, + /* 0x004e 0x032d */ + 0x1e4a, 0x0000, + /* 0x0054 0x032d */ + 0x1e70, 0x0000, + /* 0x0055 0x032d */ + 0x1e76, 0x0000, + /* 0x0064 0x032d */ + 0x1e13, 0x0000, + /* 0x0065 0x032d */ + 0x1e19, 0x0000, + /* 0x006c 0x032d */ + 0x1e3d, 0x0000, + /* 0x006e 0x032d */ + 0x1e4b, 0x0000, + /* 0x0074 0x032d */ + 0x1e71, 0x0000, + /* 0x0075 0x032d */ + 0x1e77, 0x0000, + /* 0x0048 0x032e */ + 0x1e2a, 0x0000, + /* 0x0068 0x032e */ + 0x1e2b, 0x0000, + /* 0x0045 0x0330 */ + 0x1e1a, 0x0000, + /* 0x0049 0x0330 */ + 0x1e2c, 0x0000, + /* 0x0055 0x0330 */ + 0x1e74, 0x0000, + /* 0x0065 0x0330 */ + 0x1e1b, 0x0000, + /* 0x0069 0x0330 */ + 0x1e2d, 0x0000, + /* 0x0075 0x0330 */ + 0x1e75, 0x0000, + /* 0x0042 0x0331 */ + 0x1e06, 0x0000, + /* 0x0044 0x0331 */ + 0x1e0e, 0x0000, + /* 0x004b 0x0331 */ + 0x1e34, 0x0000, + /* 0x004c 0x0331 */ + 0x1e3a, 0x0000, + /* 0x004e 0x0331 */ + 0x1e48, 0x0000, + /* 0x0052 0x0331 */ + 0x1e5e, 0x0000, + /* 0x0054 0x0331 */ + 0x1e6e, 0x0000, + /* 0x005a 0x0331 */ + 0x1e94, 0x0000, + /* 0x0062 0x0331 */ + 0x1e07, 0x0000, + /* 0x0064 0x0331 */ + 0x1e0f, 0x0000, + /* 0x0068 0x0331 */ + 0x1e96, 0x0000, + /* 0x006b 0x0331 */ + 0x1e35, 0x0000, + /* 0x006c 0x0331 */ + 0x1e3b, 0x0000, + /* 0x006e 0x0331 */ + 0x1e49, 0x0000, + /* 0x0072 0x0331 */ + 0x1e5f, 0x0000, + /* 0x0074 0x0331 */ + 0x1e6f, 0x0000, + /* 0x007a 0x0331 */ + 0x1e95, 0x0000, + /* 0x00a8 0x0342 */ + 0x1fc1, 0x0000, + /* 0x03b1 0x0342 */ + 0x1fb6, 0x0000, + /* 0x03b7 0x0342 */ + 0x1fc6, 0x0000, + /* 0x03b9 0x0342 */ + 0x1fd6, 0x0000, + /* 0x03c5 0x0342 */ + 0x1fe6, 0x0000, + /* 0x03c9 0x0342 */ + 0x1ff6, 0x0000, + /* 0x1fbf 0x0342 */ + 0x1fcf, 0x0000, + /* 0x1ffe 0x0342 */ + 0x1fdf, 0x0000, + /* 0x0391 0x0345 */ + 0x1fbc, 0x0002, 0x0313, 0x0ee2, 0x0314, 0x0eea, + /* 0x0397 0x0345 */ + 0x1fcc, 0x0002, 0x0313, 0x0ef2, 0x0314, 0x0efa, + /* 0x03a9 0x0345 */ + 0x1ffc, 0x0002, 0x0313, 0x0f02, 0x0314, 0x0f0a, + /* 0x03b1 0x0345 */ + 0x1fb3, 0x0005, 0x0300, 0x0f12, 0x0301, 0x0f14, 0x0313, 0x0f16, + 0x0314, 0x0f1e, 0x0342, 0x0f26, + /* 0x03b7 0x0345 */ + 0x1fc3, 0x0005, 0x0300, 0x0f28, 0x0301, 0x0f2a, 0x0313, 0x0f2c, + 0x0314, 0x0f34, 0x0342, 0x0f3c, + /* 0x03bf 0x0345 */ + 0x0000, 0x0001, 0x0301, 0x0f3e, + /* 0x03c9 0x0345 */ + 0x1ff3, 0x0004, 0x0300, 0x0f40, 0x0313, 0x0f42, 0x0314, 0x0f4a, + 0x0342, 0x0f52, + /* 0x05d0 0x05b7 */ + 0xfb2e, 0x0000, + /* 0x05f2 0x05b7 */ + 0xfb1f, 0x0000, + /* 0x05d0 0x05b8 */ + 0xfb2f, 0x0000, + /* 0x05d5 0x05b9 */ + 0xfb4b, 0x0000, + /* 0x05d0 0x05bc */ + 0xfb30, 0x0000, + /* 0x05d1 0x05bc */ + 0xfb31, 0x0000, + /* 0x05d2 0x05bc */ + 0xfb32, 0x0000, + /* 0x05d3 0x05bc */ + 0xfb33, 0x0000, + /* 0x05d4 0x05bc */ + 0xfb34, 0x0000, + /* 0x05d5 0x05bc */ + 0xfb35, 0x0000, + /* 0x05d6 0x05bc */ + 0xfb36, 0x0000, + /* 0x05d8 0x05bc */ + 0xfb38, 0x0000, + /* 0x05d9 0x05bc */ + 0xfb39, 0x0000, + /* 0x05da 0x05bc */ + 0xfb3a, 0x0000, + /* 0x05db 0x05bc */ + 0xfb3b, 0x0000, + /* 0x05dc 0x05bc */ + 0xfb3c, 0x0000, + /* 0x05de 0x05bc */ + 0xfb3e, 0x0000, + /* 0x05e0 0x05bc */ + 0xfb40, 0x0000, + /* 0x05e1 0x05bc */ + 0xfb41, 0x0000, + /* 0x05e3 0x05bc */ + 0xfb43, 0x0000, + /* 0x05e4 0x05bc */ + 0xfb44, 0x0000, + /* 0x05e6 0x05bc */ + 0xfb46, 0x0000, + /* 0x05e7 0x05bc */ + 0xfb47, 0x0000, + /* 0x05e8 0x05bc */ + 0xfb48, 0x0000, + /* 0x05e9 0x05bc */ + 0xfb49, 0x0002, 0x05c1, 0x0f54, 0x05c2, 0x0f56, + /* 0x05ea 0x05bc */ + 0xfb4a, 0x0000, + /* 0x05d1 0x05bf */ + 0xfb4c, 0x0000, + /* 0x05db 0x05bf */ + 0xfb4d, 0x0000, + /* 0x05e4 0x05bf */ + 0xfb4e, 0x0000, + /* 0x05e9 0x05c1 */ + 0xfb2a, 0x0000, + /* 0x05e9 0x05c2 */ + 0xfb2b, 0x0000, + /* 0x0915 0x093c */ + 0x0958, 0x0000, + /* 0x0916 0x093c */ + 0x0959, 0x0000, + /* 0x0917 0x093c */ + 0x095a, 0x0000, + /* 0x091c 0x093c */ + 0x095b, 0x0000, + /* 0x0921 0x093c */ + 0x095c, 0x0000, + /* 0x0922 0x093c */ + 0x095d, 0x0000, + /* 0x0928 0x093c */ + 0x0929, 0x0000, + /* 0x092b 0x093c */ + 0x095e, 0x0000, + /* 0x092f 0x093c */ + 0x095f, 0x0000, + /* 0x0930 0x093c */ + 0x0931, 0x0000, + /* 0x0933 0x093c */ + 0x0934, 0x0000, + /* 0x09a1 0x09bc */ + 0x09dc, 0x0000, + /* 0x09a2 0x09bc */ + 0x09dd, 0x0000, + /* 0x09ac 0x09bc */ + 0x09b0, 0x0000, + /* 0x09af 0x09bc */ + 0x09df, 0x0000, + /* 0x09c7 0x09be */ + 0x09cb, 0x0000, + /* 0x09c7 0x09d7 */ + 0x09cc, 0x0000, + /* 0x0a16 0x0a3c */ + 0x0a59, 0x0000, + /* 0x0a17 0x0a3c */ + 0x0a5a, 0x0000, + /* 0x0a1c 0x0a3c */ + 0x0a5b, 0x0000, + /* 0x0a21 0x0a3c */ + 0x0a5c, 0x0000, + /* 0x0a2b 0x0a3c */ + 0x0a5e, 0x0000, + /* 0x0b21 0x0b3c */ + 0x0b5c, 0x0000, + /* 0x0b22 0x0b3c */ + 0x0b5d, 0x0000, + /* 0x0b2f 0x0b3c */ + 0x0b5f, 0x0000, + /* 0x0b47 0x0b3e */ + 0x0b4b, 0x0000, + /* 0x0b47 0x0b56 */ + 0x0b48, 0x0000, + /* 0x0b47 0x0b57 */ + 0x0b4c, 0x0000, + /* 0x0bc6 0x0bbe */ + 0x0bca, 0x0000, + /* 0x0bc7 0x0bbe */ + 0x0bcb, 0x0000, + /* 0x0b92 0x0bd7 */ + 0x0b94, 0x0000, + /* 0x0bc6 0x0bd7 */ + 0x0bcc, 0x0000, + /* 0x0c46 0x0c56 */ + 0x0c48, 0x0000, + /* 0x0cc6 0x0cc2 */ + 0x0cca, 0x0001, 0x0cd5, 0x0f58, + /* 0x0cbf 0x0cd5 */ + 0x0cc0, 0x0000, + /* 0x0cc6 0x0cd5 */ + 0x0cc7, 0x0000, + /* 0x0cc6 0x0cd6 */ + 0x0cc8, 0x0000, + /* 0x0d46 0x0d3e */ + 0x0d4a, 0x0000, + /* 0x0d47 0x0d3e */ + 0x0d4b, 0x0000, + /* 0x0d46 0x0d57 */ + 0x0d4c, 0x0000, + /* 0x0e4d 0x0e32 */ + 0x0e33, 0x0000, + /* 0x0ecd 0x0eb2 */ + 0x0eb3, 0x0000, + /* 0x0f72 0x0f71 */ + 0x0f73, 0x0000, + /* 0x0f74 0x0f71 */ + 0x0f75, 0x0000, + /* 0x0f80 0x0f71 */ + 0x0f81, 0x0000, + /* 0x0fb2 0x0f80 */ + 0x0f76, 0x0001, 0x0f71, 0x0f5a, + /* 0x0fb3 0x0f80 */ + 0x0f78, 0x0001, 0x0f71, 0x0f5c, + /* 0x0f40 0x0fb5 */ + 0x0f69, 0x0000, + /* 0x0f90 0x0fb5 */ + 0x0fb9, 0x0000, + /* 0x0f42 0x0fb7 */ + 0x0f43, 0x0000, + /* 0x0f4c 0x0fb7 */ + 0x0f4d, 0x0000, + /* 0x0f51 0x0fb7 */ + 0x0f52, 0x0000, + /* 0x0f56 0x0fb7 */ + 0x0f57, 0x0000, + /* 0x0f5b 0x0fb7 */ + 0x0f5c, 0x0000, + /* 0x0f92 0x0fb7 */ + 0x0f93, 0x0000, + /* 0x0f9c 0x0fb7 */ + 0x0f9d, 0x0000, + /* 0x0fa1 0x0fb7 */ + 0x0fa2, 0x0000, + /* 0x0fa6 0x0fb7 */ + 0x0fa7, 0x0000, + /* 0x0fab 0x0fb7 */ + 0x0fac, 0x0000, + /* 0x3046 0x3099 */ + 0x3094, 0x0000, + /* 0x304b 0x3099 */ + 0x304c, 0x0000, + /* 0x304d 0x3099 */ + 0x304e, 0x0000, + /* 0x304f 0x3099 */ + 0x3050, 0x0000, + /* 0x3051 0x3099 */ + 0x3052, 0x0000, + /* 0x3053 0x3099 */ + 0x3054, 0x0000, + /* 0x3055 0x3099 */ + 0x3056, 0x0000, + /* 0x3057 0x3099 */ + 0x3058, 0x0000, + /* 0x3059 0x3099 */ + 0x305a, 0x0000, + /* 0x305b 0x3099 */ + 0x305c, 0x0000, + /* 0x305d 0x3099 */ + 0x305e, 0x0000, + /* 0x305f 0x3099 */ + 0x3060, 0x0000, + /* 0x3061 0x3099 */ + 0x3062, 0x0000, + /* 0x3064 0x3099 */ + 0x3065, 0x0000, + /* 0x3066 0x3099 */ + 0x3067, 0x0000, + /* 0x3068 0x3099 */ + 0x3069, 0x0000, + /* 0x306f 0x3099 */ + 0x3070, 0x0000, + /* 0x3072 0x3099 */ + 0x3073, 0x0000, + /* 0x3075 0x3099 */ + 0x3076, 0x0000, + /* 0x3078 0x3099 */ + 0x3079, 0x0000, + /* 0x307b 0x3099 */ + 0x307c, 0x0000, + /* 0x309d 0x3099 */ + 0x309e, 0x0000, + /* 0x30a6 0x3099 */ + 0x30f4, 0x0000, + /* 0x30ab 0x3099 */ + 0x30ac, 0x0000, + /* 0x30ad 0x3099 */ + 0x30ae, 0x0000, + /* 0x30af 0x3099 */ + 0x30b0, 0x0000, + /* 0x30b1 0x3099 */ + 0x30b2, 0x0000, + /* 0x30b3 0x3099 */ + 0x30b4, 0x0000, + /* 0x30b5 0x3099 */ + 0x30b6, 0x0000, + /* 0x30b7 0x3099 */ + 0x30b8, 0x0000, + /* 0x30b9 0x3099 */ + 0x30ba, 0x0000, + /* 0x30bb 0x3099 */ + 0x30bc, 0x0000, + /* 0x30bd 0x3099 */ + 0x30be, 0x0000, + /* 0x30bf 0x3099 */ + 0x30c0, 0x0000, + /* 0x30c1 0x3099 */ + 0x30c2, 0x0000, + /* 0x30c4 0x3099 */ + 0x30c5, 0x0000, + /* 0x30c6 0x3099 */ + 0x30c7, 0x0000, + /* 0x30c8 0x3099 */ + 0x30c9, 0x0000, + /* 0x30cf 0x3099 */ + 0x30d0, 0x0000, + /* 0x30d2 0x3099 */ + 0x30d3, 0x0000, + /* 0x30d5 0x3099 */ + 0x30d6, 0x0000, + /* 0x30d8 0x3099 */ + 0x30d9, 0x0000, + /* 0x30db 0x3099 */ + 0x30dc, 0x0000, + /* 0x30ef 0x3099 */ + 0x30f7, 0x0000, + /* 0x30f0 0x3099 */ + 0x30f8, 0x0000, + /* 0x30f1 0x3099 */ + 0x30f9, 0x0000, + /* 0x30f2 0x3099 */ + 0x30fa, 0x0000, + /* 0x30fd 0x3099 */ + 0x30fe, 0x0000, + /* 0x306f 0x309a */ + 0x3071, 0x0000, + /* 0x3072 0x309a */ + 0x3074, 0x0000, + /* 0x3075 0x309a */ + 0x3077, 0x0000, + /* 0x3078 0x309a */ + 0x307a, 0x0000, + /* 0x307b 0x309a */ + 0x307d, 0x0000, + /* 0x30cf 0x309a */ + 0x30d1, 0x0000, + /* 0x30d2 0x309a */ + 0x30d4, 0x0000, + /* 0x30d5 0x309a */ + 0x30d7, 0x0000, + /* 0x30d8 0x309a */ + 0x30da, 0x0000, + /* 0x30db 0x309a */ + 0x30dd, 0x0000, + /* 0x0307 0x0053 0x0301 */ + 0x1e64, 0x0000, + /* 0x0307 0x0073 0x0301 */ + 0x1e65, 0x0000, + /* 0x0300 0x0041 0x0302 */ + 0x1ea6, 0x0000, + /* 0x0301 0x0041 0x0302 */ + 0x1ea4, 0x0000, + /* 0x0303 0x0041 0x0302 */ + 0x1eaa, 0x0000, + /* 0x0309 0x0041 0x0302 */ + 0x1ea8, 0x0000, + /* 0x0300 0x0045 0x0302 */ + 0x1ec0, 0x0000, + /* 0x0301 0x0045 0x0302 */ + 0x1ebe, 0x0000, + /* 0x0303 0x0045 0x0302 */ + 0x1ec4, 0x0000, + /* 0x0309 0x0045 0x0302 */ + 0x1ec2, 0x0000, + /* 0x0300 0x004f 0x0302 */ + 0x1ed2, 0x0000, + /* 0x0301 0x004f 0x0302 */ + 0x1ed0, 0x0000, + /* 0x0303 0x004f 0x0302 */ + 0x1ed6, 0x0000, + /* 0x0309 0x004f 0x0302 */ + 0x1ed4, 0x0000, + /* 0x0300 0x0061 0x0302 */ + 0x1ea7, 0x0000, + /* 0x0301 0x0061 0x0302 */ + 0x1ea5, 0x0000, + /* 0x0303 0x0061 0x0302 */ + 0x1eab, 0x0000, + /* 0x0309 0x0061 0x0302 */ + 0x1ea9, 0x0000, + /* 0x0300 0x0065 0x0302 */ + 0x1ec1, 0x0000, + /* 0x0301 0x0065 0x0302 */ + 0x1ebf, 0x0000, + /* 0x0303 0x0065 0x0302 */ + 0x1ec5, 0x0000, + /* 0x0309 0x0065 0x0302 */ + 0x1ec3, 0x0000, + /* 0x0300 0x006f 0x0302 */ + 0x1ed3, 0x0000, + /* 0x0301 0x006f 0x0302 */ + 0x1ed1, 0x0000, + /* 0x0303 0x006f 0x0302 */ + 0x1ed7, 0x0000, + /* 0x0309 0x006f 0x0302 */ + 0x1ed5, 0x0000, + /* 0x0301 0x004f 0x0303 */ + 0x1e4c, 0x0000, + /* 0x0308 0x004f 0x0303 */ + 0x1e4e, 0x0000, + /* 0x0301 0x0055 0x0303 */ + 0x1e78, 0x0000, + /* 0x0301 0x006f 0x0303 */ + 0x1e4d, 0x0000, + /* 0x0308 0x006f 0x0303 */ + 0x1e4f, 0x0000, + /* 0x0301 0x0075 0x0303 */ + 0x1e79, 0x0000, + /* 0x0300 0x0045 0x0304 */ + 0x1e14, 0x0000, + /* 0x0301 0x0045 0x0304 */ + 0x1e16, 0x0000, + /* 0x0300 0x004f 0x0304 */ + 0x1e50, 0x0000, + /* 0x0301 0x004f 0x0304 */ + 0x1e52, 0x0000, + /* 0x0308 0x0055 0x0304 */ + 0x1e7a, 0x0000, + /* 0x0300 0x0065 0x0304 */ + 0x1e15, 0x0000, + /* 0x0301 0x0065 0x0304 */ + 0x1e17, 0x0000, + /* 0x0300 0x006f 0x0304 */ + 0x1e51, 0x0000, + /* 0x0301 0x006f 0x0304 */ + 0x1e53, 0x0000, + /* 0x0308 0x0075 0x0304 */ + 0x1e7b, 0x0000, + /* 0x0300 0x0041 0x0306 */ + 0x1eb0, 0x0000, + /* 0x0301 0x0041 0x0306 */ + 0x1eae, 0x0000, + /* 0x0303 0x0041 0x0306 */ + 0x1eb4, 0x0000, + /* 0x0309 0x0041 0x0306 */ + 0x1eb2, 0x0000, + /* 0x0300 0x0061 0x0306 */ + 0x1eb1, 0x0000, + /* 0x0301 0x0061 0x0306 */ + 0x1eaf, 0x0000, + /* 0x0303 0x0061 0x0306 */ + 0x1eb5, 0x0000, + /* 0x0309 0x0061 0x0306 */ + 0x1eb3, 0x0000, + /* 0x0304 0x0041 0x0307 */ + 0x01e0, 0x0000, + /* 0x0304 0x0061 0x0307 */ + 0x01e1, 0x0000, + /* 0x0304 0x0041 0x0308 */ + 0x01de, 0x0000, + /* 0x0301 0x0049 0x0308 */ + 0x1e2e, 0x0000, + /* 0x0300 0x0055 0x0308 */ + 0x01db, 0x0000, + /* 0x0301 0x0055 0x0308 */ + 0x01d7, 0x0000, + /* 0x0304 0x0055 0x0308 */ + 0x01d5, 0x0000, + /* 0x030c 0x0055 0x0308 */ + 0x01d9, 0x0000, + /* 0x0304 0x0061 0x0308 */ + 0x01df, 0x0000, + /* 0x0301 0x0069 0x0308 */ + 0x1e2f, 0x0000, + /* 0x0300 0x0075 0x0308 */ + 0x01dc, 0x0000, + /* 0x0301 0x0075 0x0308 */ + 0x01d8, 0x0000, + /* 0x0304 0x0075 0x0308 */ + 0x01d6, 0x0000, + /* 0x030c 0x0075 0x0308 */ + 0x01da, 0x0000, + /* 0x0300 0x03b9 0x0308 */ + 0x1fd2, 0x0000, + /* 0x0301 0x03b9 0x0308 */ + 0x1fd3, 0x0000, + /* 0x030d 0x03b9 0x0308 */ + 0x0390, 0x0000, + /* 0x0342 0x03b9 0x0308 */ + 0x1fd7, 0x0000, + /* 0x0300 0x03c5 0x0308 */ + 0x1fe2, 0x0000, + /* 0x0301 0x03c5 0x0308 */ + 0x1fe3, 0x0000, + /* 0x030d 0x03c5 0x0308 */ + 0x03b0, 0x0000, + /* 0x0342 0x03c5 0x0308 */ + 0x1fe7, 0x0000, + /* 0x0301 0x0041 0x030a */ + 0x01fa, 0x0000, + /* 0x0301 0x0061 0x030a */ + 0x01fb, 0x0000, + /* 0x0307 0x0053 0x030c */ + 0x1e66, 0x0000, + /* 0x0307 0x0073 0x030c */ + 0x1e67, 0x0000, + /* 0x0300 0x0391 0x0313 */ + 0x1f0a, 0x0000, + /* 0x0301 0x0391 0x0313 */ + 0x1f0c, 0x0000, + /* 0x0342 0x0391 0x0313 */ + 0x1f0e, 0x0000, + /* 0x0300 0x0395 0x0313 */ + 0x1f1a, 0x0000, + /* 0x0301 0x0395 0x0313 */ + 0x1f1c, 0x0000, + /* 0x0300 0x0397 0x0313 */ + 0x1f2a, 0x0000, + /* 0x0301 0x0397 0x0313 */ + 0x1f2c, 0x0000, + /* 0x0342 0x0397 0x0313 */ + 0x1f2e, 0x0000, + /* 0x0300 0x0399 0x0313 */ + 0x1f3a, 0x0000, + /* 0x0301 0x0399 0x0313 */ + 0x1f3c, 0x0000, + /* 0x0342 0x0399 0x0313 */ + 0x1f3e, 0x0000, + /* 0x0300 0x039f 0x0313 */ + 0x1f4a, 0x0000, + /* 0x0301 0x039f 0x0313 */ + 0x1f4c, 0x0000, + /* 0x0300 0x03a9 0x0313 */ + 0x1f6a, 0x0000, + /* 0x0301 0x03a9 0x0313 */ + 0x1f6c, 0x0000, + /* 0x0342 0x03a9 0x0313 */ + 0x1f6e, 0x0000, + /* 0x0300 0x03b1 0x0313 */ + 0x1f02, 0x0000, + /* 0x0301 0x03b1 0x0313 */ + 0x1f04, 0x0000, + /* 0x0342 0x03b1 0x0313 */ + 0x1f06, 0x0000, + /* 0x0300 0x03b5 0x0313 */ + 0x1f12, 0x0000, + /* 0x0301 0x03b5 0x0313 */ + 0x1f14, 0x0000, + /* 0x0300 0x03b7 0x0313 */ + 0x1f22, 0x0000, + /* 0x0301 0x03b7 0x0313 */ + 0x1f24, 0x0000, + /* 0x0342 0x03b7 0x0313 */ + 0x1f26, 0x0000, + /* 0x0300 0x03b9 0x0313 */ + 0x1f32, 0x0000, + /* 0x0301 0x03b9 0x0313 */ + 0x1f34, 0x0000, + /* 0x0342 0x03b9 0x0313 */ + 0x1f36, 0x0000, + /* 0x0300 0x03bf 0x0313 */ + 0x1f42, 0x0000, + /* 0x0301 0x03bf 0x0313 */ + 0x1f44, 0x0000, + /* 0x0300 0x03c5 0x0313 */ + 0x1f52, 0x0000, + /* 0x0301 0x03c5 0x0313 */ + 0x1f54, 0x0000, + /* 0x0342 0x03c5 0x0313 */ + 0x1f56, 0x0000, + /* 0x0300 0x03c9 0x0313 */ + 0x1f62, 0x0000, + /* 0x0301 0x03c9 0x0313 */ + 0x1f64, 0x0000, + /* 0x0342 0x03c9 0x0313 */ + 0x1f66, 0x0000, + /* 0x0300 0x0391 0x0314 */ + 0x1f0b, 0x0000, + /* 0x0301 0x0391 0x0314 */ + 0x1f0d, 0x0000, + /* 0x0342 0x0391 0x0314 */ + 0x1f0f, 0x0000, + /* 0x0300 0x0395 0x0314 */ + 0x1f1b, 0x0000, + /* 0x0301 0x0395 0x0314 */ + 0x1f1d, 0x0000, + /* 0x0300 0x0397 0x0314 */ + 0x1f2b, 0x0000, + /* 0x0301 0x0397 0x0314 */ + 0x1f2d, 0x0000, + /* 0x0342 0x0397 0x0314 */ + 0x1f2f, 0x0000, + /* 0x0300 0x0399 0x0314 */ + 0x1f3b, 0x0000, + /* 0x0301 0x0399 0x0314 */ + 0x1f3d, 0x0000, + /* 0x0342 0x0399 0x0314 */ + 0x1f3f, 0x0000, + /* 0x0300 0x039f 0x0314 */ + 0x1f4b, 0x0000, + /* 0x0301 0x039f 0x0314 */ + 0x1f4d, 0x0000, + /* 0x0300 0x03a5 0x0314 */ + 0x1f5b, 0x0000, + /* 0x0301 0x03a5 0x0314 */ + 0x1f5d, 0x0000, + /* 0x0342 0x03a5 0x0314 */ + 0x1f5f, 0x0000, + /* 0x0300 0x03a9 0x0314 */ + 0x1f6b, 0x0000, + /* 0x0301 0x03a9 0x0314 */ + 0x1f6d, 0x0000, + /* 0x0342 0x03a9 0x0314 */ + 0x1f6f, 0x0000, + /* 0x0300 0x03b1 0x0314 */ + 0x1f03, 0x0000, + /* 0x0301 0x03b1 0x0314 */ + 0x1f05, 0x0000, + /* 0x0342 0x03b1 0x0314 */ + 0x1f07, 0x0000, + /* 0x0300 0x03b5 0x0314 */ + 0x1f13, 0x0000, + /* 0x0301 0x03b5 0x0314 */ + 0x1f15, 0x0000, + /* 0x0300 0x03b7 0x0314 */ + 0x1f23, 0x0000, + /* 0x0301 0x03b7 0x0314 */ + 0x1f25, 0x0000, + /* 0x0342 0x03b7 0x0314 */ + 0x1f27, 0x0000, + /* 0x0300 0x03b9 0x0314 */ + 0x1f33, 0x0000, + /* 0x0301 0x03b9 0x0314 */ + 0x1f35, 0x0000, + /* 0x0342 0x03b9 0x0314 */ + 0x1f37, 0x0000, + /* 0x0300 0x03bf 0x0314 */ + 0x1f43, 0x0000, + /* 0x0301 0x03bf 0x0314 */ + 0x1f45, 0x0000, + /* 0x0300 0x03c5 0x0314 */ + 0x1f53, 0x0000, + /* 0x0301 0x03c5 0x0314 */ + 0x1f55, 0x0000, + /* 0x0342 0x03c5 0x0314 */ + 0x1f57, 0x0000, + /* 0x0300 0x03c9 0x0314 */ + 0x1f63, 0x0000, + /* 0x0301 0x03c9 0x0314 */ + 0x1f65, 0x0000, + /* 0x0342 0x03c9 0x0314 */ + 0x1f67, 0x0000, + /* 0x0300 0x004f 0x031b */ + 0x1edc, 0x0000, + /* 0x0301 0x004f 0x031b */ + 0x1eda, 0x0000, + /* 0x0303 0x004f 0x031b */ + 0x1ee0, 0x0000, + /* 0x0309 0x004f 0x031b */ + 0x1ede, 0x0000, + /* 0x0323 0x004f 0x031b */ + 0x1ee2, 0x0000, + /* 0x0300 0x0055 0x031b */ + 0x1eea, 0x0000, + /* 0x0301 0x0055 0x031b */ + 0x1ee8, 0x0000, + /* 0x0303 0x0055 0x031b */ + 0x1eee, 0x0000, + /* 0x0309 0x0055 0x031b */ + 0x1eec, 0x0000, + /* 0x0323 0x0055 0x031b */ + 0x1ef0, 0x0000, + /* 0x0300 0x006f 0x031b */ + 0x1edd, 0x0000, + /* 0x0301 0x006f 0x031b */ + 0x1edb, 0x0000, + /* 0x0303 0x006f 0x031b */ + 0x1ee1, 0x0000, + /* 0x0309 0x006f 0x031b */ + 0x1edf, 0x0000, + /* 0x0323 0x006f 0x031b */ + 0x1ee3, 0x0000, + /* 0x0300 0x0075 0x031b */ + 0x1eeb, 0x0000, + /* 0x0301 0x0075 0x031b */ + 0x1ee9, 0x0000, + /* 0x0303 0x0075 0x031b */ + 0x1eef, 0x0000, + /* 0x0309 0x0075 0x031b */ + 0x1eed, 0x0000, + /* 0x0323 0x0075 0x031b */ + 0x1ef1, 0x0000, + /* 0x0302 0x0041 0x0323 */ + 0x1eac, 0x0000, + /* 0x0306 0x0041 0x0323 */ + 0x1eb6, 0x0000, + /* 0x0302 0x0045 0x0323 */ + 0x1ec6, 0x0000, + /* 0x0304 0x004c 0x0323 */ + 0x1e38, 0x0000, + /* 0x0302 0x004f 0x0323 */ + 0x1ed8, 0x0000, + /* 0x0304 0x0052 0x0323 */ + 0x1e5c, 0x0000, + /* 0x0307 0x0053 0x0323 */ + 0x1e68, 0x0000, + /* 0x0302 0x0061 0x0323 */ + 0x1ead, 0x0000, + /* 0x0306 0x0061 0x0323 */ + 0x1eb7, 0x0000, + /* 0x0302 0x0065 0x0323 */ + 0x1ec7, 0x0000, + /* 0x0304 0x006c 0x0323 */ + 0x1e39, 0x0000, + /* 0x0302 0x006f 0x0323 */ + 0x1ed9, 0x0000, + /* 0x0304 0x0072 0x0323 */ + 0x1e5d, 0x0000, + /* 0x0307 0x0073 0x0323 */ + 0x1e69, 0x0000, + /* 0x0301 0x0043 0x0327 */ + 0x1e08, 0x0000, + /* 0x0306 0x0045 0x0327 */ + 0x1e1c, 0x0000, + /* 0x0301 0x0063 0x0327 */ + 0x1e09, 0x0000, + /* 0x0306 0x0065 0x0327 */ + 0x1e1d, 0x0000, + /* 0x0304 0x004f 0x0328 */ + 0x01ec, 0x0000, + /* 0x0304 0x006f 0x0328 */ + 0x01ed, 0x0000, + /* 0x0313 0x0391 0x0345 */ + 0x1f88, 0x0003, 0x0300, 0x0f5e, 0x0301, 0x0f60, 0x0342, 0x0f62, + /* 0x0314 0x0391 0x0345 */ + 0x1f89, 0x0003, 0x0300, 0x0f64, 0x0301, 0x0f66, 0x0342, 0x0f68, + /* 0x0313 0x0397 0x0345 */ + 0x1f98, 0x0003, 0x0300, 0x0f6a, 0x0301, 0x0f6c, 0x0342, 0x0f6e, + /* 0x0314 0x0397 0x0345 */ + 0x1f99, 0x0003, 0x0300, 0x0f70, 0x0301, 0x0f72, 0x0342, 0x0f74, + /* 0x0313 0x03a9 0x0345 */ + 0x1fa8, 0x0003, 0x0300, 0x0f76, 0x0301, 0x0f78, 0x0342, 0x0f7a, + /* 0x0314 0x03a9 0x0345 */ + 0x1fa9, 0x0003, 0x0300, 0x0f7c, 0x0301, 0x0f7e, 0x0342, 0x0f80, + /* 0x0300 0x03b1 0x0345 */ + 0x1fb2, 0x0000, + /* 0x0301 0x03b1 0x0345 */ + 0x1fb4, 0x0000, + /* 0x0313 0x03b1 0x0345 */ + 0x1f80, 0x0003, 0x0300, 0x0f82, 0x0301, 0x0f84, 0x0342, 0x0f86, + /* 0x0314 0x03b1 0x0345 */ + 0x1f81, 0x0003, 0x0300, 0x0f88, 0x0301, 0x0f8a, 0x0342, 0x0f8c, + /* 0x0342 0x03b1 0x0345 */ + 0x1fb7, 0x0000, + /* 0x0300 0x03b7 0x0345 */ + 0x1fc2, 0x0000, + /* 0x0301 0x03b7 0x0345 */ + 0x1fc4, 0x0000, + /* 0x0313 0x03b7 0x0345 */ + 0x1f90, 0x0003, 0x0300, 0x0f8e, 0x0301, 0x0f90, 0x0342, 0x0f92, + /* 0x0314 0x03b7 0x0345 */ + 0x1f91, 0x0003, 0x0300, 0x0f94, 0x0301, 0x0f96, 0x0342, 0x0f98, + /* 0x0342 0x03b7 0x0345 */ + 0x1fc7, 0x0000, + /* 0x0301 0x03bf 0x0345 */ + 0x1ff4, 0x0000, + /* 0x0300 0x03c9 0x0345 */ + 0x1ff2, 0x0000, + /* 0x0313 0x03c9 0x0345 */ + 0x1fa0, 0x0003, 0x0300, 0x0f9a, 0x0301, 0x0f9c, 0x0342, 0x0f9e, + /* 0x0314 0x03c9 0x0345 */ + 0x1fa1, 0x0003, 0x0300, 0x0fa0, 0x0301, 0x0fa2, 0x0342, 0x0fa4, + /* 0x0342 0x03c9 0x0345 */ + 0x1ff7, 0x0000, + /* 0x05c1 0x05e9 0x05bc */ + 0xfb2c, 0x0000, + /* 0x05c2 0x05e9 0x05bc */ + 0xfb2d, 0x0000, + /* 0x0cd5 0x0cc6 0x0cc2 */ + 0x0ccb, 0x0000, + /* 0x0f71 0x0fb2 0x0f80 */ + 0x0f77, 0x0000, + /* 0x0f71 0x0fb3 0x0f80 */ + 0x0f79, 0x0000, + /* 0x0300 0x0313 0x0391 0x0345 */ + 0x1f8a, 0x0000, + /* 0x0301 0x0313 0x0391 0x0345 */ + 0x1f8c, 0x0000, + /* 0x0342 0x0313 0x0391 0x0345 */ + 0x1f8e, 0x0000, + /* 0x0300 0x0314 0x0391 0x0345 */ + 0x1f8b, 0x0000, + /* 0x0301 0x0314 0x0391 0x0345 */ + 0x1f8d, 0x0000, + /* 0x0342 0x0314 0x0391 0x0345 */ + 0x1f8f, 0x0000, + /* 0x0300 0x0313 0x0397 0x0345 */ + 0x1f9a, 0x0000, + /* 0x0301 0x0313 0x0397 0x0345 */ + 0x1f9c, 0x0000, + /* 0x0342 0x0313 0x0397 0x0345 */ + 0x1f9e, 0x0000, + /* 0x0300 0x0314 0x0397 0x0345 */ + 0x1f9b, 0x0000, + /* 0x0301 0x0314 0x0397 0x0345 */ + 0x1f9d, 0x0000, + /* 0x0342 0x0314 0x0397 0x0345 */ + 0x1f9f, 0x0000, + /* 0x0300 0x0313 0x03a9 0x0345 */ + 0x1faa, 0x0000, + /* 0x0301 0x0313 0x03a9 0x0345 */ + 0x1fac, 0x0000, + /* 0x0342 0x0313 0x03a9 0x0345 */ + 0x1fae, 0x0000, + /* 0x0300 0x0314 0x03a9 0x0345 */ + 0x1fab, 0x0000, + /* 0x0301 0x0314 0x03a9 0x0345 */ + 0x1fad, 0x0000, + /* 0x0342 0x0314 0x03a9 0x0345 */ + 0x1faf, 0x0000, + /* 0x0300 0x0313 0x03b1 0x0345 */ + 0x1f82, 0x0000, + /* 0x0301 0x0313 0x03b1 0x0345 */ + 0x1f84, 0x0000, + /* 0x0342 0x0313 0x03b1 0x0345 */ + 0x1f86, 0x0000, + /* 0x0300 0x0314 0x03b1 0x0345 */ + 0x1f83, 0x0000, + /* 0x0301 0x0314 0x03b1 0x0345 */ + 0x1f85, 0x0000, + /* 0x0342 0x0314 0x03b1 0x0345 */ + 0x1f87, 0x0000, + /* 0x0300 0x0313 0x03b7 0x0345 */ + 0x1f92, 0x0000, + /* 0x0301 0x0313 0x03b7 0x0345 */ + 0x1f94, 0x0000, + /* 0x0342 0x0313 0x03b7 0x0345 */ + 0x1f96, 0x0000, + /* 0x0300 0x0314 0x03b7 0x0345 */ + 0x1f93, 0x0000, + /* 0x0301 0x0314 0x03b7 0x0345 */ + 0x1f95, 0x0000, + /* 0x0342 0x0314 0x03b7 0x0345 */ + 0x1f97, 0x0000, + /* 0x0300 0x0313 0x03c9 0x0345 */ + 0x1fa2, 0x0000, + /* 0x0301 0x0313 0x03c9 0x0345 */ + 0x1fa4, 0x0000, + /* 0x0342 0x0313 0x03c9 0x0345 */ + 0x1fa6, 0x0000, + /* 0x0300 0x0314 0x03c9 0x0345 */ + 0x1fa3, 0x0000, + /* 0x0301 0x0314 0x03c9 0x0345 */ + 0x1fa5, 0x0000, + /* 0x0342 0x0314 0x03c9 0x0345 */ + 0x1fa7, 0x0000, }; diff -Nru a/fs/hfsplus/unicode.c b/fs/hfsplus/unicode.c --- a/fs/hfsplus/unicode.c 2005-03-30 16:58:49 -08:00 +++ b/fs/hfsplus/unicode.c 2005-03-30 16:58:49 -08:00 @@ -19,9 +19,9 @@ { u16 tmp; - tmp = case_fold_table[(c>>8)]; + tmp = hfsplus_case_fold_table[c >> 8]; if (tmp) - tmp = case_fold_table[tmp + (c & 0xFF)]; + tmp = hfsplus_case_fold_table[tmp + (c & 0xff)]; else tmp = c; return tmp; @@ -59,69 +59,175 @@ } } -int hfsplus_uni2asc(const struct hfsplus_unistr *ustr, char *astr, int *len) +#define Hangul_SBase 0xac00 +#define Hangul_LBase 0x1100 +#define Hangul_VBase 0x1161 +#define Hangul_TBase 0x11a7 +#define Hangul_SCount 11172 +#define Hangul_LCount 19 +#define Hangul_VCount 21 +#define Hangul_TCount 28 +#define Hangul_NCount (Hangul_VCount * Hangul_TCount) + + +static u16 *hfsplus_compose_lookup(u16 *p, u16 cc) +{ + int i, s, e; + + s = 1; + e = p[1]; + if (!e || cc < p[s * 2] || cc > p[e * 2]) + return NULL; + do { + i = (s + e) / 2; + if (cc > p[i * 2]) + s = i + 1; + else if (cc < p[i * 2]) + e = i - 1; + else + return hfsplus_compose_table + p[i * 2 + 1]; + } while (s <= e); + return NULL; +} + +int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr, char *astr, int *len_p) { const hfsplus_unichr *ip; + struct nls_table *nls = HFSPLUS_SB(sb).nls; u8 *op; - u16 ustrlen, cc; - int size, tmp; + u16 cc, c0, c1; + u16 *ce1, *ce2; + int i, len, ustrlen, res, compose; op = astr; ip = ustr->unicode; ustrlen = be16_to_cpu(ustr->length); - tmp = *len; - while (ustrlen > 0 && tmp > 0) { - cc = be16_to_cpu(*ip); - switch (cc) { + len = *len_p; + ce1 = NULL; + compose = !(HFSPLUS_SB(sb).flags & HFSPLUS_SB_NODECOMPOSE); + + while (ustrlen > 0) { + c0 = be16_to_cpu(*ip++); + ustrlen--; + /* search for single decomposed char */ + if (likely(compose)) + ce1 = hfsplus_compose_lookup(hfsplus_compose_table, c0); + if (ce1 && (cc = ce1[0])) { + /* start of a possibly decomposed Hangul char */ + if (cc != 0xffff) + goto done; + if (!ustrlen) + goto same; + c1 = be16_to_cpu(*ip) - Hangul_VBase; + if (c1 < Hangul_VCount) { + /* compose the Hangul char */ + cc = (c0 - Hangul_LBase) * Hangul_VCount; + cc = (cc + c1) * Hangul_TCount; + cc += Hangul_SBase; + ip++; + ustrlen--; + if (!ustrlen) + goto done; + c1 = be16_to_cpu(*ip) - Hangul_TBase; + if (c1 > 0 && c1 < Hangul_TCount) { + cc += c1; + ip++; + ustrlen--; + } + goto done; + } + } + while (1) { + /* main loop for common case of not composed chars */ + if (!ustrlen) + goto same; + c1 = be16_to_cpu(*ip); + if (likely(compose)) + ce1 = hfsplus_compose_lookup(hfsplus_compose_table, c1); + if (ce1) + break; + switch (c0) { + case 0: + c0 = 0x2400; + break; + case '/': + c0 = ':'; + break; + } + res = nls->uni2char(c0, op, len); + if (res < 0) { + if (res == -ENAMETOOLONG) + goto out; + *op = '?'; + res = 1; + } + op += res; + len -= res; + c0 = c1; + ip++; + ustrlen--; + } + ce2 = hfsplus_compose_lookup(ce1, c0); + if (ce2) { + i = 1; + while (i < ustrlen) { + ce1 = hfsplus_compose_lookup(ce2, be16_to_cpu(ip[i])); + if (!ce1) + break; + i++; + ce2 = ce1; + } + if ((cc = ce2[0])) { + ip += i; + ustrlen -= i; + goto done; + } + } + same: + switch (c0) { case 0: cc = 0x2400; break; case '/': cc = ':'; break; + default: + cc = c0; } - if (cc > 0x7f) { - size = utf8_wctomb(op, cc, tmp); - if (size == -1) { - /* ignore */ - } else { - op += size; - tmp -= size; - } - } else { - *op++ = (u8) cc; - tmp--; + done: + res = nls->uni2char(cc, op, len); + if (res < 0) { + if (res == -ENAMETOOLONG) + goto out; + *op = '?'; + res = 1; } - ip++; - ustrlen--; + op += res; + len -= res; } - *len = (char *)op - astr; - if (ustrlen) - return -ENAMETOOLONG; - return 0; + res = 0; +out: + *len_p = (char *)op - astr; + return res; } -int hfsplus_asc2uni(struct hfsplus_unistr *ustr, const char *astr, int len) +int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr, const char *astr, int len) { - int tmp; + struct nls_table *nls = HFSPLUS_SB(sb).nls; + int size, off, decompose; wchar_t c; u16 outlen = 0; - while (outlen <= HFSPLUS_MAX_STRLEN && len > 0) { - if (*astr & 0x80) { - tmp = utf8_mbtowc(&c, astr, len); - if (tmp < 0) { - astr++; - len--; - continue; - } else { - astr += tmp; - len -= tmp; - } - } else { - c = *astr++; - len--; + decompose = !(HFSPLUS_SB(sb).flags & HFSPLUS_SB_NODECOMPOSE); + + while (outlen < HFSPLUS_MAX_STRLEN && len > 0) { + size = nls->char2uni(astr, len, &c); + if (size <= 0) { + c = '?'; + size = 1; } + astr += size; + len -= size; switch (c) { case 0x2400: c = 0; @@ -130,8 +236,33 @@ c = '/'; break; } - ustr->unicode[outlen] = cpu_to_be16(c); - outlen++; + if (c >= 0xc0 && decompose) { + off = hfsplus_decompose_table[(c >> 12) & 0xf]; + if (!off) + goto done; + if (off == 0xffff) { + goto done; + } + off = hfsplus_decompose_table[off + ((c >> 8) & 0xf)]; + if (!off) + goto done; + off = hfsplus_decompose_table[off + ((c >> 4) & 0xf)]; + if (!off) + goto done; + off = hfsplus_decompose_table[off + (c & 0xf)]; + size = off & 3; + if (!size) + goto done; + off /= 4; + if (outlen + size > HFSPLUS_MAX_STRLEN) + break; + do { + ustr->unicode[outlen++] = cpu_to_be16(hfsplus_decompose_table[off++]); + } while (--size > 0); + continue; + } + done: + ustr->unicode[outlen++] = cpu_to_be16(c); } ustr->length = cpu_to_be16(outlen); if (len > 0) diff -Nru a/fs/hostfs/Makefile b/fs/hostfs/Makefile --- a/fs/hostfs/Makefile 2005-03-30 16:58:48 -08:00 +++ b/fs/hostfs/Makefile 2005-03-30 16:58:48 -08:00 @@ -5,13 +5,7 @@ hostfs-objs := hostfs_kern.o hostfs_user.o -obj-y = +obj-y := obj-$(CONFIG_HOSTFS) += hostfs.o -SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) - -USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(SINGLE_OBJS)) -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +include arch/um/scripts/Makefile.rules diff -Nru a/fs/hpfs/hpfs.h b/fs/hpfs/hpfs.h --- a/fs/hpfs/hpfs.h 2005-03-30 16:58:50 -08:00 +++ b/fs/hpfs/hpfs.h 2005-03-30 16:58:50 -08:00 @@ -27,6 +27,8 @@ typedef secno fnode_secno; /* sector number of an fnode */ typedef secno anode_secno; /* sector number of an anode */ +typedef u32 time32_t; /* 32-bit time_t type */ + /* sector 0 */ /* The boot block is very like a FAT boot block, except that the @@ -84,9 +86,9 @@ unsigned zero1; /* 0 */ secno badblocks; /* bad block list */ unsigned zero3; /* 0 */ - time_t last_chkdsk; /* date last checked, 0 if never */ + time32_t last_chkdsk; /* date last checked, 0 if never */ /*unsigned zero4;*/ /* 0 */ - time_t last_optimize; /* date last optimized, 0 if never */ + time32_t last_optimize; /* date last optimized, 0 if never */ secno n_dir_band; /* number of sectors in dir band */ secno dir_band_start; /* first sector in dir band */ secno dir_band_end; /* last sector in dir band */ @@ -287,10 +289,10 @@ unsigned not_8x3: 1; /* name is not 8.3 */ unsigned flag15: 1; fnode_secno fnode; /* fnode giving allocation info */ - time_t write_date; /* mtime */ + time32_t write_date; /* mtime */ unsigned file_size; /* file length, bytes */ - time_t read_date; /* atime */ - time_t creation_date; /* ctime */ + time32_t read_date; /* atime */ + time32_t creation_date; /* ctime */ unsigned ea_size; /* total EA length, bytes */ unsigned char no_of_acls : 3; /* number of ACL's */ unsigned char reserver : 5; diff -Nru a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h --- a/fs/hpfs/hpfs_fn.h 2005-03-30 16:58:49 -08:00 +++ b/fs/hpfs/hpfs_fn.h 2005-03-30 16:58:49 -08:00 @@ -325,13 +325,13 @@ * local time (HPFS) to GMT (Unix) */ -static inline time_t local_to_gmt(struct super_block *s, time_t t) +static inline time_t local_to_gmt(struct super_block *s, time32_t t) { extern struct timezone sys_tz; return t + sys_tz.tz_minuteswest * 60 + hpfs_sb(s)->sb_timeshift; } -static inline time_t gmt_to_local(struct super_block *s, time_t t) +static inline time32_t gmt_to_local(struct super_block *s, time_t t) { extern struct timezone sys_tz; return t - sys_tz.tz_minuteswest * 60 - hpfs_sb(s)->sb_timeshift; diff -Nru a/fs/hppfs/Makefile b/fs/hppfs/Makefile --- a/fs/hppfs/Makefile 2005-03-30 16:58:47 -08:00 +++ b/fs/hppfs/Makefile 2005-03-30 16:58:47 -08:00 @@ -7,13 +7,3 @@ obj-y = obj-$(CONFIG_HPPFS) += hppfs.o - -clean: - -modules: - -fastdep: - -dep: - -archmrproper: clean diff -Nru a/fs/isofs/rock.c b/fs/isofs/rock.c --- a/fs/isofs/rock.c 2005-03-30 16:58:49 -08:00 +++ b/fs/isofs/rock.c 2005-03-30 16:58:49 -08:00 @@ -74,6 +74,10 @@ offset1 = 0; \ pbh = sb_bread(DEV->i_sb, block); \ if(pbh){ \ + if (offset > pbh->b_size || offset + cont_size > pbh->b_size){ \ + brelse(pbh); \ + goto out; \ + } \ memcpy(buffer + offset1, pbh->b_data + offset, cont_size - offset1); \ brelse(pbh); \ chr = (unsigned char *) buffer; \ diff -Nru a/fs/jbd/commit.c b/fs/jbd/commit.c --- a/fs/jbd/commit.c 2005-03-30 16:58:50 -08:00 +++ b/fs/jbd/commit.c 2005-03-30 16:58:50 -08:00 @@ -341,7 +341,7 @@ BUFFER_TRACE(bh, "locked"); if (!inverted_lock(journal, bh)) goto write_out_data; - __journal_unfile_buffer(jh); + __journal_temp_unlink_buffer(jh); __journal_file_buffer(jh, commit_transaction, BJ_Locked); jbd_unlock_bh_state(bh); diff -Nru a/fs/jbd/journal.c b/fs/jbd/journal.c --- a/fs/jbd/journal.c 2005-03-30 16:58:47 -08:00 +++ b/fs/jbd/journal.c 2005-03-30 16:58:47 -08:00 @@ -1803,6 +1803,7 @@ if (jh->b_transaction == NULL && jh->b_next_transaction == NULL && jh->b_cp_transaction == NULL) { + J_ASSERT_JH(jh, jh->b_jlist == BJ_None); J_ASSERT_BH(bh, buffer_jbd(bh)); J_ASSERT_BH(bh, jh2bh(jh) == bh); BUFFER_TRACE(bh, "remove journal_head"); diff -Nru a/fs/jbd/transaction.c b/fs/jbd/transaction.c --- a/fs/jbd/transaction.c 2005-03-30 16:58:48 -08:00 +++ b/fs/jbd/transaction.c 2005-03-30 16:58:48 -08:00 @@ -1031,7 +1031,12 @@ /* journal_clean_data_list() may have got there first */ if (jh->b_transaction != NULL) { JBUFFER_TRACE(jh, "unfile from commit"); - __journal_unfile_buffer(jh); + __journal_temp_unlink_buffer(jh); + /* It still points to the committing + * transaction; move it to this one so + * that the refile assert checks are + * happy. */ + jh->b_transaction = handle->h_transaction; } /* The buffer will be refiled below */ @@ -1045,7 +1050,8 @@ if (jh->b_jlist != BJ_SyncData && jh->b_jlist != BJ_Locked) { JBUFFER_TRACE(jh, "not on correct data list: unfile"); J_ASSERT_JH(jh, jh->b_jlist != BJ_Shadow); - __journal_unfile_buffer(jh); + __journal_temp_unlink_buffer(jh); + jh->b_transaction = handle->h_transaction; JBUFFER_TRACE(jh, "file as data"); __journal_file_buffer(jh, handle->h_transaction, BJ_SyncData); @@ -1225,7 +1231,6 @@ JBUFFER_TRACE(jh, "belongs to current transaction: unfile"); - __journal_unfile_buffer(jh); drop_reserve = 1; /* @@ -1241,8 +1246,10 @@ */ if (jh->b_cp_transaction) { + __journal_temp_unlink_buffer(jh); __journal_file_buffer(jh, transaction, BJ_Forget); } else { + __journal_unfile_buffer(jh); journal_remove_journal_head(bh); __brelse(bh); if (!buffer_jbd(bh)) { @@ -1468,7 +1475,7 @@ * * Called under j_list_lock. The journal may not be locked. */ -void __journal_unfile_buffer(struct journal_head *jh) +void __journal_temp_unlink_buffer(struct journal_head *jh) { struct journal_head **list = NULL; transaction_t *transaction; @@ -1485,7 +1492,7 @@ switch (jh->b_jlist) { case BJ_None: - goto out; + return; case BJ_SyncData: list = &transaction->t_sync_datalist; break; @@ -1518,7 +1525,11 @@ jh->b_jlist = BJ_None; if (test_clear_buffer_jbddirty(bh)) mark_buffer_dirty(bh); /* Expose it to the VM */ -out: +} + +void __journal_unfile_buffer(struct journal_head *jh) +{ + __journal_temp_unlink_buffer(jh); jh->b_transaction = NULL; } @@ -1774,10 +1785,10 @@ JBUFFER_TRACE(jh, "checkpointed: add to BJ_Forget"); ret = __dispose_buffer(jh, journal->j_running_transaction); + journal_put_journal_head(jh); spin_unlock(&journal->j_list_lock); jbd_unlock_bh_state(bh); spin_unlock(&journal->j_state_lock); - journal_put_journal_head(jh); return ret; } else { /* There is no currently-running transaction. So the @@ -1788,10 +1799,10 @@ JBUFFER_TRACE(jh, "give to committing trans"); ret = __dispose_buffer(jh, journal->j_committing_transaction); + journal_put_journal_head(jh); spin_unlock(&journal->j_list_lock); jbd_unlock_bh_state(bh); spin_unlock(&journal->j_state_lock); - journal_put_journal_head(jh); return ret; } else { /* The orphan record's transaction has @@ -1812,10 +1823,10 @@ journal->j_running_transaction); jh->b_next_transaction = NULL; } + journal_put_journal_head(jh); spin_unlock(&journal->j_list_lock); jbd_unlock_bh_state(bh); spin_unlock(&journal->j_state_lock); - journal_put_journal_head(jh); return 0; } else { /* Good, the buffer belongs to the running transaction. @@ -1928,7 +1939,7 @@ } if (jh->b_transaction) - __journal_unfile_buffer(jh); + __journal_temp_unlink_buffer(jh); jh->b_transaction = transaction; switch (jlist) { @@ -2011,7 +2022,7 @@ */ was_dirty = test_clear_buffer_jbddirty(bh); - __journal_unfile_buffer(jh); + __journal_temp_unlink_buffer(jh); jh->b_transaction = jh->b_next_transaction; jh->b_next_transaction = NULL; __journal_file_buffer(jh, jh->b_transaction, BJ_Metadata); diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c --- a/fs/jfs/inode.c 2005-03-30 16:58:47 -08:00 +++ b/fs/jfs/inode.c 2005-03-30 16:58:47 -08:00 @@ -52,8 +52,6 @@ } else if (S_ISDIR(inode->i_mode)) { inode->i_op = &jfs_dir_inode_operations; inode->i_fop = &jfs_dir_operations; - inode->i_mapping->a_ops = &jfs_aops; - mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); } else if (S_ISLNK(inode->i_mode)) { if (inode->i_size >= IDATASIZE) { inode->i_op = &page_symlink_inode_operations; @@ -176,7 +174,6 @@ struct buffer_head *bh_result, int create) { s64 lblock64 = lblock; - int no_size_check = 0; int rc = 0; int take_locks; xad_t xad; @@ -185,11 +182,11 @@ s32 xlen; /* - * If this is a special inode (imap, dmap) or directory, + * If this is a special inode (imap, dmap) * the lock should already be taken */ - take_locks = ((JFS_IP(ip)->fileset != AGGREGATE_I) && - !S_ISDIR(ip->i_mode)); + take_locks = (JFS_IP(ip)->fileset != AGGREGATE_I); + /* * Take appropriate lock on inode */ @@ -200,16 +197,8 @@ IREAD_LOCK(ip); } - /* - * A directory's "data" is the inode index table, but i_size is the - * size of the d-tree, so don't check the offset against i_size - */ - if (S_ISDIR(ip->i_mode)) - no_size_check = 1; - - if ((no_size_check || - ((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size)) && - (xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, no_size_check) + if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && + (xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, 0) == 0) && xlen) { if (xflag & XAD_NOTRECORDED) { if (!create) diff -Nru a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c --- a/fs/jfs/jfs_dtree.c 2005-03-30 16:58:49 -08:00 +++ b/fs/jfs/jfs_dtree.c 2005-03-30 16:58:49 -08:00 @@ -268,7 +268,7 @@ return NULL; } - if (jfs_ip->next_index <= (MAX_INLINE_DIRTABLE_ENTRY + 1)) { + if (jfs_dirtable_inline(ip)) { /* * Inline directory table */ @@ -2828,7 +2828,7 @@ * the old directory table. */ if (DO_INDEX(ip)) { - if (jfs_ip->next_index > (MAX_INLINE_DIRTABLE_ENTRY + 1)) { + if (!jfs_dirtable_inline(ip)) { struct tblock *tblk = tid_to_tblock(tid); /* * We're playing games with the tid's xflag. If diff -Nru a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h --- a/fs/jfs/jfs_incore.h 2005-03-30 16:58:47 -08:00 +++ b/fs/jfs/jfs_incore.h 2005-03-30 16:58:47 -08:00 @@ -178,6 +178,11 @@ return list_entry(inode, struct jfs_inode_info, vfs_inode); } +static inline int jfs_dirtable_inline(struct inode *inode) +{ + return (JFS_IP(inode)->next_index <= (MAX_INLINE_DIRTABLE_ENTRY + 1)); +} + static inline struct jfs_sb_info *JFS_SBI(struct super_block *sb) { return sb->s_fs_info; @@ -189,5 +194,4 @@ return 0; return 1; } - #endif /* _H_JFS_INCORE */ diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c --- a/fs/jfs/jfs_logmgr.c 2005-03-30 16:58:48 -08:00 +++ b/fs/jfs/jfs_logmgr.c 2005-03-30 16:58:48 -08:00 @@ -1119,6 +1119,7 @@ } memset(log, 0, sizeof(struct jfs_log)); INIT_LIST_HEAD(&log->sb_list); + init_waitqueue_head(&log->syncwait); /* * external log as separate logical volume @@ -1192,6 +1193,7 @@ return -ENOMEM; memset(log, 0, sizeof(struct jfs_log)); INIT_LIST_HEAD(&log->sb_list); + init_waitqueue_head(&log->syncwait); set_bit(log_INLINELOG, &log->flag); log->bdev = sb->s_bdev; @@ -1229,6 +1231,7 @@ } memset(dummy_log, 0, sizeof(struct jfs_log)); INIT_LIST_HEAD(&dummy_log->sb_list); + init_waitqueue_head(&dummy_log->syncwait); dummy_log->no_integrity = 1; /* Make up some stuff */ dummy_log->base = 0; @@ -1290,8 +1293,6 @@ LOGSYNC_LOCK_INIT(log); INIT_LIST_HEAD(&log->synclist); - - init_waitqueue_head(&log->syncwait); INIT_LIST_HEAD(&log->cqueue); log->flush_tblk = NULL; diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c --- a/fs/jfs/jfs_txnmgr.c 2005-03-30 16:58:49 -08:00 +++ b/fs/jfs/jfs_txnmgr.c 2005-03-30 16:58:49 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2004 + * Copyright (C) International Business Machines Corp., 2000-2005 * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify @@ -1567,7 +1567,7 @@ /* log after-image for logredo(): */ lrd->type = cpu_to_le16(LOG_REDOPAGE); - if (JFS_IP(tlck->ip)->next_index < MAX_INLINE_DIRTABLE_ENTRY) { + if (jfs_dirtable_inline(tlck->ip)) { /* * The table has been truncated, we've must have deleted * the last entry, so don't bother logging this @@ -2796,6 +2796,8 @@ if (!WorkDone) break; } + /* In case a wakeup came while all threads were active */ + jfs_commit_thread_waking = 0; if (current->flags & PF_FREEZE) { LAZY_UNLOCK(flags); diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c --- a/fs/jfs/namei.c 2005-03-30 16:58:51 -08:00 +++ b/fs/jfs/namei.c 2005-03-30 16:58:51 -08:00 @@ -262,8 +262,6 @@ ip->i_nlink = 2; /* for '.' */ ip->i_op = &jfs_dir_inode_operations; ip->i_fop = &jfs_dir_operations; - ip->i_mapping->a_ops = &jfs_aops; - mapping_set_gfp_mask(ip->i_mapping, GFP_NOFS); insert_inode_hash(ip); mark_inode_dirty(ip); diff -Nru a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c --- a/fs/lockd/clntproc.c 2005-03-30 16:58:50 -08:00 +++ b/fs/lockd/clntproc.c 2005-03-30 16:58:50 -08:00 @@ -312,6 +312,7 @@ prepare_to_wait(queue, &wait, TASK_INTERRUPTIBLE); if (!signalled ()) { schedule_timeout(NLMCLNT_GRACE_WAIT); + try_to_freeze(PF_FREEZE); if (!signalled ()) status = 0; } diff -Nru a/fs/lockd/svclock.c b/fs/lockd/svclock.c --- a/fs/lockd/svclock.c 2005-03-30 16:58:48 -08:00 +++ b/fs/lockd/svclock.c 2005-03-30 16:58:48 -08:00 @@ -641,7 +641,6 @@ } else { /* Lock is now held by client, or has been rejected. * In both cases, the block should be removed. */ - file->f_count++; up(&file->f_sema); if (status == NLM_LCK_GRANTED) nlmsvc_delete_block(block, 0); diff -Nru a/fs/mbcache.c b/fs/mbcache.c --- a/fs/mbcache.c 2005-03-30 16:58:50 -08:00 +++ b/fs/mbcache.c 2005-03-30 16:58:50 -08:00 @@ -225,7 +225,7 @@ e_lru_list), gfp_mask); } out: - return count; + return (count / 100) * sysctl_vfs_cache_pressure; } diff -Nru a/fs/mpage.c b/fs/mpage.c --- a/fs/mpage.c 2005-03-30 16:58:47 -08:00 +++ b/fs/mpage.c 2005-03-30 16:58:47 -08:00 @@ -98,7 +98,8 @@ static struct bio * mpage_alloc(struct block_device *bdev, - sector_t first_sector, int nr_vecs, int gfp_flags) + sector_t first_sector, int nr_vecs, + unsigned int __nocast gfp_flags) { struct bio *bio; @@ -626,6 +627,15 @@ mpage_writepages(struct address_space *mapping, struct writeback_control *wbc, get_block_t get_block) { + return __mpage_writepages(mapping, wbc, get_block, + mapping->a_ops->writepage); +} + +int +__mpage_writepages(struct address_space *mapping, + struct writeback_control *wbc, get_block_t get_block, + writepage_t writepage_fn) +{ struct backing_dev_info *bdi = mapping->backing_dev_info; struct bio *bio = NULL; sector_t last_block_in_bio = 0; @@ -715,7 +725,7 @@ } else { bio = __mpage_writepage(bio, page, get_block, &last_block_in_bio, &ret, wbc, - page->mapping->a_ops->writepage); + writepage_fn); } if (ret || (--(wbc->nr_to_write) <= 0)) done = 1; @@ -743,6 +753,7 @@ return ret; } EXPORT_SYMBOL(mpage_writepages); +EXPORT_SYMBOL(__mpage_writepages); int mpage_writepage(struct page *page, get_block_t get_block, struct writeback_control *wbc) diff -Nru a/fs/msdos/namei.c b/fs/msdos/namei.c --- a/fs/msdos/namei.c 2005-03-30 16:58:50 -08:00 +++ b/fs/msdos/namei.c 2005-03-30 16:58:50 -08:00 @@ -266,9 +266,11 @@ de.attr |= ATTR_HIDDEN; de.lcase = 0; fat_date_unix2dos(ts->tv_sec, &time, &date); - de.time = de.ctime = time; - de.date = de.cdate = de.adate = date; + de.cdate = de.adate = 0; + de.ctime = 0; de.ctime_cs = 0; + de.time = time; + de.date = date; de.start = cpu_to_le16(cluster); de.starthi = cpu_to_le16(cluster >> 16); de.size = 0; @@ -671,6 +673,7 @@ if (res) return res; + sb->s_flags |= MS_NOATIME; sb->s_root->d_op = &msdos_dentry_operations; return 0; } diff -Nru a/fs/partitions/Kconfig b/fs/partitions/Kconfig --- a/fs/partitions/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/fs/partitions/Kconfig 2005-03-30 16:58:50 -08:00 @@ -203,7 +203,7 @@ config SUN_PARTITION bool "Sun partition tables support" if PARTITION_ADVANCED - default y if (SPARC32 || SPARC64) + default y if (SPARC32 || SPARC64 || SUN3 || SUN3X) ---help--- Like most systems, SunOS uses its own hard disk partition table format, incompatible with all others. Saying Y here allows you to diff -Nru a/fs/pipe.c b/fs/pipe.c --- a/fs/pipe.c 2005-03-30 16:58:49 -08:00 +++ b/fs/pipe.c 2005-03-30 16:58:49 -08:00 @@ -224,6 +224,7 @@ int do_wakeup; struct iovec *iov = (struct iovec *)_iov; size_t total_len; + ssize_t chars; total_len = iov_length(iov, nr_segs); /* Null write succeeds. */ @@ -242,24 +243,26 @@ } /* We try to merge small writes */ - if (info->nrbufs && total_len < PAGE_SIZE) { + chars = total_len & (PAGE_SIZE-1); /* size of the last buffer */ + if (info->nrbufs && chars != 0) { int lastbuf = (info->curbuf + info->nrbufs - 1) & (PIPE_BUFFERS-1); struct pipe_buffer *buf = info->bufs + lastbuf; struct pipe_buf_operations *ops = buf->ops; int offset = buf->offset + buf->len; - if (ops->can_merge && offset + total_len <= PAGE_SIZE) { + if (ops->can_merge && offset + chars <= PAGE_SIZE) { void *addr = ops->map(filp, info, buf); - int error = pipe_iov_copy_from_user(offset + addr, iov, total_len); + int error = pipe_iov_copy_from_user(offset + addr, iov, chars); ops->unmap(info, buf); ret = error; do_wakeup = 1; if (error) goto out; - buf->len += total_len; - ret = total_len; - goto out; + buf->len += chars; + total_len -= chars; + ret = chars; + if (!total_len) + goto out; } - } for (;;) { @@ -271,7 +274,6 @@ } bufs = info->nrbufs; if (bufs < PIPE_BUFFERS) { - ssize_t chars; int newbuf = (info->curbuf + bufs) & (PIPE_BUFFERS-1); struct pipe_buffer *buf = info->bufs + newbuf; struct page *page = info->tmp_page; diff -Nru a/fs/posix_acl.c b/fs/posix_acl.c --- a/fs/posix_acl.c 2005-03-30 16:58:50 -08:00 +++ b/fs/posix_acl.c 2005-03-30 16:58:50 -08:00 @@ -35,7 +35,7 @@ * Allocate a new ACL with the specified number of entries. */ struct posix_acl * -posix_acl_alloc(int count, int flags) +posix_acl_alloc(int count, unsigned int __nocast flags) { const size_t size = sizeof(struct posix_acl) + count * sizeof(struct posix_acl_entry); @@ -51,7 +51,7 @@ * Clone an ACL. */ struct posix_acl * -posix_acl_clone(const struct posix_acl *acl, int flags) +posix_acl_clone(const struct posix_acl *acl, unsigned int __nocast flags) { struct posix_acl *clone = NULL; @@ -185,7 +185,7 @@ * Create an ACL representing the file mode permission bits of an inode. */ struct posix_acl * -posix_acl_from_mode(mode_t mode, int flags) +posix_acl_from_mode(mode_t mode, unsigned int __nocast flags) { struct posix_acl *acl = posix_acl_alloc(3, flags); if (!acl) diff -Nru a/fs/proc/array.c b/fs/proc/array.c --- a/fs/proc/array.c 2005-03-30 16:58:49 -08:00 +++ b/fs/proc/array.c 2005-03-30 16:58:49 -08:00 @@ -432,7 +432,7 @@ jiffies_to_clock_t(it_real_value), start_time, vsize, - mm ? mm->rss : 0, /* you might want to shift this left 3 */ + mm ? get_mm_counter(mm, rss) : 0, /* you might want to shift this left 3 */ rsslim, mm ? mm->start_code : 0, mm ? mm->end_code : 0, diff -Nru a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c --- a/fs/proc/task_mmu.c 2005-03-30 16:58:47 -08:00 +++ b/fs/proc/task_mmu.c 2005-03-30 16:58:47 -08:00 @@ -24,7 +24,7 @@ "VmPTE:\t%8lu kB\n", (mm->total_vm - mm->reserved_vm) << (PAGE_SHIFT-10), mm->locked_vm << (PAGE_SHIFT-10), - mm->rss << (PAGE_SHIFT-10), + get_mm_counter(mm, rss) << (PAGE_SHIFT-10), data << (PAGE_SHIFT-10), mm->stack_vm << (PAGE_SHIFT-10), text, lib, (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10); @@ -39,11 +39,13 @@ int task_statm(struct mm_struct *mm, int *shared, int *text, int *data, int *resident) { - *shared = mm->rss - mm->anon_rss; + int rss = get_mm_counter(mm, rss); + + *shared = rss - get_mm_counter(mm, anon_rss); *text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> PAGE_SHIFT; *data = mm->total_vm - mm->shared_vm; - *resident = mm->rss; + *resident = rss; return mm->total_vm; } diff -Nru a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h --- a/fs/xfs/linux-2.6/kmem.h 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/linux-2.6/kmem.h 2005-03-30 16:58:50 -08:00 @@ -125,12 +125,6 @@ BUG(); } -static __inline int -kmem_zone_shrink(kmem_zone_t *zone) -{ - return kmem_cache_shrink(zone); -} - extern void *kmem_zone_zalloc(kmem_zone_t *, int); extern void *kmem_zone_alloc(kmem_zone_t *, int); diff -Nru a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c --- a/fs/xfs/linux-2.6/xfs_buf.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/linux-2.6/xfs_buf.c 2005-03-30 16:58:47 -08:00 @@ -966,7 +966,7 @@ return(locked ? 0 : -EBUSY); } -#ifdef DEBUG +#if defined(DEBUG) || defined(XFS_BLI_TRACE) /* * pagebuf_lock_value * @@ -1283,7 +1283,7 @@ _pagebuf_ioapply( xfs_buf_t *pb) { - int i, map_i, total_nr_pages, nr_pages; + int i, rw, map_i, total_nr_pages, nr_pages; struct bio *bio; int offset = pb->pb_offset; int size = pb->pb_count_desired; @@ -1294,6 +1294,13 @@ total_nr_pages = pb->pb_page_count; map_i = 0; + if (pb->pb_flags & _PBF_RUN_QUEUES) { + pb->pb_flags &= ~_PBF_RUN_QUEUES; + rw = (pb->pb_flags & PBF_READ) ? READ_SYNC : WRITE_SYNC; + } else { + rw = (pb->pb_flags & PBF_READ) ? READ : WRITE; + } + /* Special code path for reading a sub page size pagebuf in -- * we populate up the whole page, and hence the other metadata * in the same page. This optimization is only valid when the @@ -1365,18 +1372,12 @@ submit_io: if (likely(bio->bi_size)) { - submit_bio((pb->pb_flags & PBF_READ) ? READ : WRITE, bio); + submit_bio(rw, bio); if (size) goto next_chunk; } else { bio_put(bio); pagebuf_ioerror(pb, EIO); - } - - if (pb->pb_flags & _PBF_RUN_QUEUES) { - pb->pb_flags &= ~_PBF_RUN_QUEUES; - if (atomic_read(&pb->pb_io_remaining) > 1) - blk_run_address_space(pb->pb_target->pbr_mapping); } } diff -Nru a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c --- a/fs/xfs/linux-2.6/xfs_export.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/linux-2.6/xfs_export.c 2005-03-30 16:58:48 -08:00 @@ -31,6 +31,25 @@ */ #include "xfs.h" +#include "xfs_types.h" +#include "xfs_dmapi.h" +#include "xfs_log.h" +#include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_dir.h" +#include "xfs_mount.h" +#include "xfs_export.h" + +/* + * XFS encode and decodes the fileid portion of NFS filehandles + * itself instead of letting the generic NFS code do it. This + * allows filesystems with 64 bit inode numbers to be exported. + * + * Note that a side effect is that xfs_vget() won't be passed a + * zero inode/generation pair under normal circumstances. As + * however a malicious client could send us such data, the check + * remains in that code. + */ STATIC struct dentry * @@ -44,26 +63,87 @@ struct dentry *de), void *context) { - __u32 parent[2]; - parent[0] = parent[1] = 0; - - if (fh_len < 2 || fileid_type > 2) + xfs_fid2_t ifid; + xfs_fid2_t pfid; + void *parent = NULL; + int is64 = 0; + __u32 *p = fh; + +#if XFS_BIG_INUMS + is64 = (fileid_type & XFS_FILEID_TYPE_64FLAG); + fileid_type &= ~XFS_FILEID_TYPE_64FLAG; +#endif + + /* + * Note that we only accept fileids which are long enough + * rather than allow the parent generation number to default + * to zero. XFS considers zero a valid generation number not + * an invalid/wildcard value. There's little point printk'ing + * a warning here as we don't have the client information + * which would make such a warning useful. + */ + if (fileid_type > 2 || + fh_len < xfs_fileid_length((fileid_type == 2), is64)) return NULL; - - if (fileid_type == 2 && fh_len > 2) { - if (fh_len == 3) { - printk(KERN_WARNING - "XFS: detected filehandle without " - "parent inode generation information."); - return ERR_PTR(-ESTALE); - } - - parent[0] = fh[2]; - parent[1] = fh[3]; + + p = xfs_fileid_decode_fid2(p, &ifid, is64); + + if (fileid_type == 2) { + p = xfs_fileid_decode_fid2(p, &pfid, is64); + parent = &pfid; } + fh = (__u32 *)&ifid; return find_exported_dentry(sb, fh, parent, acceptable, context); +} + +STATIC int +linvfs_encode_fh( + struct dentry *dentry, + __u32 *fh, + int *max_len, + int connectable) +{ + struct inode *inode = dentry->d_inode; + int type = 1; + __u32 *p = fh; + int len; + int is64 = 0; +#if XFS_BIG_INUMS + vfs_t *vfs = LINVFS_GET_VFS(inode->i_sb); + xfs_mount_t *mp = XFS_VFSTOM(vfs); + + if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT)) { + /* filesystem may contain 64bit inode numbers */ + is64 = XFS_FILEID_TYPE_64FLAG; + } +#endif + + /* Directories don't need their parent encoded, they have ".." */ + if (S_ISDIR(inode->i_mode)) + connectable = 0; + + /* + * Only encode if there is enough space given. In practice + * this means we can't export a filesystem with 64bit inodes + * over NFSv2 with the subtree_check export option; the other + * seven combinations work. The real answer is "don't use v2". + */ + len = xfs_fileid_length(connectable, is64); + if (*max_len < len) + return 255; + *max_len = len; + + p = xfs_fileid_encode_inode(p, inode, is64); + if (connectable) { + spin_lock(&dentry->d_lock); + p = xfs_fileid_encode_inode(p, dentry->d_parent->d_inode, is64); + spin_unlock(&dentry->d_lock); + type = 2; + } + BUG_ON((p - fh) != len); + return type | is64; } STATIC struct dentry * @@ -74,16 +154,10 @@ vnode_t *vp; struct inode *inode; struct dentry *result; - xfs_fid2_t xfid; vfs_t *vfsp = LINVFS_GET_VFS(sb); int error; - xfid.fid_len = sizeof(xfs_fid2_t) - sizeof(xfid.fid_len); - xfid.fid_pad = 0; - xfid.fid_gen = ((__u32 *)data)[1]; - xfid.fid_ino = ((__u32 *)data)[0]; - - VFS_VGET(vfsp, &vp, (fid_t *)&xfid, error); + VFS_VGET(vfsp, &vp, (fid_t *)data, error); if (error || vp == NULL) return ERR_PTR(-ESTALE) ; @@ -125,6 +199,7 @@ struct export_operations linvfs_export_ops = { .decode_fh = linvfs_decode_fh, + .encode_fh = linvfs_encode_fh, .get_parent = linvfs_get_parent, .get_dentry = linvfs_get_dentry, }; diff -Nru a/fs/xfs/linux-2.6/xfs_export.h b/fs/xfs/linux-2.6/xfs_export.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/xfs/linux-2.6/xfs_export.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + * + * For further information regarding this notice, see: + * + * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + */ +#ifndef __XFS_EXPORT_H__ +#define __XFS_EXPORT_H__ + +/* + * Common defines for code related to exporting XFS filesystems over NFS. + * + * The NFS fileid goes out on the wire as an array of + * 32bit unsigned ints in host order. There are 5 possible + * formats. + * + * (1) fileid_type=0x00 + * (no fileid data; handled by the generic code) + * + * (2) fileid_type=0x01 + * inode-num + * generation + * + * (3) fileid_type=0x02 + * inode-num + * generation + * parent-inode-num + * parent-generation + * + * (4) fileid_type=0x81 + * inode-num-lo32 + * inode-num-hi32 + * generation + * + * (5) fileid_type=0x82 + * inode-num-lo32 + * inode-num-hi32 + * generation + * parent-inode-num-lo32 + * parent-inode-num-hi32 + * parent-generation + * + * Note, the NFS filehandle also includes an fsid portion which + * may have an inode number in it. That number is hardcoded to + * 32bits and there is no way for XFS to intercept it. In + * practice this means when exporting an XFS filesytem with 64bit + * inodes you should either export the mountpoint (rather than + * a subdirectory) or use the "fsid" export option. + */ + +/* This flag goes on the wire. Don't play with it. */ +#define XFS_FILEID_TYPE_64FLAG 0x80 /* NFS fileid has 64bit inodes */ + +/* Calculate the length in u32 units of the fileid data */ +static inline int +xfs_fileid_length(int hasparent, int is64) +{ + return hasparent ? (is64 ? 6 : 4) : (is64 ? 3 : 2); +} + +/* + * Decode encoded inode information (either for the inode itself + * or the parent) into an xfs_fid2_t structure. Advances and + * returns the new data pointer + */ +static inline __u32 * +xfs_fileid_decode_fid2(__u32 *p, xfs_fid2_t *fid, int is64) +{ + fid->fid_len = sizeof(xfs_fid2_t) - sizeof(fid->fid_len); + fid->fid_pad = 0; + fid->fid_ino = *p++; +#if XFS_BIG_INUMS + if (is64) + fid->fid_ino |= (((__u64)(*p++)) << 32); +#endif + fid->fid_gen = *p++; + return p; +} + +/* + * Encode inode information (either for the inode itself or the + * parent) into a fileid buffer. Advances and returns the new + * data pointer. + */ +static inline __u32 * +xfs_fileid_encode_inode(__u32 *p, struct inode *inode, int is64) +{ + *p++ = (__u32)inode->i_ino; +#if XFS_BIG_INUMS + if (is64) + *p++ = (__u32)(inode->i_ino >> 32); +#endif + *p++ = inode->i_generation; + return p; +} + +#endif /* __XFS_EXPORT_H__ */ diff -Nru a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c --- a/fs/xfs/linux-2.6/xfs_file.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/linux-2.6/xfs_file.c 2005-03-30 16:58:49 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -482,6 +482,38 @@ } #endif /* HAVE_VMOP_MPROTECT */ +#ifdef HAVE_FOP_OPEN_EXEC +/* If the user is attempting to execute a file that is offline then + * we have to trigger a DMAPI READ event before the file is marked as busy + * otherwise the invisible I/O will not be able to write to the file to bring + * it back online. + */ +STATIC int +linvfs_open_exec( + struct inode *inode) +{ + vnode_t *vp = LINVFS_GET_VP(inode); + xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); + int error = 0; + bhv_desc_t *bdp; + xfs_inode_t *ip; + + if (vp->v_vfsp->vfs_flag & VFS_DMI) { + bdp = vn_bhv_lookup(VN_BHV_HEAD(vp), &xfs_vnodeops); + if (!bdp) { + error = -EINVAL; + goto open_exec_out; + } + ip = XFS_BHVTOI(bdp); + if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) { + error = -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, + 0, 0, 0, NULL); + } + } +open_exec_out: + return error; +} +#endif /* HAVE_FOP_OPEN_EXEC */ struct file_operations linvfs_file_operations = { .llseek = generic_file_llseek, @@ -500,6 +532,9 @@ .open = linvfs_open, .release = linvfs_release, .fsync = linvfs_fsync, +#ifdef HAVE_FOP_OPEN_EXEC + .open_exec = linvfs_open_exec, +#endif }; struct file_operations linvfs_invis_file_operations = { diff -Nru a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c --- a/fs/xfs/linux-2.6/xfs_ioctl.c 2005-03-30 16:58:51 -08:00 +++ b/fs/xfs/linux-2.6/xfs_ioctl.c 2005-03-30 16:58:51 -08:00 @@ -202,10 +202,6 @@ xfs_vget_fsop_handlereq( xfs_mount_t *mp, struct inode *parinode, /* parent inode pointer */ - int cap, /* capability level for op */ - void __user *arg, /* userspace data pointer */ - unsigned long size, /* size of expected struct */ - /* output arguments */ xfs_fsop_handlereq_t *hreq, vnode_t **vp, struct inode **inode) @@ -222,22 +218,12 @@ __u32 igen; int error; - if (!capable(cap)) - return XFS_ERROR(EPERM); - /* * Only allow handle opens under a directory. */ if (!S_ISDIR(parinode->i_mode)) return XFS_ERROR(ENOTDIR); - /* - * Copy the handle down from the user and validate - * that it looks to be in the correct format. - */ - if (copy_from_user(hreq, arg, size)) - return XFS_ERROR(EFAULT); - hanp = hreq->ihandle; hlen = hreq->ihandlen; handlep = &handle; @@ -305,9 +291,12 @@ vnode_t *vp; xfs_fsop_handlereq_t hreq; - error = xfs_vget_fsop_handlereq(mp, parinode, CAP_SYS_ADMIN, arg, - sizeof(xfs_fsop_handlereq_t), - &hreq, &vp, &inode); + if (!capable(CAP_SYS_ADMIN)) + return -XFS_ERROR(EPERM); + if (copy_from_user(&hreq, arg, sizeof(xfs_fsop_handlereq_t))) + return -XFS_ERROR(EFAULT); + + error = xfs_vget_fsop_handlereq(mp, parinode, &hreq, &vp, &inode); if (error) return -error; @@ -387,9 +376,12 @@ vnode_t *vp; __u32 olen; - error = xfs_vget_fsop_handlereq(mp, parinode, CAP_SYS_ADMIN, arg, - sizeof(xfs_fsop_handlereq_t), - &hreq, &vp, &inode); + if (!capable(CAP_SYS_ADMIN)) + return -XFS_ERROR(EPERM); + if (copy_from_user(&hreq, arg, sizeof(xfs_fsop_handlereq_t))) + return -XFS_ERROR(EFAULT); + + error = xfs_vget_fsop_handlereq(mp, parinode, &hreq, &vp, &inode); if (error) return -error; @@ -432,10 +424,12 @@ bhv_desc_t *bdp; vnode_t *vp; - error = xfs_vget_fsop_handlereq(mp, parinode, CAP_MKNOD, arg, - sizeof(xfs_fsop_setdm_handlereq_t), - (xfs_fsop_handlereq_t *)&dmhreq, - &vp, &inode); + if (!capable(CAP_MKNOD)) + return -XFS_ERROR(EPERM); + if (copy_from_user(&dmhreq, arg, sizeof(xfs_fsop_setdm_handlereq_t))) + return -XFS_ERROR(EFAULT); + + error = xfs_vget_fsop_handlereq(mp, parinode, &dmhreq.hreq, &vp, &inode); if (error) return -error; @@ -470,21 +464,113 @@ xfs_fsop_attrlist_handlereq_t al_hreq; struct inode *inode; vnode_t *vp; + char *kbuf; + + if (!capable(CAP_SYS_ADMIN)) + return -XFS_ERROR(EPERM); + if (copy_from_user(&al_hreq, arg, sizeof(xfs_fsop_attrlist_handlereq_t))) + return -XFS_ERROR(EFAULT); + if (al_hreq.buflen > XATTR_LIST_MAX) + return -XFS_ERROR(EINVAL); - error = xfs_vget_fsop_handlereq(mp, parinode, CAP_SYS_ADMIN, arg, - sizeof(xfs_fsop_attrlist_handlereq_t), - (xfs_fsop_handlereq_t *)&al_hreq, - &vp, &inode); + error = xfs_vget_fsop_handlereq(mp, parinode, &al_hreq.hreq, + &vp, &inode); if (error) - return -error; + goto out; + + kbuf = kmalloc(al_hreq.buflen, GFP_KERNEL); + if (!kbuf) + goto out_vn_rele; cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; - VOP_ATTR_LIST(vp, al_hreq.buffer, al_hreq.buflen, al_hreq.flags, + VOP_ATTR_LIST(vp, kbuf, al_hreq.buflen, al_hreq.flags, cursor, NULL, error); + if (error) + goto out_kfree; + + if (copy_to_user(al_hreq.buffer, kbuf, al_hreq.buflen)) + error = -EFAULT; + + out_kfree: + kfree(kbuf); + out_vn_rele: VN_RELE(vp); + out: + return -error; +} + +STATIC int +xfs_attrmulti_attr_get( + struct vnode *vp, + char *name, + char __user *ubuf, + __uint32_t *len, + __uint32_t flags) +{ + char *kbuf; + int error = EFAULT; + + if (*len > XATTR_SIZE_MAX) + return EINVAL; + kbuf = kmalloc(*len, GFP_KERNEL); + if (!kbuf) + return ENOMEM; + + VOP_ATTR_GET(vp, name, kbuf, len, flags, NULL, error); if (error) - return -error; - return 0; + goto out_kfree; + + if (copy_to_user(ubuf, kbuf, *len)) + error = EFAULT; + + out_kfree: + kfree(kbuf); + return error; +} + +STATIC int +xfs_attrmulti_attr_set( + struct vnode *vp, + char *name, + const char __user *ubuf, + __uint32_t len, + __uint32_t flags) +{ + char *kbuf; + int error = EFAULT; + + if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) + return EPERM; + if (len > XATTR_SIZE_MAX) + return EINVAL; + + kbuf = kmalloc(len, GFP_KERNEL); + if (!kbuf) + return ENOMEM; + + if (copy_from_user(kbuf, ubuf, len)) + goto out_kfree; + + VOP_ATTR_SET(vp, name, kbuf, len, flags, NULL, error); + + out_kfree: + kfree(kbuf); + return error; +} + +STATIC int +xfs_attrmulti_attr_remove( + struct vnode *vp, + char *name, + __uint32_t flags) +{ + int error; + + if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) + return EPERM; + + VOP_ATTR_REMOVE(vp, name, flags, NULL, error); + return error; } STATIC int @@ -500,55 +586,59 @@ struct inode *inode; vnode_t *vp; unsigned int i, size; + char *attr_name; - error = xfs_vget_fsop_handlereq(mp, parinode, CAP_SYS_ADMIN, arg, - sizeof(xfs_fsop_attrmulti_handlereq_t), - (xfs_fsop_handlereq_t *)&am_hreq, - &vp, &inode); + if (!capable(CAP_SYS_ADMIN)) + return -XFS_ERROR(EPERM); + if (copy_from_user(&am_hreq, arg, sizeof(xfs_fsop_attrmulti_handlereq_t))) + return -XFS_ERROR(EFAULT); + + error = xfs_vget_fsop_handlereq(mp, parinode, &am_hreq.hreq, &vp, &inode); if (error) - return -error; + goto out; + error = E2BIG; size = am_hreq.opcount * sizeof(attr_multiop_t); - if (!size || size > 16 * PAGE_SIZE) { - VN_RELE(vp); - return -XFS_ERROR(E2BIG); - } + if (!size || size > 16 * PAGE_SIZE) + goto out_vn_rele; - ops = (xfs_attr_multiop_t *)kmalloc(size, GFP_KERNEL); - if (!ops) { - VN_RELE(vp); - return -XFS_ERROR(ENOMEM); - } + error = ENOMEM; + ops = kmalloc(size, GFP_KERNEL); + if (!ops) + goto out_vn_rele; + + error = EFAULT; + if (copy_from_user(ops, am_hreq.ops, size)) + goto out_kfree_ops; + + attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL); + if (!attr_name) + goto out_kfree_ops; - if (copy_from_user(ops, am_hreq.ops, size)) { - kfree(ops); - VN_RELE(vp); - return -XFS_ERROR(EFAULT); - } + error = 0; for (i = 0; i < am_hreq.opcount; i++) { - switch(ops[i].am_opcode) { + ops[i].am_error = strncpy_from_user(attr_name, + ops[i].am_attrname, MAXNAMELEN); + if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN) + error = -ERANGE; + if (ops[i].am_error < 0) + break; + + switch (ops[i].am_opcode) { case ATTR_OP_GET: - VOP_ATTR_GET(vp,ops[i].am_attrname, ops[i].am_attrvalue, - &ops[i].am_length, ops[i].am_flags, - NULL, ops[i].am_error); + ops[i].am_error = xfs_attrmulti_attr_get(vp, + attr_name, ops[i].am_attrvalue, + &ops[i].am_length, ops[i].am_flags); break; case ATTR_OP_SET: - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) { - ops[i].am_error = EPERM; - break; - } - VOP_ATTR_SET(vp,ops[i].am_attrname, ops[i].am_attrvalue, - ops[i].am_length, ops[i].am_flags, - NULL, ops[i].am_error); + ops[i].am_error = xfs_attrmulti_attr_set(vp, + attr_name, ops[i].am_attrvalue, + ops[i].am_length, ops[i].am_flags); break; case ATTR_OP_REMOVE: - if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) { - ops[i].am_error = EPERM; - break; - } - VOP_ATTR_REMOVE(vp, ops[i].am_attrname, ops[i].am_flags, - NULL, ops[i].am_error); + ops[i].am_error = xfs_attrmulti_attr_remove(vp, + attr_name, ops[i].am_flags); break; default: ops[i].am_error = EINVAL; @@ -556,11 +646,15 @@ } if (copy_to_user(am_hreq.ops, ops, size)) - error = -XFS_ERROR(EFAULT); + error = XFS_ERROR(EFAULT); + kfree(attr_name); + out_kfree_ops: kfree(ops); + out_vn_rele: VN_RELE(vp); - return error; + out: + return -error; } /* prototypes for a few of the stack-hungry cases that have @@ -1149,7 +1243,7 @@ va.va_mask = XFS_AT_XFLAGS; va.va_xflags = xfs_merge_ioc_xflags(flags, - xfs_dic2xflags(&ip->i_d, ARCH_NOCONVERT)); + xfs_ip2xflags(ip)); VOP_SETATTR(vp, &va, attr_flags, NULL, error); if (!error) diff -Nru a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c --- a/fs/xfs/linux-2.6/xfs_lrw.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/linux-2.6/xfs_lrw.c 2005-03-30 16:58:47 -08:00 @@ -871,6 +871,7 @@ goto out_unlock_isem; xfs_rwlock(bdp, locktype); pos = xip->i_d.di_size; + ret = 0; goto retry; } diff -Nru a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c --- a/fs/xfs/linux-2.6/xfs_super.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/linux-2.6/xfs_super.c 2005-03-30 16:58:50 -08:00 @@ -76,7 +76,6 @@ STATIC struct quotactl_ops linvfs_qops; STATIC struct super_operations linvfs_sops; STATIC kmem_zone_t *linvfs_inode_zone; -STATIC kmem_shaker_t xfs_inode_shaker; STATIC struct xfs_mount_args * xfs_args_allocate( @@ -91,6 +90,10 @@ /* Copy the already-parsed mount(2) flags we're interested in */ if (sb->s_flags & MS_NOATIME) args->flags |= XFSMNT_NOATIME; + if (sb->s_flags & MS_DIRSYNC) + args->flags |= XFSMNT_DIRSYNC; + if (sb->s_flags & MS_SYNCHRONOUS) + args->flags |= XFSMNT_WSYNC; /* Default to 32 bit inodes on Linux all the time */ args->flags |= XFSMNT_32BITINODES; @@ -286,18 +289,6 @@ kmem_cache_free(linvfs_inode_zone, LINVFS_GET_VP(inode)); } -STATIC int -xfs_inode_shake( - int priority, - unsigned int gfp_mask) -{ - int pages; - - pages = kmem_zone_shrink(linvfs_inode_zone); - pages += kmem_zone_shrink(xfs_inode_zone); - return pages; -} - STATIC void init_once( void *data, @@ -885,12 +876,6 @@ uuid_init(); vfs_initquota(); - xfs_inode_shaker = kmem_shake_register(xfs_inode_shake); - if (!xfs_inode_shaker) { - error = -ENOMEM; - goto undo_shaker; - } - error = register_filesystem(&xfs_fs_type); if (error) goto undo_register; @@ -898,9 +883,6 @@ return 0; undo_register: - kmem_shake_deregister(xfs_inode_shaker); - -undo_shaker: pagebuf_terminate(); undo_pagebuf: @@ -916,7 +898,6 @@ vfs_exitquota(); XFS_DM_EXIT(&xfs_fs_type); unregister_filesystem(&xfs_fs_type); - kmem_shake_deregister(xfs_inode_shaker); xfs_cleanup(); pagebuf_terminate(); destroy_inodecache(); diff -Nru a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c --- a/fs/xfs/linux-2.6/xfs_vfs.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/linux-2.6/xfs_vfs.c 2005-03-30 16:58:50 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as diff -Nru a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h --- a/fs/xfs/linux-2.6/xfs_vfs.h 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/linux-2.6/xfs_vfs.h 2005-03-30 16:58:47 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as diff -Nru a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c --- a/fs/xfs/quota/xfs_dquot.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/quota/xfs_dquot.c 2005-03-30 16:58:48 -08:00 @@ -261,21 +261,19 @@ { xfs_quotainfo_t *q = mp->m_quotainfo; - ASSERT(!INT_ISZERO(d->d_id, ARCH_CONVERT)); + ASSERT(d->d_id); - if (q->qi_bsoftlimit && INT_ISZERO(d->d_blk_softlimit, ARCH_CONVERT)) + if (q->qi_bsoftlimit && !d->d_blk_softlimit) INT_SET(d->d_blk_softlimit, ARCH_CONVERT, q->qi_bsoftlimit); - if (q->qi_bhardlimit && INT_ISZERO(d->d_blk_hardlimit, ARCH_CONVERT)) + if (q->qi_bhardlimit && !d->d_blk_hardlimit) INT_SET(d->d_blk_hardlimit, ARCH_CONVERT, q->qi_bhardlimit); - if (q->qi_isoftlimit && INT_ISZERO(d->d_ino_softlimit, ARCH_CONVERT)) + if (q->qi_isoftlimit && !d->d_ino_softlimit) INT_SET(d->d_ino_softlimit, ARCH_CONVERT, q->qi_isoftlimit); - if (q->qi_ihardlimit && INT_ISZERO(d->d_ino_hardlimit, ARCH_CONVERT)) + if (q->qi_ihardlimit && !d->d_ino_hardlimit) INT_SET(d->d_ino_hardlimit, ARCH_CONVERT, q->qi_ihardlimit); - if (q->qi_rtbsoftlimit && - INT_ISZERO(d->d_rtb_softlimit, ARCH_CONVERT)) + if (q->qi_rtbsoftlimit && !d->d_rtb_softlimit) INT_SET(d->d_rtb_softlimit, ARCH_CONVERT, q->qi_rtbsoftlimit); - if (q->qi_rtbhardlimit && - INT_ISZERO(d->d_rtb_hardlimit, ARCH_CONVERT)) + if (q->qi_rtbhardlimit && !d->d_rtb_hardlimit) INT_SET(d->d_rtb_hardlimit, ARCH_CONVERT, q->qi_rtbhardlimit); } @@ -295,7 +293,7 @@ xfs_mount_t *mp, xfs_disk_dquot_t *d) { - ASSERT(!INT_ISZERO(d->d_id, ARCH_CONVERT)); + ASSERT(d->d_id); #ifdef QUOTADEBUG if (INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)) @@ -308,7 +306,7 @@ ASSERT(INT_GET(d->d_rtb_softlimit, ARCH_CONVERT) <= INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)); #endif - if (INT_ISZERO(d->d_btimer, ARCH_CONVERT)) { + if (!d->d_btimer) { if ((INT_GET(d->d_blk_softlimit, ARCH_CONVERT) && (INT_GET(d->d_bcount, ARCH_CONVERT) >= INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) || @@ -319,17 +317,17 @@ get_seconds() + XFS_QI_BTIMELIMIT(mp)); } } else { - if ((INT_ISZERO(d->d_blk_softlimit, ARCH_CONVERT) || + if ((!d->d_blk_softlimit || (INT_GET(d->d_bcount, ARCH_CONVERT) < INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) && - (INT_ISZERO(d->d_blk_hardlimit, ARCH_CONVERT) || + (!d->d_blk_hardlimit || (INT_GET(d->d_bcount, ARCH_CONVERT) < INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { - INT_ZERO(d->d_btimer, ARCH_CONVERT); + d->d_btimer = 0; } } - if (INT_ISZERO(d->d_itimer, ARCH_CONVERT)) { + if (!d->d_itimer) { if ((INT_GET(d->d_ino_softlimit, ARCH_CONVERT) && (INT_GET(d->d_icount, ARCH_CONVERT) >= INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) || @@ -340,17 +338,17 @@ get_seconds() + XFS_QI_ITIMELIMIT(mp)); } } else { - if ((INT_ISZERO(d->d_ino_softlimit, ARCH_CONVERT) || + if ((!d->d_ino_softlimit || (INT_GET(d->d_icount, ARCH_CONVERT) < INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) && - (INT_ISZERO(d->d_ino_hardlimit, ARCH_CONVERT) || + (!d->d_ino_hardlimit || (INT_GET(d->d_icount, ARCH_CONVERT) < INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { - INT_ZERO(d->d_itimer, ARCH_CONVERT); + d->d_itimer = 0; } } - if (INT_ISZERO(d->d_rtbtimer, ARCH_CONVERT)) { + if (!d->d_rtbtimer) { if ((INT_GET(d->d_rtb_softlimit, ARCH_CONVERT) && (INT_GET(d->d_rtbcount, ARCH_CONVERT) >= INT_GET(d->d_rtb_softlimit, ARCH_CONVERT))) || @@ -361,13 +359,13 @@ get_seconds() + XFS_QI_RTBTIMELIMIT(mp)); } } else { - if ((INT_ISZERO(d->d_rtb_softlimit, ARCH_CONVERT) || + if ((!d->d_rtb_softlimit || (INT_GET(d->d_rtbcount, ARCH_CONVERT) < INT_GET(d->d_rtb_softlimit, ARCH_CONVERT))) && - (INT_ISZERO(d->d_rtb_hardlimit, ARCH_CONVERT) || + (!d->d_rtb_hardlimit || (INT_GET(d->d_rtbcount, ARCH_CONVERT) < INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)))) { - INT_ZERO(d->d_rtbtimer, ARCH_CONVERT); + d->d_rtbtimer = 0; } } } @@ -385,7 +383,7 @@ /* * root's limits are not real limits. */ - if (INT_ISZERO(d->d_id, ARCH_CONVERT)) + if (!d->d_id) return (0); warned = 0; @@ -397,10 +395,10 @@ warned++; } } else { - if (INT_ISZERO(d->d_blk_softlimit, ARCH_CONVERT) || + if (!d->d_blk_softlimit || (INT_GET(d->d_bcount, ARCH_CONVERT) < INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) { - INT_ZERO(d->d_bwarns, ARCH_CONVERT); + d->d_bwarns = 0; } } @@ -412,10 +410,10 @@ warned++; } } else { - if ((INT_ISZERO(d->d_ino_softlimit, ARCH_CONVERT)) || + if (!d->d_ino_softlimit || (INT_GET(d->d_icount, ARCH_CONVERT) < INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) { - INT_ZERO(d->d_iwarns, ARCH_CONVERT); + d->d_iwarns = 0; } } #ifdef QUOTADEBUG diff -Nru a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c --- a/fs/xfs/quota/xfs_qm_syscalls.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/quota/xfs_qm_syscalls.c 2005-03-30 16:58:49 -08:00 @@ -1211,8 +1211,7 @@ if (INT_GET(dqp->q_core.d_blk_softlimit, ARCH_CONVERT) && INT_GET(dqp->q_core.d_bcount, ARCH_CONVERT) >= INT_GET(dqp->q_core.d_blk_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(dqp->q_core.d_btimer, ARCH_CONVERT) && - !INT_ISZERO(dqp->q_core.d_id, ARCH_CONVERT)) { + if (!dqp->q_core.d_btimer && dqp->q_core.d_id) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] BLK TIMER NOT STARTED", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); @@ -1222,8 +1221,7 @@ if (INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT) && INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) >= INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(dqp->q_core.d_itimer, ARCH_CONVERT) && - !INT_ISZERO(dqp->q_core.d_id, ARCH_CONVERT)) { + if (!dqp->q_core.d_itimer && dqp->q_core.d_id) { cmn_err(CE_DEBUG, "%d [%s] [0x%p] INO TIMER NOT STARTED", d->d_id, DQFLAGTO_TYPESTR(d), d->q_mount); diff -Nru a/fs/xfs/quota/xfs_quota_priv.h b/fs/xfs/quota/xfs_quota_priv.h --- a/fs/xfs/quota/xfs_quota_priv.h 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/quota/xfs_quota_priv.h 2005-03-30 16:58:50 -08:00 @@ -104,15 +104,15 @@ #define XFS_IS_DQTYPE_ON(mp, type) (type == XFS_DQ_USER ? \ XFS_IS_UQUOTA_ON(mp):XFS_IS_GQUOTA_ON(mp)) #define XFS_IS_DQUOT_UNINITIALIZED(dqp) ( \ - INT_ISZERO(dqp->q_core.d_blk_hardlimit, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_blk_softlimit, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_rtb_hardlimit, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_rtb_softlimit, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_ino_hardlimit, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_ino_softlimit, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_bcount, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_rtbcount, ARCH_CONVERT) && \ - INT_ISZERO(dqp->q_core.d_icount, ARCH_CONVERT)) + !dqp->q_core.d_blk_hardlimit && \ + !dqp->q_core.d_blk_softlimit && \ + !dqp->q_core.d_rtb_hardlimit && \ + !dqp->q_core.d_rtb_softlimit && \ + !dqp->q_core.d_ino_hardlimit && \ + !dqp->q_core.d_ino_softlimit && \ + !dqp->q_core.d_bcount && \ + !dqp->q_core.d_rtbcount && \ + !dqp->q_core.d_icount) #define HL_PREVP dq_hashlist.ql_prevp #define HL_NEXT dq_hashlist.ql_next @@ -174,7 +174,7 @@ (tp)->t_dqinfo->dqa_usrdquots : \ (tp)->t_dqinfo->dqa_grpdquots) #define XFS_IS_SUSER_DQUOT(dqp) \ - (INT_ISZERO((dqp)->q_core.d_id, ARCH_CONVERT)) + (!((dqp)->q_core.d_id)) #define XFS_PURGE_INODE(ip) \ { \ diff -Nru a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c --- a/fs/xfs/quota/xfs_trans_dquot.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/quota/xfs_trans_dquot.c 2005-03-30 16:58:47 -08:00 @@ -455,7 +455,7 @@ * Get any default limits in use. * Start/reset the timer(s) if needed. */ - if (!INT_ISZERO(d->d_id, ARCH_CONVERT)) { + if (d->d_id) { xfs_qm_adjust_dqlimits(tp->t_mountp, d); xfs_qm_adjust_dqtimers(tp->t_mountp, d); } @@ -669,7 +669,7 @@ error = 0; if ((flags & XFS_QMOPT_FORCE_RES) == 0 && - !INT_ISZERO(dqp->q_core.d_id, ARCH_CONVERT) && + dqp->q_core.d_id && XFS_IS_QUOTA_ENFORCED(dqp->q_mount)) { #ifdef QUOTADEBUG cmn_err(CE_DEBUG, "BLK Res: nblks=%ld + resbcount=%Ld" @@ -694,7 +694,7 @@ * return EDQUOT */ if ((btimer != 0 && get_seconds() > btimer) || - (!INT_ISZERO(dqp->q_core.d_bwarns, ARCH_CONVERT) && + (dqp->q_core.d_bwarns && INT_GET(dqp->q_core.d_bwarns, ARCH_CONVERT) >= XFS_QI_BWARNLIMIT(dqp->q_mount))) { error = EDQUOT; @@ -719,9 +719,9 @@ * If timer or warnings has expired, * return EDQUOT */ - if ((!INT_ISZERO(dqp->q_core.d_itimer, ARCH_CONVERT) && + if ((dqp->q_core.d_itimer && get_seconds() > INT_GET(dqp->q_core.d_itimer, ARCH_CONVERT)) || - (!INT_ISZERO(dqp->q_core.d_iwarns, ARCH_CONVERT) && + (dqp->q_core.d_iwarns && INT_GET(dqp->q_core.d_iwarns, ARCH_CONVERT) >= XFS_QI_IWARNLIMIT(dqp->q_mount))) { error = EDQUOT; diff -Nru a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c --- a/fs/xfs/xfs_acl.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_acl.c 2005-03-30 16:58:48 -08:00 @@ -403,38 +403,6 @@ } /* - * Look for any effective exec access, to allow CAP_DAC_OVERRIDE for exec. - * Ignore checking for exec in USER_OBJ when there is no mask, because - * in this "minimal acl" case we don't have any actual acls, and we - * won't even be here. - */ -STATIC int -xfs_acl_find_any_exec( - xfs_acl_t *fap) -{ - int i; - int masked_aces = 0; - int mask = 0; - - for (i = 0; i < fap->acl_cnt; i++) { - if (fap->acl_entry[i].ae_perm & ACL_EXECUTE) { - if (fap->acl_entry[i].ae_tag & (ACL_USER_OBJ|ACL_OTHER)) - return 1; - - if (fap->acl_entry[i].ae_tag == ACL_MASK) - mask = fap->acl_entry[i].ae_perm; - else - masked_aces |= fap->acl_entry[i].ae_perm; - - if ((mask & masked_aces) & ACL_EXECUTE) - return 1; - } - } - - return 0; -} - -/* * The access control process to determine the access permission: * if uid == file owner id, use the file owner bits. * if gid == file owner group id, use the file group bits. @@ -443,24 +411,19 @@ * until all acl entries are exhausted. The final permission produced * by matching acl entry or entries needs to be & with group permission. * if not owner, owning group, or matching entry in ACL, use file - * other bits. Don't allow CAP_DAC_OVERRIDE on exec access unless - * there is some effective exec access somewhere. + * other bits. */ STATIC int xfs_acl_capability_check( mode_t mode, - cred_t *cr, - xfs_acl_t *fap) + cred_t *cr) { if ((mode & ACL_READ) && !capable_cred(cr, CAP_DAC_READ_SEARCH)) return EACCES; if ((mode & ACL_WRITE) && !capable_cred(cr, CAP_DAC_OVERRIDE)) return EACCES; - if ((mode & ACL_EXECUTE) && - (!capable_cred(cr, CAP_DAC_OVERRIDE) || - !xfs_acl_find_any_exec(fap))) { + if ((mode & ACL_EXECUTE) && !capable_cred(cr, CAP_DAC_OVERRIDE)) return EACCES; - } return 0; } @@ -567,7 +530,7 @@ break; } - return xfs_acl_capability_check(md, cr, fap); + return xfs_acl_capability_check(md, cr); } /* diff -Nru a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c --- a/fs/xfs/xfs_alloc.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_alloc.c 2005-03-30 16:58:48 -08:00 @@ -2009,7 +2009,7 @@ /* * Freelist is empty, give up. */ - if (INT_ISZERO(agf->agf_flcount, ARCH_CONVERT)) { + if (!agf->agf_flcount) { *bnop = NULLAGBLOCK; return 0; } @@ -2028,7 +2028,7 @@ INT_MOD(agf->agf_flfirst, ARCH_CONVERT, 1); xfs_trans_brelse(tp, agflbp); if (INT_GET(agf->agf_flfirst, ARCH_CONVERT) == XFS_AGFL_SIZE(mp)) - INT_ZERO(agf->agf_flfirst, ARCH_CONVERT); + agf->agf_flfirst = 0; pag = &mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)]; INT_MOD(agf->agf_flcount, ARCH_CONVERT, -1); xfs_trans_agflist_delta(tp, -1); @@ -2128,7 +2128,7 @@ agfl = XFS_BUF_TO_AGFL(agflbp); INT_MOD(agf->agf_fllast, ARCH_CONVERT, 1); if (INT_GET(agf->agf_fllast, ARCH_CONVERT) == XFS_AGFL_SIZE(mp)) - INT_ZERO(agf->agf_fllast, ARCH_CONVERT); + agf->agf_fllast = 0; pag = &mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)]; INT_MOD(agf->agf_flcount, ARCH_CONVERT, 1); xfs_trans_agflist_delta(tp, 1); diff -Nru a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c --- a/fs/xfs/xfs_alloc_btree.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_alloc_btree.c 2005-03-30 16:58:49 -08:00 @@ -209,7 +209,7 @@ * No free extents left. */ else - INT_ZERO(agf->agf_longest, ARCH_CONVERT); + agf->agf_longest = 0; mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)].pagf_longest = INT_GET(agf->agf_longest, ARCH_CONVERT); xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, diff -Nru a/fs/xfs/xfs_arch.h b/fs/xfs/xfs_arch.h --- a/fs/xfs/xfs_arch.h 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_arch.h 2005-03-30 16:58:50 -08:00 @@ -72,69 +72,18 @@ ((sizeof(type) == 2) ? INT_SWAP16(type,var) : \ (var)))) -#define INT_SWAP_UNALIGNED_32(from,to) \ - { \ - ((__u8*)(to))[0] = ((__u8*)(from))[3]; \ - ((__u8*)(to))[1] = ((__u8*)(from))[2]; \ - ((__u8*)(to))[2] = ((__u8*)(from))[1]; \ - ((__u8*)(to))[3] = ((__u8*)(from))[0]; \ - } - -#define INT_SWAP_UNALIGNED_64(from,to) \ - { \ - INT_SWAP_UNALIGNED_32( ((__u8*)(from)) + 4, ((__u8*)(to))); \ - INT_SWAP_UNALIGNED_32( ((__u8*)(from)), ((__u8*)(to)) + 4); \ - } - /* * get and set integers from potentially unaligned locations */ -#define INT_GET_UNALIGNED_16_LE(pointer) \ - ((__u16)((((__u8*)(pointer))[0] ) | (((__u8*)(pointer))[1] << 8 ))) #define INT_GET_UNALIGNED_16_BE(pointer) \ ((__u16)((((__u8*)(pointer))[0] << 8) | (((__u8*)(pointer))[1]))) -#define INT_SET_UNALIGNED_16_LE(pointer,value) \ - { \ - ((__u8*)(pointer))[0] = (((value) ) & 0xff); \ - ((__u8*)(pointer))[1] = (((value) >> 8) & 0xff); \ - } #define INT_SET_UNALIGNED_16_BE(pointer,value) \ { \ ((__u8*)(pointer))[0] = (((value) >> 8) & 0xff); \ ((__u8*)(pointer))[1] = (((value) ) & 0xff); \ } -#define INT_GET_UNALIGNED_32_LE(pointer) \ - ((__u32)((((__u8*)(pointer))[0] ) | (((__u8*)(pointer))[1] << 8 ) \ - |(((__u8*)(pointer))[2] << 16) | (((__u8*)(pointer))[3] << 24))) -#define INT_GET_UNALIGNED_32_BE(pointer) \ - ((__u32)((((__u8*)(pointer))[0] << 24) | (((__u8*)(pointer))[1] << 16) \ - |(((__u8*)(pointer))[2] << 8) | (((__u8*)(pointer))[3] ))) - -#define INT_GET_UNALIGNED_64_LE(pointer) \ - (((__u64)(INT_GET_UNALIGNED_32_LE(((__u8*)(pointer))+4)) << 32 ) \ - |((__u64)(INT_GET_UNALIGNED_32_LE(((__u8*)(pointer)) )) )) -#define INT_GET_UNALIGNED_64_BE(pointer) \ - (((__u64)(INT_GET_UNALIGNED_32_BE(((__u8*)(pointer)) )) << 32 ) \ - |((__u64)(INT_GET_UNALIGNED_32_BE(((__u8*)(pointer))+4)) )) - -/* - * now pick the right ones for our MACHINE ARCHITECTURE - */ - -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define INT_GET_UNALIGNED_16(pointer) INT_GET_UNALIGNED_16_LE(pointer) -#define INT_SET_UNALIGNED_16(pointer,value) INT_SET_UNALIGNED_16_LE(pointer,value) -#define INT_GET_UNALIGNED_32(pointer) INT_GET_UNALIGNED_32_LE(pointer) -#define INT_GET_UNALIGNED_64(pointer) INT_GET_UNALIGNED_64_LE(pointer) -#else -#define INT_GET_UNALIGNED_16(pointer) INT_GET_UNALIGNED_16_BE(pointer) -#define INT_SET_UNALIGNED_16(pointer,value) INT_SET_UNALIGNED_16_BE(pointer,value) -#define INT_GET_UNALIGNED_32(pointer) INT_GET_UNALIGNED_32_BE(pointer) -#define INT_GET_UNALIGNED_64(pointer) INT_GET_UNALIGNED_64_BE(pointer) -#endif - /* define generic INT_ macros */ #define INT_GET(reference,arch) \ @@ -213,64 +162,52 @@ } \ } -#define INT_ISZERO(reference,arch) \ - ((reference) == 0) - -#define INT_ZERO(reference,arch) \ - ((reference) = 0) - -#define INT_GET_UNALIGNED_16_ARCH(pointer,arch) \ - ( ((arch) == ARCH_NOCONVERT) \ - ? \ - (INT_GET_UNALIGNED_16(pointer)) \ - : \ - (INT_GET_UNALIGNED_16_BE(pointer)) \ - ) -#define INT_SET_UNALIGNED_16_ARCH(pointer,value,arch) \ - if ((arch) == ARCH_NOCONVERT) { \ - INT_SET_UNALIGNED_16(pointer,value); \ - } else { \ - INT_SET_UNALIGNED_16_BE(pointer,value); \ - } - -#define DIRINO4_GET_ARCH(pointer,arch) \ - ( ((arch) == ARCH_NOCONVERT) \ - ? \ - (INT_GET_UNALIGNED_32(pointer)) \ - : \ - (INT_GET_UNALIGNED_32_BE(pointer)) \ - ) +/* + * In directories inode numbers are stored as unaligned arrays of unsigned + * 8bit integers on disk. + * + * For v1 directories or v2 directories that contain inode numbers that + * do not fit into 32bit the array has eight members, but the first member + * is always zero: + * + * |unused|48-55|40-47|32-39|24-31|16-23| 8-15| 0- 7| + * + * For v2 directories that only contain entries with inode numbers that fit + * into 32bits a four-member array is used: + * + * |24-31|16-23| 8-15| 0- 7| + */ -#if XFS_BIG_INUMS -#define DIRINO_GET_ARCH(pointer,arch) \ - ( ((arch) == ARCH_NOCONVERT) \ - ? \ - (INT_GET_UNALIGNED_64(pointer)) \ - : \ - (INT_GET_UNALIGNED_64_BE(pointer)) \ - ) -#else -/* MACHINE ARCHITECTURE dependent */ -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define DIRINO_GET_ARCH(pointer,arch) \ - DIRINO4_GET_ARCH((((__u8*)pointer)+4),arch) -#else -#define DIRINO_GET_ARCH(pointer,arch) \ - DIRINO4_GET_ARCH(pointer,arch) -#endif -#endif - -#define DIRINO_COPY_ARCH(from,to,arch) \ - if ((arch) == ARCH_NOCONVERT) { \ - memcpy(to,from,sizeof(xfs_ino_t)); \ - } else { \ - INT_SWAP_UNALIGNED_64(from,to); \ - } -#define DIRINO4_COPY_ARCH(from,to,arch) \ - if ((arch) == ARCH_NOCONVERT) { \ - memcpy(to,(((__u8*)from+4)),sizeof(xfs_dir2_ino4_t)); \ - } else { \ - INT_SWAP_UNALIGNED_32(from,to); \ - } +#define XFS_GET_DIR_INO4(di) \ + (((u32)(di).i[0] << 24) | ((di).i[1] << 16) | ((di).i[2] << 8) | ((di).i[3])) +#define XFS_PUT_DIR_INO4(from, di) \ +do { \ + (di).i[0] = (((from) & 0xff000000ULL) >> 24); \ + (di).i[1] = (((from) & 0x00ff0000ULL) >> 16); \ + (di).i[2] = (((from) & 0x0000ff00ULL) >> 8); \ + (di).i[3] = ((from) & 0x000000ffULL); \ +} while (0) + +#define XFS_DI_HI(di) \ + (((u32)(di).i[1] << 16) | ((di).i[2] << 8) | ((di).i[3])) +#define XFS_DI_LO(di) \ + (((u32)(di).i[4] << 24) | ((di).i[5] << 16) | ((di).i[6] << 8) | ((di).i[7])) + +#define XFS_GET_DIR_INO8(di) \ + (((xfs_ino_t)XFS_DI_LO(di) & 0xffffffffULL) | \ + ((xfs_ino_t)XFS_DI_HI(di) << 32)) + +#define XFS_PUT_DIR_INO8(from, di) \ +do { \ + (di).i[0] = 0; \ + (di).i[1] = (((from) & 0x00ff000000000000ULL) >> 48); \ + (di).i[2] = (((from) & 0x0000ff0000000000ULL) >> 40); \ + (di).i[3] = (((from) & 0x000000ff00000000ULL) >> 32); \ + (di).i[4] = (((from) & 0x00000000ff000000ULL) >> 24); \ + (di).i[5] = (((from) & 0x0000000000ff0000ULL) >> 16); \ + (di).i[6] = (((from) & 0x000000000000ff00ULL) >> 8); \ + (di).i[7] = ((from) & 0x00000000000000ffULL); \ +} while (0) + #endif /* __XFS_ARCH_H__ */ diff -Nru a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c --- a/fs/xfs/xfs_attr.c 2005-03-30 16:58:51 -08:00 +++ b/fs/xfs/xfs_attr.c 2005-03-30 16:58:51 -08:00 @@ -1884,7 +1884,7 @@ return(XFS_ERROR(EFSCORRUPTED)); } error = xfs_attr_leaf_list_int(bp, context); - if (error || (INT_ISZERO(leaf->hdr.info.forw, ARCH_CONVERT))) + if (error || !leaf->hdr.info.forw) break; /* not really an error, buffer full or EOF */ cursor->blkno = INT_GET(leaf->hdr.info.forw, ARCH_CONVERT); xfs_da_brelse(NULL, bp); diff -Nru a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c --- a/fs/xfs/xfs_attr_leaf.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_attr_leaf.c 2005-03-30 16:58:48 -08:00 @@ -129,7 +129,7 @@ } xfs_idata_realloc(dp, sizeof(*hdr), XFS_ATTR_FORK); hdr = (xfs_attr_sf_hdr_t *)ifp->if_u1.if_data; - INT_ZERO(hdr->count, ARCH_CONVERT); + hdr->count = 0; INT_SET(hdr->totsize, ARCH_CONVERT, sizeof(*hdr)); xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_ADATA); return(0); @@ -443,7 +443,7 @@ ASSERT(dp->i_afp != NULL); sf = (xfs_attr_shortform_t *)dp->i_afp->if_u1.if_data; ASSERT(sf != NULL); - if (INT_ISZERO(sf->hdr.count, ARCH_CONVERT)) + if (!sf->hdr.count) return(0); cursor = context->cursor; ASSERT(cursor != NULL); @@ -686,7 +686,7 @@ for (i = 0; i < INT_GET(leaf->hdr.count, ARCH_CONVERT); entry++, i++) { if (entry->flags & XFS_ATTR_INCOMPLETE) continue; /* don't copy partial entries */ - if (INT_ISZERO(entry->nameidx, ARCH_CONVERT)) + if (!entry->nameidx) continue; ASSERT(entry->flags & XFS_ATTR_LOCAL); name_loc = XFS_ATTR_LEAF_NAME_LOCAL(leaf, i); @@ -795,7 +795,7 @@ hdr = &leaf->hdr; INT_SET(hdr->info.magic, ARCH_CONVERT, XFS_ATTR_LEAF_MAGIC); INT_SET(hdr->firstused, ARCH_CONVERT, XFS_LBSIZE(dp->i_mount)); - if (INT_ISZERO(hdr->firstused, ARCH_CONVERT)) { + if (!hdr->firstused) { INT_SET(hdr->firstused, ARCH_CONVERT, XFS_LBSIZE(dp->i_mount) - XFS_ATTR_LEAF_NAME_ALIGN); } @@ -898,7 +898,7 @@ sum += INT_GET(map->size, ARCH_CONVERT); continue; } - if (INT_ISZERO(map->size, ARCH_CONVERT)) + if (!map->size) continue; /* no space in this map */ tmp = entsize; if (INT_GET(map->base, ARCH_CONVERT) @@ -1031,8 +1031,8 @@ memcpy((char *)name_rmt->name, args->name, args->namelen); entry->flags |= XFS_ATTR_INCOMPLETE; /* just in case */ - INT_ZERO(name_rmt->valuelen, ARCH_CONVERT); - INT_ZERO(name_rmt->valueblk, ARCH_CONVERT); + name_rmt->valuelen = 0; + name_rmt->valueblk = 0; args->rmtblkno = 1; args->rmtblkcnt = XFS_B_TO_FSB(mp, args->valuelen); } @@ -1097,12 +1097,12 @@ hdr_d->info = hdr_s->info; /* struct copy */ INT_SET(hdr_d->firstused, ARCH_CONVERT, XFS_LBSIZE(mp)); /* handle truncation gracefully */ - if (INT_ISZERO(hdr_d->firstused, ARCH_CONVERT)) { + if (!hdr_d->firstused) { INT_SET(hdr_d->firstused, ARCH_CONVERT, XFS_LBSIZE(mp) - XFS_ATTR_LEAF_NAME_ALIGN); } - INT_ZERO(hdr_d->usedbytes, ARCH_CONVERT); - INT_ZERO(hdr_d->count, ARCH_CONVERT); + hdr_d->usedbytes = 0; + hdr_d->count = 0; hdr_d->holes = 0; INT_SET(hdr_d->freemap[0].base, ARCH_CONVERT, sizeof(xfs_attr_leaf_hdr_t)); @@ -1456,7 +1456,7 @@ * Make altpath point to the block we want to keep and * path point to the block we want to drop (this one). */ - forward = (!INT_ISZERO(info->forw, ARCH_CONVERT)); + forward = info->forw; memcpy(&state->altpath, &state->path, sizeof(state->path)); error = xfs_da_path_shift(state, &state->altpath, forward, 0, &retval); @@ -1617,8 +1617,8 @@ INT_MOD(map->size, ARCH_CONVERT, INT_GET(hdr->freemap[after].size, ARCH_CONVERT)); - INT_ZERO(hdr->freemap[after].base, ARCH_CONVERT); - INT_ZERO(hdr->freemap[after].size, ARCH_CONVERT); + hdr->freemap[after].base = 0; + hdr->freemap[after].size = 0; } else if (before >= 0) { map = &hdr->freemap[before]; INT_MOD(map->size, ARCH_CONVERT, entsize); @@ -1686,7 +1686,7 @@ tmp = INT_GET(entry->nameidx, ARCH_CONVERT); } INT_SET(hdr->firstused, ARCH_CONVERT, tmp); - if (INT_ISZERO(hdr->firstused, ARCH_CONVERT)) { + if (!hdr->firstused) { INT_SET(hdr->firstused, ARCH_CONVERT, tmp - XFS_ATTR_LEAF_NAME_ALIGN); } @@ -1772,13 +1772,13 @@ tmp_leaf = (xfs_attr_leafblock_t *)tmpbuffer; tmp_hdr = &tmp_leaf->hdr; tmp_hdr->info = save_hdr->info; /* struct copy */ - INT_ZERO(tmp_hdr->count, ARCH_CONVERT); + tmp_hdr->count = 0; INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize); - if (INT_ISZERO(tmp_hdr->firstused, ARCH_CONVERT)) { + if (!tmp_hdr->firstused) { INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize - XFS_ATTR_LEAF_NAME_ALIGN); } - INT_ZERO(tmp_hdr->usedbytes, ARCH_CONVERT); + tmp_hdr->usedbytes = 0; if (xfs_attr_leaf_order(save_blk->bp, drop_blk->bp)) { xfs_attr_leaf_moveents(drop_leaf, 0, tmp_leaf, 0, (int)INT_GET(drop_hdr->count, ARCH_CONVERT), @@ -1860,8 +1860,8 @@ else break; } - ASSERT((probe >= 0) && \ - ((INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) + ASSERT((probe >= 0) && + (!leaf->hdr.count || (probe < INT_GET(leaf->hdr.count, ARCH_CONVERT)))); ASSERT((span <= 4) || (INT_GET(entry->hashval, ARCH_CONVERT) == hashval)); @@ -2151,10 +2151,10 @@ INT_SET(hdr_d->freemap[0].size, ARCH_CONVERT, INT_GET(hdr_d->firstused, ARCH_CONVERT) - INT_GET(hdr_d->freemap[0].base, ARCH_CONVERT)); - INT_ZERO(hdr_d->freemap[1].base, ARCH_CONVERT); - INT_ZERO(hdr_d->freemap[2].base, ARCH_CONVERT); - INT_ZERO(hdr_d->freemap[1].size, ARCH_CONVERT); - INT_ZERO(hdr_d->freemap[2].size, ARCH_CONVERT); + hdr_d->freemap[1].base = 0; + hdr_d->freemap[2].base = 0; + hdr_d->freemap[1].size = 0; + hdr_d->freemap[2].size = 0; hdr_s->holes = 1; /* leaf may not be compact */ } @@ -2199,7 +2199,7 @@ == XFS_ATTR_LEAF_MAGIC); if (count) *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); - if (INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) + if (!leaf->hdr.count) return(0); return(INT_GET(leaf->entries[INT_GET(leaf->hdr.count, ARCH_CONVERT)-1].hashval, ARCH_CONVERT)); @@ -2543,8 +2543,8 @@ XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry))); if ((entry->flags & XFS_ATTR_LOCAL) == 0) { name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index); - INT_ZERO(name_rmt->valueblk, ARCH_CONVERT); - INT_ZERO(name_rmt->valuelen, ARCH_CONVERT); + name_rmt->valueblk = 0; + name_rmt->valuelen = 0; xfs_da_log_buf(args->trans, bp, XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt))); } @@ -2661,8 +2661,8 @@ XFS_DA_LOGRANGE(leaf2, entry2, sizeof(*entry2))); if ((entry2->flags & XFS_ATTR_LOCAL) == 0) { name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf2, args->index2); - INT_ZERO(name_rmt->valueblk, ARCH_CONVERT); - INT_ZERO(name_rmt->valuelen, ARCH_CONVERT); + name_rmt->valueblk = 0; + name_rmt->valuelen = 0; xfs_da_log_buf(args->trans, bp2, XFS_DA_LOGRANGE(leaf2, name_rmt, sizeof(*name_rmt))); } @@ -2871,7 +2871,7 @@ if ( INT_GET(entry->nameidx, ARCH_CONVERT) && ((entry->flags & XFS_ATTR_LOCAL) == 0)) { name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, i); - if (!INT_ISZERO(name_rmt->valueblk, ARCH_CONVERT)) + if (name_rmt->valueblk) count++; } } @@ -2899,7 +2899,7 @@ if ( INT_GET(entry->nameidx, ARCH_CONVERT) && ((entry->flags & XFS_ATTR_LOCAL) == 0)) { name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, i); - if (!INT_ISZERO(name_rmt->valueblk, ARCH_CONVERT)) { + if (name_rmt->valueblk) { /* both on-disk, don't endian flip twice */ lp->valueblk = name_rmt->valueblk; INT_SET(lp->valuelen, ARCH_CONVERT, diff -Nru a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c --- a/fs/xfs/xfs_bmap.c 2005-03-30 16:58:51 -08:00 +++ b/fs/xfs/xfs_bmap.c 2005-03-30 16:58:51 -08:00 @@ -3261,7 +3261,7 @@ */ ablock = XFS_BUF_TO_BMBT_BLOCK(abp); INT_SET(ablock->bb_magic, ARCH_CONVERT, XFS_BMAP_MAGIC); - INT_ZERO(ablock->bb_level, ARCH_CONVERT); + ablock->bb_level = 0; INT_SET(ablock->bb_leftsib, ARCH_CONVERT, NULLDFSBNO); INT_SET(ablock->bb_rightsib, ARCH_CONVERT, NULLDFSBNO); arp = XFS_BMAP_REC_IADDR(ablock, 1, cur); diff -Nru a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c --- a/fs/xfs/xfs_bmap_btree.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_bmap_btree.c 2005-03-30 16:58:49 -08:00 @@ -2017,7 +2017,7 @@ ext_flag); } -#if ARCH_CONVERT != ARCH_NOCONVERT +#if __BYTE_ORDER != __BIG_ENDIAN /* Endian flipping versions of the bmbt extraction functions */ void xfs_bmbt_disk_get_all( @@ -2545,7 +2545,7 @@ #endif /* XFS_BIG_BLKNOS */ } -#if ARCH_CONVERT != ARCH_NOCONVERT +#if __BYTE_ORDER != __BIG_ENDIAN /* * Set all the fields in a bmap extent record from the uncompressed form. */ diff -Nru a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h --- a/fs/xfs/xfs_bmap_btree.h 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_bmap_btree.h 2005-03-30 16:58:48 -08:00 @@ -505,7 +505,7 @@ xfs_bmbt_get_state( xfs_bmbt_rec_t *r); -#if ARCH_CONVERT != ARCH_NOCONVERT +#if __BYTE_ORDER != __BIG_ENDIAN void xfs_bmbt_disk_get_all( xfs_bmbt_rec_t *r, @@ -631,7 +631,7 @@ xfs_bmbt_rec_t *r, xfs_exntst_t v); -#if ARCH_CONVERT != ARCH_NOCONVERT +#if __BYTE_ORDER != __BIG_ENDIAN void xfs_bmbt_disk_set_all( xfs_bmbt_rec_t *r, diff -Nru a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c --- a/fs/xfs/xfs_btree.c 2005-03-30 16:58:51 -08:00 +++ b/fs/xfs/xfs_btree.c 2005-03-30 16:58:51 -08:00 @@ -208,10 +208,10 @@ INT_GET(block->bb_level, ARCH_CONVERT) == level && INT_GET(block->bb_numrecs, ARCH_CONVERT) <= xfs_btree_maxrecs(cur, (xfs_btree_block_t *)block) && - !INT_ISZERO(block->bb_leftsib, ARCH_CONVERT) && + block->bb_leftsib && (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLDFSBNO || XFS_FSB_SANITY_CHECK(mp, INT_GET(block->bb_leftsib, ARCH_CONVERT))) && - !INT_ISZERO(block->bb_rightsib, ARCH_CONVERT) && + block->bb_rightsib && (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLDFSBNO || XFS_FSB_SANITY_CHECK(mp, INT_GET(block->bb_rightsib, ARCH_CONVERT))); if (unlikely(XFS_TEST_ERROR(!lblock_ok, mp, XFS_ERRTAG_BTREE_CHECK_LBLOCK, @@ -329,10 +329,10 @@ xfs_btree_maxrecs(cur, (xfs_btree_block_t *)block) && (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK || INT_GET(block->bb_leftsib, ARCH_CONVERT) < agflen) && - !INT_ISZERO(block->bb_leftsib, ARCH_CONVERT) && + block->bb_leftsib && (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK || INT_GET(block->bb_rightsib, ARCH_CONVERT) < agflen) && - !INT_ISZERO(block->bb_rightsib, ARCH_CONVERT); + block->bb_rightsib; if (unlikely(XFS_TEST_ERROR(!sblock_ok, cur->bc_mp, XFS_ERRTAG_BTREE_CHECK_SBLOCK, XFS_RANDOM_BTREE_CHECK_SBLOCK))) { @@ -484,7 +484,7 @@ /* * It's empty, there is no such record. */ - if (INT_ISZERO(block->bb_h.bb_numrecs, ARCH_CONVERT)) + if (!block->bb_h.bb_numrecs) return 0; /* * Set the ptr value to 1, that's the first record/key. @@ -698,7 +698,7 @@ /* * It's empty, there is no such record. */ - if (INT_ISZERO(block->bb_h.bb_numrecs, ARCH_CONVERT)) + if (!block->bb_h.bb_numrecs) return 0; /* * Set the ptr value to numrecs, that's the last record/key. diff -Nru a/fs/xfs/xfs_clnt.h b/fs/xfs/xfs_clnt.h --- a/fs/xfs/xfs_clnt.h 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_clnt.h 2005-03-30 16:58:49 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -103,5 +103,8 @@ #define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */ #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width * allocation */ +#define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */ +#define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename + * symlink,mkdir,rmdir,mknod */ #endif /* __XFS_CLNT_H__ */ diff -Nru a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c --- a/fs/xfs/xfs_da_btree.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_da_btree.c 2005-03-30 16:58:49 -08:00 @@ -137,11 +137,11 @@ return(error); ASSERT(bp != NULL); node = bp->data; - INT_ZERO(node->hdr.info.forw, ARCH_CONVERT); - INT_ZERO(node->hdr.info.back, ARCH_CONVERT); + node->hdr.info.forw = 0; + node->hdr.info.back = 0; INT_SET(node->hdr.info.magic, ARCH_CONVERT, XFS_DA_NODE_MAGIC); - INT_ZERO(node->hdr.info.pad, ARCH_CONVERT); - INT_ZERO(node->hdr.count, ARCH_CONVERT); + node->hdr.info.pad = 0; + node->hdr.count = 0; INT_SET(node->hdr.level, ARCH_CONVERT, level); xfs_da_log_buf(tp, bp, @@ -306,7 +306,7 @@ */ node = oldblk->bp->data; - if (!INT_ISZERO(node->hdr.info.forw, ARCH_CONVERT)) { + if (node->hdr.info.forw) { if (INT_GET(node->hdr.info.forw, ARCH_CONVERT) == addblk->blkno) { bp = addblk->bp; } else { @@ -791,8 +791,8 @@ ASSERT(root_blk->magic == XFS_DA_NODE_MAGIC); oldroot = root_blk->bp->data; ASSERT(INT_GET(oldroot->hdr.info.magic, ARCH_CONVERT) == XFS_DA_NODE_MAGIC); - ASSERT(INT_ISZERO(oldroot->hdr.info.forw, ARCH_CONVERT)); - ASSERT(INT_ISZERO(oldroot->hdr.info.back, ARCH_CONVERT)); + ASSERT(!oldroot->hdr.info.forw); + ASSERT(!oldroot->hdr.info.back); /* * If the root has more than one child, then don't do anything. @@ -818,8 +818,8 @@ } else { ASSERT(INT_GET(blkinfo->magic, ARCH_CONVERT) == XFS_DA_NODE_MAGIC); } - ASSERT(INT_ISZERO(blkinfo->forw, ARCH_CONVERT)); - ASSERT(INT_ISZERO(blkinfo->back, ARCH_CONVERT)); + ASSERT(!blkinfo->forw); + ASSERT(!blkinfo->back); memcpy(root_blk->bp->data, bp->data, state->blocksize); xfs_da_log_buf(args->trans, root_blk->bp, 0, state->blocksize - 1); error = xfs_da_shrink_inode(args, child, bp); @@ -871,7 +871,7 @@ * Make altpath point to the block we want to keep and * path point to the block we want to drop (this one). */ - forward = (!INT_ISZERO(info->forw, ARCH_CONVERT)); + forward = info->forw; memcpy(&state->altpath, &state->path, sizeof(state->path)); error = xfs_da_path_shift(state, &state->altpath, forward, 0, &retval); @@ -1416,7 +1416,7 @@ ASSERT(INT_GET(node->hdr.info.magic, ARCH_CONVERT) == XFS_DA_NODE_MAGIC); if (count) *count = INT_GET(node->hdr.count, ARCH_CONVERT); - if (INT_ISZERO(node->hdr.count, ARCH_CONVERT)) + if (!node->hdr.count) return(0); return(INT_GET(node->btree[ INT_GET(node->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT)); } diff -Nru a/fs/xfs/xfs_dinode.h b/fs/xfs/xfs_dinode.h --- a/fs/xfs/xfs_dinode.h 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_dinode.h 2005-03-30 16:58:49 -08:00 @@ -204,58 +204,59 @@ * Inode data & attribute fork sizes, per inode. */ #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_Q) -int xfs_cfork_q_arch(xfs_dinode_core_t *dcp, xfs_arch_t arch); +int xfs_cfork_q_disk(xfs_dinode_core_t *dcp); int xfs_cfork_q(xfs_dinode_core_t *dcp); -#define XFS_CFORK_Q_ARCH(dcp,arch) xfs_cfork_q_arch(dcp,arch) +#define XFS_CFORK_Q_DISK(dcp) xfs_cfork_q_disk(dcp) #define XFS_CFORK_Q(dcp) xfs_cfork_q(dcp) #else -#define XFS_CFORK_Q_ARCH(dcp,arch) (!INT_ISZERO((dcp)->di_forkoff, arch)) +#define XFS_CFORK_Q_DISK(dcp) ((dcp)->di_forkoff != 0) #define XFS_CFORK_Q(dcp) ((dcp)->di_forkoff != 0) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_BOFF) -int xfs_cfork_boff_arch(xfs_dinode_core_t *dcp, xfs_arch_t arch); +int xfs_cfork_boff_disk(xfs_dinode_core_t *dcp); int xfs_cfork_boff(xfs_dinode_core_t *dcp); -#define XFS_CFORK_BOFF_ARCH(dcp,arch) xfs_cfork_boff_arch(dcp,arch) +#define XFS_CFORK_BOFF_DISK(dcp) xfs_cfork_boff_disk(dcp) #define XFS_CFORK_BOFF(dcp) xfs_cfork_boff(dcp) #else -#define XFS_CFORK_BOFF_ARCH(dcp,arch) ((int)(INT_GET((dcp)->di_forkoff, arch) << 3)) +#define XFS_CFORK_BOFF_DISK(dcp) ((int)(INT_GET((dcp)->di_forkoff, ARCH_CONVERT) << 3)) #define XFS_CFORK_BOFF(dcp) ((int)((dcp)->di_forkoff << 3)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_DSIZE) -int xfs_cfork_dsize_arch(xfs_dinode_core_t *dcp, struct xfs_mount *mp, xfs_arch_t arch); +int xfs_cfork_dsize_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp); int xfs_cfork_dsize(xfs_dinode_core_t *dcp, struct xfs_mount *mp); -#define XFS_CFORK_DSIZE_ARCH(dcp,mp,arch) xfs_cfork_dsize_arch(dcp,mp,arch) +#define XFS_CFORK_DSIZE_DISK(dcp,mp) xfs_cfork_dsize_disk(dcp,mp) #define XFS_CFORK_DSIZE(dcp,mp) xfs_cfork_dsize(dcp,mp) #else -#define XFS_CFORK_DSIZE_ARCH(dcp,mp,arch) \ - (XFS_CFORK_Q_ARCH(dcp, arch) ? XFS_CFORK_BOFF_ARCH(dcp, arch) : XFS_LITINO(mp)) +#define XFS_CFORK_DSIZE_DISK(dcp,mp) \ + (XFS_CFORK_Q_DISK(dcp) ? XFS_CFORK_BOFF_DISK(dcp) : XFS_LITINO(mp)) #define XFS_CFORK_DSIZE(dcp,mp) \ (XFS_CFORK_Q(dcp) ? XFS_CFORK_BOFF(dcp) : XFS_LITINO(mp)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_ASIZE) -int xfs_cfork_asize_arch(xfs_dinode_core_t *dcp, struct xfs_mount *mp, xfs_arch_t arch); +int xfs_cfork_asize_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp); int xfs_cfork_asize(xfs_dinode_core_t *dcp, struct xfs_mount *mp); -#define XFS_CFORK_ASIZE_ARCH(dcp,mp,arch) xfs_cfork_asize_arch(dcp,mp,arch) +#define XFS_CFORK_ASIZE_DISK(dcp,mp) xfs_cfork_asize_disk(dcp,mp) #define XFS_CFORK_ASIZE(dcp,mp) xfs_cfork_asize(dcp,mp) #else -#define XFS_CFORK_ASIZE_ARCH(dcp,mp,arch) \ - (XFS_CFORK_Q_ARCH(dcp, arch) ? XFS_LITINO(mp) - XFS_CFORK_BOFF_ARCH(dcp, arch) : 0) +#define XFS_CFORK_ASIZE_DISK(dcp,mp) \ + (XFS_CFORK_Q_DISK(dcp) ? XFS_LITINO(mp) - XFS_CFORK_BOFF_DISK(dcp) : 0) #define XFS_CFORK_ASIZE(dcp,mp) \ (XFS_CFORK_Q(dcp) ? XFS_LITINO(mp) - XFS_CFORK_BOFF(dcp) : 0) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_SIZE) -int xfs_cfork_size_arch(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w, xfs_arch_t arch); +int xfs_cfork_size_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w); int xfs_cfork_size(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w); -#define XFS_CFORK_SIZE_ARCH(dcp,mp,w,arch) xfs_cfork_size_arch(dcp,mp,w,arch) +#define XFS_CFORK_SIZE_DISK(dcp,mp,w) xfs_cfork_size_disk(dcp,mp,w) #define XFS_CFORK_SIZE(dcp,mp,w) xfs_cfork_size(dcp,mp,w) #else -#define XFS_CFORK_SIZE_ARCH(dcp,mp,w,arch) \ +#define XFS_CFORK_SIZE_DISK(dcp,mp,w) \ ((w) == XFS_DATA_FORK ? \ - XFS_CFORK_DSIZE_ARCH(dcp, mp, arch) : XFS_CFORK_ASIZE_ARCH(dcp, mp, arch)) + XFS_CFORK_DSIZE_DISK(dcp, mp) : \ + XFS_CFORK_ASIZE_DISK(dcp, mp)) #define XFS_CFORK_SIZE(dcp,mp,w) \ ((w) == XFS_DATA_FORK ? \ XFS_CFORK_DSIZE(dcp, mp) : XFS_CFORK_ASIZE(dcp, mp)) @@ -263,33 +264,24 @@ #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_DSIZE) -int xfs_dfork_dsize_arch(xfs_dinode_t *dip, struct xfs_mount *mp, xfs_arch_t arch); int xfs_dfork_dsize(xfs_dinode_t *dip, struct xfs_mount *mp); -#define XFS_DFORK_DSIZE_ARCH(dip,mp,arch) xfs_dfork_dsize_arch(dip,mp,arch) #define XFS_DFORK_DSIZE(dip,mp) xfs_dfork_dsize(dip,mp) #else -#define XFS_DFORK_DSIZE_ARCH(dip,mp,arch) XFS_CFORK_DSIZE_ARCH(&(dip)->di_core, mp, arch) -#define XFS_DFORK_DSIZE(dip,mp) XFS_DFORK_DSIZE_ARCH(dip,mp,ARCH_NOCONVERT) +#define XFS_DFORK_DSIZE(dip,mp) XFS_CFORK_DSIZE_DISK(&(dip)->di_core, mp) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_ASIZE) -int xfs_dfork_asize_arch(xfs_dinode_t *dip, struct xfs_mount *mp, xfs_arch_t arch); int xfs_dfork_asize(xfs_dinode_t *dip, struct xfs_mount *mp); -#define XFS_DFORK_ASIZE_ARCH(dip,mp,arch) xfs_dfork_asize_arch(dip,mp,arch) #define XFS_DFORK_ASIZE(dip,mp) xfs_dfork_asize(dip,mp) #else -#define XFS_DFORK_ASIZE_ARCH(dip,mp,arch) XFS_CFORK_ASIZE_ARCH(&(dip)->di_core, mp, arch) -#define XFS_DFORK_ASIZE(dip,mp) XFS_DFORK_ASIZE_ARCH(dip,mp,ARCH_NOCONVERT) +#define XFS_DFORK_ASIZE(dip,mp) XFS_CFORK_ASIZE_DISK(&(dip)->di_core, mp) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_SIZE) -int xfs_dfork_size_arch(xfs_dinode_t *dip, struct xfs_mount *mp, int w, xfs_arch_t arch); int xfs_dfork_size(xfs_dinode_t *dip, struct xfs_mount *mp, int w); -#define XFS_DFORK_SIZE_ARCH(dip,mp,w,arch) xfs_dfork_size_arch(dip,mp,w,arch) #define XFS_DFORK_SIZE(dip,mp,w) xfs_dfork_size(dip,mp,w) #else -#define XFS_DFORK_SIZE_ARCH(dip,mp,w,arch) XFS_CFORK_SIZE_ARCH(&(dip)->di_core, mp, w, arch) -#define XFS_DFORK_SIZE(dip,mp,w) XFS_DFORK_SIZE_ARCH(dip,mp,w,ARCH_NOCONVERT) +#define XFS_DFORK_SIZE(dip,mp,w) XFS_CFORK_SIZE_DISK(&(dip)->di_core, mp, w) #endif @@ -297,143 +289,89 @@ * Macros for accessing per-fork disk inode information. */ #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_Q) -int xfs_dfork_q_arch(xfs_dinode_t *dip, xfs_arch_t arch); int xfs_dfork_q(xfs_dinode_t *dip); -#define XFS_DFORK_Q_ARCH(dip,arch) xfs_dfork_q_arch(dip,arch) #define XFS_DFORK_Q(dip) xfs_dfork_q(dip) #else -#define XFS_DFORK_Q_ARCH(dip,arch) XFS_CFORK_Q_ARCH(&(dip)->di_core, arch) -#define XFS_DFORK_Q(dip) XFS_DFORK_Q_ARCH(dip,ARCH_NOCONVERT) +#define XFS_DFORK_Q(dip) XFS_CFORK_Q_DISK(&(dip)->di_core) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_BOFF) -int xfs_dfork_boff_arch(xfs_dinode_t *dip, xfs_arch_t arch); int xfs_dfork_boff(xfs_dinode_t *dip); -#define XFS_DFORK_BOFF_ARCH(dip,arch) xfs_dfork_boff_arch(dip,arch) -#define XFS_DFORK_BOFF(dip) xfs_dfork_boff(dip) +#define XFS_DFORK_BOFF(dip) xfs_dfork_boff(dip) #else -#define XFS_DFORK_BOFF_ARCH(dip,arch) XFS_CFORK_BOFF_ARCH(&(dip)->di_core, arch) -#define XFS_DFORK_BOFF(dip) XFS_DFORK_BOFF_ARCH(dip,ARCH_NOCONVERT) +#define XFS_DFORK_BOFF(dip) XFS_CFORK_BOFF_DISK(&(dip)->di_core) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_DPTR) -char *xfs_dfork_dptr_arch(xfs_dinode_t *dip, xfs_arch_t arch); char *xfs_dfork_dptr(xfs_dinode_t *dip); -#define XFS_DFORK_DPTR_ARCH(dip,arch) xfs_dfork_dptr_arch(dip,arch) #define XFS_DFORK_DPTR(dip) xfs_dfork_dptr(dip) #else -#define XFS_DFORK_DPTR_ARCH(dip,arch) ((dip)->di_u.di_c) -#define XFS_DFORK_DPTR(dip) XFS_DFORK_DPTR_ARCH(dip,ARCH_NOCONVERT) +#define XFS_DFORK_DPTR(dip) ((dip)->di_u.di_c) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_APTR) -char *xfs_dfork_aptr_arch(xfs_dinode_t *dip, xfs_arch_t arch); char *xfs_dfork_aptr(xfs_dinode_t *dip); -#define XFS_DFORK_APTR_ARCH(dip,arch) xfs_dfork_aptr_arch(dip,arch) #define XFS_DFORK_APTR(dip) xfs_dfork_aptr(dip) #else -#define XFS_DFORK_APTR_ARCH(dip,arch) ((dip)->di_u.di_c + XFS_DFORK_BOFF_ARCH(dip, arch)) -#define XFS_DFORK_APTR(dip) XFS_DFORK_APTR_ARCH(dip,ARCH_NOCONVERT) +#define XFS_DFORK_APTR(dip) ((dip)->di_u.di_c + XFS_DFORK_BOFF(dip)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_PTR) -char *xfs_dfork_ptr_arch(xfs_dinode_t *dip, int w, xfs_arch_t arch); char *xfs_dfork_ptr(xfs_dinode_t *dip, int w); -#define XFS_DFORK_PTR_ARCH(dip,w,arch) xfs_dfork_ptr_arch(dip,w,arch) #define XFS_DFORK_PTR(dip,w) xfs_dfork_ptr(dip,w) #else -#define XFS_DFORK_PTR_ARCH(dip,w,arch) \ - ((w) == XFS_DATA_FORK ? XFS_DFORK_DPTR_ARCH(dip, arch) : XFS_DFORK_APTR_ARCH(dip, arch)) -#define XFS_DFORK_PTR(dip,w) XFS_DFORK_PTR_ARCH(dip,w,ARCH_NOCONVERT) +#define XFS_DFORK_PTR(dip,w) \ + ((w) == XFS_DATA_FORK ? XFS_DFORK_DPTR(dip) : XFS_DFORK_APTR(dip)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_FORMAT) -int xfs_cfork_format_arch(xfs_dinode_core_t *dcp, int w, xfs_arch_t arch); int xfs_cfork_format(xfs_dinode_core_t *dcp, int w); -#define XFS_CFORK_FORMAT_ARCH(dcp,w,arch) xfs_cfork_format_arch(dcp,w,arch) #define XFS_CFORK_FORMAT(dcp,w) xfs_cfork_format(dcp,w) #else -#define XFS_CFORK_FORMAT_ARCH(dcp,w,arch) \ - ((w) == XFS_DATA_FORK ? INT_GET((dcp)->di_format, arch) : INT_GET((dcp)->di_aformat, arch)) -#define XFS_CFORK_FORMAT(dcp,w) XFS_CFORK_FORMAT_ARCH(dcp,w,ARCH_NOCONVERT) +#define XFS_CFORK_FORMAT(dcp,w) \ + ((w) == XFS_DATA_FORK ? (dcp)->di_format : (dcp)->di_aformat) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_FMT_SET) -void xfs_cfork_fmt_set_arch(xfs_dinode_core_t *dcp, int w, int n, xfs_arch_t arch); void xfs_cfork_fmt_set(xfs_dinode_core_t *dcp, int w, int n); -#define XFS_CFORK_FMT_SET_ARCH(dcp,w,n,arch) xfs_cfork_fmt_set_arch(dcp,w,n,arch) #define XFS_CFORK_FMT_SET(dcp,w,n) xfs_cfork_fmt_set(dcp,w,n) #else -#define XFS_CFORK_FMT_SET_ARCH(dcp,w,n,arch) \ +#define XFS_CFORK_FMT_SET(dcp,w,n) \ ((w) == XFS_DATA_FORK ? \ - (INT_SET((dcp)->di_format, arch, (n))) : \ - (INT_SET((dcp)->di_aformat, arch, (n)))) -#define XFS_CFORK_FMT_SET(dcp,w,n) XFS_CFORK_FMT_SET_ARCH(dcp,w,n,ARCH_NOCONVERT) + ((dcp)->di_format = (n)) : \ + ((dcp)->di_aformat = (n))) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_NEXTENTS) -int xfs_cfork_nextents_arch(xfs_dinode_core_t *dcp, int w, xfs_arch_t arch); +int xfs_cfork_nextents_disk(xfs_dinode_core_t *dcp, int w); int xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w); -#define XFS_CFORK_NEXTENTS_ARCH(dcp,w,arch) xfs_cfork_nextents_arch(dcp,w,arch) +#define XFS_CFORK_NEXTENTS_DISK(dcp,w) xfs_cfork_nextents_disk(dcp,w) #define XFS_CFORK_NEXTENTS(dcp,w) xfs_cfork_nextents(dcp,w) #else -#define XFS_CFORK_NEXTENTS_ARCH(dcp,w,arch) \ - ((w) == XFS_DATA_FORK ? INT_GET((dcp)->di_nextents, arch) : INT_GET((dcp)->di_anextents, arch)) -#define XFS_CFORK_NEXTENTS(dcp,w) XFS_CFORK_NEXTENTS_ARCH(dcp,w,ARCH_NOCONVERT) +#define XFS_CFORK_NEXTENTS_DISK(dcp,w) \ + ((w) == XFS_DATA_FORK ? \ + INT_GET((dcp)->di_nextents, ARCH_CONVERT) : \ + INT_GET((dcp)->di_anextents, ARCH_CONVERT)) +#define XFS_CFORK_NEXTENTS(dcp,w) \ + ((w) == XFS_DATA_FORK ? (dcp)->di_nextents : (dcp)->di_anextents) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_NEXT_SET) -void xfs_cfork_next_set_arch(xfs_dinode_core_t *dcp, int w, int n, xfs_arch_t arch); void xfs_cfork_next_set(xfs_dinode_core_t *dcp, int w, int n); -#define XFS_CFORK_NEXT_SET_ARCH(dcp,w,n,arch) xfs_cfork_next_set_arch(dcp,w,n,arch) #define XFS_CFORK_NEXT_SET(dcp,w,n) xfs_cfork_next_set(dcp,w,n) #else -#define XFS_CFORK_NEXT_SET_ARCH(dcp,w,n,arch) \ +#define XFS_CFORK_NEXT_SET(dcp,w,n) \ ((w) == XFS_DATA_FORK ? \ - (INT_SET((dcp)->di_nextents, arch, (n))) : \ - (INT_SET((dcp)->di_anextents, arch, (n)))) -#define XFS_CFORK_NEXT_SET(dcp,w,n) XFS_CFORK_NEXT_SET_ARCH(dcp,w,n,ARCH_NOCONVERT) + ((dcp)->di_nextents = (n)) : \ + ((dcp)->di_anextents = (n))) #endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_FORMAT) -int xfs_dfork_format_arch(xfs_dinode_t *dip, int w, xfs_arch_t arch); -int xfs_dfork_format(xfs_dinode_t *dip, int w); -#define XFS_DFORK_FORMAT_ARCH(dip,w,arch) xfs_dfork_format_arch(dip,w,arch) -#define XFS_DFORK_FORMAT(dip,w) xfs_dfork_format(dip,w) -#else -#define XFS_DFORK_FORMAT_ARCH(dip,w,arch) XFS_CFORK_FORMAT_ARCH(&(dip)->di_core, w, arch) -#define XFS_DFORK_FORMAT(dip,w) XFS_DFORK_FORMAT_ARCH(dip,w,ARCH_NOCONVERT) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_FMT_SET) -void xfs_dfork_fmt_set_arch(xfs_dinode_t *dip, int w, int n, xfs_arch_t arch); -void xfs_dfork_fmt_set(xfs_dinode_t *dip, int w, int n); -#define XFS_DFORK_FMT_SET_ARCH(dip,w,n,arch) xfs_dfork_fmt_set_arch(dip,w,n,arch) -#define XFS_DFORK_FMT_SET(dip,w,n) xfs_dfork_fmt_set(dip,w,n) -#else -#define XFS_DFORK_FMT_SET_ARCH(dip,w,n,arch) XFS_CFORK_FMT_SET_ARCH(&(dip)->di_core, w, n, arch) -#define XFS_DFORK_FMT_SET(dip,w,n) XFS_DFORK_FMT_SET_ARCH(dip,w,n,ARCH_NOCONVERT) -#endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_NEXTENTS) -int xfs_dfork_nextents_arch(xfs_dinode_t *dip, int w, xfs_arch_t arch); int xfs_dfork_nextents(xfs_dinode_t *dip, int w); -#define XFS_DFORK_NEXTENTS_ARCH(dip,w,arch) xfs_dfork_nextents_arch(dip,w,arch) -#define XFS_DFORK_NEXTENTS(dip,w) xfs_dfork_nextents(dip,w) +#define XFS_DFORK_NEXTENTS(dip,w) xfs_dfork_nextents(dip,w) #else -#define XFS_DFORK_NEXTENTS_ARCH(dip,w,arch) XFS_CFORK_NEXTENTS_ARCH(&(dip)->di_core, w, arch) -#define XFS_DFORK_NEXTENTS(dip,w) XFS_DFORK_NEXTENTS_ARCH(dip,w,ARCH_NOCONVERT) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_NEXT_SET) -void xfs_dfork_next_set_arch(xfs_dinode_t *dip, int w, int n, xfs_arch_t arch); -void xfs_dfork_next_set(xfs_dinode_t *dip, int w, int n); -#define XFS_DFORK_NEXT_SET_ARCH(dip,w,n,arch) xfs_dfork_next_set_arch(dip,w,n,arch) -#define XFS_DFORK_NEXT_SET(dip,w,n) xfs_dfork_next_set(dip,w,n) -#else -#define XFS_DFORK_NEXT_SET_ARCH(dip,w,n,arch) XFS_CFORK_NEXT_SET_ARCH(&(dip)->di_core, w, n, arch) -#define XFS_DFORK_NEXT_SET(dip,w,n) XFS_DFORK_NEXT_SET_ARCH(dip,w,n,ARCH_NOCONVERT) - +#define XFS_DFORK_NEXTENTS(dip,w) XFS_CFORK_NEXTENTS_DISK(&(dip)->di_core, w) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_DINODE) diff -Nru a/fs/xfs/xfs_dir.c b/fs/xfs/xfs_dir.c --- a/fs/xfs/xfs_dir.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_dir.c 2005-03-30 16:58:47 -08:00 @@ -557,7 +557,7 @@ return 1; } sf = (xfs_dir_shortform_t *)(&dp->di_u.di_dirsf); - ino = XFS_GET_DIR_INO_ARCH(mp, sf->hdr.parent, ARCH_CONVERT); + ino = XFS_GET_DIR_INO8(sf->hdr.parent); if (xfs_dir_ino_validate(mp, ino)) return 1; @@ -575,7 +575,7 @@ namelen_sum = 0; sfe = &sf->list[0]; for (i = sf->hdr.count - 1; i >= 0; i--) { - ino = XFS_GET_DIR_INO_ARCH(mp, sfe->inumber, ARCH_CONVERT); + ino = XFS_GET_DIR_INO8(sfe->inumber); xfs_dir_ino_validate(mp, ino); if (sfe->namelen >= XFS_LITINO(mp)) { xfs_fs_cmn_err(CE_WARN, mp, @@ -716,7 +716,7 @@ entry = &leaf->entries[index]; namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); /* XXX - replace assert? */ - XFS_DIR_SF_PUT_DIRINO_ARCH(&inum, &namest->inumber, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber); xfs_da_log_buf(args->trans, bp, XFS_DA_LOGRANGE(leaf, namest, sizeof(namest->inumber))); xfs_da_buf_done(bp); @@ -1065,7 +1065,7 @@ entry = &leaf->entries[blk->index]; namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); /* XXX - replace assert ? */ - XFS_DIR_SF_PUT_DIRINO_ARCH(&inum, &namest->inumber, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber); xfs_da_log_buf(args->trans, bp, XFS_DA_LOGRANGE(leaf, namest, sizeof(namest->inumber))); xfs_da_buf_done(bp); diff -Nru a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c --- a/fs/xfs/xfs_dir2.c 2005-03-30 16:58:51 -08:00 +++ b/fs/xfs/xfs_dir2.c 2005-03-30 16:58:51 -08:00 @@ -165,7 +165,7 @@ if (dp->i_d.di_size > XFS_IFORK_DSIZE(dp)) return 0; sfp = (xfs_dir2_sf_t *)dp->i_df.if_u1.if_data; - return INT_ISZERO(sfp->hdr.count, ARCH_CONVERT); + return !sfp->hdr.count; } /* diff -Nru a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c --- a/fs/xfs/xfs_dir2_block.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_dir2_block.c 2005-03-30 16:58:47 -08:00 @@ -135,11 +135,11 @@ */ bf = block->hdr.bestfree; btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * No stale entries? Need space for entry and new leaf. */ - if (INT_ISZERO(btp->stale, ARCH_CONVERT)) { + if (!btp->stale) { /* * Tag just before the first leaf entry. */ @@ -327,7 +327,7 @@ /* * No stale entries, will use enddup space to hold new leaf. */ - if (INT_ISZERO(btp->stale, ARCH_CONVERT)) { + if (!btp->stale) { /* * Mark the space needed for the new leaf entry, now in use. */ @@ -494,7 +494,7 @@ */ btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); ptr = (char *)block->u; - endptr = (char *)XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + endptr = (char *)XFS_DIR2_BLOCK_LEAF_P(btp); p.dbp = dbp; p.put = put; p.uio = uio; @@ -585,7 +585,7 @@ mp = tp->t_mountp; block = bp->data; btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); xfs_da_log_buf(tp, bp, (uint)((char *)&blp[first] - (char *)block), (uint)((char *)&blp[last + 1] - (char *)block - 1)); } @@ -639,7 +639,7 @@ block = bp->data; xfs_dir2_data_check(dp, bp); btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * Get the offset from the leaf entry, to point to the data. */ @@ -691,7 +691,7 @@ block = bp->data; xfs_dir2_data_check(dp, bp); btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * Loop doing a binary search for our hash value. * Find our entry, ENOENT if it's not there. @@ -784,7 +784,7 @@ mp = dp->i_mount; block = bp->data; btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * Point to the data entry using the leaf entry. */ @@ -860,7 +860,7 @@ mp = dp->i_mount; block = bp->data; btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * Point to the data entry we need to change. */ @@ -936,7 +936,7 @@ * These will show up in the leaf bests table. */ while (dp->i_d.di_size > mp->m_dirblksize) { - bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); + bestsp = XFS_DIR2_LEAF_BESTS_P(ltp); if (INT_GET(bestsp[INT_GET(ltp->bestcount, ARCH_CONVERT) - 1], ARCH_CONVERT) == mp->m_dirblksize - (uint)sizeof(block->hdr)) { if ((error = @@ -991,12 +991,12 @@ */ btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); INT_SET(btp->count, ARCH_CONVERT, INT_GET(leaf->hdr.count, ARCH_CONVERT) - INT_GET(leaf->hdr.stale, ARCH_CONVERT)); - INT_ZERO(btp->stale, ARCH_CONVERT); + btp->stale = 0; xfs_dir2_block_log_tail(tp, dbp); /* * Initialize the block leaf area. We compact out stale entries. */ - lep = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + lep = XFS_DIR2_BLOCK_LEAF_P(btp); for (from = to = 0; from < INT_GET(leaf->hdr.count, ARCH_CONVERT); from++) { if (INT_GET(leaf->ents[from].address, ARCH_CONVERT) == XFS_DIR2_NULL_DATAPTR) continue; @@ -1137,8 +1137,8 @@ */ btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); INT_SET(btp->count, ARCH_CONVERT, INT_GET(sfp->hdr.count, ARCH_CONVERT) + 2); /* ., .. */ - INT_ZERO(btp->stale, ARCH_CONVERT); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + btp->stale = 0; + blp = XFS_DIR2_BLOCK_LEAF_P(btp); endoffset = (uint)((char *)blp - (char *)block); /* * Remove the freespace, we'll manage it. @@ -1164,7 +1164,7 @@ */ dep = (xfs_dir2_data_entry_t *) ((char *)block + XFS_DIR2_DATA_DOTDOT_OFFSET); - INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, ARCH_CONVERT)); + INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)); dep->namelen = 2; dep->name[0] = dep->name[1] = '.'; tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); @@ -1191,7 +1191,7 @@ if (sfep == NULL) newoffset = endoffset; else - newoffset = XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT); + newoffset = XFS_DIR2_SF_GET_OFFSET(sfep); /* * There should be a hole here, make one. */ @@ -1200,7 +1200,7 @@ ((char *)block + offset); INT_SET(dup->freetag, ARCH_CONVERT, XFS_DIR2_DATA_FREE_TAG); INT_SET(dup->length, ARCH_CONVERT, newoffset - offset); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(dup), ARCH_CONVERT, (xfs_dir2_data_off_t) ((char *)dup - (char *)block)); xfs_dir2_data_log_unused(tp, bp, dup); @@ -1213,8 +1213,8 @@ * Copy a real entry. */ dep = (xfs_dir2_data_entry_t *)((char *)block + newoffset); - INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT)); + INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER(sfp, + XFS_DIR2_SF_INUMBERP(sfep))); dep->namelen = sfep->namelen; memcpy(dep->name, sfep->name, dep->namelen); tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); diff -Nru a/fs/xfs/xfs_dir2_block.h b/fs/xfs/xfs_dir2_block.h --- a/fs/xfs/xfs_dir2_block.h 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_dir2_block.h 2005-03-30 16:58:50 -08:00 @@ -87,13 +87,12 @@ * Pointer to the leaf entries embedded in a data block (1-block format) */ #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BLOCK_LEAF_P) -struct xfs_dir2_leaf_entry *xfs_dir2_block_leaf_p_arch( - xfs_dir2_block_tail_t *btp, xfs_arch_t arch); -#define XFS_DIR2_BLOCK_LEAF_P_ARCH(btp,arch) \ - xfs_dir2_block_leaf_p_arch(btp,arch) +struct xfs_dir2_leaf_entry *xfs_dir2_block_leaf_p(xfs_dir2_block_tail_t *btp); +#define XFS_DIR2_BLOCK_LEAF_P(btp) \ + xfs_dir2_block_leaf_p(btp) #else -#define XFS_DIR2_BLOCK_LEAF_P_ARCH(btp,arch) \ - (((struct xfs_dir2_leaf_entry *)(btp)) - INT_GET((btp)->count, arch)) +#define XFS_DIR2_BLOCK_LEAF_P(btp) \ + (((struct xfs_dir2_leaf_entry *)(btp)) - INT_GET((btp)->count, ARCH_CONVERT)) #endif /* diff -Nru a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c --- a/fs/xfs/xfs_dir2_data.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_dir2_data.c 2005-03-30 16:58:50 -08:00 @@ -98,7 +98,7 @@ p = (char *)d->u; if (INT_GET(d->hdr.magic, ARCH_CONVERT) == XFS_DIR2_BLOCK_MAGIC) { btp = XFS_DIR2_BLOCK_TAIL_P(mp, (xfs_dir2_block_t *)d); - lep = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + lep = XFS_DIR2_BLOCK_LEAF_P(btp); endp = (char *)lep; } else endp = (char *)d + mp->m_dirblksize; @@ -106,16 +106,16 @@ /* * Account for zero bestfree entries. */ - if (INT_ISZERO(bf[0].length, ARCH_CONVERT)) { - ASSERT(INT_ISZERO(bf[0].offset, ARCH_CONVERT)); + if (!bf[0].length) { + ASSERT(!bf[0].offset); freeseen |= 1 << 0; } - if (INT_ISZERO(bf[1].length, ARCH_CONVERT)) { - ASSERT(INT_ISZERO(bf[1].offset, ARCH_CONVERT)); + if (!bf[1].length) { + ASSERT(!bf[1].offset); freeseen |= 1 << 1; } - if (INT_ISZERO(bf[2].length, ARCH_CONVERT)) { - ASSERT(INT_ISZERO(bf[2].offset, ARCH_CONVERT)); + if (!bf[2].length) { + ASSERT(!bf[2].offset); freeseen |= 1 << 2; } ASSERT(INT_GET(bf[0].length, ARCH_CONVERT) >= INT_GET(bf[1].length, ARCH_CONVERT)); @@ -132,7 +132,7 @@ */ if (INT_GET(dup->freetag, ARCH_CONVERT) == XFS_DIR2_DATA_FREE_TAG) { ASSERT(lastfree == 0); - ASSERT(INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT), ARCH_CONVERT) == + ASSERT(INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P(dup), ARCH_CONVERT) == (char *)dup - (char *)d); dfp = xfs_dir2_data_freefind(d, dup); if (dfp) { @@ -217,8 +217,8 @@ for (dfp = &d->hdr.bestfree[0], seenzero = matched = 0; dfp < &d->hdr.bestfree[XFS_DIR2_DATA_FD_COUNT]; dfp++) { - if (INT_ISZERO(dfp->offset, ARCH_CONVERT)) { - ASSERT(INT_ISZERO(dfp->length, ARCH_CONVERT)); + if (!dfp->offset) { + ASSERT(!dfp->length); seenzero = 1; continue; } @@ -247,7 +247,7 @@ for (dfp = &d->hdr.bestfree[0]; dfp < &d->hdr.bestfree[XFS_DIR2_DATA_FD_COUNT]; dfp++) { - if (INT_ISZERO(dfp->offset, ARCH_CONVERT)) + if (!dfp->offset) return NULL; if (INT_GET(dfp->offset, ARCH_CONVERT) == off) return dfp; @@ -334,8 +334,8 @@ /* * Clear the 3rd entry, must be zero now. */ - INT_ZERO(d->hdr.bestfree[2].length, ARCH_CONVERT); - INT_ZERO(d->hdr.bestfree[2].offset, ARCH_CONVERT); + d->hdr.bestfree[2].length = 0; + d->hdr.bestfree[2].offset = 0; *loghead = 1; } @@ -372,7 +372,7 @@ endp = aendp; else if (INT_GET(d->hdr.magic, ARCH_CONVERT) == XFS_DIR2_BLOCK_MAGIC) { btp = XFS_DIR2_BLOCK_TAIL_P(mp, (xfs_dir2_block_t *)d); - endp = (char *)XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + endp = (char *)XFS_DIR2_BLOCK_LEAF_P(btp); } else endp = (char *)d + mp->m_dirblksize; /* @@ -385,7 +385,7 @@ */ if (INT_GET(dup->freetag, ARCH_CONVERT) == XFS_DIR2_DATA_FREE_TAG) { ASSERT((char *)dup - (char *)d == - INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT), ARCH_CONVERT)); + INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P(dup), ARCH_CONVERT)); xfs_dir2_data_freeinsert(d, dup, loghead); p += INT_GET(dup->length, ARCH_CONVERT); } @@ -440,8 +440,8 @@ INT_SET(d->hdr.magic, ARCH_CONVERT, XFS_DIR2_DATA_MAGIC); INT_SET(d->hdr.bestfree[0].offset, ARCH_CONVERT, (xfs_dir2_data_off_t)sizeof(d->hdr)); for (i = 1; i < XFS_DIR2_DATA_FD_COUNT; i++) { - INT_ZERO(d->hdr.bestfree[i].length, ARCH_CONVERT); - INT_ZERO(d->hdr.bestfree[i].offset, ARCH_CONVERT); + d->hdr.bestfree[i].length = 0; + d->hdr.bestfree[i].offset = 0; } /* * Set up an unused entry for the block's body. @@ -452,7 +452,7 @@ t=mp->m_dirblksize - (uint)sizeof(d->hdr); INT_SET(d->hdr.bestfree[0].length, ARCH_CONVERT, t); INT_SET(dup->length, ARCH_CONVERT, t); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(dup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)dup - (char *)d)); /* * Log it and return it. @@ -523,8 +523,8 @@ * Log the end (tag) of the unused entry. */ xfs_da_log_buf(tp, bp, - (uint)((char *)XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT) - (char *)d), - (uint)((char *)XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT) - (char *)d + + (uint)((char *)XFS_DIR2_DATA_UNUSED_TAG_P(dup) - (char *)d), + (uint)((char *)XFS_DIR2_DATA_UNUSED_TAG_P(dup) - (char *)d + sizeof(xfs_dir2_data_off_t) - 1)); } @@ -562,7 +562,7 @@ ASSERT(INT_GET(d->hdr.magic, ARCH_CONVERT) == XFS_DIR2_BLOCK_MAGIC); btp = XFS_DIR2_BLOCK_TAIL_P(mp, (xfs_dir2_block_t *)d); - endptr = (char *)XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + endptr = (char *)XFS_DIR2_BLOCK_LEAF_P(btp); } /* * If this isn't the start of the block, then back up to @@ -608,12 +608,12 @@ * since the third bestfree is there, there might be more * entries. */ - needscan = !INT_ISZERO(d->hdr.bestfree[2].length, ARCH_CONVERT); + needscan = d->hdr.bestfree[2].length; /* * Fix up the new big freespace. */ INT_MOD(prevdup->length, ARCH_CONVERT, len + INT_GET(postdup->length, ARCH_CONVERT)); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(prevdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(prevdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)prevdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, prevdup); if (!needscan) { @@ -637,8 +637,8 @@ dfp = xfs_dir2_data_freeinsert(d, prevdup, needlogp); ASSERT(dfp == &d->hdr.bestfree[0]); ASSERT(INT_GET(dfp->length, ARCH_CONVERT) == INT_GET(prevdup->length, ARCH_CONVERT)); - ASSERT(INT_ISZERO(dfp[1].length, ARCH_CONVERT)); - ASSERT(INT_ISZERO(dfp[2].length, ARCH_CONVERT)); + ASSERT(!dfp[1].length); + ASSERT(!dfp[2].length); } } /* @@ -647,7 +647,7 @@ else if (prevdup) { dfp = xfs_dir2_data_freefind(d, prevdup); INT_MOD(prevdup->length, ARCH_CONVERT, len); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(prevdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(prevdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)prevdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, prevdup); /* @@ -673,7 +673,7 @@ newdup = (xfs_dir2_data_unused_t *)((char *)d + offset); INT_SET(newdup->freetag, ARCH_CONVERT, XFS_DIR2_DATA_FREE_TAG); INT_SET(newdup->length, ARCH_CONVERT, len + INT_GET(postdup->length, ARCH_CONVERT)); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(newdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(newdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)newdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, newdup); /* @@ -698,7 +698,7 @@ newdup = (xfs_dir2_data_unused_t *)((char *)d + offset); INT_SET(newdup->freetag, ARCH_CONVERT, XFS_DIR2_DATA_FREE_TAG); INT_SET(newdup->length, ARCH_CONVERT, len); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(newdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(newdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)newdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, newdup); (void)xfs_dir2_data_freeinsert(d, newdup, needlogp); @@ -734,7 +734,7 @@ ASSERT(INT_GET(dup->freetag, ARCH_CONVERT) == XFS_DIR2_DATA_FREE_TAG); ASSERT(offset >= (char *)dup - (char *)d); ASSERT(offset + len <= (char *)dup + INT_GET(dup->length, ARCH_CONVERT) - (char *)d); - ASSERT((char *)dup - (char *)d == INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup, ARCH_CONVERT), ARCH_CONVERT)); + ASSERT((char *)dup - (char *)d == INT_GET(*XFS_DIR2_DATA_UNUSED_TAG_P(dup), ARCH_CONVERT)); /* * Look up the entry in the bestfree table. */ @@ -754,7 +754,7 @@ */ if (matchfront && matchback) { if (dfp) { - needscan = !INT_ISZERO(d->hdr.bestfree[2].offset, ARCH_CONVERT); + needscan = d->hdr.bestfree[2].offset; if (!needscan) xfs_dir2_data_freeremove(d, dfp, needlogp); } @@ -767,7 +767,7 @@ newdup = (xfs_dir2_data_unused_t *)((char *)d + offset + len); INT_SET(newdup->freetag, ARCH_CONVERT, XFS_DIR2_DATA_FREE_TAG); INT_SET(newdup->length, ARCH_CONVERT, oldlen - len); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(newdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(newdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)newdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, newdup); /* @@ -795,7 +795,7 @@ newdup = dup; INT_SET(newdup->length, ARCH_CONVERT, (xfs_dir2_data_off_t) (((char *)d + offset) - (char *)newdup)); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(newdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(newdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)newdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, newdup); /* @@ -823,13 +823,13 @@ newdup = dup; INT_SET(newdup->length, ARCH_CONVERT, (xfs_dir2_data_off_t) (((char *)d + offset) - (char *)newdup)); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(newdup, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(newdup), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)newdup - (char *)d)); xfs_dir2_data_log_unused(tp, bp, newdup); newdup2 = (xfs_dir2_data_unused_t *)((char *)d + offset + len); INT_SET(newdup2->freetag, ARCH_CONVERT, XFS_DIR2_DATA_FREE_TAG); INT_SET(newdup2->length, ARCH_CONVERT, oldlen - len - INT_GET(newdup->length, ARCH_CONVERT)); - INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(newdup2, ARCH_CONVERT), ARCH_CONVERT, + INT_SET(*XFS_DIR2_DATA_UNUSED_TAG_P(newdup2), ARCH_CONVERT, (xfs_dir2_data_off_t)((char *)newdup2 - (char *)d)); xfs_dir2_data_log_unused(tp, bp, newdup2); /* @@ -841,7 +841,7 @@ * the 2 new will work. */ if (dfp) { - needscan = !INT_ISZERO(d->hdr.bestfree[2].length, ARCH_CONVERT); + needscan = d->hdr.bestfree[2].length; if (!needscan) { xfs_dir2_data_freeremove(d, dfp, needlogp); (void)xfs_dir2_data_freeinsert(d, newdup, diff -Nru a/fs/xfs/xfs_dir2_data.h b/fs/xfs/xfs_dir2_data.h --- a/fs/xfs/xfs_dir2_data.h 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_dir2_data.h 2005-03-30 16:58:47 -08:00 @@ -163,14 +163,13 @@ * Pointer to a freespace's tag word. */ #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATA_UNUSED_TAG_P) -xfs_dir2_data_off_t *xfs_dir2_data_unused_tag_p_arch( - xfs_dir2_data_unused_t *dup, xfs_arch_t arch); -#define XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup,arch) \ - xfs_dir2_data_unused_tag_p_arch(dup,arch) +xfs_dir2_data_off_t *xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup); +#define XFS_DIR2_DATA_UNUSED_TAG_P(dup) \ + xfs_dir2_data_unused_tag_p(dup) #else -#define XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup,arch) \ +#define XFS_DIR2_DATA_UNUSED_TAG_P(dup) \ ((xfs_dir2_data_off_t *)\ - ((char *)(dup) + INT_GET((dup)->length, arch) \ + ((char *)(dup) + INT_GET((dup)->length, ARCH_CONVERT) \ - (uint)sizeof(xfs_dir2_data_off_t))) #endif diff -Nru a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c --- a/fs/xfs/xfs_dir2_leaf.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_dir2_leaf.c 2005-03-30 16:58:48 -08:00 @@ -127,7 +127,7 @@ block = dbp->data; xfs_dir2_data_check(dp, dbp); btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * Set the counts in the leaf header. */ @@ -162,7 +162,7 @@ */ ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf); INT_SET(ltp->bestcount, ARCH_CONVERT, 1); - bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); + bestsp = XFS_DIR2_LEAF_BESTS_P(ltp); INT_COPY(bestsp[0], block->hdr.bestfree[0].length, ARCH_CONVERT); /* * Log the data header and leaf bests table. @@ -233,7 +233,7 @@ index = xfs_dir2_leaf_search_hash(args, lbp); leaf = lbp->data; ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf); - bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); + bestsp = XFS_DIR2_LEAF_BESTS_P(ltp); length = XFS_DIR2_DATA_ENTSIZE(args->namelen); /* * See if there are any entries with the same hash value @@ -274,7 +274,7 @@ * How many bytes do we need in the leaf block? */ needbytes = - (!INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT) ? 0 : (uint)sizeof(leaf->ents[0])) + + (leaf->hdr.stale ? 0 : (uint)sizeof(leaf->ents[0])) + (use_block != -1 ? 0 : (uint)sizeof(leaf->bests[0])); /* * Now kill use_block if it refers to a missing block, so we @@ -456,7 +456,7 @@ * Now we need to make room to insert the leaf entry. * If there are no stale entries, we just insert a hole at index. */ - if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { + if (!leaf->hdr.stale) { /* * lep is still good as the index leaf entry. */ @@ -595,7 +595,7 @@ * Leaves and bests don't overlap. */ ASSERT((char *)&leaf->ents[INT_GET(leaf->hdr.count, ARCH_CONVERT)] <= - (char *)XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT)); + (char *)XFS_DIR2_LEAF_BESTS_P(ltp)); /* * Check hash value order, count stale entries. */ @@ -625,7 +625,7 @@ int to; /* target leaf index */ leaf = bp->data; - if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { + if (!leaf->hdr.stale) { return; } /* @@ -649,7 +649,7 @@ */ ASSERT(INT_GET(leaf->hdr.stale, ARCH_CONVERT) == from - to); INT_MOD(leaf->hdr.count, ARCH_CONVERT, -(INT_GET(leaf->hdr.stale, ARCH_CONVERT))); - INT_ZERO(leaf->hdr.stale, ARCH_CONVERT); + leaf->hdr.stale = 0; xfs_dir2_leaf_log_header(args->trans, bp); if (loglow != -1) xfs_dir2_leaf_log_ents(args->trans, bp, loglow, to - 1); @@ -1192,10 +1192,10 @@ * Initialize the header. */ INT_SET(leaf->hdr.info.magic, ARCH_CONVERT, magic); - INT_ZERO(leaf->hdr.info.forw, ARCH_CONVERT); - INT_ZERO(leaf->hdr.info.back, ARCH_CONVERT); - INT_ZERO(leaf->hdr.count, ARCH_CONVERT); - INT_ZERO(leaf->hdr.stale, ARCH_CONVERT); + leaf->hdr.info.forw = 0; + leaf->hdr.info.back = 0; + leaf->hdr.count = 0; + leaf->hdr.stale = 0; xfs_dir2_leaf_log_header(tp, bp); /* * If it's a leaf-format directory initialize the tail. @@ -1204,7 +1204,7 @@ */ if (magic == XFS_DIR2_LEAF1_MAGIC) { ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf); - INT_ZERO(ltp->bestcount, ARCH_CONVERT); + ltp->bestcount = 0; xfs_dir2_leaf_log_tail(tp, bp); } *bpp = bp; @@ -1229,8 +1229,8 @@ leaf = bp->data; ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAF1_MAGIC); ltp = XFS_DIR2_LEAF_TAIL_P(tp->t_mountp, leaf); - firstb = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT) + first; - lastb = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT) + last; + firstb = XFS_DIR2_LEAF_BESTS_P(ltp) + first; + lastb = XFS_DIR2_LEAF_BESTS_P(ltp) + last; xfs_da_log_buf(tp, bp, (uint)((char *)firstb - (char *)leaf), (uint)((char *)lastb - (char *)leaf + sizeof(*lastb) - 1)); } @@ -1497,7 +1497,7 @@ needscan = needlog = 0; oldbest = INT_GET(data->hdr.bestfree[0].length, ARCH_CONVERT); ltp = XFS_DIR2_LEAF_TAIL_P(mp, leaf); - bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); + bestsp = XFS_DIR2_LEAF_BESTS_P(ltp); ASSERT(INT_GET(bestsp[db], ARCH_CONVERT) == oldbest); /* * Mark the former data entry unused. @@ -1658,7 +1658,7 @@ leaf = lbp->data; #ifndef __KERNEL__ - if (INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) + if (!leaf->hdr.count) return 0; #endif /* @@ -1749,7 +1749,7 @@ /* * Eliminate the last bests entry from the table. */ - bestsp = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT); + bestsp = XFS_DIR2_LEAF_BESTS_P(ltp); INT_MOD(ltp->bestcount, ARCH_CONVERT, -1); memmove(&bestsp[1], &bestsp[0], INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(*bestsp)); xfs_dir2_leaf_log_tail(tp, lbp); @@ -1835,7 +1835,7 @@ } free = fbp->data; ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); - ASSERT(INT_ISZERO(free->hdr.firstdb, ARCH_CONVERT)); + ASSERT(!free->hdr.firstdb); /* * Now see if the leafn and free data will fit in a leaf1. * If not, release the buffer and give up. @@ -1865,7 +1865,7 @@ /* * Set up the leaf bests table. */ - memcpy(XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT), free->bests, + memcpy(XFS_DIR2_LEAF_BESTS_P(ltp), free->bests, INT_GET(ltp->bestcount, ARCH_CONVERT) * sizeof(leaf->bests[0])); xfs_dir2_leaf_log_bests(tp, lbp, 0, INT_GET(ltp->bestcount, ARCH_CONVERT) - 1); xfs_dir2_leaf_log_tail(tp, lbp); diff -Nru a/fs/xfs/xfs_dir2_leaf.h b/fs/xfs/xfs_dir2_leaf.h --- a/fs/xfs/xfs_dir2_leaf.h 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_dir2_leaf.h 2005-03-30 16:58:47 -08:00 @@ -144,11 +144,11 @@ */ #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_LEAF_BESTS_P) xfs_dir2_data_off_t * -xfs_dir2_leaf_bests_p_arch(xfs_dir2_leaf_tail_t *ltp, xfs_arch_t arch); -#define XFS_DIR2_LEAF_BESTS_P_ARCH(ltp,arch) xfs_dir2_leaf_bests_p_arch(ltp,arch) +xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp); +#define XFS_DIR2_LEAF_BESTS_P(ltp) xfs_dir2_leaf_bests_p(ltp) #else -#define XFS_DIR2_LEAF_BESTS_P_ARCH(ltp,arch) \ - ((xfs_dir2_data_off_t *)(ltp) - INT_GET((ltp)->bestcount, arch)) +#define XFS_DIR2_LEAF_BESTS_P(ltp) \ + ((xfs_dir2_data_off_t *)(ltp) - INT_GET((ltp)->bestcount, ARCH_CONVERT)) #endif /* diff -Nru a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c --- a/fs/xfs/xfs_dir2_node.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_dir2_node.c 2005-03-30 16:58:47 -08:00 @@ -172,14 +172,14 @@ * Initialize the freespace block header. */ INT_SET(free->hdr.magic, ARCH_CONVERT, XFS_DIR2_FREE_MAGIC); - INT_ZERO(free->hdr.firstdb, ARCH_CONVERT); + free->hdr.firstdb = 0; ASSERT(INT_GET(ltp->bestcount, ARCH_CONVERT) <= (uint)dp->i_d.di_size / mp->m_dirblksize); INT_COPY(free->hdr.nvalid, ltp->bestcount, ARCH_CONVERT); /* * Copy freespace entries from the leaf block to the new block. * Count active entries. */ - for (i = n = 0, from = XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, ARCH_CONVERT), to = free->bests; + for (i = n = 0, from = XFS_DIR2_LEAF_BESTS_P(ltp), to = free->bests; i < INT_GET(ltp->bestcount, ARCH_CONVERT); i++, from++, to++) { if ((off = INT_GET(*from, ARCH_CONVERT)) != NULLDATAOFF) n++; @@ -240,7 +240,7 @@ */ if (INT_GET(leaf->hdr.count, ARCH_CONVERT) == XFS_DIR2_MAX_LEAF_ENTS(mp)) { - if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) + if (!leaf->hdr.stale) return XFS_ERROR(ENOSPC); compact = INT_GET(leaf->hdr.stale, ARCH_CONVERT) > 1; } else @@ -263,14 +263,14 @@ /* * Set impossible logging indices for this case. */ - else if (!INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { + else if (leaf->hdr.stale) { lfloglow = INT_GET(leaf->hdr.count, ARCH_CONVERT); lfloghigh = -1; } /* * No stale entries, just insert a space for the new entry. */ - if (INT_ISZERO(leaf->hdr.stale, ARCH_CONVERT)) { + if (!leaf->hdr.stale) { lep = &leaf->ents[index]; if (index < INT_GET(leaf->hdr.count, ARCH_CONVERT)) memmove(lep + 1, lep, @@ -403,7 +403,7 @@ ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR2_LEAFN_MAGIC); if (count) *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); - if (INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) + if (!leaf->hdr.count) return 0; return INT_GET(leaf->ents[INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT); } @@ -690,7 +690,7 @@ * If the source has stale leaves, count the ones in the copy range * so we can update the header correctly. */ - if (!INT_ISZERO(leaf_s->hdr.stale, ARCH_CONVERT)) { + if (leaf_s->hdr.stale) { int i; /* temp leaf index */ for (i = start_s, stale = 0; i < start_s + count; i++) { @@ -1020,7 +1020,7 @@ * If there are no useful entries left in the block, * get rid of the block if we can. */ - if (INT_ISZERO(free->hdr.nused, ARCH_CONVERT)) { + if (!free->hdr.nused) { error = xfs_dir2_shrink_inode(args, fdb, fbp); if (error == 0) { fbp = NULL; @@ -1182,7 +1182,7 @@ * Make altpath point to the block we want to keep and * path point to the block we want to drop (this one). */ - forward = !INT_ISZERO(info->forw, ARCH_CONVERT); + forward = info->forw; memcpy(&state->altpath, &state->path, sizeof(state->path)); error = xfs_da_path_shift(state, &state->altpath, forward, 0, &rval); @@ -1634,8 +1634,8 @@ INT_SET(free->hdr.firstdb, ARCH_CONVERT, (fbno - XFS_DIR2_FREE_FIRSTDB(mp)) * XFS_DIR2_MAX_FREE_BESTS(mp)); - INT_ZERO(free->hdr.nvalid, ARCH_CONVERT); - INT_ZERO(free->hdr.nused, ARCH_CONVERT); + free->hdr.nvalid = 0; + free->hdr.nused = 0; } else { free = fbp->data; ASSERT(INT_GET(free->hdr.magic, ARCH_CONVERT) == XFS_DIR2_FREE_MAGIC); diff -Nru a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c --- a/fs/xfs/xfs_dir2_sf.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_dir2_sf.c 2005-03-30 16:58:49 -08:00 @@ -114,7 +114,7 @@ count = i8count = namelen = 0; btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); - blp = XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + blp = XFS_DIR2_BLOCK_LEAF_P(btp); /* * Iterate over the block's data entries by using the leaf pointers. @@ -163,7 +163,7 @@ */ sfhp->count = count; sfhp->i8count = i8count; - XFS_DIR2_SF_PUT_INUMBER_ARCH((xfs_dir2_sf_t *)sfhp, &parent, &sfhp->parent, ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER((xfs_dir2_sf_t *)sfhp, &parent, &sfhp->parent); return size; } @@ -230,7 +230,7 @@ */ btp = XFS_DIR2_BLOCK_TAIL_P(mp, block); ptr = (char *)block->u; - endptr = (char *)XFS_DIR2_BLOCK_LEAF_P_ARCH(btp, ARCH_CONVERT); + endptr = (char *)XFS_DIR2_BLOCK_LEAF_P(btp); sfep = XFS_DIR2_SF_FIRSTENTRY(sfp); /* * Loop over the active and unused entries. @@ -257,19 +257,19 @@ else if (dep->namelen == 2 && dep->name[0] == '.' && dep->name[1] == '.') ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) == - XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, ARCH_CONVERT)); + XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)); /* * Normal entry, copy it into shortform. */ else { sfep->namelen = dep->namelen; - XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep, + XFS_DIR2_SF_PUT_OFFSET(sfep, (xfs_dir2_data_aoff_t) - ((char *)dep - (char *)block), ARCH_CONVERT); + ((char *)dep - (char *)block)); memcpy(sfep->name, dep->name, dep->namelen); temp=INT_GET(dep->inumber, ARCH_CONVERT); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &temp, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER(sfp, &temp, + XFS_DIR2_SF_INUMBERP(sfep)); sfep = XFS_DIR2_SF_NEXTENTRY(sfp, sfep); } ptr += XFS_DIR2_DATA_ENTSIZE(dep->namelen); @@ -427,10 +427,10 @@ * Fill in the new entry. */ sfep->namelen = args->namelen; - XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep, offset, ARCH_CONVERT); + XFS_DIR2_SF_PUT_OFFSET(sfep, offset); memcpy(sfep->name, args->name, sfep->namelen); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &args->inumber, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER(sfp, &args->inumber, + XFS_DIR2_SF_INUMBERP(sfep)); /* * Update the header and inode. */ @@ -494,7 +494,7 @@ offset = new_offset + XFS_DIR2_DATA_ENTSIZE(oldsfep->namelen), oldsfep = XFS_DIR2_SF_NEXTENTRY(oldsfp, oldsfep), eof = (char *)oldsfep == &buf[old_isize]) { - new_offset = XFS_DIR2_SF_GET_OFFSET_ARCH(oldsfep, ARCH_CONVERT); + new_offset = XFS_DIR2_SF_GET_OFFSET(oldsfep); if (offset + add_datasize <= new_offset) break; } @@ -519,10 +519,10 @@ * Fill in the new entry, and update the header counts. */ sfep->namelen = args->namelen; - XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep, offset, ARCH_CONVERT); + XFS_DIR2_SF_PUT_OFFSET(sfep, offset); memcpy(sfep->name, args->name, sfep->namelen); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &args->inumber, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER(sfp, &args->inumber, + XFS_DIR2_SF_INUMBERP(sfep)); sfp->hdr.count++; #if XFS_BIG_INUMS if (args->inumber > XFS_DIR2_MAX_SHORT_INUM && !objchange) @@ -579,8 +579,8 @@ */ for (i = 0; i < sfp->hdr.count; i++) { if (!holefit) - holefit = offset + size <= XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT); - offset = XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT) + + holefit = offset + size <= XFS_DIR2_SF_GET_OFFSET(sfep); + offset = XFS_DIR2_SF_GET_OFFSET(sfep) + XFS_DIR2_DATA_ENTSIZE(sfep->namelen); sfep = XFS_DIR2_SF_NEXTENTRY(sfp, sfep); } @@ -641,17 +641,17 @@ sfp = (xfs_dir2_sf_t *)dp->i_df.if_u1.if_data; offset = XFS_DIR2_DATA_FIRST_OFFSET; - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent); i8count = ino > XFS_DIR2_MAX_SHORT_INUM; for (i = 0, sfep = XFS_DIR2_SF_FIRSTENTRY(sfp); i < sfp->hdr.count; i++, sfep = XFS_DIR2_SF_NEXTENTRY(sfp, sfep)) { - ASSERT(XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT) >= offset); - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + ASSERT(XFS_DIR2_SF_GET_OFFSET(sfep) >= offset); + ino = XFS_DIR2_SF_GET_INUMBER(sfp, XFS_DIR2_SF_INUMBERP(sfep)); i8count += ino > XFS_DIR2_MAX_SHORT_INUM; offset = - XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT) + + XFS_DIR2_SF_GET_OFFSET(sfep) + XFS_DIR2_DATA_ENTSIZE(sfep->namelen); } ASSERT(i8count == sfp->hdr.i8count); @@ -708,7 +708,7 @@ /* * Now can put in the inode number, since i8count is set. */ - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &pino, &sfp->hdr.parent, ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER(sfp, &pino, &sfp->hdr.parent); sfp->hdr.count = 0; dp->i_d.di_size = size; xfs_dir2_sf_check(args); @@ -800,8 +800,7 @@ XFS_DIR2_DATA_DOTDOT_OFFSET)) { p.cook = XFS_DIR2_DB_OFF_TO_DATAPTR(mp, mp->m_dirdatablk, XFS_DIR2_DATA_FIRST_OFFSET); - p.ino = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, - ARCH_CONVERT); + p.ino = XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent); #if XFS_BIG_INUMS p.ino += mp->m_inoadd; #endif @@ -826,7 +825,7 @@ i++, sfep = XFS_DIR2_SF_NEXTENTRY(sfp, sfep)) { off = XFS_DIR2_DB_OFF_TO_DATAPTR(mp, mp->m_dirdatablk, - XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT)); + XFS_DIR2_SF_GET_OFFSET(sfep)); if (dir_offset > off) continue; @@ -834,11 +833,10 @@ p.namelen = sfep->namelen; p.cook = XFS_DIR2_DB_OFF_TO_DATAPTR(mp, mp->m_dirdatablk, - XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, ARCH_CONVERT) + + XFS_DIR2_SF_GET_OFFSET(sfep) + XFS_DIR2_DATA_ENTSIZE(p.namelen)); - p.ino = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + p.ino = XFS_DIR2_SF_GET_INUMBER(sfp, XFS_DIR2_SF_INUMBERP(sfep)); #if XFS_BIG_INUMS p.ino += mp->m_inoadd; #endif @@ -904,7 +902,7 @@ */ if (args->namelen == 2 && args->name[0] == '.' && args->name[1] == '.') { - args->inumber = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, ARCH_CONVERT); + args->inumber = XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent); return XFS_ERROR(EEXIST); } /* @@ -917,8 +915,8 @@ sfep->name[0] == args->name[0] && memcmp(args->name, sfep->name, args->namelen) == 0) { args->inumber = - XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + XFS_DIR2_SF_GET_INUMBER(sfp, + XFS_DIR2_SF_INUMBERP(sfep)); return XFS_ERROR(EEXIST); } } @@ -971,8 +969,8 @@ if (sfep->namelen == args->namelen && sfep->name[0] == args->name[0] && memcmp(sfep->name, args->name, args->namelen) == 0) { - ASSERT(XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT) == + ASSERT(XFS_DIR2_SF_GET_INUMBER(sfp, + XFS_DIR2_SF_INUMBERP(sfep)) == args->inumber); break; } @@ -1093,10 +1091,10 @@ if (args->namelen == 2 && args->name[0] == '.' && args->name[1] == '.') { #if XFS_BIG_INUMS || defined(DEBUG) - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, &sfp->hdr.parent, ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent); ASSERT(args->inumber != ino); #endif - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &args->inumber, &sfp->hdr.parent, ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER(sfp, &args->inumber, &sfp->hdr.parent); } /* * Normal entry, look for the name. @@ -1109,12 +1107,12 @@ sfep->name[0] == args->name[0] && memcmp(args->name, sfep->name, args->namelen) == 0) { #if XFS_BIG_INUMS || defined(DEBUG) - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(sfp, + XFS_DIR2_SF_INUMBERP(sfep)); ASSERT(args->inumber != ino); #endif - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &args->inumber, - XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + XFS_DIR2_SF_PUT_INUMBER(sfp, &args->inumber, + XFS_DIR2_SF_INUMBERP(sfep)); break; } } @@ -1215,8 +1213,8 @@ */ sfp->hdr.count = oldsfp->hdr.count; sfp->hdr.i8count = 0; - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(oldsfp, &oldsfp->hdr.parent, ARCH_CONVERT); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &ino, &sfp->hdr.parent, ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(oldsfp, &oldsfp->hdr.parent); + XFS_DIR2_SF_PUT_INUMBER(sfp, &ino, &sfp->hdr.parent); /* * Copy the entries field by field. */ @@ -1228,9 +1226,9 @@ sfep->namelen = oldsfep->namelen; sfep->offset = oldsfep->offset; memcpy(sfep->name, oldsfep->name, sfep->namelen); - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(oldsfp, - XFS_DIR2_SF_INUMBERP(oldsfep), ARCH_CONVERT); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &ino, XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(oldsfp, + XFS_DIR2_SF_INUMBERP(oldsfep)); + XFS_DIR2_SF_PUT_INUMBER(sfp, &ino, XFS_DIR2_SF_INUMBERP(sfep)); } /* * Clean up the inode. @@ -1292,8 +1290,8 @@ */ sfp->hdr.count = oldsfp->hdr.count; sfp->hdr.i8count = 1; - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(oldsfp, &oldsfp->hdr.parent, ARCH_CONVERT); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &ino, &sfp->hdr.parent, ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(oldsfp, &oldsfp->hdr.parent); + XFS_DIR2_SF_PUT_INUMBER(sfp, &ino, &sfp->hdr.parent); /* * Copy the entries field by field. */ @@ -1305,9 +1303,9 @@ sfep->namelen = oldsfep->namelen; sfep->offset = oldsfep->offset; memcpy(sfep->name, oldsfep->name, sfep->namelen); - ino = XFS_DIR2_SF_GET_INUMBER_ARCH(oldsfp, - XFS_DIR2_SF_INUMBERP(oldsfep), ARCH_CONVERT); - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, &ino, XFS_DIR2_SF_INUMBERP(sfep), ARCH_CONVERT); + ino = XFS_DIR2_SF_GET_INUMBER(oldsfp, + XFS_DIR2_SF_INUMBERP(oldsfep)); + XFS_DIR2_SF_PUT_INUMBER(sfp, &ino, XFS_DIR2_SF_INUMBERP(sfep)); } /* * Clean up the inode. diff -Nru a/fs/xfs/xfs_dir2_sf.h b/fs/xfs/xfs_dir2_sf.h --- a/fs/xfs/xfs_dir2_sf.h 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_dir2_sf.h 2005-03-30 16:58:47 -08:00 @@ -59,21 +59,12 @@ */ typedef struct { __uint8_t i[8]; } xfs_dir2_ino8_t; -#define XFS_DIR2_SF_GET_INO8_ARCH(di,arch) \ - (xfs_ino_t)(DIRINO_GET_ARCH(&di,arch)) -#define XFS_DIR2_SF_GET_INO8(di) \ - XFS_DIR2_SF_GET_INO8_ARCH(di,ARCH_NOCONVERT) - /* * Inode number stored as 4 8-bit values. * Works a lot of the time, when all the inode numbers in a directory * fit in 32 bits. */ typedef struct { __uint8_t i[4]; } xfs_dir2_ino4_t; -#define XFS_DIR2_SF_GET_INO4_ARCH(di,arch) \ - (xfs_ino_t)(DIRINO4_GET_ARCH(&di,arch)) -#define XFS_DIR2_SF_GET_INO4(di) \ - XFS_DIR2_SF_GET_INO4_ARCH(di,ARCH_NOCONVERT) typedef union { xfs_dir2_ino8_t i8; @@ -132,51 +123,48 @@ #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_GET_INUMBER) -xfs_intino_t xfs_dir2_sf_get_inumber_arch(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from, - xfs_arch_t arch); -#define XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, from, arch) \ - xfs_dir2_sf_get_inumber_arch(sfp, from, arch) +xfs_intino_t xfs_dir2_sf_get_inumber(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from); +#define XFS_DIR2_SF_GET_INUMBER(sfp, from) \ + xfs_dir2_sf_get_inumber(sfp, from) #else -#define XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, from, arch) \ +#define XFS_DIR2_SF_GET_INUMBER(sfp, from) \ ((sfp)->hdr.i8count == 0 ? \ - (xfs_intino_t)XFS_DIR2_SF_GET_INO4_ARCH(*(from), arch) : \ - (xfs_intino_t)XFS_DIR2_SF_GET_INO8_ARCH(*(from), arch)) + (xfs_intino_t)XFS_GET_DIR_INO4((from)->i4) : \ + (xfs_intino_t)XFS_GET_DIR_INO8((from)->i8)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_PUT_INUMBER) -void xfs_dir2_sf_put_inumber_arch(xfs_dir2_sf_t *sfp, xfs_ino_t *from, - xfs_dir2_inou_t *to, xfs_arch_t arch); -#define XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp,from,to,arch) \ - xfs_dir2_sf_put_inumber_arch(sfp,from,to,arch) +void xfs_dir2_sf_put_inumber(xfs_dir2_sf_t *sfp, xfs_ino_t *from, + xfs_dir2_inou_t *to); +#define XFS_DIR2_SF_PUT_INUMBER(sfp,from,to) \ + xfs_dir2_sf_put_inumber(sfp,from,to) #else -#define XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp,from,to,arch) \ +#define XFS_DIR2_SF_PUT_INUMBER(sfp,from,to) \ if ((sfp)->hdr.i8count == 0) { \ - DIRINO4_COPY_ARCH(from,to,arch); \ + XFS_PUT_DIR_INO4(*(from), (to)->i4); \ } else { \ - DIRINO_COPY_ARCH(from,to,arch); \ + XFS_PUT_DIR_INO8(*(from), (to)->i8); \ } #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_GET_OFFSET) -xfs_dir2_data_aoff_t xfs_dir2_sf_get_offset_arch(xfs_dir2_sf_entry_t *sfep, - xfs_arch_t arch); xfs_dir2_data_aoff_t xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep); -#define XFS_DIR2_SF_GET_OFFSET_ARCH(sfep,arch) \ - xfs_dir2_sf_get_offset_arch(sfep,arch) +#define XFS_DIR2_SF_GET_OFFSET(sfep) \ + xfs_dir2_sf_get_offset(sfep) #else -#define XFS_DIR2_SF_GET_OFFSET_ARCH(sfep,arch) \ - INT_GET_UNALIGNED_16_ARCH(&(sfep)->offset.i,arch) +#define XFS_DIR2_SF_GET_OFFSET(sfep) \ + INT_GET_UNALIGNED_16_BE(&(sfep)->offset.i) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_PUT_OFFSET) -void xfs_dir2_sf_put_offset_arch(xfs_dir2_sf_entry_t *sfep, - xfs_dir2_data_aoff_t off, xfs_arch_t arch); -#define XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep,off,arch) \ - xfs_dir2_sf_put_offset_arch(sfep,off,arch) +void xfs_dir2_sf_put_offset(xfs_dir2_sf_entry_t *sfep, + xfs_dir2_data_aoff_t off); +#define XFS_DIR2_SF_PUT_OFFSET(sfep,off) \ + xfs_dir2_sf_put_offset(sfep,off) #else -#define XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep,off,arch) \ - INT_SET_UNALIGNED_16_ARCH(&(sfep)->offset.i,off,arch) +#define XFS_DIR2_SF_PUT_OFFSET(sfep,off) \ + INT_SET_UNALIGNED_16_BE(&(sfep)->offset.i,off) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_ENTSIZE_BYNAME) diff -Nru a/fs/xfs/xfs_dir_leaf.c b/fs/xfs/xfs_dir_leaf.c --- a/fs/xfs/xfs_dir_leaf.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_dir_leaf.c 2005-03-30 16:58:50 -08:00 @@ -160,9 +160,9 @@ ASSERT(dp->i_df.if_bytes == 0); xfs_idata_realloc(dp, sizeof(*hdr), XFS_DATA_FORK); hdr = (xfs_dir_sf_hdr_t *)dp->i_df.if_u1.if_data; - XFS_DIR_SF_PUT_DIRINO_ARCH(&parent, &hdr->parent, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&parent, &hdr->parent); - INT_ZERO(hdr->count, ARCH_CONVERT); + hdr->count = 0; dp->i_d.di_size = sizeof(*hdr); xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_DDATA); return(0); @@ -208,7 +208,7 @@ sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; sfe = (xfs_dir_sf_entry_t *)((char *)sf + offset); - XFS_DIR_SF_PUT_DIRINO_ARCH(&args->inumber, &sfe->inumber, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &sfe->inumber); sfe->namelen = args->namelen; memcpy(sfe->name, args->name, sfe->namelen); INT_MOD(sf->hdr.count, ARCH_CONVERT, +1); @@ -298,7 +298,7 @@ sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; if (args->namelen == 2 && args->name[0] == '.' && args->name[1] == '.') { - XFS_DIR_SF_GET_DIRINO_ARCH(&sf->hdr.parent, &args->inumber, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&sf->hdr.parent, &args->inumber); return(XFS_ERROR(EEXIST)); } if (args->namelen == 1 && args->name[0] == '.') { @@ -310,7 +310,7 @@ if (sfe->namelen == args->namelen && sfe->name[0] == args->name[0] && memcmp(args->name, sfe->name, args->namelen) == 0) { - XFS_DIR_SF_GET_DIRINO_ARCH(&sfe->inumber, &args->inumber, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&sfe->inumber, &args->inumber); return(XFS_ERROR(EEXIST)); } sfe = XFS_DIR_SF_NEXTENTRY(sfe); @@ -353,7 +353,7 @@ memcpy(tmpbuffer, dp->i_df.if_u1.if_data, size); sf = (xfs_dir_shortform_t *)tmpbuffer; - XFS_DIR_SF_GET_DIRINO_ARCH(&sf->hdr.parent, &inumber, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&sf->hdr.parent, &inumber); xfs_idata_realloc(dp, -size, XFS_DATA_FORK); dp->i_d.di_size = 0; @@ -398,7 +398,7 @@ args.namelen = sfe->namelen; args.hashval = xfs_da_hashname((char *)(sfe->name), sfe->namelen); - XFS_DIR_SF_GET_DIRINO_ARCH(&sfe->inumber, &args.inumber, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&sfe->inumber, &args.inumber); retval = xfs_dir_leaf_addname(&args); if (retval) goto out; @@ -470,7 +470,7 @@ sbp->entno = 1; sbp->seqno = 0; sbp->hash = xfs_dir_hash_dotdot; - sbp->ino = XFS_GET_DIR_INO_ARCH(mp, sf->hdr.parent, ARCH_CONVERT); + sbp->ino = XFS_GET_DIR_INO8(sf->hdr.parent); sbp->name = ".."; sbp->namelen = 2; sbp++; @@ -494,7 +494,7 @@ sbp->entno = i + 2; sbp->seqno = 0; sbp->hash = xfs_da_hashname((char *)sfe->name, sfe->namelen); - sbp->ino = XFS_GET_DIR_INO_ARCH(mp, sfe->inumber, ARCH_CONVERT); + sbp->ino = XFS_GET_DIR_INO8(sfe->inumber); sbp->name = (char *)sfe->name; sbp->namelen = sfe->namelen; sfe = XFS_DIR_SF_NEXTENTRY(sfe); @@ -612,7 +612,7 @@ if (args->namelen == 2 && args->name[0] == '.' && args->name[1] == '.') { /* XXX - replace assert? */ - XFS_DIR_SF_PUT_DIRINO_ARCH(&args->inumber, &sf->hdr.parent, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &sf->hdr.parent); xfs_trans_log_inode(args->trans, dp, XFS_ILOG_DDATA); return(0); } @@ -624,7 +624,7 @@ memcmp(args->name, sfe->name, args->namelen) == 0) { ASSERT(memcmp((char *)&args->inumber, (char *)&sfe->inumber, sizeof(xfs_ino_t))); - XFS_DIR_SF_PUT_DIRINO_ARCH(&args->inumber, &sfe->inumber, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &sfe->inumber); xfs_trans_log_inode(args->trans, dp, XFS_ILOG_DDATA); return(0); } @@ -675,10 +675,10 @@ if ((entry->namelen == 2) && (namest->name[0] == '.') && (namest->name[1] == '.')) { - XFS_DIR_SF_GET_DIRINO_ARCH(&namest->inumber, &parent, ARCH_CONVERT); - INT_ZERO(entry->nameidx, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&namest->inumber, &parent); + entry->nameidx = 0; } else if ((entry->namelen == 1) && (namest->name[0] == '.')) { - INT_ZERO(entry->nameidx, ARCH_CONVERT); + entry->nameidx = 0; } } retval = xfs_da_shrink_inode(iargs, 0, bp); @@ -701,13 +701,13 @@ args.justcheck = 0; args.addname = args.oknoent = 1; for (i = 0; i < INT_GET(hdr->count, ARCH_CONVERT); entry++, i++) { - if (INT_ISZERO(entry->nameidx, ARCH_CONVERT)) + if (!entry->nameidx) continue; namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); args.name = (char *)(namest->name); args.namelen = entry->namelen; args.hashval = INT_GET(entry->hashval, ARCH_CONVERT); - XFS_DIR_SF_GET_DIRINO_ARCH(&namest->inumber, &args.inumber, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&namest->inumber, &args.inumber); xfs_dir_shortform_addname(&args); } @@ -801,7 +801,7 @@ hdr = &leaf->hdr; INT_SET(hdr->info.magic, ARCH_CONVERT, XFS_DIR_LEAF_MAGIC); INT_SET(hdr->firstused, ARCH_CONVERT, XFS_LBSIZE(dp->i_mount)); - if (INT_ISZERO(hdr->firstused, ARCH_CONVERT)) + if (!hdr->firstused) INT_SET(hdr->firstused, ARCH_CONVERT, XFS_LBSIZE(dp->i_mount) - 1); INT_SET(hdr->freemap[0].base, ARCH_CONVERT, sizeof(xfs_dir_leaf_hdr_t)); INT_SET(hdr->freemap[0].size, ARCH_CONVERT, INT_GET(hdr->firstused, ARCH_CONVERT) - INT_GET(hdr->freemap[0].base, ARCH_CONVERT)); @@ -895,7 +895,7 @@ sum += INT_GET(map->size, ARCH_CONVERT); continue; } - if (INT_ISZERO(map->size, ARCH_CONVERT)) + if (!map->size) continue; /* no space in this map */ tmp = entsize; if (INT_GET(map->base, ARCH_CONVERT) < INT_GET(hdr->firstused, ARCH_CONVERT)) @@ -995,7 +995,7 @@ * Copy the string and inode number into the new space. */ namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); - XFS_DIR_SF_PUT_DIRINO_ARCH(&args->inumber, &namest->inumber, ARCH_CONVERT); + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &namest->inumber); memcpy(namest->name, args->name, args->namelen); xfs_da_log_buf(args->trans, bp, XFS_DA_LOGRANGE(leaf, namest, XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry))); @@ -1060,10 +1060,10 @@ hdr_d = &leaf_d->hdr; hdr_d->info = hdr_s->info; /* struct copy */ INT_SET(hdr_d->firstused, ARCH_CONVERT, lbsize); - if (INT_ISZERO(hdr_d->firstused, ARCH_CONVERT)) + if (!hdr_d->firstused) INT_SET(hdr_d->firstused, ARCH_CONVERT, lbsize - 1); - INT_ZERO(hdr_d->namebytes, ARCH_CONVERT); - INT_ZERO(hdr_d->count, ARCH_CONVERT); + hdr_d->namebytes = 0; + hdr_d->count = 0; hdr_d->holes = 0; INT_SET(hdr_d->freemap[0].base, ARCH_CONVERT, sizeof(xfs_dir_leaf_hdr_t)); INT_SET(hdr_d->freemap[0].size, ARCH_CONVERT, INT_GET(hdr_d->firstused, ARCH_CONVERT) - INT_GET(hdr_d->freemap[0].base, ARCH_CONVERT)); @@ -1366,7 +1366,7 @@ * Make altpath point to the block we want to keep and * path point to the block we want to drop (this one). */ - forward = !INT_ISZERO(info->forw, ARCH_CONVERT); + forward = info->forw; memcpy(&state->altpath, &state->path, sizeof(state->path)); error = xfs_da_path_shift(state, &state->altpath, forward, 0, &retval); @@ -1515,8 +1515,8 @@ map = &hdr->freemap[before]; INT_MOD(map->size, ARCH_CONVERT, entsize); INT_MOD(map->size, ARCH_CONVERT, INT_GET(hdr->freemap[after].size, ARCH_CONVERT)); - INT_ZERO(hdr->freemap[after].base, ARCH_CONVERT); - INT_ZERO(hdr->freemap[after].size, ARCH_CONVERT); + hdr->freemap[after].base = 0; + hdr->freemap[after].size = 0; } else if (before >= 0) { map = &hdr->freemap[before]; INT_MOD(map->size, ARCH_CONVERT, entsize); @@ -1576,7 +1576,7 @@ tmp = INT_GET(entry->nameidx, ARCH_CONVERT); } INT_SET(hdr->firstused, ARCH_CONVERT, tmp); - if (INT_ISZERO(hdr->firstused, ARCH_CONVERT)) + if (!hdr->firstused) INT_SET(hdr->firstused, ARCH_CONVERT, tmp - 1); } else { hdr->holes = 1; /* mark as needing compaction */ @@ -1656,11 +1656,11 @@ tmp_leaf = (xfs_dir_leafblock_t *)tmpbuffer; tmp_hdr = &tmp_leaf->hdr; tmp_hdr->info = save_hdr->info; /* struct copy */ - INT_ZERO(tmp_hdr->count, ARCH_CONVERT); + tmp_hdr->count = 0; INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize); - if (INT_ISZERO(tmp_hdr->firstused, ARCH_CONVERT)) + if (!tmp_hdr->firstused) INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize - 1); - INT_ZERO(tmp_hdr->namebytes, ARCH_CONVERT); + tmp_hdr->namebytes = 0; if (xfs_dir_leaf_order(save_blk->bp, drop_blk->bp)) { xfs_dir_leaf_moveents(drop_leaf, 0, tmp_leaf, 0, (int)INT_GET(drop_hdr->count, ARCH_CONVERT), mp); @@ -1732,7 +1732,7 @@ break; } ASSERT((probe >= 0) && \ - ((INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) || (probe < INT_GET(leaf->hdr.count, ARCH_CONVERT)))); + ((!leaf->hdr.count) || (probe < INT_GET(leaf->hdr.count, ARCH_CONVERT)))); ASSERT((span <= 4) || (INT_GET(entry->hashval, ARCH_CONVERT) == hashval)); /* @@ -1761,7 +1761,7 @@ if (entry->namelen == args->namelen && namest->name[0] == args->name[0] && memcmp(args->name, namest->name, args->namelen) == 0) { - XFS_DIR_SF_GET_DIRINO_ARCH(&namest->inumber, &args->inumber, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&namest->inumber, &args->inumber); *index = probe; return(XFS_ERROR(EEXIST)); } @@ -1886,8 +1886,8 @@ INT_SET(hdr_d->freemap[0].base, ARCH_CONVERT, (uint)sizeof(xfs_dir_leaf_hdr_t)); INT_MOD(hdr_d->freemap[0].base, ARCH_CONVERT, INT_GET(hdr_d->count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t)); INT_SET(hdr_d->freemap[0].size, ARCH_CONVERT, INT_GET(hdr_d->firstused, ARCH_CONVERT) - INT_GET(hdr_d->freemap[0].base, ARCH_CONVERT)); - INT_SET(hdr_d->freemap[1].base, ARCH_CONVERT, INT_ZERO(hdr_d->freemap[2].base, ARCH_CONVERT)); - INT_SET(hdr_d->freemap[1].size, ARCH_CONVERT, INT_ZERO(hdr_d->freemap[2].size, ARCH_CONVERT)); + INT_SET(hdr_d->freemap[1].base, ARCH_CONVERT, (hdr_d->freemap[2].base = 0)); + INT_SET(hdr_d->freemap[1].size, ARCH_CONVERT, (hdr_d->freemap[2].size = 0)); hdr_s->holes = 1; /* leaf may not be compact */ } @@ -1925,7 +1925,7 @@ ASSERT(INT_GET(leaf->hdr.info.magic, ARCH_CONVERT) == XFS_DIR_LEAF_MAGIC); if (count) *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); - if (INT_ISZERO(leaf->hdr.count, ARCH_CONVERT)) + if (!leaf->hdr.count) return(0); return(INT_GET(leaf->entries[ INT_GET(leaf->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT)); } @@ -2140,7 +2140,7 @@ * then restore the UIO to the first entry in the current * run of equal-hashval entries (probably one 1 entry long). */ - p.ino = XFS_GET_DIR_INO_ARCH(mp, namest->inumber, ARCH_CONVERT); + p.ino = XFS_GET_DIR_INO8(namest->inumber); #if XFS_BIG_INUMS p.ino += mp->m_inoadd; #endif diff -Nru a/fs/xfs/xfs_dir_leaf.h b/fs/xfs/xfs_dir_leaf.h --- a/fs/xfs/xfs_dir_leaf.h 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_dir_leaf.h 2005-03-30 16:58:48 -08:00 @@ -140,11 +140,6 @@ #define XFS_PUT_COOKIE(c,mp,bno,entry,hash) \ ((c).s.be = XFS_DA_MAKE_BNOENTRY(mp, bno, entry), (c).s.h = (hash)) -#define XFS_GET_DIR_INO_ARCH(mp,di,arch) \ - DIRINO_GET_ARCH(&(di),arch) -#define XFS_GET_DIR_INO(mp,di) \ - XFS_GET_DIR_INO_ARCH(mp,di,ARCH_NOCONVERT) - typedef struct xfs_dir_put_args { xfs_dircook_t cook; /* cookie of (next) entry */ diff -Nru a/fs/xfs/xfs_dir_sf.h b/fs/xfs/xfs_dir_sf.h --- a/fs/xfs/xfs_dir_sf.h 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_dir_sf.h 2005-03-30 16:58:49 -08:00 @@ -77,22 +77,16 @@ } xfs_dir_sf_sort_t; #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_GET_DIRINO) -void xfs_dir_sf_get_dirino_arch(xfs_dir_ino_t *from, xfs_ino_t *to, xfs_arch_t arch); void xfs_dir_sf_get_dirino(xfs_dir_ino_t *from, xfs_ino_t *to); -#define XFS_DIR_SF_GET_DIRINO_ARCH(from,to,arch) xfs_dir_sf_get_dirino_arch(from, to, arch) #define XFS_DIR_SF_GET_DIRINO(from,to) xfs_dir_sf_get_dirino(from, to) #else -#define XFS_DIR_SF_GET_DIRINO_ARCH(from,to,arch) DIRINO_COPY_ARCH(from,to,arch) -#define XFS_DIR_SF_GET_DIRINO(from,to) DIRINO_COPY_ARCH(from,to,ARCH_NOCONVERT) +#define XFS_DIR_SF_GET_DIRINO(from,to) (*(to) = XFS_GET_DIR_INO8(*from)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_PUT_DIRINO) -void xfs_dir_sf_put_dirino_arch(xfs_ino_t *from, xfs_dir_ino_t *to, xfs_arch_t arch); void xfs_dir_sf_put_dirino(xfs_ino_t *from, xfs_dir_ino_t *to); -#define XFS_DIR_SF_PUT_DIRINO_ARCH(from,to,arch) xfs_dir_sf_put_dirino_arch(from, to, arch) -#define XFS_DIR_SF_PUT_DIRINO(from,to) xfs_dir_sf_put_dirino(from, to) +#define XFS_DIR_SF_PUT_DIRINO(from,to) xfs_dir_sf_put_dirino(from, to) #else -#define XFS_DIR_SF_PUT_DIRINO_ARCH(from,to,arch) DIRINO_COPY_ARCH(from,to,arch) -#define XFS_DIR_SF_PUT_DIRINO(from,to) DIRINO_COPY_ARCH(from,to,ARCH_NOCONVERT) +#define XFS_DIR_SF_PUT_DIRINO(from,to) XFS_PUT_DIR_INO8(*(from), *(to)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_ENTSIZE_BYNAME) int xfs_dir_sf_entsize_byname(int len); diff -Nru a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c --- a/fs/xfs/xfs_fsops.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_fsops.c 2005-03-30 16:58:50 -08:00 @@ -220,9 +220,9 @@ XFS_CNT_BLOCK(mp)); INT_SET(agf->agf_levels[XFS_BTNUM_BNOi], ARCH_CONVERT, 1); INT_SET(agf->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT, 1); - INT_ZERO(agf->agf_flfirst, ARCH_CONVERT); + agf->agf_flfirst = 0; INT_SET(agf->agf_fllast, ARCH_CONVERT, XFS_AGFL_SIZE(mp) - 1); - INT_ZERO(agf->agf_flcount, ARCH_CONVERT); + agf->agf_flcount = 0; tmpsize = agsize - XFS_PREALLOC_BLOCKS(mp); INT_SET(agf->agf_freeblks, ARCH_CONVERT, tmpsize); INT_SET(agf->agf_longest, ARCH_CONVERT, tmpsize); @@ -242,10 +242,10 @@ INT_SET(agi->agi_versionnum, ARCH_CONVERT, XFS_AGI_VERSION); INT_SET(agi->agi_seqno, ARCH_CONVERT, agno); INT_SET(agi->agi_length, ARCH_CONVERT, agsize); - INT_ZERO(agi->agi_count, ARCH_CONVERT); + agi->agi_count = 0; INT_SET(agi->agi_root, ARCH_CONVERT, XFS_IBT_BLOCK(mp)); INT_SET(agi->agi_level, ARCH_CONVERT, 1); - INT_ZERO(agi->agi_freecount, ARCH_CONVERT); + agi->agi_freecount = 0; INT_SET(agi->agi_newino, ARCH_CONVERT, NULLAGINO); INT_SET(agi->agi_dirino, ARCH_CONVERT, NULLAGINO); for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++) @@ -264,7 +264,7 @@ block = XFS_BUF_TO_SBLOCK(bp); memset(block, 0, mp->m_sb.sb_blocksize); INT_SET(block->bb_magic, ARCH_CONVERT, XFS_ABTB_MAGIC); - INT_ZERO(block->bb_level, ARCH_CONVERT); + block->bb_level = 0; INT_SET(block->bb_numrecs, ARCH_CONVERT, 1); INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); @@ -287,7 +287,7 @@ block = XFS_BUF_TO_SBLOCK(bp); memset(block, 0, mp->m_sb.sb_blocksize); INT_SET(block->bb_magic, ARCH_CONVERT, XFS_ABTC_MAGIC); - INT_ZERO(block->bb_level, ARCH_CONVERT); + block->bb_level = 0; INT_SET(block->bb_numrecs, ARCH_CONVERT, 1); INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); @@ -311,8 +311,8 @@ block = XFS_BUF_TO_SBLOCK(bp); memset(block, 0, mp->m_sb.sb_blocksize); INT_SET(block->bb_magic, ARCH_CONVERT, XFS_IBT_MAGIC); - INT_ZERO(block->bb_level, ARCH_CONVERT); - INT_ZERO(block->bb_numrecs, ARCH_CONVERT); + block->bb_level = 0; + block->bb_numrecs = 0; INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); error = xfs_bwrite(mp, bp); @@ -393,7 +393,7 @@ break; } sbp = XFS_BUF_TO_SBP(bp); - xfs_xlatesb(sbp, &mp->m_sb, -1, ARCH_CONVERT, XFS_SB_ALL_BITS); + xfs_xlatesb(sbp, &mp->m_sb, -1, XFS_SB_ALL_BITS); /* * If we get an error writing out the alternate superblocks, * just issue a warning and continue. The real work is diff -Nru a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c --- a/fs/xfs/xfs_ialloc.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_ialloc.c 2005-03-30 16:58:49 -08:00 @@ -580,7 +580,7 @@ * allocation groups upward, wrapping at the end. */ *alloc_done = B_FALSE; - while (INT_ISZERO(agi->agi_freecount, ARCH_CONVERT)) { + while (!agi->agi_freecount) { /* * Don't do anything if we're not supposed to allocate * any blocks, just go on to the next ag. @@ -662,7 +662,7 @@ XFS_WANT_CORRUPTED_GOTO(i == 1, error0); do { if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, - &rec.ir_freecount, &rec.ir_free, &i, ARCH_NOCONVERT))) + &rec.ir_freecount, &rec.ir_free, &i))) goto error0; XFS_WANT_CORRUPTED_GOTO(i == 1, error0); freecount += rec.ir_freecount; @@ -682,7 +682,7 @@ goto error0; if (i != 0 && (error = xfs_inobt_get_rec(cur, &rec.ir_startino, - &rec.ir_freecount, &rec.ir_free, &j, ARCH_NOCONVERT)) == 0 && + &rec.ir_freecount, &rec.ir_free, &j)) == 0 && j == 1 && rec.ir_freecount > 0) { /* @@ -717,7 +717,7 @@ if ((error = xfs_inobt_get_rec(tcur, &trec.ir_startino, &trec.ir_freecount, - &trec.ir_free, &i, ARCH_NOCONVERT))) + &trec.ir_free, &i))) goto error1; XFS_WANT_CORRUPTED_GOTO(i == 1, error1); } @@ -731,7 +731,7 @@ if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, &rec.ir_freecount, - &rec.ir_free, &i, ARCH_NOCONVERT))) + &rec.ir_free, &i))) goto error1; XFS_WANT_CORRUPTED_GOTO(i == 1, error1); } @@ -795,7 +795,7 @@ tcur, &trec.ir_startino, &trec.ir_freecount, - &trec.ir_free, &i, ARCH_NOCONVERT))) + &trec.ir_free, &i))) goto error1; XFS_WANT_CORRUPTED_GOTO(i == 1, error1); @@ -815,7 +815,7 @@ cur, &rec.ir_startino, &rec.ir_freecount, - &rec.ir_free, &i, ARCH_NOCONVERT))) + &rec.ir_free, &i))) goto error1; XFS_WANT_CORRUPTED_GOTO(i == 1, error1); @@ -835,7 +835,7 @@ goto error0; if (i == 1 && (error = xfs_inobt_get_rec(cur, &rec.ir_startino, - &rec.ir_freecount, &rec.ir_free, &j, ARCH_NOCONVERT)) == 0 && + &rec.ir_freecount, &rec.ir_free, &j)) == 0 && j == 1 && rec.ir_freecount > 0) { /* @@ -856,7 +856,7 @@ if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, &rec.ir_freecount, &rec.ir_free, - &i, ARCH_NOCONVERT))) + &i))) goto error0; XFS_WANT_CORRUPTED_GOTO(i == 1, error0); if (rec.ir_freecount > 0) @@ -873,7 +873,7 @@ ASSERT((XFS_AGINO_TO_OFFSET(mp, rec.ir_startino) % XFS_INODES_PER_CHUNK) == 0); ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino + offset); - XFS_INOBT_CLR_FREE(&rec, offset, ARCH_NOCONVERT); + XFS_INOBT_CLR_FREE(&rec, offset); rec.ir_freecount--; if ((error = xfs_inobt_update(cur, rec.ir_startino, rec.ir_freecount, rec.ir_free))) @@ -891,7 +891,7 @@ goto error0; do { if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, - &rec.ir_freecount, &rec.ir_free, &i, ARCH_NOCONVERT))) + &rec.ir_freecount, &rec.ir_free, &i))) goto error0; XFS_WANT_CORRUPTED_GOTO(i == 1, error0); freecount += rec.ir_freecount; @@ -998,7 +998,7 @@ goto error0; do { if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, - &rec.ir_freecount, &rec.ir_free, &i, ARCH_NOCONVERT))) + &rec.ir_freecount, &rec.ir_free, &i))) goto error0; if (i) { freecount += rec.ir_freecount; @@ -1021,7 +1021,7 @@ } XFS_WANT_CORRUPTED_GOTO(i == 1, error0); if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, &rec.ir_freecount, - &rec.ir_free, &i, ARCH_NOCONVERT))) { + &rec.ir_free, &i))) { cmn_err(CE_WARN, "xfs_difree: xfs_inobt_get_rec() returned an error %d on %s. Returning error.", error, mp->m_fsname); @@ -1033,11 +1033,11 @@ */ off = agino - rec.ir_startino; ASSERT(off >= 0 && off < XFS_INODES_PER_CHUNK); - ASSERT(!XFS_INOBT_IS_FREE(&rec, off, ARCH_NOCONVERT)); + ASSERT(!XFS_INOBT_IS_FREE(&rec, off)); /* * Mark the inode free & increment the count. */ - XFS_INOBT_SET_FREE(&rec, off, ARCH_NOCONVERT); + XFS_INOBT_SET_FREE(&rec, off); rec.ir_freecount++; /* @@ -1103,8 +1103,7 @@ if ((error = xfs_inobt_get_rec(cur, &rec.ir_startino, &rec.ir_freecount, - &rec.ir_free, &i, - ARCH_NOCONVERT))) + &rec.ir_free, &i))) goto error0; if (i) { freecount += rec.ir_freecount; @@ -1232,7 +1231,7 @@ goto error0; } if ((error = xfs_inobt_get_rec(cur, &chunk_agino, &chunk_cnt, - &chunk_free, &i, ARCH_NOCONVERT))) { + &chunk_free, &i))) { #ifdef DEBUG xfs_fs_cmn_err(CE_ALERT, mp, "xfs_dilocate: " "xfs_inobt_get_rec() failed"); @@ -1392,7 +1391,7 @@ int i; for (i = 0; i < XFS_AGI_UNLINKED_BUCKETS; i++) - ASSERT(!INT_ISZERO(agi->agi_unlinked[i], ARCH_CONVERT)); + ASSERT(agi->agi_unlinked[i]); } #endif diff -Nru a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c --- a/fs/xfs/xfs_ialloc_btree.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_ialloc_btree.c 2005-03-30 16:58:48 -08:00 @@ -1801,8 +1801,7 @@ xfs_agino_t *ino, /* output: starting inode of chunk */ __int32_t *fcnt, /* output: number of free inodes */ xfs_inofree_t *free, /* output: free inode mask */ - int *stat, /* output: success/failure */ - xfs_arch_t arch) /* input: architecture */ + int *stat) /* output: success/failure */ { xfs_inobt_block_t *block; /* btree block */ xfs_buf_t *bp; /* buffer containing btree block */ @@ -1830,16 +1829,9 @@ * Point to the record and extract its data. */ rec = XFS_INOBT_REC_ADDR(block, ptr, cur); - ASSERT(arch == ARCH_NOCONVERT || arch == ARCH_CONVERT); - if (arch == ARCH_NOCONVERT) { - *ino = INT_GET(rec->ir_startino, ARCH_CONVERT); - *fcnt = INT_GET(rec->ir_freecount, ARCH_CONVERT); - *free = INT_GET(rec->ir_free, ARCH_CONVERT); - } else { - INT_COPY(*ino, rec->ir_startino, ARCH_CONVERT); - INT_COPY(*fcnt, rec->ir_freecount, ARCH_CONVERT); - INT_COPY(*free, rec->ir_free, ARCH_CONVERT); - } + *ino = INT_GET(rec->ir_startino, ARCH_CONVERT); + *fcnt = INT_GET(rec->ir_freecount, ARCH_CONVERT); + *free = INT_GET(rec->ir_free, ARCH_CONVERT); *stat = 1; return 0; } diff -Nru a/fs/xfs/xfs_ialloc_btree.h b/fs/xfs/xfs_ialloc_btree.h --- a/fs/xfs/xfs_ialloc_btree.h 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_ialloc_btree.h 2005-03-30 16:58:48 -08:00 @@ -99,23 +99,22 @@ #define XFS_INOBT_MASK(i) ((xfs_inofree_t)1 << (i)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_IS_FREE) -int xfs_inobt_is_free(xfs_inobt_rec_t *rp, int i, xfs_arch_t arch); -#define XFS_INOBT_IS_FREE(rp,i,arch) xfs_inobt_is_free(rp,i,arch) +int xfs_inobt_is_free(xfs_inobt_rec_t *rp, int i); +#define XFS_INOBT_IS_FREE(rp,i) xfs_inobt_is_free(rp,i) #else -#define XFS_INOBT_IS_FREE(rp,i,arch) ((INT_GET((rp)->ir_free, arch) \ - & XFS_INOBT_MASK(i)) != 0) +#define XFS_INOBT_IS_FREE(rp,i) (((rp)->ir_free & XFS_INOBT_MASK(i)) != 0) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_SET_FREE) -void xfs_inobt_set_free(xfs_inobt_rec_t *rp, int i, xfs_arch_t arch); -#define XFS_INOBT_SET_FREE(rp,i,arch) xfs_inobt_set_free(rp,i,arch) +void xfs_inobt_set_free(xfs_inobt_rec_t *rp, int i); +#define XFS_INOBT_SET_FREE(rp,i) xfs_inobt_set_free(rp,i) #else -#define XFS_INOBT_SET_FREE(rp,i,arch) (INT_MOD_EXPR((rp)->ir_free, arch, |= XFS_INOBT_MASK(i))) +#define XFS_INOBT_SET_FREE(rp,i) ((rp)->ir_free |= XFS_INOBT_MASK(i)) #endif #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_CLR_FREE) -void xfs_inobt_clr_free(xfs_inobt_rec_t *rp, int i, xfs_arch_t arch); -#define XFS_INOBT_CLR_FREE(rp,i,arch) xfs_inobt_clr_free(rp,i,arch) +void xfs_inobt_clr_free(xfs_inobt_rec_t *rp, int i); +#define XFS_INOBT_CLR_FREE(rp,i) xfs_inobt_clr_free(rp,i) #else -#define XFS_INOBT_CLR_FREE(rp,i,arch) (INT_MOD_EXPR((rp)->ir_free, arch, &= ~XFS_INOBT_MASK(i))) +#define XFS_INOBT_CLR_FREE(rp,i) ((rp)->ir_free &= ~XFS_INOBT_MASK(i)) #endif /* @@ -244,8 +243,7 @@ xfs_agino_t *ino, /* output: starting inode of chunk */ __int32_t *fcnt, /* output: number of free inodes */ xfs_inofree_t *free, /* output: free inode mask */ - int *stat, /* output: success/failure */ - xfs_arch_t arch); /* output: architecture */ + int *stat); /* output: success/failure */ /* * Increment cursor by one record at the level. diff -Nru a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c --- a/fs/xfs/xfs_iget.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_iget.c 2005-03-30 16:58:50 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -61,7 +61,8 @@ * Initialize the inode hash table for the newly mounted file system. * Choose an initial table size based on user specified value, else * use a simple algorithm using the maximum number of inodes as an - * indicator for table size, and cap it at 16 pages (gettin' big). + * indicator for table size, and clamp it between one and some large + * number of pages. */ void xfs_ihash_init(xfs_mount_t *mp) @@ -72,8 +73,10 @@ if (!mp->m_ihsize) { icount = mp->m_maxicount ? mp->m_maxicount : (mp->m_sb.sb_dblocks << mp->m_sb.sb_inopblog); - mp->m_ihsize = 1 << max_t(uint, xfs_highbit64(icount) / 3, 8); - mp->m_ihsize = min_t(uint, mp->m_ihsize, 16 * PAGE_SIZE); + mp->m_ihsize = 1 << max_t(uint, 8, + (xfs_highbit64(icount) + 1) / 2); + mp->m_ihsize = min_t(uint, mp->m_ihsize, + (64 * NBPP) / sizeof(xfs_ihash_t)); } while (!(mp->m_ihash = (xfs_ihash_t *)kmem_zalloc(mp->m_ihsize * @@ -488,6 +491,11 @@ vn_wait(vp); iput(inode); goto retry; + } + + if (is_bad_inode(inode)) { + iput(inode); + return EIO; } bdp = vn_bhv_lookup(VN_BHV_HEAD(vp), &xfs_vnodeops); diff -Nru a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c --- a/fs/xfs/xfs_inode.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_inode.c 2005-03-30 16:58:50 -08:00 @@ -135,11 +135,11 @@ for (i = 0; i < j; i++) { dip = (xfs_dinode_t *)xfs_buf_offset(bp, i * mp->m_sb.sb_inodesize); - if (INT_ISZERO(dip->di_next_unlinked, ARCH_CONVERT)) { + if (!dip->di_next_unlinked) { xfs_fs_cmn_err(CE_ALERT, mp, "Detected a bogus zero next_unlinked field in incore inode buffer 0x%p. About to pop an ASSERT.", bp); - ASSERT(!INT_ISZERO(dip->di_next_unlinked, ARCH_CONVERT)); + ASSERT(dip->di_next_unlinked); } } } @@ -176,7 +176,7 @@ xfs_fs_cmn_err(CE_WARN, mp, "corrupt, unmount and run xfs_repair"); } - if (INT_ISZERO(dip->di_next_unlinked, ARCH_CONVERT)) { + if (!dip->di_next_unlinked) { cmn_err(CE_WARN, "Bad next_unlinked field (0) in XFS inode buffer 0x%p, starting blockno %Ld, offset 0x%x", (__uint64_t)(__psunsigned_t) bp, @@ -520,8 +520,7 @@ } di_size = INT_GET(dip->di_core.di_size, ARCH_CONVERT); - if (unlikely(di_size > - XFS_DFORK_DSIZE_ARCH(dip, ip->i_mount, ARCH_CONVERT))) { + if (unlikely(di_size > XFS_DFORK_DSIZE(dip, ip->i_mount))) { xfs_fs_cmn_err(CE_WARN, ip->i_mount, "corrupt inode %Lu (bad size %Ld for local inode). Unmount and run xfs_repair.", (unsigned long long) ip->i_ino, @@ -555,7 +554,7 @@ if (error) { return error; } - if (!XFS_DFORK_Q_ARCH(dip, ARCH_CONVERT)) + if (!XFS_DFORK_Q(dip)) return 0; ASSERT(ip->i_afp == NULL); ip->i_afp = kmem_zone_zalloc(xfs_ifork_zone, KM_SLEEP); @@ -563,7 +562,7 @@ XFS_IFORK_ASIZE(ip) / (uint)sizeof(xfs_bmbt_rec_t); switch (INT_GET(dip->di_core.di_aformat, ARCH_CONVERT)) { case XFS_DINODE_FMT_LOCAL: - atp = (xfs_attr_shortform_t *)XFS_DFORK_APTR_ARCH(dip, ARCH_CONVERT); + atp = (xfs_attr_shortform_t *)XFS_DFORK_APTR(dip); size = (int)INT_GET(atp->hdr.totsize, ARCH_CONVERT); error = xfs_iformat_local(ip, dip, XFS_ATTR_FORK, size); break; @@ -610,11 +609,11 @@ * is wrong and we just bail out rather than crash in * kmem_alloc() or memcpy() below. */ - if (unlikely(size > XFS_DFORK_SIZE_ARCH(dip, ip->i_mount, whichfork, ARCH_CONVERT))) { + if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) { xfs_fs_cmn_err(CE_WARN, ip->i_mount, "corrupt inode %Lu (bad size %d for local fork, size = %d). Unmount and run xfs_repair.", (unsigned long long) ip->i_ino, size, - XFS_DFORK_SIZE_ARCH(dip, ip->i_mount, whichfork, ARCH_CONVERT)); + XFS_DFORK_SIZE(dip, ip->i_mount, whichfork)); XFS_CORRUPTION_ERROR("xfs_iformat_local", XFS_ERRLEVEL_LOW, ip->i_mount, dip); return XFS_ERROR(EFSCORRUPTED); @@ -632,8 +631,7 @@ ifp->if_bytes = size; ifp->if_real_bytes = real_size; if (size) - memcpy(ifp->if_u1.if_data, - XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT), size); + memcpy(ifp->if_u1.if_data, XFS_DFORK_PTR(dip, whichfork), size); ifp->if_flags &= ~XFS_IFEXTENTS; ifp->if_flags |= XFS_IFINLINE; return 0; @@ -662,7 +660,7 @@ int i; ifp = XFS_IFORK_PTR(ip, whichfork); - nex = XFS_DFORK_NEXTENTS_ARCH(dip, whichfork, ARCH_CONVERT); + nex = XFS_DFORK_NEXTENTS(dip, whichfork); size = nex * (uint)sizeof(xfs_bmbt_rec_t); /* @@ -670,7 +668,7 @@ * is wrong and we just bail out rather than crash in * kmem_alloc() or memcpy() below. */ - if (unlikely(size < 0 || size > XFS_DFORK_SIZE_ARCH(dip, ip->i_mount, whichfork, ARCH_CONVERT))) { + if (unlikely(size < 0 || size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) { xfs_fs_cmn_err(CE_WARN, ip->i_mount, "corrupt inode %Lu ((a)extents = %d). Unmount and run xfs_repair.", (unsigned long long) ip->i_ino, nex); @@ -692,8 +690,7 @@ ifp->if_bytes = size; ifp->if_real_bytes = real_size; if (size) { - dp = (xfs_bmbt_rec_t *) - XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT); + dp = (xfs_bmbt_rec_t *) XFS_DFORK_PTR(dip, whichfork); xfs_validate_extents(dp, nex, 1, XFS_EXTFMT_INODE(ip)); ep = ifp->if_u1.if_extents; for (i = 0; i < nex; i++, ep++, dp++) { @@ -739,7 +736,7 @@ int size; ifp = XFS_IFORK_PTR(ip, whichfork); - dfp = (xfs_bmdr_block_t *)XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT); + dfp = (xfs_bmdr_block_t *)XFS_DFORK_PTR(dip, whichfork); size = XFS_BMAP_BROOT_SPACE(dfp); nrecs = XFS_BMAP_BROOT_NUMRECS(dfp); @@ -752,7 +749,7 @@ */ if (unlikely(XFS_IFORK_NEXTENTS(ip, whichfork) <= ifp->if_ext_max || XFS_BMDR_SPACE_CALC(nrecs) > - XFS_DFORK_SIZE_ARCH(dip, ip->i_mount, whichfork, ARCH_CONVERT) + XFS_DFORK_SIZE(dip, ip->i_mount, whichfork) || XFS_IFORK_NEXTENTS(ip, whichfork) > ip->i_d.di_nblocks)) { xfs_fs_cmn_err(CE_WARN, ip->i_mount, "corrupt inode %Lu (btree). Unmount and run xfs_repair.", @@ -769,7 +766,7 @@ * Copy and convert from the on-disk structure * to the in-memory structure. */ - xfs_bmdr_to_bmbt(dfp, XFS_DFORK_SIZE_ARCH(dip, ip->i_mount, whichfork, ARCH_CONVERT), + xfs_bmdr_to_bmbt(dfp, XFS_DFORK_SIZE(dip, ip->i_mount, whichfork), ifp->if_broot, size); ifp->if_flags &= ~XFS_IFEXTENTS; ifp->if_flags |= XFS_IFBROOT; @@ -785,29 +782,18 @@ * dip = native representation * dir = direction - +ve -> disk to native * -ve -> native to disk - * arch = on-disk architecture */ void xfs_xlate_dinode_core( xfs_caddr_t buf, xfs_dinode_core_t *dip, - int dir, - xfs_arch_t arch) + int dir) { xfs_dinode_core_t *buf_core = (xfs_dinode_core_t *)buf; xfs_dinode_core_t *mem_core = (xfs_dinode_core_t *)dip; + xfs_arch_t arch = ARCH_CONVERT; ASSERT(dir); - if (arch == ARCH_NOCONVERT) { - if (dir > 0) { - memcpy((xfs_caddr_t)mem_core, (xfs_caddr_t)buf_core, - sizeof(xfs_dinode_core_t)); - } else { - memcpy((xfs_caddr_t)buf_core, (xfs_caddr_t)mem_core, - sizeof(xfs_dinode_core_t)); - } - return; - } INT_XLATE(buf_core->di_magic, mem_core->di_magic, dir, arch); INT_XLATE(buf_core->di_mode, mem_core->di_mode, dir, arch); @@ -854,16 +840,13 @@ INT_XLATE(buf_core->di_gen, mem_core->di_gen, dir, arch); } -uint -xfs_dic2xflags( +STATIC uint +_xfs_dic2xflags( xfs_dinode_core_t *dic, - xfs_arch_t arch) + __uint16_t di_flags) { - __uint16_t di_flags; - uint flags; + uint flags = 0; - di_flags = INT_GET(dic->di_flags, arch); - flags = XFS_CFORK_Q_ARCH(dic, arch) ? XFS_XFLAG_HASATTR : 0; if (di_flags & XFS_DIFLAG_ANY) { if (di_flags & XFS_DIFLAG_REALTIME) flags |= XFS_XFLAG_REALTIME; @@ -886,9 +869,28 @@ if (di_flags & XFS_DIFLAG_NOSYMLINKS) flags |= XFS_XFLAG_NOSYMLINKS; } + return flags; } +uint +xfs_ip2xflags( + xfs_inode_t *ip) +{ + xfs_dinode_core_t *dic = &ip->i_d; + + return _xfs_dic2xflags(dic, dic->di_flags) | + (XFS_CFORK_Q(dic) ? XFS_XFLAG_HASATTR : 0); +} + +uint +xfs_dic2xflags( + xfs_dinode_core_t *dic) +{ + return _xfs_dic2xflags(dic, INT_GET(dic->di_flags, ARCH_CONVERT)) | + (XFS_CFORK_Q_DISK(dic) ? XFS_XFLAG_HASATTR : 0); +} + /* * Given a mount structure and an inode number, return a pointer * to a newly allocated in-core inode coresponding to the given @@ -974,9 +976,9 @@ * specific information. * Otherwise, just get the truly permanent information. */ - if (!INT_ISZERO(dip->di_core.di_mode, ARCH_CONVERT)) { + if (dip->di_core.di_mode) { xfs_xlate_dinode_core((xfs_caddr_t)&dip->di_core, - &(ip->i_d), 1, ARCH_CONVERT); + &(ip->i_d), 1); error = xfs_iformat(ip, dip); if (error) { kmem_zone_free(xfs_inode_zone, ip); @@ -1931,7 +1933,7 @@ agino = XFS_INO_TO_AGINO(mp, ip->i_ino); ASSERT(agino != 0); bucket_index = agino % XFS_AGI_UNLINKED_BUCKETS; - ASSERT(!INT_ISZERO(agi->agi_unlinked[bucket_index], ARCH_CONVERT)); + ASSERT(agi->agi_unlinked[bucket_index]); ASSERT(INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) != agino); if (INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) != NULLAGINO) { @@ -1946,7 +1948,7 @@ return error; } ASSERT(INT_GET(dip->di_next_unlinked, ARCH_CONVERT) == NULLAGINO); - ASSERT(!INT_ISZERO(dip->di_next_unlinked, ARCH_CONVERT)); + ASSERT(dip->di_next_unlinked); /* both on-disk, don't endian flip twice */ dip->di_next_unlinked = agi->agi_unlinked[bucket_index]; offset = ip->i_boffset + @@ -2039,7 +2041,7 @@ ASSERT(agino != 0); bucket_index = agino % XFS_AGI_UNLINKED_BUCKETS; ASSERT(INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) != NULLAGINO); - ASSERT(!INT_ISZERO(agi->agi_unlinked[bucket_index], ARCH_CONVERT)); + ASSERT(agi->agi_unlinked[bucket_index]); if (INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) == agino) { /* @@ -3015,7 +3017,7 @@ ASSERT(whichfork == XFS_ATTR_FORK); return 0; } - cp = XFS_DFORK_PTR_ARCH(dip, whichfork, ARCH_CONVERT); + cp = XFS_DFORK_PTR(dip, whichfork); mp = ip->i_mount; switch (XFS_IFORK_FORMAT(ip, whichfork)) { case XFS_DINODE_FMT_LOCAL: @@ -3056,7 +3058,7 @@ XFS_BROOT_SIZE_ADJ)); xfs_bmbt_to_bmdr(ifp->if_broot, ifp->if_broot_bytes, (xfs_bmdr_block_t *)cp, - XFS_DFORK_SIZE_ARCH(dip, mp, whichfork, ARCH_CONVERT)); + XFS_DFORK_SIZE(dip, mp, whichfork)); } break; @@ -3474,8 +3476,7 @@ * because if the inode is dirty at all the core must * be. */ - xfs_xlate_dinode_core((xfs_caddr_t)&(dip->di_core), &(ip->i_d), - -1, ARCH_CONVERT); + xfs_xlate_dinode_core((xfs_caddr_t)&(dip->di_core), &(ip->i_d), -1); /* Wrap, we never let the log put out DI_MAX_FLUSH */ if (ip->i_d.di_flushiter == DI_MAX_FLUSH) @@ -3505,7 +3506,7 @@ ip->i_d.di_version = XFS_DINODE_VERSION_2; INT_SET(dip->di_core.di_version, ARCH_CONVERT, XFS_DINODE_VERSION_2); ip->i_d.di_onlink = 0; - INT_ZERO(dip->di_core.di_onlink, ARCH_CONVERT); + dip->di_core.di_onlink = 0; memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); memset(&(dip->di_core.di_pad[0]), 0, sizeof(dip->di_core.di_pad)); diff -Nru a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h --- a/fs/xfs/xfs_inode.h 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_inode.h 2005-03-30 16:58:49 -08:00 @@ -499,8 +499,9 @@ xfs_dev_t, struct cred *, xfs_prid_t, int, struct xfs_buf **, boolean_t *, xfs_inode_t **); void xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *, - int, xfs_arch_t); -uint xfs_dic2xflags(struct xfs_dinode_core *, xfs_arch_t); + int); +uint xfs_ip2xflags(struct xfs_inode *); +uint xfs_dic2xflags(struct xfs_dinode_core *); int xfs_ifree(struct xfs_trans *, xfs_inode_t *, struct xfs_bmap_free *); void xfs_itruncate_start(xfs_inode_t *, uint, xfs_fsize_t); diff -Nru a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c --- a/fs/xfs/xfs_inode_item.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_inode_item.c 2005-03-30 16:58:49 -08:00 @@ -339,7 +339,7 @@ nrecs = ip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t); ASSERT(nrecs > 0); -#if ARCH_CONVERT == ARCH_NOCONVERT +#if __BYTE_ORDER == __BIG_ENDIAN if (nrecs == ip->i_d.di_nextents) { /* * There are no delayed allocation @@ -467,7 +467,7 @@ #endif ASSERT(nrecs > 0); ASSERT(nrecs == ip->i_d.di_anextents); -#if ARCH_CONVERT == ARCH_NOCONVERT +#if __BYTE_ORDER == __BIG_ENDIAN /* * There are not delayed allocation extents * for attributes, so just point at the array. diff -Nru a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c --- a/fs/xfs/xfs_itable.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_itable.c 2005-03-30 16:58:47 -08:00 @@ -60,128 +60,137 @@ #define unuseracc(ubuffer, size, flags) #endif -/* - * Return stat information for one inode. - * Return 0 if ok, else errno. - */ -int /* error status */ -xfs_bulkstat_one( +STATIC int +xfs_bulkstat_one_iget( xfs_mount_t *mp, /* mount point for filesystem */ xfs_ino_t ino, /* inode number to get data for */ - void __user *buffer, /* buffer to place output in */ - int ubsize, /* size of buffer */ - void *private_data, /* my private data */ xfs_daddr_t bno, /* starting bno of inode cluster */ - int *ubused, /* bytes used by me */ - void *dibuff, /* on-disk inode buffer */ + xfs_bstat_t *buf, /* return buffer */ int *stat) /* BULKSTAT_RV_... */ { - xfs_bstat_t *buf; /* return buffer */ - int error; /* error value */ - xfs_dinode_t *dip; /* dinode inode pointer */ xfs_dinode_core_t *dic; /* dinode core info pointer */ - xfs_inode_t *ip = NULL; /* incore inode pointer */ - xfs_arch_t arch; /* these are set according to */ - - dip = (xfs_dinode_t *)dibuff; + xfs_inode_t *ip; /* incore inode pointer */ + int error; - if (!buffer || ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || - (XFS_SB_VERSION_HASQUOTA(&mp->m_sb) && - (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino))) { + error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_SHARED, &ip, bno); + if (error) { *stat = BULKSTAT_RV_NOTHING; - return XFS_ERROR(EINVAL); + return error; } - if (ubsize < sizeof(*buf)) { + + ASSERT(ip != NULL); + ASSERT(ip->i_blkno != (xfs_daddr_t)0); + if (ip->i_d.di_mode == 0) { *stat = BULKSTAT_RV_NOTHING; - return XFS_ERROR(ENOMEM); + error = XFS_ERROR(ENOENT); + goto out_iput; } - buf = kmem_alloc(sizeof(*buf), KM_SLEEP); + dic = &ip->i_d; - if (dip == NULL) { - /* We're not being passed a pointer to a dinode. This happens - * if BULKSTAT_FG_IGET is selected. Do the iget. - */ - error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_SHARED, &ip, bno); - if (error) { - *stat = BULKSTAT_RV_NOTHING; - return error; - } - ASSERT(ip != NULL); - ASSERT(ip->i_blkno != (xfs_daddr_t)0); - if (ip->i_d.di_mode == 0) { - xfs_iput_new(ip, XFS_ILOCK_SHARED); - *stat = BULKSTAT_RV_NOTHING; - kmem_free(buf, sizeof(*buf)); - return XFS_ERROR(ENOENT); - } - dic = &ip->i_d; - arch = ARCH_NOCONVERT; /* in-core! */ - ASSERT(dic != NULL); + /* xfs_iget returns the following without needing + * further change. + */ + buf->bs_nlink = dic->di_nlink; + buf->bs_projid = dic->di_projid; + buf->bs_ino = ino; + buf->bs_mode = dic->di_mode; + buf->bs_uid = dic->di_uid; + buf->bs_gid = dic->di_gid; + buf->bs_size = dic->di_size; + buf->bs_atime.tv_sec = dic->di_atime.t_sec; + buf->bs_atime.tv_nsec = dic->di_atime.t_nsec; + buf->bs_mtime.tv_sec = dic->di_mtime.t_sec; + buf->bs_mtime.tv_nsec = dic->di_mtime.t_nsec; + buf->bs_ctime.tv_sec = dic->di_ctime.t_sec; + buf->bs_ctime.tv_nsec = dic->di_ctime.t_nsec; + buf->bs_xflags = xfs_ip2xflags(ip); + buf->bs_extsize = dic->di_extsize << mp->m_sb.sb_blocklog; + buf->bs_extents = dic->di_nextents; + buf->bs_gen = dic->di_gen; + memset(buf->bs_pad, 0, sizeof(buf->bs_pad)); + buf->bs_dmevmask = dic->di_dmevmask; + buf->bs_dmstate = dic->di_dmstate; + buf->bs_aextents = dic->di_anextents; - /* xfs_iget returns the following without needing - * further change. - */ - buf->bs_nlink = dic->di_nlink; - buf->bs_projid = dic->di_projid; + switch (dic->di_format) { + case XFS_DINODE_FMT_DEV: + buf->bs_rdev = ip->i_df.if_u2.if_rdev; + buf->bs_blksize = BLKDEV_IOSIZE; + buf->bs_blocks = 0; + break; + case XFS_DINODE_FMT_LOCAL: + case XFS_DINODE_FMT_UUID: + buf->bs_rdev = 0; + buf->bs_blksize = mp->m_sb.sb_blocksize; + buf->bs_blocks = 0; + break; + case XFS_DINODE_FMT_EXTENTS: + case XFS_DINODE_FMT_BTREE: + buf->bs_rdev = 0; + buf->bs_blksize = mp->m_sb.sb_blocksize; + buf->bs_blocks = dic->di_nblocks + ip->i_delayed_blks; + break; + } - } else { - dic = &dip->di_core; - ASSERT(dic != NULL); + out_iput: + xfs_iput(ip, XFS_ILOCK_SHARED); + return error; +} - /* buffer dinode_core is in on-disk arch */ - arch = ARCH_CONVERT; +STATIC int +xfs_bulkstat_one_dinode( + xfs_mount_t *mp, /* mount point for filesystem */ + xfs_ino_t ino, /* inode number to get data for */ + xfs_dinode_t *dip, /* dinode inode pointer */ + xfs_bstat_t *buf) /* return buffer */ +{ + xfs_dinode_core_t *dic; /* dinode core info pointer */ - /* - * The inode format changed when we moved the link count and - * made it 32 bits long. If this is an old format inode, - * convert it in memory to look like a new one. If it gets - * flushed to disk we will convert back before flushing or - * logging it. We zero out the new projid field and the old link - * count field. We'll handle clearing the pad field (the remains - * of the old uuid field) when we actually convert the inode to - * the new format. We don't change the version number so that we - * can distinguish this from a real new format inode. - */ - if (INT_GET(dic->di_version, arch) == XFS_DINODE_VERSION_1) { - buf->bs_nlink = INT_GET(dic->di_onlink, arch); - buf->bs_projid = 0; - } - else { - buf->bs_nlink = INT_GET(dic->di_nlink, arch); - buf->bs_projid = INT_GET(dic->di_projid, arch); - } + dic = &dip->di_core; + /* + * The inode format changed when we moved the link count and + * made it 32 bits long. If this is an old format inode, + * convert it in memory to look like a new one. If it gets + * flushed to disk we will convert back before flushing or + * logging it. We zero out the new projid field and the old link + * count field. We'll handle clearing the pad field (the remains + * of the old uuid field) when we actually convert the inode to + * the new format. We don't change the version number so that we + * can distinguish this from a real new format inode. + */ + if (INT_GET(dic->di_version, ARCH_CONVERT) == XFS_DINODE_VERSION_1) { + buf->bs_nlink = INT_GET(dic->di_onlink, ARCH_CONVERT); + buf->bs_projid = 0; + } else { + buf->bs_nlink = INT_GET(dic->di_nlink, ARCH_CONVERT); + buf->bs_projid = INT_GET(dic->di_projid, ARCH_CONVERT); } buf->bs_ino = ino; - buf->bs_mode = INT_GET(dic->di_mode, arch); - buf->bs_uid = INT_GET(dic->di_uid, arch); - buf->bs_gid = INT_GET(dic->di_gid, arch); - buf->bs_size = INT_GET(dic->di_size, arch); - buf->bs_atime.tv_sec = INT_GET(dic->di_atime.t_sec, arch); - buf->bs_atime.tv_nsec = INT_GET(dic->di_atime.t_nsec, arch); - buf->bs_mtime.tv_sec = INT_GET(dic->di_mtime.t_sec, arch); - buf->bs_mtime.tv_nsec = INT_GET(dic->di_mtime.t_nsec, arch); - buf->bs_ctime.tv_sec = INT_GET(dic->di_ctime.t_sec, arch); - buf->bs_ctime.tv_nsec = INT_GET(dic->di_ctime.t_nsec, arch); - buf->bs_xflags = xfs_dic2xflags(dic, arch); - buf->bs_extsize = INT_GET(dic->di_extsize, arch) << mp->m_sb.sb_blocklog; - buf->bs_extents = INT_GET(dic->di_nextents, arch); - buf->bs_gen = INT_GET(dic->di_gen, arch); + buf->bs_mode = INT_GET(dic->di_mode, ARCH_CONVERT); + buf->bs_uid = INT_GET(dic->di_uid, ARCH_CONVERT); + buf->bs_gid = INT_GET(dic->di_gid, ARCH_CONVERT); + buf->bs_size = INT_GET(dic->di_size, ARCH_CONVERT); + buf->bs_atime.tv_sec = INT_GET(dic->di_atime.t_sec, ARCH_CONVERT); + buf->bs_atime.tv_nsec = INT_GET(dic->di_atime.t_nsec, ARCH_CONVERT); + buf->bs_mtime.tv_sec = INT_GET(dic->di_mtime.t_sec, ARCH_CONVERT); + buf->bs_mtime.tv_nsec = INT_GET(dic->di_mtime.t_nsec, ARCH_CONVERT); + buf->bs_ctime.tv_sec = INT_GET(dic->di_ctime.t_sec, ARCH_CONVERT); + buf->bs_ctime.tv_nsec = INT_GET(dic->di_ctime.t_nsec, ARCH_CONVERT); + buf->bs_xflags = xfs_dic2xflags(dic); + buf->bs_extsize = INT_GET(dic->di_extsize, ARCH_CONVERT) << mp->m_sb.sb_blocklog; + buf->bs_extents = INT_GET(dic->di_nextents, ARCH_CONVERT); + buf->bs_gen = INT_GET(dic->di_gen, ARCH_CONVERT); memset(buf->bs_pad, 0, sizeof(buf->bs_pad)); - buf->bs_dmevmask = INT_GET(dic->di_dmevmask, arch); - buf->bs_dmstate = INT_GET(dic->di_dmstate, arch); - buf->bs_aextents = INT_GET(dic->di_anextents, arch); + buf->bs_dmevmask = INT_GET(dic->di_dmevmask, ARCH_CONVERT); + buf->bs_dmstate = INT_GET(dic->di_dmstate, ARCH_CONVERT); + buf->bs_aextents = INT_GET(dic->di_anextents, ARCH_CONVERT); - switch (INT_GET(dic->di_format, arch)) { + switch (INT_GET(dic->di_format, ARCH_CONVERT)) { case XFS_DINODE_FMT_DEV: - if ( ip ) { - buf->bs_rdev = ip->i_df.if_u2.if_rdev; - } else { - buf->bs_rdev = INT_GET(dip->di_u.di_dev, arch); - } - + buf->bs_rdev = INT_GET(dip->di_u.di_dev, ARCH_CONVERT); buf->bs_blksize = BLKDEV_IOSIZE; buf->bs_blocks = 0; break; @@ -195,29 +204,72 @@ case XFS_DINODE_FMT_BTREE: buf->bs_rdev = 0; buf->bs_blksize = mp->m_sb.sb_blocksize; - if ( ip ) { - buf->bs_blocks = INT_GET(dic->di_nblocks, arch) + ip->i_delayed_blks; - } else { - buf->bs_blocks = INT_GET(dic->di_nblocks, arch); - } + buf->bs_blocks = INT_GET(dic->di_nblocks, ARCH_CONVERT); break; } - if (ip) { - xfs_iput(ip, XFS_ILOCK_SHARED); + return 0; +} + +/* + * Return stat information for one inode. + * Return 0 if ok, else errno. + */ +int /* error status */ +xfs_bulkstat_one( + xfs_mount_t *mp, /* mount point for filesystem */ + xfs_ino_t ino, /* inode number to get data for */ + void __user *buffer, /* buffer to place output in */ + int ubsize, /* size of buffer */ + void *private_data, /* my private data */ + xfs_daddr_t bno, /* starting bno of inode cluster */ + int *ubused, /* bytes used by me */ + void *dibuff, /* on-disk inode buffer */ + int *stat) /* BULKSTAT_RV_... */ +{ + xfs_bstat_t *buf; /* return buffer */ + int error = 0; /* error value */ + xfs_dinode_t *dip; /* dinode inode pointer */ + + dip = (xfs_dinode_t *)dibuff; + + if (!buffer || ino == mp->m_sb.sb_rbmino || ino == mp->m_sb.sb_rsumino || + (XFS_SB_VERSION_HASQUOTA(&mp->m_sb) && + (ino == mp->m_sb.sb_uquotino || ino == mp->m_sb.sb_gquotino))) { + *stat = BULKSTAT_RV_NOTHING; + return XFS_ERROR(EINVAL); + } + if (ubsize < sizeof(*buf)) { + *stat = BULKSTAT_RV_NOTHING; + return XFS_ERROR(ENOMEM); + } + + buf = kmem_alloc(sizeof(*buf), KM_SLEEP); + + if (dip == NULL) { + /* We're not being passed a pointer to a dinode. This happens + * if BULKSTAT_FG_IGET is selected. Do the iget. + */ + error = xfs_bulkstat_one_iget(mp, ino, bno, buf, stat); + if (error) + goto out_free; + } else { + xfs_bulkstat_one_dinode(mp, ino, dip, buf); } if (copy_to_user(buffer, buf, sizeof(*buf))) { - kmem_free(buf, sizeof(*buf)); *stat = BULKSTAT_RV_NOTHING; - return EFAULT; + error = EFAULT; + goto out_free; } - kmem_free(buf, sizeof(*buf)); *stat = BULKSTAT_RV_DIDONE; if (ubused) *ubused = sizeof(*buf); - return 0; + + out_free: + kmem_free(buf, sizeof(*buf)); + return error; } /* @@ -352,7 +404,7 @@ tmp && /* lookup succeeded */ /* got the record, should always work */ !(error = xfs_inobt_get_rec(cur, &gino, &gcnt, - &gfree, &i, ARCH_NOCONVERT)) && + &gfree, &i)) && i == 1 && /* this is the right chunk */ agino < gino + XFS_INODES_PER_CHUNK && @@ -421,7 +473,7 @@ */ if (error || (error = xfs_inobt_get_rec(cur, &gino, &gcnt, - &gfree, &i, ARCH_NOCONVERT)) || + &gfree, &i)) || i == 0) { end_of_ag = 1; break; @@ -744,7 +796,7 @@ } } if ((error = xfs_inobt_get_rec(cur, &gino, &gcnt, &gfree, - &i, ARCH_NOCONVERT)) || + &i)) || i == 0) { xfs_buf_relse(agbp); agbp = NULL; diff -Nru a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c --- a/fs/xfs/xfs_log.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_log.c 2005-03-30 16:58:50 -08:00 @@ -175,8 +175,8 @@ (void *)((unsigned long)log->l_grant_write_bytes), (void *)((unsigned long)log->l_curr_cycle), (void *)((unsigned long)log->l_curr_block), - (void *)((unsigned long)CYCLE_LSN(log->l_tail_lsn, ARCH_NOCONVERT)), - (void *)((unsigned long)BLOCK_LSN(log->l_tail_lsn, ARCH_NOCONVERT)), + (void *)((unsigned long)CYCLE_LSN(log->l_tail_lsn)), + (void *)((unsigned long)BLOCK_LSN(log->l_tail_lsn)), (void *)string, (void *)((unsigned long)13), (void *)((unsigned long)14), @@ -890,8 +890,8 @@ int tail_bytes; int tail_cycle; - tail_bytes = BBTOB(BLOCK_LSN(log->l_tail_lsn, ARCH_NOCONVERT)); - tail_cycle = CYCLE_LSN(log->l_tail_lsn, ARCH_NOCONVERT); + tail_bytes = BBTOB(BLOCK_LSN(log->l_tail_lsn)); + tail_cycle = CYCLE_LSN(log->l_tail_lsn); if ((tail_cycle == cycle) && (bytes >= tail_bytes)) { free_bytes = log->l_logsize - (bytes - tail_bytes); } else if ((tail_cycle + 1) < cycle) { @@ -1164,7 +1164,7 @@ log->l_flags |= XLOG_ACTIVE_RECOVERY; log->l_prev_block = -1; - ASSIGN_ANY_LSN(log->l_tail_lsn, 1, 0, ARCH_NOCONVERT); + ASSIGN_ANY_LSN_HOST(log->l_tail_lsn, 1, 0); /* log->l_tail_lsn = 0x100000000LL; cycle = 1; current block = 0 */ log->l_last_sync_lsn = log->l_tail_lsn; log->l_curr_cycle = 1; /* 0 is bad since this is initial value */ @@ -1321,19 +1321,19 @@ free_threshold = MAX(free_threshold, (log->l_logBBsize >> 2)); free_threshold = MAX(free_threshold, 256); if (free_blocks < free_threshold) { - threshold_block = BLOCK_LSN(tail_lsn, ARCH_NOCONVERT) + free_threshold; - threshold_cycle = CYCLE_LSN(tail_lsn, ARCH_NOCONVERT); + threshold_block = BLOCK_LSN(tail_lsn) + free_threshold; + threshold_cycle = CYCLE_LSN(tail_lsn); if (threshold_block >= log->l_logBBsize) { threshold_block -= log->l_logBBsize; threshold_cycle += 1; } - ASSIGN_ANY_LSN(threshold_lsn, threshold_cycle, - threshold_block, ARCH_NOCONVERT); + ASSIGN_ANY_LSN_HOST(threshold_lsn, threshold_cycle, + threshold_block); /* Don't pass in an lsn greater than the lsn of the last * log record known to be on disk. */ - if (XFS_LSN_CMP_ARCH(threshold_lsn, log->l_last_sync_lsn, ARCH_NOCONVERT) > 0) + if (XFS_LSN_CMP(threshold_lsn, log->l_last_sync_lsn) > 0) threshold_lsn = log->l_last_sync_lsn; } GRANT_UNLOCK(log, s); @@ -1435,7 +1435,7 @@ bp = iclog->ic_bp; ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long)1); XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)2); - XFS_BUF_SET_ADDR(bp, BLOCK_LSN(iclog->ic_header.h_lsn, ARCH_CONVERT)); + XFS_BUF_SET_ADDR(bp, BLOCK_LSN(INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT))); XFS_STATS_ADD(xs_log_blocks, BTOBB(count)); @@ -1728,9 +1728,9 @@ logop_head = (xlog_op_header_t *)ptr; INT_SET(logop_head->oh_tid, ARCH_CONVERT, ticket->t_tid); logop_head->oh_clientid = ticket->t_clientid; - INT_ZERO(logop_head->oh_len, ARCH_CONVERT); + logop_head->oh_len = 0; logop_head->oh_flags = XLOG_START_TRANS; - INT_ZERO(logop_head->oh_res2, ARCH_CONVERT); + logop_head->oh_res2 = 0; ticket->t_flags &= ~XLOG_TIC_INITED; /* clear bit */ record_cnt++; @@ -1742,7 +1742,7 @@ logop_head = (xlog_op_header_t *)ptr; INT_SET(logop_head->oh_tid, ARCH_CONVERT, ticket->t_tid); logop_head->oh_clientid = ticket->t_clientid; - INT_ZERO(logop_head->oh_res2, ARCH_CONVERT); + logop_head->oh_res2 = 0; /* header copied directly */ xlog_write_adv_cnt(ptr, len, log_offset, sizeof(xlog_op_header_t)); @@ -1888,10 +1888,10 @@ */ changed = 2; } - INT_ZERO(iclog->ic_header.h_num_logops, ARCH_CONVERT); + iclog->ic_header.h_num_logops = 0; memset(iclog->ic_header.h_cycle_data, 0, sizeof(iclog->ic_header.h_cycle_data)); - INT_ZERO(iclog->ic_header.h_lsn, ARCH_CONVERT); + iclog->ic_header.h_lsn = 0; } else if (iclog->ic_state == XLOG_STATE_ACTIVE) /* do nothing */; else @@ -1948,7 +1948,7 @@ if (!(lsn_log->ic_state & (XLOG_STATE_ACTIVE|XLOG_STATE_DIRTY))) { lsn = INT_GET(lsn_log->ic_header.h_lsn, ARCH_CONVERT); if ((lsn && !lowest_lsn) || - (XFS_LSN_CMP_ARCH(lsn, lowest_lsn, ARCH_NOCONVERT) < 0)) { + (XFS_LSN_CMP(lsn, lowest_lsn) < 0)) { lowest_lsn = lsn; } } @@ -2049,10 +2049,9 @@ lowest_lsn = xlog_get_lowest_lsn(log); if (lowest_lsn && ( - XFS_LSN_CMP_ARCH( + XFS_LSN_CMP( lowest_lsn, - INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT), - ARCH_NOCONVERT + INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT) )<0)) { iclog = iclog->ic_next; continue; /* Leave this iclog for @@ -2068,10 +2067,9 @@ * No one else can be here except us. */ s = GRANT_LOCK(log); - ASSERT(XFS_LSN_CMP_ARCH( + ASSERT(XFS_LSN_CMP( log->l_last_sync_lsn, - INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT), - ARCH_NOCONVERT + INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT) )<=0); log->l_last_sync_lsn = INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT); GRANT_UNLOCK(log, s); @@ -2285,7 +2283,7 @@ if (log_offset == 0) { ticket->t_curr_res -= log->l_iclog_hsize; INT_SET(head->h_cycle, ARCH_CONVERT, log->l_curr_cycle); - ASSIGN_LSN(head->h_lsn, log, ARCH_CONVERT); + ASSIGN_LSN(head->h_lsn, log); ASSERT(log->l_curr_block >= 0); } @@ -2427,9 +2425,9 @@ * Otherwise, make sure that the cycles differ by exactly one and * check the byte count. */ - if (CYCLE_LSN(tail_lsn, ARCH_NOCONVERT) != log->l_grant_write_cycle) { - ASSERT(log->l_grant_write_cycle-1 == CYCLE_LSN(tail_lsn, ARCH_NOCONVERT)); - ASSERT(log->l_grant_write_bytes <= BBTOB(BLOCK_LSN(tail_lsn, ARCH_NOCONVERT))); + if (CYCLE_LSN(tail_lsn) != log->l_grant_write_cycle) { + ASSERT(log->l_grant_write_cycle-1 == CYCLE_LSN(tail_lsn)); + ASSERT(log->l_grant_write_bytes <= BBTOB(BLOCK_LSN(tail_lsn))); } #endif xlog_trace_loggrant(log, tic, "xlog_grant_log_space: exit"); @@ -2560,9 +2558,9 @@ XLOG_GRANT_ADD_SPACE(log, need_bytes, 'w'); /* we've got enough space */ #ifdef DEBUG tail_lsn = log->l_tail_lsn; - if (CYCLE_LSN(tail_lsn, ARCH_NOCONVERT) != log->l_grant_write_cycle) { - ASSERT(log->l_grant_write_cycle-1 == CYCLE_LSN(tail_lsn, ARCH_NOCONVERT)); - ASSERT(log->l_grant_write_bytes <= BBTOB(BLOCK_LSN(tail_lsn, ARCH_NOCONVERT))); + if (CYCLE_LSN(tail_lsn) != log->l_grant_write_cycle) { + ASSERT(log->l_grant_write_cycle-1 == CYCLE_LSN(tail_lsn)); + ASSERT(log->l_grant_write_bytes <= BBTOB(BLOCK_LSN(tail_lsn))); } #endif @@ -3269,18 +3267,18 @@ { int blocks; - if (CYCLE_LSN(tail_lsn, ARCH_NOCONVERT) == log->l_prev_cycle) { + if (CYCLE_LSN(tail_lsn) == log->l_prev_cycle) { blocks = - log->l_logBBsize - (log->l_prev_block - BLOCK_LSN(tail_lsn, ARCH_NOCONVERT)); + log->l_logBBsize - (log->l_prev_block - BLOCK_LSN(tail_lsn)); if (blocks < BTOBB(iclog->ic_offset)+BTOBB(log->l_iclog_hsize)) xlog_panic("xlog_verify_tail_lsn: ran out of log space"); } else { - ASSERT(CYCLE_LSN(tail_lsn, ARCH_NOCONVERT)+1 == log->l_prev_cycle); + ASSERT(CYCLE_LSN(tail_lsn)+1 == log->l_prev_cycle); - if (BLOCK_LSN(tail_lsn, ARCH_NOCONVERT) == log->l_prev_block) + if (BLOCK_LSN(tail_lsn) == log->l_prev_block) xlog_panic("xlog_verify_tail_lsn: tail wrapped"); - blocks = BLOCK_LSN(tail_lsn, ARCH_NOCONVERT) - log->l_prev_block; + blocks = BLOCK_LSN(tail_lsn) - log->l_prev_block; if (blocks < BTOBB(iclog->ic_offset) + 1) xlog_panic("xlog_verify_tail_lsn: ran out of log space"); } diff -Nru a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h --- a/fs/xfs/xfs_log.h 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_log.h 2005-03-30 16:58:50 -08:00 @@ -32,20 +32,12 @@ #ifndef __XFS_LOG_H__ #define __XFS_LOG_H__ -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define LSN_FIELD_CYCLE(arch) (((arch)==ARCH_NOCONVERT)?1:0) -#define LSN_FIELD_BLOCK(arch) (((arch)==ARCH_NOCONVERT)?0:1) -#else -#define LSN_FIELD_CYCLE(arch) (0) -#define LSN_FIELD_BLOCK(arch) (1) -#endif - /* get lsn fields */ -#define CYCLE_LSN(lsn,arch) (INT_GET(((uint *)&(lsn))[LSN_FIELD_CYCLE(arch)], arch)) -#define BLOCK_LSN(lsn,arch) (INT_GET(((uint *)&(lsn))[LSN_FIELD_BLOCK(arch)], arch)) +#define CYCLE_LSN(lsn) ((uint)((lsn)>>32)) +#define BLOCK_LSN(lsn) ((uint)(lsn)) /* this is used in a spot where we might otherwise double-endian-flip */ -#define CYCLE_LSN_NOCONV(lsn,arch) (((uint *)&(lsn))[LSN_FIELD_CYCLE(arch)]) +#define CYCLE_LSN_DISK(lsn) (((uint *)&(lsn))[0]) #ifdef __KERNEL__ /* @@ -58,21 +50,18 @@ #else __inline__ #endif -xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2, xfs_arch_t arch) +xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) { - if (CYCLE_LSN(lsn1, arch) != CYCLE_LSN(lsn2, arch)) - return (CYCLE_LSN(lsn1, arch)l_curr_cycle,(log)->l_curr_block,arch); +#define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \ + { \ + INT_SET(((uint *)&(lsn))[0], ARCH_CONVERT, (cycle)); \ + INT_SET(((uint *)&(lsn))[1], ARCH_CONVERT, (block)); \ + } +#define ASSIGN_LSN(lsn,log) \ + ASSIGN_ANY_LSN_DISK(lsn,(log)->l_curr_cycle,(log)->l_curr_block); #define XLOG_SET(f,b) (((f) & (b)) == (b)) diff -Nru a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c --- a/fs/xfs/xfs_log_recover.c 2005-03-30 16:58:49 -08:00 +++ b/fs/xfs/xfs_log_recover.c 2005-03-30 16:58:49 -08:00 @@ -873,7 +873,7 @@ /* find blk_no of tail of log */ rhead = (xlog_rec_header_t *)offset; - *tail_blk = BLOCK_LSN(rhead->h_tail_lsn, ARCH_CONVERT); + *tail_blk = BLOCK_LSN(INT_GET(rhead->h_tail_lsn, ARCH_CONVERT)); /* * Reset log values according to the state of the log when we @@ -940,10 +940,10 @@ * log records will point recovery to after the * current unmount record. */ - ASSIGN_ANY_LSN(log->l_tail_lsn, log->l_curr_cycle, - after_umount_blk, ARCH_NOCONVERT); - ASSIGN_ANY_LSN(log->l_last_sync_lsn, log->l_curr_cycle, - after_umount_blk, ARCH_NOCONVERT); + ASSIGN_ANY_LSN_HOST(log->l_tail_lsn, log->l_curr_cycle, + after_umount_blk); + ASSIGN_ANY_LSN_HOST(log->l_last_sync_lsn, log->l_curr_cycle, + after_umount_blk); *tail_blk = after_umount_blk; } } @@ -1110,8 +1110,8 @@ INT_SET(recp->h_cycle, ARCH_CONVERT, cycle); INT_SET(recp->h_version, ARCH_CONVERT, XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb) ? 2 : 1); - ASSIGN_ANY_LSN(recp->h_lsn, cycle, block, ARCH_CONVERT); - ASSIGN_ANY_LSN(recp->h_tail_lsn, tail_cycle, tail_block, ARCH_CONVERT); + ASSIGN_ANY_LSN_DISK(recp->h_lsn, cycle, block); + ASSIGN_ANY_LSN_DISK(recp->h_tail_lsn, tail_cycle, tail_block); INT_SET(recp->h_fmt, ARCH_CONVERT, XLOG_FMT); memcpy(&recp->h_fs_uuid, &log->l_mp->m_sb.sb_uuid, sizeof(uuid_t)); } @@ -1217,8 +1217,8 @@ int distance; int error; - tail_cycle = CYCLE_LSN(tail_lsn, ARCH_NOCONVERT); - tail_block = BLOCK_LSN(tail_lsn, ARCH_NOCONVERT); + tail_cycle = CYCLE_LSN(tail_lsn); + tail_block = BLOCK_LSN(tail_lsn); head_cycle = log->l_curr_cycle; head_block = log->l_curr_block; @@ -2047,11 +2047,11 @@ errs++; } - if (! errs && !INT_ISZERO(ddq->d_id, ARCH_CONVERT)) { + if (!errs && ddq->d_id) { if (INT_GET(ddq->d_blk_softlimit, ARCH_CONVERT) && INT_GET(ddq->d_bcount, ARCH_CONVERT) >= INT_GET(ddq->d_blk_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(ddq->d_btimer, ARCH_CONVERT)) { + if (!ddq->d_btimer) { if (flags & XFS_QMOPT_DOWARN) cmn_err(CE_ALERT, "%s : Dquot ID 0x%x (0x%p) " @@ -2064,7 +2064,7 @@ if (INT_GET(ddq->d_ino_softlimit, ARCH_CONVERT) && INT_GET(ddq->d_icount, ARCH_CONVERT) >= INT_GET(ddq->d_ino_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(ddq->d_itimer, ARCH_CONVERT)) { + if (!ddq->d_itimer) { if (flags & XFS_QMOPT_DOWARN) cmn_err(CE_ALERT, "%s : Dquot ID 0x%x (0x%p) " @@ -2077,7 +2077,7 @@ if (INT_GET(ddq->d_rtb_softlimit, ARCH_CONVERT) && INT_GET(ddq->d_rtbcount, ARCH_CONVERT) >= INT_GET(ddq->d_rtb_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(ddq->d_rtbtimer, ARCH_CONVERT)) { + if (!ddq->d_rtbtimer) { if (flags & XFS_QMOPT_DOWARN) cmn_err(CE_ALERT, "%s : Dquot ID 0x%x (0x%p) " @@ -2452,8 +2452,8 @@ /* The core is in in-core format */ xfs_xlate_dinode_core((xfs_caddr_t)&dip->di_core, - (xfs_dinode_core_t*)item->ri_buf[1].i_addr, - -1, ARCH_CONVERT); + (xfs_dinode_core_t*)item->ri_buf[1].i_addr, -1); + /* the rest is in on-disk format */ if (item->ri_buf[1].i_len > sizeof(xfs_dinode_core_t)) { memcpy((xfs_caddr_t) dip + sizeof(xfs_dinode_core_t), @@ -3395,7 +3395,7 @@ xlog_pack_data_checksum(log, iclog, size); - cycle_lsn = CYCLE_LSN_NOCONV(iclog->ic_header.h_lsn, ARCH_CONVERT); + cycle_lsn = CYCLE_LSN_DISK(iclog->ic_header.h_lsn); dp = iclog->ic_datap; for (i = 0; i < BTOBB(size) && @@ -3438,7 +3438,7 @@ up++; } if (chksum != INT_GET(rhead->h_chksum, ARCH_CONVERT)) { - if (!INT_ISZERO(rhead->h_chksum, ARCH_CONVERT) || + if (rhead->h_chksum || ((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) { cmn_err(CE_DEBUG, "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)", @@ -3501,7 +3501,7 @@ return XFS_ERROR(EFSCORRUPTED); } if (unlikely( - (INT_ISZERO(rhead->h_version, ARCH_CONVERT) || + (!rhead->h_version || (INT_GET(rhead->h_version, ARCH_CONVERT) & (~XLOG_VERSION_OKBITS)) != 0))) { xlog_warn("XFS: %s: unrecognised log version (%d).", @@ -3894,7 +3894,7 @@ /* Convert superblock from on-disk format */ sbp = &log->l_mp->m_sb; - xfs_xlatesb(XFS_BUF_TO_SBP(bp), sbp, 1, ARCH_CONVERT, XFS_SB_ALL_BITS); + xfs_xlatesb(XFS_BUF_TO_SBP(bp), sbp, 1, XFS_SB_ALL_BITS); ASSERT(sbp->sb_magicnum == XFS_SB_MAGIC); ASSERT(XFS_SB_GOOD_VERSION(sbp)); xfs_buf_relse(bp); @@ -4073,7 +4073,7 @@ sbbp = xfs_getsb(mp, 0); #ifdef XFS_LOUD_RECOVERY sbp = &mp->m_sb; - xfs_xlatesb(XFS_BUF_TO_SBP(sbbp), sbp, 1, ARCH_CONVERT, XFS_SB_ALL_BITS); + xfs_xlatesb(XFS_BUF_TO_SBP(sbbp), sbp, 1, XFS_SB_ALL_BITS); cmn_err(CE_NOTE, "xlog_recover_check_summary: sb_icount %Lu itotal %Lu", sbp->sb_icount, itotal); diff -Nru a/fs/xfs/xfs_macros.c b/fs/xfs/xfs_macros.c --- a/fs/xfs/xfs_macros.c 2005-03-30 16:58:51 -08:00 +++ b/fs/xfs/xfs_macros.c 2005-03-30 16:58:51 -08:00 @@ -705,9 +705,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_ASIZE) int -xfs_cfork_asize_arch(xfs_dinode_core_t *dcp, xfs_mount_t *mp, xfs_arch_t arch) +xfs_cfork_asize_disk(xfs_dinode_core_t *dcp, xfs_mount_t *mp) { - return XFS_CFORK_ASIZE_ARCH(dcp, mp, arch); + return XFS_CFORK_ASIZE_DISK(dcp, mp); } int xfs_cfork_asize(xfs_dinode_core_t *dcp, xfs_mount_t *mp) @@ -718,9 +718,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_BOFF) int -xfs_cfork_boff_arch(xfs_dinode_core_t *dcp, xfs_arch_t arch) +xfs_cfork_boff_disk(xfs_dinode_core_t *dcp) { - return XFS_CFORK_BOFF_ARCH(dcp, arch); + return XFS_CFORK_BOFF_DISK(dcp); } int xfs_cfork_boff(xfs_dinode_core_t *dcp) @@ -731,9 +731,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_DSIZE) int -xfs_cfork_dsize_arch(xfs_dinode_core_t *dcp, xfs_mount_t *mp, xfs_arch_t arch) +xfs_cfork_dsize_disk(xfs_dinode_core_t *dcp, xfs_mount_t *mp) { - return XFS_CFORK_DSIZE_ARCH(dcp, mp, arch); + return XFS_CFORK_DSIZE_DISK(dcp, mp); } int xfs_cfork_dsize(xfs_dinode_core_t *dcp, xfs_mount_t *mp) @@ -744,11 +744,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_FMT_SET) void -xfs_cfork_fmt_set_arch(xfs_dinode_core_t *dcp, int w, int n, xfs_arch_t arch) -{ - XFS_CFORK_FMT_SET_ARCH(dcp, w, n, arch); -} -void xfs_cfork_fmt_set(xfs_dinode_core_t *dcp, int w, int n) { XFS_CFORK_FMT_SET(dcp, w, n); @@ -757,11 +752,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_FORMAT) int -xfs_cfork_format_arch(xfs_dinode_core_t *dcp, int w, xfs_arch_t arch) -{ - return XFS_CFORK_FORMAT_ARCH(dcp, w, arch); -} -int xfs_cfork_format(xfs_dinode_core_t *dcp, int w) { return XFS_CFORK_FORMAT(dcp, w); @@ -770,11 +760,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_NEXT_SET) void -xfs_cfork_next_set_arch(xfs_dinode_core_t *dcp, int w, int n, xfs_arch_t arch) -{ - XFS_CFORK_NEXT_SET_ARCH(dcp, w, n, arch); -} -void xfs_cfork_next_set(xfs_dinode_core_t *dcp, int w, int n) { XFS_CFORK_NEXT_SET(dcp, w, n); @@ -783,9 +768,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_NEXTENTS) int -xfs_cfork_nextents_arch(xfs_dinode_core_t *dcp, int w, xfs_arch_t arch) +xfs_cfork_nextents_disk(xfs_dinode_core_t *dcp, int w) { - return XFS_CFORK_NEXTENTS_ARCH(dcp, w, arch); + return XFS_CFORK_NEXTENTS_DISK(dcp, w); } int xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w) @@ -796,9 +781,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_Q) int -xfs_cfork_q_arch(xfs_dinode_core_t *dcp, xfs_arch_t arch) +xfs_cfork_q_disk(xfs_dinode_core_t *dcp) { - return XFS_CFORK_Q_ARCH(dcp, arch); + return XFS_CFORK_Q_DISK(dcp); } int xfs_cfork_q(xfs_dinode_core_t *dcp) @@ -809,9 +794,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_CFORK_SIZE) int -xfs_cfork_size_arch(xfs_dinode_core_t *dcp, xfs_mount_t *mp, int w, xfs_arch_t arch) +xfs_cfork_size_disk(xfs_dinode_core_t *dcp, xfs_mount_t *mp, int w) { - return XFS_CFORK_SIZE_ARCH(dcp, mp, w, arch); + return XFS_CFORK_SIZE_DISK(dcp, mp, w); } int xfs_cfork_size(xfs_dinode_core_t *dcp, xfs_mount_t *mp, int w) @@ -896,11 +881,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_APTR) char * -xfs_dfork_aptr_arch(xfs_dinode_t *dip, xfs_arch_t arch) -{ - return XFS_DFORK_APTR_ARCH(dip, arch); -} -char * xfs_dfork_aptr(xfs_dinode_t *dip) { return XFS_DFORK_APTR(dip); @@ -909,11 +889,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_ASIZE) int -xfs_dfork_asize_arch(xfs_dinode_t *dip, xfs_mount_t *mp, xfs_arch_t arch) -{ - return XFS_DFORK_ASIZE_ARCH(dip, mp, arch); -} -int xfs_dfork_asize(xfs_dinode_t *dip, xfs_mount_t *mp) { return XFS_DFORK_ASIZE(dip, mp); @@ -922,11 +897,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_BOFF) int -xfs_dfork_boff_arch(xfs_dinode_t *dip, xfs_arch_t arch) -{ - return XFS_DFORK_BOFF_ARCH(dip, arch); -} -int xfs_dfork_boff(xfs_dinode_t *dip) { return XFS_DFORK_BOFF(dip); @@ -935,11 +905,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_DPTR) char * -xfs_dfork_dptr_arch(xfs_dinode_t *dip, xfs_arch_t arch) -{ - return XFS_DFORK_DPTR_ARCH(dip, arch); -} -char * xfs_dfork_dptr(xfs_dinode_t *dip) { return XFS_DFORK_DPTR(dip); @@ -948,63 +913,14 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_DSIZE) int -xfs_dfork_dsize_arch(xfs_dinode_t *dip, xfs_mount_t *mp, xfs_arch_t arch) -{ - return XFS_DFORK_DSIZE_ARCH(dip, mp, arch); -} -int xfs_dfork_dsize(xfs_dinode_t *dip, xfs_mount_t *mp) { return XFS_DFORK_DSIZE(dip, mp); } #endif -#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_FMT_SET) -void -xfs_dfork_fmt_set_arch(xfs_dinode_t *dip, int w, int n, xfs_arch_t arch) -{ - XFS_DFORK_FMT_SET_ARCH(dip, w, n, arch); -} -void -xfs_dfork_fmt_set(xfs_dinode_t *dip, int w, int n) -{ - XFS_DFORK_FMT_SET(dip, w, n); -} -#endif - -#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_FORMAT) -int -xfs_dfork_format_arch(xfs_dinode_t *dip, int w, xfs_arch_t arch) -{ - return XFS_DFORK_FORMAT_ARCH(dip, w, arch); -} -int -xfs_dfork_format(xfs_dinode_t *dip, int w) -{ - return XFS_DFORK_FORMAT(dip, w); -} -#endif - -#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_NEXT_SET) -void -xfs_dfork_next_set_arch(xfs_dinode_t *dip, int w, int n, xfs_arch_t arch) -{ - XFS_DFORK_NEXT_SET_ARCH(dip, w, n, arch); -} -void -xfs_dfork_next_set(xfs_dinode_t *dip, int w, int n) -{ - XFS_DFORK_NEXT_SET(dip, w, n); -} -#endif - #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_NEXTENTS) int -xfs_dfork_nextents_arch(xfs_dinode_t *dip, int w, xfs_arch_t arch) -{ - return XFS_DFORK_NEXTENTS_ARCH(dip, w, arch); -} -int xfs_dfork_nextents(xfs_dinode_t *dip, int w) { return XFS_DFORK_NEXTENTS(dip, w); @@ -1013,11 +929,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_PTR) char * -xfs_dfork_ptr_arch(xfs_dinode_t *dip, int w, xfs_arch_t arch) -{ - return XFS_DFORK_PTR_ARCH(dip, w, arch); -} -char * xfs_dfork_ptr(xfs_dinode_t *dip, int w) { return XFS_DFORK_PTR(dip, w); @@ -1026,11 +937,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_Q) int -xfs_dfork_q_arch(xfs_dinode_t *dip, xfs_arch_t arch) -{ - return XFS_DFORK_Q_ARCH(dip, arch); -} -int xfs_dfork_q(xfs_dinode_t *dip) { return XFS_DFORK_Q(dip); @@ -1039,11 +945,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DFORK_SIZE) int -xfs_dfork_size_arch(xfs_dinode_t *dip, xfs_mount_t *mp, int w, xfs_arch_t arch) -{ - return XFS_DFORK_SIZE_ARCH(dip, mp, w, arch); -} -int xfs_dfork_size(xfs_dinode_t *dip, xfs_mount_t *mp, int w) { return XFS_DFORK_SIZE(dip, mp, w); @@ -1108,11 +1009,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_GET_DIRINO) void -xfs_dir_sf_get_dirino_arch(xfs_dir_ino_t *from, xfs_ino_t *to, xfs_arch_t arch) -{ - XFS_DIR_SF_GET_DIRINO_ARCH(from, to, arch); -} -void xfs_dir_sf_get_dirino(xfs_dir_ino_t *from, xfs_ino_t *to) { XFS_DIR_SF_GET_DIRINO(from, to); @@ -1129,11 +1025,6 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR_SF_PUT_DIRINO) void -xfs_dir_sf_put_dirino_arch(xfs_ino_t *from, xfs_dir_ino_t *to, xfs_arch_t arch) -{ - XFS_DIR_SF_PUT_DIRINO_ARCH(from, to, arch); -} -void xfs_dir_sf_put_dirino(xfs_ino_t *from, xfs_dir_ino_t *to) { XFS_DIR_SF_PUT_DIRINO(from, to); @@ -1142,9 +1033,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_BLOCK_LEAF_P) xfs_dir2_leaf_entry_t * -xfs_dir2_block_leaf_p_arch(xfs_dir2_block_tail_t *btp, xfs_arch_t arch) +xfs_dir2_block_leaf_p(xfs_dir2_block_tail_t *btp) { - return XFS_DIR2_BLOCK_LEAF_P_ARCH(btp,arch); + return XFS_DIR2_BLOCK_LEAF_P(btp); } #endif @@ -1223,9 +1114,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_DATA_UNUSED_TAG_P) xfs_dir2_data_off_t * -xfs_dir2_data_unused_tag_p_arch(xfs_dir2_data_unused_t *dup, xfs_arch_t arch) +xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup) { - return XFS_DIR2_DATA_UNUSED_TAG_P_ARCH(dup,arch); + return XFS_DIR2_DATA_UNUSED_TAG_P(dup); } #endif @@ -1298,9 +1189,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_LEAF_BESTS_P) xfs_dir2_data_off_t * -xfs_dir2_leaf_bests_p_arch(xfs_dir2_leaf_tail_t *ltp, xfs_arch_t arch) +xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp) { - return XFS_DIR2_LEAF_BESTS_P_ARCH(ltp, arch); + return XFS_DIR2_LEAF_BESTS_P(ltp); } #endif @@ -1346,17 +1237,17 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_GET_INUMBER) xfs_intino_t -xfs_dir2_sf_get_inumber_arch(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from, xfs_arch_t arch) +xfs_dir2_sf_get_inumber(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from) { - return XFS_DIR2_SF_GET_INUMBER_ARCH(sfp, from, arch); + return XFS_DIR2_SF_GET_INUMBER(sfp, from); } #endif #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_GET_OFFSET) xfs_dir2_data_aoff_t -xfs_dir2_sf_get_offset_arch(xfs_dir2_sf_entry_t *sfep, xfs_arch_t arch) +xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep) { - return XFS_DIR2_SF_GET_OFFSET_ARCH(sfep, arch); + return XFS_DIR2_SF_GET_OFFSET(sfep); } #endif @@ -1386,17 +1277,17 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_PUT_INUMBER) void -xfs_dir2_sf_put_inumber_arch(xfs_dir2_sf_t *sfp, xfs_ino_t *from, xfs_dir2_inou_t *to, xfs_arch_t arch) +xfs_dir2_sf_put_inumber(xfs_dir2_sf_t *sfp, xfs_ino_t *from, xfs_dir2_inou_t *to) { - XFS_DIR2_SF_PUT_INUMBER_ARCH(sfp, from, to, arch); + XFS_DIR2_SF_PUT_INUMBER(sfp, from, to); } #endif #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_DIR2_SF_PUT_OFFSET) void -xfs_dir2_sf_put_offset_arch(xfs_dir2_sf_entry_t *sfep, xfs_dir2_data_aoff_t off, xfs_arch_t arch) +xfs_dir2_sf_put_offset(xfs_dir2_sf_entry_t *sfep, xfs_dir2_data_aoff_t off) { - XFS_DIR2_SF_PUT_OFFSET_ARCH(sfep, off, arch); + XFS_DIR2_SF_PUT_OFFSET(sfep, off); } #endif @@ -1755,17 +1646,17 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_CLR_FREE) void -xfs_inobt_clr_free(xfs_inobt_rec_t *rp, int i, xfs_arch_t arch) +xfs_inobt_clr_free(xfs_inobt_rec_t *rp, int i) { - XFS_INOBT_CLR_FREE(rp, i, arch); + XFS_INOBT_CLR_FREE(rp, i); } #endif #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_IS_FREE) int -xfs_inobt_is_free(xfs_inobt_rec_t *rp, int i, xfs_arch_t arch) +xfs_inobt_is_free(xfs_inobt_rec_t *rp, int i) { - return XFS_INOBT_IS_FREE(rp, i, arch); + return XFS_INOBT_IS_FREE(rp, i); } #endif @@ -1821,9 +1712,9 @@ #if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_INOBT_SET_FREE) void -xfs_inobt_set_free(xfs_inobt_rec_t *rp, int i, xfs_arch_t arch) +xfs_inobt_set_free(xfs_inobt_rec_t *rp, int i) { - XFS_INOBT_SET_FREE(rp, i, arch); + XFS_INOBT_SET_FREE(rp, i); } #endif diff -Nru a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c --- a/fs/xfs/xfs_mount.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_mount.c 2005-03-30 16:58:48 -08:00 @@ -65,8 +65,6 @@ STATIC int xfs_uuid_mount(xfs_mount_t *); STATIC void xfs_uuid_unmount(xfs_mount_t *mp); -void xfs_xlatesb(void *, xfs_sb_t *, int, xfs_arch_t, __int64_t); - static struct { short offset; short type; /* 0 = integer @@ -387,7 +385,6 @@ * sb - a superblock * dir - conversion direction: <0 - convert sb to buf * >0 - convert buf to sb - * arch - architecture to read/write from/to buf * fields - which fields to copy (bitmask) */ void @@ -395,7 +392,6 @@ void *data, xfs_sb_t *sb, int dir, - xfs_arch_t arch, __int64_t fields) { xfs_caddr_t buf_ptr; @@ -420,9 +416,7 @@ ASSERT(xfs_sb_info[f].type == 0 || xfs_sb_info[f].type == 1); - if (arch == ARCH_NOCONVERT || - size == 1 || - xfs_sb_info[f].type == 1) { + if (size == 1 || xfs_sb_info[f].type == 1) { if (dir > 0) { memcpy(mem_ptr + first, buf_ptr + first, size); } else { @@ -433,16 +427,16 @@ case 2: INT_XLATE(*(__uint16_t*)(buf_ptr+first), *(__uint16_t*)(mem_ptr+first), - dir, arch); + dir, ARCH_CONVERT); break; case 4: INT_XLATE(*(__uint32_t*)(buf_ptr+first), *(__uint32_t*)(mem_ptr+first), - dir, arch); + dir, ARCH_CONVERT); break; case 8: INT_XLATE(*(__uint64_t*)(buf_ptr+first), - *(__uint64_t*)(mem_ptr+first), dir, arch); + *(__uint64_t*)(mem_ptr+first), dir, ARCH_CONVERT); break; default: ASSERT(0); @@ -493,8 +487,7 @@ * But first do some basic consistency checking. */ sbp = XFS_BUF_TO_SBP(bp); - xfs_xlatesb(XFS_BUF_PTR(bp), &(mp->m_sb), 1, - ARCH_CONVERT, XFS_SB_ALL_BITS); + xfs_xlatesb(XFS_BUF_PTR(bp), &(mp->m_sb), 1, XFS_SB_ALL_BITS); error = xfs_mount_validate_sb(mp, &(mp->m_sb)); if (error) { @@ -1227,7 +1220,7 @@ /* translate/copy */ - xfs_xlatesb(XFS_BUF_PTR(bp), &(mp->m_sb), -1, ARCH_CONVERT, fields); + xfs_xlatesb(XFS_BUF_PTR(bp), &(mp->m_sb), -1, fields); /* find modified range */ diff -Nru a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h --- a/fs/xfs/xfs_mount.h 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_mount.h 2005-03-30 16:58:50 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -418,6 +418,8 @@ #define XFS_MOUNT_IDELETE 0x00040000 /* delete empty inode clusters*/ #define XFS_MOUNT_SWALLOC 0x00080000 /* turn on stripe width * allocation */ +#define XFS_MOUNT_IHASHSIZE 0x00100000 /* inode hash table size */ +#define XFS_MOUNT_DIRSYNC 0x00200000 /* synchronous directory ops */ /* * Default minimum read and write sizes. @@ -554,8 +556,7 @@ extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int); extern int xfs_syncsub(xfs_mount_t *, int, int, int *); extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t); -extern void xfs_xlatesb(void *, struct xfs_sb *, int, xfs_arch_t, - __int64_t); +extern void xfs_xlatesb(void *, struct xfs_sb *, int, __int64_t); extern struct vfsops xfs_vfsops; extern struct vnodeops xfs_vnodeops; diff -Nru a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c --- a/fs/xfs/xfs_rename.c 2005-03-30 16:58:48 -08:00 +++ b/fs/xfs/xfs_rename.c 2005-03-30 16:58:48 -08:00 @@ -589,7 +589,7 @@ * rename transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } diff -Nru a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c --- a/fs/xfs/xfs_vfsops.c 2005-03-30 16:58:47 -08:00 +++ b/fs/xfs/xfs_vfsops.c 2005-03-30 16:58:47 -08:00 @@ -1,7 +1,7 @@ /* * XFS filesystem operations. * - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -258,11 +258,6 @@ mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP); strcpy(mp->m_fsname, ap->fsname); - /* - * Pull in the 'wsync' and 'ino64' mount options before we do the real - * work of mounting and recovery. The arg pointer will - * be NULL when we are being called from the root mount code. - */ if (ap->flags & XFSMNT_WSYNC) mp->m_flags |= XFS_MOUNT_WSYNC; #if XFS_BIG_INUMS @@ -302,9 +297,16 @@ mp->m_flags |= XFS_MOUNT_DFLT_IOSIZE; mp->m_readio_log = mp->m_writeio_log = ap->iosizelog; } + + if (ap->flags & XFSMNT_IHASHSIZE) + mp->m_flags |= XFS_MOUNT_IHASHSIZE; + if (ap->flags & XFSMNT_IDELETE) mp->m_flags |= XFS_MOUNT_IDELETE; + if (ap->flags & XFSMNT_DIRSYNC) + mp->m_flags |= XFS_MOUNT_DIRSYNC; + /* * no recovery flag requires a read-only mount */ @@ -1742,6 +1744,7 @@ this_char); return EINVAL; } + args->flags |= XFSMNT_IHASHSIZE; args->ihashsize = simple_strtoul(value, &eov, 10); } else if (!strcmp(this_char, MNTOPT_WSYNC)) { args->flags |= XFSMNT_WSYNC; @@ -1869,6 +1872,9 @@ if (mp->m_flags & xfs_infop->flag) seq_puts(m, xfs_infop->str); } + + if (mp->m_flags & XFS_MOUNT_IHASHSIZE) + seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", mp->m_ihsize); if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) seq_printf(m, "," MNTOPT_BIOSIZE "=%d", mp->m_writeio_log); diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c --- a/fs/xfs/xfs_vnodeops.c 2005-03-30 16:58:50 -08:00 +++ b/fs/xfs/xfs_vnodeops.c 2005-03-30 16:58:50 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -248,7 +248,7 @@ /* * Convert di_flags to xflags. */ - vap->va_xflags = xfs_dic2xflags(&ip->i_d, ARCH_NOCONVERT); + vap->va_xflags = xfs_ip2xflags(ip); /* * Exit for inode revalidate. See if any of the rest of @@ -1995,7 +1995,7 @@ * create transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } @@ -2492,7 +2492,7 @@ * remove transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } @@ -2704,7 +2704,7 @@ * link transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } @@ -2921,7 +2921,7 @@ * mkdir transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } @@ -3168,7 +3168,7 @@ * rmdir transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } @@ -3520,7 +3520,7 @@ * symlink transaction goes to disk before returning to * the user. */ - if (mp->m_flags & XFS_MOUNT_WSYNC) { + if (mp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) { xfs_trans_set_sync(tp); } diff -Nru a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h --- a/include/asm-alpha/pci.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-alpha/pci.h 2005-03-30 16:58:50 -08:00 @@ -223,6 +223,12 @@ /* Nothing to do. */ } +/* TODO: integrate with include/asm-generic/pci.h ? */ +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + return channel ? 15 : 14; +} + extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *, struct resource *); diff -Nru a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h --- a/include/asm-alpha/pgtable.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-alpha/pgtable.h 2005-03-30 16:58:48 -08:00 @@ -340,6 +340,13 @@ remap_pfn_range(vma, start, pfn, size, prot); \ }) +#define io_remap_pfn_range(vma, start, pfn, size, prot) \ + remap_pfn_range(vma, start, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #define pte_ERROR(e) \ printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) #define pmd_ERROR(e) \ diff -Nru a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h --- a/include/asm-alpha/spinlock.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-alpha/spinlock.h 2005-03-30 16:58:49 -08:00 @@ -15,7 +15,7 @@ */ typedef struct { - volatile unsigned int lock /*__attribute__((aligned(32))) */; + volatile unsigned int lock; #ifdef CONFIG_DEBUG_SPINLOCK int on_cpu; int line_no; @@ -23,40 +23,26 @@ struct task_struct * task; const char *base_file; #endif -#ifdef CONFIG_PREEMPT - unsigned int break_lock; -#endif } spinlock_t; #ifdef CONFIG_DEBUG_SPINLOCK -#define SPIN_LOCK_UNLOCKED (spinlock_t) {0, -1, 0, NULL, NULL, NULL} -#define spin_lock_init(x) \ - ((x)->lock = 0, (x)->on_cpu = -1, (x)->previous = NULL, (x)->task = NULL) +#define SPIN_LOCK_UNLOCKED (spinlock_t){ 0, -1, 0, NULL, NULL, NULL } #else -#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } -#define spin_lock_init(x) ((x)->lock = 0) +#define SPIN_LOCK_UNLOCKED (spinlock_t){ 0 } #endif +#define spin_lock_init(x) do { *(x) = SPIN_LOCK_UNLOCKED; } while(0) #define spin_is_locked(x) ((x)->lock != 0) -#define spin_unlock_wait(x) ({ do { barrier(); } while ((x)->lock); }) -#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) +#define spin_unlock_wait(x) do { barrier(); } while ((x)->lock) #ifdef CONFIG_DEBUG_SPINLOCK extern void _raw_spin_unlock(spinlock_t * lock); extern void debug_spin_lock(spinlock_t * lock, const char *, int); extern int debug_spin_trylock(spinlock_t * lock, const char *, int); - -#define _raw_spin_lock(LOCK) debug_spin_lock(LOCK, __BASE_FILE__, __LINE__) -#define _raw_spin_trylock(LOCK) debug_spin_trylock(LOCK, __BASE_FILE__, __LINE__) - -#define spin_lock_own(LOCK, LOCATION) \ -do { \ - if (!((LOCK)->lock && (LOCK)->on_cpu == smp_processor_id())) \ - printk("%s: called on %d from %p but lock %s on %d\n", \ - LOCATION, smp_processor_id(), \ - __builtin_return_address(0), \ - (LOCK)->lock ? "taken" : "freed", (LOCK)->on_cpu); \ -} while (0) +#define _raw_spin_lock(LOCK) \ + debug_spin_lock(LOCK, __BASE_FILE__, __LINE__) +#define _raw_spin_trylock(LOCK) \ + debug_spin_trylock(LOCK, __BASE_FILE__, __LINE__) #else static inline void _raw_spin_unlock(spinlock_t * lock) { @@ -68,19 +54,16 @@ { long tmp; - /* Use sub-sections to put the actual loop at the end - of this object file's text section so as to perfect - branch prediction. */ __asm__ __volatile__( "1: ldl_l %0,%1\n" - " blbs %0,2f\n" - " or %0,1,%0\n" + " bne %0,2f\n" + " lda %0,1\n" " stl_c %0,%1\n" " beq %0,2f\n" " mb\n" ".subsection 2\n" "2: ldl %0,%1\n" - " blbs %0,2b\n" + " bne %0,2b\n" " br 1b\n" ".previous" : "=&r" (tmp), "=m" (lock->lock) @@ -91,22 +74,29 @@ { return !test_and_set_bit(0, &lock->lock); } - -#define spin_lock_own(LOCK, LOCATION) ((void)0) #endif /* CONFIG_DEBUG_SPINLOCK */ +#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) + /***********************************************************/ typedef struct { - volatile unsigned int write_lock:1, read_counter:31; -#ifdef CONFIG_PREEMPT - unsigned int break_lock; -#endif -} /*__attribute__((aligned(32)))*/ rwlock_t; + volatile unsigned int lock; +} rwlock_t; + +#define RW_LOCK_UNLOCKED (rwlock_t){ 0 } -#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 } +#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) -#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) +static inline int read_can_lock(rwlock_t *lock) +{ + return (lock->lock & 1) == 0; +} + +static inline int write_can_lock(rwlock_t *lock) +{ + return lock->lock == 0; +} #ifdef CONFIG_DEBUG_RWLOCK extern void _raw_write_lock(rwlock_t * lock); @@ -119,7 +109,7 @@ __asm__ __volatile__( "1: ldl_l %1,%0\n" " bne %1,6f\n" - " or $31,1,%1\n" + " lda %1,1\n" " stl_c %1,%0\n" " beq %1,6f\n" " mb\n" @@ -142,7 +132,7 @@ " subl %1,2,%1\n" " stl_c %1,%0\n" " beq %1,6f\n" - "4: mb\n" + " mb\n" ".subsection 2\n" "6: ldl %1,%0\n" " blbs %1,6b\n" @@ -153,6 +143,28 @@ } #endif /* CONFIG_DEBUG_RWLOCK */ +static inline int _raw_read_trylock(rwlock_t * lock) +{ + long regx; + int success; + + __asm__ __volatile__( + "1: ldl_l %1,%0\n" + " lda %2,0\n" + " blbs %1,2f\n" + " subl %1,2,%2\n" + " stl_c %2,%0\n" + " beq %2,6f\n" + "2: mb\n" + ".subsection 2\n" + "6: br 1b\n" + ".previous" + : "=m" (*lock), "=&r" (regx), "=&r" (success) + : "m" (*lock) : "memory"); + + return success; +} + static inline int _raw_write_trylock(rwlock_t * lock) { long regx; @@ -162,10 +174,9 @@ "1: ldl_l %1,%0\n" " lda %2,0\n" " bne %1,2f\n" - " or $31,1,%1\n" - " stl_c %1,%0\n" - " beq %1,6f\n" " lda %2,1\n" + " stl_c %2,%0\n" + " beq %2,6f\n" "2: mb\n" ".subsection 2\n" "6: br 1b\n" @@ -179,7 +190,7 @@ static inline void _raw_write_unlock(rwlock_t * lock) { mb(); - *(volatile int *)lock = 0; + lock->lock = 0; } static inline void _raw_read_unlock(rwlock_t * lock) diff -Nru a/include/asm-alpha/unaligned.h b/include/asm-alpha/unaligned.h --- a/include/asm-alpha/unaligned.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-alpha/unaligned.h 2005-03-30 16:58:48 -08:00 @@ -1,114 +1,6 @@ #ifndef __ALPHA_UNALIGNED_H #define __ALPHA_UNALIGNED_H -/* - * The main single-value unaligned transfer routines. - */ -#define get_unaligned(ptr) \ - ((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr)))) -#define put_unaligned(x,ptr) \ - __put_unaligned((unsigned long)(x), (ptr), sizeof(*(ptr))) - -/* - * This is a silly but good way to make sure that - * the get/put functions are indeed always optimized, - * and that we use the correct sizes. - */ -extern void bad_unaligned_access_length(void) __attribute__((noreturn)); - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -struct __una_u64 { __u64 x __attribute__((packed)); }; -struct __una_u32 { __u32 x __attribute__((packed)); }; -struct __una_u16 { __u16 x __attribute__((packed)); }; - -/* - * Elemental unaligned loads - */ - -extern inline unsigned long __uldq(const unsigned long * r11) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -} - -extern inline unsigned long __uldl(const unsigned int * r11) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -} - -extern inline unsigned long __uldw(const unsigned short * r11) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -} - -/* - * Elemental unaligned stores - */ - -extern inline void __ustq(unsigned long r5, unsigned long * r11) -{ - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -} - -extern inline void __ustl(unsigned long r5, unsigned int * r11) -{ - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -} - -extern inline void __ustw(unsigned long r5, unsigned short * r11) -{ - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -} - -extern inline unsigned long __get_unaligned(const void *ptr, size_t size) -{ - unsigned long val; - switch (size) { - case 1: - val = *(const unsigned char *)ptr; - break; - case 2: - val = __uldw((const unsigned short *)ptr); - break; - case 4: - val = __uldl((const unsigned int *)ptr); - break; - case 8: - val = __uldq((const unsigned long *)ptr); - break; - default: - bad_unaligned_access_length(); - } - return val; -} - -extern inline void __put_unaligned(unsigned long val, void *ptr, size_t size) -{ - switch (size) { - case 1: - *(unsigned char *)ptr = (val); - break; - case 2: - __ustw(val, (unsigned short *)ptr); - break; - case 4: - __ustl(val, (unsigned int *)ptr); - break; - case 8: - __ustq(val, (unsigned long *)ptr); - break; - default: - bad_unaligned_access_length(); - } -} +#include #endif diff -Nru a/include/asm-arm/arch-cl7500/hardware.h b/include/asm-arm/arch-cl7500/hardware.h --- a/include/asm-arm/arch-cl7500/hardware.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-arm/arch-cl7500/hardware.h 2005-03-30 16:58:48 -08:00 @@ -13,6 +13,12 @@ #include #include +#ifdef __ASSEMBLY__ +#define IOMEM(x) x +#else +#define IOMEM(x) ((void __iomem *)(x)) +#endif + /* * What hardware must be present */ @@ -27,7 +33,7 @@ #define IO_START 0x03000000 /* I/O */ #define IO_SIZE 0x01000000 -#define IO_BASE 0xe0000000 +#define IO_BASE IOMEM(0xe0000000) #define ISA_START 0x0c000000 /* ISA */ #define ISA_SIZE 0x00010000 @@ -49,11 +55,11 @@ #define FLUSH_BASE 0xdf000000 -#define VIDC_BASE 0xe0400000 -#define IOMD_BASE 0xe0200000 -#define IOC_BASE 0xe0200000 -#define FLOPPYDMA_BASE 0xe002a000 -#define PCIO_BASE 0xe0010000 +#define VIDC_BASE (void __iomem *)0xe0400000 +#define IOMD_BASE IOMEM(0xe0200000) +#define IOC_BASE IOMEM(0xe0200000) +#define FLOPPYDMA_BASE IOMEM(0xe002a000) +#define PCIO_BASE IOMEM(0xe0010000) #define FLUSH_BASE_PHYS 0x00000000 /* ROM */ @@ -63,4 +69,3 @@ #define ISASLOT_IO 0x80400000 #endif - diff -Nru a/include/asm-arm/arch-imx/hardware.h b/include/asm-arm/arch-imx/hardware.h --- a/include/asm-arm/arch-imx/hardware.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-imx/hardware.h 2005-03-30 16:58:47 -08:00 @@ -26,9 +26,7 @@ #ifndef __ASSEMBLY__ # define __REG(x) (*((volatile u32 *)IO_ADDRESS(x))) -# define __REG2(x,y) \ - ( __builtin_constant_p(y) ? (__REG((x) + (y))) \ - : (*(volatile u32 *)((u32)&__REG(x) + (y))) ) +# define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y))) #endif /* diff -Nru a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h --- a/include/asm-arm/arch-ixp2000/io.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-ixp2000/io.h 2005-03-30 16:58:47 -08:00 @@ -17,20 +17,20 @@ #define IO_SPACE_LIMIT 0xffffffff #define __mem_pci(a) (a) - -/* - * Pick up VMALLOC_END - */ #define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) /* - * IXP2000 does not do proper byte-lane conversion for PCI addresses, - * so we need to override standard functions. + * The IXP2400 before revision B0 asserts byte lanes for PCI I/O + * transactions the other way round (MEM transactions don't have this + * issue), so we need to override the standard functions. B0 and later + * have a bit that can be set to 1 to get the 'proper' behavior, but + * since that isn't available on the A? revisions we just keep doing + * things manually. */ -#define alignb(addr) (void __iomem *)(((unsigned long)addr & ~3) + (3 - ((unsigned long)addr & 3))) -#define alignw(addr) (void __iomem *)(((unsigned long)addr & ~2) + (2 - ((unsigned long)addr & 2))) +#define alignb(addr) (void __iomem *)((unsigned long)addr ^ 3) +#define alignw(addr) (void __iomem *)((unsigned long)addr ^ 2) -#define outb(v,p) __raw_writeb(v,alignb(___io(p))) +#define outb(v,p) __raw_writeb((v),alignb(___io(p))) #define outw(v,p) __raw_writew((v),alignw(___io(p))) #define outl(v,p) __raw_writel((v),___io(p)) @@ -53,8 +53,8 @@ /* * This is an ugly hack but the CS8900 on the 2x01's does not sit in any sort * of "I/O space" and is just direct mapped into a 32-bit-only addressable - * bus. The address space for this bus is such that we can't really easilly - * make it contigous to the PCI I/O address range, and it also does not + * bus. The address space for this bus is such that we can't really easily + * make it contiguous to the PCI I/O address range, and it also does not * need swapping like PCI addresses do (IXDP2x01 is a BE platform). * B/C of this we can't use the standard in/out functions and need to * runtime check if the incoming address is a PCI address or for diff -Nru a/include/asm-arm/arch-ixp2000/irqs.h b/include/asm-arm/arch-ixp2000/irqs.h --- a/include/asm-arm/arch-ixp2000/irqs.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm/arch-ixp2000/irqs.h 2005-03-30 16:58:50 -08:00 @@ -45,12 +45,12 @@ #define IRQ_IXP2000_ME_ATTN 14 #define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */ #define IRQ_IXP2000_THDA0 16 /* thread 0-31A */ -#define IRQ_IXP2000_THDA1 17 /* thread 32-63A */ -#define IRQ_IXP2000_THDA2 18 /* thread 64-95A, IXP2800 only */ +#define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */ +#define IRQ_IXP2000_THDA2 18 /* thread 64-95A */ #define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */ #define IRQ_IXP2000_THDB0 24 /* thread 0-31B */ -#define IRQ_IXP2000_THDB1 25 /* thread 32-63B */ -#define IRQ_IXP2000_THDB2 26 /* thread 64-95B, IXP2800 only */ +#define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */ +#define IRQ_IXP2000_THDB2 26 /* thread 64-95B */ #define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */ /* define generic GPIOs */ diff -Nru a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h 2005-03-30 16:58:47 -08:00 @@ -22,16 +22,21 @@ * Static I/O regions. * * Most of the registers are clumped in 4K regions spread throughout - * the 0xc000000 -> 0xc0100000 address range, but we just map in + * the 0xc0000000 -> 0xc0100000 address range, but we just map in * the whole range using a single 1 MB section instead of small * 4K pages. This has two advantages for us: * * 1) We use only one TLB entry for large number of on-chip I/O devices. * * 2) We can easily set the Section attributes to XCB=101 on the IXP2400 - * as required per erratum #66. + * as required per erratum #66. We accomplish this by using a + * new MT_IXP2000_DEVICE memory type with the bits set as required. * - * CAP stands for CSR Access Proxy + * CAP stands for CSR Access Proxy. + * + * If you change the virtual address of this mapping, please propagate + * the change to arch/arm/kernel/debug.S, which hardcodes the virtual + * address of the UART located in this region. */ #define IXP2000_CAP_PHYS_BASE 0xc0000000 @@ -49,7 +54,10 @@ #define IXP2000_GPIO_VIRT_BASE 0Xfef10000 /* - * Devices outside of the 0xc0000000 -> 0xc0100000 range + * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual + * addresses of the INTCTL and PCI_CSR mappings are hardcoded in + * entry-macro.S, so if you ever change these please propagate + * the change. */ #define IXP2000_INTCTL_PHYS_BASE 0xd6000000 #define IXP2000_INTCTL_VIRT_BASE 0xfee00000 @@ -120,6 +128,30 @@ #define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c) #define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30) #define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34) +#define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60) +#define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64) +#define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68) +#define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c) +#define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80) +#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84) +#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88) +#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c) +#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160) +#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164) +#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168) +#define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c) +#define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180) +#define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184) +#define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188) +#define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208) +#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c) /* * Mask of valid IRQs in the 32-bit IRQ register. We use @@ -202,7 +234,7 @@ #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Centrolfunction bit */ -#define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ +#define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ /* These are from the IRQ register in the PCI ISR register */ #define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */ diff -Nru a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h --- a/include/asm-arm/arch-ixp2000/platform.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-ixp2000/platform.h 2005-03-30 16:58:47 -08:00 @@ -20,7 +20,7 @@ * to on-chip I/O register to not complete fully. What this means is * that if you have a write to on-chip I/O followed by a back-to-back * read or write, the first write will happen twice. OR...if it's - * not a back-to-back trasaction, the read or write will generate + * not a back-to-back transaction, the read or write will generate * incorrect data. * * The official work around for this is to set the on-chip I/O regions diff -Nru a/include/asm-arm/arch-omap/aic23.h b/include/asm-arm/arch-omap/aic23.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-omap/aic23.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,112 @@ +/* + * linux/include/asm-arm/arch-omap/aic23.h + * + * Hardware definitions for TI TLV320AIC23 audio codec + * + * Copyright (C) 2002 RidgeRun, Inc. + * Author: Steve Johnson + * + * 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. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __ASM_ARCH_AIC23_H +#define __ASM_ARCH_AIC23_H + +// Codec TLV320AIC23 +#define LEFT_LINE_VOLUME_ADDR 0x00 +#define RIGHT_LINE_VOLUME_ADDR 0x01 +#define LEFT_CHANNEL_VOLUME_ADDR 0x02 +#define RIGHT_CHANNEL_VOLUME_ADDR 0x03 +#define ANALOG_AUDIO_CONTROL_ADDR 0x04 +#define DIGITAL_AUDIO_CONTROL_ADDR 0x05 +#define POWER_DOWN_CONTROL_ADDR 0x06 +#define DIGITAL_AUDIO_FORMAT_ADDR 0x07 +#define SAMPLE_RATE_CONTROL_ADDR 0x08 +#define DIGITAL_INTERFACE_ACT_ADDR 0x09 +#define RESET_CONTROL_ADDR 0x0F + +// Left (right) line input volume control register +#define LRS_ENABLED 0x0100 +#define LIM_MUTED 0x0080 +#define LIV_DEFAULT 0x0017 +#define LIV_MAX 0x001f +#define LIV_MIN 0x0000 + +// Left (right) channel headphone volume control register +#define LZC_ON 0x0080 +#define LHV_DEFAULT 0x0079 +#define LHV_MAX 0x007f +#define LHV_MIN 0x0000 + +// Analog audio path control register +#define STE_ENABLED 0x0020 +#define DAC_SELECTED 0x0010 +#define BYPASS_ON 0x0008 +#define INSEL_MIC 0x0004 +#define MICM_MUTED 0x0002 +#define MICB_20DB 0x0001 + +// Digital audio path control register +#define DACM_MUTE 0x0008 +#define DEEMP_32K 0x0002 +#define DEEMP_44K 0x0004 +#define DEEMP_48K 0x0006 +#define ADCHP_ON 0x0001 + +// Power control down register +#define DEVICE_POWER_OFF 0x0080 +#define CLK_OFF 0x0040 +#define OSC_OFF 0x0020 +#define OUT_OFF 0x0010 +#define DAC_OFF 0x0008 +#define ADC_OFF 0x0004 +#define MIC_OFF 0x0002 +#define LINE_OFF 0x0001 + +// Digital audio interface register +#define MS_MASTER 0x0040 +#define LRSWAP_ON 0x0020 +#define LRP_ON 0x0010 +#define IWL_16 0x0000 +#define IWL_20 0x0004 +#define IWL_24 0x0008 +#define IWL_32 0x000C +#define FOR_I2S 0x0002 +#define FOR_DSP 0x0003 + +// Sample rate control register +#define CLKOUT_HALF 0x0080 +#define CLKIN_HALF 0x0040 +#define BOSR_384fs 0x0002 // BOSR_272fs when in USB mode +#define USB_CLK_ON 0x0001 +#define SR_MASK 0xf +#define CLKOUT_SHIFT 7 +#define CLKIN_SHIFT 6 +#define SR_SHIFT 2 +#define BOSR_SHIFT 1 + +// Digital interface register +#define ACT_ON 0x0001 + +#define TLV320AIC23ID1 (0x1a) // cs low +#define TLV320AIC23ID2 (0x1b) // cs high + +#endif /* __ASM_ARCH_AIC23_H */ diff -Nru a/include/asm-arm/arch-omap/board-h2.h b/include/asm-arm/arch-omap/board-h2.h --- a/include/asm-arm/arch-omap/board-h2.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-arm/arch-omap/board-h2.h 2005-03-30 16:58:51 -08:00 @@ -21,8 +21,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -32,9 +32,7 @@ /* Placeholder for H2 specific defines */ /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ -#define OMAP1610_ETHR_BASE 0xE8000000 -#define OMAP1610_ETHR_SIZE SZ_4K -#define OMAP1610_ETHR_START 0x04000000 +#define OMAP1610_ETHR_START 0x04000300 /* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */ #define OMAP_NOR_FLASH_SIZE SZ_32M diff -Nru a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h --- a/include/asm-arm/arch-omap/board-h3.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm/arch-omap/board-h3.h 2005-03-30 16:58:50 -08:00 @@ -28,9 +28,7 @@ #define __ASM_ARCH_OMAP_H3_H /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ -#define OMAP1710_ETHR_BASE 0xE8000000 -#define OMAP1710_ETHR_SIZE SZ_4K -#define OMAP1710_ETHR_START 0x04000000 +#define OMAP1710_ETHR_START 0x04000300 /* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */ #define OMAP_NOR_FLASH_SIZE SZ_32M diff -Nru a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h --- a/include/asm-arm/arch-omap/board-h4.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-omap/board-h4.h 2005-03-30 16:58:47 -08:00 @@ -21,8 +21,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ diff -Nru a/include/asm-arm/arch-omap/board-innovator.h b/include/asm-arm/arch-omap/board-innovator.h --- a/include/asm-arm/arch-omap/board-innovator.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-arm/arch-omap/board-innovator.h 2005-03-30 16:58:51 -08:00 @@ -19,8 +19,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __ASM_ARCH_OMAP_INNOVATOR_H @@ -74,8 +74,7 @@ #if defined (CONFIG_ARCH_OMAP16XX) /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ -#define INNOVATOR1610_ETHR_START 0x04000000 -#define INNOVATOR1610_ETHR_SIZE SZ_4K +#define INNOVATOR1610_ETHR_START 0x04000300 #endif /* CONFIG_ARCH_OMAP1610 */ #endif /* __ASM_ARCH_OMAP_INNOVATOR_H */ diff -Nru a/include/asm-arm/arch-omap/board-netstar.h b/include/asm-arm/arch-omap/board-netstar.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-omap/board-netstar.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2004 2N Telekomunikace, Ladislav Michl + * + * Hardware definitions for OMAP5910 based NetStar board. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_NETSTAR_H +#define __ASM_ARCH_NETSTAR_H + +#include + +#define OMAP_NAND_FLASH_START1 OMAP_CS1_PHYS + (1 << 23) +#define OMAP_NAND_FLASH_START2 OMAP_CS1_PHYS + (2 << 23) + +#endif /* __ASM_ARCH_NETSTAR_H */ diff -Nru a/include/asm-arm/arch-omap/board-osk.h b/include/asm-arm/arch-omap/board-osk.h --- a/include/asm-arm/arch-omap/board-osk.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-omap/board-osk.h 2005-03-30 16:58:47 -08:00 @@ -21,8 +21,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -30,9 +30,7 @@ #define __ASM_ARCH_OMAP_OSK_H /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ -#define OMAP_OSK_ETHR_BASE 0xE8800000 -#define OMAP_OSK_ETHR_SIZE SZ_4K -#define OMAP_OSK_ETHR_START 0x04800000 +#define OMAP_OSK_ETHR_START 0x04800300 /* Micron NOR flash at CS3 mapped to address 0x0 if BM bit is 1 */ #define OMAP_OSK_NOR_FLASH_BASE 0xD8000000 diff -Nru a/include/asm-arm/arch-omap/board-voiceblue.h b/include/asm-arm/arch-omap/board-voiceblue.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-omap/board-voiceblue.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2004 2N Telekomunikace, Ladislav Michl + * + * Hardware definitions for OMAP5910 based VoiceBlue board. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_VOICEBLUE_H +#define __ASM_ARCH_VOICEBLUE_H + +#if (EXTERNAL_MAX_NR_PORTS < 4) +#undef EXTERNAL_MAX_NR_PORTS +#define EXTERNAL_MAX_NR_PORTS 4 +#endif + +extern void voiceblue_wdt_enable(void); +extern void voiceblue_wdt_disable(void); +extern void voiceblue_wdt_ping(void); +extern void voiceblue_reset(void); + +#endif /* __ASM_ARCH_VOICEBLUE_H */ + diff -Nru a/include/asm-arm/arch-omap/clocks.h b/include/asm-arm/arch-omap/clocks.h --- a/include/asm-arm/arch-omap/clocks.h 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,216 +0,0 @@ -/* - * OMAP clock interface - * - * Copyright (C) 2001 RidgeRun, Inc - * Written by Gordon McNutt - * Updated 2004 for Linux 2.6 by Tony Lindgren - * - * 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. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __ASM_ARM_CLOCKS_H -#define __ASM_ARM_CLOCKS_H - -#include - -/* ARM_CKCTL bit shifts */ -#define PERDIV 0 -#define LCDDIV 2 -#define ARMDIV 4 -#define DSPDIV 6 -#define TCDIV 8 -#define DSPMMUDIV 10 -#define ARM_TIMXO 12 -#define EN_DSPCK 13 -#define ARM_INTHCK_SEL 14 /* REVISIT: Where is this used? */ - -/* ARM_IDLECT1 bit shifts */ -#define IDLWDT_ARM 0 -#define IDLXORP_ARM 1 -#define IDLPER_ARM 2 -#define IDLLCD_ARM 3 -#define IDLLB_ARM 4 -#define IDLHSAB_ARM 5 -#define IDLIF_ARM 6 -#define IDLDPLL_ARM 7 -#define IDLAPI_ARM 8 -#define IDLTIM_ARM 9 -#define SETARM_IDLE 11 - -/* ARM_IDLECT2 bit shifts */ -#define EN_WDTCK 0 -#define EN_XORPCK 1 -#define EN_PERCK 2 -#define EN_LCDCK 3 -#define EN_LBCK 4 -#define EN_HSABCK 5 -#define EN_APICK 6 -#define EN_TIMCK 7 -#define DMACK_REQ 8 -#define EN_GPIOCK 9 -#define EN_LBFREECK 10 - -/* - * OMAP clocks - */ -typedef enum { - /* Fixed system clock */ - OMAP_CLKIN = 0, - - /* DPLL1 */ - OMAP_CK_GEN1, OMAP_CK_GEN2, OMAP_CK_GEN3, - - /* TC usually needs to be checked before anything else */ - OMAP_TC_CK, - - /* CLKM1 */ - OMAP_ARM_CK, OMAP_MPUPER_CK, OMAP_ARM_GPIO_CK, OMAP_MPUXOR_CK, - OMAP_MPUTIM_CK, OMAP_MPUWD_CK, - - /* CLKM2 */ - OMAP_DSP_CK, OMAP_DSPMMU_CK, -#if 0 - /* Accessible only from the dsp */ - OMAP_DSPPER_CK, OMAP_GPIO_CK, OMAP_DSPXOR_CK, OMAP_DSPTIM_CK, - OMAP_DSPWD_CK, OMAP_UART_CK, -#endif - /* CLKM3 */ - OMAP_DMA_CK, OMAP_API_CK, OMAP_HSAB_CK, OMAP_LBFREE_CK, - OMAP_LB_CK, OMAP_LCD_CK -} ck_t; - -typedef enum { - /* Reset the MPU */ - OMAP_ARM_RST, - - /* Reset the DSP */ - OMAP_DSP_RST, - - /* Reset priority registers, EMIF config, and MPUI control logic */ - OMAP_API_RST, - - /* Reset DSP, MPU, and Peripherals */ - OMAP_SW_RST, -} reset_t; - -#define OMAP_CK_MIN OMAP_CLKIN -#define OMAP_CK_MAX OMAP_LCD_CK - -#if defined(CONFIG_OMAP_ARM_30MHZ) -#define OMAP_CK_MAX_RATE 30 -#elif defined(CONFIG_OMAP_ARM_60MHZ) -#define OMAP_CK_MAX_RATE 60 -#elif defined(CONFIG_OMAP_ARM_96MHZ) -#define OMAP_CK_MAX_RATE 96 -#elif defined(CONFIG_OMAP_ARM_120MHZ) -#define OMAP_CK_MAX_RATE 120 -#elif defined(CONFIG_OMAP_ARM_168MHZ) -#define OMAP_CK_MAX_RATE 168 -#elif defined(CONFIG_OMAP_ARM_182MHZ) -#define OMAP_CK_MAX_RATE 182 -#elif defined(CONFIG_OMAP_ARM_192MHZ) -#define OMAP_CK_MAX_RATE 192 -#elif defined(CONFIG_OMAP_ARM_195MHZ) -#define OMAP_CK_MAX_RATE 195 -#endif - -#define CK_DPLL_MASK 0x0fe0 - -/* Shared by CK and DSPC */ -#define MPUI_STROBE_MAX_1509 24 -#define MPUI_STROBE_MAX_1510 30 - -/* - * ---------------------------------------------------------------------------- - * Clock interface functions - * ---------------------------------------------------------------------------- - */ - -/* Clock initialization. */ -int init_ck(void); - -/* - * For some clocks you have a choice of which "parent" clocks they are derived - * from. Use this to select a "parent". See the platform documentation for - * valid combinations. - */ -int ck_can_set_input(ck_t); -int ck_set_input(ck_t ck, ck_t input); -int ck_get_input(ck_t ck, ck_t *input); - -/* - * Use this to set a clock rate. If other clocks are derived from this one, - * their rates will all change too. If this is a derived clock and I can't - * change it to match your request unless I also change the parent clock, then - * tough luck -- I won't change the parent automatically. I'll return an error - * if I can't get the clock within 10% of what you want. Otherwise I'll return - * the value I actually set it to. If I have to switch parents to get the rate - * then I will do this automatically (since it only affects this clock and its - * descendants). - */ -int ck_can_set_rate(ck_t); -int ck_set_rate(ck_t ck, int val_in_mhz); -int ck_get_rate(ck_t ck); - -/* - * Use this to get a bitmap of available rates for the clock. Caller allocates - * the buffer and passes in the length. Clock module fills up to len bytes of - * the buffer & passes back actual bytes used. - */ -int ck_get_rates(ck_t ck, void *buf, int len); -int ck_valid_rate(int rate); - -/* - * Idle a clock. What happens next depends on the clock ;). For example, if - * you idle the ARM_CK you might well end up in sleep mode on some platforms. - * If you try to idle a clock that doesn't support it I'll return an error. - * Note that idling a clock does not always take affect until certain h/w - * conditions are met. Consult the platform specs to learn more. - */ -int ck_can_idle(ck_t); -int ck_idle(ck_t); -int ck_activate(ck_t); -int ck_is_idle(ck_t); - -/* - * Enable/disable a clock. I'll return an error if the h/w doesn't support it. - * If you disable a clock being used by an active device then you probably - * just screwed it. YOU are responsible for making sure this doesn't happen. - */ -int ck_can_disable(ck_t); -int ck_enable(ck_t); -int ck_disable(ck_t); -int ck_is_enabled(ck_t); - -/* Enable/reset ARM peripherals (remove/set reset signal) */ -void ck_enable_peripherals(void); -void ck_reset_peripherals(void); - -/* Generate/clear a MPU or DSP reset */ -void ck_generate_reset(reset_t reset); -void ck_release_from_reset(reset_t reset); - -/* This gets a string representation of the clock's name. Useful for proc. */ -char *ck_get_name(ck_t); - -extern void start_mputimer1(unsigned long); - -#endif diff -Nru a/include/asm-arm/arch-omap/fpga.h b/include/asm-arm/arch-omap/fpga.h --- a/include/asm-arm/arch-omap/fpga.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-omap/fpga.h 2005-03-30 16:58:47 -08:00 @@ -38,8 +38,7 @@ #define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */ #define H2P2_DBG_FPGA_START 0x04000000 /* PA */ -#define H2P2_DBG_FPGA_ETHR_START H2P2_DBG_FPGA_START -#define H2P2_DBG_FPGA_ETHR_BASE H2P2_DBG_FPGA_BASE +#define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300) #define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */ #define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */ #define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */ @@ -48,12 +47,31 @@ #define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */ #define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */ -/* LEDs definition on debug board (16 LEDs) */ -#define H2P2_DBG_FPGA_LED_CLAIMRELEASE (1 << 15) -#define H2P2_DBG_FPGA_LED_STARTSTOP (1 << 14) -#define H2P2_DBG_FPGA_LED_HALTED (1 << 13) -#define H2P2_DBG_FPGA_LED_IDLE (1 << 12) -#define H2P2_DBG_FPGA_LED_TIMER (1 << 11) +/* NOTE: most boards don't have a static mapping for the FPGA ... */ +struct h2p2_dbg_fpga { + /* offset 0x00 */ + u16 smc91x[8]; + /* offset 0x10 */ + u16 fpga_rev; + u16 board_rev; + u16 gpio_outputs; + u16 leds; + /* offset 0x18 */ + u16 misc_inputs; + u16 lan_status; + u16 lan_reset; + u16 reserved0; + /* offset 0x20 */ + u16 ps2_data; + u16 ps2_ctrl; + /* plus also 4 rs232 ports ... */ +}; + +/* LEDs definition on debug board (16 LEDs, all physically green) */ +#define H2P2_DBG_FPGA_LED_GREEN (1 << 15) +#define H2P2_DBG_FPGA_LED_AMBER (1 << 14) +#define H2P2_DBG_FPGA_LED_RED (1 << 13) +#define H2P2_DBG_FPGA_LED_BLUE (1 << 12) /* cpu0 load-meter LEDs */ #define H2P2_DBG_FPGA_LOAD_METER (1 << 0) // A bit of fun on our board ... #define H2P2_DBG_FPGA_LOAD_METER_SIZE 11 @@ -116,7 +134,6 @@ #define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210) #define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300) -#define OMAP1510_FPGA_ETHR_BASE (OMAP1510_FPGA_BASE + 0x300) /* * Power up Giga UART driver, turn on HID clock. diff -Nru a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h --- a/include/asm-arm/arch-omap/hardware.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-omap/hardware.h 2005-03-30 16:58:47 -08:00 @@ -89,58 +89,31 @@ #define ULPD_REG_BASE (0xfffe0800) #define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14) #define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30) +# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */ +# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */ #define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34) +# define SOFT_UDC_REQ (1 << 4) +# define SOFT_USB_CLK_REQ (1 << 3) +# define SOFT_DPLL_REQ (1 << 0) #define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c) #define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40) #define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c) #define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50) +#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68) +# define DIS_MMC2_DPLL_REQ (1 << 11) +# define DIS_MMC1_DPLL_REQ (1 << 10) +# define DIS_UART3_DPLL_REQ (1 << 9) +# define DIS_UART2_DPLL_REQ (1 << 8) +# define DIS_UART1_DPLL_REQ (1 << 7) +# define DIS_USB_HOST_DPLL_REQ (1 << 6) +#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74) #define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c) /* * --------------------------------------------------------------------------- - * Timers + * Watchdog timer * --------------------------------------------------------------------------- */ -#define OMAP_32kHz_TIMER_BASE 0xfffb9000 - -/* 32k Timer Registers */ -#define TIMER32k_CR 0x08 -#define TIMER32k_TVR 0x00 -#define TIMER32k_TCR 0x04 - -/* 32k Timer Control Register definition */ -#define TIMER32k_TSS (1<<0) -#define TIMER32k_TRB (1<<1) -#define TIMER32k_INT (1<<2) -#define TIMER32k_ARL (1<<3) - -/* MPU Timer base addresses */ -#define OMAP_TIMER1_BASE (0xfffec500) -#define OMAP_TIMER2_BASE (0xfffec600) -#define OMAP_TIMER3_BASE (0xfffec700) -#define OMAP_MPUTIMER_BASE OMAP_TIMER1_BASE -#define OMAP_MPUTIMER_OFFSET 0x100 - -/* MPU Timer Registers */ -#define OMAP_TIMER1_CNTL (OMAP_TIMER_BASE1 + 0x0) -#define OMAP_TIMER1_LOAD_TIM (OMAP_TIMER_BASE1 + 0x4) -#define OMAP_TIMER1_READ_TIM (OMAP_TIMER_BASE1 + 0x8) - -#define OMAP_TIMER2_CNTL (OMAP_TIMER_BASE2 + 0x0) -#define OMAP_TIMER2_LOAD_TIM (OMAP_TIMER_BASE2 + 0x4) -#define OMAP_TIMER2_READ_TIM (OMAP_TIMER_BASE2 + 0x8) - -#define OMAP_TIMER3_CNTL (OMAP_TIMER_BASE3 + 0x0) -#define OMAP_TIMER3_LOAD_TIM (OMAP_TIMER_BASE3 + 0x4) -#define OMAP_TIMER3_READ_TIM (OMAP_TIMER_BASE3 + 0x8) - -/* CNTL_TIMER register bits */ -#define MPUTIM_FREE (1<<6) -#define MPUTIM_CLOCK_ENABLE (1<<5) -#define MPUTIM_PTV_MASK (0x7< +#ifndef __ASSEMBLY__ +#define IOMEM(x) ((void __iomem *)(x)) +#else +#define IOMEM(x) x +#endif /* __ASSEMBLY__ */ + /* * What hardware must be present */ @@ -34,7 +40,7 @@ #define IO_START 0x03000000 /* I/O */ #define IO_SIZE 0x01000000 -#define IO_BASE 0xe0000000 +#define IO_BASE IOMEM(0xe0000000) #define SCREEN_START 0x02000000 /* VRAM */ #define SCREEN_END 0xdfc00000 @@ -48,10 +54,10 @@ */ #define VIDC_BASE (void __iomem *)0xe0400000 #define EXPMASK_BASE 0xe0360000 -#define IOMD_BASE 0xe0200000 -#define IOC_BASE 0xe0200000 -#define PCIO_BASE 0xe0010000 -#define FLOPPYDMA_BASE 0xe002a000 +#define IOMD_BASE IOMEM(0xe0200000) +#define IOC_BASE IOMEM(0xe0200000) +#define PCIO_BASE IOMEM(0xe0010000) +#define FLOPPYDMA_BASE IOMEM(0xe002a000) #define FLUSH_BASE_PHYS 0x00000000 /* ROM */ diff -Nru a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h --- a/include/asm-arm/arch-rpc/io.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-arm/arch-rpc/io.h 2005-03-30 16:58:49 -08:00 @@ -128,9 +128,9 @@ { void __iomem *ret; if (__PORT_PCIO(port)) - ret = (void __iomem *)PCIO_BASE; + ret = PCIO_BASE; else - ret = (void __iomem *)IO_BASE; + ret = IO_BASE; return ret + (port << 2); } @@ -230,8 +230,8 @@ result; \ }) -#define __ioaddrc(port) \ - ((void __iomem *)(__PORT_PCIO((port)) ? PCIO_BASE : IO_BASE) + ((port) << 2)) +#define __ioaddrc(port) \ + ((__PORT_PCIO(port) ? PCIO_BASE : IO_BASE) + ((port) << 2)) #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) diff -Nru a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h --- a/include/asm-arm/arch-s3c2410/memory.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm/arch-s3c2410/memory.h 2005-03-30 16:58:50 -08:00 @@ -17,15 +17,21 @@ * 21-Mar-1999 RMK Renamed to memory.h * RMK Added TASK_SIZE and PAGE_OFFSET * 05-Apr-2004 BJD Copied and altered for arch-s3c2410 + * 17-Mar-2005 LCVR Modified for S3C2400 */ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H /* - * DRAM starts at 0x30000000 + * DRAM starts at 0x30000000 for S3C2410/S3C2440 + * and at 0x0C000000 for S3C2400 */ +#ifdef CONFIG_CPU_S3C2400 +#define PHYS_OFFSET (0x0C000000UL) +#else #define PHYS_OFFSET (0x30000000UL) +#endif /* * These are exactly the same on the S3C2410 as the diff -Nru a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h --- a/include/asm-arm/arch-s3c2410/regs-gpio.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h 2005-03-30 16:58:49 -08:00 @@ -19,6 +19,7 @@ * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6 * 18-11-2004 BJD Added S3C2440 AC97 controls * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 28-Mar-2005 LCVR Fixed definition of GPB10 */ @@ -212,9 +213,9 @@ #define S3C2410_GPB9_nXDACK0 (0x02 << 18) #define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10) -#define S3C2410_GPB10_INP (0x00 << 18) -#define S3C2410_GPB10_OUTP (0x01 << 18) -#define S3C2410_GPB10_nXDRE0 (0x02 << 18) +#define S3C2410_GPB10_INP (0x00 << 20) +#define S3C2410_GPB10_OUTP (0x01 << 20) +#define S3C2410_GPB10_nXDRE0 (0x02 << 20) /* Port C consits of 16 GPIO/Special function * diff -Nru a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h --- a/include/asm-arm/arch-s3c2410/regs-mem.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-mem.h 2005-03-30 16:58:47 -08:00 @@ -134,7 +134,28 @@ #define S3C2410_BANKCON_Tacs4 (0x3 << 13) #define S3C2410_BANKCON_SRAM (0x0 << 15) +#define S3C2400_BANKCON_EDODRAM (0x2 << 15) #define S3C2410_BANKCON_SDRAM (0x3 << 15) + +/* next bits only for EDO DRAM in 6,7 */ +#define S3C2400_BANKCON_EDO_Trdc1 (0x00 << 4) +#define S3C2400_BANKCON_EDO_Trdc2 (0x01 << 4) +#define S3C2400_BANKCON_EDO_Trdc3 (0x02 << 4) +#define S3C2400_BANKCON_EDO_Trdc4 (0x03 << 4) + +/* CAS pulse width */ +#define S3C2400_BANKCON_EDO_PULSE1 (0x00 << 3) +#define S3C2400_BANKCON_EDO_PULSE2 (0x01 << 3) + +/* CAS pre-charge */ +#define S3C2400_BANKCON_EDO_TCP1 (0x00 << 2) +#define S3C2400_BANKCON_EDO_TCP2 (0x01 << 2) + +/* control column address select */ +#define S3C2400_BANKCON_EDO_SCANb8 (0x00 << 0) +#define S3C2400_BANKCON_EDO_SCANb9 (0x01 << 0) +#define S3C2400_BANKCON_EDO_SCANb10 (0x02 << 0) +#define S3C2400_BANKCON_EDO_SCANb11 (0x03 << 0) /* next bits only for SDRAM in 6,7 */ #define S3C2410_BANKCON_Trdc2 (0x00 << 2) diff -Nru a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h --- a/include/asm-arm/mach/arch.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm/mach/arch.h 2005-03-30 16:58:50 -08:00 @@ -16,7 +16,7 @@ struct machine_desc { /* - * Note! The first four elements are used + * Note! The first five elements are used * by assembler code in head-armv.S */ unsigned int nr; /* architecture number */ diff -Nru a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h --- a/include/asm-arm/mach/map.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-arm/mach/map.h 2005-03-30 16:58:49 -08:00 @@ -18,13 +18,14 @@ struct meminfo; -#define MT_DEVICE 0 -#define MT_CACHECLEAN 1 -#define MT_MINICLEAN 2 -#define MT_LOW_VECTORS 3 -#define MT_HIGH_VECTORS 4 -#define MT_MEMORY 5 -#define MT_ROM 6 +#define MT_DEVICE 0 +#define MT_CACHECLEAN 1 +#define MT_MINICLEAN 2 +#define MT_LOW_VECTORS 3 +#define MT_HIGH_VECTORS 4 +#define MT_MEMORY 5 +#define MT_ROM 6 +#define MT_IXP2000_DEVICE 7 extern void create_memmap_holes(struct meminfo *); extern void memtable_init(struct meminfo *); diff -Nru a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h --- a/include/asm-arm/pgtable.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm/pgtable.h 2005-03-30 16:58:47 -08:00 @@ -419,6 +419,13 @@ #define io_remap_page_range(vma,from,phys,size,prot) \ remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma,from,pfn,size,prot) \ + remap_pfn_range(vma, from, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #define pgtable_cache_init() do { } while (0) #endif /* !__ASSEMBLY__ */ diff -Nru a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h --- a/include/asm-arm/ptrace.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-arm/ptrace.h 2005-03-30 16:58:49 -08:00 @@ -17,6 +17,9 @@ #define PTRACE_GETFPREGS 14 #define PTRACE_SETFPREGS 15 +#define PTRACE_GETWMMXREGS 18 +#define PTRACE_SETWMMXREGS 19 + #define PTRACE_OLDSETOPTIONS 21 #define PTRACE_GET_THREAD_AREA 22 diff -Nru a/include/asm-arm/tlb.h b/include/asm-arm/tlb.h --- a/include/asm-arm/tlb.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm/tlb.h 2005-03-30 16:58:50 -08:00 @@ -54,38 +54,44 @@ { struct mm_struct *mm = tlb->mm; unsigned long freed = tlb->freed; - int rss = mm->rss; + int rss = get_mm_counter(mm, rss); if (rss < freed) freed = rss; - mm->rss = rss - freed; + add_mm_counter(mm, rss, -freed); - if (freed) { + if (tlb->fullmm) flush_tlb_mm(mm); - tlb->flushes++; - } else { - tlb->avoided_flushes++; - } /* keep the page table cache within bounds */ check_pgt_cache(); } -static inline unsigned int -tlb_is_full_mm(struct mmu_gather *tlb) +static inline unsigned int tlb_is_full_mm(struct mmu_gather *tlb) { - return tlb->fullmm; + return tlb->fullmm; } #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0) -#define tlb_start_vma(tlb,vma) \ - do { \ - if (!tlb->fullmm) \ - flush_cache_range(vma, vma->vm_start, vma->vm_end); \ - } while (0) +/* + * In the case of tlb vma handling, we can optimise these away in the + * case where we're doing a full MM flush. When we're doing a munmap, + * the vmas are adjusted to only cover the region to be torn down. + */ +static inline void +tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) +{ + if (!tlb->fullmm) + flush_cache_range(vma, vma->vm_start, vma->vm_end); +} -#define tlb_end_vma(tlb,vma) do { } while (0) +static inline void +tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) +{ + if (!tlb->fullmm) + flush_tlb_range(vma, vma->vm_start, vma->vm_end); +} #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) #define pte_free_tlb(tlb,ptep) pte_free(ptep) diff -Nru a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h --- a/include/asm-arm/unistd.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm/unistd.h 2005-03-30 16:58:50 -08:00 @@ -349,6 +349,8 @@ #define __NR_semtimedop (__NR_SYSCALL_BASE+312) #endif +#define __NR_vserver (__NR_SYSCALL_BASE+313) + /* * The following SWIs are ARM private. */ diff -Nru a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h --- a/include/asm-arm26/pgtable.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-arm26/pgtable.h 2005-03-30 16:58:47 -08:00 @@ -293,6 +293,13 @@ #define io_remap_page_range(vma,from,phys,size,prot) \ remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma,from,pfn,size,prot) \ + remap_pfn_range(vma, from, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #endif /* !__ASSEMBLY__ */ #endif /* _ASMARM_PGTABLE_H */ diff -Nru a/include/asm-arm26/tlb.h b/include/asm-arm26/tlb.h --- a/include/asm-arm26/tlb.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-arm26/tlb.h 2005-03-30 16:58:50 -08:00 @@ -37,11 +37,11 @@ { struct mm_struct *mm = tlb->mm; unsigned long freed = tlb->freed; - int rss = mm->rss; + int rss = get_mm_counter(mm, rss); if (rss < freed) freed = rss; - mm->rss = rss - freed; + add_mm_counter(mm, rss, -freed); if (freed) { flush_tlb_mm(mm); diff -Nru a/include/asm-cris/pgalloc.h b/include/asm-cris/pgalloc.h --- a/include/asm-cris/pgalloc.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-cris/pgalloc.h 2005-03-30 16:58:50 -08:00 @@ -1,7 +1,6 @@ #ifndef _CRIS_PGALLOC_H #define _CRIS_PGALLOC_H -#include #include #include diff -Nru a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h --- a/include/asm-frv/pgtable.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-frv/pgtable.h 2005-03-30 16:58:47 -08:00 @@ -503,6 +503,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR diff -Nru a/include/asm-frv/tlbflush.h b/include/asm-frv/tlbflush.h --- a/include/asm-frv/tlbflush.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-frv/tlbflush.h 2005-03-30 16:58:49 -08:00 @@ -58,7 +58,8 @@ #define __flush_tlb_global() flush_tlb_all() #define flush_tlb() flush_tlb_all() #define flush_tlb_kernel_range(start, end) flush_tlb_all() -#define flush_tlb_pgtables(mm,start,end) asm volatile("movgs gr0,scr0 ! movgs gr0,scr1"); +#define flush_tlb_pgtables(mm,start,end) \ + asm volatile("movgs %0,scr0 ! movgs %0,scr1" :: "r"(ULONG_MAX) : "memory"); #else diff -Nru a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h --- a/include/asm-generic/cputime.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-generic/cputime.h 2005-03-30 16:58:50 -08:00 @@ -10,6 +10,8 @@ #define cputime_max ((~0UL >> 1) - 1) #define cputime_add(__a, __b) ((__a) + (__b)) #define cputime_sub(__a, __b) ((__a) - (__b)) +#define cputime_div(__a, __n) ((__a) / (__n)) +#define cputime_halve(__a) ((__a) >> 1) #define cputime_eq(__a, __b) ((__a) == (__b)) #define cputime_gt(__a, __b) ((__a) > (__b)) #define cputime_ge(__a, __b) ((__a) >= (__b)) diff -Nru a/include/asm-generic/dma-mapping.h b/include/asm-generic/dma-mapping.h --- a/include/asm-generic/dma-mapping.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-generic/dma-mapping.h 2005-03-30 16:58:50 -08:00 @@ -35,7 +35,7 @@ static inline void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, - int flag) + unsigned int __nocast flag) { BUG_ON(dev->bus != &pci_bus_type); @@ -168,7 +168,7 @@ static inline void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, - int flag) + unsigned int __nocast flag) { BUG(); return NULL; diff -Nru a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h --- a/include/asm-generic/pgtable.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-generic/pgtable.h 2005-03-30 16:58:48 -08:00 @@ -135,6 +135,10 @@ #define pgd_offset_gate(mm, addr) pgd_offset(mm, addr) #endif +#ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE +#define lazy_mmu_prot_update(pte) do { } while (0) +#endif + /* * When walking page tables, get the address of the next boundary, or * the end address of the range if that comes earlier. Although end might diff -Nru a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h --- a/include/asm-generic/tlb.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-generic/tlb.h 2005-03-30 16:58:47 -08:00 @@ -88,11 +88,11 @@ { int freed = tlb->freed; struct mm_struct *mm = tlb->mm; - int rss = mm->rss; + int rss = get_mm_counter(mm, rss); if (rss < freed) freed = rss; - mm->rss = rss - freed; + add_mm_counter(mm, rss, -freed); tlb_flush_mmu(tlb, start, end); /* keep the page table cache within bounds */ diff -Nru a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h --- a/include/asm-generic/unaligned.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-generic/unaligned.h 2005-03-30 16:58:48 -08:00 @@ -4,17 +4,118 @@ /* * For the benefit of those who are trying to port Linux to another * architecture, here are some C-language equivalents. + * + * This is based almost entirely upon Richard Henderson's + * asm-alpha/unaligned.h implementation. Some comments were + * taken from David Mosberger's asm-ia64/unaligned.h header. */ -#include - +#include +/* + * The main single-value unaligned transfer routines. + */ #define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memcpy(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) + ((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr)))) +#define put_unaligned(x,ptr) \ + __put_unaligned((unsigned long)(x), (ptr), sizeof(*(ptr))) + +/* + * This function doesn't actually exist. The idea is that when + * someone uses the macros below with an unsupported size (datatype), + * the linker will alert us to the problem via an unresolved reference + * error. + */ +extern void bad_unaligned_access_length(void) __attribute__((noreturn)); + +struct __una_u64 { __u64 x __attribute__((packed)); }; +struct __una_u32 { __u32 x __attribute__((packed)); }; +struct __una_u16 { __u16 x __attribute__((packed)); }; + +/* + * Elemental unaligned loads + */ + +static inline unsigned long __uldq(const __u64 *addr) +{ + const struct __una_u64 *ptr = (const struct __una_u64 *) addr; + return ptr->x; +} + +static inline unsigned long __uldl(const __u32 *addr) +{ + const struct __una_u32 *ptr = (const struct __una_u32 *) addr; + return ptr->x; +} + +static inline unsigned long __uldw(const __u16 *addr) +{ + const struct __una_u16 *ptr = (const struct __una_u16 *) addr; + return ptr->x; +} + +/* + * Elemental unaligned stores + */ + +static inline void __ustq(__u64 val, __u64 *addr) +{ + struct __una_u64 *ptr = (struct __una_u64 *) addr; + ptr->x = val; +} + +static inline void __ustl(__u32 val, __u32 *addr) +{ + struct __una_u32 *ptr = (struct __una_u32 *) addr; + ptr->x = val; +} + +static inline void __ustw(__u16 val, __u16 *addr) +{ + struct __una_u16 *ptr = (struct __una_u16 *) addr; + ptr->x = val; +} + +static inline unsigned long __get_unaligned(const void *ptr, size_t size) +{ + unsigned long val; + switch (size) { + case 1: + val = *(const __u8 *)ptr; + break; + case 2: + val = __uldw((const __u16 *)ptr); + break; + case 4: + val = __uldl((const __u32 *)ptr); + break; + case 8: + val = __uldq((const __u64 *)ptr); + break; + default: + bad_unaligned_access_length(); + }; + return val; +} -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memcpy((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +static inline void __put_unaligned(unsigned long val, void *ptr, size_t size) +{ + switch (size) { + case 1: + *(__u8 *)ptr = val; + break; + case 2: + __ustw(val, (__u16 *)ptr); + break; + case 4: + __ustl(val, (__u32 *)ptr); + break; + case 8: + __ustq(val, (__u64 *)ptr); + break; + default: + bad_unaligned_access_length(); + }; +} #endif /* _ASM_GENERIC_UNALIGNED_H */ diff -Nru a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h --- a/include/asm-h8300/pgtable.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-h8300/pgtable.h 2005-03-30 16:58:48 -08:00 @@ -55,6 +55,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + /* * All 32bit addresses are effectively valid for vmalloc... * Sort of meaningless for non-VM targets. diff -Nru a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h --- a/include/asm-i386/dma-mapping.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-i386/dma-mapping.h 2005-03-30 16:58:50 -08:00 @@ -11,7 +11,7 @@ #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int flag); + dma_addr_t *dma_handle, unsigned int __nocast flag); void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); diff -Nru a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h --- a/include/asm-i386/hardirq.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-i386/hardirq.h 2005-03-30 16:58:49 -08:00 @@ -12,8 +12,13 @@ unsigned int apic_timer_irqs; /* arch dependent */ } ____cacheline_aligned irq_cpustat_t; -#include /* Standard mappings for irq_cpustat_t above */ +DECLARE_PER_CPU(irq_cpustat_t, irq_stat); +extern irq_cpustat_t irq_stat[]; + +#define __ARCH_IRQ_STAT +#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member) void ack_bad_irq(unsigned int irq); +#include #endif /* __ASM_HARDIRQ_H */ diff -Nru a/include/asm-i386/msr.h b/include/asm-i386/msr.h --- a/include/asm-i386/msr.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-i386/msr.h 2005-03-30 16:58:47 -08:00 @@ -32,6 +32,21 @@ wrmsr (msr, lo, hi); } +/* wrmsr with exception handling */ +#define wrmsr_safe(msr,a,b) ({ int ret__; \ + asm volatile("2: wrmsr ; xorl %0,%0\n" \ + "1:\n\t" \ + ".section .fixup,\"ax\"\n\t" \ + "3: movl %4,%0 ; jmp 1b\n\t" \ + ".previous\n\t" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n\t" \ + " .long 2b,3b\n\t" \ + ".previous" \ + : "=a" (ret__) \ + : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ + ret__; }) + #define rdtsc(low,high) \ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) diff -Nru a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h --- a/include/asm-i386/pgalloc.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-i386/pgalloc.h 2005-03-30 16:58:47 -08:00 @@ -2,7 +2,6 @@ #define _I386_PGALLOC_H #include -#include #include #include #include /* for struct page */ diff -Nru a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h --- a/include/asm-i386/pgtable.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-i386/pgtable.h 2005-03-30 16:58:51 -08:00 @@ -405,6 +405,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR diff -Nru a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h --- a/include/asm-i386/uaccess.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-i386/uaccess.h 2005-03-30 16:58:47 -08:00 @@ -217,6 +217,8 @@ * * Returns zero on success, or -EFAULT on error. */ +#ifdef CONFIG_X86_WP_WORKS_OK + #define put_user(x,ptr) \ ({ int __ret_pu; \ __chk_user_ptr(ptr); \ @@ -229,6 +231,21 @@ } \ __ret_pu; \ }) + +#else +#define put_user(x,ptr) \ +({ \ + int __ret_pu; \ + __typeof__(*(ptr)) __pus_tmp = x; \ + __ret_pu=0; \ + if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, \ + sizeof(*(ptr))) != 0)) \ + __ret_pu=-EFAULT; \ + __ret_pu; \ + }) + + +#endif /** * __get_user: - Get a simple variable from user space, with less checking. diff -Nru a/include/asm-ia64/page.h b/include/asm-ia64/page.h --- a/include/asm-ia64/page.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-ia64/page.h 2005-03-30 16:58:47 -08:00 @@ -137,7 +137,7 @@ # define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61) \ | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT))) # define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) -# define is_hugepage_only_range(addr, len) \ +# define is_hugepage_only_range(mm, addr, len) \ (REGION_NUMBER(addr) == REGION_HPAGE && \ REGION_NUMBER((addr)+(len)) == REGION_HPAGE) extern unsigned int hpage_shift; diff -Nru a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h --- a/include/asm-ia64/pgalloc.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-ia64/pgalloc.h 2005-03-30 16:58:47 -08:00 @@ -21,7 +21,6 @@ #include #include -#include /* * Very stupidly, we used to get new pgd's and pmd's, init their contents diff -Nru a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h --- a/include/asm-ia64/pgtable.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ia64/pgtable.h 2005-03-30 16:58:48 -08:00 @@ -411,6 +411,8 @@ return pte_val(a) == pte_val(b); } +#define update_mmu_cache(vma, address, pte) do { } while (0) + extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; extern void paging_init (void); @@ -447,6 +449,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. @@ -472,7 +481,7 @@ * information. However, we use this routine to take care of any (delayed) i-cache * flushing that may be necessary. */ -extern void update_mmu_cache (struct vm_area_struct *vma, unsigned long vaddr, pte_t pte); +extern void lazy_mmu_prot_update (pte_t pte); #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS /* @@ -550,20 +559,31 @@ #define __HAVE_ARCH_PTEP_SET_WRPROTECT #define __HAVE_ARCH_PTE_SAME #define __HAVE_ARCH_PGD_OFFSET_GATE +#define __HAVE_ARCH_LAZY_MMU_PROT_UPDATE /* * Override for pgd_addr_end() to deal with the virtual address space holes - * in each region. Virtual address bits are used like this: + * in each region. In regions 0..4 virtual address bits are used like this: * +--------+------+--------+-----+-----+--------+ * | pgdhi3 | rsvd | pgdlow | pmd | pte | offset | * +--------+------+--------+-----+-----+--------+ - * The high bit of 'pgdlow' must be sign extended across the 'rsvd' bits. + * 'pgdlow' overflows to pgdhi3 (a.k.a. region bits) leaving rsvd==0 */ -#define IA64_PGD_SIGNEXTEND (PGDIR_SIZE << (PAGE_SHIFT-7)) +#define IA64_PGD_OVERFLOW (PGDIR_SIZE << (PAGE_SHIFT-6)) + #define pgd_addr_end(addr, end) \ ({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; \ - if (__boundary & IA64_PGD_SIGNEXTEND) \ - __boundary |= (RGN_SIZE - 1) & ~(IA64_PGD_SIGNEXTEND-1);\ + if (REGION_NUMBER(__boundary) < 5 && \ + __boundary & IA64_PGD_OVERFLOW) \ + __boundary += (RGN_SIZE - 1) & ~(IA64_PGD_OVERFLOW - 1);\ + (__boundary - 1 < (end) - 1)? __boundary: (end); \ +}) + +#define pmd_addr_end(addr, end) \ +({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; \ + if (REGION_NUMBER(__boundary) < 5 && \ + __boundary & IA64_PGD_OVERFLOW) \ + __boundary += (RGN_SIZE - 1) & ~(IA64_PGD_OVERFLOW - 1);\ (__boundary - 1 < (end) - 1)? __boundary: (end); \ }) diff -Nru a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h --- a/include/asm-ia64/tlb.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ia64/tlb.h 2005-03-30 16:58:48 -08:00 @@ -161,11 +161,11 @@ { unsigned long freed = tlb->freed; struct mm_struct *mm = tlb->mm; - unsigned long rss = mm->rss; + unsigned long rss = get_mm_counter(mm, rss); if (rss < freed) freed = rss; - mm->rss = rss - freed; + add_mm_counter(mm, rss, -freed); /* * Note: tlb->nr may be 0 at this point, so we can't rely on tlb->start_addr and * tlb->end_addr. diff -Nru a/include/asm-ia64/unaligned.h b/include/asm-ia64/unaligned.h --- a/include/asm-ia64/unaligned.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ia64/unaligned.h 2005-03-30 16:58:50 -08:00 @@ -1,121 +1,6 @@ #ifndef _ASM_IA64_UNALIGNED_H #define _ASM_IA64_UNALIGNED_H -#include - -/* - * The main single-value unaligned transfer routines. - * - * Based on . - * - * Copyright (C) 1998, 1999, 2003 Hewlett-Packard Co - * David Mosberger-Tang - */ -#define get_unaligned(ptr) \ - ((__typeof__(*(ptr)))ia64_get_unaligned((ptr), sizeof(*(ptr)))) - -#define put_unaligned(x,ptr) \ - ia64_put_unaligned((unsigned long)(x), (ptr), sizeof(*(ptr))) - -struct __una_u64 { __u64 x __attribute__((packed)); }; -struct __una_u32 { __u32 x __attribute__((packed)); }; -struct __una_u16 { __u16 x __attribute__((packed)); }; - -static inline unsigned long -__uld8 (const unsigned long * addr) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) addr; - return ptr->x; -} - -static inline unsigned long -__uld4 (const unsigned int * addr) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) addr; - return ptr->x; -} - -static inline unsigned long -__uld2 (const unsigned short * addr) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) addr; - return ptr->x; -} - -static inline void -__ust8 (unsigned long val, unsigned long * addr) -{ - struct __una_u64 *ptr = (struct __una_u64 *) addr; - ptr->x = val; -} - -static inline void -__ust4 (unsigned long val, unsigned int * addr) -{ - struct __una_u32 *ptr = (struct __una_u32 *) addr; - ptr->x = val; -} - -static inline void -__ust2 (unsigned long val, unsigned short * addr) -{ - struct __una_u16 *ptr = (struct __una_u16 *) addr; - ptr->x = val; -} - - -/* - * This function doesn't actually exist. The idea is that when someone uses the macros - * below with an unsupported size (datatype), the linker will alert us to the problem via - * an unresolved reference error. - */ -extern unsigned long ia64_bad_unaligned_access_length (void); - -#define ia64_get_unaligned(_ptr,size) \ -({ \ - const void *__ia64_ptr = (_ptr); \ - unsigned long __ia64_val; \ - \ - switch (size) { \ - case 1: \ - __ia64_val = *(const unsigned char *) __ia64_ptr; \ - break; \ - case 2: \ - __ia64_val = __uld2((const unsigned short *)__ia64_ptr); \ - break; \ - case 4: \ - __ia64_val = __uld4((const unsigned int *)__ia64_ptr); \ - break; \ - case 8: \ - __ia64_val = __uld8((const unsigned long *)__ia64_ptr); \ - break; \ - default: \ - __ia64_val = ia64_bad_unaligned_access_length(); \ - } \ - __ia64_val; \ -}) - -#define ia64_put_unaligned(_val,_ptr,size) \ -do { \ - const void *__ia64_ptr = (_ptr); \ - unsigned long __ia64_val = (_val); \ - \ - switch (size) { \ - case 1: \ - *(unsigned char *)__ia64_ptr = (__ia64_val); \ - break; \ - case 2: \ - __ust2(__ia64_val, (unsigned short *)__ia64_ptr); \ - break; \ - case 4: \ - __ust4(__ia64_val, (unsigned int *)__ia64_ptr); \ - break; \ - case 8: \ - __ust8(__ia64_val, (unsigned long *)__ia64_ptr); \ - break; \ - default: \ - ia64_bad_unaligned_access_length(); \ - } \ -} while (0) +#include #endif /* _ASM_IA64_UNALIGNED_H */ diff -Nru a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h --- a/include/asm-m32r/mmu.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-m32r/mmu.h 2005-03-30 16:58:48 -08:00 @@ -1,25 +1,12 @@ #ifndef _ASM_M32R_MMU_H #define _ASM_M32R_MMU_H -/* $Id$ */ - #include #if !defined(CONFIG_MMU) -struct mm_rblock_struct { - int size; - int refcount; - void *kblock; -}; - -struct mm_tblock_struct { - struct mm_rblock_struct *rblock; - struct mm_tblock_struct *next; -}; - typedef struct { - struct mm_tblock_struct tblock; - unsigned long end_brk; + struct vm_list_struct *vmlist; + unsigned long end_brk; } mm_context_t; #else @@ -32,4 +19,3 @@ #endif /* CONFIG_MMU */ #endif /* _ASM_M32R_MMU_H */ - diff -Nru a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h --- a/include/asm-m32r/pgalloc.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-m32r/pgalloc.h 2005-03-30 16:58:50 -08:00 @@ -7,7 +7,6 @@ #include #include -#include #define pmd_populate_kernel(mm, pmd, pte) \ set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) diff -Nru a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h --- a/include/asm-m32r/pgtable.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-m32r/pgtable.h 2005-03-30 16:58:47 -08:00 @@ -381,6 +381,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR diff -Nru a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h --- a/include/asm-m32r/serial.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-m32r/serial.h 2005-03-30 16:58:50 -08:00 @@ -1,10 +1,6 @@ #ifndef _ASM_M32R_SERIAL_H #define _ASM_M32R_SERIAL_H -/* $Id$ */ - -/* orig : i386 2.4.18 */ - /* * include/asm-m32r/serial.h */ @@ -21,131 +17,31 @@ */ #define BASE_BAUD ( 1843200 / 16 ) -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) -#else +/* Standard COM flags */ #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF -#endif - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define FOURPORT_FLAGS ASYNC_FOURPORT -#define ACCENT_FLAGS 0 -#define BOCA_FLAGS 0 -#define HUB6_FLAGS 0 -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE -#endif - -#define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) - -/* - * The following define the access methods for the HUB6 card. All - * access is through two ports for all 24 possible chips. The card is - * selected through the high 2 bits, the port on that card with the - * "middle" 3 bits, and the register on that port with the bottom - * 3 bits. - * - * While the access port and interrupt is configurable, the default - * port locations are 0x302 for the port control register, and 0x303 - * for the data read/write register. Normally, the interrupt is at irq3 - * but can be anything from 3 to 7 inclusive. Note that using 3 will - * require disabling com2. - */ -#define C_P(card,port) (((card)<<6|(port)<<3) + 1) +/* Standard PORT definitions */ +#if defined(CONFIG_PLAT_USRV) -#define STD_SERIAL_PORT_DEFNS \ - /* UART CLK PORT IRQ FLAGS */ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ - - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define EXTRA_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ - { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ - { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ - { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ - { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ - { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ - { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ - { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ - { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ - { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ - { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ - { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ - { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ - { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ - { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ - { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ - { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ - { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ - { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ - { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ - { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ - { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ - { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ - { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ - { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ - { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ - { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ - { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ +#define STD_SERIAL_PORT_DEFNS \ + /* UART CLK PORT IRQ FLAGS */ \ + { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */ + +#else /* !CONFIG_PLAT_USRV */ + +#if defined(CONFIG_SERIAL_M32R_PLDSIO) +#define STD_SERIAL_PORT_DEFNS \ + { 0, BASE_BAUD, ((unsigned long)PLD_ESIO0CR), PLD_IRQ_SIO0_RCV, \ + STD_COM_FLAGS }, /* ttyS0 */ #else -#define EXTRA_SERIAL_PORT_DEFNS +#define STD_SERIAL_PORT_DEFNS \ + { 0, BASE_BAUD, M32R_SIO_OFFSET, M32R_IRQ_SIO0_R, \ + STD_COM_FLAGS }, /* ttyS0 */ #endif -/* You can have up to four HUB6's in the system, but I've only - * included two cards here for a total of twelve ports. - */ -#if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) -#define HUB6_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ -#else -#define HUB6_SERIAL_PORT_DFNS -#endif - -#ifdef CONFIG_MCA -#define MCA_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS }, -#else -#define MCA_SERIAL_PORT_DFNS -#endif +#endif /* !CONFIG_PLAT_USRV */ -#ifndef CONFIG_PLAT_USRV -#define SERIAL_PORT_DFNS \ - STD_SERIAL_PORT_DEFNS \ - EXTRA_SERIAL_PORT_DEFNS \ - HUB6_SERIAL_PORT_DFNS \ - MCA_SERIAL_PORT_DFNS - -#else /* CONFIG_PLAT_USRV */ - -#define SERIAL_PORT_DFNS \ - /* UART CLK PORT IRQ FLAGS */ \ - { 0, BASE_BAUD, 0x3F8, PLD_IRQ_UART0, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, PLD_IRQ_UART1, STD_COM_FLAGS }, /* ttyS1 */ -#endif /* CONFIG_PLAT_USRV */ +#define SERIAL_PORT_DFNS STD_SERIAL_PORT_DEFNS #endif /* _ASM_M32R_SERIAL_H */ diff -Nru a/include/asm-m68k/checksum.h b/include/asm-m68k/checksum.h --- a/include/asm-m68k/checksum.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-m68k/checksum.h 2005-03-30 16:58:51 -08:00 @@ -43,20 +43,21 @@ ip_fast_csum(unsigned char *iph, unsigned int ihl) { unsigned int sum = 0; + unsigned long tmp; __asm__ ("subqw #1,%2\n" "1:\t" - "movel %1@+,%/d0\n\t" - "addxl %/d0,%0\n\t" + "movel %1@+,%3\n\t" + "addxl %3,%0\n\t" "dbra %2,1b\n\t" - "movel %0,%/d0\n\t" - "swap %/d0\n\t" - "addxw %/d0,%0\n\t" - "clrw %/d0\n\t" - "addxw %/d0,%0\n\t" - : "=d" (sum), "=a" (iph), "=d" (ihl) + "movel %0,%3\n\t" + "swap %3\n\t" + "addxw %3,%0\n\t" + "clrw %3\n\t" + "addxw %3,%0\n\t" + : "=d" (sum), "=&a" (iph), "=&d" (ihl), "=&d" (tmp) : "0" (sum), "1" (iph), "2" (ihl) - : "d0"); + : "memory"); return ~sum; } @@ -72,31 +73,31 @@ "clrw %1\n\t" "addxw %1, %0" : "=&d" (sum), "=&d" (tmp) - : "0" (sum), "1" (sum)); + : "0" (sum), "1" (tmp)); return ~sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ - static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, unsigned int sum) { - __asm__ ("addl %1,%0\n\t" + __asm__ ("addl %2,%0\n\t" + "addxl %3,%0\n\t" "addxl %4,%0\n\t" - "addxl %5,%0\n\t" "clrl %1\n\t" "addxl %1,%0" - : "=&d" (sum), "=&d" (saddr) - : "0" (daddr), "1" (saddr), "d" (len + proto), - "d"(sum)); + : "=&d" (sum), "=d" (saddr) + : "g" (daddr), "1" (saddr), "d" (len + proto), + "0" (sum)); return sum; } + +/* + * computes the checksum of the TCP/UDP pseudo-header + * returns a 16-bit checksum, already complemented + */ static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, unsigned int sum) diff -Nru a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h --- a/include/asm-m68k/pgtable.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-m68k/pgtable.h 2005-03-30 16:58:50 -08:00 @@ -144,6 +144,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + /* MMU-specific headers */ #ifdef CONFIG_SUN3 diff -Nru a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h --- a/include/asm-m68k/processor.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-m68k/processor.h 2005-03-30 16:58:49 -08:00 @@ -62,7 +62,8 @@ char need_resched; unsigned char delayed_trace; /* single step a syscall */ unsigned char syscall_trace; /* count of syscall interceptors */ - unsigned char pad[3]; + unsigned char memdie; /* task was selected to be killed */ + unsigned char pad[2]; }; struct thread_struct { diff -Nru a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h --- a/include/asm-m68k/signal.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-m68k/signal.h 2005-03-30 16:58:47 -08:00 @@ -213,7 +213,7 @@ return word ^ 31; } -#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER +extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); #endif /* __KERNEL__ */ diff -Nru a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h --- a/include/asm-m68k/thread_info.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-m68k/thread_info.h 2005-03-30 16:58:49 -08:00 @@ -68,6 +68,9 @@ case TIF_SYSCALL_TRACE: \ tsk->thread.work.syscall_trace = val; \ break; \ + case TIF_MEMDIE: \ + tsk->thread.work.memdie = val; \ + break; \ default: \ thread_flag_fixme(); \ } \ @@ -84,6 +87,9 @@ break; \ case TIF_SYSCALL_TRACE: \ ___res = tsk->thread.work.syscall_trace;\ + break; \ + case TIF_MEMDIE: \ + ___res = tsk->thread.work.memdie;\ break; \ default: \ ___res = thread_flag_fixme(); \ diff -Nru a/include/asm-m68knommu/entry.h b/include/asm-m68knommu/entry.h --- a/include/asm-m68knommu/entry.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-m68knommu/entry.h 2005-03-30 16:58:49 -08:00 @@ -22,8 +22,9 @@ * 24(sp) - orig_d0 * 28(sp) - stack adjustment * 2C(sp) - [ sr ] [ format & vector ] - * 2E(sp) - [ pc ] [ sr ] - * 30(sp) - [ format & vector ] [ pc ] + * 2E(sp) - [ pc-hiword ] [ sr ] + * 30(sp) - [ pc-loword ] [ pc-hiword ] + * 32(sp) - [ format & vector ] [ pc-loword ] * ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ * M68K COLDFIRE */ @@ -42,12 +43,6 @@ LENOSYS = 38 -LD0 = 0x20 -LORIG_D0 = 0x24 -LFORMATVEC = 0x2c -LSR = 0x2e -LPC = 0x30 - #define SWITCH_STACK_SIZE (6*4+4) /* Includes return address */ /* @@ -72,36 +67,36 @@ addql #8,sw_usp /* remove exception */ movel sw_ksp,%sp /* kernel sp */ subql #8,%sp /* room for exception */ - clrl %sp@- /* stk_adj */ + clrl %sp@- /* stkadj */ movel %d0,%sp@- /* orig d0 */ movel %d0,%sp@- /* d0 */ - subl #32,%sp /* space for 8 regs */ + lea %sp@(-32),%sp /* space for 8 regs */ moveml %d1-%d5/%a0-%a2,%sp@ movel sw_usp,%a0 /* get usp */ - moveml %a0@(-8),%d1-%d2 /* get exception */ - moveml %d1-%d2,%sp@(LFORMATVEC) /* copy exception */ + movel %a0@-,%sp@(PT_PC) /* copy exception program counter */ + movel %a0@-,%sp@(PT_FORMATVEC)/* copy exception format/vector/sr */ bra 7f 6: - clrl %sp@- /* stk_adj */ + clrl %sp@- /* stkadj */ movel %d0,%sp@- /* orig d0 */ movel %d0,%sp@- /* d0 */ - subl #32,%sp /* space for 7 regs */ + lea %sp@(-32),%sp /* space for 8 regs */ moveml %d1-%d5/%a0-%a2,%sp@ 7: .endm .macro RESTORE_ALL - btst #5,%sp@(LSR) /* going user? */ + btst #5,%sp@(PT_SR) /* going user? */ bnes 8f /* no, skip */ move #0x2700,%sr /* disable intrs */ movel sw_usp,%a0 /* get usp */ - moveml %sp@(LFORMATVEC),%d1-%d2 /* copy exception */ - moveml %d1-%d2,%a0@(-8) + movel %sp@(PT_PC),%a0@- /* copy exception program counter */ + movel %sp@(PT_FORMATVEC),%a0@-/* copy exception format/vector/sr */ moveml %sp@,%d1-%d5/%a0-%a2 - addl #32,%sp /* space for 8 regs */ + lea %sp@(32),%sp /* space for 8 regs */ movel %sp@+,%d0 addql #4,%sp /* orig d0 */ - addl %sp@+,%sp /* stk adj */ + addl %sp@+,%sp /* stkadj */ addql #8,%sp /* remove exception */ movel %sp,sw_ksp /* save ksp */ subql #8,sw_usp /* set exception */ @@ -109,10 +104,10 @@ rte 8: moveml %sp@,%d1-%d5/%a0-%a2 - addl #32,%sp /* space for 8 regs */ + lea %sp@(32),%sp /* space for 8 regs */ movel %sp@+,%d0 addql #4,%sp /* orig d0 */ - addl %sp@+,%sp /* stk adj */ + addl %sp@+,%sp /* stkadj */ rte .endm @@ -121,30 +116,30 @@ */ .macro SAVE_LOCAL move #0x2700,%sr /* disable intrs */ - clrl %sp@- /* stk_adj */ + clrl %sp@- /* stkadj */ movel %d0,%sp@- /* orig d0 */ movel %d0,%sp@- /* d0 */ - subl #32,%sp /* space for 8 regs */ + lea %sp@(-32),%sp /* space for 8 regs */ moveml %d1-%d5/%a0-%a2,%sp@ .endm .macro RESTORE_LOCAL moveml %sp@,%d1-%d5/%a0-%a2 - addl #32,%sp /* space for 8 regs */ + lea %sp@(32),%sp /* space for 8 regs */ movel %sp@+,%d0 addql #4,%sp /* orig d0 */ - addl %sp@+,%sp /* stk adj */ + addl %sp@+,%sp /* stkadj */ rte .endm .macro SAVE_SWITCH_STACK - subl #24,%sp /* 6 regs */ + lea %sp@(-24),%sp /* 6 regs */ moveml %a3-%a6/%d6-%d7,%sp@ .endm .macro RESTORE_SWITCH_STACK moveml %sp@,%a3-%a6/%d6-%d7 - addl #24,%sp /* 6 regs */ + lea %sp@(24),%sp /* 6 regs */ .endm /* @@ -161,7 +156,7 @@ * Standard 68k interrupt entry and exit macros. */ .macro SAVE_ALL - clrl %sp@- /* stk_adj */ + clrl %sp@- /* stkadj */ movel %d0,%sp@- /* orig d0 */ movel %d0,%sp@- /* d0 */ moveml %d1-%d5/%a0-%a2,%sp@- @@ -171,7 +166,7 @@ moveml %sp@+,%a0-%a2/%d1-%d5 movel %sp@+,%d0 addql #4,%sp /* orig d0 */ - addl %sp@+,%sp /* stk adj */ + addl %sp@+,%sp /* stkadj */ rte .endm diff -Nru a/include/asm-m68knommu/io_hw_swap.h b/include/asm-m68knommu/io_hw_swap.h --- a/include/asm-m68knommu/io_hw_swap.h 2005-03-30 16:58:50 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,113 +0,0 @@ -#ifndef _M68K_IO_HW_SWAP_H -#define _M68K_IO_HW_SWAP_H - -/* - * swap functions are sometimes needed to interface little-endian hardware - */ -static inline unsigned short _swapw(volatile unsigned short v) -{ - return ((v << 8) | (v >> 8)); -} - -static inline unsigned int _swapl(volatile unsigned long v) -{ - return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24)); -} - -/* - * readX/writeX() are used to access memory mapped devices. On some - * architectures the memory mapped IO stuff needs to be accessed - * differently. On the m68k architecture, we just read/write the - * memory location directly. - */ -/* ++roman: The assignments to temp. vars avoid that gcc sometimes generates - * two accesses to memory, which may be undesireable for some devices. - */ -#define readb(addr) \ - ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; }) -#define readw(addr) \ - ({ unsigned short __v = (*(volatile unsigned short *) (addr)); __v; }) -#define readl(addr) \ - ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; }) - -#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) -#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) -#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) - -/* There is no difference between I/O and memory on 68k, these are the same */ -#define inb(addr) \ - ({ unsigned char __v = (*(volatile unsigned char *) (addr)); __v; }) -#define inw(addr) \ - ({ unsigned short __v = (*(volatile unsigned short *) (addr)); \ - _swapw(__v); }) -#define inl(addr) \ - ({ unsigned int __v = (*(volatile unsigned int *) (addr)); _swapl(__v); }) - -#define outb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) -#define outw(b,addr) ((*(volatile unsigned short *) (addr)) = (_swapw(b))) -#define outl(b,addr) ((*(volatile unsigned int *) (addr)) = (_swapl(b))) - -/* FIXME: these need to be optimized. Watch out for byte swapping, they - * are used mostly for Intel devices... */ -#define outsw(addr,buf,len) \ - ({ unsigned short * __p = (unsigned short *)(buf); \ - unsigned short * __e = (unsigned short *)(__p) + (len); \ - while (__p < __e) { \ - *(volatile unsigned short *)(addr) = *__p++;\ - } \ - }) - -#define insw(addr,buf,len) \ - ({ unsigned short * __p = (unsigned short *)(buf); \ - unsigned short * __e = (unsigned short *)(__p) + (len); \ - while (__p < __e) { \ - *(__p++) = *(volatile unsigned short *)(addr); \ - } \ - }) - - -static inline unsigned char get_user_byte_io(const char * addr) -{ - register unsigned char _v; - - __asm__ __volatile__ ("moveb %1,%0":"=dm" (_v):"m" (*addr)); - return _v; -} -#define inb_p(addr) get_user_byte_io((char *)(addr)) - -static inline void put_user_byte_io(char val,char *addr) -{ - __asm__ __volatile__ ("moveb %0,%1" - : /* no outputs */ - :"idm" (val),"m" (*addr) - : "memory"); -} -#define outb_p(x,addr) put_user_byte_io((x),(char *)(addr)) - -/* - * Change virtual addresses to physical addresses and vv. - * These are trivial on the 1:1 Linux/i386 mapping (but if we ever - * make the kernel segment mapped at 0, we need to do translation - * on the i386 as well) - */ -extern unsigned long mm_vtop(unsigned long addr); -extern unsigned long mm_ptov(unsigned long addr); - -extern inline unsigned long virt_to_phys(volatile void * address) -{ - return (unsigned long) mm_vtop((unsigned long)address); -} - -extern inline void * phys_to_virt(unsigned long address) -{ - return (void *) mm_ptov(address); -} - -/* - * IO bus memory addresses are also 1:1 with the physical address - */ -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt - - -#endif /* _M68K_IO_HW_SWAP_H */ diff -Nru a/include/asm-m68knommu/kmap_types.h b/include/asm-m68knommu/kmap_types.h --- a/include/asm-m68knommu/kmap_types.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-m68knommu/kmap_types.h 2005-03-30 16:58:47 -08:00 @@ -1,5 +1,5 @@ -#ifndef _ASM_KMAP_TYPES_H -#define _ASM_KMAP_TYPES_H +#ifndef __ASM_M68K_KMAP_TYPES_H +#define __ASM_M68K_KMAP_TYPES_H enum km_type { KM_BOUNCE_READ, @@ -13,6 +13,8 @@ KM_PTE1, KM_IRQ0, KM_IRQ1, + KM_SOFTIRQ0, + KM_SOFTIRQ1, KM_TYPE_NR }; diff -Nru a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h --- a/include/asm-m68knommu/mcfcache.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-m68knommu/mcfcache.h 2005-03-30 16:58:50 -08:00 @@ -15,14 +15,14 @@ /* * The different ColdFire families have different cache arrangments. - * Everything from a small linstruction only cache, to configurable + * Everything from a small instruction only cache, to configurable * data and/or instruction cache, to unified instruction/data, to * harvard style separate instruction and data caches. */ #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) /* - * Simple verion 2 core cache. These have instruction cache only, + * Simple version 2 core cache. These have instruction cache only, * we just need to invalidate it and enable it. */ .macro CACHE_ENABLE @@ -98,7 +98,7 @@ #if defined(CONFIG_M5407) /* - * Version 4 cores have a true hardvard style separate instruction + * Version 4 cores have a true harvard style separate instruction * and data cache. Invalidate and enable cache, also enable write * buffers and branch accelerator. */ diff -Nru a/include/asm-m68knommu/mmu.h b/include/asm-m68knommu/mmu.h --- a/include/asm-m68knommu/mmu.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-m68knommu/mmu.h 2005-03-30 16:58:51 -08:00 @@ -3,19 +3,8 @@ /* Copyright (C) 2002, David McCullough */ -struct mm_rblock_struct { - int size; - int refcount; - void *kblock; -}; - -struct mm_tblock_struct { - struct mm_rblock_struct *rblock; - struct mm_tblock_struct *next; -}; - typedef struct { - struct mm_tblock_struct tblock; + struct vm_list_struct *vmlist; unsigned long end_brk; } mm_context_t; diff -Nru a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h --- a/include/asm-m68knommu/page.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-m68knommu/page.h 2005-03-30 16:58:48 -08:00 @@ -13,12 +13,6 @@ #include -#if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13 -#define THREAD_SIZE (8192) -#else -#define THREAD_SIZE PAGE_SIZE -#endif - #ifndef __ASSEMBLY__ #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) diff -Nru a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h --- a/include/asm-m68knommu/pgtable.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-m68knommu/pgtable.h 2005-03-30 16:58:49 -08:00 @@ -59,6 +59,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + /* * All 32bit addresses are effectively valid for vmalloc... * Sort of meaningless for non-VM targets. diff -Nru a/include/asm-m68knommu/semp3.h b/include/asm-m68knommu/semp3.h --- a/include/asm-m68knommu/semp3.h 2005-03-30 16:58:47 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,60 +0,0 @@ -/****************************************************************************/ - -/* - * semp.h -- SecureEdge MP3 hardware platform support. - * - * (C) Copyright 2001-2002, Greg Ungerer (gerg@snapgear.com). - */ - -/****************************************************************************/ -#ifndef semp3_h -#define semp3_h -/****************************************************************************/ - -#include - -/****************************************************************************/ -#ifdef CONFIG_SECUREEDGEMP3 -/****************************************************************************/ - -#include -#include - -/* - * The ColdFire UARTs do not have any support for DTR/DCD lines. - * We have wired them onto some of the parallel IO lines. - */ -#define MCFPP_DCD1 0x0004 -#define MCFPP_DCD0 0x0000 /* No DCD line on port 0 */ -#define MCFPP_DTR1 0x0080 -#define MCFPP_DTR0 0x0000 /* No DTR line on port 0 */ - - -#ifndef __ASSEMBLY__ - -extern volatile unsigned short ppdata; - -/* - * These functions defined to give quasi generic access to the - * PPIO bits used for DTR/DCD. - */ -static __inline__ unsigned int mcf_getppdata(void) -{ - volatile unsigned short *pp; - pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT); - return((unsigned int) *pp); -} - -static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits) -{ - volatile unsigned short *pp; - pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT); - ppdata = (ppdata & ~mask) | bits; - *pp = ppdata; -} -#endif - -/****************************************************************************/ -#endif /* CONFIG_SECUREEDGEMP3 */ -/****************************************************************************/ -#endif /* semp3_h */ diff -Nru a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h --- a/include/asm-m68knommu/thread_info.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-m68knommu/thread_info.h 2005-03-30 16:58:48 -08:00 @@ -15,8 +15,21 @@ #ifndef __ASSEMBLY__ /* + * Size of kernel stack for each process. This must be a power of 2... + */ +#ifdef CONFIG_4KSTACKS +#define THREAD_SIZE_ORDER (0) +#else +#define THREAD_SIZE_ORDER (1) +#endif + +/* + * for asm files, THREAD_SIZE is now generated by asm-offsets.c + */ +#define THREAD_SIZE (PAGE_SIZE<task) #define put_thread_info(ti) put_task_struct((ti)->task) #endif /* __ASSEMBLY__ */ - -/* - * Offsets in thread_info structure, used in assembly code - */ -#define TI_TASK 0 -#define TI_EXECDOMAIN 4 -#define TI_FLAGS 8 -#define TI_CPU 12 #define PREEMPT_ACTIVE 0x4000000 diff -Nru a/include/asm-m68knommu/unaligned.h b/include/asm-m68knommu/unaligned.h --- a/include/asm-m68knommu/unaligned.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-m68knommu/unaligned.h 2005-03-30 16:58:50 -08:00 @@ -5,15 +5,7 @@ #ifdef CONFIG_COLDFIRE -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +#include #else /* diff -Nru a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h --- a/include/asm-mips/pgtable.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-mips/pgtable.h 2005-03-30 16:58:48 -08:00 @@ -367,10 +367,26 @@ phys_t phys_addr_high = fixup_bigphys_addr(paddr, size); return remap_pfn_range(vma, vaddr, phys_addr_high >> PAGE_SHIFT, size, prot); } + +static inline int io_remap_pfn_range(struct vm_area_struct *vma, + unsigned long vaddr, + unsigned long pfn, + unsigned long size, + pgprot_t prot) +{ + phys_t phys_addr_high = fixup_bigphys_addr(pfn << PAGE_SHIFT, size); + return remap_pfn_range(vma, vaddr, pfn, size, prot); +} #else #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ - remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) + remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) #endif + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) #include diff -Nru a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h --- a/include/asm-mips/uaccess.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-mips/uaccess.h 2005-03-30 16:58:47 -08:00 @@ -258,7 +258,8 @@ \ might_sleep(); \ __gu_addr = (long) (ptr); \ - __gu_err = verify_area(VERIFY_READ, (void *) __gu_addr, size); \ + __gu_err = access_ok(VERIFY_READ, (void *) __gu_addr, size) \ + ? 0 : -EFAULT; \ \ if (likely(!__gu_err)) { \ switch (size) { \ @@ -353,7 +354,8 @@ might_sleep(); \ __pu_val = (x); \ __pu_addr = (long) (ptr); \ - __pu_err = verify_area(VERIFY_WRITE, (void *) __pu_addr, size); \ + __pu_err = access_ok(VERIFY_WRITE, (void *) __pu_addr, size) \ + ? 0 : -EFAULT; \ \ if (likely(!__pu_err)) { \ switch (size) { \ diff -Nru a/include/asm-mips/unaligned.h b/include/asm-mips/unaligned.h --- a/include/asm-mips/unaligned.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-mips/unaligned.h 2005-03-30 16:58:50 -08:00 @@ -9,136 +9,6 @@ #ifndef _ASM_UNALIGNED_H #define _ASM_UNALIGNED_H -#include - -/* - * get_unaligned - get value from possibly mis-aligned location - * @ptr: pointer to value - * - * This macro should be used for accessing values larger in size than - * single bytes at locations that are expected to be improperly aligned, - * e.g. retrieving a u16 value from a location not u16-aligned. - * - * Note that unaligned accesses can be very expensive on some architectures. - */ -#define get_unaligned(ptr) \ - ((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr)))) - -/* - * put_unaligned - put value to a possibly mis-aligned location - * @val: value to place - * @ptr: pointer to location - * - * This macro should be used for placing values larger in size than - * single bytes at locations that are expected to be improperly aligned, - * e.g. writing a u16 value to a location not u16-aligned. - * - * Note that unaligned accesses can be very expensive on some architectures. - */ -#define put_unaligned(x,ptr) \ - __put_unaligned((__u64)(x), (ptr), sizeof(*(ptr))) - -/* - * This is a silly but good way to make sure that - * the get/put functions are indeed always optimized, - * and that we use the correct sizes. - */ -extern void bad_unaligned_access_length(void); - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -struct __una_u64 { __u64 x __attribute__((packed)); }; -struct __una_u32 { __u32 x __attribute__((packed)); }; -struct __una_u16 { __u16 x __attribute__((packed)); }; - -/* - * Elemental unaligned loads - */ - -static inline __u64 __uldq(const __u64 * r11) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -} - -static inline __u32 __uldl(const __u32 * r11) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -} - -static inline __u16 __uldw(const __u16 * r11) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -} - -/* - * Elemental unaligned stores - */ - -static inline void __ustq(__u64 r5, __u64 * r11) -{ - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -} - -static inline void __ustl(__u32 r5, __u32 * r11) -{ - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -} - -static inline void __ustw(__u16 r5, __u16 * r11) -{ - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -} - -static inline __u64 __get_unaligned(const void *ptr, size_t size) -{ - __u64 val; - - switch (size) { - case 1: - val = *(const __u8 *)ptr; - break; - case 2: - val = __uldw((const __u16 *)ptr); - break; - case 4: - val = __uldl((const __u32 *)ptr); - break; - case 8: - val = __uldq((const __u64 *)ptr); - break; - default: - bad_unaligned_access_length(); - } - return val; -} - -static inline void __put_unaligned(__u64 val, void *ptr, size_t size) -{ - switch (size) { - case 1: - *(__u8 *)ptr = (val); - break; - case 2: - __ustw(val, (__u16 *)ptr); - break; - case 4: - __ustl(val, (__u32 *)ptr); - break; - case 8: - __ustq(val, (__u64 *)ptr); - break; - default: - bad_unaligned_access_length(); - } -} +#include #endif /* _ASM_UNALIGNED_H */ diff -Nru a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h --- a/include/asm-parisc/pgalloc.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-parisc/pgalloc.h 2005-03-30 16:58:50 -08:00 @@ -7,7 +7,6 @@ #include #include -#include #include /* Allocate the top level pgd (page directory) diff -Nru a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h --- a/include/asm-parisc/pgtable.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-parisc/pgtable.h 2005-03-30 16:58:50 -08:00 @@ -501,6 +501,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + /* We provide our own get_unmapped_area to provide cache coherency */ #define HAVE_ARCH_UNMAPPED_AREA diff -Nru a/include/asm-parisc/unaligned.h b/include/asm-parisc/unaligned.h --- a/include/asm-parisc/unaligned.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-parisc/unaligned.h 2005-03-30 16:58:49 -08:00 @@ -1,22 +1,7 @@ #ifndef _ASM_PARISC_UNALIGNED_H_ #define _ASM_PARISC_UNALIGNED_H_ -/* parisc can't handle unaligned accesses. */ -/* copied from asm-sparc/unaligned.h */ - -#include - - -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) - +#include #ifdef __KERNEL__ struct pt_regs; diff -Nru a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h --- a/include/asm-ppc/cpm2.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ppc/cpm2.h 2005-03-30 16:58:48 -08:00 @@ -69,6 +69,7 @@ #define CPM_CR_INIT_TX ((ushort)0x0002) #define CPM_CR_HUNT_MODE ((ushort)0x0003) #define CPM_CR_STOP_TX ((ushort)0x0004) +#define CPM_CR_GRA_STOP_TX ((ushort)0x0005) #define CPM_CR_RESTART_TX ((ushort)0x0006) #define CPM_CR_SET_GADDR ((ushort)0x0008) #define CPM_CR_START_IDMA ((ushort)0x0009) diff -Nru a/include/asm-ppc/dma.h b/include/asm-ppc/dma.h --- a/include/asm-ppc/dma.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc/dma.h 2005-03-30 16:58:50 -08:00 @@ -25,7 +25,6 @@ * with a grain of salt. */ - #ifndef _ASM_DMA_H #define _ASM_DMA_H @@ -192,9 +191,9 @@ /* enable/disable a specific DMA channel */ static __inline__ void enable_dma(unsigned int dmanr) { - unsigned char ucDmaCmd=0x00; + unsigned char ucDmaCmd = 0x00; - if (dmanr != 4) { + if (dmanr != 4) { dma_outb(0, DMA2_MASK_REG); /* This may not be enabled */ dma_outb(ucDmaCmd, DMA2_CMD_REG); /* Enable group */ } @@ -244,60 +243,58 @@ */ static __inline__ void set_dma_page(unsigned int dmanr, int pagenr) { - switch(dmanr) { - case 0: - dma_outb(pagenr, DMA_LO_PAGE_0); - dma_outb(pagenr >> 8, DMA_HI_PAGE_0); - break; - case 1: - dma_outb(pagenr, DMA_LO_PAGE_1); - dma_outb(pagenr >> 8, DMA_HI_PAGE_1); - break; - case 2: - dma_outb(pagenr, DMA_LO_PAGE_2); - dma_outb(pagenr >> 8, DMA_HI_PAGE_2); - break; - case 3: - dma_outb(pagenr, DMA_LO_PAGE_3); - dma_outb(pagenr >> 8, DMA_HI_PAGE_3); - break; - case 5: - if (SND_DMA1 == 5 || SND_DMA2 == 5) - dma_outb(pagenr, DMA_LO_PAGE_5); - else - dma_outb(pagenr & 0xfe, DMA_LO_PAGE_5); - dma_outb(pagenr >> 8, DMA_HI_PAGE_5); - break; - case 6: - if (SND_DMA1 == 6 || SND_DMA2 == 6) - dma_outb(pagenr, DMA_LO_PAGE_6); - else - dma_outb(pagenr & 0xfe, DMA_LO_PAGE_6); - dma_outb(pagenr >> 8, DMA_HI_PAGE_6); - break; - case 7: - if (SND_DMA1 == 7 || SND_DMA2 == 7) - dma_outb(pagenr, DMA_LO_PAGE_7); - else - dma_outb(pagenr & 0xfe, DMA_LO_PAGE_7); - dma_outb(pagenr >> 8, DMA_HI_PAGE_7); - break; + switch (dmanr) { + case 0: + dma_outb(pagenr, DMA_LO_PAGE_0); + dma_outb(pagenr >> 8, DMA_HI_PAGE_0); + break; + case 1: + dma_outb(pagenr, DMA_LO_PAGE_1); + dma_outb(pagenr >> 8, DMA_HI_PAGE_1); + break; + case 2: + dma_outb(pagenr, DMA_LO_PAGE_2); + dma_outb(pagenr >> 8, DMA_HI_PAGE_2); + break; + case 3: + dma_outb(pagenr, DMA_LO_PAGE_3); + dma_outb(pagenr >> 8, DMA_HI_PAGE_3); + break; + case 5: + if (SND_DMA1 == 5 || SND_DMA2 == 5) + dma_outb(pagenr, DMA_LO_PAGE_5); + else + dma_outb(pagenr & 0xfe, DMA_LO_PAGE_5); + dma_outb(pagenr >> 8, DMA_HI_PAGE_5); + break; + case 6: + if (SND_DMA1 == 6 || SND_DMA2 == 6) + dma_outb(pagenr, DMA_LO_PAGE_6); + else + dma_outb(pagenr & 0xfe, DMA_LO_PAGE_6); + dma_outb(pagenr >> 8, DMA_HI_PAGE_6); + break; + case 7: + if (SND_DMA1 == 7 || SND_DMA2 == 7) + dma_outb(pagenr, DMA_LO_PAGE_7); + else + dma_outb(pagenr & 0xfe, DMA_LO_PAGE_7); + dma_outb(pagenr >> 8, DMA_HI_PAGE_7); + break; } } - /* Set transfer address & page bits for specific DMA channel. * Assumes dma flipflop is clear. */ static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int phys) { if (dmanr <= 3) { - dma_outb(phys & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE ); + dma_outb(phys & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE); dma_outb((phys >> 8) & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE); } else if (dmanr == SND_DMA1 || dmanr == SND_DMA2) { - dma_outb(phys & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE ); - dma_outb((phys >> 8) & 0xff, ((dmanr & 3) << 2) + - IO_DMA2_BASE); + dma_outb(phys & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE); + dma_outb((phys >> 8) & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE); dma_outb((dmanr & 3), DMA2_EXT_REG); } else { dma_outb((phys >> 1) & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE); @@ -306,7 +303,6 @@ set_dma_page(dmanr, phys >> 16); } - /* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for * a specific DMA channel. * You must ensure the parameters are valid. @@ -321,16 +317,16 @@ if (dmanr <= 3) { dma_outb(count & 0xff, ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE); dma_outb((count >> 8) & 0xff, ((dmanr & 3) << 1) + 1 + - IO_DMA1_BASE); + IO_DMA1_BASE); } else if (dmanr == SND_DMA1 || dmanr == SND_DMA2) { - dma_outb( count & 0xff, ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); - dma_outb( (count >> 8) & 0xff, ((dmanr & 3) << 2) + 2 + - IO_DMA2_BASE); + dma_outb(count & 0xff, ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE); + dma_outb((count >> 8) & 0xff, ((dmanr & 3) << 2) + 2 + + IO_DMA2_BASE); } else { dma_outb((count >> 1) & 0xff, ((dmanr & 3) << 2) + 2 + - IO_DMA2_BASE); + IO_DMA2_BASE); dma_outb((count >> 9) & 0xff, ((dmanr & 3) << 2) + 2 + - IO_DMA2_BASE); + IO_DMA2_BASE); } } @@ -345,8 +341,8 @@ static __inline__ int get_dma_residue(unsigned int dmanr) { unsigned int io_port = (dmanr <= 3) ? - ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE - : ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE; + ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE + : ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE; /* using short to get 16-bit wrap around */ unsigned short count; @@ -355,14 +351,14 @@ count += dma_inb(io_port) << 8; return (dmanr <= 3 || dmanr == SND_DMA1 || dmanr == SND_DMA2) - ? count : (count<<1); + ? count : (count << 1); } /* These are in kernel/dma.c: */ /* reserve a DMA channel */ -extern int request_dma(unsigned int dmanr, const char * device_id); +extern int request_dma(unsigned int dmanr, const char *device_id); /* release it again */ extern void free_dma(unsigned int dmanr); @@ -371,5 +367,5 @@ #else #define isa_dma_bridge_buggy (0) #endif -#endif /* _ASM_DMA_H */ -#endif /* __KERNEL__ */ +#endif /* _ASM_DMA_H */ +#endif /* __KERNEL__ */ diff -Nru a/include/asm-ppc/floppy.h b/include/asm-ppc/floppy.h --- a/include/asm-ppc/floppy.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-ppc/floppy.h 2005-03-30 16:58:51 -08:00 @@ -11,28 +11,149 @@ #ifndef __ASM_PPC_FLOPPY_H #define __ASM_PPC_FLOPPY_H -#define fd_inb(port) inb_p(port) -#define fd_outb(value,port) outb_p(value,port) +#define fd_inb(port) inb_p(port) +#define fd_outb(value,port) outb_p(value,port) -#define fd_enable_dma() enable_dma(FLOPPY_DMA) -#define fd_disable_dma() disable_dma(FLOPPY_DMA) -#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy") -#define fd_free_dma() free_dma(FLOPPY_DMA) -#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) -#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA,mode) -#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA,(unsigned int)virt_to_bus(addr)) -#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count) +#define fd_disable_dma() fd_ops->_disable_dma(FLOPPY_DMA) +#define fd_free_dma() fd_ops->_free_dma(FLOPPY_DMA) +#define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA) +#define fd_dma_setup(addr, size, mode, io) fd_ops->_dma_setup(addr, size, mode, io) #define fd_enable_irq() enable_irq(FLOPPY_IRQ) #define fd_disable_irq() disable_irq(FLOPPY_IRQ) -#define fd_cacheflush(addr,size) /* nothing */ -#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ - SA_INTERRUPT|SA_SAMPLE_RANDOM, \ - "floppy", NULL) #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); -__inline__ void virtual_dma_init(void) +static int fd_request_dma(void); + +struct fd_dma_ops { + void (*_disable_dma)(unsigned int dmanr); + void (*_free_dma)(unsigned int dmanr); + int (*_get_dma_residue)(unsigned int dummy); + int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); +}; + +static int virtual_dma_count; +static int virtual_dma_residue; +static char *virtual_dma_addr; +static int virtual_dma_mode; +static int doing_vdma; +static struct fd_dma_ops *fd_ops; + +static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) +{ + unsigned char st; + int lcount; + char *lptr; + + if (!doing_vdma) + return floppy_interrupt(irq, dev_id, regs); + + + st = 1; + for (lcount=virtual_dma_count, lptr=virtual_dma_addr; + lcount; lcount--, lptr++) { + st=inb(virtual_dma_port+4) & 0xa0 ; + if (st != 0xa0) + break; + if (virtual_dma_mode) + outb_p(*lptr, virtual_dma_port+5); + else + *lptr = inb_p(virtual_dma_port+5); + } + virtual_dma_count = lcount; + virtual_dma_addr = lptr; + st = inb(virtual_dma_port+4); + + if (st == 0x20) + return IRQ_HANDLED; + if (!(st & 0x20)) { + virtual_dma_residue += virtual_dma_count; + virtual_dma_count=0; + doing_vdma = 0; + floppy_interrupt(irq, dev_id, regs); + return IRQ_HANDLED; + } + return IRQ_HANDLED; +} + +static void vdma_disable_dma(unsigned int dummy) +{ + doing_vdma = 0; + virtual_dma_residue += virtual_dma_count; + virtual_dma_count=0; +} + +static void vdma_nop(unsigned int dummy) +{ +} + + +static int vdma_get_dma_residue(unsigned int dummy) +{ + return virtual_dma_count + virtual_dma_residue; +} + + +static int fd_request_irq(void) +{ + if (can_use_virtual_dma) + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", NULL); + else + return request_irq(FLOPPY_IRQ, floppy_interrupt, + SA_INTERRUPT|SA_SAMPLE_RANDOM, + "floppy", NULL); + +} + +static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) +{ + doing_vdma = 1; + virtual_dma_port = io; + virtual_dma_mode = (mode == DMA_MODE_WRITE); + virtual_dma_addr = addr; + virtual_dma_count = size; + virtual_dma_residue = 0; + return 0; +} + +static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) +{ + /* actual, physical DMA */ + doing_vdma = 0; + clear_dma_ff(FLOPPY_DMA); + set_dma_mode(FLOPPY_DMA,mode); + set_dma_addr(FLOPPY_DMA,(unsigned int)virt_to_bus(addr)); + set_dma_count(FLOPPY_DMA,size); + enable_dma(FLOPPY_DMA); + return 0; +} + +static struct fd_dma_ops real_dma_ops = +{ + ._disable_dma = disable_dma, + ._free_dma = free_dma, + ._get_dma_residue = get_dma_residue, + ._dma_setup = hard_dma_setup +}; + +static struct fd_dma_ops virt_dma_ops = +{ + ._disable_dma = vdma_disable_dma, + ._free_dma = vdma_nop, + ._get_dma_residue = vdma_get_dma_residue, + ._dma_setup = vdma_dma_setup +}; + +static int fd_request_dma() { - /* Nothing to do on PowerPC */ + if (can_use_virtual_dma & 1) { + fd_ops = &virt_dma_ops; + return 0; + } + else { + fd_ops = &real_dma_ops; + return request_dma(FLOPPY_DMA, "floppy"); + } } static int FDC1 = 0x3f0; diff -Nru a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h --- a/include/asm-ppc/machdep.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ppc/machdep.h 2005-03-30 16:58:48 -08:00 @@ -6,6 +6,7 @@ #include #include +#include #ifdef CONFIG_APUS #include @@ -15,6 +16,7 @@ struct pci_bus; struct pci_dev; struct seq_file; +struct file; /* We export this macro for external modules like Alsa to know if * ppc_md.feature_call is implemented or not @@ -92,6 +94,12 @@ /* Called at then very end of pcibios_init() */ void (*pcibios_after_init)(void); + + /* Get access protection for /dev/mem */ + pgprot_t (*phys_mem_access_prot)(struct file *file, + unsigned long offset, + unsigned long size, + pgprot_t vma_prot); /* this is for modules, since _machine can be a define -- Cort */ int ppc_machine; diff -Nru a/include/asm-ppc/mpc10x.h b/include/asm-ppc/mpc10x.h --- a/include/asm-ppc/mpc10x.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-ppc/mpc10x.h 2005-03-30 16:58:51 -08:00 @@ -115,8 +115,8 @@ #define MPC10X_CFG_MAPB_OPTIONS_CFAE 0x80 /* CPU_FD_ALIAS_EN */ #define MPC10X_CFG_MAPB_OPTIONS_PFAE 0x40 /* PCI_FD_ALIAS_EN */ #define MPC10X_CFG_MAPB_OPTIONS_DR 0x20 /* DLL_RESET */ -#define MPC10X_CFG_MAPB_OPTIONS_PCICH 0x80 /* PCI_COMPATIBILITY_HOLE */ -#define MPC10X_CFG_MAPB_OPTIONS_PROCCH 0x40 /* PROC_COMPATIBILITY_HOLE */ +#define MPC10X_CFG_MAPB_OPTIONS_PCICH 0x08 /* PCI_COMPATIBILITY_HOLE */ +#define MPC10X_CFG_MAPB_OPTIONS_PROCCH 0x04 /* PROC_COMPATIBILITY_HOLE */ /* Define offsets for the memory controller registers in the config space */ #define MPC10X_MCTLR_MEM_START_1 0x80 /* Banks 0-3 */ diff -Nru a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h --- a/include/asm-ppc/mpc52xx.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc/mpc52xx.h 2005-03-30 16:58:50 -08:00 @@ -393,6 +393,8 @@ extern void mpc52xx_calibrate_decr(void); extern void mpc52xx_add_board_devices(struct ocp_def board_ocp[]); +extern void mpc52xx_find_bridges(void); + #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-ppc/mv64x60_defs.h b/include/asm-ppc/mv64x60_defs.h --- a/include/asm-ppc/mv64x60_defs.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc/mv64x60_defs.h 2005-03-30 16:58:50 -08:00 @@ -347,7 +347,7 @@ #define MV64360_SRAM_ERR_DATA_HI 0x03a0 #define MV64360_SRAM_ERR_PARITY 0x03a8 -#define MV64360_SRAM_SIZE 0x00200000 /* 2 MB of SRAM */ +#define MV64360_SRAM_SIZE 0x00040000 /* 2Mb/256KB SRAM */ /* ***************************************************************************** diff -Nru a/include/asm-ppc/page.h b/include/asm-ppc/page.h --- a/include/asm-ppc/page.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ppc/page.h 2005-03-30 16:58:48 -08:00 @@ -137,6 +137,8 @@ #define ___va(paddr) ((paddr)+PPC_MEMOFFSET) #endif +extern int page_is_ram(unsigned long pfn); + #define __pa(x) ___pa((unsigned long)(x)) #define __va(x) ((void *)(___va((unsigned long)(x)))) diff -Nru a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h --- a/include/asm-ppc/pci.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-ppc/pci.h 2005-03-30 16:58:49 -08:00 @@ -97,6 +97,12 @@ extern void pcibios_add_platform_entries(struct pci_dev *dev); +struct file; +extern pgprot_t pci_phys_mem_access_prot(struct file *file, + unsigned long offset, + unsigned long size, + pgprot_t prot); + #endif /* __KERNEL__ */ #endif /* __PPC_PCI_H */ diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h --- a/include/asm-ppc/pgtable.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc/pgtable.h 2005-03-30 16:58:50 -08:00 @@ -623,6 +623,11 @@ */ #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NO_CACHE | _PAGE_GUARDED)) +struct file; +extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, + unsigned long size, pgprot_t vma_prot); +#define __HAVE_PHYS_MEM_ACCESS_PROT + #define __HAVE_ARCH_PTE_SAME #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0) @@ -735,10 +740,26 @@ phys_addr_t paddr64 = fixup_bigphys_addr(paddr, size); return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); } + +static inline int io_remap_pfn_range(struct vm_area_struct *vma, + unsigned long vaddr, + unsigned long pfn, + unsigned long size, + pgprot_t prot) +{ + phys_addr_t paddr64 = fixup_bigphys_addr(pfn << PAGE_SHIFT, size); + return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); +} #else #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) #endif + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) /* * No page table caches to initialise diff -Nru a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h --- a/include/asm-ppc/serial.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc/serial.h 2005-03-30 16:58:50 -08:00 @@ -22,6 +22,8 @@ #include #elif defined(CONFIG_MVME5100) #include +#elif defined(CONFIG_PAL4) +#include #elif defined(CONFIG_PRPMC750) #include #elif defined(CONFIG_PRPMC800) diff -Nru a/include/asm-ppc64/dma-mapping.h b/include/asm-ppc64/dma-mapping.h --- a/include/asm-ppc64/dma-mapping.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-ppc64/dma-mapping.h 2005-03-30 16:58:51 -08:00 @@ -19,7 +19,7 @@ extern int dma_supported(struct device *dev, u64 mask); extern int dma_set_mask(struct device *dev, u64 dma_mask); extern void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int flag); + dma_addr_t *dma_handle, unsigned int __nocast flag); extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle); extern dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, @@ -118,7 +118,7 @@ */ struct dma_mapping_ops { void * (*alloc_coherent)(struct device *dev, size_t size, - dma_addr_t *dma_handle, int flag); + dma_addr_t *dma_handle, unsigned int __nocast flag); void (*free_coherent)(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle); dma_addr_t (*map_single)(struct device *dev, void *ptr, diff -Nru a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h --- a/include/asm-ppc64/hvcall.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-ppc64/hvcall.h 2005-03-30 16:58:47 -08:00 @@ -1,6 +1,8 @@ #ifndef _PPC64_HVCALL_H #define _PPC64_HVCALL_H +#define HVSC .long 0x44000022 + #define H_Success 0 #define H_Busy 1 /* Hardware busy -- retry later */ #define H_Constrained 4 /* Resource request constrained to max allowed */ @@ -41,7 +43,7 @@ /* Flags */ #define H_LARGE_PAGE (1UL<<(63-16)) -#define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */ +#define H_EXACT (1UL<<(63-24)) /* Use exact PTE or return H_PTEG_FULL */ #define H_R_XLATE (1UL<<(63-25)) /* include a valid logical page num in the pte if the valid bit is set */ #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */ #define H_AVPN (1UL<<(63-32)) /* An avpn is provided as a sanity test */ @@ -54,8 +56,6 @@ #define H_PP1 (1UL<<(63-62)) #define H_PP2 (1UL<<(63-63)) - - /* pSeries hypervisor opcodes */ #define H_REMOVE 0x04 #define H_ENTER 0x08 @@ -108,6 +108,8 @@ #define H_FREE_VTERM 0x158 #define H_POLL_PENDING 0x1D8 +#ifndef __ASSEMBLY__ + /* plpar_hcall() -- Generic call interface using above opcodes * * The actual call interface is a hypervisor call instruction with @@ -125,8 +127,6 @@ unsigned long *out2, unsigned long *out3); -#define HVSC ".long 0x44000022\n" - /* Same as plpar_hcall but for those opcodes that return no values * other than status. Slightly more efficient. */ @@ -147,9 +147,6 @@ unsigned long arg7, unsigned long arg8, unsigned long *out1); - - - /* plpar_hcall_4out() * @@ -166,4 +163,5 @@ unsigned long *out3, unsigned long *out4); +#endif /* __ASSEMBLY__ */ #endif /* _PPC64_HVCALL_H */ diff -Nru a/include/asm-ppc64/iSeries/iSeries_fixup.h b/include/asm-ppc64/iSeries/iSeries_fixup.h --- a/include/asm-ppc64/iSeries/iSeries_fixup.h 2005-03-30 16:58:49 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,25 +0,0 @@ - -#ifndef __ISERIES_FIXUP_H__ -#define __ISERIES_FIXUP_H__ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void iSeries_fixup (void); -void iSeries_fixup_bus (struct pci_bus*); -unsigned int iSeries_scan_slot (struct pci_dev*, u16, u8, u8); - - -/* Need to store information related to the PHB bucc and make it accessible to the hose */ -struct iSeries_hose_arch_data { - u32 hvBusNumber; -}; - - -#ifdef __cplusplus -} -#endif - -#endif /* __ISERIES_FIXUP_H__ */ diff -Nru a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h --- a/include/asm-ppc64/iommu.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-ppc64/iommu.h 2005-03-30 16:58:49 -08:00 @@ -146,7 +146,7 @@ int nelems, enum dma_data_direction direction); extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, - dma_addr_t *dma_handle, int flag); + dma_addr_t *dma_handle, unsigned int __nocast flag); extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, void *vaddr, dma_addr_t dma_handle); extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, diff -Nru a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h --- a/include/asm-ppc64/machdep.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-ppc64/machdep.h 2005-03-30 16:58:51 -08:00 @@ -21,6 +21,7 @@ struct device_node; struct iommu_table; struct rtc_time; +struct file; #ifdef CONFIG_SMP struct smp_ops_t { @@ -33,6 +34,7 @@ int (*cpu_enable)(unsigned int nr); int (*cpu_disable)(void); void (*cpu_die)(unsigned int nr); + int (*cpu_bootable)(unsigned int nr); }; #endif @@ -130,6 +132,12 @@ /* Get legacy PCI/IDE interrupt mapping */ int (*pci_get_legacy_ide_irq)(struct pci_dev *dev, int channel); + /* Get access protection for /dev/mem */ + pgprot_t (*phys_mem_access_prot)(struct file *file, + unsigned long offset, + unsigned long size, + pgprot_t vma_prot); + }; extern struct machdep_calls ppc_md; diff -Nru a/include/asm-ppc64/pSeries_reconfig.h b/include/asm-ppc64/pSeries_reconfig.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-ppc64/pSeries_reconfig.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,25 @@ +#ifndef _PPC64_PSERIES_RECONFIG_H +#define _PPC64_PSERIES_RECONFIG_H + +#include + +/* + * Use this API if your code needs to know about OF device nodes being + * added or removed on pSeries systems. + */ + +#define PSERIES_RECONFIG_ADD 0x0001 +#define PSERIES_RECONFIG_REMOVE 0x0002 + +#ifdef CONFIG_PPC_PSERIES +extern int pSeries_reconfig_notifier_register(struct notifier_block *); +extern void pSeries_reconfig_notifier_unregister(struct notifier_block *); +#else /* !CONFIG_PPC_PSERIES */ +static inline int pSeries_reconfig_notifier_register(struct notifier_block *nb) +{ + return 0; +} +static inline void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) { } +#endif /* CONFIG_PPC_PSERIES */ + +#endif /* _PPC64_PSERIES_RECONFIG_H */ diff -Nru a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h --- a/include/asm-ppc64/paca.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ppc64/paca.h 2005-03-30 16:58:48 -08:00 @@ -22,7 +22,6 @@ #include #include -extern struct paca_struct paca[]; register struct paca_struct *local_paca asm("r13"); #define get_paca() local_paca @@ -114,5 +113,7 @@ struct ItLpRegSave reg_save; #endif }; + +extern struct paca_struct paca[]; #endif /* _PPC64_PACA_H */ diff -Nru a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h --- a/include/asm-ppc64/page.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-ppc64/page.h 2005-03-30 16:58:47 -08:00 @@ -48,8 +48,8 @@ #define ARCH_HAS_HUGEPAGE_ONLY_RANGE #define ARCH_HAS_PREPARE_HUGEPAGE_RANGE -#define touches_hugepage_low_range(addr, len) \ - (LOW_ESID_MASK((addr), (len)) & current->mm->context.htlb_segs) +#define touches_hugepage_low_range(mm, addr, len) \ + (LOW_ESID_MASK((addr), (len)) & mm->context.htlb_segs) #define touches_hugepage_high_range(addr, len) \ (((addr) > (TASK_HPAGE_BASE-(len))) && ((addr) < TASK_HPAGE_END)) @@ -61,9 +61,9 @@ #define within_hugepage_high_range(addr, len) (((addr) >= TASK_HPAGE_BASE) \ && ((addr)+(len) <= TASK_HPAGE_END) && ((addr)+(len) >= (addr))) -#define is_hugepage_only_range(addr, len) \ +#define is_hugepage_only_range(mm, addr, len) \ (touches_hugepage_high_range((addr), (len)) || \ - touches_hugepage_low_range((addr), (len))) + touches_hugepage_low_range((mm), (addr), (len))) #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA #define in_hugepage_area(context, addr) \ diff -Nru a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h --- a/include/asm-ppc64/pci.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-ppc64/pci.h 2005-03-30 16:58:48 -08:00 @@ -130,6 +130,13 @@ extern void pcibios_add_platform_entries(struct pci_dev *dev); +struct file; +extern pgprot_t pci_phys_mem_access_prot(struct file *file, + unsigned long offset, + unsigned long size, + pgprot_t prot); + + #endif /* __KERNEL__ */ #endif /* __PPC64_PCI_H */ diff -Nru a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h --- a/include/asm-ppc64/pgalloc.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-ppc64/pgalloc.h 2005-03-30 16:58:47 -08:00 @@ -5,9 +5,6 @@ #include #include #include -#include -#include -#include extern kmem_cache_t *zero_cache; diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h --- a/include/asm-ppc64/pgtable.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc64/pgtable.h 2005-03-30 16:58:50 -08:00 @@ -472,6 +472,11 @@ */ #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NO_CACHE | _PAGE_GUARDED)) +struct file; +extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, + unsigned long size, pgprot_t vma_prot); +#define __HAVE_PHYS_MEM_ACCESS_PROT + #define __HAVE_ARCH_PTE_SAME #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0) @@ -526,6 +531,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) + +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) void pgtable_cache_init(void); diff -Nru a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h --- a/include/asm-ppc64/prom.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-ppc64/prom.h 2005-03-30 16:58:50 -08:00 @@ -209,8 +209,8 @@ extern void of_node_put(struct device_node *node); /* For updating the device tree at runtime */ -extern int of_add_node(const char *path, struct property *proplist); -extern int of_remove_node(struct device_node *np); +extern void of_attach_node(struct device_node *); +extern void of_detach_node(const struct device_node *); /* Other Prototypes */ extern unsigned long prom_init(unsigned long, unsigned long, unsigned long, diff -Nru a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h --- a/include/asm-ppc64/uaccess.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-ppc64/uaccess.h 2005-03-30 16:58:49 -08:00 @@ -120,6 +120,7 @@ #define __put_user_nocheck(x,ptr,size) \ ({ \ long __pu_err; \ + might_sleep(); \ __chk_user_ptr(ptr); \ __put_user_size((x),(ptr),(size),__pu_err,-EFAULT); \ __pu_err; \ @@ -129,6 +130,7 @@ ({ \ long __pu_err = -EFAULT; \ void __user *__pu_addr = (ptr); \ + might_sleep(); \ if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ __put_user_size((x),__pu_addr,(size),__pu_err,-EFAULT); \ __pu_err; \ @@ -136,7 +138,6 @@ #define __put_user_size(x,ptr,size,retval,errret) \ do { \ - might_sleep(); \ retval = 0; \ switch (size) { \ case 1: __put_user_asm(x,ptr,retval,"stb",errret); break; \ @@ -171,6 +172,7 @@ #define __get_user_nocheck(x,ptr,size) \ ({ \ long __gu_err, __gu_val; \ + might_sleep(); \ __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT);\ (x) = (__typeof__(*(ptr)))__gu_val; \ __gu_err; \ @@ -180,6 +182,7 @@ ({ \ long __gu_err = -EFAULT, __gu_val = 0; \ const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ + might_sleep(); \ if (access_ok(VERIFY_READ,__gu_addr,size)) \ __get_user_size(__gu_val,__gu_addr,(size),__gu_err,-EFAULT);\ (x) = (__typeof__(*(ptr)))__gu_val; \ @@ -190,7 +193,6 @@ #define __get_user_size(x,ptr,size,retval,errret) \ do { \ - might_sleep(); \ retval = 0; \ __chk_user_ptr(ptr); \ switch (size) { \ @@ -224,9 +226,8 @@ unsigned long size); static inline unsigned long -__copy_from_user(void *to, const void __user *from, unsigned long n) +__copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) { - might_sleep(); if (__builtin_constant_p(n)) { unsigned long ret; @@ -249,9 +250,15 @@ } static inline unsigned long -__copy_to_user(void __user *to, const void *from, unsigned long n) +__copy_from_user(void *to, const void __user *from, unsigned long n) { might_sleep(); + return __copy_from_user_inatomic(to, from, n); +} + +static inline unsigned long +__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) +{ if (__builtin_constant_p(n)) { unsigned long ret; @@ -273,6 +280,13 @@ return __copy_tofrom_user(to, (__force const void __user *) from, n); } +static inline unsigned long +__copy_to_user(void __user *to, const void *from, unsigned long n) +{ + might_sleep(); + return __copy_to_user_inatomic(to, from, n); +} + #define __copy_in_user(to, from, size) \ __copy_tofrom_user((to), (from), (size)) @@ -284,9 +298,6 @@ unsigned long n); extern unsigned long __clear_user(void __user *addr, unsigned long size); - -#define __copy_to_user_inatomic __copy_to_user -#define __copy_from_user_inatomic __copy_from_user static inline unsigned long clear_user(void __user *addr, unsigned long size) diff -Nru a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h --- a/include/asm-s390/atomic.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-s390/atomic.h 2005-03-30 16:58:47 -08:00 @@ -61,6 +61,10 @@ { __CS_LOOP(v, i, "sr"); } +static __inline__ int atomic_sub_return(int i, atomic_t * v) +{ + return __CS_LOOP(v, i, "sr"); +} static __inline__ void atomic_inc(volatile atomic_t * v) { __CS_LOOP(v, 1, "ar"); diff -Nru a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h --- a/include/asm-s390/ccwdev.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-s390/ccwdev.h 2005-03-30 16:58:50 -08:00 @@ -164,6 +164,8 @@ extern int read_dev_chars(struct ccw_device *cdev, void **buffer, int length); extern int read_conf_data(struct ccw_device *cdev, void **buffer, int *length); +extern int read_conf_data_lpm(struct ccw_device *cdev, void **buffer, + int *length, __u8 lpm); extern int ccw_device_set_online(struct ccw_device *cdev); extern int ccw_device_set_offline(struct ccw_device *cdev); @@ -186,4 +188,5 @@ extern struct device *s390_root_dev_register(const char *); extern void s390_root_dev_unregister(struct device *); +extern void *ccw_device_get_chp_desc(struct ccw_device *, int); #endif /* _S390_CCWDEV_H_ */ diff -Nru a/include/asm-s390/cputime.h b/include/asm-s390/cputime.h --- a/include/asm-s390/cputime.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-s390/cputime.h 2005-03-30 16:58:49 -08:00 @@ -9,6 +9,8 @@ #ifndef _S390_CPUTIME_H #define _S390_CPUTIME_H +#include + /* We want to use micro-second resolution. */ typedef unsigned long long cputime_t; @@ -40,6 +42,12 @@ #define cputime_max ((~0UL >> 1) - 1) #define cputime_add(__a, __b) ((__a) + (__b)) #define cputime_sub(__a, __b) ((__a) - (__b)) +#define cputime_div(__a, __n) ({ \ + unsigned long long __div = (__a); \ + do_div(__div,__n); \ + __div; \ +}) +#define cputime_halve(__a) ((__a) >> 1) #define cputime_eq(__a, __b) ((__a) == (__b)) #define cputime_gt(__a, __b) ((__a) > (__b)) #define cputime_ge(__a, __b) ((__a) >= (__b)) diff -Nru a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h --- a/include/asm-s390/pgalloc.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-s390/pgalloc.h 2005-03-30 16:58:49 -08:00 @@ -14,7 +14,6 @@ #define _S390_PGALLOC_H #include -#include #include #include #include diff -Nru a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h --- a/include/asm-s390/unistd.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-s390/unistd.h 2005-03-30 16:58:51 -08:00 @@ -259,7 +259,7 @@ #define __NR_fadvise64_64 264 #define __NR_statfs64 265 #define __NR_fstatfs64 266 -/* Number 267 is reserved for new sys_remap_file_pages */ +#define __NR_remap_file_pages 267 /* Number 268 is reserved for new sys_mbind */ /* Number 269 is reserved for new sys_get_mempolicy */ /* Number 270 is reserved for new sys_set_mempolicy */ @@ -273,8 +273,9 @@ #define __NR_add_key 278 #define __NR_request_key 279 #define __NR_keyctl 280 +#define __NR_waitid 281 -#define NR_syscalls 281 +#define NR_syscalls 282 /* * There are some system calls that are not present on 64 bit, some @@ -333,7 +334,6 @@ #undef __NR_setgid32 #undef __NR_setfsuid32 #undef __NR_setfsgid32 -#undef __NR_getdents64 #undef __NR_fcntl64 #undef __NR_sendfile64 #undef __NR_fadvise64_64 diff -Nru a/include/asm-sh/pgalloc.h b/include/asm-sh/pgalloc.h --- a/include/asm-sh/pgalloc.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-sh/pgalloc.h 2005-03-30 16:58:48 -08:00 @@ -1,7 +1,6 @@ #ifndef __ASM_SH_PGALLOC_H #define __ASM_SH_PGALLOC_H -#include #include #include #include diff -Nru a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h --- a/include/asm-sh/pgtable.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-sh/pgtable.h 2005-03-30 16:58:50 -08:00 @@ -279,6 +279,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + /* * No page table caches to initialise */ diff -Nru a/include/asm-sh/unaligned.h b/include/asm-sh/unaligned.h --- a/include/asm-sh/unaligned.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-sh/unaligned.h 2005-03-30 16:58:47 -08:00 @@ -2,18 +2,6 @@ #define __ASM_SH_UNALIGNED_H /* SH can't handle unaligned accesses. */ - -#include - - -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +#include #endif /* __ASM_SH_UNALIGNED_H */ diff -Nru a/include/asm-sh64/pgalloc.h b/include/asm-sh64/pgalloc.h --- a/include/asm-sh64/pgalloc.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-sh64/pgalloc.h 2005-03-30 16:58:47 -08:00 @@ -14,7 +14,6 @@ * */ -#include #include #include diff -Nru a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h --- a/include/asm-sh64/pgtable.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-sh64/pgtable.h 2005-03-30 16:58:49 -08:00 @@ -482,6 +482,14 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) + +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #endif /* !__ASSEMBLY__ */ /* diff -Nru a/include/asm-sh64/unaligned.h b/include/asm-sh64/unaligned.h --- a/include/asm-sh64/unaligned.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-sh64/unaligned.h 2005-03-30 16:58:50 -08:00 @@ -12,17 +12,6 @@ * */ -#include - - -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +#include #endif /* __ASM_SH64_UNALIGNED_H */ diff -Nru a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h --- a/include/asm-sparc/pgtable.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-sparc/pgtable.h 2005-03-30 16:58:49 -08:00 @@ -454,8 +454,20 @@ #define kern_addr_valid(addr) \ (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) -extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, +extern int io_remap_page_range(struct vm_area_struct *vma, + unsigned long from, unsigned long to, unsigned long size, pgprot_t prot, int space); +extern int io_remap_pfn_range(struct vm_area_struct *vma, + unsigned long from, unsigned long pfn, + unsigned long size, pgprot_t prot); + +/* + * For sparc32&64, the pfn in io_remap_pfn_range() carries in + * its high 4 bits. These macros/functions put it there or get it from there. + */ +#define MK_IOSPACE_PFN(space, pfn) (pfn | (space << (BITS_PER_LONG - 4))) +#define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) +#define GET_PFN(pfn) (pfn & 0x0fffffffUL) #include diff -Nru a/include/asm-sparc/unaligned.h b/include/asm-sparc/unaligned.h --- a/include/asm-sparc/unaligned.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-sparc/unaligned.h 2005-03-30 16:58:49 -08:00 @@ -1,19 +1,6 @@ #ifndef _ASM_SPARC_UNALIGNED_H_ #define _ASM_SPARC_UNALIGNED_H_ -/* Sparc can't handle unaligned accesses. */ - -#include - - -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +#include #endif /* _ASM_SPARC_UNALIGNED_H */ diff -Nru a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h --- a/include/asm-sparc64/pgalloc.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-sparc64/pgalloc.h 2005-03-30 16:58:50 -08:00 @@ -7,9 +7,7 @@ #include #include -#include #include -#include #include /* Page table allocation/freeing. */ diff -Nru a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h --- a/include/asm-sparc64/pgtable.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-sparc64/pgtable.h 2005-03-30 16:58:47 -08:00 @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -431,6 +432,17 @@ extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space); +extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, + unsigned long pfn, + unsigned long size, pgprot_t prot); + +/* + * For sparc32&64, the pfn in io_remap_pfn_range() carries in + * its high 4 bits. These macros/functions put it there or get it from there. + */ +#define MK_IOSPACE_PFN(space, pfn) (pfn | (space << (BITS_PER_LONG - 4))) +#define GET_IOSPACE(pfn) (pfn >> (BITS_PER_LONG - 4)) +#define GET_PFN(pfn) (pfn & 0x0fffffffffffffffUL) /* Override for {pgd,pmd}_addr_end() to deal with the virtual address * space hole. We simply sign extend bit 43. diff -Nru a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h --- a/include/asm-sparc64/tlb.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-sparc64/tlb.h 2005-03-30 16:58:49 -08:00 @@ -80,11 +80,11 @@ { unsigned long freed = mp->freed; struct mm_struct *mm = mp->mm; - unsigned long rss = mm->rss; + unsigned long rss = get_mm_counter(mm, rss); if (rss < freed) freed = rss; - mm->rss = rss - freed; + add_mm_counter(mm, rss, -freed); tlb_flush_mmu(mp); diff -Nru a/include/asm-sparc64/unaligned.h b/include/asm-sparc64/unaligned.h --- a/include/asm-sparc64/unaligned.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-sparc64/unaligned.h 2005-03-30 16:58:51 -08:00 @@ -1,19 +1,6 @@ #ifndef _ASM_SPARC64_UNALIGNED_H_ #define _ASM_SPARC64_UNALIGNED_H_ -/* Sparc can't handle unaligned accesses. */ - -#include - - -/* Use memmove here, so gcc does not insert a __builtin_memcpy. */ - -#define get_unaligned(ptr) \ - ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) - -#define put_unaligned(val, ptr) \ - ({ __typeof__(*(ptr)) __tmp = (val); \ - memmove((ptr), &__tmp, sizeof(*(ptr))); \ - (void)0; }) +#include #endif /* _ASM_SPARC64_UNALIGNED_H */ diff -Nru a/include/asm-um/archparam-i386.h b/include/asm-um/archparam-i386.h --- a/include/asm-um/archparam-i386.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-um/archparam-i386.h 2005-03-30 16:58:50 -08:00 @@ -8,7 +8,7 @@ /********* Bits for asm-um/elf.h ************/ -#include "user.h" +#include extern char * elf_aux_platform; #define ELF_PLATFORM (elf_aux_platform) diff -Nru a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h --- a/include/asm-um/processor-generic.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-um/processor-generic.h 2005-03-30 16:58:47 -08:00 @@ -16,8 +16,6 @@ struct mm_struct; -#define cpu_relax() barrier() - struct thread_struct { int forking; int nsyscalls; diff -Nru a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h --- a/include/asm-um/processor-i386.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-um/processor-i386.h 2005-03-30 16:58:47 -08:00 @@ -19,6 +19,14 @@ #include "asm/arch/user.h" +/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ +static inline void rep_nop(void) +{ + __asm__ __volatile__("rep;nop": : :"memory"); +} + +#define cpu_relax() rep_nop() + /* * Default implementation of macro that returns current * instruction pointer ("program counter"). Stolen diff -Nru a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h --- a/include/asm-um/processor-x86_64.h 2005-03-30 16:58:51 -08:00 +++ b/include/asm-um/processor-x86_64.h 2005-03-30 16:58:51 -08:00 @@ -12,6 +12,14 @@ struct arch_thread { }; +/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ +extern inline void rep_nop(void) +{ + __asm__ __volatile__("rep;nop": : :"memory"); +} + +#define cpu_relax() rep_nop() + #define INIT_ARCH_THREAD { } #define current_text_addr() \ diff -Nru a/include/asm-um/setup.h b/include/asm-um/setup.h --- a/include/asm-um/setup.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-um/setup.h 2005-03-30 16:58:49 -08:00 @@ -1,6 +1,9 @@ #ifndef SETUP_H_INCLUDED #define SETUP_H_INCLUDED -#define COMMAND_LINE_SIZE 512 +/* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the + * command line, so this choice is ok.*/ + +#define COMMAND_LINE_SIZE 4096 #endif /* SETUP_H_INCLUDED */ diff -Nru a/include/asm-um/signal.h b/include/asm-um/signal.h --- a/include/asm-um/signal.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-um/signal.h 2005-03-30 16:58:47 -08:00 @@ -11,6 +11,9 @@ #define do_signal do_signal_renamed #include "asm/arch/signal.h" #undef do_signal +#undef ptrace_signal_deliver + +#define ptrace_signal_deliver(regs, cookie) do {} while(0) #endif diff -Nru a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h --- a/include/asm-x86_64/io.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-x86_64/io.h 2005-03-30 16:58:48 -08:00 @@ -36,11 +36,7 @@ * - Arnaldo Carvalho de Melo */ -#ifdef SLOW_IO_BY_JUMPING -#define __SLOW_DOWN_IO "\njmp 1f\n1:\tjmp 1f\n1:" -#else #define __SLOW_DOWN_IO "\noutb %%al,$0x80" -#endif #ifdef REALLY_SLOW_IO #define __FULL_SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO diff -Nru a/include/asm-x86_64/mmu_context.h b/include/asm-x86_64/mmu_context.h --- a/include/asm-x86_64/mmu_context.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-x86_64/mmu_context.h 2005-03-30 16:58:48 -08:00 @@ -28,6 +28,11 @@ } #endif +static inline void load_cr3(pgd_t *pgd) +{ + asm volatile("movq %0,%%cr3" :: "r" (__pa(pgd)) : "memory"); +} + static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { @@ -40,7 +45,8 @@ write_pda(active_mm, next); #endif set_bit(cpu, &next->cpu_vm_mask); - asm volatile("movq %0,%%cr3" :: "r" (__pa(next->pgd)) : "memory"); + load_cr3(next->pgd); + if (unlikely(next->context.ldt != prev->context.ldt)) load_LDT_nolock(&next->context, cpu); } @@ -54,7 +60,7 @@ * tlb flush IPI delivery. We must reload CR3 * to make sure to use no freed page tables. */ - asm volatile("movq %0,%%cr3" :: "r" (__pa(next->pgd)) : "memory"); + load_cr3(next->pgd); load_LDT_nolock(&next->context, cpu); } } diff -Nru a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h --- a/include/asm-x86_64/mpspec.h 2005-03-30 16:58:48 -08:00 +++ b/include/asm-x86_64/mpspec.h 2005-03-30 16:58:48 -08:00 @@ -156,7 +156,7 @@ * 7 2 CPU MCA+PCI */ -#define MAX_MP_BUSSES 270 +#define MAX_MP_BUSSES 256 #define MAX_IRQ_SOURCES 256 enum mp_bustype { MP_BUS_ISA = 1, diff -Nru a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h --- a/include/asm-x86_64/msr.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-x86_64/msr.h 2005-03-30 16:58:50 -08:00 @@ -28,8 +28,8 @@ #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) -/* wrmsrl with exception handling */ -#define checking_wrmsrl(msr,val) ({ int ret__; \ +/* wrmsr with exception handling */ +#define wrmsr_safe(msr,a,b) ({ int ret__; \ asm volatile("2: wrmsr ; xorl %0,%0\n" \ "1:\n\t" \ ".section .fixup,\"ax\"\n\t" \ @@ -40,8 +40,10 @@ " .quad 2b,3b\n\t" \ ".previous" \ : "=a" (ret__) \ - : "c" (msr), "0" ((__u32)val), "d" ((val)>>32), "i" (-EFAULT));\ + : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ ret__; }) + +#define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) #define rdtsc(low,high) \ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) diff -Nru a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h --- a/include/asm-x86_64/page.h 2005-03-30 16:58:47 -08:00 +++ b/include/asm-x86_64/page.h 2005-03-30 16:58:47 -08:00 @@ -63,10 +63,6 @@ #define __pgd(x) ((pgd_t) { (x) } ) #define __pgprot(x) ((pgprot_t) { (x) } ) -extern unsigned long vm_stack_flags, vm_stack_flags32; -extern unsigned long vm_data_default_flags, vm_data_default_flags32; -extern unsigned long vm_force_exec32; - #define __START_KERNEL 0xffffffff80100000UL #define __START_KERNEL_map 0xffffffff80000000UL #define __PAGE_OFFSET 0xffff810000000000UL diff -Nru a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h --- a/include/asm-x86_64/pgalloc.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-x86_64/pgalloc.h 2005-03-30 16:58:49 -08:00 @@ -1,7 +1,6 @@ #ifndef _X86_64_PGALLOC_H #define _X86_64_PGALLOC_H -#include #include #include #include @@ -99,7 +98,8 @@ } #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) -#define __pmd_free_tlb(tlb,x) pmd_free(x) -#define __pud_free_tlb(tlb,x) pud_free(x) + +#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) +#define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) #endif /* _X86_64_PGALLOC_H */ diff -Nru a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h --- a/include/asm-x86_64/pgtable.h 2005-03-30 16:58:49 -08:00 +++ b/include/asm-x86_64/pgtable.h 2005-03-30 16:58:49 -08:00 @@ -407,6 +407,13 @@ #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) +#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ + remap_pfn_range(vma, vaddr, pfn, size, prot) + +#define MK_IOSPACE_PFN(space, pfn) (pfn) +#define GET_IOSPACE(pfn) 0 +#define GET_PFN(pfn) (pfn) + #define HAVE_ARCH_UNMAPPED_AREA #define pgtable_cache_init() do { } while (0) diff -Nru a/include/asm-x86_64/segment.h b/include/asm-x86_64/segment.h --- a/include/asm-x86_64/segment.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-x86_64/segment.h 2005-03-30 16:58:50 -08:00 @@ -24,10 +24,9 @@ #define GDT_ENTRY_TLS 1 #define GDT_ENTRY_TSS 8 /* needs two entries */ -#define GDT_ENTRY_LDT 10 -#define GDT_ENTRY_TLS_MIN 11 -#define GDT_ENTRY_TLS_MAX 13 -/* 14 free */ +#define GDT_ENTRY_LDT 10 /* needs two entries */ +#define GDT_ENTRY_TLS_MIN 12 +#define GDT_ENTRY_TLS_MAX 14 #define GDT_ENTRY_KERNELCS16 15 #define GDT_ENTRY_TLS_ENTRIES 3 diff -Nru a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h --- a/include/asm-x86_64/uaccess.h 2005-03-30 16:58:50 -08:00 +++ b/include/asm-x86_64/uaccess.h 2005-03-30 16:58:50 -08:00 @@ -91,16 +91,11 @@ * accesses to the same area of user memory). */ -extern void __get_user_1(void); -extern void __get_user_2(void); -extern void __get_user_4(void); -extern void __get_user_8(void); - #define __get_user_x(size,ret,x,ptr) \ __asm__ __volatile__("call __get_user_" #size \ :"=a" (ret),"=d" (x) \ - :"0" (ptr) \ - :"rbx") + :"c" (ptr) \ + :"r8") /* Careful: we have to cast the result to the type of the pointer for sign reasons */ #define get_user(x,ptr) \ @@ -122,14 +117,13 @@ extern void __put_user_2(void); extern void __put_user_4(void); extern void __put_user_8(void); - extern void __put_user_bad(void); #define __put_user_x(size,ret,x,ptr) \ __asm__ __volatile__("call __put_user_" #size \ :"=a" (ret) \ - :"0" (ptr),"d" (x) \ - :"rbx") + :"c" (ptr),"d" (x) \ + :"r8") #define put_user(x,ptr) \ __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) @@ -152,10 +146,15 @@ #define __put_user_check(x,ptr,size) \ ({ \ - int __pu_err = -EFAULT; \ + int __pu_err; \ __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ - if (likely(access_ok(VERIFY_WRITE,__pu_addr,size))) \ - __put_user_size((x),__pu_addr,(size),__pu_err); \ + switch (size) { \ + case 1: __put_user_x(1,__pu_err,x,__pu_addr); break; \ + case 2: __put_user_x(2,__pu_err,x,__pu_addr); break; \ + case 4: __put_user_x(4,__pu_err,x,__pu_addr); break; \ + case 8: __put_user_x(8,__pu_err,x,__pu_addr); break; \ + default: __put_user_bad(); \ + } \ __pu_err; \ }) @@ -206,6 +205,10 @@ __gu_err; \ }) +extern int __get_user_1(void); +extern int __get_user_2(void); +extern int __get_user_4(void); +extern int __get_user_8(void); extern int __get_user_bad(void); #define __get_user_size(x,ptr,size,retval) \ diff -Nru a/include/linux/bio.h b/include/linux/bio.h --- a/include/linux/bio.h 2005-03-30 16:58:49 -08:00 +++ b/include/linux/bio.h 2005-03-30 16:58:49 -08:00 @@ -263,8 +263,8 @@ extern struct bio_set *bioset_create(int, int, int); extern void bioset_free(struct bio_set *); -extern struct bio *bio_alloc(int, int); -extern struct bio *bio_alloc_bioset(int, int, struct bio_set *); +extern struct bio *bio_alloc(unsigned int __nocast, int); +extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *); extern void bio_put(struct bio *); extern void bio_endio(struct bio *, unsigned int, int); @@ -273,7 +273,7 @@ extern int bio_hw_segments(struct request_queue *, struct bio *); extern void __bio_clone(struct bio *, struct bio *); -extern struct bio *bio_clone(struct bio *, int); +extern struct bio *bio_clone(struct bio *, unsigned int __nocast); extern void bio_init(struct bio *); diff -Nru a/include/linux/blkdev.h b/include/linux/blkdev.h --- a/include/linux/blkdev.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/blkdev.h 2005-03-30 16:58:47 -08:00 @@ -347,7 +347,7 @@ * queue needs bounce pages for pages above this limit */ unsigned long bounce_pfn; - int bounce_gfp; + unsigned int bounce_gfp; /* * various queue flags, see QUEUE_* below diff -Nru a/include/linux/buffer_head.h b/include/linux/buffer_head.h --- a/include/linux/buffer_head.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/buffer_head.h 2005-03-30 16:58:50 -08:00 @@ -169,7 +169,7 @@ void __bforget(struct buffer_head *); void __breadahead(struct block_device *, sector_t block, int size); struct buffer_head *__bread(struct block_device *, sector_t block, int size); -struct buffer_head *alloc_buffer_head(int gfp_flags); +struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags); void free_buffer_head(struct buffer_head * bh); void FASTCALL(unlock_buffer(struct buffer_head *bh)); void FASTCALL(__lock_buffer(struct buffer_head *bh)); diff -Nru a/include/linux/compiler.h b/include/linux/compiler.h --- a/include/linux/compiler.h 2005-03-30 16:58:49 -08:00 +++ b/include/linux/compiler.h 2005-03-30 16:58:49 -08:00 @@ -8,6 +8,7 @@ # define __kernel /* default address space */ # define __safe __attribute__((safe)) # define __force __attribute__((force)) +# define __nocast __attribute__((nocast)) # define __iomem __attribute__((noderef, address_space(2))) # define __acquires(x) __attribute__((context(0,1))) # define __releases(x) __attribute__((context(1,0))) @@ -21,6 +22,7 @@ # define __kernel # define __safe # define __force +# define __nocast # define __iomem # define __chk_user_ptr(x) (void)0 # define __chk_io_ptr(x) (void)0 diff -Nru a/include/linux/console.h b/include/linux/console.h --- a/include/linux/console.h 2005-03-30 16:58:48 -08:00 +++ b/include/linux/console.h 2005-03-30 16:58:48 -08:00 @@ -77,13 +77,17 @@ #define CM_MOVE (3) /* - * The interface for a console, or any other device that - * wants to capture console messages (printer driver?) + * The interface for a console, or any other device that wants to capture + * console messages (printer driver?) + * + * If a console driver is marked CON_BOOT then it will be auto-unregistered + * when the first real console is registered. This is for early-printk drivers. */ #define CON_PRINTBUFFER (1) #define CON_CONSDEV (2) /* Last on the command line */ #define CON_ENABLED (4) +#define CON_BOOT (8) struct console { diff -Nru a/include/linux/cpuset.h b/include/linux/cpuset.h --- a/include/linux/cpuset.h 2005-03-30 16:58:49 -08:00 +++ b/include/linux/cpuset.h 2005-03-30 16:58:49 -08:00 @@ -34,7 +34,7 @@ static inline void cpuset_fork(struct task_struct *p) {} static inline void cpuset_exit(struct task_struct *p) {} -static inline const cpumask_t cpuset_cpus_allowed(struct task_struct *p) +static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p) { return cpu_possible_map; } diff -Nru a/include/linux/debugfs.h b/include/linux/debugfs.h --- a/include/linux/debugfs.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/debugfs.h 2005-03-30 16:58:50 -08:00 @@ -15,6 +15,8 @@ #ifndef _DEBUGFS_H_ #define _DEBUGFS_H_ +#include + #if defined(CONFIG_DEBUG_FS) struct dentry *debugfs_create_file(const char *name, mode_t mode, struct dentry *parent, void *data, diff -Nru a/include/linux/device.h b/include/linux/device.h --- a/include/linux/device.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/device.h 2005-03-30 16:58:50 -08:00 @@ -110,7 +110,7 @@ int (*probe) (struct device * dev); int (*remove) (struct device * dev); void (*shutdown) (struct device * dev); - int (*suspend) (struct device * dev, u32 state, u32 level); + int (*suspend) (struct device * dev, pm_message_t state, u32 level); int (*resume) (struct device * dev, u32 level); }; diff -Nru a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h --- a/include/linux/ext3_fs.h 2005-03-30 16:58:49 -08:00 +++ b/include/linux/ext3_fs.h 2005-03-30 16:58:49 -08:00 @@ -357,6 +357,7 @@ #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ +#define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ #ifndef _LINUX_EXT2_FS_H diff -Nru a/include/linux/generic_serial.h b/include/linux/generic_serial.h --- a/include/linux/generic_serial.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/generic_serial.h 2005-03-30 16:58:50 -08:00 @@ -34,7 +34,7 @@ int xmit_head; int xmit_tail; int xmit_cnt; - /* struct semaphore port_write_sem; */ + struct semaphore port_write_sem; int flags; wait_queue_head_t open_wait; wait_queue_head_t close_wait; @@ -49,6 +49,7 @@ int baud_base; int baud; int custom_divisor; + spinlock_t driver_lock; }; @@ -70,6 +71,7 @@ #define GS_DEBUG_STUFF 0x00000008 #define GS_DEBUG_CLOSE 0x00000010 #define GS_DEBUG_FLOW 0x00000020 +#define GS_DEBUG_WRITE 0x00000040 void gs_put_char(struct tty_struct *tty, unsigned char ch); diff -Nru a/include/linux/gfp.h b/include/linux/gfp.h --- a/include/linux/gfp.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/gfp.h 2005-03-30 16:58:47 -08:00 @@ -26,18 +26,18 @@ * * __GFP_NORETRY: The VM implementation must not retry indefinitely. */ -#define __GFP_WAIT 0x10 /* Can wait and reschedule? */ -#define __GFP_HIGH 0x20 /* Should access emergency pools? */ -#define __GFP_IO 0x40 /* Can start physical IO? */ -#define __GFP_FS 0x80 /* Can call down to low-level FS? */ -#define __GFP_COLD 0x100 /* Cache-cold page required */ -#define __GFP_NOWARN 0x200 /* Suppress page allocation failure warning */ -#define __GFP_REPEAT 0x400 /* Retry the allocation. Might fail */ -#define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */ -#define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */ -#define __GFP_NO_GROW 0x2000 /* Slab internal usage */ -#define __GFP_COMP 0x4000 /* Add compound page metadata */ -#define __GFP_ZERO 0x8000 /* Return zeroed page on success */ +#define __GFP_WAIT 0x10u /* Can wait and reschedule? */ +#define __GFP_HIGH 0x20u /* Should access emergency pools? */ +#define __GFP_IO 0x40u /* Can start physical IO? */ +#define __GFP_FS 0x80u /* Can call down to low-level FS? */ +#define __GFP_COLD 0x100u /* Cache-cold page required */ +#define __GFP_NOWARN 0x200u /* Suppress page allocation failure warning */ +#define __GFP_REPEAT 0x400u /* Retry the allocation. Might fail */ +#define __GFP_NOFAIL 0x800u /* Retry for ever. Cannot fail */ +#define __GFP_NORETRY 0x1000u /* Do not retry. Might fail */ +#define __GFP_NO_GROW 0x2000u /* Slab internal usage */ +#define __GFP_COMP 0x4000u /* Add compound page metadata */ +#define __GFP_ZERO 0x8000u /* Return zeroed page on success */ #define __GFP_BITS_SHIFT 16 /* Room for 16 __GFP_FOO bits */ #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) @@ -82,7 +82,7 @@ extern struct page * FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *)); -static inline struct page *alloc_pages_node(int nid, unsigned int gfp_mask, +static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_mask, unsigned int order) { if (unlikely(order >= MAX_ORDER)) @@ -93,17 +93,17 @@ } #ifdef CONFIG_NUMA -extern struct page *alloc_pages_current(unsigned gfp_mask, unsigned order); +extern struct page *alloc_pages_current(unsigned int __nocast gfp_mask, unsigned order); static inline struct page * -alloc_pages(unsigned int gfp_mask, unsigned int order) +alloc_pages(unsigned int __nocast gfp_mask, unsigned int order) { if (unlikely(order >= MAX_ORDER)) return NULL; return alloc_pages_current(gfp_mask, order); } -extern struct page *alloc_page_vma(unsigned gfp_mask, +extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, struct vm_area_struct *vma, unsigned long addr); #else #define alloc_pages(gfp_mask, order) \ @@ -112,8 +112,8 @@ #endif #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) -extern unsigned long FASTCALL(__get_free_pages(unsigned int gfp_mask, unsigned int order)); -extern unsigned long FASTCALL(get_zeroed_page(unsigned int gfp_mask)); +extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order)); +extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask)); #define __get_free_page(gfp_mask) \ __get_free_pages((gfp_mask),0) diff -Nru a/include/linux/hdpu_features.h b/include/linux/hdpu_features.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/hdpu_features.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,26 @@ +#include + +struct cpustate_t { + spinlock_t lock; + int excl; + int open_count; + unsigned char cached_val; + int inited; + unsigned long *set_addr; + unsigned long *clr_addr; +}; + + +#define HDPU_CPUSTATE_NAME "hdpu cpustate" +#define HDPU_NEXUS_NAME "hdpu nexus" + +#define CPUSTATE_KERNEL_MAJOR 0x10 + +#define CPUSTATE_KERNEL_INIT_DRV 0 /* CPU State Driver Initialized */ +#define CPUSTATE_KERNEL_INIT_PCI 1 /* 64360 PCI Busses Init */ +#define CPUSTATE_KERNEL_INIT_REG 2 /* 64360 Bridge Init */ +#define CPUSTATE_KERNEL_CPU1_KICK 3 /* Boot cpu 1 */ +#define CPUSTATE_KERNEL_CPU1_OK 4 /* Cpu 1 has checked in */ +#define CPUSTATE_KERNEL_OK 5 /* Terminal state */ +#define CPUSTATE_KERNEL_RESET 14 /* Board reset via SW*/ +#define CPUSTATE_KERNEL_HALT 15 /* Board halted via SW*/ diff -Nru a/include/linux/hugetlb.h b/include/linux/hugetlb.h --- a/include/linux/hugetlb.h 2005-03-30 16:58:48 -08:00 +++ b/include/linux/hugetlb.h 2005-03-30 16:58:48 -08:00 @@ -36,7 +36,7 @@ extern int sysctl_hugetlb_shm_group; #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE -#define is_hugepage_only_range(addr, len) 0 +#define is_hugepage_only_range(mm, addr, len) 0 #define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) #endif @@ -71,7 +71,7 @@ #define is_aligned_hugepage_range(addr, len) 0 #define prepare_hugepage_range(addr, len) (-EINVAL) #define pmd_huge(x) 0 -#define is_hugepage_only_range(addr, len) 0 +#define is_hugepage_only_range(mm, addr, len) 0 #define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) #define alloc_huge_page() ({ NULL; }) #define free_huge_page(p) ({ (void)(p); BUG(); }) diff -Nru a/include/linux/ide.h b/include/linux/ide.h --- a/include/linux/ide.h 2005-03-30 16:58:48 -08:00 +++ b/include/linux/ide.h 2005-03-30 16:58:48 -08:00 @@ -1109,7 +1109,7 @@ #define DRIVER(drive) ((drive)->driver) -extern int generic_ide_ioctl(struct file *, struct block_device *, unsigned, unsigned long); +int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); /* * ide_hwifs[] is the master data structure used to keep track diff -Nru a/include/linux/ip_mp_alg.h b/include/linux/ip_mp_alg.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/ip_mp_alg.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,22 @@ +/* ip_mp_alg.h: IPV4 multipath algorithm support, user-visible values. + * + * Copyright (C) 2004, 2005 Einar Lueck + * Copyright (C) 2005 David S. Miller + */ + +#ifndef _LINUX_IP_MP_ALG_H +#define _LINUX_IP_MP_ALG_H + +enum ip_mp_alg { + IP_MP_ALG_NONE, + IP_MP_ALG_RR, + IP_MP_ALG_DRR, + IP_MP_ALG_RANDOM, + IP_MP_ALG_WRANDOM, + __IP_MP_ALG_MAX +}; + +#define IP_MP_ALG_MAX (__IP_MP_ALG_MAX - 1) + +#endif /* _LINUX_IP_MP_ALG_H */ + diff -Nru a/include/linux/jbd.h b/include/linux/jbd.h --- a/include/linux/jbd.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/jbd.h 2005-03-30 16:58:50 -08:00 @@ -822,6 +822,7 @@ */ /* Filing buffers */ +extern void __journal_temp_unlink_buffer(struct journal_head *jh); extern void journal_unfile_buffer(journal_t *, struct journal_head *); extern void __journal_unfile_buffer(struct journal_head *); extern void __journal_refile_buffer(struct journal_head *); @@ -934,7 +935,7 @@ */ extern kmem_cache_t *jbd_handle_cache; -static inline handle_t *jbd_alloc_handle(int gfp_flags) +static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags) { return kmem_cache_alloc(jbd_handle_cache, gfp_flags); } diff -Nru a/include/linux/kernel.h b/include/linux/kernel.h --- a/include/linux/kernel.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/kernel.h 2005-03-30 16:58:47 -08:00 @@ -91,17 +91,21 @@ extern long long simple_strtoll(const char *,char **,unsigned int); extern int sprintf(char * buf, const char * fmt, ...) __attribute__ ((format (printf, 2, 3))); -extern int vsprintf(char *buf, const char *, va_list); +extern int vsprintf(char *buf, const char *, va_list) + __attribute__ ((format (printf, 2, 0))); extern int snprintf(char * buf, size_t size, const char * fmt, ...) __attribute__ ((format (printf, 3, 4))); -extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); +extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); extern int scnprintf(char * buf, size_t size, const char * fmt, ...) __attribute__ ((format (printf, 3, 4))); -extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); +extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); extern int sscanf(const char *, const char *, ...) - __attribute__ ((format (scanf,2,3))); -extern int vsscanf(const char *, const char *, va_list); + __attribute__ ((format (scanf, 2, 3))); +extern int vsscanf(const char *, const char *, va_list) + __attribute__ ((format (scanf, 2, 0))); extern int get_option(char **str, int *pint); extern char *get_options(const char *str, int nints, int *ints); @@ -111,7 +115,8 @@ extern int kernel_text_address(unsigned long addr); extern int session_of_pgrp(int pgrp); -asmlinkage int vprintk(const char *fmt, va_list args); +asmlinkage int vprintk(const char *fmt, va_list args) + __attribute__ ((format (printf, 1, 0))); asmlinkage int printk(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); diff -Nru a/include/linux/kfifo.h b/include/linux/kfifo.h --- a/include/linux/kfifo.h 2005-03-30 16:58:49 -08:00 +++ b/include/linux/kfifo.h 2005-03-30 16:58:49 -08:00 @@ -35,8 +35,8 @@ }; extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, - int gfp_mask, spinlock_t *lock); -extern struct kfifo *kfifo_alloc(unsigned int size, int gfp_mask, + unsigned int __nocast gfp_mask, spinlock_t *lock); +extern struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, spinlock_t *lock); extern void kfifo_free(struct kfifo *fifo); extern unsigned int __kfifo_put(struct kfifo *fifo, diff -Nru a/include/linux/mempool.h b/include/linux/mempool.h --- a/include/linux/mempool.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/mempool.h 2005-03-30 16:58:47 -08:00 @@ -6,7 +6,7 @@ #include -typedef void * (mempool_alloc_t)(int gfp_mask, void *pool_data); +typedef void * (mempool_alloc_t)(unsigned int __nocast gfp_mask, void *pool_data); typedef void (mempool_free_t)(void *element, void *pool_data); typedef struct mempool_s { @@ -22,16 +22,16 @@ } mempool_t; extern mempool_t * mempool_create(int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data); -extern int mempool_resize(mempool_t *pool, int new_min_nr, int gfp_mask); +extern int mempool_resize(mempool_t *pool, int new_min_nr, unsigned int __nocast gfp_mask); extern void mempool_destroy(mempool_t *pool); -extern void * mempool_alloc(mempool_t *pool, int gfp_mask); +extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask); extern void mempool_free(void *element, mempool_t *pool); /* * A mempool_alloc_t and mempool_free_t that get the memory from * a slab that is passed in through pool_data. */ -void *mempool_alloc_slab(int gfp_mask, void *pool_data); +void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data); void mempool_free_slab(void *element, void *pool_data); #endif /* _LINUX_MEMPOOL_H */ diff -Nru a/include/linux/mmc/card.h b/include/linux/mmc/card.h --- a/include/linux/mmc/card.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/mmc/card.h 2005-03-30 16:58:50 -08:00 @@ -75,7 +75,7 @@ struct device_driver drv; int (*probe)(struct mmc_card *); void (*remove)(struct mmc_card *); - int (*suspend)(struct mmc_card *, u32); + int (*suspend)(struct mmc_card *, pm_message_t); int (*resume)(struct mmc_card *); }; diff -Nru a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h --- a/include/linux/mmc/mmc.h 2005-03-30 16:58:48 -08:00 +++ b/include/linux/mmc/mmc.h 2005-03-30 16:58:48 -08:00 @@ -37,6 +37,7 @@ #define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY) #define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) #define MMC_RSP_R3 (MMC_RSP_SHORT) +#define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) unsigned int retries; /* max number of retries */ unsigned int error; /* command error */ diff -Nru a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h --- a/include/linux/mmc/protocol.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/mmc/protocol.h 2005-03-30 16:58:50 -08:00 @@ -76,6 +76,16 @@ #define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */ #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1b */ +/* SD commands type argument response */ + /* class 8 */ +/* This is basically the same command as for MMC with some quirks. */ +#define SD_SEND_RELATIVE_ADDR 3 /* ac R6 */ + + /* Application commands */ +#define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ +#define SD_APP_OP_COND 41 /* bcr [31:0] OCR R3 */ +#define SD_APP_SEND_SCR 51 /* adtc R1 */ + /* MMC status in R1 Type @@ -113,7 +123,7 @@ #define R1_STATUS(x) (x & 0xFFFFE000) #define R1_CURRENT_STATE(x) ((x & 0x00001E00) >> 9) /* sx, b (4 bits) */ #define R1_READY_FOR_DATA (1 << 8) /* sx, a */ -#define R1_APP_CMD (1 << 7) /* sr, c */ +#define R1_APP_CMD (1 << 5) /* sr, c */ /* These are unpacked versions of the actual responses */ diff -Nru a/include/linux/mpage.h b/include/linux/mpage.h --- a/include/linux/mpage.h 2005-03-30 16:58:48 -08:00 +++ b/include/linux/mpage.h 2005-03-30 16:58:48 -08:00 @@ -20,6 +20,9 @@ struct writeback_control *wbc, get_block_t get_block); int mpage_writepage(struct page *page, get_block_t *get_block, struct writeback_control *wbc); +int __mpage_writepages(struct address_space *mapping, + struct writeback_control *wbc, get_block_t get_block, + writepage_t writepage); static inline int generic_writepages(struct address_space *mapping, struct writeback_control *wbc) diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/netdevice.h 2005-03-30 16:58:50 -08:00 @@ -41,7 +41,7 @@ struct divert_blk; struct vlan_group; struct ethtool_ops; - +struct netpoll; /* source back-compat hooks */ #define SET_ETHTOOL_OPS(netdev,ops) \ ( (netdev)->ethtool_ops = (ops) ) @@ -468,7 +468,7 @@ unsigned char *haddr); int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); #ifdef CONFIG_NETPOLL - int netpoll_rx; + struct netpoll *np; #endif #ifdef CONFIG_NET_POLL_CONTROLLER void (*poll_controller)(struct net_device *dev); diff -Nru a/include/linux/netpoll.h b/include/linux/netpoll.h --- a/include/linux/netpoll.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/netpoll.h 2005-03-30 16:58:47 -08:00 @@ -16,11 +16,14 @@ struct netpoll { struct net_device *dev; char dev_name[16], *name; + int rx_flags; void (*rx_hook)(struct netpoll *, int, char *, int); + void (*drop)(struct sk_buff *skb); u32 local_ip, remote_ip; u16 local_port, remote_port; unsigned char local_mac[6], remote_mac[6]; - struct list_head rx_list; + spinlock_t poll_lock; + int poll_owner; }; void netpoll_poll(struct netpoll *np); @@ -30,7 +33,35 @@ int netpoll_trap(void); void netpoll_set_trap(int trap); void netpoll_cleanup(struct netpoll *np); -int netpoll_rx(struct sk_buff *skb); +int __netpoll_rx(struct sk_buff *skb); +void netpoll_queue(struct sk_buff *skb); +#ifdef CONFIG_NETPOLL +static inline int netpoll_rx(struct sk_buff *skb) +{ + return skb->dev->np && skb->dev->np->rx_flags && __netpoll_rx(skb); +} + +static inline void netpoll_poll_lock(struct net_device *dev) +{ + if (dev->np) { + spin_lock(&dev->np->poll_lock); + dev->np->poll_owner = smp_processor_id(); + } +} + +static inline void netpoll_poll_unlock(struct net_device *dev) +{ + if (dev->np) { + spin_unlock(&dev->np->poll_lock); + dev->np->poll_owner = -1; + } +} + +#else +#define netpoll_rx(a) 0 +#define netpoll_poll_lock(a) +#define netpoll_poll_unlock(a) +#endif #endif diff -Nru a/include/linux/pagemap.h b/include/linux/pagemap.h --- a/include/linux/pagemap.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/pagemap.h 2005-03-30 16:58:47 -08:00 @@ -19,7 +19,7 @@ #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */ #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */ -static inline int mapping_gfp_mask(struct address_space * mapping) +static inline unsigned int __nocast mapping_gfp_mask(struct address_space * mapping) { return mapping->flags & __GFP_BITS_MASK; } diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h --- a/include/linux/pci_ids.h 2005-03-30 16:58:51 -08:00 +++ b/include/linux/pci_ids.h 2005-03-30 16:58:51 -08:00 @@ -709,6 +709,7 @@ #define PCI_DEVICE_ID_HP_SX1000_IOC 0x127c #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 +#define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 #define PCI_DEVICE_ID_HP_CISSA 0x3220 #define PCI_DEVICE_ID_HP_CISSB 0x3230 #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 @@ -809,6 +810,7 @@ #define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803 #define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 #define PCI_DEVICE_ID_MOTOROLA_HARRIER 0x480b +#define PCI_DEVICE_ID_MOTOROLA_MPC5200 0x5803 #define PCI_VENDOR_ID_PROMISE 0x105a #define PCI_DEVICE_ID_PROMISE_20265 0x0d30 @@ -1524,6 +1526,10 @@ #define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 #define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 #define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 +#define PCI_DEVICE_ID_NEO_2DB9 0x00C8 +#define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9 +#define PCI_DEVICE_ID_NEO_2RJ45 0x00CA +#define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB #define PCI_VENDOR_ID_MUTECH 0x1159 #define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 @@ -1907,6 +1913,7 @@ #define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202 #define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401 #define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801 +#define PCI_DEVICE_ID_SEALEVEL_UCOMM8 0x7804 #define PCI_VENDOR_ID_HYPERCOPE 0x1365 #define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050 @@ -2384,7 +2391,6 @@ #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b1 #define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0 #define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1 -#define PCI_DEVICE_ID_INTEL_ICH7_4 0x27c2 #define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4 #define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5 #define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8 @@ -2526,13 +2532,15 @@ #define PCI_VENDOR_ID_NETMOS 0x9710 #define PCI_DEVICE_ID_NETMOS_9705 0x9705 +#define PCI_DEVICE_ID_NETMOS_9715 0x9715 #define PCI_DEVICE_ID_NETMOS_9735 0x9735 +#define PCI_DEVICE_ID_NETMOS_9745 0x9745 +#define PCI_DEVICE_ID_NETMOS_9755 0x9755 #define PCI_DEVICE_ID_NETMOS_9805 0x9805 #define PCI_DEVICE_ID_NETMOS_9815 0x9815 #define PCI_DEVICE_ID_NETMOS_9835 0x9835 +#define PCI_DEVICE_ID_NETMOS_9845 0x9845 #define PCI_DEVICE_ID_NETMOS_9855 0x9855 -#define PCI_DEVICE_ID_NETMOS_9755 0x9755 -#define PCI_DEVICE_ID_NETMOS_9715 0x9715 #define PCI_SUBVENDOR_ID_EXSYS 0xd84d #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 diff -Nru a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h --- a/include/linux/pkt_cls.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/pkt_cls.h 2005-03-30 16:58:47 -08:00 @@ -80,6 +80,7 @@ TCA_ACT_KIND, TCA_ACT_OPTIONS, TCA_ACT_INDEX, + TCA_ACT_STATS, __TCA_ACT_MAX }; diff -Nru a/include/linux/posix_acl.h b/include/linux/posix_acl.h --- a/include/linux/posix_acl.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/posix_acl.h 2005-03-30 16:58:50 -08:00 @@ -71,11 +71,11 @@ /* posix_acl.c */ -extern struct posix_acl *posix_acl_alloc(int, int); -extern struct posix_acl *posix_acl_clone(const struct posix_acl *, int); +extern struct posix_acl *posix_acl_alloc(int, unsigned int __nocast); +extern struct posix_acl *posix_acl_clone(const struct posix_acl *, unsigned int __nocast); extern int posix_acl_valid(const struct posix_acl *); extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); -extern struct posix_acl *posix_acl_from_mode(mode_t, int); +extern struct posix_acl *posix_acl_from_mode(mode_t, unsigned int __nocast); extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); extern int posix_acl_create_masq(struct posix_acl *, mode_t *); extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); diff -Nru a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h --- a/include/linux/rtnetlink.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/rtnetlink.h 2005-03-30 16:58:50 -08:00 @@ -250,6 +250,7 @@ RTA_FLOW, RTA_CACHEINFO, RTA_SESSION, + RTA_MP_ALGO, __RTA_MAX }; @@ -714,7 +715,6 @@ TCA_RATE, TCA_FCNT, TCA_STATS2, - TCA_ACT_STATS, __TCA_MAX }; diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/sched.h 2005-03-30 16:58:47 -08:00 @@ -204,6 +204,12 @@ extern void arch_unmap_area(struct vm_area_struct *area); extern void arch_unmap_area_topdown(struct vm_area_struct *area); +#define set_mm_counter(mm, member, value) (mm)->_##member = (value) +#define get_mm_counter(mm, member) ((mm)->_##member) +#define add_mm_counter(mm, member, value) (mm)->_##member += (value) +#define inc_mm_counter(mm, member) (mm)->_##member++ +#define dec_mm_counter(mm, member) (mm)->_##member-- +typedef unsigned long mm_counter_t; struct mm_struct { struct vm_area_struct * mmap; /* list of VMAs */ @@ -220,7 +226,7 @@ atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ int map_count; /* number of VMAs */ struct rw_semaphore mmap_sem; - spinlock_t page_table_lock; /* Protects page tables, mm->rss, mm->anon_rss */ + spinlock_t page_table_lock; /* Protects page tables and some counters */ struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung * together off init_mm.mmlist, and are protected @@ -230,8 +236,12 @@ unsigned long start_code, end_code, start_data, end_data; unsigned long start_brk, brk, start_stack; unsigned long arg_start, arg_end, env_start, env_end; - unsigned long rss, anon_rss, total_vm, locked_vm, shared_vm; + unsigned long total_vm, locked_vm, shared_vm; unsigned long exec_vm, stack_vm, reserved_vm, def_flags, nr_ptes; + + /* Special counters protected by the page_table_lock */ + mm_counter_t _rss; + mm_counter_t _anon_rss; unsigned long saved_auxv[42]; /* for /proc/PID/auxv */ diff -Nru a/include/linux/serial_core.h b/include/linux/serial_core.h --- a/include/linux/serial_core.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/serial_core.h 2005-03-30 16:58:47 -08:00 @@ -113,6 +113,12 @@ /* Samsung S3C2400 SoC */ #define PORT_S3C2400 67 +/* M32R SIO */ +#define PORT_M32R_SIO 68 + +/*Digi jsm */ +#define PORT_JSM 65 + #ifdef __KERNEL__ #include @@ -357,6 +363,7 @@ int uart_register_port(struct uart_driver *reg, struct uart_port *port); int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); +int uart_match_port(struct uart_port *port1, struct uart_port *port2); /* * Power Management diff -Nru a/include/linux/slab.h b/include/linux/slab.h --- a/include/linux/slab.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/slab.h 2005-03-30 16:58:50 -08:00 @@ -61,7 +61,7 @@ void (*)(void *, kmem_cache_t *, unsigned long)); extern int kmem_cache_destroy(kmem_cache_t *); extern int kmem_cache_shrink(kmem_cache_t *); -extern void *kmem_cache_alloc(kmem_cache_t *, int); +extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); #ifdef CONFIG_NUMA extern void *kmem_cache_alloc_node(kmem_cache_t *, int); #else @@ -80,9 +80,9 @@ kmem_cache_t *cs_dmacachep; }; extern struct cache_sizes malloc_sizes[]; -extern void *__kmalloc(size_t, int); +extern void *__kmalloc(size_t, unsigned int __nocast); -static inline void *kmalloc(size_t size, int flags) +static inline void *kmalloc(size_t size, unsigned int __nocast flags) { if (__builtin_constant_p(size)) { int i = 0; @@ -105,7 +105,7 @@ return __kmalloc(size, flags); } -extern void *kcalloc(size_t, size_t, int); +extern void *kcalloc(size_t, size_t, unsigned int __nocast); extern void kfree(const void *); extern unsigned int ksize(const void *); diff -Nru a/include/linux/suspend.h b/include/linux/suspend.h --- a/include/linux/suspend.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/suspend.h 2005-03-30 16:58:47 -08:00 @@ -34,8 +34,6 @@ #define SWAP_FILENAME_MAXLENGTH 32 -#define SUSPEND_PD_PAGES(x) (((x)*sizeof(struct pbe))/PAGE_SIZE+1) - extern dev_t swsusp_resume_device; /* mm/vmscan.c */ diff -Nru a/include/linux/swap.h b/include/linux/swap.h --- a/include/linux/swap.h 2005-03-30 16:58:47 -08:00 +++ b/include/linux/swap.h 2005-03-30 16:58:47 -08:00 @@ -148,7 +148,7 @@ #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) /* linux/mm/oom_kill.c */ -extern void out_of_memory(int gfp_mask); +extern void out_of_memory(unsigned int __nocast gfp_mask); /* linux/mm/memory.c */ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h 2005-03-30 16:58:48 -08:00 +++ b/include/linux/usb.h 2005-03-30 16:58:48 -08:00 @@ -949,11 +949,11 @@ void usb_buffer_free (struct usb_device *dev, size_t size, void *addr, dma_addr_t dma); -struct urb *usb_buffer_map (struct urb *urb); #if 0 +struct urb *usb_buffer_map (struct urb *urb); void usb_buffer_dmasync (struct urb *urb); -#endif void usb_buffer_unmap (struct urb *urb); +#endif struct scatterlist; int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, diff -Nru a/include/linux/usb_cdc.h b/include/linux/usb_cdc.h --- a/include/linux/usb_cdc.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/usb_cdc.h 2005-03-30 16:58:50 -08:00 @@ -6,8 +6,12 @@ * firmware based USB peripherals. */ -#define USB_CDC_SUBCLASS_ACM 2 -#define USB_CDC_SUBCLASS_ETHERNET 6 +#define USB_CDC_SUBCLASS_ACM 0x02 +#define USB_CDC_SUBCLASS_ETHERNET 0x06 +#define USB_CDC_SUBCLASS_WHCM 0x08 +#define USB_CDC_SUBCLASS_DMM 0x09 +#define USB_CDC_SUBCLASS_MDLM 0x0a +#define USB_CDC_SUBCLASS_OBEX 0x0b #define USB_CDC_PROTO_NONE 0 @@ -31,6 +35,11 @@ #define USB_CDC_UNION_TYPE 0x06 /* union_desc */ #define USB_CDC_COUNTRY_TYPE 0x07 #define USB_CDC_ETHERNET_TYPE 0x0f /* ether_desc */ +#define USB_CDC_WHCM_TYPE 0x11 +#define USB_CDC_MDLM_TYPE 0x12 /* mdlm_desc */ +#define USB_CDC_MDLM_DETAIL_TYPE 0x13 /* mdlm_detail_desc */ +#define USB_CDC_DMM_TYPE 0x14 +#define USB_CDC_OBEX_TYPE 0x15 /* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ struct usb_cdc_header_desc { @@ -85,6 +94,27 @@ __le16 wMaxSegmentSize; __le16 wNumberMCFilters; __u8 bNumberPowerFilters; +} __attribute__ ((packed)); + +/* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */ +struct usb_cdc_mdlm_desc { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + __le16 bcdVersion; + __u8 bGUID[16]; +} __attribute__ ((packed)); + +/* "MDLM Detail Functional Descriptor" from CDC WMC spec 6.7.2.4 */ +struct usb_cdc_mdlm_detail_desc { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubType; + + /* type is associated with mdlm_desc.bGUID */ + __u8 bGuidDescriptorType; + __u8 bDetailData[]; } __attribute__ ((packed)); /*-------------------------------------------------------------------------*/ diff -Nru a/include/linux/vmalloc.h b/include/linux/vmalloc.h --- a/include/linux/vmalloc.h 2005-03-30 16:58:50 -08:00 +++ b/include/linux/vmalloc.h 2005-03-30 16:58:50 -08:00 @@ -26,8 +26,8 @@ extern void *vmalloc(unsigned long size); extern void *vmalloc_exec(unsigned long size); extern void *vmalloc_32(unsigned long size); -extern void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot); -extern void *__vmalloc_area(struct vm_struct *area, int gfp_mask, pgprot_t prot); +extern void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot); +extern void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot); extern void vfree(void *addr); extern void *vmap(struct page **pages, unsigned int count, diff -Nru a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h --- a/include/net/bluetooth/bluetooth.h 2005-03-30 16:58:48 -08:00 +++ b/include/net/bluetooth/bluetooth.h 2005-03-30 16:58:48 -08:00 @@ -125,7 +125,6 @@ int bt_sock_register(int proto, struct net_proto_family *ops); int bt_sock_unregister(int proto); -struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio); void bt_sock_link(struct bt_sock_list *l, struct sock *s); void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags); diff -Nru a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h --- a/include/net/bluetooth/hci_core.h 2005-03-30 16:58:49 -08:00 +++ b/include/net/bluetooth/hci_core.h 2005-03-30 16:58:49 -08:00 @@ -595,8 +595,10 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb); /* HCI info for socket */ -#define hci_pi(sk) ((struct hci_pinfo *)sk->sk_protinfo) +#define hci_pi(sk) ((struct hci_pinfo *) sk) + struct hci_pinfo { + struct bt_sock bt; struct hci_dev *hdev; struct hci_filter filter; __u32 cmsg_mask; diff -Nru a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h --- a/include/net/bluetooth/l2cap.h 2005-03-30 16:58:47 -08:00 +++ b/include/net/bluetooth/l2cap.h 2005-03-30 16:58:47 -08:00 @@ -201,9 +201,10 @@ }; /* ----- L2CAP channel and socket info ----- */ -#define l2cap_pi(sk) ((struct l2cap_pinfo *)sk->sk_protinfo) +#define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) struct l2cap_pinfo { + struct bt_sock bt; __u16 psm; __u16 dcid; __u16 scid; diff -Nru a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h --- a/include/net/bluetooth/rfcomm.h 2005-03-30 16:58:49 -08:00 +++ b/include/net/bluetooth/rfcomm.h 2005-03-30 16:58:49 -08:00 @@ -293,9 +293,10 @@ #define RFCOMM_LM_RELIABLE 0x0010 #define RFCOMM_LM_SECURE 0x0020 -#define rfcomm_pi(sk) ((struct rfcomm_pinfo *)sk->sk_protinfo) +#define rfcomm_pi(sk) ((struct rfcomm_pinfo *) sk) struct rfcomm_pinfo { + struct bt_sock bt; struct rfcomm_dlc *dlc; u8 channel; u32 link_mode; diff -Nru a/include/net/bluetooth/sco.h b/include/net/bluetooth/sco.h --- a/include/net/bluetooth/sco.h 2005-03-30 16:58:47 -08:00 +++ b/include/net/bluetooth/sco.h 2005-03-30 16:58:47 -08:00 @@ -68,9 +68,10 @@ #define sco_conn_unlock(c) spin_unlock(&c->lock); /* ----- SCO socket info ----- */ -#define sco_pi(sk) ((struct sco_pinfo *)sk->sk_protinfo) +#define sco_pi(sk) ((struct sco_pinfo *) sk) struct sco_pinfo { + struct bt_sock bt; __u32 flags; struct sco_conn *conn; }; diff -Nru a/include/net/dst.h b/include/net/dst.h --- a/include/net/dst.h 2005-03-30 16:58:51 -08:00 +++ b/include/net/dst.h 2005-03-30 16:58:51 -08:00 @@ -48,6 +48,7 @@ #define DST_NOXFRM 2 #define DST_NOPOLICY 4 #define DST_NOHASH 8 +#define DST_BALANCED 0x10 unsigned long lastuse; unsigned long expires; @@ -109,21 +110,6 @@ return dst->metrics[metric-1]; } -static inline u32 -dst_path_metric(const struct dst_entry *dst, int metric) -{ - return dst->path->metrics[metric-1]; -} - -static inline u32 -dst_pmtu(const struct dst_entry *dst) -{ - u32 mtu = dst_path_metric(dst, RTAX_MTU); - /* Yes, _exactly_. This is paranoia. */ - barrier(); - return mtu; -} - static inline u32 dst_mtu(const struct dst_entry *dst) { u32 mtu = dst_metric(dst, RTAX_MTU); @@ -137,7 +123,7 @@ static inline u32 dst_allfrag(const struct dst_entry *dst) { - int ret = dst_path_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG; + int ret = dst_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG; /* Yes, _exactly_. This is paranoia. */ barrier(); return ret; diff -Nru a/include/net/flow.h b/include/net/flow.h --- a/include/net/flow.h 2005-03-30 16:58:50 -08:00 +++ b/include/net/flow.h 2005-03-30 16:58:50 -08:00 @@ -51,6 +51,7 @@ __u8 proto; __u8 flags; +#define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01 union { struct { __u16 sport; diff -Nru a/include/net/inetpeer.h b/include/net/inetpeer.h --- a/include/net/inetpeer.h 2005-03-30 16:58:47 -08:00 +++ b/include/net/inetpeer.h 2005-03-30 16:58:47 -08:00 @@ -19,9 +19,9 @@ { struct inet_peer *avl_left, *avl_right; struct inet_peer *unused_next, **unused_prevp; - atomic_t refcnt; unsigned long dtime; /* the time of last use of not * referenced entries */ + atomic_t refcnt; __u32 v4daddr; /* peer's address */ __u16 avl_height; __u16 ip_id_count; /* IP ID for the next packet */ @@ -35,7 +35,6 @@ struct inet_peer *inet_getpeer(__u32 daddr, int create); extern spinlock_t inet_peer_unused_lock; -extern struct inet_peer *inet_peer_unused_head; extern struct inet_peer **inet_peer_unused_tailp; /* can be called from BH context or outside */ static inline void inet_putpeer(struct inet_peer *p) diff -Nru a/include/net/ip_fib.h b/include/net/ip_fib.h --- a/include/net/ip_fib.h 2005-03-30 16:58:50 -08:00 +++ b/include/net/ip_fib.h 2005-03-30 16:58:50 -08:00 @@ -37,6 +37,7 @@ u32 *rta_flow; struct rta_cacheinfo *rta_ci; struct rta_session *rta_sess; + u32 *rta_mp_alg; }; struct fib_info; @@ -81,6 +82,9 @@ #ifdef CONFIG_IP_ROUTE_MULTIPATH int fib_power; #endif +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + u32 fib_mp_alg; +#endif struct fib_nh fib_nh[0]; #define fib_dev fib_nh[0].nh_dev }; @@ -95,6 +99,10 @@ unsigned char nh_sel; unsigned char type; unsigned char scope; +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + __u32 network; + __u32 netmask; +#endif struct fib_info *fi; #ifdef CONFIG_IP_MULTIPLE_TABLES struct fib_rule *r; @@ -118,6 +126,14 @@ #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) + +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED +#define FIB_RES_NETWORK(res) ((res).network) +#define FIB_RES_NETMASK(res) ((res).netmask) +#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ +#define FIB_RES_NETWORK(res) (0) +#define FIB_RES_NETMASK(res) (0) +#endif /* CONFIG_IP_ROUTE_MULTIPATH_WRANDOM */ struct fib_table { unsigned char tb_id; diff -Nru a/include/net/ip_mp_alg.h b/include/net/ip_mp_alg.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/net/ip_mp_alg.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,99 @@ +/* ip_mp_alg.h: IPV4 multipath algorithm support. + * + * Copyright (C) 2004, 2005 Einar Lueck + * Copyright (C) 2005 David S. Miller + */ + +#ifndef _NET_IP_MP_ALG_H +#define _NET_IP_MP_ALG_H + +#include +#include +#include +#include + +struct fib_nh; + +struct ip_mp_alg_ops { + void (*mp_alg_select_route)(const struct flowi *flp, + struct rtable *rth, struct rtable **rp); + void (*mp_alg_flush)(void); + void (*mp_alg_set_nhinfo)(__u32 network, __u32 netmask, + unsigned char prefixlen, + const struct fib_nh *nh); + void (*mp_alg_remove)(struct rtable *rth); +}; + +extern int multipath_alg_register(struct ip_mp_alg_ops *, enum ip_mp_alg); +extern void multipath_alg_unregister(struct ip_mp_alg_ops *, enum ip_mp_alg); + +extern struct ip_mp_alg_ops *ip_mp_alg_table[]; + +static inline int multipath_select_route(const struct flowi *flp, + struct rtable *rth, + struct rtable **rp) +{ +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + struct ip_mp_alg_ops *ops = ip_mp_alg_table[rth->rt_multipath_alg]; + + /* mp_alg_select_route _MUST_ be implemented */ + if (ops && (rth->u.dst.flags & DST_BALANCED)) { + ops->mp_alg_select_route(flp, rth, rp); + return 1; + } +#endif + return 0; +} + +static inline void multipath_flush(void) +{ +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + int i; + + for (i = IP_MP_ALG_NONE; i <= IP_MP_ALG_MAX; i++) { + struct ip_mp_alg_ops *ops = ip_mp_alg_table[i]; + + if (ops && ops->mp_alg_flush) + ops->mp_alg_flush(); + } +#endif +} + +static inline void multipath_set_nhinfo(struct rtable *rth, + __u32 network, __u32 netmask, + unsigned char prefixlen, + const struct fib_nh *nh) +{ +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + struct ip_mp_alg_ops *ops = ip_mp_alg_table[rth->rt_multipath_alg]; + + if (ops && ops->mp_alg_set_nhinfo) + ops->mp_alg_set_nhinfo(network, netmask, prefixlen, nh); +#endif +} + +static inline void multipath_remove(struct rtable *rth) +{ +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + struct ip_mp_alg_ops *ops = ip_mp_alg_table[rth->rt_multipath_alg]; + + if (ops && ops->mp_alg_remove && + (rth->u.dst.flags & DST_BALANCED)) + ops->mp_alg_remove(rth); +#endif +} + +static inline int multipath_comparekeys(const struct flowi *flp1, + const struct flowi *flp2) +{ + return flp1->fl4_dst == flp2->fl4_dst && + flp1->fl4_src == flp2->fl4_src && + flp1->oif == flp2->oif && +#ifdef CONFIG_IP_ROUTE_FWMARK + flp1->fl4_fwmark == flp2->fl4_fwmark && +#endif + !((flp1->fl4_tos ^ flp2->fl4_tos) & + (IPTOS_RT_MASK | RTO_ONLINK)); +} + +#endif /* _NET_IP_MP_ALG_H */ diff -Nru a/include/net/irda/irda.h b/include/net/irda/irda.h --- a/include/net/irda/irda.h 2005-03-30 16:58:48 -08:00 +++ b/include/net/irda/irda.h 2005-03-30 16:58:48 -08:00 @@ -66,22 +66,25 @@ /* use 0 for production, 1 for verification, >2 for debug */ #define IRDA_DEBUG_LEVEL 0 -#define IRDA_DEBUG(n, args...) (irda_debug >= (n)) ? (printk(KERN_DEBUG args)) : 0 -#define ASSERT(expr, func) \ -if(!(expr)) { \ - printk( "Assertion failed! %s:%s:%d %s\n", \ - __FILE__,__FUNCTION__,__LINE__,(#expr)); \ - func } +#define IRDA_DEBUG(n, args...) \ +do { if (irda_debug >= (n)) \ + printk(KERN_DEBUG args); \ +} while (0) +#define IRDA_ASSERT(expr, func) \ +do { if(!(expr)) { \ + printk( "Assertion failed! %s:%s:%d %s\n", \ + __FILE__,__FUNCTION__,__LINE__,(#expr) ); \ + func } } while (0) +#define IRDA_ASSERT_LABEL(label) label #else -#define IRDA_DEBUG(n, args...) -#define ASSERT(expr, func) \ -if(!(expr)) do { \ - func } while (0) +#define IRDA_DEBUG(n, args...) do { } while (0) +#define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) +#define IRDA_ASSERT_LABEL(label) #endif /* CONFIG_IRDA_DEBUG */ -#define WARNING(args...) printk(KERN_WARNING args) -#define MESSAGE(args...) printk(KERN_INFO args) -#define ERROR(args...) printk(KERN_ERR args) +#define IRDA_WARNING(args...) printk(KERN_WARNING args) +#define IRDA_MESSAGE(args...) printk(KERN_INFO args) +#define IRDA_ERROR(args...) printk(KERN_ERR args) /* * Magic numbers used by Linux-IrDA. Random numbers which must be unique to diff -Nru a/include/net/netrom.h b/include/net/netrom.h --- a/include/net/netrom.h 2005-03-30 16:58:49 -08:00 +++ b/include/net/netrom.h 2005-03-30 16:58:49 -08:00 @@ -8,6 +8,7 @@ #define _NETROM_H #include #include +#include #define NR_NETWORK_LEN 15 #define NR_TRANSPORT_LEN 5 @@ -55,7 +56,8 @@ #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ #define NR_MAX_PACKET_SIZE 236 /* Maximum Packet Length - 236 */ -typedef struct { +struct nr_sock { + struct sock sock; ax25_address user_addr, source_addr, dest_addr; struct net_device *device; unsigned char my_index, my_id; @@ -72,10 +74,9 @@ struct sk_buff_head ack_queue; struct sk_buff_head reseq_queue; struct sk_buff_head frag_queue; - struct sock *sk; /* Backlink to socket */ -} nr_cb; +}; -#define nr_sk(__sk) ((nr_cb *)(__sk)->sk_protinfo) +#define nr_sk(sk) ((struct nr_sock *)(sk)) struct nr_neigh { struct hlist_node neigh_node; diff -Nru a/include/net/rose.h b/include/net/rose.h --- a/include/net/rose.h 2005-03-30 16:58:47 -08:00 +++ b/include/net/rose.h 2005-03-30 16:58:47 -08:00 @@ -6,7 +6,9 @@ #ifndef _ROSE_H #define _ROSE_H + #include +#include #define ROSE_ADDR_LEN 5 @@ -114,7 +116,8 @@ unsigned int rand; }; -typedef struct { +struct rose_sock { + struct sock sock; rose_address source_addr, dest_addr; ax25_address source_call, dest_call; unsigned char source_ndigis, dest_ndigis; @@ -135,10 +138,9 @@ struct rose_facilities_struct facilities; struct timer_list timer; struct timer_list idletimer; - struct sock *sk; /* Backlink to socket */ -} rose_cb; +}; -#define rose_sk(__sk) ((rose_cb *)(__sk)->sk_protinfo) +#define rose_sk(sk) ((struct rose_sock *)(sk)) /* af_rose.c */ extern ax25_address rose_callsign; diff -Nru a/include/net/route.h b/include/net/route.h --- a/include/net/route.h 2005-03-30 16:58:47 -08:00 +++ b/include/net/route.h 2005-03-30 16:58:47 -08:00 @@ -46,6 +46,7 @@ #define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE)) +struct fib_nh; struct inet_peer; struct rtable { @@ -58,7 +59,8 @@ struct in_device *idev; unsigned rt_flags; - unsigned rt_type; + __u16 rt_type; + __u16 rt_multipath_alg; __u32 rt_dst; /* Path destination */ __u32 rt_src; /* Path source */ @@ -179,6 +181,9 @@ memcpy(&fl, &(*rp)->fl, sizeof(fl)); fl.fl_ip_sport = sport; fl.fl_ip_dport = dport; +#if defined(CONFIG_IP_ROUTE_MULTIPATH_CACHED) + fl.flags |= FLOWI_FLAG_MULTIPATHOLDROUTE; +#endif ip_rt_put(*rp); *rp = NULL; return ip_route_output_flow(rp, &fl, sk, 0); diff -Nru a/include/net/sock.h b/include/net/sock.h --- a/include/net/sock.h 2005-03-30 16:58:49 -08:00 +++ b/include/net/sock.h 2005-03-30 16:58:49 -08:00 @@ -561,11 +561,6 @@ extern int sk_alloc_slab(struct proto *prot, char *name); extern void sk_free_slab(struct proto *prot); -static inline void sk_alloc_slab_error(struct proto *proto) -{ - printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", proto->name); -} - static __inline__ void sk_set_owner(struct sock *sk, struct module *owner) { /* diff -Nru a/include/pcmcia/ss.h b/include/pcmcia/ss.h --- a/include/pcmcia/ss.h 2005-03-30 16:58:50 -08:00 +++ b/include/pcmcia/ss.h 2005-03-30 16:58:50 -08:00 @@ -259,7 +259,7 @@ extern struct class pcmcia_socket_class; /* socket drivers are expected to use these callbacks in their .drv struct */ -extern int pcmcia_socket_dev_suspend(struct device *dev, u32 state); +extern int pcmcia_socket_dev_suspend(struct device *dev, pm_message_t state); extern int pcmcia_socket_dev_resume(struct device *dev); #endif /* _LINUX_SS_H */ diff -Nru a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h --- a/include/scsi/scsi_device.h 2005-03-30 16:58:47 -08:00 +++ b/include/scsi/scsi_device.h 2005-03-30 16:58:47 -08:00 @@ -112,6 +112,7 @@ unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ unsigned select_no_atn:1; unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ + unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ unsigned int device_blocked; /* Device returned QUEUE_FULL. */ diff -Nru a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h --- a/include/scsi/scsi_host.h 2005-03-30 16:58:47 -08:00 +++ b/include/scsi/scsi_host.h 2005-03-30 16:58:47 -08:00 @@ -590,6 +590,7 @@ } extern int scsi_queue_work(struct Scsi_Host *, struct work_struct *); +extern void scsi_flush_work(struct Scsi_Host *); extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *, int); extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *); diff -Nru a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h --- a/include/scsi/scsi_transport_fc.h 2005-03-30 16:58:48 -08:00 +++ b/include/scsi/scsi_transport_fc.h 2005-03-30 16:58:48 -08:00 @@ -212,9 +212,6 @@ #define rport_to_shost(r) \ dev_to_shost(r->dev.parent) -#define FC_SCSI_SCAN_DELAY (1 * HZ) /* 1 second delay */ - - /* * FC SCSI Target Attributes * diff -Nru a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h --- a/include/sound/ac97_codec.h 2005-03-30 16:58:49 -08:00 +++ b/include/sound/ac97_codec.h 2005-03-30 16:58:49 -08:00 @@ -356,6 +356,7 @@ #define AC97_SCAP_INDEP_SDIN (1<<6) /* independent SDIN */ #define AC97_SCAP_INV_EAPD (1<<7) /* inverted EAPD */ #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ +#define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ /* ac97->flags */ #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ diff -Nru a/include/sound/asound.h b/include/sound/asound.h --- a/include/sound/asound.h 2005-03-30 16:58:51 -08:00 +++ b/include/sound/asound.h 2005-03-30 16:58:51 -08:00 @@ -582,6 +582,7 @@ /* global timers (device member) */ #define SNDRV_TIMER_GLOBAL_SYSTEM 0 #define SNDRV_TIMER_GLOBAL_RTC 1 +#define SNDRV_TIMER_GLOBAL_HPET 2 /* info flags */ #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ diff -Nru a/include/sound/asoundef.h b/include/sound/asoundef.h --- a/include/sound/asoundef.h 2005-03-30 16:58:47 -08:00 +++ b/include/sound/asoundef.h 2005-03-30 16:58:47 -08:00 @@ -185,7 +185,7 @@ #define MIDI_CTL_LSB_GENERAL_PURPOSE4 0x33 #define MIDI_CTL_SUSTAIN 0x40 #define MIDI_CTL_PORTAMENTO 0x41 -#define MIDI_CTL_SUSTENUTO 0x42 +#define MIDI_CTL_SOSTENUTO 0x42 #define MIDI_CTL_SOFT_PEDAL 0x43 #define MIDI_CTL_LEGATO_FOOTSWITCH 0x44 #define MIDI_CTL_HOLD2 0x45 diff -Nru a/include/sound/core.h b/include/sound/core.h --- a/include/sound/core.h 2005-03-30 16:58:50 -08:00 +++ b/include/sound/core.h 2005-03-30 16:58:50 -08:00 @@ -490,4 +490,13 @@ #define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */ +/* for easier backward-porting */ +#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) +#ifndef gameport_set_dev_parent +#define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev)) +#define gameport_set_port_data(gp,r) ((gp)->port_data = (r)) +#define gameport_get_port_data(gp) (gp)->port_data +#endif +#endif + #endif /* __SOUND_CORE_H */ diff -Nru a/include/sound/emu10k1.h b/include/sound/emu10k1.h --- a/include/sound/emu10k1.h 2005-03-30 16:58:48 -08:00 +++ b/include/sound/emu10k1.h 2005-03-30 16:58:48 -08:00 @@ -280,6 +280,46 @@ #define AC97ADDRESS_READY 0x80 /* Read-only bit, reflects CODEC READY signal */ #define AC97ADDRESS_ADDRESS 0x7f /* Address of indexed AC97 register */ +/* Available on the Audigy 2 and Audigy 4 only. This is the P16V chip. */ +#define PTR2 0x20 /* Indexed register set pointer register */ +#define DATA2 0x24 /* Indexed register set data register */ +#define IPR2 0x28 /* P16V interrupt pending register */ +#define IPR2_PLAYBACK_CH_0_LOOP 0x00001000 /* Playback Channel 0 loop */ +#define IPR2_PLAYBACK_CH_0_HALF_LOOP 0x00000100 /* Playback Channel 0 half loop */ +#define IPR2_CAPTURE_CH_0_LOOP 0x00100000 /* Capture Channel 0 loop */ +#define IPR2_CAPTURE_CH_0_HALF_LOOP 0x00010000 /* Capture Channel 0 half loop */ + /* 0x00000100 Playback. Only in once per period. + * 0x00110000 Capture. Int on half buffer. + */ +#define INTE2 0x2c /* P16V Interrupt enable register. */ +#define INTE2_PLAYBACK_CH_0_LOOP 0x00001000 /* Playback Channel 0 loop */ +#define INTE2_PLAYBACK_CH_0_HALF_LOOP 0x00000100 /* Playback Channel 0 half loop */ +#define INTE2_PLAYBACK_CH_1_LOOP 0x00002000 /* Playback Channel 1 loop */ +#define INTE2_PLAYBACK_CH_1_HALF_LOOP 0x00000200 /* Playback Channel 1 half loop */ +#define INTE2_PLAYBACK_CH_2_LOOP 0x00004000 /* Playback Channel 2 loop */ +#define INTE2_PLAYBACK_CH_2_HALF_LOOP 0x00000400 /* Playback Channel 2 half loop */ +#define INTE2_PLAYBACK_CH_3_LOOP 0x00008000 /* Playback Channel 3 loop */ +#define INTE2_PLAYBACK_CH_3_HALF_LOOP 0x00000800 /* Playback Channel 3 half loop */ +#define INTE2_CAPTURE_CH_0_LOOP 0x00100000 /* Capture Channel 0 loop */ +#define INTE2_CAPTURE_CH_0_HALF_LOOP 0x00010000 /* Caputre Channel 0 half loop */ +#define HCFG2 0x34 /* Defaults: 0, win2000 sets it to 00004201 */ + /* 0x00000000 2-channel output. */ + /* 0x00000200 8-channel output. */ + /* 0x00000004 pauses stream/irq fail. */ + /* Rest of bits no nothing to sound output */ + /* bit 0: Enable P16V audio. + * bit 1: Lock P16V record memory cache. + * bit 2: Lock P16V playback memory cache. + * bit 3: Dummy record insert zero samples. + * bit 8: Record 8-channel in phase. + * bit 9: Playback 8-channel in phase. + * bit 11-12: Playback mixer attenuation: 0=0dB, 1=-6dB, 2=-12dB, 3=Mute. + * bit 13: Playback mixer enable. + * bit 14: Route SRC48 mixer output to fx engine. + * bit 15: Enable IEEE 1394 chip. + */ +#define IPR3 0x38 /* Cdif interrupt pending register */ +#define INTE3 0x3c /* Cdif interrupt enable register. */ /************************************************************************************************/ /* PCI function 1 registers, address = + PCIBASE1 */ /************************************************************************************************/ @@ -995,6 +1035,23 @@ void (*interrupt)(emu10k1_t *emu, unsigned int status); } emu10k1_midi_t; +typedef struct { + u32 vendor; + u32 device; + u32 subsystem; + unsigned char emu10k1_chip; /* Original SB Live. Not SB Live 24bit. */ + unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */ + unsigned char ca0102_chip; /* Audigy 1 or Audigy 2. Not SB Audigy 2 Value. */ + unsigned char ca0108_chip; /* Audigy 2 Value */ + unsigned char ca0151_chip; /* P16V */ + unsigned char spk71; /* Has 7.1 speakers */ + unsigned char spdif_bug; /* Has Spdif phasing bug */ + unsigned char ac97_chip; /* Has an AC97 chip */ + unsigned char ecard; /* APS EEPROM */ + char * driver; + char * name; +} emu_chip_details_t; + struct _snd_emu10k1 { int irq; @@ -1004,6 +1061,7 @@ tos_link: 1, /* tos link detected */ rear_ac97: 1, /* rear channels are on AC'97 */ spk71:1; /* 7.1 configuration (Audigy 2 ZS) */ + const emu_chip_details_t *card_capabilities; /* Contains profile of card capabilities */ unsigned int audigy; /* is Audigy? */ unsigned int revision; /* chip revision */ unsigned int serial; /* serial number */ @@ -1014,6 +1072,9 @@ int max_cache_pages; /* max memory size / PAGE_SIZE */ struct snd_dma_buffer silent_page; /* silent page */ struct snd_dma_buffer ptb_pages; /* page table pages */ + struct snd_dma_device p16v_dma_dev; + struct snd_dma_buffer p16v_buffer; + snd_util_memhdr_t *memhdr; /* page allocation list */ emu10k1_memblk_t *reserved_page; /* reserved page */ @@ -1035,6 +1096,7 @@ snd_pcm_t *pcm; snd_pcm_t *pcm_mic; snd_pcm_t *pcm_efx; + snd_pcm_t *pcm_p16v; spinlock_t synth_lock; void *synth; @@ -1046,6 +1108,8 @@ struct semaphore ptb_lock; emu10k1_voice_t voices[NUM_G]; + emu10k1_voice_t p16v_voices[4]; + int p16v_device_offset; emu10k1_pcm_mixer_t pcm_mixer[32]; emu10k1_pcm_mixer_t efx_pcm_mixer[NUM_EFX_PLAYBACK]; snd_kcontrol_t *ctl_send_routing; @@ -1087,6 +1151,9 @@ int snd_emu10k1_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); int snd_emu10k1_pcm_mic(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); int snd_emu10k1_pcm_efx(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); +int snd_p16v_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); +int snd_p16v_free(emu10k1_t * emu); +int snd_p16v_mixer(emu10k1_t * emu); int snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm); int snd_emu10k1_mixer(emu10k1_t * emu); @@ -1104,6 +1171,8 @@ /* I/O functions */ unsigned int snd_emu10k1_ptr_read(emu10k1_t * emu, unsigned int reg, unsigned int chn); void snd_emu10k1_ptr_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data); +unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, unsigned int reg, unsigned int chn); +void snd_emu10k1_ptr20_write(emu10k1_t *emu, unsigned int reg, unsigned int chn, unsigned int data); unsigned int snd_emu10k1_efx_read(emu10k1_t *emu, unsigned int pc); void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb); void snd_emu10k1_intr_disable(emu10k1_t *emu, unsigned int intrenb); diff -Nru a/include/sound/rawmidi.h b/include/sound/rawmidi.h --- a/include/sound/rawmidi.h 2005-03-30 16:58:50 -08:00 +++ b/include/sound/rawmidi.h 2005-03-30 16:58:50 -08:00 @@ -79,9 +79,10 @@ /* misc */ spinlock_t lock; wait_queue_head_t sleep; - /* event handler (room [output] or new bytes [input]) */ - struct tasklet_struct event_tasklet; + /* event handler (new bytes, input only) */ void (*event)(snd_rawmidi_substream_t *substream); + /* defers calls to event [input] or ops->trigger [output] */ + struct tasklet_struct tasklet; /* private data */ void *private_data; void (*private_free)(snd_rawmidi_substream_t *substream); diff -Nru a/include/sound/seq_midi_emul.h b/include/sound/seq_midi_emul.h --- a/include/sound/seq_midi_emul.h 2005-03-30 16:58:51 -08:00 +++ b/include/sound/seq_midi_emul.h 2005-03-30 16:58:51 -08:00 @@ -136,7 +136,7 @@ #define gm_sustain control[MIDI_CTL_SUSTAIN] #define gm_hold gm_sustain #define gm_portamento control[MIDI_CTL_PORTAMENTO] -#define gm_sustenuto control[MIDI_CTL_SUSTENUTO] +#define gm_sostenuto control[MIDI_CTL_SOSTENUTO] /* * These macros give the complete value of the controls that consist @@ -166,7 +166,7 @@ #define SNDRV_MIDI_NOTE_OFF 0x00 #define SNDRV_MIDI_NOTE_ON 0x01 #define SNDRV_MIDI_NOTE_RELEASED 0x02 -#define SNDRV_MIDI_NOTE_SUSTENUTO 0x04 +#define SNDRV_MIDI_NOTE_SOSTENUTO 0x04 #define SNDRV_MIDI_PARAM_TYPE_REGISTERED 0 #define SNDRV_MIDI_PARAM_TYPE_NONREGISTERED 1 diff -Nru a/include/sound/version.h b/include/sound/version.h --- a/include/sound/version.h 2005-03-30 16:58:51 -08:00 +++ b/include/sound/version.h 2005-03-30 16:58:51 -08:00 @@ -1,3 +1,3 @@ /* include/version.h. Generated by configure. */ -#define CONFIG_SND_VERSION "1.0.8" -#define CONFIG_SND_DATE " (Thu Jan 13 09:39:32 2005 UTC)" +#define CONFIG_SND_VERSION "1.0.9rc2" +#define CONFIG_SND_DATE " (Thu Mar 24 10:33:39 2005 UTC)" diff -Nru a/init/Kconfig b/init/Kconfig --- a/init/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/init/Kconfig 2005-03-30 16:58:50 -08:00 @@ -55,6 +55,14 @@ depends on SMP || PREEMPT default y +config INIT_ENV_ARG_LIMIT + int + default 32 if !USERMODE + default 128 if USERMODE + help + This is the value of the two limits on the number of argument and of + env.var passed to init from the kernel command line. + endmenu menu "General setup" @@ -413,7 +421,7 @@ config MODVERSIONS bool "Module versioning support (EXPERIMENTAL)" - depends on MODULES && EXPERIMENTAL && !USERMODE + depends on MODULES && EXPERIMENTAL && !UML help Usually, you have to use modules compiled with your kernel. Saying Y here makes it sometimes possible to use modules diff -Nru a/init/main.c b/init/main.c --- a/init/main.c 2005-03-30 16:58:47 -08:00 +++ b/init/main.c 2005-03-30 16:58:47 -08:00 @@ -110,8 +110,8 @@ /* * Boot command-line arguments */ -#define MAX_INIT_ARGS 32 -#define MAX_INIT_ENVS 32 +#define MAX_INIT_ARGS CONFIG_INIT_ENV_ARG_LIMIT +#define MAX_INIT_ENVS CONFIG_INIT_ENV_ARG_LIMIT extern void time_init(void); /* Default late time init is NULL. archs can override this later. */ diff -Nru a/kernel/acct.c b/kernel/acct.c --- a/kernel/acct.c 2005-03-30 16:58:49 -08:00 +++ b/kernel/acct.c 2005-03-30 16:58:49 -08:00 @@ -542,7 +542,7 @@ if (delta == 0) return; tsk->acct_stimexpd = tsk->stime; - tsk->acct_rss_mem1 += delta * tsk->mm->rss; + tsk->acct_rss_mem1 += delta * get_mm_counter(tsk->mm, rss); tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; } } diff -Nru a/kernel/cpuset.c b/kernel/cpuset.c --- a/kernel/cpuset.c 2005-03-30 16:58:48 -08:00 +++ b/kernel/cpuset.c 2005-03-30 16:58:48 -08:00 @@ -505,6 +505,35 @@ } /* + * Refresh current tasks mems_allowed and mems_generation from + * current tasks cpuset. Call with cpuset_sem held. + * + * Be sure to call refresh_mems() on any cpuset operation which + * (1) holds cpuset_sem, and (2) might possibly alloc memory. + * Call after obtaining cpuset_sem lock, before any possible + * allocation. Otherwise one risks trying to allocate memory + * while the task cpuset_mems_generation is not the same as + * the mems_generation in its cpuset, which would deadlock on + * cpuset_sem in cpuset_update_current_mems_allowed(). + * + * Since we hold cpuset_sem, once refresh_mems() is called, the + * test (current->cpuset_mems_generation != cs->mems_generation) + * in cpuset_update_current_mems_allowed() will remain false, + * until we drop cpuset_sem. Anyone else who would change our + * cpusets mems_generation needs to lock cpuset_sem first. + */ + +static void refresh_mems(void) +{ + struct cpuset *cs = current->cpuset; + + if (current->cpuset_mems_generation != cs->mems_generation) { + guarantee_online_mems(cs, ¤t->mems_allowed); + current->cpuset_mems_generation = cs->mems_generation; + } +} + +/* * is_cpuset_subset(p, q) - Is cpuset p a subset of cpuset q? * * One cpuset is a subset of another if all its allowed CPUs and @@ -1224,6 +1253,7 @@ return -ENOMEM; down(&cpuset_sem); + refresh_mems(); cs->flags = 0; if (notify_on_release(parent)) set_bit(CS_NOTIFY_ON_RELEASE, &cs->flags); @@ -1277,6 +1307,7 @@ /* the vfs holds both inode->i_sem already */ down(&cpuset_sem); + refresh_mems(); if (atomic_read(&cs->count) > 0) { up(&cpuset_sem); return -EBUSY; @@ -1433,8 +1464,7 @@ return; /* task is exiting */ if (current->cpuset_mems_generation != cs->mems_generation) { down(&cpuset_sem); - guarantee_online_mems(cs, ¤t->mems_allowed); - current->cpuset_mems_generation = cs->mems_generation; + refresh_mems(); up(&cpuset_sem); } } diff -Nru a/kernel/fork.c b/kernel/fork.c --- a/kernel/fork.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/fork.c 2005-03-30 16:58:47 -08:00 @@ -195,8 +195,8 @@ mm->mmap_cache = NULL; mm->free_area_cache = oldmm->mmap_base; mm->map_count = 0; - mm->rss = 0; - mm->anon_rss = 0; + set_mm_counter(mm, rss, 0); + set_mm_counter(mm, anon_rss, 0); cpus_clear(mm->cpu_vm_mask); mm->mm_rb = RB_ROOT; rb_link = &mm->mm_rb.rb_node; @@ -492,7 +492,7 @@ if (retval) goto free_pt; - mm->hiwater_rss = mm->rss; + mm->hiwater_rss = get_mm_counter(mm,rss); mm->hiwater_vm = mm->total_vm; good_mm: diff -Nru a/kernel/futex.c b/kernel/futex.c --- a/kernel/futex.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/futex.c 2005-03-30 16:58:47 -08:00 @@ -97,7 +97,6 @@ */ struct futex_hash_bucket { spinlock_t lock; - unsigned int nqueued; struct list_head chain; }; @@ -265,7 +264,6 @@ inc_preempt_count(); ret = __copy_from_user_inatomic(dest, from, sizeof(int)); dec_preempt_count(); - preempt_check_resched(); return ret ? -EFAULT : 0; } @@ -339,7 +337,6 @@ struct list_head *head1; struct futex_q *this, *next; int ret, drop_count = 0; - unsigned int nqueued; retry: down_read(¤t->mm->mmap_sem); @@ -354,23 +351,22 @@ bh1 = hash_futex(&key1); bh2 = hash_futex(&key2); - nqueued = bh1->nqueued; + if (bh1 < bh2) + spin_lock(&bh1->lock); + spin_lock(&bh2->lock); + if (bh1 > bh2) + spin_lock(&bh1->lock); + if (likely(valp != NULL)) { int curval; - /* In order to avoid doing get_user while - holding bh1->lock and bh2->lock, nqueued - (monotonically increasing field) must be first - read, then *uaddr1 fetched from userland and - after acquiring lock nqueued field compared with - the stored value. The smp_mb () below - makes sure that bh1->nqueued is read from memory - before *uaddr1. */ - smp_mb(); - ret = get_futex_value_locked(&curval, (int __user *)uaddr1); if (unlikely(ret)) { + spin_unlock(&bh1->lock); + if (bh1 != bh2) + spin_unlock(&bh2->lock); + /* If we would have faulted, release mmap_sem, fault * it in and start all over again. */ @@ -385,21 +381,10 @@ } if (curval != *valp) { ret = -EAGAIN; - goto out; + goto out_unlock; } } - if (bh1 < bh2) - spin_lock(&bh1->lock); - spin_lock(&bh2->lock); - if (bh1 > bh2) - spin_lock(&bh1->lock); - - if (unlikely(nqueued != bh1->nqueued && valp != NULL)) { - ret = -EAGAIN; - goto out_unlock; - } - head1 = &bh1->chain; list_for_each_entry_safe(this, next, head1, list) { if (!match_futex (&this->key, &key1)) @@ -435,13 +420,9 @@ return ret; } -/* - * queue_me and unqueue_me must be called as a pair, each - * exactly once. They are called with the hashed spinlock held. - */ - /* The key must be already stored in q->key. */ -static void queue_me(struct futex_q *q, int fd, struct file *filp) +static inline struct futex_hash_bucket * +queue_lock(struct futex_q *q, int fd, struct file *filp) { struct futex_hash_bucket *bh; @@ -455,11 +436,35 @@ q->lock_ptr = &bh->lock; spin_lock(&bh->lock); - bh->nqueued++; + return bh; +} + +static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *bh) +{ list_add_tail(&q->list, &bh->chain); spin_unlock(&bh->lock); } +static inline void +queue_unlock(struct futex_q *q, struct futex_hash_bucket *bh) +{ + spin_unlock(&bh->lock); + drop_key_refs(&q->key); +} + +/* + * queue_me and unqueue_me must be called as a pair, each + * exactly once. They are called with the hashed spinlock held. + */ + +/* The key must be already stored in q->key. */ +static void queue_me(struct futex_q *q, int fd, struct file *filp) +{ + struct futex_hash_bucket *bh; + bh = queue_lock(q, fd, filp); + __queue_me(q, bh); +} + /* Return 1 if we were still queued (ie. 0 means we were woken) */ static int unqueue_me(struct futex_q *q) { @@ -503,6 +508,7 @@ DECLARE_WAITQUEUE(wait, current); int ret, curval; struct futex_q q; + struct futex_hash_bucket *bh; retry: down_read(¤t->mm->mmap_sem); @@ -511,7 +517,7 @@ if (unlikely(ret != 0)) goto out_release_sem; - queue_me(&q, -1, NULL); + bh = queue_lock(&q, -1, NULL); /* * Access the page AFTER the futex is queued. @@ -537,14 +543,13 @@ ret = get_futex_value_locked(&curval, (int __user *)uaddr); if (unlikely(ret)) { + queue_unlock(&q, bh); + /* If we would have faulted, release mmap_sem, fault it in and * start all over again. */ up_read(¤t->mm->mmap_sem); - if (!unqueue_me(&q)) /* There's a chance we got woken already */ - return 0; - ret = get_user(curval, (int __user *)uaddr); if (!ret) @@ -553,9 +558,13 @@ } if (curval != val) { ret = -EWOULDBLOCK; - goto out_unqueue; + queue_unlock(&q, bh); + goto out_release_sem; } + /* Only actually queue if *uaddr contained val. */ + __queue_me(&q, bh); + /* * Now the futex is queued and we have checked the data, we * don't want to hold mmap_sem while we sleep. @@ -596,10 +605,6 @@ * have handled it for us already. */ return -EINTR; - out_unqueue: - /* If we were woken (and unqueued), we succeeded, whatever. */ - if (!unqueue_me(&q)) - ret = 0; out_release_sem: up_read(¤t->mm->mmap_sem); return ret; diff -Nru a/kernel/irq/proc.c b/kernel/irq/proc.c --- a/kernel/irq/proc.c 2005-03-30 16:58:48 -08:00 +++ b/kernel/irq/proc.c 2005-03-30 16:58:48 -08:00 @@ -19,6 +19,13 @@ */ static struct proc_dir_entry *smp_affinity_entry[NR_IRQS]; +void __attribute__((weak)) +proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) +{ + irq_affinity[irq] = mask_val; + irq_desc[irq].handler->set_affinity(irq, mask_val); +} + static int irq_affinity_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -53,8 +60,7 @@ if (cpus_empty(tmp)) return -EINVAL; - irq_affinity[irq] = new_value; - irq_desc[irq].handler->set_affinity(irq, new_value); + proc_set_irq_affinity(irq, new_value); return full_count; } diff -Nru a/kernel/kfifo.c b/kernel/kfifo.c --- a/kernel/kfifo.c 2005-03-30 16:58:48 -08:00 +++ b/kernel/kfifo.c 2005-03-30 16:58:48 -08:00 @@ -36,7 +36,7 @@ * struct kfifo with kfree(). */ struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, - int gfp_mask, spinlock_t *lock) + unsigned int __nocast gfp_mask, spinlock_t *lock) { struct kfifo *fifo; @@ -64,7 +64,7 @@ * * The size will be rounded-up to a power of 2. */ -struct kfifo *kfifo_alloc(unsigned int size, int gfp_mask, spinlock_t *lock) +struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, spinlock_t *lock) { unsigned char *buffer; struct kfifo *ret; diff -Nru a/kernel/kprobes.c b/kernel/kprobes.c --- a/kernel/kprobes.c 2005-03-30 16:58:51 -08:00 +++ b/kernel/kprobes.c 2005-03-30 16:58:51 -08:00 @@ -79,7 +79,7 @@ unsigned long flags = 0; if ((ret = arch_prepare_kprobe(p)) != 0) { - goto out; + goto rm_kprobe; } spin_lock_irqsave(&kprobe_lock, flags); INIT_HLIST_NODE(&p->hlist); @@ -96,8 +96,9 @@ *p->addr = BREAKPOINT_INSTRUCTION; flush_icache_range((unsigned long) p->addr, (unsigned long) p->addr + sizeof(kprobe_opcode_t)); - out: +out: spin_unlock_irqrestore(&kprobe_lock, flags); +rm_kprobe: if (ret == -EEXIST) arch_remove_kprobe(p); return ret; diff -Nru a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c --- a/kernel/posix-cpu-timers.c 2005-03-30 16:58:48 -08:00 +++ b/kernel/posix-cpu-timers.c 2005-03-30 16:58:48 -08:00 @@ -38,7 +38,7 @@ if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) { ret.sched = tp->tv_sec * NSEC_PER_SEC + tp->tv_nsec; } else { - ret.cpu = timespec_to_jiffies(tp); + ret.cpu = timespec_to_cputime(tp); } return ret; } @@ -94,28 +94,46 @@ static inline void bump_cpu_timer(struct k_itimer *timer, union cpu_time_count now) { + int i; + if (timer->it.cpu.incr.sched == 0) return; if (CPUCLOCK_WHICH(timer->it_clock) == CPUCLOCK_SCHED) { - long long delta; - delta = now.sched - timer->it.cpu.expires.sched; - if (delta >= 0) { - do_div(delta, timer->it.cpu.incr.sched); - delta++; - timer->it.cpu.expires.sched += - delta * timer->it.cpu.incr.sched; - timer->it_overrun += (int) delta; - } - } else if (cputime_le(now.cpu, timer->it.cpu.expires.cpu)) { - cputime_t delta = cputime_sub(now.cpu, - timer->it.cpu.expires.cpu); - if (cputime_ge(delta, cputime_zero)) { - long orun = 1 + (delta / timer->it.cpu.incr.cpu); + unsigned long long delta, incr; + + if (now.sched < timer->it.cpu.expires.sched) + return; + incr = timer->it.cpu.incr.sched; + delta = now.sched + incr - timer->it.cpu.expires.sched; + /* Don't use (incr*2 < delta), incr*2 might overflow. */ + for (i = 0; incr < delta - incr; i++) + incr = incr << 1; + for (; i >= 0; incr >>= 1, i--) { + if (delta <= incr) + continue; + timer->it.cpu.expires.sched += incr; + timer->it_overrun += 1 << i; + delta -= incr; + } + } else { + cputime_t delta, incr; + + if (cputime_lt(now.cpu, timer->it.cpu.expires.cpu)) + return; + incr = timer->it.cpu.incr.cpu; + delta = cputime_sub(cputime_add(now.cpu, incr), + timer->it.cpu.expires.cpu); + /* Don't use (incr*2 < delta), incr*2 might overflow. */ + for (i = 0; cputime_lt(incr, cputime_sub(delta, incr)); i++) + incr = cputime_add(incr, incr); + for (; i >= 0; incr = cputime_halve(incr), i--) { + if (cputime_le(delta, incr)) + continue; timer->it.cpu.expires.cpu = - cputime_add(timer->it.cpu.expires.cpu, - orun * timer->it.cpu.incr.cpu); - timer->it_overrun += orun; + cputime_add(timer->it.cpu.expires.cpu, incr); + timer->it_overrun += 1 << i; + delta = cputime_sub(delta, incr); } } } @@ -479,8 +497,8 @@ BUG(); break; case CPUCLOCK_PROF: - left = cputime_sub(expires.cpu, val.cpu) - / nthreads; + left = cputime_div(cputime_sub(expires.cpu, val.cpu), + nthreads); do { if (!unlikely(t->exit_state)) { ticks = cputime_add(prof_ticks(t), left); @@ -494,8 +512,8 @@ } while (t != p); break; case CPUCLOCK_VIRT: - left = cputime_sub(expires.cpu, val.cpu) - / nthreads; + left = cputime_div(cputime_sub(expires.cpu, val.cpu), + nthreads); do { if (!unlikely(t->exit_state)) { ticks = cputime_add(virt_ticks(t), left); @@ -587,17 +605,25 @@ switch (CPUCLOCK_WHICH(timer->it_clock)) { default: BUG(); -#define UPDATE_CLOCK(WHICH, c, n) \ - case CPUCLOCK_##WHICH: \ - if (p->it_##c##_expires == 0 || \ - p->it_##c##_expires > nt->expires.n) { \ - p->it_##c##_expires = nt->expires.n; \ - } \ - break - UPDATE_CLOCK(PROF, prof, cpu); - UPDATE_CLOCK(VIRT, virt, cpu); - UPDATE_CLOCK(SCHED, sched, sched); -#undef UPDATE_CLOCK + case CPUCLOCK_PROF: + if (cputime_eq(p->it_prof_expires, + cputime_zero) || + cputime_gt(p->it_prof_expires, + nt->expires.cpu)) + p->it_prof_expires = nt->expires.cpu; + break; + case CPUCLOCK_VIRT: + if (cputime_eq(p->it_virt_expires, + cputime_zero) || + cputime_gt(p->it_virt_expires, + nt->expires.cpu)) + p->it_virt_expires = nt->expires.cpu; + break; + case CPUCLOCK_SCHED: + if (p->it_sched_expires == 0 || + p->it_sched_expires > nt->expires.sched) + p->it_sched_expires = nt->expires.sched; + break; } } else { /* @@ -934,7 +960,7 @@ { struct list_head *timers = tsk->cpu_timers; - tsk->it_prof_expires = 0; + tsk->it_prof_expires = cputime_zero; while (!list_empty(timers)) { struct cpu_timer_list *t = list_entry(timers->next, struct cpu_timer_list, @@ -948,7 +974,7 @@ } ++timers; - tsk->it_virt_expires = 0; + tsk->it_virt_expires = cputime_zero; while (!list_empty(timers)) { struct cpu_timer_list *t = list_entry(timers->next, struct cpu_timer_list, @@ -1044,7 +1070,7 @@ } ++timers; - sched_expires = cputime_zero; + sched_expires = 0; while (!list_empty(timers)) { struct cpu_timer_list *t = list_entry(timers->next, struct cpu_timer_list, @@ -1132,9 +1158,11 @@ unsigned long long sched_left, sched; const unsigned int nthreads = atomic_read(&sig->live); - prof_left = cputime_sub(prof_expires, - cputime_add(utime, stime)) / nthreads; - virt_left = cputime_sub(virt_expires, utime) / nthreads; + prof_left = cputime_sub(prof_expires, utime); + prof_left = cputime_sub(prof_left, stime); + prof_left = cputime_div(prof_left, nthreads); + virt_left = cputime_sub(virt_expires, utime); + virt_left = cputime_div(virt_left, nthreads); if (sched_expires) { sched_left = sched_expires - sched_time; do_div(sched_left, nthreads); @@ -1245,7 +1273,7 @@ BUG_ON(!irqs_disabled()); #define UNEXPIRED(clock) \ - (tsk->it_##clock##_expires == 0 || \ + (cputime_eq(tsk->it_##clock##_expires, cputime_zero) || \ cputime_lt(clock##_ticks(tsk), tsk->it_##clock##_expires)) if (UNEXPIRED(prof) && UNEXPIRED(virt) && diff -Nru a/kernel/posix-timers.c b/kernel/posix-timers.c --- a/kernel/posix-timers.c 2005-03-30 16:58:48 -08:00 +++ b/kernel/posix-timers.c 2005-03-30 16:58:48 -08:00 @@ -46,6 +46,7 @@ #include #include #include +#include #ifndef div_long_long_rem #include @@ -460,6 +461,7 @@ timr->it_process); } } +EXPORT_SYMBOL_GPL(posix_timer_event); /* * This function gets called when a POSIX.1b interval timer expires. It @@ -555,6 +557,7 @@ posix_clocks[clock_id] = *new_clock; } +EXPORT_SYMBOL_GPL(register_posix_clock); static struct k_itimer * alloc_posix_timer(void) { @@ -935,6 +938,10 @@ */ if (oc.tv_sec < 0) oc.tv_sec = oc.tv_nsec = 0; + + if (oc.tv_sec | oc.tv_nsec) + set_normalized_timespec(&oc, oc.tv_sec, + oc.tv_nsec + clock->res); tstojiffie(&oc, clock->res, exp); /* @@ -1246,16 +1253,17 @@ return do_posix_clock_monotonic_get(CLOCK_MONOTONIC, tp); } - int do_posix_clock_nosettime(clockid_t clockid, struct timespec *tp) { return -EINVAL; } +EXPORT_SYMBOL_GPL(do_posix_clock_nosettime); int do_posix_clock_notimer_create(struct k_itimer *timer) { return -EINVAL; } +EXPORT_SYMBOL_GPL(do_posix_clock_notimer_create); int do_posix_clock_nonanosleep(clockid_t clock, int flags, struct timespec *t) { @@ -1265,6 +1273,7 @@ return -ENOTSUP; #endif } +EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep); asmlinkage long sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp) @@ -1502,7 +1511,6 @@ if (abs || !rq_time) { adjust_abs_time(&posix_clocks[which_clock], &t, abs, &rq_time, &dum); - rq_time += (t.tv_sec || t.tv_nsec); } left = rq_time - get_jiffies_64(); diff -Nru a/kernel/power/main.c b/kernel/power/main.c --- a/kernel/power/main.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/power/main.c 2005-03-30 16:58:47 -08:00 @@ -65,8 +65,10 @@ goto Thaw; } - if ((error = device_suspend(PMSG_SUSPEND))) + if ((error = device_suspend(PMSG_SUSPEND))) { + printk(KERN_ERR "Some devices failed to suspend\n"); goto Finish; + } return 0; Finish: if (pm_ops->finish) @@ -85,8 +87,10 @@ local_irq_save(flags); - if ((error = device_power_down(PMSG_SUSPEND))) + if ((error = device_power_down(PMSG_SUSPEND))) { + printk(KERN_ERR "Some devices failed to power down\n"); goto Done; + } error = pm_ops->enter(state); device_power_up(); Done: diff -Nru a/kernel/power/swsusp.c b/kernel/power/swsusp.c --- a/kernel/power/swsusp.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/power/swsusp.c 2005-03-30 16:58:47 -08:00 @@ -98,7 +98,6 @@ */ suspend_pagedir_t *pagedir_nosave __nosavedata = NULL; static suspend_pagedir_t *pagedir_save; -static int pagedir_order __nosavedata = 0; #define SWSUSP_SIG "S1SUSPEND" @@ -893,34 +892,29 @@ * at resume time, and evil weirdness ensues. */ if ((error = device_power_down(PMSG_FREEZE))) { + printk(KERN_ERR "Some devices failed to power down, aborting suspend\n"); local_irq_enable(); + swsusp_free(); return error; } save_processor_state(); - error = swsusp_arch_suspend(); + if ((error = swsusp_arch_suspend())) + swsusp_free(); /* Restore control flow magically appears here */ restore_processor_state(); + BUG_ON (nr_copy_pages_check != nr_copy_pages); restore_highmem(); device_power_up(); local_irq_enable(); return error; } - -asmlinkage int swsusp_restore(void) -{ - BUG_ON (nr_copy_pages_check != nr_copy_pages); - - /* Even mappings of "global" things (vmalloc) need to be fixed */ - __flush_tlb_global(); - return 0; -} - int swsusp_resume(void) { int error; local_irq_disable(); - device_power_down(PMSG_FREEZE); + if (device_power_down(PMSG_FREEZE)) + printk(KERN_ERR "Some devices failed to power down, very bad\n"); /* We'll ignore saved state, but this gets preempt count (etc) right */ save_processor_state(); error = swsusp_arch_resume(); @@ -1219,7 +1213,6 @@ return -EPERM; } nr_copy_pages = swsusp_info.image_pages; - pagedir_order = get_bitmask_order(SUSPEND_PD_PAGES(nr_copy_pages)); return error; } @@ -1238,7 +1231,7 @@ */ error = bio_write_page(0, &swsusp_header); } else { - pr_debug(KERN_ERR "swsusp: Suspend partition has wrong signature?\n"); + printk(KERN_ERR "swsusp: Suspend partition has wrong signature?\n"); return -EINVAL; } if (!error) diff -Nru a/kernel/printk.c b/kernel/printk.c --- a/kernel/printk.c 2005-03-30 16:58:50 -08:00 +++ b/kernel/printk.c 2005-03-30 16:58:50 -08:00 @@ -861,6 +861,11 @@ if (!(console->flags & CON_ENABLED)) return; + if (console_drivers && (console_drivers->flags & CON_BOOT)) { + unregister_console(console_drivers); + console->flags &= ~CON_PRINTBUFFER; + } + /* * Put this console in the list - keep the * preferred driver at the head of the list. diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c 2005-03-30 16:58:50 -08:00 +++ b/kernel/sched.c 2005-03-30 16:58:50 -08:00 @@ -3741,14 +3741,11 @@ */ int cond_resched_lock(spinlock_t * lock) { -#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) - if (lock->break_lock) { - lock->break_lock = 0; + if (need_lockbreak(lock)) { spin_unlock(lock); cpu_relax(); spin_lock(lock); } -#endif if (need_resched()) { _raw_spin_unlock(lock); preempt_enable_no_resched(); diff -Nru a/kernel/signal.c b/kernel/signal.c --- a/kernel/signal.c 2005-03-30 16:58:48 -08:00 +++ b/kernel/signal.c 2005-03-30 16:58:48 -08:00 @@ -259,7 +259,7 @@ return sig; } -static struct sigqueue *__sigqueue_alloc(struct task_struct *t, int flags, +static struct sigqueue *__sigqueue_alloc(struct task_struct *t, unsigned int __nocast flags, int override_rlimit) { struct sigqueue *q = NULL; @@ -2219,6 +2219,8 @@ current->state = TASK_INTERRUPTIBLE; timeout = schedule_timeout(timeout); + if (current->flags & PF_FREEZE) + refrigerator(PF_FREEZE); spin_lock_irq(¤t->sighand->siglock); sig = dequeue_signal(current, &these, &info); current->blocked = current->real_blocked; diff -Nru a/kernel/spinlock.c b/kernel/spinlock.c --- a/kernel/spinlock.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/spinlock.c 2005-03-30 16:58:47 -08:00 @@ -187,6 +187,7 @@ cpu_relax(); \ preempt_disable(); \ } \ + (lock)->break_lock = 0; \ } \ \ EXPORT_SYMBOL(_##op##_lock); \ @@ -209,6 +210,7 @@ cpu_relax(); \ preempt_disable(); \ } \ + (lock)->break_lock = 0; \ return flags; \ } \ \ diff -Nru a/kernel/stop_machine.c b/kernel/stop_machine.c --- a/kernel/stop_machine.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/stop_machine.c 2005-03-30 16:58:47 -08:00 @@ -6,6 +6,7 @@ #include #include #include +#include /* Since we effect priority and affinity (both of which are visible * to, and settable by outside processes) we do indirection via a @@ -86,9 +87,13 @@ { int i, ret = 0; struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; + mm_segment_t old_fs = get_fs(); /* One high-prio thread per cpu. We'll do this one. */ - sys_sched_setscheduler(current->pid, SCHED_FIFO, ¶m); + set_fs(KERNEL_DS); + sys_sched_setscheduler(current->pid, SCHED_FIFO, + (struct sched_param __user *)¶m); + set_fs(old_fs); atomic_set(&stopmachine_thread_ack, 0); stopmachine_num_threads = 0; diff -Nru a/kernel/sys_ni.c b/kernel/sys_ni.c --- a/kernel/sys_ni.c 2005-03-30 16:58:50 -08:00 +++ b/kernel/sys_ni.c 2005-03-30 16:58:50 -08:00 @@ -83,3 +83,4 @@ cond_syscall(sys_pciconfig_iobase); cond_syscall(sys32_ipc); cond_syscall(sys32_sysctl); +cond_syscall(ppc_rtas); diff -Nru a/kernel/time.c b/kernel/time.c --- a/kernel/time.c 2005-03-30 16:58:47 -08:00 +++ b/kernel/time.c 2005-03-30 16:58:47 -08:00 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -215,6 +216,14 @@ /* hook for a loadable hardpps kernel module */ void (*hardpps_ptr)(struct timeval *); +/* we call this to notify the arch when the clock is being + * controlled. If no such arch routine, do nothing. + */ +void __attribute__ ((weak)) notify_arch_cmos_timer(void) +{ + return; +} + /* adjtimex mainly allows reading (and writing, if superuser) of * kernel time-keeping variables. used by xntpd. */ @@ -398,6 +407,7 @@ txc->stbcnt = pps_stbcnt; write_sequnlock_irq(&xtime_lock); do_gettimeofday(&txc->time); + notify_arch_cmos_timer(); return(result); } @@ -494,6 +504,7 @@ tv->tv_sec = sec; tv->tv_nsec = nsec; } +EXPORT_SYMBOL_GPL(getnstimeofday); int do_settimeofday (struct timespec *tv) { diff -Nru a/lib/Kconfig.debug b/lib/Kconfig.debug --- a/lib/Kconfig.debug 2005-03-30 16:58:50 -08:00 +++ b/lib/Kconfig.debug 2005-03-30 16:58:50 -08:00 @@ -17,7 +17,7 @@ config MAGIC_SYSRQ bool "Magic SysRq key" - depends on DEBUG_KERNEL + depends on DEBUG_KERNEL && !UML help If you say Y here, you will have some control over the system even if the system crashes for example during kernel debugging (e.g., you @@ -108,7 +108,7 @@ config DEBUG_BUGVERBOSE bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED - depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64) + depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64) || FRV default !EMBEDDED help Say Y here to make BUG() panics output the file name and line number @@ -150,7 +150,7 @@ config FRAME_POINTER bool "Compile the kernel with frame pointers" - depends on DEBUG_KERNEL && ((X86 && !X86_64) || CRIS || M68K || M68KNOMMU) + depends on DEBUG_KERNEL && ((X86 && !X86_64) || CRIS || M68K || M68KNOMMU || FRV) help If you say Y here the resulting kernel image will be slightly larger and slower, but it will give very useful debugging information. diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c 2005-03-30 16:58:51 -08:00 +++ b/mm/filemap.c 2005-03-30 16:58:51 -08:00 @@ -666,7 +666,7 @@ grab_cache_page_nowait(struct address_space *mapping, unsigned long index) { struct page *page = find_get_page(mapping, index); - int gfp_mask; + unsigned int gfp_mask; if (page) { if (!TestSetPageLocked(page)) @@ -1167,7 +1167,8 @@ * it in the page cache, and handles the special cases reasonably without * having a lot of duplicated code. */ -struct page * filemap_nopage(struct vm_area_struct * area, unsigned long address, int *type) +struct page *filemap_nopage(struct vm_area_struct *area, + unsigned long address, int *type) { int error; struct file *file = area->vm_file; @@ -1175,11 +1176,10 @@ struct file_ra_state *ra = &file->f_ra; struct inode *inode = mapping->host; struct page *page; - unsigned long size, pgoff, endoff; + unsigned long size, pgoff; int did_readaround = 0, majmin = VM_FAULT_MINOR; - pgoff = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) + area->vm_pgoff; - endoff = ((area->vm_end - area->vm_start) >> PAGE_CACHE_SHIFT) + area->vm_pgoff; + pgoff = ((address-area->vm_start) >> PAGE_CACHE_SHIFT) + area->vm_pgoff; retry_all: size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; @@ -1189,13 +1189,6 @@ /* If we don't want any read-ahead, don't bother */ if (VM_RandomReadHint(area)) goto no_cached_page; - - /* - * The "size" of the file, as far as mmap is concerned, isn't bigger - * than the mapping - */ - if (size > endoff) - size = endoff; /* * The readahead code wants to be told about each and every page diff -Nru a/mm/fremap.c b/mm/fremap.c --- a/mm/fremap.c 2005-03-30 16:58:47 -08:00 +++ b/mm/fremap.c 2005-03-30 16:58:47 -08:00 @@ -39,7 +39,7 @@ set_page_dirty(page); page_remove_rmap(page); page_cache_release(page); - mm->rss--; + dec_mm_counter(mm, rss); } } } else { @@ -92,7 +92,7 @@ zap_pte(mm, vma, addr, pte); - mm->rss++; + inc_mm_counter(mm,rss); flush_icache_page(vma, page); set_pte_at(mm, addr, pte, mk_pte(page, prot)); page_add_file_rmap(page); diff -Nru a/mm/highmem.c b/mm/highmem.c --- a/mm/highmem.c 2005-03-30 16:58:49 -08:00 +++ b/mm/highmem.c 2005-03-30 16:58:49 -08:00 @@ -30,9 +30,9 @@ static mempool_t *page_pool, *isa_page_pool; -static void *page_pool_alloc(int gfp_mask, void *data) +static void *page_pool_alloc(unsigned int __nocast gfp_mask, void *data) { - int gfp = gfp_mask | (int) (long) data; + unsigned int gfp = gfp_mask | (unsigned int) (long) data; return alloc_page(gfp); } diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c 2005-03-30 16:58:48 -08:00 +++ b/mm/memory.c 2005-03-30 16:58:48 -08:00 @@ -309,9 +309,9 @@ pte = pte_mkclean(pte); pte = pte_mkold(pte); get_page(page); - dst_mm->rss++; + inc_mm_counter(dst_mm, rss); if (PageAnon(page)) - dst_mm->anon_rss++; + inc_mm_counter(dst_mm, anon_rss); set_pte_at(dst_mm, addr, dst_pte, pte); page_dup_rmap(page); } @@ -475,7 +475,7 @@ if (pte_dirty(ptent)) set_page_dirty(page); if (PageAnon(page)) - tlb->mm->anon_rss--; + dec_mm_counter(tlb->mm, anon_rss); else if (pte_young(ptent)) mark_page_accessed(page); tlb->freed++; @@ -1134,6 +1134,7 @@ vma); ptep_establish(vma, address, page_table, entry); update_mmu_cache(vma, address, entry); + lazy_mmu_prot_update(entry); } /* @@ -1186,6 +1187,7 @@ vma); ptep_set_access_flags(vma, address, page_table, entry, 1); update_mmu_cache(vma, address, entry); + lazy_mmu_prot_update(entry); pte_unmap(page_table); spin_unlock(&mm->page_table_lock); return VM_FAULT_MINOR; @@ -1219,9 +1221,9 @@ page_table = pte_offset_map(pmd, address); if (likely(pte_same(*page_table, pte))) { if (PageAnon(old_page)) - mm->anon_rss--; + dec_mm_counter(mm, anon_rss); if (PageReserved(old_page)) - ++mm->rss; + inc_mm_counter(mm, rss); else page_remove_rmap(old_page); flush_cache_page(vma, address, pfn); @@ -1627,7 +1629,7 @@ if (vm_swap_full()) remove_exclusive_swap_page(page); - mm->rss++; + inc_mm_counter(mm, rss); pte = mk_pte(page, vma->vm_page_prot); if (write_access && can_share_swap_page(page)) { pte = maybe_mkwrite(pte_mkdirty(pte), vma); @@ -1648,6 +1650,7 @@ /* No need to invalidate - it was non-present before */ update_mmu_cache(vma, address, pte); + lazy_mmu_prot_update(pte); pte_unmap(page_table); spin_unlock(&mm->page_table_lock); out: @@ -1691,7 +1694,7 @@ spin_unlock(&mm->page_table_lock); goto out; } - mm->rss++; + inc_mm_counter(mm, rss); entry = maybe_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)), vma); @@ -1705,6 +1708,7 @@ /* No need to invalidate - it was non-present before */ update_mmu_cache(vma, addr, entry); + lazy_mmu_prot_update(entry); spin_unlock(&mm->page_table_lock); out: return VM_FAULT_MINOR; @@ -1807,7 +1811,7 @@ /* Only go through if we didn't race with anybody else... */ if (pte_none(*page_table)) { if (!PageReserved(new_page)) - ++mm->rss; + inc_mm_counter(mm, rss); flush_icache_page(vma, new_page); entry = mk_pte(new_page, vma->vm_page_prot); @@ -1830,6 +1834,7 @@ /* no need to invalidate: a not-present page shouldn't be cached */ update_mmu_cache(vma, address, entry); + lazy_mmu_prot_update(entry); spin_unlock(&mm->page_table_lock); out: return ret; @@ -1924,6 +1929,7 @@ entry = pte_mkyoung(entry); ptep_set_access_flags(vma, address, pte, entry, write_access); update_mmu_cache(vma, address, entry); + lazy_mmu_prot_update(entry); pte_unmap(pte); spin_unlock(&mm->page_table_lock); return VM_FAULT_MINOR; @@ -2112,8 +2118,10 @@ void update_mem_hiwater(struct task_struct *tsk) { if (tsk->mm) { - if (tsk->mm->hiwater_rss < tsk->mm->rss) - tsk->mm->hiwater_rss = tsk->mm->rss; + unsigned long rss = get_mm_counter(tsk->mm, rss); + + if (tsk->mm->hiwater_rss < rss) + tsk->mm->hiwater_rss = rss; if (tsk->mm->hiwater_vm < tsk->mm->total_vm) tsk->mm->hiwater_vm = tsk->mm->total_vm; } diff -Nru a/mm/mempolicy.c b/mm/mempolicy.c --- a/mm/mempolicy.c 2005-03-30 16:58:50 -08:00 +++ b/mm/mempolicy.c 2005-03-30 16:58:50 -08:00 @@ -648,7 +648,7 @@ } /* Return a zonelist representing a mempolicy */ -static struct zonelist *zonelist_policy(unsigned gfp, struct mempolicy *policy) +static struct zonelist *zonelist_policy(unsigned int __nocast gfp, struct mempolicy *policy) { int nd; @@ -712,7 +712,7 @@ /* Allocate a page in interleaved policy. Own path because it needs to do special accounting. */ -static struct page *alloc_page_interleave(unsigned gfp, unsigned order, unsigned nid) +static struct page *alloc_page_interleave(unsigned int __nocast gfp, unsigned order, unsigned nid) { struct zonelist *zl; struct page *page; @@ -750,7 +750,7 @@ * Should be called with the mm_sem of the vma hold. */ struct page * -alloc_page_vma(unsigned gfp, struct vm_area_struct *vma, unsigned long addr) +alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned long addr) { struct mempolicy *pol = get_vma_policy(vma, addr); @@ -788,12 +788,16 @@ * Allocate a page from the kernel page pool. When not in * interrupt context and apply the current process NUMA policy. * Returns NULL when no page can be allocated. + * + * Don't call cpuset_update_current_mems_allowed() unless + * 1) it's ok to take cpuset_sem (can WAIT), and + * 2) allocating for current task (not interrupt). */ -struct page *alloc_pages_current(unsigned gfp, unsigned order) +struct page *alloc_pages_current(unsigned int __nocast gfp, unsigned order) { struct mempolicy *pol = current->mempolicy; - if (!in_interrupt()) + if ((gfp & __GFP_WAIT) && !in_interrupt()) cpuset_update_current_mems_allowed(); if (!pol || in_interrupt()) pol = &default_policy; diff -Nru a/mm/mempool.c b/mm/mempool.c --- a/mm/mempool.c 2005-03-30 16:58:49 -08:00 +++ b/mm/mempool.c 2005-03-30 16:58:49 -08:00 @@ -105,7 +105,7 @@ * while this function is running. mempool_alloc() & mempool_free() * might be called (eg. from IRQ contexts) while this function executes. */ -int mempool_resize(mempool_t *pool, int new_min_nr, int gfp_mask) +int mempool_resize(mempool_t *pool, int new_min_nr, unsigned int __nocast gfp_mask) { void *element; void **new_elements; @@ -193,7 +193,7 @@ * *never* fails when called from process contexts. (it might * fail if called from an IRQ context.) */ -void * mempool_alloc(mempool_t *pool, int gfp_mask) +void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask) { void *element; unsigned long flags; @@ -275,7 +275,7 @@ /* * A commonly used alloc and free fn. */ -void *mempool_alloc_slab(int gfp_mask, void *pool_data) +void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data) { kmem_cache_t *mem = (kmem_cache_t *) pool_data; return kmem_cache_alloc(mem, gfp_mask); diff -Nru a/mm/mmap.c b/mm/mmap.c --- a/mm/mmap.c 2005-03-30 16:58:49 -08:00 +++ b/mm/mmap.c 2005-03-30 16:58:49 -08:00 @@ -896,16 +896,16 @@ prot |= PROT_EXEC; if (!len) - return addr; + return -EINVAL; /* Careful about overflows.. */ len = PAGE_ALIGN(len); if (!len || len > TASK_SIZE) - return -EINVAL; + return -ENOMEM; /* offset overflow? */ if ((pgoff + (len >> PAGE_SHIFT)) < pgoff) - return -EINVAL; + return -EOVERFLOW; /* Too many mappings? */ if (mm->map_count > sysctl_max_map_count) @@ -1316,7 +1316,7 @@ * reserved hugepage range. For some archs like IA-64, * there is a separate region for hugepages. */ - ret = is_hugepage_only_range(addr, len); + ret = is_hugepage_only_range(current->mm, addr, len); } if (ret) return -EINVAL; @@ -1687,7 +1687,7 @@ unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL); vm_unacct_memory(nr_accounted); - if (is_hugepage_only_range(start, end - start)) + if (is_hugepage_only_range(mm, start, end - start)) hugetlb_free_pgtables(tlb, prev, start, end); else free_pgtables(tlb, prev, start, end); @@ -1978,7 +1978,7 @@ vma = mm->mmap; mm->mmap = mm->mmap_cache = NULL; mm->mm_rb = RB_ROOT; - mm->rss = 0; + set_mm_counter(mm, rss, 0); mm->total_vm = 0; mm->locked_vm = 0; diff -Nru a/mm/mprotect.c b/mm/mprotect.c --- a/mm/mprotect.c 2005-03-30 16:58:51 -08:00 +++ b/mm/mprotect.c 2005-03-30 16:58:51 -08:00 @@ -39,8 +39,9 @@ * bits by wiping the pte and then setting the new pte * into place. */ - ptent = ptep_get_and_clear(mm, addr, pte); - set_pte_at(mm, addr, pte, pte_modify(ptent, newprot)); + ptent = pte_modify(ptep_get_and_clear(mm, addr, pte), newprot); + set_pte_at(mm, addr, pte, ptent); + lazy_mmu_prot_update(ptent); } } while (pte++, addr += PAGE_SIZE, addr != end); pte_unmap(pte - 1); @@ -189,14 +190,14 @@ if (start & ~PAGE_MASK) return -EINVAL; + if (!len) + return 0; len = PAGE_ALIGN(len); end = start + len; - if (end < start) + if (end <= start) return -ENOMEM; if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) return -EINVAL; - if (end == start) - return 0; reqprot = prot; /* diff -Nru a/mm/nommu.c b/mm/nommu.c --- a/mm/nommu.c 2005-03-30 16:58:50 -08:00 +++ b/mm/nommu.c 2005-03-30 16:58:50 -08:00 @@ -961,9 +961,11 @@ void update_mem_hiwater(struct task_struct *tsk) { + unsigned long rss = get_mm_counter(tsk->mm, rss); + if (likely(tsk->mm)) { - if (tsk->mm->hiwater_rss < tsk->mm->rss) - tsk->mm->hiwater_rss = tsk->mm->rss; + if (tsk->mm->hiwater_rss < rss) + tsk->mm->hiwater_rss = rss; if (tsk->mm->hiwater_vm < tsk->mm->total_vm) tsk->mm->hiwater_vm = tsk->mm->total_vm; } diff -Nru a/mm/oom_kill.c b/mm/oom_kill.c --- a/mm/oom_kill.c 2005-03-30 16:58:49 -08:00 +++ b/mm/oom_kill.c 2005-03-30 16:58:49 -08:00 @@ -253,7 +253,7 @@ * OR try to be smart about which process to kill. Note that we * don't have to be perfect here, we just have to be good. */ -void out_of_memory(int gfp_mask) +void out_of_memory(unsigned int __nocast gfp_mask) { struct mm_struct *mm = NULL; task_t * p; diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c 2005-03-30 16:58:50 -08:00 +++ b/mm/page_alloc.c 2005-03-30 16:58:50 -08:00 @@ -633,7 +633,7 @@ free_hot_cold_page(page, 1); } -static inline void prep_zero_page(struct page *page, int order, int gfp_flags) +static inline void prep_zero_page(struct page *page, int order, unsigned int __nocast gfp_flags) { int i; @@ -648,7 +648,7 @@ * or two. */ static struct page * -buffered_rmqueue(struct zone *zone, int order, int gfp_flags) +buffered_rmqueue(struct zone *zone, int order, unsigned int __nocast gfp_flags) { unsigned long flags; struct page *page = NULL; @@ -726,7 +726,7 @@ * This is the 'heart' of the zoned buddy allocator. */ struct page * fastcall -__alloc_pages(unsigned int gfp_mask, unsigned int order, +__alloc_pages(unsigned int __nocast gfp_mask, unsigned int order, struct zonelist *zonelist) { const int wait = gfp_mask & __GFP_WAIT; @@ -908,7 +908,7 @@ /* * Common helper functions. */ -fastcall unsigned long __get_free_pages(unsigned int gfp_mask, unsigned int order) +fastcall unsigned long __get_free_pages(unsigned int __nocast gfp_mask, unsigned int order) { struct page * page; page = alloc_pages(gfp_mask, order); @@ -919,7 +919,7 @@ EXPORT_SYMBOL(__get_free_pages); -fastcall unsigned long get_zeroed_page(unsigned int gfp_mask) +fastcall unsigned long get_zeroed_page(unsigned int __nocast gfp_mask) { struct page * page; diff -Nru a/mm/page_io.c b/mm/page_io.c --- a/mm/page_io.c 2005-03-30 16:58:47 -08:00 +++ b/mm/page_io.c 2005-03-30 16:58:47 -08:00 @@ -19,7 +19,7 @@ #include #include -static struct bio *get_swap_bio(int gfp_flags, pgoff_t index, +static struct bio *get_swap_bio(unsigned int __nocast gfp_flags, pgoff_t index, struct page *page, bio_end_io_t end_io) { struct bio *bio; diff -Nru a/mm/rmap.c b/mm/rmap.c --- a/mm/rmap.c 2005-03-30 16:58:51 -08:00 +++ b/mm/rmap.c 2005-03-30 16:58:51 -08:00 @@ -257,7 +257,7 @@ pte_t *pte; int referenced = 0; - if (!mm->rss) + if (!get_mm_counter(mm, rss)) goto out; address = vma_address(page, vma); if (address == -EFAULT) @@ -436,7 +436,7 @@ BUG_ON(PageReserved(page)); BUG_ON(!anon_vma); - vma->vm_mm->anon_rss++; + inc_mm_counter(vma->vm_mm, anon_rss); anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON; index = (address - vma->vm_start) >> PAGE_SHIFT; @@ -509,7 +509,7 @@ pte_t pteval; int ret = SWAP_AGAIN; - if (!mm->rss) + if (!get_mm_counter(mm, rss)) goto out; address = vma_address(page, vma); if (address == -EFAULT) @@ -595,10 +595,10 @@ } set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); BUG_ON(pte_file(*pte)); - mm->anon_rss--; + dec_mm_counter(mm, anon_rss); } - mm->rss--; + inc_mm_counter(mm, rss); page_remove_rmap(page); page_cache_release(page); @@ -703,7 +703,7 @@ page_remove_rmap(page); page_cache_release(page); - mm->rss--; + dec_mm_counter(mm, rss); (*mapcount)--; } @@ -802,7 +802,7 @@ if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) continue; cursor = (unsigned long) vma->vm_private_data; - while (vma->vm_mm->rss && + while (get_mm_counter(vma->vm_mm, rss) && cursor < max_nl_cursor && cursor < vma->vm_end - vma->vm_start) { try_to_unmap_cluster(cursor, &mapcount, vma); diff -Nru a/mm/shmem.c b/mm/shmem.c --- a/mm/shmem.c 2005-03-30 16:58:48 -08:00 +++ b/mm/shmem.c 2005-03-30 16:58:48 -08:00 @@ -922,7 +922,7 @@ } static inline struct page * -shmem_alloc_page(unsigned long gfp,struct shmem_inode_info *info, +shmem_alloc_page(unsigned int __nocast gfp,struct shmem_inode_info *info, unsigned long idx) { return alloc_page(gfp | __GFP_ZERO); diff -Nru a/mm/slab.c b/mm/slab.c --- a/mm/slab.c 2005-03-30 16:58:51 -08:00 +++ b/mm/slab.c 2005-03-30 16:58:51 -08:00 @@ -507,10 +507,9 @@ struct cache_sizes malloc_sizes[] = { #define CACHE(x) { .cs_size = (x) }, #include - { 0, } + CACHE(ULONG_MAX) #undef CACHE }; - EXPORT_SYMBOL(malloc_sizes); /* Must match cache_sizes above. Out of line to keep cache footprint low. */ @@ -574,7 +573,7 @@ static void enable_cpucache (kmem_cache_t *cachep); static void cache_reap (void *unused); -static inline void ** ac_entry(struct array_cache *ac) +static inline void **ac_entry(struct array_cache *ac) { return (void**)(ac+1); } @@ -584,24 +583,32 @@ return cachep->array[smp_processor_id()]; } -static kmem_cache_t * kmem_find_general_cachep (size_t size, int gfpflags) +static inline kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags) { struct cache_sizes *csizep = malloc_sizes; - /* This function could be moved to the header file, and - * made inline so consumers can quickly determine what - * cache pointer they require. +#if DEBUG + /* This happens if someone tries to call + * kmem_cache_create(), or __kmalloc(), before + * the generic caches are initialized. + */ + BUG_ON(csizep->cs_cachep == NULL); +#endif + while (size > csizep->cs_size) + csizep++; + + /* + * Really subtile: The last entry with cs->cs_size==ULONG_MAX + * has cs_{dma,}cachep==NULL. Thus no special case + * for large kmalloc calls required. */ - for ( ; csizep->cs_size; csizep++) { - if (size > csizep->cs_size) - continue; - break; - } - return (gfpflags & GFP_DMA) ? csizep->cs_dmacachep : csizep->cs_cachep; + if (unlikely(gfpflags & GFP_DMA)) + return csizep->cs_dmacachep; + return csizep->cs_cachep; } /* Cal the num objs, wastage, and bytes left over for a given slab size. */ -static void cache_estimate (unsigned long gfporder, size_t size, size_t align, +static void cache_estimate(unsigned long gfporder, size_t size, size_t align, int flags, size_t *left_over, unsigned int *num) { int i; @@ -659,7 +666,8 @@ } } -static struct array_cache *alloc_arraycache(int cpu, int entries, int batchcount) +static struct array_cache *alloc_arraycache(int cpu, int entries, + int batchcount) { int memsize = sizeof(void*)*entries+sizeof(struct array_cache); struct array_cache *nc = NULL; @@ -682,8 +690,7 @@ } static int __devinit cpuup_callback(struct notifier_block *nfb, - unsigned long action, - void *hcpu) + unsigned long action, void *hcpu) { long cpu = (long)hcpu; kmem_cache_t* cachep; @@ -796,7 +803,7 @@ sizes = malloc_sizes; names = cache_names; - while (sizes->cs_size) { + while (sizes->cs_size != ULONG_MAX) { /* For performance, all the general caches are L1 aligned. * This should be particularly beneficial on SMP boxes, as it * eliminates "false sharing". @@ -888,7 +895,7 @@ * did not request dmaable memory, we might get it, but that * would be relatively rare and ignorable. */ -static void *kmem_getpages(kmem_cache_t *cachep, int flags, int nodeid) +static void *kmem_getpages(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid) { struct page *page; void *addr; @@ -950,7 +957,8 @@ #if DEBUG #ifdef CONFIG_DEBUG_PAGEALLOC -static void store_stackinfo(kmem_cache_t *cachep, unsigned long *addr, unsigned long caller) +static void store_stackinfo(kmem_cache_t *cachep, unsigned long *addr, + unsigned long caller) { int size = obj_reallen(cachep); @@ -1608,7 +1616,6 @@ return __cache_shrink(cachep); } - EXPORT_SYMBOL(kmem_cache_shrink); /** @@ -1628,7 +1635,7 @@ * The caller must guarantee that noone will allocate memory from the cache * during the kmem_cache_destroy(). */ -int kmem_cache_destroy (kmem_cache_t * cachep) +int kmem_cache_destroy(kmem_cache_t * cachep) { int i; @@ -1673,12 +1680,11 @@ return 0; } - EXPORT_SYMBOL(kmem_cache_destroy); /* Get the memory for a slab management obj. */ -static struct slab* alloc_slabmgmt (kmem_cache_t *cachep, - void *objp, int colour_off, int local_flags) +static struct slab* alloc_slabmgmt(kmem_cache_t *cachep, + void *objp, int colour_off, unsigned int __nocast local_flags) { struct slab *slabp; @@ -1703,8 +1709,8 @@ return (kmem_bufctl_t *)(slabp+1); } -static void cache_init_objs (kmem_cache_t * cachep, - struct slab * slabp, unsigned long ctor_flags) +static void cache_init_objs(kmem_cache_t *cachep, + struct slab *slabp, unsigned long ctor_flags) { int i; @@ -1749,7 +1755,7 @@ slabp->free = 0; } -static void kmem_flagcheck(kmem_cache_t *cachep, int flags) +static void kmem_flagcheck(kmem_cache_t *cachep, unsigned int flags) { if (flags & SLAB_DMA) { if (!(cachep->gfpflags & GFP_DMA)) @@ -1779,12 +1785,12 @@ * Grow (by 1) the number of slabs within a cache. This is called by * kmem_cache_alloc() when there are no active objs left in a cache. */ -static int cache_grow (kmem_cache_t * cachep, int flags, int nodeid) +static int cache_grow(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid) { struct slab *slabp; void *objp; size_t offset; - int local_flags; + unsigned int local_flags; unsigned long ctor_flags; /* Be lazy and only check for valid flags here, @@ -1884,7 +1890,8 @@ } } -static void *cache_free_debugcheck (kmem_cache_t * cachep, void * objp, void *caller) +static void *cache_free_debugcheck(kmem_cache_t *cachep, void *objp, + void *caller) { struct page *page; unsigned int objnr; @@ -1952,18 +1959,17 @@ static void check_slabp(kmem_cache_t *cachep, struct slab *slabp) { - int i; + kmem_bufctl_t i; int entries = 0; check_spinlock_acquired(cachep); /* Check slab's freelist to see if this obj is there. */ for (i = slabp->free; i != BUFCTL_END; i = slab_bufctl(slabp)[i]) { entries++; - if (entries > cachep->num || i < 0 || i >= cachep->num) + if (entries > cachep->num || i >= cachep->num) goto bad; } if (entries != cachep->num - slabp->inuse) { - int i; bad: printk(KERN_ERR "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n", cachep->name, cachep->num, slabp, slabp->inuse); @@ -1982,7 +1988,7 @@ #define check_slabp(x,y) do { } while(0) #endif -static void* cache_alloc_refill(kmem_cache_t* cachep, int flags) +static void *cache_alloc_refill(kmem_cache_t *cachep, unsigned int __nocast flags) { int batchcount; struct kmem_list3 *l3; @@ -2079,7 +2085,7 @@ } static inline void -cache_alloc_debugcheck_before(kmem_cache_t *cachep, int flags) +cache_alloc_debugcheck_before(kmem_cache_t *cachep, unsigned int __nocast flags) { might_sleep_if(flags & __GFP_WAIT); #if DEBUG @@ -2134,7 +2140,7 @@ #endif -static inline void * __cache_alloc (kmem_cache_t *cachep, int flags) +static inline void *__cache_alloc(kmem_cache_t *cachep, unsigned int __nocast flags) { unsigned long save_flags; void* objp; @@ -2213,7 +2219,7 @@ } } -static void cache_flusharray (kmem_cache_t* cachep, struct array_cache *ac) +static void cache_flusharray(kmem_cache_t *cachep, struct array_cache *ac) { int batchcount; @@ -2270,7 +2276,7 @@ * * Called with disabled ints. */ -static inline void __cache_free (kmem_cache_t *cachep, void* objp) +static inline void __cache_free(kmem_cache_t *cachep, void *objp) { struct array_cache *ac = ac_data(cachep); @@ -2296,11 +2302,10 @@ * Allocate an object from this cache. The flags are only relevant * if the cache has no available objects. */ -void * kmem_cache_alloc (kmem_cache_t *cachep, int flags) +void *kmem_cache_alloc(kmem_cache_t *cachep, unsigned int __nocast flags) { return __cache_alloc(cachep, flags); } - EXPORT_SYMBOL(kmem_cache_alloc); /** @@ -2453,26 +2458,15 @@ * platforms. For example, on i386, it means that the memory must come * from the first 16MB. */ -void * __kmalloc (size_t size, int flags) +void *__kmalloc(size_t size, unsigned int __nocast flags) { - struct cache_sizes *csizep = malloc_sizes; + kmem_cache_t *cachep; - for (; csizep->cs_size; csizep++) { - if (size > csizep->cs_size) - continue; -#if DEBUG - /* This happens if someone tries to call - * kmem_cache_create(), or kmalloc(), before - * the generic caches are initialized. - */ - BUG_ON(csizep->cs_cachep == NULL); -#endif - return __cache_alloc(flags & GFP_DMA ? - csizep->cs_dmacachep : csizep->cs_cachep, flags); - } - return NULL; + cachep = kmem_find_general_cachep(size, flags); + if (unlikely(cachep == NULL)) + return NULL; + return __cache_alloc(cachep, flags); } - EXPORT_SYMBOL(__kmalloc); #ifdef CONFIG_SMP @@ -2516,7 +2510,6 @@ kfree(pdata); return NULL; } - EXPORT_SYMBOL(__alloc_percpu); #endif @@ -2528,7 +2521,7 @@ * Free an object which was previously allocated from this * cache. */ -void kmem_cache_free (kmem_cache_t *cachep, void *objp) +void kmem_cache_free(kmem_cache_t *cachep, void *objp) { unsigned long flags; @@ -2536,7 +2529,6 @@ __cache_free(cachep, objp); local_irq_restore(flags); } - EXPORT_SYMBOL(kmem_cache_free); /** @@ -2545,7 +2537,7 @@ * @size: element size. * @flags: the type of memory to allocate. */ -void *kcalloc(size_t n, size_t size, int flags) +void *kcalloc(size_t n, size_t size, unsigned int __nocast flags) { void *ret = NULL; @@ -2557,7 +2549,6 @@ memset(ret, 0, n * size); return ret; } - EXPORT_SYMBOL(kcalloc); /** @@ -2567,12 +2558,12 @@ * Don't free memory not originally allocated by kmalloc() * or you will run into trouble. */ -void kfree (const void *objp) +void kfree(const void *objp) { kmem_cache_t *c; unsigned long flags; - if (!objp) + if (unlikely(!objp)) return; local_irq_save(flags); kfree_debugcheck(objp); @@ -2580,7 +2571,6 @@ __cache_free(c, (void*)objp); local_irq_restore(flags); } - EXPORT_SYMBOL(kfree); #ifdef CONFIG_SMP @@ -2604,7 +2594,6 @@ } kfree(p); } - EXPORT_SYMBOL(free_percpu); #endif @@ -2612,7 +2601,6 @@ { return obj_reallen(cachep); } - EXPORT_SYMBOL(kmem_cache_size); struct ccupdate_struct { @@ -2633,7 +2621,8 @@ } -static int do_tune_cpucache (kmem_cache_t* cachep, int limit, int batchcount, int shared) +static int do_tune_cpucache(kmem_cache_t *cachep, int limit, int batchcount, + int shared) { struct ccupdate_struct new; struct array_cache *new_shared; @@ -2688,7 +2677,7 @@ } -static void enable_cpucache (kmem_cache_t *cachep) +static void enable_cpucache(kmem_cache_t *cachep) { int err; int limit, shared; diff -Nru a/mm/swapfile.c b/mm/swapfile.c --- a/mm/swapfile.c 2005-03-30 16:58:47 -08:00 +++ b/mm/swapfile.c 2005-03-30 16:58:47 -08:00 @@ -422,7 +422,7 @@ static void unuse_pte(struct vm_area_struct *vma, pte_t *pte, unsigned long addr, swp_entry_t entry, struct page *page) { - vma->vm_mm->rss++; + inc_mm_counter(vma->vm_mm, rss); get_page(page); set_pte_at(vma->vm_mm, addr, pte, pte_mkold(mk_pte(page, vma->vm_page_prot))); diff -Nru a/mm/vmalloc.c b/mm/vmalloc.c --- a/mm/vmalloc.c 2005-03-30 16:58:49 -08:00 +++ b/mm/vmalloc.c 2005-03-30 16:58:49 -08:00 @@ -389,7 +389,7 @@ EXPORT_SYMBOL(vmap); -void *__vmalloc_area(struct vm_struct *area, int gfp_mask, pgprot_t prot) +void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot) { struct page **pages; unsigned int nr_pages, array_size, i; @@ -440,7 +440,7 @@ * allocator with @gfp_mask flags. Map them into contiguous * kernel virtual space, using a pagetable protection of @prot. */ -void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot) +void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot) { struct vm_struct *area; diff -Nru a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c 2005-03-30 16:58:47 -08:00 +++ b/mm/vmscan.c 2005-03-30 16:58:47 -08:00 @@ -546,14 +546,56 @@ } /* - * zone->lru_lock is heavily contented. We relieve it by quickly privatising - * a batch of pages and working on them outside the lock. Any pages which were - * not freed will be added back to the LRU. + * zone->lru_lock is heavily contended. Some of the functions that + * shrink the lists perform better by taking out a batch of pages + * and working on them outside the LRU lock. * - * shrink_cache() adds the number of pages reclaimed to sc->nr_reclaimed + * For pagecache intensive workloads, this function is the hottest + * spot in the kernel (apart from copy_*_user functions). + * + * Appropriate locks must be held before calling this function. + * + * @nr_to_scan: The number of pages to look through on the list. + * @src: The LRU list to pull pages off. + * @dst: The temp list to put pages on to. + * @scanned: The number of pages that were scanned. * - * For pagecache intensive workloads, the first loop here is the hottest spot - * in the kernel (apart from the copy_*_user functions). + * returns how many pages were moved onto *@dst. + */ +static int isolate_lru_pages(int nr_to_scan, struct list_head *src, + struct list_head *dst, int *scanned) +{ + int nr_taken = 0; + struct page *page; + int scan = 0; + + while (scan++ < nr_to_scan && !list_empty(src)) { + page = lru_to_page(src); + prefetchw_prev_lru_page(page, src, flags); + + if (!TestClearPageLRU(page)) + BUG(); + list_del(&page->lru); + if (get_page_testone(page)) { + /* + * It is being freed elsewhere + */ + __put_page(page); + SetPageLRU(page); + list_add(&page->lru, src); + continue; + } else { + list_add(&page->lru, dst); + nr_taken++; + } + } + + *scanned = scan; + return nr_taken; +} + +/* + * shrink_cache() adds the number of pages reclaimed to sc->nr_reclaimed */ static void shrink_cache(struct zone *zone, struct scan_control *sc) { @@ -567,32 +609,13 @@ spin_lock_irq(&zone->lru_lock); while (max_scan > 0) { struct page *page; - int nr_taken = 0; - int nr_scan = 0; + int nr_taken; + int nr_scan; int nr_freed; - while (nr_scan++ < sc->swap_cluster_max && - !list_empty(&zone->inactive_list)) { - page = lru_to_page(&zone->inactive_list); - - prefetchw_prev_lru_page(page, - &zone->inactive_list, flags); - - if (!TestClearPageLRU(page)) - BUG(); - list_del(&page->lru); - if (get_page_testone(page)) { - /* - * It is being freed elsewhere - */ - __put_page(page); - SetPageLRU(page); - list_add(&page->lru, &zone->inactive_list); - continue; - } - list_add(&page->lru, &page_list); - nr_taken++; - } + nr_taken = isolate_lru_pages(sc->swap_cluster_max, + &zone->inactive_list, + &page_list, &nr_scan); zone->nr_inactive -= nr_taken; zone->pages_scanned += nr_scan; spin_unlock_irq(&zone->lru_lock); @@ -658,7 +681,7 @@ { int pgmoved; int pgdeactivate = 0; - int pgscanned = 0; + int pgscanned; int nr_pages = sc->nr_to_scan; LIST_HEAD(l_hold); /* The pages which were snipped off */ LIST_HEAD(l_inactive); /* Pages to go onto the inactive_list */ @@ -671,30 +694,9 @@ long swap_tendency; lru_add_drain(); - pgmoved = 0; spin_lock_irq(&zone->lru_lock); - while (pgscanned < nr_pages && !list_empty(&zone->active_list)) { - page = lru_to_page(&zone->active_list); - prefetchw_prev_lru_page(page, &zone->active_list, flags); - if (!TestClearPageLRU(page)) - BUG(); - list_del(&page->lru); - if (get_page_testone(page)) { - /* - * It was already free! release_pages() or put_page() - * are about to remove it from the LRU and free it. So - * put the refcount back and put the page back on the - * LRU - */ - __put_page(page); - SetPageLRU(page); - list_add(&page->lru, &zone->active_list); - } else { - list_add(&page->lru, &l_hold); - pgmoved++; - } - pgscanned++; - } + pgmoved = isolate_lru_pages(nr_pages, &zone->active_list, + &l_hold, &pgscanned); zone->pages_scanned += pgscanned; zone->nr_active -= pgmoved; spin_unlock_irq(&zone->lru_lock); diff -Nru a/net/Kconfig b/net/Kconfig --- a/net/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/net/Kconfig 2005-03-30 16:58:50 -08:00 @@ -45,15 +45,6 @@ If unsure, say N. -config NETLINK_DEV - tristate "Netlink device emulation" - help - This option will be removed soon. Any programs that want to use - character special nodes like /dev/tap0 or /dev/route (all with major - number 36) need this option, and need to be rewritten soon to use - the real netlink socket. - This is a backward compatibility option, choose Y for now. - config UNIX tristate "Unix domain sockets" ---help--- diff -Nru a/net/atm/common.c b/net/atm/common.c --- a/net/atm/common.c 2005-03-30 16:58:50 -08:00 +++ b/net/atm/common.c 2005-03-30 16:58:50 -08:00 @@ -41,7 +41,7 @@ struct hlist_head vcc_hash[VCC_HTABLE_SIZE]; DEFINE_RWLOCK(vcc_sklist_lock); -void __vcc_insert_socket(struct sock *sk) +static void __vcc_insert_socket(struct sock *sk) { struct atm_vcc *vcc = atm_sk(sk); struct hlist_head *head = &vcc_hash[vcc->vci & @@ -754,21 +754,6 @@ if (!vcc->dev || !vcc->dev->ops->getsockopt) return -EINVAL; return vcc->dev->ops->getsockopt(vcc, level, optname, optval, len); } - - -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) -#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) -struct net_bridge; -struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, - unsigned char *addr) = NULL; -void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent) = NULL; -#if defined(CONFIG_ATM_LANE_MODULE) || defined(CONFIG_BRIDGE_MODULE) -EXPORT_SYMBOL(br_fdb_get_hook); -EXPORT_SYMBOL(br_fdb_put_hook); -#endif /* defined(CONFIG_ATM_LANE_MODULE) || defined(CONFIG_BRIDGE_MODULE) */ -#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */ -#endif /* defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) */ - static int __init atm_init(void) { diff -Nru a/net/atm/lec.c b/net/atm/lec.c --- a/net/atm/lec.c 2005-03-30 16:58:49 -08:00 +++ b/net/atm/lec.c 2005-03-30 16:58:49 -08:00 @@ -37,11 +37,8 @@ #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) #include #include "../bridge/br_private.h" -static unsigned char bridge_ula_lec[] = {0x01, 0x80, 0xc2, 0x00, 0x00}; -extern struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, - unsigned char *addr); -extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); +static unsigned char bridge_ula_lec[] = {0x01, 0x80, 0xc2, 0x00, 0x00}; #endif /* Modular too */ @@ -83,6 +80,29 @@ static int lane2_associate_req (struct net_device *dev, u8 *lan_dst, u8 *tlvs, u32 sizeoftlvs); +static int lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr, + unsigned long permanent); +static void lec_arp_check_empties(struct lec_priv *priv, + struct atm_vcc *vcc, struct sk_buff *skb); +static void lec_arp_destroy(struct lec_priv *priv); +static void lec_arp_init(struct lec_priv *priv); +static struct atm_vcc* lec_arp_resolve(struct lec_priv *priv, + unsigned char *mac_to_find, + int is_rdesc, + struct lec_arp_table **ret_entry); +static void lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr, + unsigned char *atm_addr, unsigned long remoteflag, + unsigned int targetless_le_arp); +static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id); +static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc); +static void lec_set_flush_tran_id(struct lec_priv *priv, + unsigned char *atm_addr, + unsigned long tran_id); +static void lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data, + struct atm_vcc *vcc, + void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb)); +static void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc); + static struct lane2_ops lane2_ops = { lane2_resolve, /* resolve, spec 3.1.3 */ lane2_associate_req, /* associate_req, spec 3.1.4 */ @@ -94,21 +114,6 @@ /* Device structures */ static struct net_device *dev_lec[MAX_LEC_ITF]; -/* This will be called from proc.c via function pointer */ -struct net_device *get_dev_lec(int itf) -{ - struct net_device *dev; - - if (itf >= MAX_LEC_ITF) - return NULL; - rtnl_lock(); - dev = dev_lec[itf]; - if (dev) - dev_hold(dev); - rtnl_unlock(); - return dev; -} - #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev) { @@ -155,7 +160,7 @@ * and returns NULL. */ #ifdef CONFIG_TR -unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc) +static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc) { struct trh_hdr *trh; int riflen, num_rdsc; @@ -599,7 +604,7 @@ * LANE2: new argument struct sk_buff *data contains * the LE_ARP based TLVs introduced in the LANE2 spec */ -int +static int send_to_lecd(struct lec_priv *priv, atmlec_msg_type type, unsigned char *mac_addr, unsigned char *atm_addr, struct sk_buff *data) @@ -681,7 +686,7 @@ 0x01, 0x01 }; -void +static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb) { struct net_device *dev = (struct net_device *)vcc->proto_data; @@ -764,7 +769,7 @@ } } -void +static void lec_pop(struct atm_vcc *vcc, struct sk_buff *skb) { struct lec_vcc_priv *vpriv = LEC_VCC_PRIV(vcc); @@ -784,7 +789,7 @@ } } -int +static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg) { struct lec_vcc_priv *vpriv; @@ -813,7 +818,7 @@ return 0; } -int +static int lec_mcast_attach(struct atm_vcc *vcc, int arg) { if (arg <0 || arg >= MAX_LEC_ITF || !dev_lec[arg]) @@ -823,7 +828,7 @@ } /* Initialize device. */ -int +static int lecd_attach(struct atm_vcc *vcc, int arg) { int i; @@ -1383,7 +1388,6 @@ static void lec_arp_check_expire(unsigned long data); static void lec_arp_expire_arp(unsigned long data); -void dump_arp_table(struct lec_priv *priv); /* * Arp table funcs @@ -1394,7 +1398,7 @@ /* * Initialization of arp-cache */ -void +static void lec_arp_init(struct lec_priv *priv) { unsigned short i; @@ -1410,7 +1414,7 @@ add_timer(&priv->lec_arp_timer); } -void +static void lec_arp_clear_vccs(struct lec_arp_table *entry) { if (entry->vcc) { @@ -1539,7 +1543,7 @@ } #endif -void +static void dump_arp_table(struct lec_priv *priv) { #if DEBUG_ARP_TABLE @@ -1691,7 +1695,7 @@ /* * Destruction of arp-cache */ -void +static void lec_arp_destroy(struct lec_priv *priv) { unsigned long flags; @@ -1953,9 +1957,9 @@ * Try to find vcc where mac_address is attached. * */ -struct atm_vcc* -lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find, int is_rdesc, - struct lec_arp_table **ret_entry) +static struct atm_vcc* +lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find, + int is_rdesc, struct lec_arp_table **ret_entry) { unsigned long flags; struct lec_arp_table *entry; @@ -2034,7 +2038,7 @@ return found; } -int +static int lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr, unsigned long permanent) { @@ -2064,7 +2068,7 @@ /* * Notifies: Response to arp_request (atm_addr != NULL) */ -void +static void lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr, unsigned char *atm_addr, unsigned long remoteflag, unsigned int targetless_le_arp) @@ -2176,7 +2180,7 @@ /* * Notifies: Vcc setup ready */ -void +static void lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data, struct atm_vcc *vcc, void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb)) @@ -2320,7 +2324,7 @@ spin_unlock_irqrestore(&priv->lec_arp_lock, flags); } -void +static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id) { unsigned long flags; @@ -2346,7 +2350,7 @@ dump_arp_table(priv); } -void +static void lec_set_flush_tran_id(struct lec_priv *priv, unsigned char *atm_addr, unsigned long tran_id) { @@ -2364,7 +2368,7 @@ spin_unlock_irqrestore(&priv->lec_arp_lock, flags); } -int +static int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc) { unsigned long flags; @@ -2401,7 +2405,7 @@ return err; } -void +static void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc) { unsigned long flags; @@ -2476,7 +2480,7 @@ dump_arp_table(priv); } -void +static void lec_arp_check_empties(struct lec_priv *priv, struct atm_vcc *vcc, struct sk_buff *skb) { diff -Nru a/net/atm/lec.h b/net/atm/lec.h --- a/net/atm/lec.h 2005-03-30 16:58:48 -08:00 +++ b/net/atm/lec.h 2005-03-30 16:58:48 -08:00 @@ -14,14 +14,6 @@ #include #include -#if defined (CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) -#include -struct net_bridge; -extern struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, - unsigned char *addr); -extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); -#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */ - #define LEC_HEADER_LEN 16 struct lecdatahdr_8023 { @@ -145,15 +137,6 @@ }; #define LEC_VCC_PRIV(vcc) ((struct lec_vcc_priv *)((vcc)->user_back)) - -int lecd_attach(struct atm_vcc *vcc, int arg); -int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg); -int lec_mcast_attach(struct atm_vcc *vcc, int arg); -struct net_device *get_dev_lec(int itf); -int send_to_lecd(struct lec_priv *priv, - atmlec_msg_type type, unsigned char *mac_addr, - unsigned char *atm_addr, struct sk_buff *data); -void lec_push(struct atm_vcc *vcc, struct sk_buff *skb); #endif /* _LEC_H_ */ diff -Nru a/net/atm/lec_arpc.h b/net/atm/lec_arpc.h --- a/net/atm/lec_arpc.h 2005-03-30 16:58:49 -08:00 +++ b/net/atm/lec_arpc.h 2005-03-30 16:58:49 -08:00 @@ -89,28 +89,4 @@ #define LEC_REMOTE_FLAG 0x0001 #define LEC_PERMANENT_FLAG 0x0002 -/* Protos */ -void lec_arp_init(struct lec_priv *priv); -int lec_mcast_make(struct lec_priv *priv, struct atm_vcc *vcc); -void lec_arp_destroy(struct lec_priv *priv); -void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc); - -struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, - unsigned char *mac_to_addr, - int is_rdesc, - struct lec_arp_table **ret_entry); -void lec_vcc_added(struct lec_priv *dev, - struct atmlec_ioc *ioc_data, struct atm_vcc *vcc, - void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb)); -void lec_arp_check_empties(struct lec_priv *priv, - struct atm_vcc *vcc, struct sk_buff *skb); -int lec_addr_delete(struct lec_priv *priv, - unsigned char *mac_addr, unsigned long permanent); -void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id); -void lec_arp_update(struct lec_priv *priv, - unsigned char *mac_addr, unsigned char *atm_addr, - unsigned long remoteflag, unsigned int targetless_le_arp); -void lec_set_flush_tran_id(struct lec_priv *priv, - unsigned char *mac_addr, unsigned long tran_id); - #endif diff -Nru a/net/atm/mpc.c b/net/atm/mpc.c --- a/net/atm/mpc.c 2005-03-30 16:58:50 -08:00 +++ b/net/atm/mpc.c 2005-03-30 16:58:50 -08:00 @@ -564,7 +564,7 @@ return retval; } -int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg) +static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg) { int bytes_left; struct mpoa_client *mpc; @@ -753,7 +753,7 @@ /* members not explicitly initialised will be 0 */ }; -int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg) +static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg) { struct mpoa_client *mpc; struct lec_priv *priv; @@ -1460,7 +1460,7 @@ return 0; } -void __exit atm_mpoa_cleanup(void) +static void __exit atm_mpoa_cleanup(void) { struct mpoa_client *mpc, *tmp; struct atm_mpoa_qos *qos, *nextqos; diff -Nru a/net/atm/mpc.h b/net/atm/mpc.h --- a/net/atm/mpc.h 2005-03-30 16:58:47 -08:00 +++ b/net/atm/mpc.h 2005-03-30 16:58:47 -08:00 @@ -11,10 +11,6 @@ /* kernel -> mpc-daemon */ int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc); -/* Functions for ioctl(ATMMPC_*) operations */ -int atm_mpoa_mpoad_attach(struct atm_vcc *vcc, int arg); -int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg); - struct mpoa_client { struct mpoa_client *next; struct net_device *dev; /* lec in question */ diff -Nru a/net/atm/pppoatm.c b/net/atm/pppoatm.c --- a/net/atm/pppoatm.c 2005-03-30 16:58:49 -08:00 +++ b/net/atm/pppoatm.c 2005-03-30 16:58:49 -08:00 @@ -345,7 +345,7 @@ return -ENOIOCTLCMD; } -struct atm_ioctl pppoatm_ioctl_ops = { +static struct atm_ioctl pppoatm_ioctl_ops = { .owner = THIS_MODULE, .ioctl = pppoatm_ioctl, }; diff -Nru a/net/atm/protocols.h b/net/atm/protocols.h --- a/net/atm/protocols.h 2005-03-30 16:58:50 -08:00 +++ b/net/atm/protocols.h 2005-03-30 16:58:50 -08:00 @@ -6,8 +6,6 @@ #ifndef NET_ATM_PROTOCOLS_H #define NET_ATM_PROTOCOLS_H -void atm_push_raw(struct atm_vcc *vcc,struct sk_buff *skb); - int atm_init_aal0(struct atm_vcc *vcc); /* "raw" AAL0 */ int atm_init_aal34(struct atm_vcc *vcc);/* "raw" AAL3/4 transport */ int atm_init_aal5(struct atm_vcc *vcc); /* "raw" AAL5 transport */ diff -Nru a/net/atm/raw.c b/net/atm/raw.c --- a/net/atm/raw.c 2005-03-30 16:58:50 -08:00 +++ b/net/atm/raw.c 2005-03-30 16:58:50 -08:00 @@ -25,7 +25,7 @@ * SKB == NULL indicates that the link is being closed */ -void atm_push_raw(struct atm_vcc *vcc,struct sk_buff *skb) +static void atm_push_raw(struct atm_vcc *vcc,struct sk_buff *skb) { if (skb) { struct sock *sk = sk_atm(vcc); diff -Nru a/net/atm/signaling.c b/net/atm/signaling.c --- a/net/atm/signaling.c 2005-03-30 16:58:49 -08:00 +++ b/net/atm/signaling.c 2005-03-30 16:58:49 -08:00 @@ -136,8 +136,7 @@ vcc = *(struct atm_vcc **) &msg->listen_vcc; DPRINTK("as_indicate!!!\n"); lock_sock(sk); - if (sk->sk_ack_backlog == - sk->sk_max_ack_backlog) { + if (sk_acceptq_is_full(sk)) { sigd_enq(NULL,as_reject,vcc,NULL,NULL); dev_kfree_skb(skb); goto as_indicate_complete; diff -Nru a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c --- a/net/ax25/ax25_in.c 2005-03-30 16:58:47 -08:00 +++ b/net/ax25/ax25_in.c 2005-03-30 16:58:47 -08:00 @@ -358,7 +358,7 @@ if (sk != NULL) { bh_lock_sock(sk); - if (sk->sk_ack_backlog == sk->sk_max_ack_backlog || + if (sk_acceptq_is_full(sk) || (make = ax25_make_new(sk, ax25_dev)) == NULL) { if (mine) ax25_return_dm(dev, &src, &dest, &dp); diff -Nru a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c --- a/net/bluetooth/af_bluetooth.c 2005-03-30 16:58:47 -08:00 +++ b/net/bluetooth/af_bluetooth.c 2005-03-30 16:58:47 -08:00 @@ -60,11 +60,9 @@ #define BT_MAX_PROTO 8 static struct net_proto_family *bt_proto[BT_MAX_PROTO]; -static kmem_cache_t *bt_sock_cache; - int bt_sock_register(int proto, struct net_proto_family *ops) { - if (proto >= BT_MAX_PROTO) + if (proto < 0 || proto >= BT_MAX_PROTO) return -EINVAL; if (bt_proto[proto]) @@ -77,7 +75,7 @@ int bt_sock_unregister(int proto) { - if (proto >= BT_MAX_PROTO) + if (proto < 0 || proto >= BT_MAX_PROTO) return -EINVAL; if (!bt_proto[proto]) @@ -92,7 +90,7 @@ { int err = 0; - if (proto >= BT_MAX_PROTO) + if (proto < 0 || proto >= BT_MAX_PROTO) return -EINVAL; #if defined(CONFIG_KMOD) @@ -108,36 +106,6 @@ return err; } -struct sock *bt_sock_alloc(struct socket *sock, int proto, int pi_size, int prio) -{ - struct sock *sk; - void *pi; - - sk = sk_alloc(PF_BLUETOOTH, prio, sizeof(struct bt_sock), bt_sock_cache); - if (!sk) - return NULL; - - if (pi_size) { - pi = kmalloc(pi_size, prio); - if (!pi) { - sk_free(sk); - return NULL; - } - memset(pi, 0, pi_size); - sk->sk_protinfo = pi; - } - - sock_init_data(sock, sk); - INIT_LIST_HEAD(&bt_sk(sk)->accept_q); - - sock_reset_flag(sk, SOCK_ZAPPED); - sk->sk_protocol = proto; - sk->sk_state = BT_OPEN; - - return sk; -} -EXPORT_SYMBOL(bt_sock_alloc); - void bt_sock_link(struct bt_sock_list *l, struct sock *sk) { write_lock_bh(&l->lock); @@ -355,16 +323,6 @@ if (proc_bt) proc_bt->owner = THIS_MODULE; - /* Init socket cache */ - bt_sock_cache = kmem_cache_create("bt_sock", - sizeof(struct bt_sock), 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); - - if (!bt_sock_cache) { - BT_ERR("Socket cache creation failed"); - return -ENOMEM; - } - sock_register(&bt_sock_family_ops); BT_INFO("HCI device and connection manager initialized"); @@ -383,7 +341,6 @@ bt_sysfs_cleanup(); sock_unregister(PF_BLUETOOTH); - kmem_cache_destroy(bt_sock_cache); remove_proc_entry("bluetooth", NULL); } diff -Nru a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c --- a/net/bluetooth/bnep/sock.c 2005-03-30 16:58:51 -08:00 +++ b/net/bluetooth/bnep/sock.c 2005-03-30 16:58:51 -08:00 @@ -176,17 +176,22 @@ if (sock->type != SOCK_RAW) return -ESOCKTNOSUPPORT; - if (!(sk = bt_sock_alloc(sock, PF_BLUETOOTH, 0, GFP_KERNEL))) + if (!(sk = sk_alloc(PF_BLUETOOTH, GFP_KERNEL, sizeof(struct bt_sock), NULL))) return -ENOMEM; + sock_init_data(sock, sk); + sk_set_owner(sk, THIS_MODULE); sock->ops = &bnep_sock_ops; - sock->state = SS_UNCONNECTED; + sock->state = SS_UNCONNECTED; + + sock_reset_flag(sk, SOCK_ZAPPED); - sk->sk_destruct = NULL; sk->sk_protocol = protocol; + sk->sk_state = BT_OPEN; + return 0; } diff -Nru a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c --- a/net/bluetooth/cmtp/sock.c 2005-03-30 16:58:50 -08:00 +++ b/net/bluetooth/cmtp/sock.c 2005-03-30 16:58:50 -08:00 @@ -167,17 +167,21 @@ if (sock->type != SOCK_RAW) return -ESOCKTNOSUPPORT; - if (!(sk = bt_sock_alloc(sock, PF_BLUETOOTH, 0, GFP_KERNEL))) + if (!(sk = sk_alloc(PF_BLUETOOTH, GFP_KERNEL, sizeof(struct bt_sock), NULL))) return -ENOMEM; + sock_init_data(sock, sk); + sk_set_owner(sk, THIS_MODULE); sock->ops = &cmtp_sock_ops; sock->state = SS_UNCONNECTED; - sk->sk_destruct = NULL; + sock_reset_flag(sk, SOCK_ZAPPED); + sk->sk_protocol = protocol; + sk->sk_state = BT_OPEN; return 0; } diff -Nru a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c --- a/net/bluetooth/hci_sock.c 2005-03-30 16:58:49 -08:00 +++ b/net/bluetooth/hci_sock.c 2005-03-30 16:58:49 -08:00 @@ -601,9 +601,15 @@ sock->ops = &hci_sock_ops; - sk = bt_sock_alloc(sock, protocol, sizeof(struct hci_pinfo), GFP_KERNEL); + sk = sk_alloc(PF_BLUETOOTH, GFP_KERNEL, sizeof(struct hci_pinfo), NULL); if (!sk) return -ENOMEM; + + sock_init_data(sock, sk); + + sock_reset_flag(sk, SOCK_ZAPPED); + + sk->sk_protocol = protocol; sk_set_owner(sk, THIS_MODULE); diff -Nru a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c --- a/net/bluetooth/hidp/sock.c 2005-03-30 16:58:50 -08:00 +++ b/net/bluetooth/hidp/sock.c 2005-03-30 16:58:50 -08:00 @@ -173,17 +173,21 @@ if (sock->type != SOCK_RAW) return -ESOCKTNOSUPPORT; - if (!(sk = bt_sock_alloc(sock, PF_BLUETOOTH, 0, GFP_KERNEL))) + if (!(sk = sk_alloc(PF_BLUETOOTH, GFP_KERNEL, sizeof(struct bt_sock), NULL))) return -ENOMEM; + sock_init_data(sock, sk); + sk_set_owner(sk, THIS_MODULE); sock->ops = &hidp_sock_ops; sock->state = SS_UNCONNECTED; - sk->sk_destruct = NULL; + sock_reset_flag(sk, SOCK_ZAPPED); + sk->sk_protocol = protocol; + sk->sk_state = BT_OPEN; return 0; } diff -Nru a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c --- a/net/bluetooth/l2cap.c 2005-03-30 16:58:49 -08:00 +++ b/net/bluetooth/l2cap.c 2005-03-30 16:58:49 -08:00 @@ -264,9 +264,6 @@ skb_queue_purge(&sk->sk_receive_queue); skb_queue_purge(&sk->sk_write_queue); - - if (sk->sk_protinfo) - kfree(sk->sk_protinfo); } static void l2cap_sock_cleanup_listen(struct sock *parent) @@ -374,15 +371,20 @@ { struct sock *sk; - sk = bt_sock_alloc(sock, proto, sizeof(struct l2cap_pinfo), prio); + sk = sk_alloc(PF_BLUETOOTH, prio, sizeof(struct l2cap_pinfo), NULL); if (!sk) return NULL; + sock_init_data(sock, sk); + INIT_LIST_HEAD(&bt_sk(sk)->accept_q); + sk_set_owner(sk, THIS_MODULE); sk->sk_destruct = l2cap_sock_destruct; sk->sk_sndtimeo = L2CAP_CONN_TIMEOUT; + sock_reset_flag(sk, SOCK_ZAPPED); + sk->sk_protocol = proto; sk->sk_state = BT_OPEN; @@ -1410,7 +1412,7 @@ result = L2CAP_CR_NO_MEM; /* Check for backlog size */ - if (parent->sk_ack_backlog > parent->sk_max_ack_backlog) { + if (sk_acceptq_is_full(parent)) { BT_DBG("backlog full %d", parent->sk_ack_backlog); goto response; } diff -Nru a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c --- a/net/bluetooth/rfcomm/core.c 2005-03-30 16:58:47 -08:00 +++ b/net/bluetooth/rfcomm/core.c 2005-03-30 16:58:47 -08:00 @@ -68,7 +68,7 @@ #define rfcomm_lock() down(&rfcomm_sem); #define rfcomm_unlock() up(&rfcomm_sem); -unsigned long rfcomm_event; +static unsigned long rfcomm_event; static LIST_HEAD(session_list); static atomic_t terminate, running; @@ -389,6 +389,8 @@ rfcomm_dlc_unlock(d); skb_queue_purge(&d->tx_queue); + rfcomm_session_put(s); + rfcomm_dlc_unlink(d); } @@ -597,6 +599,8 @@ *err = -ENOMEM; goto failed; } + + rfcomm_session_hold(s); s->initiator = 1; diff -Nru a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c --- a/net/bluetooth/rfcomm/sock.c 2005-03-30 16:58:49 -08:00 +++ b/net/bluetooth/rfcomm/sock.c 2005-03-30 16:58:49 -08:00 @@ -196,9 +196,6 @@ rfcomm_dlc_unlock(d); rfcomm_dlc_put(d); - - if (sk->sk_protinfo) - kfree(sk->sk_protinfo); } static void rfcomm_sock_cleanup_listen(struct sock *parent) @@ -287,10 +284,13 @@ struct rfcomm_dlc *d; struct sock *sk; - sk = bt_sock_alloc(sock, BTPROTO_RFCOMM, sizeof(struct rfcomm_pinfo), prio); + sk = sk_alloc(PF_BLUETOOTH, prio, sizeof(struct rfcomm_pinfo), NULL); if (!sk) return NULL; + sock_init_data(sock, sk); + INIT_LIST_HEAD(&bt_sk(sk)->accept_q); + sk_set_owner(sk, THIS_MODULE); d = rfcomm_dlc_alloc(prio); @@ -298,6 +298,7 @@ sk_free(sk); return NULL; } + d->data_ready = rfcomm_sk_data_ready; d->state_change = rfcomm_sk_state_change; @@ -310,8 +311,10 @@ sk->sk_sndbuf = RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 10; sk->sk_rcvbuf = RFCOMM_MAX_CREDITS * RFCOMM_DEFAULT_MTU * 10; + sock_reset_flag(sk, SOCK_ZAPPED); + sk->sk_protocol = proto; - sk->sk_state = BT_OPEN; + sk->sk_state = BT_OPEN; bt_sock_link(&rfcomm_sk_list, sk); @@ -832,7 +835,7 @@ return 0; /* Check for backlog size */ - if (parent->sk_ack_backlog > parent->sk_max_ack_backlog) { + if (sk_acceptq_is_full(parent)) { BT_DBG("backlog full %d", parent->sk_ack_backlog); goto done; } diff -Nru a/net/bluetooth/sco.c b/net/bluetooth/sco.c --- a/net/bluetooth/sco.c 2005-03-30 16:58:47 -08:00 +++ b/net/bluetooth/sco.c 2005-03-30 16:58:47 -08:00 @@ -334,9 +334,6 @@ skb_queue_purge(&sk->sk_receive_queue); skb_queue_purge(&sk->sk_write_queue); - - if (sk->sk_protinfo) - kfree(sk->sk_protinfo); } static void sco_sock_cleanup_listen(struct sock *parent) @@ -420,14 +417,21 @@ { struct sock *sk; - sk = bt_sock_alloc(sock, proto, sizeof(struct sco_pinfo), prio); + sk = sk_alloc(PF_BLUETOOTH, prio, sizeof(struct sco_pinfo), NULL); if (!sk) return NULL; + sock_init_data(sock, sk); + INIT_LIST_HEAD(&bt_sk(sk)->accept_q); + sk_set_owner(sk, THIS_MODULE); sk->sk_destruct = sco_sock_destruct; sk->sk_sndtimeo = SCO_CONN_TIMEOUT; + + sock_reset_flag(sk, SOCK_ZAPPED); + + sk->sk_protocol = proto; sk->sk_state = BT_OPEN; sco_sock_init_timer(sk); diff -Nru a/net/bridge/br.c b/net/bridge/br.c --- a/net/bridge/br.c 2005-03-30 16:58:47 -08:00 +++ b/net/bridge/br.c 2005-03-30 16:58:47 -08:00 @@ -22,10 +22,6 @@ #include "br_private.h" -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) -#include "../atm/lec.h" -#endif - int (*br_should_route_hook) (struct sk_buff **pskb) = NULL; static int __init br_init(void) @@ -39,10 +35,9 @@ brioctl_set(br_ioctl_deviceless_stub); br_handle_frame_hook = br_handle_frame; -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) br_fdb_get_hook = br_fdb_get; br_fdb_put_hook = br_fdb_put; -#endif + register_netdevice_notifier(&br_device_notifier); return 0; @@ -60,10 +55,8 @@ synchronize_net(); -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) br_fdb_get_hook = NULL; br_fdb_put_hook = NULL; -#endif br_handle_frame_hook = NULL; br_fdb_fini(); diff -Nru a/net/bridge/br_private.h b/net/bridge/br_private.h --- a/net/bridge/br_private.h 2005-03-30 16:58:47 -08:00 +++ b/net/bridge/br_private.h 2005-03-30 16:58:47 -08:00 @@ -216,6 +216,12 @@ extern void br_stp_port_timer_init(struct net_bridge_port *p); extern unsigned long br_timer_value(const struct timer_list *timer); +/* br.c */ +extern struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, + unsigned char *addr); +extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); + + #ifdef CONFIG_SYSFS /* br_sysfs_if.c */ extern int br_sysfs_addif(struct net_bridge_port *p); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2005-03-30 16:58:48 -08:00 +++ b/net/core/dev.c 2005-03-30 16:58:48 -08:00 @@ -1427,13 +1427,10 @@ struct softnet_data *queue; unsigned long flags; -#ifdef CONFIG_NETPOLL - if (skb->dev->netpoll_rx && netpoll_rx(skb)) { - kfree_skb(skb); + /* if netpoll wants it, pretend we never saw it */ + if (netpoll_rx(skb)) return NET_RX_DROP; - } -#endif - + if (!skb->stamp.tv_sec) net_timestamp(&skb->stamp); @@ -1561,6 +1558,10 @@ #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); +struct net_bridge; +struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, + unsigned char *addr); +void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); static __inline__ int handle_bridge(struct sk_buff **pskb, struct packet_type **pt_prev, int *ret) @@ -1629,12 +1630,9 @@ int ret = NET_RX_DROP; unsigned short type; -#ifdef CONFIG_NETPOLL - if (skb->dev->netpoll_rx && skb->dev->poll && netpoll_rx(skb)) { - kfree_skb(skb); + /* if we've gotten here through NAPI, check netpoll */ + if (skb->dev->poll && netpoll_rx(skb)) return NET_RX_DROP; - } -#endif if (!skb->stamp.tv_sec) net_timestamp(&skb->stamp); @@ -1781,8 +1779,10 @@ dev = list_entry(queue->poll_list.next, struct net_device, poll_list); + netpoll_poll_lock(dev); if (dev->quota <= 0 || dev->poll(dev, &budget)) { + netpoll_poll_unlock(dev); local_irq_disable(); list_del(&dev->poll_list); list_add_tail(&dev->poll_list, &queue->poll_list); @@ -1791,6 +1791,7 @@ else dev->quota = dev->weight; } else { + netpoll_poll_unlock(dev); dev_put(dev); local_irq_disable(); } @@ -3347,6 +3348,8 @@ #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) EXPORT_SYMBOL(br_handle_frame_hook); +EXPORT_SYMBOL(br_fdb_get_hook); +EXPORT_SYMBOL(br_fdb_put_hook); #endif #ifdef CONFIG_KMOD diff -Nru a/net/core/netpoll.c b/net/core/netpoll.c --- a/net/core/netpoll.c 2005-03-30 16:58:50 -08:00 +++ b/net/core/netpoll.c 2005-03-30 16:58:50 -08:00 @@ -18,7 +18,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -28,18 +30,19 @@ * message gets out even in extreme OOM situations. */ -#define MAX_SKBS 32 #define MAX_UDP_CHUNK 1460 +#define MAX_SKBS 32 +#define MAX_QUEUE_DEPTH (MAX_SKBS / 2) static DEFINE_SPINLOCK(skb_list_lock); static int nr_skbs; static struct sk_buff *skbs; -static DEFINE_SPINLOCK(rx_list_lock); -static LIST_HEAD(rx_list); +static DEFINE_SPINLOCK(queue_lock); +static int queue_depth; +static struct sk_buff *queue_head, *queue_tail; static atomic_t trapped; -static DEFINE_SPINLOCK(netpoll_poll_lock); #define NETPOLL_RX_ENABLED 1 #define NETPOLL_RX_DROP 2 @@ -50,6 +53,50 @@ static void zap_completion_queue(void); +static void queue_process(void *p) +{ + unsigned long flags; + struct sk_buff *skb; + + while (queue_head) { + spin_lock_irqsave(&queue_lock, flags); + + skb = queue_head; + queue_head = skb->next; + if (skb == queue_tail) + queue_head = NULL; + + queue_depth--; + + spin_unlock_irqrestore(&queue_lock, flags); + + dev_queue_xmit(skb); + } +} + +static DECLARE_WORK(send_queue, queue_process, NULL); + +void netpoll_queue(struct sk_buff *skb) +{ + unsigned long flags; + + if (queue_depth == MAX_QUEUE_DEPTH) { + __kfree_skb(skb); + return; + } + + spin_lock_irqsave(&queue_lock, flags); + if (!queue_head) + queue_head = skb; + else + queue_tail->next = skb; + queue_tail = skb; + queue_depth++; + spin_unlock_irqrestore(&queue_lock, flags); + + schedule_work(&send_queue); +} + static int checksum_udp(struct sk_buff *skb, struct udphdr *uh, unsigned short ulen, u32 saddr, u32 daddr) { @@ -66,8 +113,15 @@ } /* - * Check whether delayed processing was scheduled for our current CPU, - * and then manually invoke NAPI polling to pump data off the card. + * Check whether delayed processing was scheduled for our NIC. If so, + * we attempt to grab the poll lock and use ->poll() to pump the card. + * If this fails, either we've recursed in ->poll() or it's already + * running on another CPU. + * + * Note: we don't mask interrupts with this lock because we're using + * trylock here and interrupts are already disabled in the softirq + * case. Further, we test the poll_owner to avoid recursion on UP + * systems where the lock doesn't exist. * * In cases where there is bi-directional communications, reading only * one message at a time can lead to packets being dropped by the @@ -77,22 +131,19 @@ static void poll_napi(struct netpoll *np) { int budget = 16; - unsigned long flags; - struct softnet_data *queue; - spin_lock_irqsave(&netpoll_poll_lock, flags); - queue = &__get_cpu_var(softnet_data); if (test_bit(__LINK_STATE_RX_SCHED, &np->dev->state) && - !list_empty(&queue->poll_list)) { - np->dev->netpoll_rx |= NETPOLL_RX_DROP; + np->poll_owner != smp_processor_id() && + spin_trylock(&np->poll_lock)) { + np->rx_flags |= NETPOLL_RX_DROP; atomic_inc(&trapped); np->dev->poll(np->dev, &budget); atomic_dec(&trapped); - np->dev->netpoll_rx &= ~NETPOLL_RX_DROP; + np->rx_flags &= ~NETPOLL_RX_DROP; + spin_unlock(&np->poll_lock); } - spin_unlock_irqrestore(&netpoll_poll_lock, flags); } void netpoll_poll(struct netpoll *np) @@ -142,7 +193,10 @@ while (clist != NULL) { struct sk_buff *skb = clist; clist = clist->next; - __kfree_skb(skb); + if(skb->destructor) + dev_kfree_skb_any(skb); /* put this one back */ + else + __kfree_skb(skb); } } @@ -197,6 +251,16 @@ return; } + /* avoid recursion */ + if(np->poll_owner == smp_processor_id() || + np->dev->xmit_lock_owner == smp_processor_id()) { + if (np->drop) + np->drop(skb); + else + __kfree_skb(skb); + return; + } + spin_lock(&np->dev->xmit_lock); np->dev->xmit_lock_owner = smp_processor_id(); @@ -233,7 +297,7 @@ udp_len = len + sizeof(*udph); ip_len = eth_len = udp_len + sizeof(*iph); - total_len = eth_len + ETH_HLEN; + total_len = eth_len + ETH_HLEN + NET_IP_ALIGN; skb = find_skb(np, total_len, total_len - len); if (!skb) @@ -269,6 +333,8 @@ memcpy(eth->h_source, np->local_mac, 6); memcpy(eth->h_dest, np->remote_mac, 6); + skb->dev = np->dev; + netpoll_send_skb(np, skb); } @@ -279,18 +345,7 @@ int size, type = ARPOP_REPLY, ptype = ETH_P_ARP; u32 sip, tip; struct sk_buff *send_skb; - unsigned long flags; - struct list_head *p; - struct netpoll *np = NULL; - - spin_lock_irqsave(&rx_list_lock, flags); - list_for_each(p, &rx_list) { - np = list_entry(p, struct netpoll, rx_list); - if ( np->dev == skb->dev ) - break; - np = NULL; - } - spin_unlock_irqrestore(&rx_list_lock, flags); + struct netpoll *np = skb->dev->np; if (!np) return; @@ -368,15 +423,15 @@ netpoll_send_skb(np, send_skb); } -int netpoll_rx(struct sk_buff *skb) +int __netpoll_rx(struct sk_buff *skb) { int proto, len, ulen; struct iphdr *iph; struct udphdr *uh; - struct netpoll *np; - struct list_head *p; - unsigned long flags; + struct netpoll *np = skb->dev->np; + if (!np->rx_hook) + goto out; if (skb->dev->type != ARPHRD_ETHER) goto out; @@ -420,32 +475,27 @@ goto out; if (checksum_udp(skb, uh, ulen, iph->saddr, iph->daddr) < 0) goto out; + if (np->local_ip && np->local_ip != ntohl(iph->daddr)) + goto out; + if (np->remote_ip && np->remote_ip != ntohl(iph->saddr)) + goto out; + if (np->local_port && np->local_port != ntohs(uh->dest)) + goto out; - spin_lock_irqsave(&rx_list_lock, flags); - list_for_each(p, &rx_list) { - np = list_entry(p, struct netpoll, rx_list); - if (np->dev && np->dev != skb->dev) - continue; - if (np->local_ip && np->local_ip != ntohl(iph->daddr)) - continue; - if (np->remote_ip && np->remote_ip != ntohl(iph->saddr)) - continue; - if (np->local_port && np->local_port != ntohs(uh->dest)) - continue; - - spin_unlock_irqrestore(&rx_list_lock, flags); - - if (np->rx_hook) - np->rx_hook(np, ntohs(uh->source), - (char *)(uh+1), - ulen - sizeof(struct udphdr)); + np->rx_hook(np, ntohs(uh->source), + (char *)(uh+1), + ulen - sizeof(struct udphdr)); + kfree_skb(skb); + return 1; + +out: + if (atomic_read(&trapped)) { + kfree_skb(skb); return 1; } - spin_unlock_irqrestore(&rx_list_lock, flags); -out: - return atomic_read(&trapped); + return 0; } int netpoll_parse_options(struct netpoll *np, char *opt) @@ -561,6 +611,9 @@ struct net_device *ndev = NULL; struct in_device *in_dev; + np->poll_lock = SPIN_LOCK_UNLOCKED; + np->poll_owner = -1; + if (np->dev_name) ndev = dev_get_by_name(np->dev_name); if (!ndev) { @@ -568,6 +621,10 @@ np->name, np->dev_name); return -1; } + + np->dev = ndev; + ndev->np = np; + if (!ndev->poll_controller) { printk(KERN_ERR "%s: %s doesn't support polling, aborting.\n", np->name, np->dev_name); @@ -575,16 +632,13 @@ } if (!netif_running(ndev)) { - unsigned short oflags; unsigned long atmost, atleast; printk(KERN_INFO "%s: device %s not up yet, forcing it\n", np->name, np->dev_name); - oflags = ndev->flags; - rtnl_shlock(); - if (dev_change_flags(ndev, oflags | IFF_UP) < 0) { + if (dev_change_flags(ndev, ndev->flags | IFF_UP) < 0) { printk(KERN_ERR "%s: failed to open %s\n", np->name, np->dev_name); rtnl_shunlock(); @@ -593,7 +647,7 @@ rtnl_shunlock(); atleast = jiffies + HZ/10; - atmost = jiffies + 10*HZ; + atmost = jiffies + 4*HZ; while (!netif_carrier_ok(ndev)) { if (time_after(jiffies, atmost)) { printk(KERN_NOTICE @@ -604,12 +658,16 @@ cond_resched(); } + /* If carrier appears to come up instantly, we don't + * trust it and pause so that we don't pump all our + * queued console messages into the bitbucket. + */ + if (time_before(jiffies, atleast)) { - printk(KERN_NOTICE "%s: carrier detect appears flaky," - " waiting 10 seconds\n", + printk(KERN_NOTICE "%s: carrier detect appears" + " untrustworthy, waiting 4 seconds\n", np->name); - while (time_before(jiffies, atmost)) - cond_resched(); + msleep(4000); } } @@ -633,36 +691,22 @@ np->name, HIPQUAD(np->local_ip)); } - np->dev = ndev; - - if(np->rx_hook) { - unsigned long flags; - - np->dev->netpoll_rx = NETPOLL_RX_ENABLED; - - spin_lock_irqsave(&rx_list_lock, flags); - list_add(&np->rx_list, &rx_list); - spin_unlock_irqrestore(&rx_list_lock, flags); - } + if(np->rx_hook) + np->rx_flags = NETPOLL_RX_ENABLED; return 0; + release: + ndev->np = NULL; + np->dev = NULL; dev_put(ndev); return -1; } void netpoll_cleanup(struct netpoll *np) { - if (np->rx_hook) { - unsigned long flags; - - spin_lock_irqsave(&rx_list_lock, flags); - list_del(&np->rx_list); - spin_unlock_irqrestore(&rx_list_lock, flags); - } - if (np->dev) - np->dev->netpoll_rx = 0; + np->dev->np = NULL; dev_put(np->dev); np->dev = NULL; } @@ -687,3 +731,4 @@ EXPORT_SYMBOL(netpoll_cleanup); EXPORT_SYMBOL(netpoll_send_udp); EXPORT_SYMBOL(netpoll_poll); +EXPORT_SYMBOL(netpoll_queue); diff -Nru a/net/core/sock.c b/net/core/sock.c --- a/net/core/sock.c 2005-03-30 16:58:49 -08:00 +++ b/net/core/sock.c 2005-03-30 16:58:49 -08:00 @@ -1374,7 +1374,13 @@ prot->slab_obj_size, 0, SLAB_HWCACHE_ALIGN, NULL, NULL); - return prot->slab != NULL ? 0 : -ENOBUFS; + if (prot->slab == NULL) { + printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", + prot->name); + return -ENOBUFS; + } + + return 0; } EXPORT_SYMBOL(sk_alloc_slab); diff -Nru a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c --- a/net/decnet/af_decnet.c 2005-03-30 16:58:48 -08:00 +++ b/net/decnet/af_decnet.c 2005-03-30 16:58:48 -08:00 @@ -811,7 +811,7 @@ return -EINVAL; scp->state = DN_CC; - scp->segsize_loc = dst_path_metric(__sk_dst_get(sk), RTAX_ADVMSS); + scp->segsize_loc = dst_metric(__sk_dst_get(sk), RTAX_ADVMSS); dn_send_conn_conf(sk, allocation); prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); @@ -940,7 +940,7 @@ sk->sk_route_caps = sk->sk_dst_cache->dev->features; sock->state = SS_CONNECTING; scp->state = DN_CI; - scp->segsize_loc = dst_path_metric(sk->sk_dst_cache, RTAX_ADVMSS); + scp->segsize_loc = dst_metric(sk->sk_dst_cache, RTAX_ADVMSS); dn_nsp_send_conninit(sk, NSP_CI); err = -EINPROGRESS; diff -Nru a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c --- a/net/decnet/dn_nsp_in.c 2005-03-30 16:58:48 -08:00 +++ b/net/decnet/dn_nsp_in.c 2005-03-30 16:58:48 -08:00 @@ -324,7 +324,7 @@ static void dn_nsp_conn_init(struct sock *sk, struct sk_buff *skb) { - if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog) { + if (sk_acceptq_is_full(sk)) { kfree_skb(skb); return; } diff -Nru a/net/ipv4/Kconfig b/net/ipv4/Kconfig --- a/net/ipv4/Kconfig 2005-03-30 16:58:49 -08:00 +++ b/net/ipv4/Kconfig 2005-03-30 16:58:49 -08:00 @@ -90,6 +90,48 @@ equal "cost" and chooses one of them in a non-deterministic fashion if a matching packet arrives. +config IP_ROUTE_MULTIPATH_CACHED + bool "IP: equal cost multipath with caching support (EXPERIMENTAL)" + depends on: IP_ROUTE_MULTIPATH + help + Normally, equal cost multipath routing is not supported by the + routing cache. If you say Y here, alternative routes are cached + and on cache lookup a route is chosen in a configurable fashion. + + If unsure, say N. + +config IP_ROUTE_MULTIPATH_RR + tristate "MULTIPATH: round robin algorithm" + depends on IP_ROUTE_MULTIPATH_CACHED + help + Mulitpath routes are chosen according to Round Robin + +config IP_ROUTE_MULTIPATH_RANDOM + tristate "MULTIPATH: random algorithm" + depends on IP_ROUTE_MULTIPATH_CACHED + help + Multipath routes are chosen in a random fashion. Actually, + there is no weight for a route. The advantage of this policy + is that it is implemented stateless and therefore introduces only + a very small delay. + +config IP_ROUTE_MULTIPATH_WRANDOM + tristate "MULTIPATH: weighted random algorithm" + depends on IP_ROUTE_MULTIPATH_CACHED + help + Multipath routes are chosen in a weighted random fashion. + The per route weights are the weights visible via ip route 2. As the + corresponding state management introduces some overhead routing delay + is increased. + +config IP_ROUTE_MULTIPATH_DRR + tristate "MULTIPATH: interface round robin algorithm" + depends on IP_ROUTE_MULTIPATH_CACHED + help + Connections are distributed in a round robin fashion over the + available interfaces. This policy makes sense if the connections + should be primarily distributed on interfaces and not on routes. + config IP_ROUTE_VERBOSE bool "IP: verbose route monitoring" depends on IP_ADVANCED_ROUTER diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile --- a/net/ipv4/Makefile 2005-03-30 16:58:47 -08:00 +++ b/net/ipv4/Makefile 2005-03-30 16:58:47 -08:00 @@ -20,9 +20,14 @@ obj-$(CONFIG_INET_IPCOMP) += ipcomp.o obj-$(CONFIG_INET_TUNNEL) += xfrm4_tunnel.o obj-$(CONFIG_IP_PNP) += ipconfig.o +obj-$(CONFIG_IP_ROUTE_MULTIPATH_RR) += multipath_rr.o +obj-$(CONFIG_IP_ROUTE_MULTIPATH_RANDOM) += multipath_random.o +obj-$(CONFIG_IP_ROUTE_MULTIPATH_WRANDOM) += multipath_wrandom.o +obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IP_VS) += ipvs/ obj-$(CONFIG_IP_TCPDIAG) += tcp_diag.o +obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ xfrm4_output.o diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c --- a/net/ipv4/af_inet.c 2005-03-30 16:58:47 -08:00 +++ b/net/ipv4/af_inet.c 2005-03-30 16:58:47 -08:00 @@ -1027,20 +1027,16 @@ } rc = sk_alloc_slab(&tcp_prot, "tcp_sock"); - if (rc) { - sk_alloc_slab_error(&tcp_prot); + if (rc) goto out; - } + rc = sk_alloc_slab(&udp_prot, "udp_sock"); - if (rc) { - sk_alloc_slab_error(&udp_prot); + if (rc) goto out_tcp_free_slab; - } + rc = sk_alloc_slab(&raw_prot, "raw_sock"); - if (rc) { - sk_alloc_slab_error(&raw_prot); + if (rc) goto out_udp_free_slab; - } /* * Tell SOCKET that we are alive... diff -Nru a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c --- a/net/ipv4/fib_hash.c 2005-03-30 16:58:48 -08:00 +++ b/net/ipv4/fib_hash.c 2005-03-30 16:58:48 -08:00 @@ -264,6 +264,7 @@ err = fib_semantic_match(&f->fn_alias, flp, res, + f->fn_key, fz->fz_mask, fz->fz_order); if (err <= 0) goto out; diff -Nru a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h --- a/net/ipv4/fib_lookup.h 2005-03-30 16:58:48 -08:00 +++ b/net/ipv4/fib_lookup.h 2005-03-30 16:58:48 -08:00 @@ -19,7 +19,8 @@ /* Exported by fib_semantics.c */ extern int fib_semantic_match(struct list_head *head, const struct flowi *flp, - struct fib_result *res, int prefixlen); + struct fib_result *res, __u32 zone, __u32 mask, + int prefixlen); extern void fib_release_info(struct fib_info *); extern struct fib_info *fib_create_info(const struct rtmsg *r, struct kern_rta *rta, diff -Nru a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c --- a/net/ipv4/fib_semantics.c 2005-03-30 16:58:47 -08:00 +++ b/net/ipv4/fib_semantics.c 2005-03-30 16:58:47 -08:00 @@ -42,6 +42,7 @@ #include #include #include +#include #include "fib_lookup.h" @@ -649,6 +650,9 @@ #else const int nhs = 1; #endif +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + u32 mp_alg = IP_MP_ALG_NONE; +#endif /* Fast check to catch the most weird cases */ if (fib_props[r->rtm_type].scope > r->rtm_scope) @@ -661,6 +665,15 @@ goto err_inval; } #endif +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + if (rta->rta_mp_alg) { + mp_alg = *rta->rta_mp_alg; + + if (mp_alg < IP_MP_ALG_NONE || + mp_alg > IP_MP_ALG_MAX) + goto err_inval; + } +#endif err = -ENOBUFS; if (fib_info_cnt >= fib_hash_size) { @@ -752,6 +765,10 @@ #endif } +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + fi->fib_mp_alg = mp_alg; +#endif + if (fib_props[r->rtm_type].error) { if (rta->rta_gw || rta->rta_oif || rta->rta_mp) goto err_inval; @@ -831,7 +848,8 @@ } int fib_semantic_match(struct list_head *head, const struct flowi *flp, - struct fib_result *res, int prefixlen) + struct fib_result *res, __u32 zone, __u32 mask, + int prefixlen) { struct fib_alias *fa; int nh_sel = 0; @@ -895,6 +913,11 @@ res->type = fa->fa_type; res->scope = fa->fa_scope; res->fi = fa->fa_info; +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + res->netmask = mask; + res->network = zone & + (0xFFFFFFFF >> (32 - prefixlen)); +#endif atomic_inc(&res->fi->fib_clntref); return 0; } diff -Nru a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c --- a/net/ipv4/inetpeer.c 2005-03-30 16:58:50 -08:00 +++ b/net/ipv4/inetpeer.c 2005-03-30 16:58:50 -08:00 @@ -92,9 +92,9 @@ int inet_peer_minttl = 120 * HZ; /* TTL under high load: 120 sec */ int inet_peer_maxttl = 10 * 60 * HZ; /* usual time to live: 10 min */ +static struct inet_peer *inet_peer_unused_head; /* Exported for inet_putpeer inline function. */ -struct inet_peer *inet_peer_unused_head, - **inet_peer_unused_tailp = &inet_peer_unused_head; +struct inet_peer **inet_peer_unused_tailp = &inet_peer_unused_head; DEFINE_SPINLOCK(inet_peer_unused_lock); #define PEER_MAX_CLEANUP_WORK 30 diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c 2005-03-30 16:58:50 -08:00 +++ b/net/ipv4/ip_output.c 2005-03-30 16:58:50 -08:00 @@ -498,7 +498,7 @@ skb->data_len = first_len - skb_headlen(skb); skb->len = first_len; iph->tot_len = htons(first_len); - iph->frag_off |= htons(IP_MF); + iph->frag_off = htons(IP_MF); ip_send_check(iph); for (;;) { @@ -746,7 +746,7 @@ inet->cork.addr = ipc->addr; } dst_hold(&rt->u.dst); - inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst); + inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path); inet->cork.rt = rt; inet->cork.length = 0; sk->sk_sndmsg_page = NULL; @@ -1152,7 +1152,8 @@ * If local_df is set too, we still allow to fragment this frame * locally. */ if (inet->pmtudisc == IP_PMTUDISC_DO || - (!skb_shinfo(skb)->frag_list && ip_dont_fragment(sk, &rt->u.dst))) + (skb->len <= dst_mtu(&rt->u.dst) && + ip_dont_fragment(sk, &rt->u.dst))) df = htons(IP_DF); if (inet->cork.flags & IPCORK_OPT) diff -Nru a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c --- a/net/ipv4/ipmr.c 2005-03-30 16:58:48 -08:00 +++ b/net/ipv4/ipmr.c 2005-03-30 16:58:48 -08:00 @@ -1171,7 +1171,7 @@ dev = rt->u.dst.dev; - if (skb->len+encap > dst_pmtu(&rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) { + if (skb->len+encap > dst_mtu(&rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) { /* Do not fragment multicasts. Alas, IPv4 does not allow to send ICMP, so that packets will disappear to blackhole. diff -Nru a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c --- a/net/ipv4/ipvs/ip_vs_xmit.c 2005-03-30 16:58:51 -08:00 +++ b/net/ipv4/ipvs/ip_vs_xmit.c 2005-03-30 16:58:51 -08:00 @@ -178,7 +178,7 @@ } /* MTU checking */ - mtu = dst_pmtu(&rt->u.dst); + mtu = dst_mtu(&rt->u.dst); if ((skb->len > mtu) && (iph->frag_off&__constant_htons(IP_DF))) { ip_rt_put(rt); icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); @@ -245,7 +245,7 @@ goto tx_error_icmp; /* MTU checking */ - mtu = dst_pmtu(&rt->u.dst); + mtu = dst_mtu(&rt->u.dst); if ((skb->len > mtu) && (iph->frag_off&__constant_htons(IP_DF))) { ip_rt_put(rt); icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); @@ -342,7 +342,7 @@ tdev = rt->u.dst.dev; - mtu = dst_pmtu(&rt->u.dst) - sizeof(struct iphdr); + mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); if (mtu < 68) { ip_rt_put(rt); IP_VS_DBG_RL("ip_vs_tunnel_xmit(): mtu less than 68\n"); @@ -445,7 +445,7 @@ goto tx_error_icmp; /* MTU checking */ - mtu = dst_pmtu(&rt->u.dst); + mtu = dst_mtu(&rt->u.dst); if ((iph->frag_off&__constant_htons(IP_DF)) && skb->len > mtu) { icmp_send(skb, ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED, htonl(mtu)); ip_rt_put(rt); @@ -520,7 +520,7 @@ goto tx_error_icmp; /* MTU checking */ - mtu = dst_pmtu(&rt->u.dst); + mtu = dst_mtu(&rt->u.dst); if ((skb->len > mtu) && (skb->nh.iph->frag_off&__constant_htons(IP_DF))) { ip_rt_put(rt); icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); diff -Nru a/net/ipv4/multipath.c b/net/ipv4/multipath.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/ipv4/multipath.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,55 @@ +/* multipath.c: IPV4 multipath algorithm support. + * + * Copyright (C) 2004, 2005 Einar Lueck + * Copyright (C) 2005 David S. Miller + */ + +#include +#include +#include +#include + +#include + +static DEFINE_SPINLOCK(alg_table_lock); +struct ip_mp_alg_ops *ip_mp_alg_table[IP_MP_ALG_MAX + 1]; + +int multipath_alg_register(struct ip_mp_alg_ops *ops, enum ip_mp_alg n) +{ + struct ip_mp_alg_ops **slot; + int err; + + if (n < IP_MP_ALG_NONE || n > IP_MP_ALG_MAX || + !ops->mp_alg_select_route) + return -EINVAL; + + spin_lock(&alg_table_lock); + slot = &ip_mp_alg_table[n]; + if (*slot != NULL) { + err = -EBUSY; + } else { + *slot = ops; + err = 0; + } + spin_unlock(&alg_table_lock); + + return err; +} +EXPORT_SYMBOL(multipath_alg_register); + +void multipath_alg_unregister(struct ip_mp_alg_ops *ops, enum ip_mp_alg n) +{ + struct ip_mp_alg_ops **slot; + + if (n < IP_MP_ALG_NONE || n > IP_MP_ALG_MAX) + return; + + spin_lock(&alg_table_lock); + slot = &ip_mp_alg_table[n]; + if (*slot == ops) + *slot = NULL; + spin_unlock(&alg_table_lock); + + synchronize_net(); +} +EXPORT_SYMBOL(multipath_alg_unregister); diff -Nru a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/ipv4/multipath_drr.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,265 @@ +/* + * Device round robin policy for multipath. + * + * + * Version: $Id: multipath_drr.c,v 1.1.2.1 2004/09/16 07:42:34 elueck Exp $ + * + * Authors: Einar Lueck + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct multipath_device { + int ifi; /* interface index of device */ + atomic_t usecount; + int allocated; +}; + +#define MULTIPATH_MAX_DEVICECANDIDATES 10 + +static struct multipath_device state[MULTIPATH_MAX_DEVICECANDIDATES]; +static DEFINE_SPINLOCK(state_lock); +static struct rtable *last_selection = NULL; + +static int inline __multipath_findslot(void) +{ + int i; + + for (i = 0; i < MULTIPATH_MAX_DEVICECANDIDATES; i++) { + if (state[i].allocated == 0) + return i; + } + return -1; +} + +static int inline __multipath_finddev(int ifindex) +{ + int i; + + for (i = 0; i < MULTIPATH_MAX_DEVICECANDIDATES; i++) { + if (state[i].allocated != 0 && + state[i].ifi == ifindex) + return i; + } + return -1; +} + +static int drr_dev_event(struct notifier_block *this, + unsigned long event, void *ptr) +{ + struct net_device *dev = ptr; + int devidx; + + switch (event) { + case NETDEV_UNREGISTER: + case NETDEV_DOWN: + spin_lock_bh(&state_lock); + + devidx = __multipath_finddev(dev->ifindex); + if (devidx != -1) { + state[devidx].allocated = 0; + state[devidx].ifi = 0; + atomic_set(&state[devidx].usecount, 0); + } + + spin_unlock_bh(&state_lock); + break; + }; + + return NOTIFY_DONE; +} + +struct notifier_block drr_dev_notifier = { + .notifier_call = drr_dev_event, +}; + +static void drr_remove(struct rtable *rt) +{ + if (last_selection == rt) + last_selection = NULL; +} + +static void drr_safe_inc(atomic_t *usecount) +{ + int n; + + atomic_inc(usecount); + + n = atomic_read(usecount); + if (n <= 0) { + int i; + + spin_lock_bh(&state_lock); + + for (i = 0; i < MULTIPATH_MAX_DEVICECANDIDATES; i++) + atomic_set(&state[i].usecount, 0); + + spin_unlock_bh(&state_lock); + } +} + +static void drr_select_route(const struct flowi *flp, + struct rtable *first, struct rtable **rp) +{ + struct rtable *nh, *result, *cur_min; + int min_usecount = -1; + int devidx = -1; + int cur_min_devidx = -1; + + /* if necessary and possible utilize the old alternative */ + if ((flp->flags & FLOWI_FLAG_MULTIPATHOLDROUTE) != 0 && + last_selection != NULL) { + result = last_selection; + *rp = result; + return; + } + + /* 1. make sure all alt. nexthops have the same GC related data */ + /* 2. determine the new candidate to be returned */ + result = NULL; + cur_min = NULL; + for (nh = rcu_dereference(first); nh; + nh = rcu_dereference(nh->u.rt_next)) { + if ((nh->u.dst.flags & DST_BALANCED) != 0 && + multipath_comparekeys(&nh->fl, flp)) { + int nh_ifidx = nh->u.dst.dev->ifindex; + + nh->u.dst.lastuse = jiffies; + nh->u.dst.__use++; + if (result != NULL) + continue; + + /* search for the output interface */ + + /* this is not SMP safe, only add/remove are + * SMP safe as wrong usecount updates have no big + * impact + */ + devidx = __multipath_finddev(nh_ifidx); + if (devidx == -1) { + /* add the interface to the array + * SMP safe + */ + spin_lock_bh(&state_lock); + + /* due to SMP: search again */ + devidx = __multipath_finddev(nh_ifidx); + if (devidx == -1) { + /* add entry for device */ + devidx = __multipath_findslot(); + if (devidx == -1) { + /* unlikely but possible */ + continue; + } + + state[devidx].allocated = 1; + state[devidx].ifi = nh_ifidx; + atomic_set(&state[devidx].usecount, 0); + min_usecount = 0; + } + + spin_unlock_bh(&state_lock); + } + + if (min_usecount == 0) { + /* if the device has not been used it is + * the primary target + */ + drr_safe_inc(&state[devidx].usecount); + result = nh; + } else { + int count = + atomic_read(&state[devidx].usecount); + + if (min_usecount == -1 || + count < min_usecount) { + cur_min = nh; + cur_min_devidx = devidx; + min_usecount = count; + } + } + } + } + + if (!result) { + if (cur_min) { + drr_safe_inc(&state[cur_min_devidx].usecount); + result = cur_min; + } else { + result = first; + } + } + + *rp = result; + last_selection = result; +} + +static struct ip_mp_alg_ops drr_ops = { + .mp_alg_select_route = drr_select_route, + .mp_alg_remove = drr_remove, +}; + +static int __init drr_init(void) +{ + int err = register_netdevice_notifier(&drr_dev_notifier); + + if (err) + return err; + + err = multipath_alg_register(&drr_ops, IP_MP_ALG_RR); + if (err) + goto fail; + + return 0; + +fail: + unregister_netdevice_notifier(&drr_dev_notifier); + return err; +} + +static void __exit drr_exit(void) +{ + unregister_netdevice_notifier(&drr_dev_notifier); + multipath_alg_unregister(&drr_ops, IP_MP_ALG_DRR); +} + +module_init(drr_init); +module_exit(drr_exit); diff -Nru a/net/ipv4/multipath_random.c b/net/ipv4/multipath_random.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/ipv4/multipath_random.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,128 @@ +/* + * Random policy for multipath. + * + * + * Version: $Id: multipath_random.c,v 1.1.2.3 2004/09/21 08:42:11 elueck Exp $ + * + * Authors: Einar Lueck + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MULTIPATH_MAX_CANDIDATES 40 + +/* interface to random number generation */ +static unsigned int RANDOM_SEED = 93186752; + +static inline unsigned int random(unsigned int ubound) +{ + static unsigned int a = 1588635695, + q = 2, + r = 1117695901; + + RANDOM_SEED = a*(RANDOM_SEED % q) - r*(RANDOM_SEED / q); + + return RANDOM_SEED % ubound; +} + + +static void random_select_route(const struct flowi *flp, + struct rtable *first, + struct rtable **rp) +{ + struct rtable *rt; + struct rtable *decision; + unsigned char candidate_count = 0; + + /* count all candidate */ + for (rt = rcu_dereference(first); rt; + rt = rcu_dereference(rt->u.rt_next)) { + if ((rt->u.dst.flags & DST_BALANCED) != 0 && + multipath_comparekeys(&rt->fl, flp)) + ++candidate_count; + } + + /* choose a random candidate */ + decision = first; + if (candidate_count > 1) { + unsigned char i = 0; + unsigned char candidate_no = (unsigned char) + random(candidate_count); + + /* find chosen candidate and adjust GC data for all candidates + * to ensure they stay in cache + */ + for (rt = first; rt; rt = rt->u.rt_next) { + if ((rt->u.dst.flags & DST_BALANCED) != 0 && + multipath_comparekeys(&rt->fl, flp)) { + rt->u.dst.lastuse = jiffies; + + if (i == candidate_no) + decision = rt; + + if (i >= candidate_count) + break; + + i++; + } + } + } + + decision->u.dst.__use++; + *rp = decision; +} + +static struct ip_mp_alg_ops random_ops = { + .mp_alg_select_route = random_select_route, +}; + +static int __init random_init(void) +{ + return multipath_alg_register(&random_ops, IP_MP_ALG_RANDOM); +} + +static void __exit random_exit(void) +{ + multipath_alg_unregister(&random_ops, IP_MP_ALG_RANDOM); +} + +module_init(random_init); +module_exit(random_exit); diff -Nru a/net/ipv4/multipath_rr.c b/net/ipv4/multipath_rr.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/ipv4/multipath_rr.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,115 @@ +/* + * Round robin policy for multipath. + * + * + * Version: $Id: multipath_rr.c,v 1.1.2.2 2004/09/16 07:42:34 elueck Exp $ + * + * Authors: Einar Lueck + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MULTIPATH_MAX_CANDIDATES 40 + +static struct rtable* last_used = NULL; + +static void rr_remove(struct rtable *rt) +{ + if (last_used == rt) + last_used = NULL; +} + +static void rr_select_route(const struct flowi *flp, + struct rtable *first, struct rtable **rp) +{ + struct rtable *nh, *result, *min_use_cand = NULL; + int min_use = -1; + + /* if necessary and possible utilize the old alternative */ + if ((flp->flags & FLOWI_FLAG_MULTIPATHOLDROUTE) != 0 && + last_used != NULL) { + result = last_used; + goto out; + } + + /* 1. make sure all alt. nexthops have the same GC related data + * 2. determine the new candidate to be returned + */ + result = NULL; + for (nh = rcu_dereference(first); nh; + nh = rcu_dereference(nh->u.rt_next)) { + if ((nh->u.dst.flags & DST_BALANCED) != 0 && + multipath_comparekeys(&nh->fl, flp)) { + nh->u.dst.lastuse = jiffies; + + if (min_use == -1 || nh->u.dst.__use < min_use) { + min_use = nh->u.dst.__use; + min_use_cand = nh; + } + } + } + result = min_use_cand; + if (!result) + result = first; + +out: + last_used = result; + result->u.dst.__use++; + *rp = result; +} + +static struct ip_mp_alg_ops rr_ops = { + .mp_alg_select_route = rr_select_route, + .mp_alg_remove = rr_remove, +}; + +static int __init rr_init(void) +{ + return multipath_alg_register(&rr_ops, IP_MP_ALG_RR); +} + +static void __exit rr_exit(void) +{ + multipath_alg_unregister(&rr_ops, IP_MP_ALG_RR); +} + +module_init(rr_init); +module_exit(rr_exit); diff -Nru a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/ipv4/multipath_wrandom.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,344 @@ +/* + * Weighted random policy for multipath. + * + * + * Version: $Id: multipath_wrandom.c,v 1.1.2.3 2004/09/22 07:51:40 elueck Exp $ + * + * Authors: Einar Lueck + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MULTIPATH_STATE_SIZE 15 + +struct multipath_candidate { + struct multipath_candidate *next; + int power; + struct rtable *rt; +}; + +struct multipath_dest { + struct list_head list; + + const struct fib_nh *nh_info; + __u32 netmask; + __u32 network; + unsigned char prefixlen; + + struct rcu_head rcu; +}; + +struct multipath_bucket { + struct list_head head; + spinlock_t lock; +}; + +struct multipath_route { + struct list_head list; + + int oif; + __u32 gw; + struct list_head dests; + + struct rcu_head rcu; +}; + +/* state: primarily weight per route information */ +static struct multipath_bucket state[MULTIPATH_STATE_SIZE]; + +/* interface to random number generation */ +static unsigned int RANDOM_SEED = 93186752; + +static inline unsigned int random(unsigned int ubound) +{ + static unsigned int a = 1588635695, + q = 2, + r = 1117695901; + RANDOM_SEED = a*(RANDOM_SEED % q) - r*(RANDOM_SEED / q); + return RANDOM_SEED % ubound; +} + +static unsigned char __multipath_lookup_weight(const struct flowi *fl, + const struct rtable *rt) +{ + const int state_idx = rt->idev->dev->ifindex % MULTIPATH_STATE_SIZE; + struct multipath_route *r; + struct multipath_route *target_route = NULL; + struct multipath_dest *d; + int weight = 1; + + /* lookup the weight information for a certain route */ + rcu_read_lock(); + + /* find state entry for gateway or add one if necessary */ + list_for_each_entry_rcu(r, &state[state_idx].head, list) { + if (r->gw == rt->rt_gateway && + r->oif == rt->idev->dev->ifindex) { + target_route = r; + break; + } + } + + if (!target_route) { + /* this should not happen... but we are prepared */ + printk( KERN_CRIT"%s: missing state for gateway: %u and " \ + "device %d\n", __FUNCTION__, rt->rt_gateway, + rt->idev->dev->ifindex); + goto out; + } + + /* find state entry for destination */ + list_for_each_entry_rcu(d, &target_route->dests, list) { + __u32 targetnetwork = fl->fl4_dst & + (0xFFFFFFFF >> (32 - d->prefixlen)); + + if ((targetnetwork & d->netmask) == d->network) { + weight = d->nh_info->nh_weight; + goto out; + } + } + +out: + rcu_read_unlock(); + return weight; +} + +static void wrandom_init_state(void) +{ + int i; + + for (i = 0; i < MULTIPATH_STATE_SIZE; ++i) { + INIT_LIST_HEAD(&state[i].head); + spin_lock_init(&state[i].lock); + } +} + +static void wrandom_select_route(const struct flowi *flp, + struct rtable *first, + struct rtable **rp) +{ + struct rtable *rt; + struct rtable *decision; + struct multipath_candidate *first_mpc = NULL; + struct multipath_candidate *mpc, *last_mpc = NULL; + int power = 0; + int last_power; + int selector; + const size_t size_mpc = sizeof(struct multipath_candidate); + + /* collect all candidates and identify their weights */ + for (rt = rcu_dereference(first); rt; + rt = rcu_dereference(rt->u.rt_next)) { + if ((rt->u.dst.flags & DST_BALANCED) != 0 && + multipath_comparekeys(&rt->fl, flp)) { + struct multipath_candidate* mpc = + (struct multipath_candidate*) + kmalloc(size_mpc, GFP_KERNEL); + + if (!mpc) + return; + + power += __multipath_lookup_weight(flp, rt) * 10000; + + mpc->power = power; + mpc->rt = rt; + mpc->next = NULL; + + if (!first_mpc) + first_mpc = mpc; + else + last_mpc->next = mpc; + + last_mpc = mpc; + } + } + + /* choose a weighted random candidate */ + decision = first; + selector = random(power); + last_power = 0; + + /* select candidate, adjust GC data and cleanup local state */ + decision = first; + last_mpc = NULL; + for (mpc = first_mpc; mpc; mpc = mpc->next) { + mpc->rt->u.dst.lastuse = jiffies; + if (last_power <= selector && selector < mpc->power) + decision = mpc->rt; + + last_power = mpc->power; + if (last_mpc) + kfree(last_mpc); + + last_mpc = mpc; + } + + if (last_mpc) { + /* concurrent __multipath_flush may lead to !last_mpc */ + kfree(last_mpc); + } + + decision->u.dst.__use++; + *rp = decision; +} + +static void wrandom_set_nhinfo(__u32 network, + __u32 netmask, + unsigned char prefixlen, + const struct fib_nh *nh) +{ + const int state_idx = nh->nh_oif % MULTIPATH_STATE_SIZE; + struct multipath_route *r, *target_route = NULL; + struct multipath_dest *d, *target_dest = NULL; + + /* store the weight information for a certain route */ + spin_lock(&state[state_idx].lock); + + /* find state entry for gateway or add one if necessary */ + list_for_each_entry_rcu(r, &state[state_idx].head, list) { + if (r->gw == nh->nh_gw && r->oif == nh->nh_oif) { + target_route = r; + break; + } + } + + if (!target_route) { + const size_t size_rt = sizeof(struct multipath_route); + target_route = (struct multipath_route *) + kmalloc(size_rt, GFP_KERNEL); + + target_route->gw = nh->nh_gw; + target_route->oif = nh->nh_oif; + memset(&target_route->rcu, 0, sizeof(struct rcu_head)); + INIT_LIST_HEAD(&target_route->dests); + + list_add_rcu(&target_route->list, &state[state_idx].head); + } + + /* find state entry for destination or add one if necessary */ + list_for_each_entry_rcu(d, &target_route->dests, list) { + if (d->nh_info == nh) { + target_dest = d; + break; + } + } + + if (!target_dest) { + const size_t size_dst = sizeof(struct multipath_dest); + target_dest = (struct multipath_dest*) + kmalloc(size_dst, GFP_KERNEL); + + target_dest->nh_info = nh; + target_dest->network = network; + target_dest->netmask = netmask; + target_dest->prefixlen = prefixlen; + memset(&target_dest->rcu, 0, sizeof(struct rcu_head)); + + list_add_rcu(&target_dest->list, &target_route->dests); + } + /* else: we already stored this info for another destination => + * we are finished + */ + + spin_unlock(&state[state_idx].lock); +} + +static void __multipath_free(struct rcu_head *head) +{ + struct multipath_route *rt = container_of(head, struct multipath_route, + rcu); + kfree(rt); +} + +static void __multipath_free_dst(struct rcu_head *head) +{ + struct multipath_dest *dst = container_of(head, + struct multipath_dest, + rcu); + kfree(dst); +} + +static void wrandom_flush(void) +{ + int i; + + /* defere delete to all entries */ + for (i = 0; i < MULTIPATH_STATE_SIZE; ++i) { + struct multipath_route *r; + + spin_lock(&state[i].lock); + list_for_each_entry_rcu(r, &state[i].head, list) { + struct multipath_dest *d; + list_for_each_entry_rcu(d, &r->dests, list) { + list_del_rcu(&d->list); + call_rcu(&d->rcu, + __multipath_free_dst); + } + list_del_rcu(&r->list); + call_rcu(&r->rcu, + __multipath_free); + } + + spin_unlock(&state[i].lock); + } +} + +static struct ip_mp_alg_ops wrandom_ops = { + .mp_alg_select_route = wrandom_select_route, + .mp_alg_flush = wrandom_flush, + .mp_alg_set_nhinfo = wrandom_set_nhinfo, +}; + +static int __init wrandom_init(void) +{ + wrandom_init_state(); + + return multipath_alg_register(&wrandom_ops, IP_MP_ALG_WRANDOM); +} + +static void __exit wrandom_exit(void) +{ + multipath_alg_unregister(&wrandom_ops, IP_MP_ALG_WRANDOM); +} + +module_init(wrandom_init); +module_exit(wrandom_exit); diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2005-03-30 16:58:48 -08:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2005-03-30 16:58:48 -08:00 @@ -457,7 +457,7 @@ /* Local packets are never produced too large for their interface. We degfragment them at LOCAL_OUT, however, so we have to refragment them here. */ - if ((*pskb)->len > dst_pmtu(&rt->u.dst) && + if ((*pskb)->len > dst_mtu(&rt->u.dst) && !skb_shinfo(*pskb)->tso_size) { /* No hook can be after us, so this should be OK. */ ip_fragment(*pskb, okfn); diff -Nru a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c --- a/net/ipv4/netfilter/ipt_REJECT.c 2005-03-30 16:58:50 -08:00 +++ b/net/ipv4/netfilter/ipt_REJECT.c 2005-03-30 16:58:50 -08:00 @@ -207,13 +207,13 @@ nskb->nh.iph->ihl); /* "Never happens" */ - if (nskb->len > dst_pmtu(nskb->dst)) + if (nskb->len > dst_mtu(nskb->dst)) goto free_nskb; nf_ct_attach(nskb, oldskb); NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, nskb, NULL, nskb->dst->dev, - ip_finish_output); + dst_output); return; free_nskb: diff -Nru a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c --- a/net/ipv4/netfilter/ipt_TCPMSS.c 2005-03-30 16:58:48 -08:00 +++ b/net/ipv4/netfilter/ipt_TCPMSS.c 2005-03-30 16:58:48 -08:00 @@ -87,14 +87,14 @@ return NF_DROP; /* or IPT_CONTINUE ?? */ } - if(dst_pmtu((*pskb)->dst) <= (sizeof(struct iphdr) + sizeof(struct tcphdr))) { + if(dst_mtu((*pskb)->dst) <= (sizeof(struct iphdr) + sizeof(struct tcphdr))) { if (net_ratelimit()) printk(KERN_ERR - "ipt_tcpmss_target: unknown or invalid path-MTU (%d)\n", dst_pmtu((*pskb)->dst)); + "ipt_tcpmss_target: unknown or invalid path-MTU (%d)\n", dst_mtu((*pskb)->dst)); return NF_DROP; /* or IPT_CONTINUE ?? */ } - newmss = dst_pmtu((*pskb)->dst) - sizeof(struct iphdr) - sizeof(struct tcphdr); + newmss = dst_mtu((*pskb)->dst) - sizeof(struct iphdr) - sizeof(struct tcphdr); } else newmss = tcpmssinfo->mss; diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c 2005-03-30 16:58:51 -08:00 +++ b/net/ipv4/route.c 2005-03-30 16:58:51 -08:00 @@ -100,6 +100,7 @@ #include #include #include +#include #ifdef CONFIG_SYSCTL #include #endif @@ -147,7 +148,6 @@ static void ipv4_link_failure(struct sk_buff *skb); static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu); static int rt_garbage_collect(void); -static inline int compare_keys(struct flowi *fl1, struct flowi *fl2); static struct dst_ops ipv4_dst_ops = { @@ -451,11 +451,13 @@ static __inline__ void rt_free(struct rtable *rt) { + multipath_remove(rt); call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); } static __inline__ void rt_drop(struct rtable *rt) { + multipath_remove(rt); ip_rt_put(rt); call_rcu_bh(&rt->u.dst.rcu_head, dst_rcu_free); } @@ -517,6 +519,59 @@ return score; } +static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) +{ + return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 && + fl1->oif == fl2->oif && + fl1->iif == fl2->iif; +} + +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED +static struct rtable **rt_remove_balanced_route(struct rtable **chain_head, + struct rtable *expentry, + int *removed_count) +{ + int passedexpired = 0; + struct rtable **nextstep = NULL; + struct rtable **rthp = chain_head; + struct rtable *rth; + + if (removed_count) + *removed_count = 0; + + while ((rth = *rthp) != NULL) { + if (rth == expentry) + passedexpired = 1; + + if (((*rthp)->u.dst.flags & DST_BALANCED) != 0 && + compare_keys(&(*rthp)->fl, &expentry->fl)) { + if (*rthp == expentry) { + *rthp = rth->u.rt_next; + continue; + } else { + *rthp = rth->u.rt_next; + rt_free(rth); + if (removed_count) + ++(*removed_count); + } + } else { + if (!((*rthp)->u.dst.flags & DST_BALANCED) && + passedexpired && !nextstep) + nextstep = &rth->u.rt_next; + + rthp = &rth->u.rt_next; + } + } + + rt_free(expentry); + if (removed_count) + ++(*removed_count); + + return nextstep; +} +#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ + + /* This runs via a timer and thus is always in BH context. */ static void rt_check_expire(unsigned long dummy) { @@ -548,8 +603,22 @@ } /* Cleanup aged off entries. */ - *rthp = rth->u.rt_next; - rt_free(rth); +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + /* remove all related balanced entries if necessary */ + if (rth->u.dst.flags & DST_BALANCED) { + rthp = rt_remove_balanced_route( + &rt_hash_table[i].chain, + rth, NULL); + if (!rthp) + break; + } else { + *rthp = rth->u.rt_next; + rt_free(rth); + } +#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ + *rthp = rth->u.rt_next; + rt_free(rth); +#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ } spin_unlock(&rt_hash_table[i].lock); @@ -597,6 +666,9 @@ if (delay < 0) delay = ip_rt_min_delay; + /* flush existing multipath state*/ + multipath_flush(); + spin_lock_bh(&rt_flush_lock); if (del_timer(&rt_flush_timer) && delay > 0 && rt_deadline) { @@ -715,9 +787,30 @@ rthp = &rth->u.rt_next; continue; } +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + /* remove all related balanced entries + * if necessary + */ + if (rth->u.dst.flags & DST_BALANCED) { + int r; + + rthp = rt_remove_balanced_route( + &rt_hash_table[i].chain, + rth, + &r); + goal -= r; + if (!rthp) + break; + } else { + *rthp = rth->u.rt_next; + rt_free(rth); + goal--; + } +#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ *rthp = rth->u.rt_next; rt_free(rth); goal--; +#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ } spin_unlock_bh(&rt_hash_table[k].lock); if (goal <= 0) @@ -771,13 +864,6 @@ out: return 0; } -static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) -{ - return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 && - fl1->oif == fl2->oif && - fl1->iif == fl2->iif; -} - static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp) { struct rtable *rth, **rthp; @@ -798,7 +884,12 @@ spin_lock_bh(&rt_hash_table[hash].lock); while ((rth = *rthp) != NULL) { +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + if (!(rth->u.dst.flags & DST_BALANCED) && + compare_keys(&rth->fl, &rt->fl)) { +#else if (compare_keys(&rth->fl, &rt->fl)) { +#endif /* Put it first */ *rthp = rth->u.rt_next; /* @@ -1629,6 +1720,10 @@ } rth->u.dst.flags= DST_HOST; +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + if (res->fi->fib_nhs > 1) + rth->u.dst.flags |= DST_BALANCED; +#endif if (in_dev->cnf.no_policy) rth->u.dst.flags |= DST_NOPOLICY; if (in_dev->cnf.no_xfrm) @@ -1676,7 +1771,7 @@ unsigned hash; #ifdef CONFIG_IP_ROUTE_MULTIPATH - if (res->fi->fib_nhs > 1 && fl->oif == 0) + if (res->fi && res->fi->fib_nhs > 1 && fl->oif == 0) fib_select_multipath(fl, res); #endif @@ -1697,7 +1792,57 @@ struct in_device *in_dev, u32 daddr, u32 saddr, u32 tos) { +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + struct rtable* rth; + unsigned char hop, hopcount, lasthop; + int err = -EINVAL; + unsigned int hash; + + if (res->fi) + hopcount = res->fi->fib_nhs; + else + hopcount = 1; + + lasthop = hopcount - 1; + + /* distinguish between multipath and singlepath */ + if (hopcount < 2) + return ip_mkroute_input_def(skb, res, fl, in_dev, daddr, + saddr, tos); + + /* add all alternatives to the routing cache */ + for (hop = 0; hop < hopcount; hop++) { + res->nh_sel = hop; + + /* create a routing cache entry */ + err = __mkroute_input(skb, res, in_dev, daddr, saddr, tos, + &rth); + if (err) + return err; + + /* put it into the cache */ + hash = rt_hash_code(daddr, saddr ^ (fl->iif << 5), tos); + err = rt_intern_hash(hash, rth, (struct rtable**)&skb->dst); + if (err) + return err; + + /* forward hop information to multipath impl. */ + multipath_set_nhinfo(rth, + FIB_RES_NETWORK(*res), + FIB_RES_NETMASK(*res), + res->prefixlen, + &FIB_RES_NH(*res)); + + /* only for the last hop the reference count is handled + * outside + */ + if (hop == lasthop) + atomic_set(&(skb->dst->__refcnt), 1); + } + return err; +#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ return ip_mkroute_input_def(skb, res, fl, in_dev, daddr, saddr, tos); +#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ } @@ -2018,6 +2163,13 @@ } rth->u.dst.flags= DST_HOST; +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + if (res->fi) { + rth->rt_multipath_alg = res->fi->fib_mp_alg; + if (res->fi->fib_nhs > 1) + rth->u.dst.flags |= DST_BALANCED; + } +#endif if (in_dev->cnf.no_xfrm) rth->u.dst.flags |= DST_NOXFRM; if (in_dev->cnf.no_policy) @@ -2109,7 +2261,58 @@ struct net_device *dev_out, unsigned flags) { +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + u32 tos = RT_FL_TOS(oldflp); + unsigned char hop; + unsigned hash; + int err = -EINVAL; + struct rtable *rth; + + if (res->fi && res->fi->fib_nhs > 1) { + unsigned char hopcount = res->fi->fib_nhs; + + for (hop = 0; hop < hopcount; hop++) { + struct net_device *dev2nexthop; + + res->nh_sel = hop; + + /* hold a work reference to the output device */ + dev2nexthop = FIB_RES_DEV(*res); + dev_hold(dev2nexthop); + + err = __mkroute_output(&rth, res, fl, oldflp, + dev2nexthop, flags); + + if (err != 0) + goto cleanup; + + hash = rt_hash_code(oldflp->fl4_dst, + oldflp->fl4_src ^ + (oldflp->oif << 5), tos); + err = rt_intern_hash(hash, rth, rp); + + /* forward hop information to multipath impl. */ + multipath_set_nhinfo(rth, + FIB_RES_NETWORK(*res), + FIB_RES_NETMASK(*res), + res->prefixlen, + &FIB_RES_NH(*res)); + cleanup: + /* release work reference to output device */ + dev_put(dev2nexthop); + + if (err != 0) + return err; + } + atomic_set(&(*rp)->u.dst.__refcnt, 1); + return err; + } else { + return ip_mkroute_output_def(rp, res, fl, oldflp, dev_out, + flags); + } +#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ return ip_mkroute_output_def(rp, res, fl, oldflp, dev_out, flags); +#endif } /* @@ -2138,6 +2341,7 @@ int free_res = 0; int err; + res.fi = NULL; #ifdef CONFIG_IP_MULTIPLE_TABLES res.r = NULL; @@ -2187,6 +2391,8 @@ dev_put(dev_out); dev_out = NULL; } + + if (oldflp->oif) { dev_out = dev_get_by_index(oldflp->oif); err = -ENODEV; @@ -2293,9 +2499,11 @@ dev_hold(dev_out); fl.oif = dev_out->ifindex; + make_route: err = ip_mkroute_output(rp, &res, &fl, oldflp, dev_out, flags); + if (free_res) fib_res_put(&res); if (dev_out) @@ -2322,6 +2530,17 @@ #endif !((rth->fl.fl4_tos ^ flp->fl4_tos) & (IPTOS_RT_MASK | RTO_ONLINK))) { + + /* check for multipath routes and choose one if + * necessary + */ + if (multipath_select_route(flp, rth, rp)) { + dst_hold(&(*rp)->u.dst); + RT_CACHE_STAT_INC(out_hit); + rcu_read_unlock_bh(); + return 0; + } + rth->u.dst.lastuse = jiffies; dst_hold(&rth->u.dst); rth->u.dst.__use++; @@ -2395,6 +2614,13 @@ #ifdef CONFIG_NET_CLS_ROUTE if (rt->u.dst.tclassid) RTA_PUT(skb, RTA_FLOW, 4, &rt->u.dst.tclassid); +#endif +#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED + if (rt->rt_multipath_alg != IP_MP_ALG_NONE) { + __u32 alg = rt->rt_multipath_alg; + + RTA_PUT(skb, RTA_MP_ALGO, 4, &alg); + } #endif if (rt->fl.iif) RTA_PUT(skb, RTA_PREFSRC, 4, &rt->rt_spec_dst); diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2005-03-30 16:58:49 -08:00 +++ b/net/ipv4/tcp_input.c 2005-03-30 16:58:49 -08:00 @@ -1654,7 +1654,10 @@ static void tcp_undo_cwr(struct tcp_sock *tp, int undo) { if (tp->prior_ssthresh) { - tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1); + if (tcp_is_bic(tp)) + tp->snd_cwnd = max(tp->snd_cwnd, tp->bictcp.last_max_cwnd); + else + tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1); if (undo && tp->prior_ssthresh > tp->snd_ssthresh) { tp->snd_ssthresh = tp->prior_ssthresh; diff -Nru a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c --- a/net/ipv4/xfrm4_output.c 2005-03-30 16:58:47 -08:00 +++ b/net/ipv4/xfrm4_output.c 2005-03-30 16:58:47 -08:00 @@ -58,7 +58,7 @@ if (!top_iph->frag_off) __ip_select_ident(top_iph, dst, 0); - top_iph->ttl = dst_path_metric(dst, RTAX_HOPLIMIT); + top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); top_iph->saddr = x->props.saddr.a4; top_iph->daddr = x->id.daddr.a4; diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c --- a/net/ipv6/af_inet6.c 2005-03-30 16:58:49 -08:00 +++ b/net/ipv6/af_inet6.c 2005-03-30 16:58:49 -08:00 @@ -711,20 +711,17 @@ } err = sk_alloc_slab(&tcpv6_prot, "tcpv6_sock"); - if (err) { - sk_alloc_slab_error(&tcpv6_prot); + if (err) goto out; - } + err = sk_alloc_slab(&udpv6_prot, "udpv6_sock"); - if (err) { - sk_alloc_slab_error(&udpv6_prot); + if (err) goto out_tcp_free_slab; - } + err = sk_alloc_slab(&rawv6_prot, "rawv6_sock"); - if (err) { - sk_alloc_slab_error(&rawv6_prot); + if (err) goto out_udp_free_slab; - } + /* Register the socket-side information for inet6_create. */ for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r) diff -Nru a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c --- a/net/ipv6/ip6_flowlabel.c 2005-03-30 16:58:47 -08:00 +++ b/net/ipv6/ip6_flowlabel.c 2005-03-30 16:58:47 -08:00 @@ -87,7 +87,7 @@ static void fl_free(struct ip6_flowlabel *fl) { - if (fl->opt) + if (fl) kfree(fl->opt); kfree(fl); } @@ -351,8 +351,7 @@ return fl; done: - if (fl) - fl_free(fl); + fl_free(fl); *err_p = err; return NULL; } @@ -551,10 +550,8 @@ } done: - if (fl) - fl_free(fl); - if (sfl1) - kfree(sfl1); + fl_free(fl); + kfree(sfl1); return err; } diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c --- a/net/ipv6/ip6_output.c 2005-03-30 16:58:47 -08:00 +++ b/net/ipv6/ip6_output.c 2005-03-30 16:58:47 -08:00 @@ -850,8 +850,8 @@ np->cork.rt = rt; inet->cork.fl = *fl; np->cork.hop_limit = hlimit; - inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst); - if (dst_allfrag(&rt->u.dst)) + inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path); + if (dst_allfrag(rt->u.dst.path)) inet->cork.flags |= IPCORK_ALLFRAG; inet->cork.length = 0; sk->sk_sndmsg_page = NULL; diff -Nru a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c --- a/net/ipv6/xfrm6_output.c 2005-03-30 16:58:51 -08:00 +++ b/net/ipv6/xfrm6_output.c 2005-03-30 16:58:51 -08:00 @@ -69,7 +69,7 @@ dsfield &= ~INET_ECN_MASK; ipv6_change_dsfield(top_iph, 0, dsfield); top_iph->nexthdr = IPPROTO_IPV6; - top_iph->hop_limit = dst_path_metric(dst, RTAX_HOPLIMIT); + top_iph->hop_limit = dst_metric(dst->child, RTAX_HOPLIMIT); ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); } diff -Nru a/net/irda/af_irda.c b/net/irda/af_irda.c --- a/net/irda/af_irda.c 2005-03-30 16:58:51 -08:00 +++ b/net/irda/af_irda.c 2005-03-30 16:58:51 -08:00 @@ -88,10 +88,8 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); self = instance; - ASSERT(self != NULL, return -1;); - sk = instance; - ASSERT(sk != NULL, return -1;); + IRDA_ASSERT(sk != NULL, return -1;); err = sock_queue_rcv_skb(sk, skb); if (err) { @@ -206,14 +204,16 @@ switch (sk->sk_type) { case SOCK_STREAM: if (max_sdu_size != 0) { - ERROR("%s: max_sdu_size must be 0\n", __FUNCTION__); + IRDA_ERROR("%s: max_sdu_size must be 0\n", + __FUNCTION__); return; } self->max_data_size = irttp_get_max_seg_size(self->tsap); break; case SOCK_SEQPACKET: if (max_sdu_size == 0) { - ERROR("%s: max_sdu_size cannot be 0\n", __FUNCTION__); + IRDA_ERROR("%s: max_sdu_size cannot be 0\n", + __FUNCTION__); return; } self->max_data_size = max_sdu_size; @@ -265,7 +265,8 @@ switch (sk->sk_type) { case SOCK_STREAM: if (max_sdu_size != 0) { - ERROR("%s: max_sdu_size must be 0\n", __FUNCTION__); + IRDA_ERROR("%s: max_sdu_size must be 0\n", + __FUNCTION__); kfree_skb(skb); return; } @@ -273,7 +274,8 @@ break; case SOCK_SEQPACKET: if (max_sdu_size == 0) { - ERROR("%s: max_sdu_size cannot be 0\n", __FUNCTION__); + IRDA_ERROR("%s: max_sdu_size cannot be 0\n", + __FUNCTION__); kfree_skb(skb); return; } @@ -304,7 +306,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); skb = dev_alloc_skb(64); if (skb == NULL) { @@ -333,10 +335,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); self = instance; - ASSERT(self != NULL, return;); - sk = instance; - ASSERT(sk != NULL, return;); + IRDA_ASSERT(sk != NULL, return;); switch (flow) { case FLOW_STOP: @@ -373,7 +373,7 @@ self = (struct irda_sock *) priv; if (!self) { - WARNING("%s: lost myself!\n", __FUNCTION__); + IRDA_WARNING("%s: lost myself!\n", __FUNCTION__); return; } @@ -422,7 +422,7 @@ self = (struct irda_sock *) priv; if (!self) { - WARNING("%s: lost myself!\n", __FUNCTION__); + IRDA_WARNING("%s: lost myself!\n", __FUNCTION__); return; } @@ -448,7 +448,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); self = (struct irda_sock *) priv; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); /* Nothing for the caller */ self->cachelog = NULL; @@ -470,7 +470,7 @@ notify_t notify; if (self->tsap) { - WARNING("%s: busy!\n", __FUNCTION__); + IRDA_WARNING("%s: busy!\n", __FUNCTION__); return -EBUSY; } @@ -510,7 +510,7 @@ notify_t notify; if (self->lsap) { - WARNING("%s(), busy!\n", __FUNCTION__); + IRDA_WARNING("%s(), busy!\n", __FUNCTION__); return -EBUSY; } @@ -545,10 +545,11 @@ { IRDA_DEBUG(2, "%s(%p, %s)\n", __FUNCTION__, self, name); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); if (self->iriap) { - WARNING("%s(): busy with a previous query\n", __FUNCTION__); + IRDA_WARNING("%s(): busy with a previous query\n", + __FUNCTION__); return -EBUSY; } @@ -633,7 +634,7 @@ IRDA_DEBUG(2, "%s(), name=%s\n", __FUNCTION__, name); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* Ask lmp for the current discovery log * Note : we have to use irlmp_get_discoveries(), as opposed @@ -782,7 +783,7 @@ struct irda_sock *self = irda_sk(sk); int err; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); @@ -839,7 +840,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); err = irda_create(newsock, sk->sk_protocol); if (err) @@ -908,7 +909,7 @@ newsk->sk_state = TCP_ESTABLISHED; new = irda_sk(newsk); - ASSERT(new != NULL, return -1;); + IRDA_ASSERT(new != NULL, return -1;); /* Now attach up the new socket */ new->tsap = irttp_dup(self->tsap, new); @@ -1136,7 +1137,8 @@ self->max_sdu_size_rx = TTP_SAR_UNBOUND; break; default: - ERROR("%s: protocol not supported!\n", __FUNCTION__); + IRDA_ERROR("%s: protocol not supported!\n", + __FUNCTION__); return -ESOCKTNOSUPPORT; } break; @@ -1164,7 +1166,7 @@ { IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); /* Unregister with IrLMP */ irlmp_unregister_client(self->ckey); @@ -1283,7 +1285,7 @@ return -ENOTCONN; self = irda_sk(sk); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* Check if IrTTP is wants us to slow down */ @@ -1346,7 +1348,7 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, flags & MSG_DONTWAIT, &err); @@ -1398,7 +1400,7 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); if (sock->flags & __SO_ACCEPTCON) return(-EINVAL); @@ -1535,7 +1537,7 @@ return -ENOTCONN; self = irda_sk(sk); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* * Check that we don't send out to big frames. This is an unreliable @@ -1604,7 +1606,7 @@ } self = irda_sk(sk); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); /* Check if an address was specified with sendto. Jean II */ if (msg->msg_name) { @@ -1677,7 +1679,7 @@ struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(1, "%s(%p)\n", __FUNCTION__, self); @@ -1838,7 +1840,7 @@ struct ias_attrib * ias_attr; /* Attribute in IAS object */ int opt; - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); @@ -2023,8 +2025,8 @@ __FUNCTION__, opt); self->max_sdu_size_rx = opt; } else { - WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", - __FUNCTION__); + IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", + __FUNCTION__); return -ENOPROTOOPT; } break; @@ -2298,8 +2300,8 @@ /* Check that we can proceed with IAP */ if (self->iriap) { - WARNING("%s: busy with a previous query\n", - __FUNCTION__); + IRDA_WARNING("%s: busy with a previous query\n", + __FUNCTION__); kfree(ias_opt); return -EBUSY; } diff -Nru a/net/irda/discovery.c b/net/irda/discovery.c --- a/net/irda/discovery.c 2005-03-30 16:58:47 -08:00 +++ b/net/irda/discovery.c 2005-03-30 16:58:47 -08:00 @@ -155,7 +155,7 @@ int n; /* Size of the full log */ int i = 0; /* How many we expired */ - ASSERT(log != NULL, return;); + IRDA_ASSERT(log != NULL, return;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__); spin_lock_irqsave(&log->hb_spinlock, flags); @@ -226,7 +226,7 @@ { discovery_t *discovery; - ASSERT(log != NULL, return;); + IRDA_ASSERT(log != NULL, return;); discovery = (discovery_t *) hashbin_get_first(log); while (discovery != NULL) { @@ -270,8 +270,8 @@ int n; /* Size of the full log */ int i = 0; /* How many we picked */ - ASSERT(pn != NULL, return NULL;); - ASSERT(log != NULL, return NULL;); + IRDA_ASSERT(pn != NULL, return NULL;); + IRDA_ASSERT(log != NULL, return NULL;); /* Save spin lock */ spin_lock_irqsave(&log->hb_spinlock, flags); @@ -404,7 +404,7 @@ static int discovery_seq_open(struct inode *inode, struct file *file) { - ASSERT(irlmp != NULL, return -EINVAL;); + IRDA_ASSERT(irlmp != NULL, return -EINVAL;); return seq_open(file, &discovery_seq_ops); } diff -Nru a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c --- a/net/irda/ircomm/ircomm_core.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/ircomm/ircomm_core.c 2005-03-30 16:58:50 -08:00 @@ -72,7 +72,7 @@ { ircomm = hashbin_new(HB_LOCK); if (ircomm == NULL) { - ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); return -ENOMEM; } @@ -84,7 +84,7 @@ } #endif /* CONFIG_PROC_FS */ - MESSAGE("IrCOMM protocol (Dag Brattli)\n"); + IRDA_MESSAGE("IrCOMM protocol (Dag Brattli)\n"); return 0; } @@ -114,7 +114,7 @@ IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ , service_type); - ASSERT(ircomm != NULL, return NULL;); + IRDA_ASSERT(ircomm != NULL, return NULL;); self = kmalloc(sizeof(struct ircomm_cb), GFP_ATOMIC); if (self == NULL) @@ -190,14 +190,14 @@ { struct ircomm_cb *entry; - ASSERT(self != NULL, return -EIO;); - ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); + IRDA_ASSERT(self != NULL, return -EIO;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); entry = hashbin_remove(ircomm, self->line, NULL); - ASSERT(entry == self, return -1;); + IRDA_ASSERT(entry == self, return -1;); return __ircomm_close(self); } @@ -220,8 +220,8 @@ IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); self->service_type= service_type; @@ -277,8 +277,8 @@ { int ret; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); @@ -322,9 +322,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -EFAULT;); - ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); - ASSERT(skb != NULL, return -EFAULT;); + IRDA_ASSERT(self != NULL, return -EFAULT;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); + IRDA_ASSERT(skb != NULL, return -EFAULT;); ret = ircomm_do_event(self, IRCOMM_DATA_REQUEST, skb, NULL); @@ -343,7 +343,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(skb->len > 0, return;); + IRDA_ASSERT(skb->len > 0, return;); if (self->notify.data_indication) self->notify.data_indication(self->notify.instance, self, skb); @@ -362,7 +362,7 @@ { int clen; - ASSERT(skb->len > 0, return;); + IRDA_ASSERT(skb->len > 0, return;); clen = skb->data[0]; @@ -397,9 +397,9 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -EFAULT;); - ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); - ASSERT(skb != NULL, return -EFAULT;); + IRDA_ASSERT(self != NULL, return -EFAULT;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); + IRDA_ASSERT(skb != NULL, return -EFAULT;); ret = ircomm_do_event(self, IRCOMM_CONTROL_REQUEST, skb, NULL); @@ -455,8 +455,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); ret = ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, userdata, &info); @@ -476,7 +476,7 @@ { IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(info != NULL, return;); + IRDA_ASSERT(info != NULL, return;); if (self->notify.disconnect_indication) { self->notify.disconnect_indication(self->notify.instance, self, @@ -496,8 +496,8 @@ { IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); if (self->service_type == IRCOMM_3_WIRE_RAW) return; @@ -541,7 +541,7 @@ { const struct ircomm_cb *self = v; - ASSERT(self->magic == IRCOMM_MAGIC, return -EINVAL; ); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EINVAL; ); if(self->line < 0x10) seq_printf(seq, "ircomm%d", self->line); diff -Nru a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c --- a/net/irda/ircomm/ircomm_lmp.c 2005-03-30 16:58:47 -08:00 +++ b/net/irda/ircomm/ircomm_lmp.c 2005-03-30 16:58:47 -08:00 @@ -92,7 +92,8 @@ * Check that the client has reserved enough space for * headers */ - ASSERT(skb_headroom(userdata) >= LMP_MAX_HEADER, return -1;); + IRDA_ASSERT(skb_headroom(userdata) >= LMP_MAX_HEADER, + return -1;); /* Don't forget to refcount it - should be NULL anyway */ skb_get(userdata); @@ -144,7 +145,7 @@ struct ircomm_cb *self; int line; - ASSERT(skb != NULL, return;); + IRDA_ASSERT(skb != NULL, return;); cb = (struct irda_skb_cb *) skb->cb; @@ -158,8 +159,8 @@ return; } - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); self->pkt_count--; @@ -185,7 +186,7 @@ struct irda_skb_cb *cb; int ret; - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); cb = (struct irda_skb_cb *) skb->cb; @@ -207,7 +208,7 @@ } ret = irlmp_data_request(self->lsap, skb); if (ret) { - ERROR("%s(), failed\n", __FUNCTION__); + IRDA_ERROR("%s(), failed\n", __FUNCTION__); /* irlmp_data_request already free the packet */ } @@ -227,9 +228,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); ircomm_do_event(self, IRCOMM_LMP_DATA_INDICATION, skb, NULL); @@ -257,10 +258,10 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); - ASSERT(skb != NULL, return;); - ASSERT(qos != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(qos != NULL, return;); info.max_data_size = max_seg_size; info.max_header_size = max_header_size; @@ -290,10 +291,10 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); - ASSERT(skb != NULL, return;); - ASSERT(qos != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(qos != NULL, return;); info.max_data_size = max_seg_size; info.max_header_size = max_header_size; @@ -320,8 +321,8 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); info.reason = reason; diff -Nru a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c --- a/net/irda/ircomm/ircomm_param.c 2005-03-30 16:58:48 -08:00 +++ b/net/irda/ircomm/ircomm_param.c 2005-03-30 16:58:48 -08:00 @@ -106,8 +106,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); tty = self->tty; if (!tty) @@ -137,7 +137,7 @@ count = irda_param_insert(self, pi, skb->tail, skb_tailroom(skb), &ircomm_param_info); if (count < 0) { - WARNING("%s(), no room for parameter!\n", __FUNCTION__); + IRDA_WARNING("%s(), no room for parameter!\n", __FUNCTION__); spin_unlock_irqrestore(&self->spinlock, flags); return -1; } @@ -168,8 +168,8 @@ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; __u8 service_type = (__u8) param->pv.i; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) { param->pv.i = self->settings.service_type; @@ -233,8 +233,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) param->pv.i = IRCOMM_SERIAL; @@ -257,8 +257,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) { IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ ); @@ -280,8 +280,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) param->pv.i = self->settings.data_rate; @@ -304,8 +304,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) param->pv.i = self->settings.data_format; @@ -326,8 +326,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) param->pv.i = self->settings.flow_control; @@ -349,8 +349,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) { param->pv.i = self->settings.xonxoff[0]; @@ -376,8 +376,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) { param->pv.i = self->settings.enqack[0]; @@ -418,8 +418,8 @@ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; __u8 dte; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (get) param->pv.i = self->settings.dte; @@ -467,8 +467,8 @@ dce = (__u8) param->pv.i; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); self->settings.dce = dce; @@ -494,8 +494,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); /* Poll parameters are always of lenght 0 (just a signal) */ if (!get) { diff -Nru a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c --- a/net/irda/ircomm/ircomm_ttp.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/ircomm/ircomm_ttp.c 2005-03-30 16:58:50 -08:00 @@ -172,7 +172,7 @@ { int ret; - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); IRDA_DEBUG(2, "%s(), clen=%d\n", __FUNCTION__ , clen); @@ -180,7 +180,7 @@ * Insert clen field, currently we either send data only, or control * only frames, to make things easier and avoid queueing */ - ASSERT(skb_headroom(skb) >= IRCOMM_HEADER_SIZE, return -1;); + IRDA_ASSERT(skb_headroom(skb) >= IRCOMM_HEADER_SIZE, return -1;); /* Don't forget to refcount it - see ircomm_tty_do_softint() */ skb_get(skb); @@ -191,7 +191,7 @@ ret = irttp_data_request(self->tsap, skb); if (ret) { - ERROR("%s(), failed\n", __FUNCTION__); + IRDA_ERROR("%s(), failed\n", __FUNCTION__); /* irttp_data_request already free the packet */ } @@ -211,9 +211,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); ircomm_do_event(self, IRCOMM_TTP_DATA_INDICATION, skb, NULL); @@ -234,13 +234,14 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); - ASSERT(skb != NULL, return;); - ASSERT(qos != NULL, goto out;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(qos != NULL, goto out;); if (max_sdu_size != TTP_SAR_DISABLE) { - ERROR("%s(), SAR not allowed for IrCOMM!\n", __FUNCTION__); + IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", + __FUNCTION__); goto out; } @@ -274,13 +275,14 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); - ASSERT(skb != NULL, return;); - ASSERT(qos != NULL, goto out;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(qos != NULL, goto out;); if (max_sdu_size != TTP_SAR_DISABLE) { - ERROR("%s(), SAR not allowed for IrCOMM!\n", __FUNCTION__); + IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", + __FUNCTION__); goto out; } @@ -332,8 +334,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); info.reason = reason; @@ -357,8 +359,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); if (self->notify.flow_indication) self->notify.flow_indication(self->notify.instance, self, cmd); diff -Nru a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c --- a/net/irda/ircomm/ircomm_tty.c 2005-03-30 16:58:51 -08:00 +++ b/net/irda/ircomm/ircomm_tty.c 2005-03-30 16:58:51 -08:00 @@ -116,7 +116,7 @@ return -ENOMEM; ircomm_tty = hashbin_new(HB_LOCK); if (ircomm_tty == NULL) { - ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); + IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); put_tty_driver(driver); return -ENOMEM; } @@ -134,7 +134,8 @@ driver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(driver, &ops); if (tty_register_driver(driver)) { - ERROR("%s(): Couldn't register serial driver\n", __FUNCTION__); + IRDA_ERROR("%s(): Couldn't register serial driver\n", + __FUNCTION__); put_tty_driver(driver); return -1; } @@ -145,8 +146,8 @@ { IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ircomm_tty_shutdown(self); @@ -168,7 +169,8 @@ ret = tty_unregister_driver(driver); if (ret) { - ERROR("%s(), failed to unregister driver\n", __FUNCTION__); + IRDA_ERROR("%s(), failed to unregister driver\n", + __FUNCTION__); return; } @@ -189,8 +191,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); /* Check if already open */ if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) { @@ -224,7 +226,7 @@ /* Connect IrCOMM link with remote device */ ret = ircomm_tty_attach_cable(self); if (ret < 0) { - ERROR("%s(), error attaching cable!\n", __FUNCTION__); + IRDA_ERROR("%s(), error attaching cable!\n", __FUNCTION__); goto err; } @@ -381,7 +383,7 @@ /* No, so make new instance */ self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); if (self == NULL) { - ERROR("%s(), kmalloc failed!\n", __FUNCTION__); + IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); return -ENOMEM; } memset(self, 0, sizeof(struct ircomm_tty_cb)); @@ -442,8 +444,8 @@ */ if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) { - WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n", - __FUNCTION__); + IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n", + __FUNCTION__); return -ERESTARTSYS; } @@ -499,8 +501,8 @@ if (!tty) return; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); spin_lock_irqsave(&self->spinlock, flags); @@ -526,8 +528,8 @@ } if (--self->open_count < 0) { - ERROR("%s(), bad serial port count for ttys%d: %d\n", - __FUNCTION__, self->line, self->open_count); + IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n", + __FUNCTION__, self->line, self->open_count); self->open_count = 0; } if (self->open_count) { @@ -586,8 +588,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); /* * Let do_softint() do this to avoid race condition with @@ -683,8 +685,8 @@ IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __FUNCTION__ , count, tty->hw_stopped); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); /* We may receive packets from the TTY even before we have finished * our setup. Not cool. @@ -808,8 +810,8 @@ unsigned long flags; int ret; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); #ifdef IRCOMM_NO_TX_BEFORE_INIT /* max_header_size tells us if the channel is initialised or not. */ @@ -850,8 +852,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); orig_jiffies = jiffies; @@ -886,8 +888,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); /* Software flow control? */ if (I_IXOFF(tty)) @@ -917,8 +919,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); /* Using software flow control? */ if (I_IXOFF(tty)) { @@ -947,8 +949,8 @@ unsigned long flags; int len = 0; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); spin_lock_irqsave(&self->spinlock, flags); @@ -964,8 +966,8 @@ { unsigned long flags; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); @@ -1012,8 +1014,8 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); if (!tty) return; @@ -1065,8 +1067,8 @@ { struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ircomm_flow_request(self->ircomm, FLOW_STOP); } @@ -1085,8 +1087,8 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); tty = self->tty; @@ -1148,9 +1150,9 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); if (!self->tty) { IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ ); @@ -1198,9 +1200,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); clen = skb->data[0]; @@ -1225,8 +1227,8 @@ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct tty_struct *tty; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); tty = self->tty; diff -Nru a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c --- a/net/irda/ircomm/ircomm_tty_attach.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/ircomm/ircomm_tty_attach.c 2005-03-30 16:58:50 -08:00 @@ -132,8 +132,8 @@ { IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); /* Check if somebody has already connected to us */ if (ircomm_is_connected(self->ircomm)) { @@ -161,8 +161,8 @@ { IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); del_timer(&self->watchdog_timer); @@ -210,8 +210,8 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); /* Compute hint bits based on service */ hints = irlmp_service_to_hint(S_COMM); @@ -299,8 +299,8 @@ */ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self) { - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (self->service_type & IRCOMM_3_WIRE_RAW) return 0; @@ -387,7 +387,7 @@ * need to ensure that "line" is unique. - Jean II */ self = (struct ircomm_tty_cb *) hashbin_get_first(ircomm_tty); while (self != NULL) { - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ircomm_tty_do_event(self, IRCOMM_TTY_DISCOVERY_INDICATION, NULL, &info); @@ -410,8 +410,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); if (!self->tty) return; @@ -440,8 +440,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); /* We probably don't need to make any more queries */ iriap_close(self->iriap); @@ -501,8 +501,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); self->client = TRUE; self->max_data_size = max_data_size; @@ -532,8 +532,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); self->client = FALSE; self->max_data_size = max_data_size; @@ -561,8 +561,8 @@ { IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); if (!self->tty) return; @@ -600,8 +600,8 @@ static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self, int timeout) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); irda_start_timer(&self->watchdog_timer, timeout, (void *) self, ircomm_tty_watchdog_timer_expired); @@ -619,8 +619,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ircomm_tty_do_event(self, IRCOMM_TTY_WD_TIMER_EXPIRED, NULL, NULL); } @@ -635,8 +635,8 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, struct sk_buff *skb, struct ircomm_tty_info *info) { - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , ircomm_tty_state[self->state], ircomm_tty_event[event]); @@ -653,8 +653,8 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_STATE state) { /* - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__ , ircomm_tty_state[self->state], self->service_type); @@ -690,7 +690,8 @@ self->saddr = info->saddr; if (self->iriap) { - WARNING("%s(), busy with a previous query\n", __FUNCTION__); + IRDA_WARNING("%s(), busy with a previous query\n", + __FUNCTION__); return -EBUSY; } @@ -747,7 +748,8 @@ self->saddr = info->saddr; if (self->iriap) { - WARNING("%s(), busy with a previous query\n", __FUNCTION__); + IRDA_WARNING("%s(), busy with a previous query\n", + __FUNCTION__); return -EBUSY; } @@ -816,7 +818,8 @@ switch (event) { case IRCOMM_TTY_GOT_PARAMETERS: if (self->iriap) { - WARNING("%s(), busy with a previous query\n", __FUNCTION__); + IRDA_WARNING("%s(), busy with a previous query\n", + __FUNCTION__); return -EBUSY; } diff -Nru a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c --- a/net/irda/ircomm/ircomm_tty_ioctl.c 2005-03-30 16:58:47 -08:00 +++ b/net/irda/ircomm/ircomm_tty_ioctl.c 2005-03-30 16:58:47 -08:00 @@ -95,7 +95,7 @@ self->settings.flow_control |= IRCOMM_RTS_CTS_IN; /* This got me. Bummer. Jean II */ if (self->service_type == IRCOMM_3_WIRE_RAW) - WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__); + IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__); } else { self->flags &= ~ASYNC_CTS_FLOW; self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; @@ -230,8 +230,8 @@ if (tty->flags & (1 << TTY_IO_ERROR)) return -EIO; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); if (set & TIOCM_RTS) self->settings.dte |= IRCOMM_RTS; diff -Nru a/net/irda/irda_device.c b/net/irda/irda_device.c --- a/net/irda/irda_device.c 2005-03-30 16:58:48 -08:00 +++ b/net/irda/irda_device.c 2005-03-30 16:58:48 -08:00 @@ -77,14 +77,14 @@ { dongles = hashbin_new(HB_NOLOCK); if (dongles == NULL) { - printk(KERN_WARNING "IrDA: Can't allocate dongles hashbin!\n"); + IRDA_WARNING("IrDA: Can't allocate dongles hashbin!\n"); return -ENOMEM; } spin_lock_init(&dongles->hb_spinlock); tasks = hashbin_new(HB_LOCK); if (tasks == NULL) { - printk(KERN_WARNING "IrDA: Can't allocate tasks hashbin!\n"); + IRDA_WARNING("IrDA: Can't allocate tasks hashbin!\n"); hashbin_delete(dongles, NULL); return -ENOMEM; } @@ -98,8 +98,8 @@ static void __exit leftover_dongle(void *arg) { struct dongle_reg *reg = arg; - printk(KERN_WARNING "IrDA: Dongle type %x not unregistered\n", - reg->type); + IRDA_WARNING("IrDA: Dongle type %x not unregistered\n", + reg->type); } void __exit irda_device_cleanup(void) @@ -125,8 +125,8 @@ self = (struct irlap_cb *) dev->atalk_ptr; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); if (status) { self->media_busy = TRUE; @@ -157,8 +157,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); if (!dev->do_ioctl) { - ERROR("%s: do_ioctl not impl. by device driver\n", - __FUNCTION__); + IRDA_ERROR("%s: do_ioctl not impl. by device driver\n", + __FUNCTION__); return -1; } @@ -209,21 +209,22 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(task != NULL, return -1;); - ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); + IRDA_ASSERT(task != NULL, return -1;); + IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); /* Execute task until it's finished, or askes for a timeout */ do { timeout = task->function(task); if (count++ > 100) { - ERROR("%s: error in task handler!\n", __FUNCTION__); + IRDA_ERROR("%s: error in task handler!\n", + __FUNCTION__); irda_task_delete(task); return TRUE; } } while ((timeout == 0) && (task->state != IRDA_TASK_DONE)); if (timeout < 0) { - ERROR("%s: Error executing task!\n", __FUNCTION__); + IRDA_ERROR("%s: Error executing task!\n", __FUNCTION__); irda_task_delete(task); return TRUE; } @@ -387,7 +388,8 @@ #endif if (!reg || !try_module_get(reg->owner) ) { - ERROR("IrDA: Unable to find requested dongle type %x\n", type); + IRDA_ERROR("IrDA: Unable to find requested dongle type %x\n", + type); goto out; } @@ -413,7 +415,7 @@ */ int irda_device_dongle_cleanup(dongle_t *dongle) { - ASSERT(dongle != NULL, return -1;); + IRDA_ASSERT(dongle != NULL, return -1;); dongle->issue->close(dongle); module_put(dongle->issue->owner); @@ -431,8 +433,8 @@ spin_lock(&dongles->hb_spinlock); /* Check if this dongle has been registered before */ if (hashbin_find(dongles, new->type, NULL)) { - MESSAGE("%s: Dongle type %x already registered\n", - __FUNCTION__, new->type); + IRDA_MESSAGE("%s: Dongle type %x already registered\n", + __FUNCTION__, new->type); } else { /* Insert IrDA dongle into hashbin */ hashbin_insert(dongles, (irda_queue_t *) new, new->type, NULL); @@ -456,7 +458,7 @@ spin_lock(&dongles->hb_spinlock); node = hashbin_remove(dongles, dongle->type, NULL); if (!node) - ERROR("%s: dongle not found!\n", __FUNCTION__); + IRDA_ERROR("%s: dongle not found!\n", __FUNCTION__); spin_unlock(&dongles->hb_spinlock); } EXPORT_SYMBOL(irda_device_unregister_dongle); diff -Nru a/net/irda/iriap.c b/net/irda/iriap.c --- a/net/irda/iriap.c 2005-03-30 16:58:48 -08:00 +++ b/net/irda/iriap.c 2005-03-30 16:58:48 -08:00 @@ -107,8 +107,8 @@ /* Object repository - defined in irias_object.c */ irias_objects = hashbin_new(HB_LOCK); if (!irias_objects) { - WARNING("%s: Can't allocate irias_objects hashbin!\n", - __FUNCTION__); + IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n", + __FUNCTION__); hashbin_delete(iriap, NULL); return -ENOMEM; } @@ -175,7 +175,7 @@ self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC); if (!self) { - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } @@ -220,8 +220,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); del_timer(&self->watchdog_timer); @@ -244,8 +244,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); if (self->lsap) { irlmp_close_lsap(self->lsap); @@ -253,7 +253,7 @@ } entry = (struct iriap_cb *) hashbin_remove(iriap, (long) self, NULL); - ASSERT(entry == self, return;); + IRDA_ASSERT(entry == self, return;); __iriap_close(self); } @@ -278,7 +278,7 @@ self->lsap = irlmp_open_lsap(slsap_sel, ¬ify, 0); if (self->lsap == NULL) { - ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__); + IRDA_ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__); return -1; } self->slsap_sel = self->lsap->slsap_sel; @@ -302,10 +302,10 @@ self = (struct iriap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); - ASSERT(iriap != NULL, return;); + IRDA_ASSERT(iriap != NULL, return;); del_timer(&self->watchdog_timer); @@ -343,8 +343,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); tx_skb = dev_alloc_skb(64); if (tx_skb == NULL) { @@ -375,8 +375,8 @@ int name_len, attr_len, skb_len; __u8 *frame; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IAS_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return -1;); /* Client must supply the destination device address */ if (!daddr) @@ -442,9 +442,9 @@ __u8 *fp; int n; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* Initialize variables */ fp = skb->data; @@ -549,10 +549,10 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); - ASSERT(value != NULL, return;); - ASSERT(value->len <= 1024, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(value != NULL, return;); + IRDA_ASSERT(value->len <= 1024, return;); /* Initialize variables */ n = 0; @@ -642,9 +642,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); fp = skb->data; n = 1; @@ -697,8 +697,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); tx_skb = dev_alloc_skb(64); if (!tx_skb) @@ -719,8 +719,8 @@ { int ret; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); ret = irlmp_connect_request(self->lsap, LSAP_IAS, self->saddr, self->daddr, @@ -746,9 +746,9 @@ self = (struct iriap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); self->max_data_size = max_seg_size; self->max_header_size = max_header_size; @@ -778,9 +778,9 @@ self = (struct iriap_cb *) instance; - ASSERT(skb != NULL, return;); - ASSERT(self != NULL, goto out;); - ASSERT(self->magic == IAS_MAGIC, goto out;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, goto out;); + IRDA_ASSERT(self->magic == IAS_MAGIC, goto out;); /* Start new server */ new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); @@ -826,9 +826,9 @@ self = (struct iriap_cb *) instance; - ASSERT(skb != NULL, return 0;); - ASSERT(self != NULL, goto out;); - ASSERT(self->magic == IAS_MAGIC, goto out;); + IRDA_ASSERT(skb != NULL, return 0;); + IRDA_ASSERT(self != NULL, goto out;); + IRDA_ASSERT(self->magic == IAS_MAGIC, goto out;); frame = skb->data; @@ -840,8 +840,9 @@ } opcode = frame[0]; if (~opcode & IAP_LST) { - WARNING("%s:, IrIAS multiframe commands or " - "results is not implemented yet!\n", __FUNCTION__); + IRDA_WARNING("%s:, IrIAS multiframe commands or " + "results is not implemented yet!\n", + __FUNCTION__); goto out; } @@ -917,24 +918,24 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); fp = skb->data; opcode = fp[0]; if (~opcode & 0x80) { - WARNING("%s: IrIAS multiframe commands or results" - "is not implemented yet!\n", __FUNCTION__); + IRDA_WARNING("%s: IrIAS multiframe commands or results" + "is not implemented yet!\n", __FUNCTION__); return; } opcode &= 0x7f; /* Mask away LST bit */ switch (opcode) { case GET_INFO_BASE: - WARNING("%s: GetInfoBaseDetails not implemented yet!\n", - __FUNCTION__); + IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n", + __FUNCTION__); break; case GET_VALUE_BY_CLASS: iriap_getvaluebyclass_indication(self, skb); @@ -953,8 +954,8 @@ { struct iriap_cb *self = (struct iriap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); /* iriap_close(self); */ } @@ -1010,7 +1011,7 @@ struct ias_object *obj = v; struct ias_attrib *attrib; - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -EINVAL;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -EINVAL;); seq_printf(seq, "name: %s, id=%d\n", obj->name, obj->id); @@ -1025,7 +1026,8 @@ attrib != NULL; attrib = (struct ias_attrib *) hashbin_get_next(obj->attribs)) { - ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, break; ); + IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, + goto outloop; ); seq_printf(seq, " - Attribute name: \"%s\", ", attrib->name); @@ -1055,6 +1057,7 @@ seq_putc(seq, '\n'); } + IRDA_ASSERT_LABEL(outloop:) spin_unlock(&obj->attribs->hb_spinlock); } @@ -1070,7 +1073,7 @@ static int irias_seq_open(struct inode *inode, struct file *file) { - ASSERT( irias_objects != NULL, return -EINVAL;); + IRDA_ASSERT( irias_objects != NULL, return -EINVAL;); return seq_open(file, &irias_seq_ops); } diff -Nru a/net/irda/iriap_event.c b/net/irda/iriap_event.c --- a/net/irda/iriap_event.c 2005-03-30 16:58:51 -08:00 +++ b/net/irda/iriap_event.c 2005-03-30 16:58:51 -08:00 @@ -93,32 +93,32 @@ void iriap_next_client_state(struct iriap_cb *self, IRIAP_STATE state) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); self->client_state = state; } void iriap_next_call_state(struct iriap_cb *self, IRIAP_STATE state) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); self->call_state = state; } void iriap_next_server_state(struct iriap_cb *self, IRIAP_STATE state) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); self->server_state = state; } void iriap_next_r_connect_state(struct iriap_cb *self, IRIAP_STATE state) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); self->r_connect_state = state; } @@ -126,8 +126,8 @@ void iriap_do_client_event(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); (*iriap_state[ self->client_state]) (self, event, skb); } @@ -135,8 +135,8 @@ void iriap_do_call_event(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); (*iriap_state[ self->call_state]) (self, event, skb); } @@ -144,8 +144,8 @@ void iriap_do_server_event(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); (*iriap_state[ self->server_state]) (self, event, skb); } @@ -153,8 +153,8 @@ void iriap_do_r_connect_event(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); (*iriap_state[ self->r_connect_state]) (self, event, skb); } @@ -169,13 +169,13 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); switch (event) { case IAP_CALL_REQUEST_GVBC: iriap_next_client_state(self, S_CONNECTING); - ASSERT(self->request_skb == NULL, return;); + IRDA_ASSERT(self->request_skb == NULL, return;); /* Don't forget to refcount it - * see iriap_getvaluebyclass_request(). */ skb_get(skb); @@ -199,8 +199,8 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); switch (event) { case IAP_LM_CONNECT_CONFIRM: @@ -232,7 +232,7 @@ static void state_s_call(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); switch (event) { case IAP_LM_DISCONNECT_INDICATION: @@ -257,7 +257,7 @@ { struct sk_buff *tx_skb; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); switch (event) { case IAP_CALL_REQUEST: @@ -295,7 +295,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); switch (event) { case IAP_RECV_F_LST: @@ -367,7 +367,7 @@ case IAP_LM_CONNECT_INDICATION: tx_skb = dev_alloc_skb(64); if (tx_skb == NULL) { - WARNING("%s: unable to malloc!\n", __FUNCTION__); + IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__); return; } @@ -464,9 +464,9 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(skb != NULL, return;); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IAS_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IAS_MAGIC, return;); switch (event) { case IAP_CALL_RESPONSE: diff -Nru a/net/irda/irias_object.c b/net/irda/irias_object.c --- a/net/irda/irias_object.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irias_object.c 2005-03-30 16:58:49 -08:00 @@ -59,7 +59,7 @@ /* Allocate new string */ new_str = kmalloc(len + 1, GFP_ATOMIC); if (new_str == NULL) { - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } @@ -85,8 +85,8 @@ obj = (struct ias_object *) kmalloc(sizeof(struct ias_object), GFP_ATOMIC); if (obj == NULL) { - WARNING("%s(), Unable to allocate object!\n", - __FUNCTION__); + IRDA_WARNING("%s(), Unable to allocate object!\n", + __FUNCTION__); return NULL; } memset(obj, 0, sizeof( struct ias_object)); @@ -101,7 +101,8 @@ obj->attribs = hashbin_new(HB_LOCK); if (obj->attribs == NULL) { - WARNING("%s(), Unable to allocate attribs!\n", __FUNCTION__); + IRDA_WARNING("%s(), Unable to allocate attribs!\n", + __FUNCTION__); kfree(obj); return NULL; } @@ -118,8 +119,8 @@ */ static void __irias_delete_attrib(struct ias_attrib *attrib) { - ASSERT(attrib != NULL, return;); - ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); + IRDA_ASSERT(attrib != NULL, return;); + IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); if (attrib->name) kfree(attrib->name); @@ -132,8 +133,8 @@ void __irias_delete_object(struct ias_object *obj) { - ASSERT(obj != NULL, return;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); + IRDA_ASSERT(obj != NULL, return;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); if (obj->name) kfree(obj->name); @@ -156,8 +157,8 @@ { struct ias_object *node; - ASSERT(obj != NULL, return -1;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -1;); + IRDA_ASSERT(obj != NULL, return -1;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -1;); /* Remove from list */ node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); @@ -184,9 +185,9 @@ { struct ias_attrib *node; - ASSERT(obj != NULL, return -1;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -1;); - ASSERT(attrib != NULL, return -1;); + IRDA_ASSERT(obj != NULL, return -1;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return -1;); + IRDA_ASSERT(attrib != NULL, return -1;); /* Remove attribute from object */ node = hashbin_remove_this(obj->attribs, (irda_queue_t *) attrib); @@ -216,8 +217,8 @@ */ void irias_insert_object(struct ias_object *obj) { - ASSERT(obj != NULL, return;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); + IRDA_ASSERT(obj != NULL, return;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); hashbin_insert(irias_objects, (irda_queue_t *) obj, 0, obj->name); } @@ -231,7 +232,7 @@ */ struct ias_object *irias_find_object(char *name) { - ASSERT(name != NULL, return NULL;); + IRDA_ASSERT(name != NULL, return NULL;); /* Unsafe (locking), object might change */ return hashbin_lock_find(irias_objects, 0, name); @@ -248,9 +249,9 @@ { struct ias_attrib *attrib; - ASSERT(obj != NULL, return NULL;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return NULL;); - ASSERT(name != NULL, return NULL;); + IRDA_ASSERT(obj != NULL, return NULL;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return NULL;); + IRDA_ASSERT(name != NULL, return NULL;); attrib = hashbin_lock_find(obj->attribs, 0, name); if (attrib == NULL) @@ -270,11 +271,11 @@ static void irias_add_attrib(struct ias_object *obj, struct ias_attrib *attrib, int owner) { - ASSERT(obj != NULL, return;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); + IRDA_ASSERT(obj != NULL, return;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); - ASSERT(attrib != NULL, return;); - ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); + IRDA_ASSERT(attrib != NULL, return;); + IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;); /* Set if attrib is owned by kernel or user space */ attrib->value->owner = owner; @@ -298,8 +299,8 @@ /* Find object */ obj = hashbin_lock_find(irias_objects, 0, obj_name); if (obj == NULL) { - WARNING("%s: Unable to find object: %s\n", __FUNCTION__, - obj_name); + IRDA_WARNING("%s: Unable to find object: %s\n", __FUNCTION__, + obj_name); return -1; } @@ -309,8 +310,8 @@ /* Find attribute */ attrib = hashbin_find(obj->attribs, 0, attrib_name); if (attrib == NULL) { - WARNING("%s: Unable to find attribute: %s\n", __FUNCTION__, - attrib_name); + IRDA_WARNING("%s: Unable to find attribute: %s\n", + __FUNCTION__, attrib_name); spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); return -1; } @@ -345,14 +346,15 @@ { struct ias_attrib *attrib; - ASSERT(obj != NULL, return;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); - ASSERT(name != NULL, return;); + IRDA_ASSERT(obj != NULL, return;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); + IRDA_ASSERT(name != NULL, return;); attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), GFP_ATOMIC); if (attrib == NULL) { - WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to allocate attribute!\n", + __FUNCTION__); return; } memset(attrib, 0, sizeof( struct ias_attrib)); @@ -379,16 +381,17 @@ { struct ias_attrib *attrib; - ASSERT(obj != NULL, return;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); + IRDA_ASSERT(obj != NULL, return;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); - ASSERT(name != NULL, return;); - ASSERT(octets != NULL, return;); + IRDA_ASSERT(name != NULL, return;); + IRDA_ASSERT(octets != NULL, return;); attrib = (struct ias_attrib *) kmalloc(sizeof(struct ias_attrib), GFP_ATOMIC); if (attrib == NULL) { - WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to allocate attribute!\n", + __FUNCTION__); return; } memset(attrib, 0, sizeof( struct ias_attrib)); @@ -413,16 +416,17 @@ { struct ias_attrib *attrib; - ASSERT(obj != NULL, return;); - ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); + IRDA_ASSERT(obj != NULL, return;); + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); - ASSERT(name != NULL, return;); - ASSERT(value != NULL, return;); + IRDA_ASSERT(name != NULL, return;); + IRDA_ASSERT(value != NULL, return;); attrib = (struct ias_attrib *) kmalloc(sizeof( struct ias_attrib), GFP_ATOMIC); if (attrib == NULL) { - WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to allocate attribute!\n", + __FUNCTION__); return; } memset(attrib, 0, sizeof( struct ias_attrib)); @@ -448,7 +452,7 @@ value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } memset(value, 0, sizeof(struct ias_value)); @@ -474,7 +478,7 @@ value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } memset( value, 0, sizeof( struct ias_value)); @@ -501,7 +505,7 @@ value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } memset(value, 0, sizeof(struct ias_value)); @@ -514,7 +518,7 @@ value->t.oct_seq = kmalloc(len, GFP_ATOMIC); if (value->t.oct_seq == NULL){ - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); kfree(value); return NULL; } @@ -529,7 +533,7 @@ value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { - WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); + IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } memset(value, 0, sizeof(struct ias_value)); @@ -550,7 +554,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(value != NULL, return;); + IRDA_ASSERT(value != NULL, return;); switch (value->type) { case IAS_INTEGER: /* Fallthrough */ diff -Nru a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c --- a/net/irda/irlan/irlan_client.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irlan/irlan_client.c 2005-03-30 16:58:49 -08:00 @@ -74,8 +74,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* * If we are in peer mode, the client may not have got the discovery @@ -107,8 +107,8 @@ { IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* * Check if we are already awake, or if we are a provider in direct @@ -155,7 +155,7 @@ IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); - ASSERT(discovery != NULL, return;); + IRDA_ASSERT(discovery != NULL, return;); /* * I didn't check it, but I bet that IrLAN suffer from the same @@ -173,7 +173,7 @@ rcu_read_lock(); self = irlan_get_any(); if (self) { - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ , daddr); @@ -198,9 +198,9 @@ self = (struct irlan_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); @@ -227,12 +227,12 @@ self = (struct irlan_cb *) instance; tsap = (struct tsap_cb *) sap; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); - ASSERT(tsap != NULL, return;); - ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(tsap != NULL, return;); + IRDA_ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); - ASSERT(tsap == self->client.tsap_ctrl, return;); + IRDA_ASSERT(tsap == self->client.tsap_ctrl, return;); /* Remove frames queued on the control channel */ while ((skb = skb_dequeue(&self->client.txq)) != NULL) { @@ -256,8 +256,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* Check if already open */ if (self->client.tsap_ctrl) @@ -298,8 +298,8 @@ self = (struct irlan_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); self->client.max_sdu_size = max_sdu_size; self->client.max_header_size = max_header_size; @@ -322,34 +322,34 @@ printk(KERN_INFO "Success\n"); break; case 1: - WARNING("IrLAN: Insufficient resources\n"); + IRDA_WARNING("IrLAN: Insufficient resources\n"); break; case 2: - WARNING("IrLAN: Invalid command format\n"); + IRDA_WARNING("IrLAN: Invalid command format\n"); break; case 3: - WARNING("IrLAN: Command not supported\n"); + IRDA_WARNING("IrLAN: Command not supported\n"); break; case 4: - WARNING("IrLAN: Parameter not supported\n"); + IRDA_WARNING("IrLAN: Parameter not supported\n"); break; case 5: - WARNING("IrLAN: Value not supported\n"); + IRDA_WARNING("IrLAN: Value not supported\n"); break; case 6: - WARNING("IrLAN: Not open\n"); + IRDA_WARNING("IrLAN: Not open\n"); break; case 7: - WARNING("IrLAN: Authentication required\n"); + IRDA_WARNING("IrLAN: Authentication required\n"); break; case 8: - WARNING("IrLAN: Invalid password\n"); + IRDA_WARNING("IrLAN: Invalid password\n"); break; case 9: - WARNING("IrLAN: Protocol error\n"); + IRDA_WARNING("IrLAN: Protocol error\n"); break; case 255: - WARNING("IrLAN: Asynchronous status\n"); + IRDA_WARNING("IrLAN: Asynchronous status\n"); break; } } @@ -371,15 +371,15 @@ char *name; char *value; - ASSERT(skb != NULL, return;); + IRDA_ASSERT(skb != NULL, return;); IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); if (!skb) { - ERROR("%s(), Got NULL skb!\n", __FUNCTION__); + IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__); return; } frame = skb->data; @@ -438,8 +438,8 @@ IRDA_DEBUG(4, "%s(), parm=%s\n", __FUNCTION__ , param); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* Media type */ if (strcmp(param, "MEDIA") == 0) { @@ -540,10 +540,10 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(priv != NULL, return;); + IRDA_ASSERT(priv != NULL, return;); self = (struct irlan_cb *) priv; - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* We probably don't need to make any more queries */ iriap_close(self->client.iriap); diff -Nru a/net/irda/irlan/irlan_client_event.c b/net/irda/irlan/irlan_client_event.c --- a/net/irda/irlan/irlan_client_event.c 2005-03-30 16:58:48 -08:00 +++ b/net/irda/irlan/irlan_client_event.c 2005-03-30 16:58:48 -08:00 @@ -77,8 +77,8 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); (*state[ self->client.state]) (self, event, skb); } @@ -94,13 +94,14 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); switch (event) { case IRLAN_DISCOVERY_INDICATION: if (self->client.iriap) { - WARNING("%s(), busy with a previous query\n", __FUNCTION__); + IRDA_WARNING("%s(), busy with a previous query\n", + __FUNCTION__); return -EBUSY; } @@ -137,12 +138,12 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); switch(event) { case IRLAN_IAS_PROVIDER_AVAIL: - ASSERT(self->dtsap_sel_ctrl != 0, return -1;); + IRDA_ASSERT(self->dtsap_sel_ctrl != 0, return -1;); self->client.open_retries = 0; @@ -190,7 +191,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch (event) { case IRLAN_CONNECT_COMPLETE: @@ -225,11 +226,11 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch (event) { case IRLAN_DATA_INDICATION: - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); irlan_client_parse_response(self, skb); @@ -267,7 +268,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_DATA_INDICATION: @@ -306,7 +307,7 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_DATA_INDICATION: @@ -316,7 +317,7 @@ * Check if we have got the remote TSAP for data * communications */ - ASSERT(self->dtsap_sel_data != 0, return -1;); + IRDA_ASSERT(self->dtsap_sel_data != 0, return -1;); /* Check which access type we are dealing with */ switch (self->client.access_type) { @@ -377,7 +378,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_PROVIDER_SIGNAL: @@ -408,7 +409,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_CHECK_CON_ARB: @@ -463,8 +464,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); switch(event) { case IRLAN_DATA_INDICATION: diff -Nru a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c --- a/net/irda/irlan/irlan_common.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irlan/irlan_common.c 2005-03-30 16:58:49 -08:00 @@ -261,8 +261,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); ASSERT_RTNL(); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); del_timer_sync(&self->watchdog_timer); del_timer_sync(&self->client.kick_timer); @@ -311,9 +311,9 @@ self = (struct irlan_cb *) instance; tsap = (struct tsap_cb *) sap; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); - ASSERT(tsap == self->tsap_data,return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(tsap == self->tsap_data,return;); self->max_sdu_size = max_sdu_size; self->max_header_size = max_header_size; @@ -354,8 +354,8 @@ self = (struct irlan_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); self->max_sdu_size = max_sdu_size; self->max_header_size = max_header_size; @@ -403,12 +403,12 @@ self = (struct irlan_cb *) instance; tsap = (struct tsap_cb *) sap; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); - ASSERT(tsap != NULL, return;); - ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(tsap != NULL, return;); + IRDA_ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); - ASSERT(tsap == self->tsap_data, return;); + IRDA_ASSERT(tsap == self->tsap_data, return;); IRDA_DEBUG(2, "IrLAN, data channel disconnected by peer!\n"); @@ -432,7 +432,7 @@ IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ ); break; default: - ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__); + IRDA_ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__); break; } @@ -456,8 +456,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* Check if already open */ if (self->tsap_data) @@ -492,8 +492,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* Disconnect and close all open TSAP connections */ if (self->tsap_data) { @@ -527,8 +527,8 @@ struct ias_object *obj; struct ias_value *new_value; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* * Check if object has already been registered by a previous provider. @@ -634,8 +634,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(64); if (!skb) @@ -666,8 +666,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(64); if (!skb) @@ -698,8 +698,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* Check if the TSAP is still there */ if (self->client.tsap_ctrl == NULL) @@ -737,8 +737,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(128); if (!skb) @@ -775,8 +775,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(128); if (!skb) @@ -814,8 +814,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(128); if (!skb) @@ -854,8 +854,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(128); if (!skb) @@ -889,8 +889,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(64); if (!skb) @@ -985,8 +985,8 @@ value_len = 2; break; case IRLAN_ARRAY: - ASSERT(value_array != NULL, return 0;); - ASSERT(value_len > 0, return 0;); + IRDA_ASSERT(value_array != NULL, return 0;); + IRDA_ASSERT(value_len > 0, return 0;); break; default: IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ ); @@ -1029,7 +1029,7 @@ default: break; } - ASSERT(n == (param_len+value_len+3), return 0;); + IRDA_ASSERT(n == (param_len+value_len+3), return 0;); return param_len+value_len+3; } @@ -1142,8 +1142,8 @@ else { struct irlan_cb *self = v; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); seq_printf(seq,"ifname: %s,\n", self->dev->name); diff -Nru a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c --- a/net/irda/irlan/irlan_eth.c 2005-03-30 16:58:47 -08:00 +++ b/net/irda/irlan/irlan_eth.c 2005-03-30 16:58:47 -08:00 @@ -222,7 +222,13 @@ ++self->stats.rx_dropped; return 0; } - ASSERT(skb->len > 1, return 0;); + if (skb->len < ETH_HLEN) { + IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n", + __FUNCTION__, skb->len); + ++self->stats.rx_dropped; + dev_kfree_skb(skb); + return 0; + } /* * Adopt this frame! Important to set all these fields since they @@ -261,12 +267,12 @@ self = (struct irlan_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); dev = self->dev; - ASSERT(dev != NULL, return;); + IRDA_ASSERT(dev != NULL, return;); IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__, flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", @@ -340,7 +346,7 @@ if (dev->flags & IFF_PROMISC) { /* Enable promiscuous mode */ - WARNING("Promiscous mode not implemented by IrLAN!\n"); + IRDA_WARNING("Promiscous mode not implemented by IrLAN!\n"); } else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) { /* Disable promiscuous mode, use normal mode. */ diff -Nru a/net/irda/irlan/irlan_event.c b/net/irda/irlan/irlan_event.c --- a/net/irda/irlan/irlan_event.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/irlan/irlan_event.c 2005-03-30 16:58:50 -08:00 @@ -42,8 +42,8 @@ { IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); self->client.state = state; } @@ -52,8 +52,8 @@ { IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); self->provider.state = state; } diff -Nru a/net/irda/irlan/irlan_filter.c b/net/irda/irlan/irlan_filter.c --- a/net/irda/irlan/irlan_filter.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/irlan/irlan_filter.c 2005-03-30 16:58:50 -08:00 @@ -36,8 +36,8 @@ */ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); if ((self->provider.filter_type == IRLAN_DIRECTED) && (self->provider.filter_operation == DYNAMIC)) @@ -148,8 +148,8 @@ bytes = value; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_DEBUG(4, "%s, %s\n", param, value); diff -Nru a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c --- a/net/irda/irlan/irlan_provider.c 2005-03-30 16:58:48 -08:00 +++ b/net/irda/irlan/irlan_provider.c 2005-03-30 16:58:48 -08:00 @@ -74,10 +74,10 @@ self = (struct irlan_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); code = skb->data[0]; switch(code) { @@ -134,11 +134,11 @@ self = (struct irlan_cb *) instance; tsap = (struct tsap_cb *) sap; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - ASSERT(tsap == self->provider.tsap_ctrl,return;); - ASSERT(self->provider.state == IRLAN_IDLE, return;); + IRDA_ASSERT(tsap == self->provider.tsap_ctrl,return;); + IRDA_ASSERT(self->provider.state == IRLAN_IDLE, return;); daddr = irttp_get_daddr(tsap); saddr = irttp_get_saddr(tsap); @@ -168,8 +168,8 @@ void irlan_provider_connect_response(struct irlan_cb *self, struct tsap_cb *tsap) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); /* Just accept */ irttp_connect_response(tsap, IRLAN_MTU, NULL); @@ -187,12 +187,12 @@ self = (struct irlan_cb *) instance; tsap = (struct tsap_cb *) sap; - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); - ASSERT(tsap != NULL, return;); - ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(tsap != NULL, return;); + IRDA_ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); - ASSERT(tsap == self->provider.tsap_ctrl, return;); + IRDA_ASSERT(tsap == self->provider.tsap_ctrl, return;); irlan_do_provider_event(self, IRLAN_LMP_DISCONNECT, NULL); } @@ -234,12 +234,12 @@ char *value; int ret = RSP_SUCCESS; - ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); + IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); IRDA_DEBUG(4, "%s(), skb->len=%d\n", __FUNCTION__ , (int)skb->len); - ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); - ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); + IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); if (!skb) return -RSP_PROTOCOL_ERROR; @@ -293,8 +293,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return;); - ASSERT(self->magic == IRLAN_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); skb = dev_alloc_skb(128); if (!skb) @@ -381,8 +381,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); /* Check if already open */ if (self->provider.tsap_ctrl) diff -Nru a/net/irda/irlan/irlan_provider_event.c b/net/irda/irlan/irlan_provider_event.c --- a/net/irda/irlan/irlan_provider_event.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irlan/irlan_provider_event.c 2005-03-30 16:58:49 -08:00 @@ -58,7 +58,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event, struct sk_buff *skb) { - ASSERT(*state[ self->provider.state] != NULL, return;); + IRDA_ASSERT(*state[ self->provider.state] != NULL, return;); (*state[self->provider.state]) (self, event, skb); } @@ -74,7 +74,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_CONNECT_INDICATION: @@ -103,7 +103,7 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_GET_INFO_CMD: @@ -168,7 +168,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); switch(event) { case IRLAN_FILTER_CONFIG_CMD: @@ -207,8 +207,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == IRLAN_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); switch(event) { case IRLAN_FILTER_CONFIG_CMD: diff -Nru a/net/irda/irlap.c b/net/irda/irlap.c --- a/net/irda/irlap.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/irlap.c 2005-03-30 16:58:50 -08:00 @@ -80,15 +80,16 @@ { /* Check if the compiler did its job properly. * May happen on some ARM configuration, check with Russell King. */ - ASSERT(sizeof(struct xid_frame) == 14, ;); - ASSERT(sizeof(struct test_frame) == 10, ;); - ASSERT(sizeof(struct ua_frame) == 10, ;); - ASSERT(sizeof(struct snrm_frame) == 11, ;); + IRDA_ASSERT(sizeof(struct xid_frame) == 14, ;); + IRDA_ASSERT(sizeof(struct test_frame) == 10, ;); + IRDA_ASSERT(sizeof(struct ua_frame) == 10, ;); + IRDA_ASSERT(sizeof(struct snrm_frame) == 11, ;); /* Allocate master array */ irlap = hashbin_new(HB_LOCK); if (irlap == NULL) { - ERROR("%s: can't allocate irlap hashbin!\n", __FUNCTION__); + IRDA_ERROR("%s: can't allocate irlap hashbin!\n", + __FUNCTION__); return -ENOMEM; } @@ -97,7 +98,7 @@ void __exit irlap_cleanup(void) { - ASSERT(irlap != NULL, return;); + IRDA_ASSERT(irlap != NULL, return;); hashbin_delete(irlap, (FREE_FUNC) __irlap_close); } @@ -186,8 +187,8 @@ */ static void __irlap_close(struct irlap_cb *self) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Stop timers */ del_timer(&self->slot_timer); @@ -218,8 +219,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* We used to send a LAP_DISC_INDICATION here, but this was * racy. This has been move within irlmp_unregister_link() @@ -249,8 +250,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_init_qos_capabilities(self, NULL); /* No user QoS! */ @@ -283,8 +284,8 @@ { IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __FUNCTION__, daddr); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); self->daddr = daddr; @@ -310,8 +311,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlmp_link_connect_confirm(self->notify.instance, &self->qos_tx, skb); } @@ -342,13 +343,13 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb, int unreliable) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), - return;); + IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), + return;); skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); /* @@ -389,12 +390,12 @@ #ifdef CONFIG_IRDA_ULTRA void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), + IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), return;); skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); @@ -420,9 +421,9 @@ { IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* Hide LAP header from IrLMP layer */ skb_pull(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); @@ -440,8 +441,8 @@ { IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Don't disconnect until all data frames are successfully sent */ if (skb_queue_len(&self->txq) > 0) { @@ -476,8 +477,8 @@ { IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, lap_reasons[reason]); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Flush queues */ irlap_flush_all_queues(self); @@ -495,7 +496,7 @@ reason, NULL); break; default: - ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason); + IRDA_ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason); } } @@ -509,15 +510,15 @@ { struct irlap_info info; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(discovery != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(discovery != NULL, return;); IRDA_DEBUG(4, "%s(), nslots = %d\n", __FUNCTION__, discovery->nslots); - ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || - (discovery->nslots == 8) || (discovery->nslots == 16), - return;); + IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || + (discovery->nslots == 8) || (discovery->nslots == 16), + return;); /* Discovery is only possible in NDM mode */ if (self->state != LAP_NDM) { @@ -544,8 +545,8 @@ self->discovery_log = hashbin_new(HB_NOLOCK); if (self->discovery_log == NULL) { - WARNING("%s(), Unable to allocate discovery log!\n", - __FUNCTION__); + IRDA_WARNING("%s(), Unable to allocate discovery log!\n", + __FUNCTION__); return; } @@ -569,10 +570,10 @@ */ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(self->notify.instance != NULL, return;); + IRDA_ASSERT(self->notify.instance != NULL, return;); /* * Check for successful discovery, since we are then allowed to clear @@ -602,11 +603,11 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(discovery != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(discovery != NULL, return;); - ASSERT(self->notify.instance != NULL, return;); + IRDA_ASSERT(self->notify.instance != NULL, return;); /* A device is very likely to connect immediately after it performs * a successful discovery. This means that in our case, we are much @@ -629,10 +630,10 @@ { switch (quality_of_link) { case STATUS_NO_ACTIVITY: - MESSAGE("IrLAP, no activity on link!\n"); + IRDA_MESSAGE("IrLAP, no activity on link!\n"); break; case STATUS_NOISY: - MESSAGE("IrLAP, noisy link!\n"); + IRDA_MESSAGE("IrLAP, noisy link!\n"); break; default: break; @@ -648,8 +649,8 @@ { IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); if (self->state == LAP_RESET_WAIT) irlap_do_event(self, RESET_REQUEST, NULL, NULL); @@ -677,7 +678,7 @@ static int rand; int slot; - ASSERT((S - s) > 0, return 0;); + IRDA_ASSERT((S - s) > 0, return 0;); rand += jiffies; rand ^= (rand << 12); @@ -685,7 +686,7 @@ slot = s + rand % (S-s); - ASSERT((slot >= s) || (slot < S), return 0;); + IRDA_ASSERT((slot >= s) || (slot < S), return 0;); return slot; } @@ -792,8 +793,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Next to send and next to receive */ self->vs = self->vr = 0; @@ -848,8 +849,8 @@ { struct sk_buff* skb; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Free transmission queue */ while ((skb = skb_dequeue(&self->txq)) != NULL) @@ -875,8 +876,8 @@ IRDA_DEBUG(0, "%s(), setting speed to %d\n", __FUNCTION__, speed); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); self->speed = speed; @@ -899,9 +900,9 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self, struct qos_info *qos_user) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(self->netdev != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self->netdev != NULL, return;); /* Start out with the maximum QoS support possible */ irda_init_max_qos_capabilies(&self->qos_rx); @@ -947,8 +948,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* xbofs : Default value in NDM */ self->next_bofs = 12; @@ -1010,8 +1011,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Set the negotiated xbofs value */ self->next_bofs = self->qos_tx.additional_bofs.value; @@ -1040,8 +1041,8 @@ * Initialize timeout values, some of the rules are listed on * page 92 in IrLAP. */ - ASSERT(self->qos_tx.max_turn_time.value != 0, return;); - ASSERT(self->qos_rx.max_turn_time.value != 0, return;); + IRDA_ASSERT(self->qos_tx.max_turn_time.value != 0, return;); + IRDA_ASSERT(self->qos_rx.max_turn_time.value != 0, return;); /* The poll timeout applies only to the primary station. * It defines the maximum time the primary stay in XMIT mode * before timeout and turning the link around (sending a RR). @@ -1139,7 +1140,7 @@ const struct irlap_iter_state *iter = seq->private; const struct irlap_cb *self = v; - ASSERT(self->magic == LAP_MAGIC, return -EINVAL;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -EINVAL;); seq_printf(seq, "irlap%d ", iter->id); seq_printf(seq, "state: %s\n", diff -Nru a/net/irda/irlap_event.c b/net/irda/irlap_event.c --- a/net/irda/irlap_event.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irlap_event.c 2005-03-30 16:58:49 -08:00 @@ -169,8 +169,8 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_do_event(self, POLL_TIMER_EXPIRED, NULL, NULL); } @@ -183,8 +183,8 @@ */ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); #ifdef CONFIG_IRDA_FAST_RR /* @@ -346,12 +346,12 @@ discovery_t *discovery_rsp; int ret = 0; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case CONNECT_REQUEST: - ASSERT(self->netdev != NULL, return -1;); + IRDA_ASSERT(self->netdev != NULL, return -1;); if (self->media_busy) { /* Note : this will never happen, because we test @@ -389,10 +389,11 @@ } break; case DISCOVERY_REQUEST: - ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); if (self->media_busy) { - IRDA_DEBUG(0, "%s(), media busy!\n", __FUNCTION__); + IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", + __FUNCTION__); /* irlap->log.condition = MEDIA_BUSY; */ /* This will make IrLMP try again */ @@ -414,7 +415,7 @@ irlap_next_state(self, LAP_QUERY); break; case RECV_DISCOVERY_XID_CMD: - ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); /* Assert that this is not the final slot */ if (info->s <= info->S) { @@ -576,21 +577,21 @@ { int ret = 0; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case RECV_DISCOVERY_XID_RSP: - ASSERT(info != NULL, return -1;); - ASSERT(info->discovery != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info->discovery != NULL, return -1;); IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__, info->discovery->data.daddr); if (!self->discovery_log) { - WARNING("%s: discovery log is gone! " - "maybe the discovery timeout has been set to " - "short?\n", __FUNCTION__); + IRDA_WARNING("%s: discovery log is gone! " + "maybe the discovery timeout has been set" + " to short?\n", __FUNCTION__); break; } hashbin_insert(self->discovery_log, @@ -613,7 +614,7 @@ * Jean II */ - ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __FUNCTION__, info->s); @@ -690,8 +691,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case QUERY_TIMER_EXPIRED: @@ -700,7 +701,7 @@ irlap_next_state(self, LAP_NDM); break; case RECV_DISCOVERY_XID_CMD: - ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); /* Last frame? */ if (info->s == 0xff) { del_timer(&self->query_timer); @@ -757,14 +758,14 @@ IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case CONNECT_RESPONSE: skb_pull(skb, sizeof(struct snrm_frame)); - ASSERT(self->netdev != NULL, return -1;); + IRDA_ASSERT(self->netdev != NULL, return -1;); irlap_qos_negotiate(self, skb); @@ -851,8 +852,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case FINAL_TIMER_EXPIRED: @@ -880,8 +881,8 @@ case RECV_SNRM_CMD: IRDA_DEBUG(4, "%s(), SNRM battle!\n", __FUNCTION__); - ASSERT(skb != NULL, return 0;); - ASSERT(info != NULL, return 0;); + IRDA_ASSERT(skb != NULL, return 0;); + IRDA_ASSERT(info != NULL, return 0;); /* * The device with the largest device address wins the battle @@ -891,7 +892,7 @@ del_timer(&self->final_timer); irlap_initiate_connection_state(self); - ASSERT(self->netdev != NULL, return -1;); + IRDA_ASSERT(self->netdev != NULL, return -1;); skb_pull(skb, sizeof(struct snrm_frame)); @@ -923,11 +924,11 @@ irlap_initiate_connection_state(self); /* Negotiate connection parameters */ - ASSERT(skb->len > 10, return -1;); + IRDA_ASSERT(skb->len > 10, return -1;); skb_pull(skb, sizeof(struct ua_frame)); - ASSERT(self->netdev != NULL, return -1;); + IRDA_ASSERT(self->netdev != NULL, return -1;); irlap_qos_negotiate(self, skb); @@ -1158,8 +1159,8 @@ IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case RECV_UA_RSP: /* FALLTHROUGH */ @@ -1226,7 +1227,7 @@ */ self->fast_RR = FALSE; #endif /* CONFIG_IRDA_FAST_RR */ - ASSERT( info != NULL, return -1;); + IRDA_ASSERT( info != NULL, return -1;); ns_status = irlap_validate_ns_received(self, info->ns); nr_status = irlap_validate_nr_received(self, info->nr); @@ -1460,7 +1461,7 @@ /* Start poll timer */ irlap_start_poll_timer(self, self->poll_timeout); } else if (ret == NR_UNEXPECTED) { - ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); /* * Unexpected nr! */ @@ -1491,7 +1492,7 @@ } break; case RECV_RNR_RSP: - ASSERT(info != NULL, return -1;); + IRDA_ASSERT(info != NULL, return -1;); /* Stop final timer */ del_timer(&self->final_timer); @@ -1612,8 +1613,8 @@ IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case RESET_REQUEST: @@ -1659,8 +1660,8 @@ IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case RECV_DISC_CMD: @@ -1693,7 +1694,7 @@ if (self->retry_count < 3) { irlap_wait_min_turn_around(self, &self->qos_tx); - ASSERT(self->netdev != NULL, return -1;); + IRDA_ASSERT(self->netdev != NULL, return -1;); irlap_send_snrm_frame(self, self->qos_dev); self->retry_count++; /* Experimental!! */ @@ -1752,8 +1753,8 @@ IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); - ASSERT(self != NULL, return -ENODEV;); - ASSERT(self->magic == LAP_MAGIC, return -EBADR;); + IRDA_ASSERT(self != NULL, return -ENODEV;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); switch (event) { case SEND_I_CMD: @@ -1874,8 +1875,8 @@ IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); switch (event) { case RECV_I_CMD: /* Optimize for the common case */ @@ -2231,8 +2232,8 @@ IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -ENODEV;); - ASSERT(self->magic == LAP_MAGIC, return -EBADR;); + IRDA_ASSERT(self != NULL, return -ENODEV;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); switch (event) { case RECV_DISC_CMD: @@ -2304,8 +2305,8 @@ IRDA_DEBUG(1, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); - ASSERT(self != NULL, return -ENODEV;); - ASSERT(self->magic == LAP_MAGIC, return -EBADR;); + IRDA_ASSERT(self != NULL, return -ENODEV;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); switch (event) { case RESET_RESPONSE: diff -Nru a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c --- a/net/irda/irlap_frame.c 2005-03-30 16:58:47 -08:00 +++ b/net/irda/irlap_frame.c 2005-03-30 16:58:47 -08:00 @@ -113,8 +113,8 @@ struct snrm_frame *frame; int ret; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Allocate frame */ tx_skb = dev_alloc_skb(64); @@ -206,8 +206,8 @@ IRDA_DEBUG(2, "%s() <%ld>\n", __FUNCTION__, jiffies); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Allocate frame */ tx_skb = dev_alloc_skb(64); @@ -247,8 +247,8 @@ struct sk_buff *tx_skb = NULL; __u8 *frame; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); tx_skb = dev_alloc_skb(32); if (!tx_skb) @@ -279,8 +279,8 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); tx_skb = dev_alloc_skb(16); if (!tx_skb) @@ -311,9 +311,9 @@ IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __FUNCTION__, s, S, command); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(discovery != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(discovery != NULL, return;); tx_skb = dev_alloc_skb(64); if (!tx_skb) @@ -402,11 +402,11 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); if (!pskb_may_pull(skb, sizeof(struct xid_frame))) { - ERROR("%s: frame to short!\n", __FUNCTION__); + IRDA_ERROR("%s: frame to short!\n", __FUNCTION__); return; } @@ -423,7 +423,7 @@ } if ((discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { - WARNING("%s: kmalloc failed!\n", __FUNCTION__); + IRDA_WARNING("%s: kmalloc failed!\n", __FUNCTION__); return; } memset(discovery, 0, sizeof(discovery_t)); @@ -478,7 +478,7 @@ char *text; if (!pskb_may_pull(skb, sizeof(struct xid_frame))) { - ERROR("%s: frame to short!\n", __FUNCTION__); + IRDA_ERROR("%s: frame to short!\n", __FUNCTION__); return; } @@ -522,7 +522,8 @@ /* Check if things are sane at this point... */ if((discovery_info == NULL) || !pskb_may_pull(skb, 3)) { - ERROR("%s: discovery frame to short!\n", __FUNCTION__); + IRDA_ERROR("%s: discovery frame to short!\n", + __FUNCTION__); return; } @@ -531,7 +532,7 @@ */ discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC); if (!discovery) { - WARNING("%s: unable to malloc!\n", __FUNCTION__); + IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__); return; } @@ -861,9 +862,9 @@ { struct sk_buff *tx_skb = NULL; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* Is this reliable or unreliable data? */ if (skb->data[1] == I_FRAME) { @@ -967,8 +968,8 @@ struct sk_buff *skb; int count; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Initialize variables */ count = skb_queue_len(&self->wx_list); @@ -1023,7 +1024,7 @@ if ((skb_queue_len( &self->txq) > 0) && (self->window > 0)) { skb = skb_dequeue( &self->txq); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(skb != NULL, return;); /* * If send window > 1 then send frame with pf @@ -1047,8 +1048,8 @@ struct sk_buff *tx_skb; struct sk_buff *skb; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Resend unacknowledged frame(s) */ skb = skb_peek(&self->wx_list); @@ -1089,9 +1090,9 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* Insert connection address */ skb->data[0] = caddr | ((command) ? CMD_FRAME : 0); @@ -1168,13 +1169,13 @@ IRDA_DEBUG(0, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); - ASSERT(skb != NULL, return;); - ASSERT(info != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(info != NULL, return;); if (!pskb_may_pull(skb, 4)) { - ERROR("%s: frame to short!\n", __FUNCTION__); + IRDA_ERROR("%s: frame to short!\n", __FUNCTION__); return; } @@ -1263,7 +1264,7 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); if (!pskb_may_pull(skb, sizeof(*frame))) { - ERROR("%s: frame to short!\n", __FUNCTION__); + IRDA_ERROR("%s: frame to short!\n", __FUNCTION__); return; } frame = (struct test_frame *) skb->data; @@ -1330,14 +1331,14 @@ * share and non linear skbs. This should never happen, so * we don't need to be clever about it. Jean II */ if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { - ERROR("%s: can't clone shared skb!\n", __FUNCTION__); + IRDA_ERROR("%s: can't clone shared skb!\n", __FUNCTION__); dev_kfree_skb(skb); return -1; } /* Check if frame is large enough for parsing */ if (!pskb_may_pull(skb, 2)) { - ERROR("%s: frame to short!\n", __FUNCTION__); + IRDA_ERROR("%s: frame to short!\n", __FUNCTION__); dev_kfree_skb(skb); return -1; } @@ -1387,7 +1388,7 @@ irlap_recv_srej_frame(self, skb, &info, command); break; default: - WARNING("%s: Unknown S-frame %02x received!\n", + IRDA_WARNING("%s: Unknown S-frame %02x received!\n", __FUNCTION__, info.control); break; } @@ -1425,7 +1426,7 @@ irlap_recv_ui_frame(self, skb, &info); break; default: - WARNING("%s: Unknown frame %02x received!\n", + IRDA_WARNING("%s: Unknown frame %02x received!\n", __FUNCTION__, info.control); break; } diff -Nru a/net/irda/irlmp.c b/net/irda/irlmp.c --- a/net/irda/irlmp.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/irlmp.c 2005-03-30 16:58:50 -08:00 @@ -121,8 +121,8 @@ void __exit irlmp_cleanup(void) { /* Check for main structure */ - ASSERT(irlmp != NULL, return;); - ASSERT(irlmp->magic == LMP_MAGIC, return;); + IRDA_ASSERT(irlmp != NULL, return;); + IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return;); del_timer(&irlmp->discovery_timer); @@ -147,10 +147,10 @@ { struct lsap_cb *self; - ASSERT(notify != NULL, return NULL;); - ASSERT(irlmp != NULL, return NULL;); - ASSERT(irlmp->magic == LMP_MAGIC, return NULL;); - ASSERT(notify->instance != NULL, return NULL;); + IRDA_ASSERT(notify != NULL, return NULL;); + IRDA_ASSERT(irlmp != NULL, return NULL;); + IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return NULL;); + IRDA_ASSERT(notify->instance != NULL, return NULL;); /* Does the client care which Source LSAP selector it gets? */ if (slsap_sel == LSAP_ANY) { @@ -163,7 +163,7 @@ /* Allocate new instance of a LSAP connection */ self = kmalloc(sizeof(struct lsap_cb), GFP_ATOMIC); if (self == NULL) { - ERROR("%s: can't allocate memory\n", __FUNCTION__); + IRDA_ERROR("%s: can't allocate memory\n", __FUNCTION__); return NULL; } memset(self, 0, sizeof(struct lsap_cb)); @@ -204,8 +204,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); /* * Set some of the variables to preset values @@ -230,8 +230,8 @@ struct lap_cb *lap; struct lsap_cb *lsap = NULL; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); /* * Find out if we should remove this LSAP from a link or from the @@ -239,7 +239,7 @@ */ lap = self->lap; if (lap) { - ASSERT(lap->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); /* We might close a LSAP before it has completed the * connection setup. In those case, higher layers won't * send a proper disconnect request. Harmless, except @@ -282,16 +282,16 @@ { struct lap_cb *lap; - ASSERT(irlmp != NULL, return;); - ASSERT(irlmp->magic == LMP_MAGIC, return;); - ASSERT(notify != NULL, return;); + IRDA_ASSERT(irlmp != NULL, return;); + IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return;); + IRDA_ASSERT(notify != NULL, return;); /* * Allocate new instance of a LSAP connection */ lap = kmalloc(sizeof(struct lap_cb), GFP_KERNEL); if (lap == NULL) { - ERROR("%s: unable to kmalloc\n", __FUNCTION__); + IRDA_ERROR("%s: unable to kmalloc\n", __FUNCTION__); return; } memset(lap, 0, sizeof(struct lap_cb)); @@ -305,7 +305,7 @@ #endif lap->lsaps = hashbin_new(HB_LOCK); if (lap->lsaps == NULL) { - WARNING("%s(), unable to kmalloc lsaps\n", __FUNCTION__); + IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __FUNCTION__); kfree(lap); return; } @@ -344,7 +344,7 @@ * will be triggered anymore. Jean II */ link = hashbin_remove(irlmp->links, saddr, NULL); if (link) { - ASSERT(link->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(link->magic == LMP_LAP_MAGIC, return;); /* Kill all the LSAPs on this link. Jean II */ link->reason = LAP_DISC_INDICATION; @@ -376,8 +376,8 @@ struct lsap_cb *lsap; int ret; - ASSERT(self != NULL, return -EBADR;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;); + IRDA_ASSERT(self != NULL, return -EBADR;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;); IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", @@ -404,7 +404,7 @@ } /* Make room for MUX control header (3 bytes) */ - ASSERT(skb_headroom(tx_skb) >= LMP_CONTROL_HEADER, return -1;); + IRDA_ASSERT(skb_headroom(tx_skb) >= LMP_CONTROL_HEADER, return -1;); skb_push(tx_skb, LMP_CONTROL_HEADER); self->dlsap_sel = dlsap_sel; @@ -473,10 +473,10 @@ */ lsap = hashbin_remove(irlmp->unconnected_lsaps, (long) self, NULL); - ASSERT(lsap != NULL, return -1;); - ASSERT(lsap->magic == LMP_LSAP_MAGIC, return -1;); - ASSERT(lsap->lap != NULL, return -1;); - ASSERT(lsap->lap->magic == LMP_LAP_MAGIC, return -1;); + IRDA_ASSERT(lsap != NULL, return -1;); + IRDA_ASSERT(lsap->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(lsap->lap != NULL, return -1;); + IRDA_ASSERT(lsap->lap->magic == LMP_LAP_MAGIC, return -1;); hashbin_insert(self->lap->lsaps, (irda_queue_t *) self, (long) self, NULL); @@ -516,10 +516,10 @@ int lap_header_size; int max_header_size; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); - ASSERT(skb != NULL, return;); - ASSERT(self->lap != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(self->lap != NULL, return;); IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", __FUNCTION__, self->slsap_sel, self->dlsap_sel); @@ -555,9 +555,9 @@ */ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata) { - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); - ASSERT(userdata != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(userdata != NULL, return -1;); /* We set the connected bit and move the lsap to the connected list * in the state machine itself. Jean II */ @@ -566,7 +566,7 @@ __FUNCTION__, self->slsap_sel, self->dlsap_sel); /* Make room for MUX control header (3 bytes) */ - ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); + IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); skb_push(userdata, LMP_CONTROL_HEADER); irlmp_do_lsap_event(self, LM_CONNECT_RESPONSE, userdata); @@ -591,10 +591,10 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(skb != NULL, return;); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); - ASSERT(self->lap != NULL, return;); + IRDA_ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(self->lap != NULL, return;); self->qos = *self->lap->qos; @@ -687,9 +687,9 @@ { struct lsap_cb *lsap; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); - ASSERT(userdata != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(userdata != NULL, return -1;); /* Already disconnected ? * There is a race condition between irlmp_disconnect_indication() @@ -716,18 +716,18 @@ * Remove LSAP from list of connected LSAPs for the particular link * and insert it into the list of unconnected LSAPs */ - ASSERT(self->lap != NULL, return -1;); - ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); - ASSERT(self->lap->lsaps != NULL, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); + IRDA_ASSERT(self->lap->lsaps != NULL, return -1;); lsap = hashbin_remove(self->lap->lsaps, (long) self, NULL); #ifdef CONFIG_IRDA_CACHE_LAST_LSAP self->lap->cache.valid = FALSE; #endif - ASSERT(lsap != NULL, return -1;); - ASSERT(lsap->magic == LMP_LSAP_MAGIC, return -1;); - ASSERT(lsap == self, return -1;); + IRDA_ASSERT(lsap != NULL, return -1;); + IRDA_ASSERT(lsap->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(lsap == self, return -1;); hashbin_insert(irlmp->unconnected_lsaps, (irda_queue_t *) self, (long) self, NULL); @@ -751,8 +751,8 @@ struct lsap_cb *lsap; IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", __FUNCTION__, self->slsap_sel, self->dlsap_sel); @@ -769,16 +769,16 @@ /* * Remove association between this LSAP and the link it used */ - ASSERT(self->lap != NULL, return;); - ASSERT(self->lap->lsaps != NULL, return;); + IRDA_ASSERT(self->lap != NULL, return;); + IRDA_ASSERT(self->lap->lsaps != NULL, return;); lsap = hashbin_remove(self->lap->lsaps, (long) self, NULL); #ifdef CONFIG_IRDA_CACHE_LAST_LSAP self->lap->cache.valid = FALSE; #endif - ASSERT(lsap != NULL, return;); - ASSERT(lsap == self, return;); + IRDA_ASSERT(lsap != NULL, return;); + IRDA_ASSERT(lsap == self, return;); hashbin_insert(irlmp->unconnected_lsaps, (irda_queue_t *) lsap, (long) lsap, NULL); @@ -822,7 +822,7 @@ */ lap = (struct lap_cb *) hashbin_get_first(irlmp->links); while (lap != NULL) { - ASSERT(lap->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); if (lap->lap_state == LAP_STANDBY) { /* Expire discoveries discovered on this link */ @@ -846,8 +846,8 @@ /* Make sure the value is sane */ if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){ - WARNING("%s: invalid value for number of slots!\n", - __FUNCTION__); + IRDA_WARNING("%s: invalid value for number of slots!\n", + __FUNCTION__); nslots = sysctl_discovery_slots = 8; } @@ -870,7 +870,7 @@ */ lap = (struct lap_cb *) hashbin_get_first(irlmp->links); while (lap != NULL) { - ASSERT(lap->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); if (lap->lap_state == LAP_STANDBY) { /* Try to discover */ @@ -1017,7 +1017,7 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(log != NULL, return;); + IRDA_ASSERT(log != NULL, return;); if (!(HASHBIN_GET_SIZE(log))) return; @@ -1052,7 +1052,7 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - ASSERT(expiries != NULL, return;); + IRDA_ASSERT(expiries != NULL, return;); /* For each client - notify callback may touch client list */ client = (irlmp_client_t *) hashbin_get_first(irlmp->clients); @@ -1085,7 +1085,7 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(irlmp != NULL, return NULL;); + IRDA_ASSERT(irlmp != NULL, return NULL;); u16ho(irlmp->discovery_rsp.data.hints) = irlmp->hints.word; @@ -1120,11 +1120,11 @@ { int ret; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); /* Make room for MUX header */ - ASSERT(skb_headroom(userdata) >= LMP_HEADER, return -1;); + IRDA_ASSERT(skb_headroom(userdata) >= LMP_HEADER, return -1;); skb_push(userdata, LMP_HEADER); ret = irlmp_do_lsap_event(self, LM_DATA_REQUEST, userdata); @@ -1163,10 +1163,10 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(userdata != NULL, return -1;); + IRDA_ASSERT(userdata != NULL, return -1;); /* Make room for MUX header */ - ASSERT(skb_headroom(userdata) >= LMP_HEADER, return -1;); + IRDA_ASSERT(skb_headroom(userdata) >= LMP_HEADER, return -1;); skb_push(userdata, LMP_HEADER); ret = irlmp_do_lsap_event(self, LM_UDATA_REQUEST, userdata); @@ -1187,9 +1187,9 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* Hide LMP header from layer above */ skb_pull(skb, LMP_HEADER); @@ -1214,11 +1214,11 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(userdata != NULL, return -1;); + IRDA_ASSERT(userdata != NULL, return -1;); /* Make room for MUX and PID header */ - ASSERT(skb_headroom(userdata) >= LMP_HEADER+LMP_PID_HEADER, - return -1;); + IRDA_ASSERT(skb_headroom(userdata) >= LMP_HEADER+LMP_PID_HEADER, + return -1;); /* Insert protocol identifier */ skb_push(userdata, LMP_PID_HEADER); @@ -1234,7 +1234,7 @@ /* Try to send Connectionless packets out on all links */ lap = (struct lap_cb *) hashbin_get_first(irlmp->links); while (lap != NULL) { - ASSERT(lap->magic == LMP_LAP_MAGIC, return -1;); + IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return -1;); clone_skb = skb_clone(userdata, GFP_ATOMIC); if (!clone_skb) { @@ -1265,9 +1265,9 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* Hide LMP and PID header from layer above */ skb_pull(skb, LMP_HEADER+LMP_PID_HEADER); @@ -1298,7 +1298,7 @@ curr = (struct lsap_cb *) hashbin_get_first( self->lsaps); while (NULL != hashbin_find_next(self->lsaps, (long) curr, NULL, (void *) &next) ) { - ASSERT(curr->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(curr->magic == LMP_LSAP_MAGIC, return;); /* * Inform service user if he has requested it */ @@ -1328,8 +1328,8 @@ struct lsap_cb *curr; int lsap_todo; - ASSERT(self->magic == LMP_LAP_MAGIC, return;); - ASSERT(flow == FLOW_START, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(flow == FLOW_START, return;); /* Get the number of lsap. That's the only safe way to know * that we have looped around... - Jean II */ @@ -1559,7 +1559,7 @@ irlmp_client_t *client; IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(irlmp != NULL, return NULL;); + IRDA_ASSERT(irlmp != NULL, return NULL;); /* Make a new registration */ client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); @@ -1660,9 +1660,9 @@ struct lap_cb *lap; unsigned long flags; - ASSERT(irlmp != NULL, return TRUE;); - ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); - ASSERT(slsap_sel != LSAP_ANY, return TRUE;); + IRDA_ASSERT(irlmp != NULL, return TRUE;); + IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); + IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__); @@ -1684,7 +1684,7 @@ spin_lock_irqsave(&irlmp->links->hb_spinlock, flags); lap = (struct lap_cb *) hashbin_get_first(irlmp->links); while (lap != NULL) { - ASSERT(lap->magic == LMP_LAP_MAGIC, goto errlap;); + IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, goto errlap;); /* Careful for priority inversions here ! * irlmp->links is never taken while another IrDA @@ -1694,7 +1694,8 @@ /* For this IrLAP, check all the LSAPs */ self = (struct lsap_cb *) hashbin_get_first(lap->lsaps); while (self != NULL) { - ASSERT(self->magic == LMP_LSAP_MAGIC, goto errlsap;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, + goto errlsap;); if ((self->slsap_sel == slsap_sel)) { IRDA_DEBUG(4, "Source LSAP selector=%02x in use\n", @@ -1720,7 +1721,7 @@ self = (struct lsap_cb *) hashbin_get_first(irlmp->unconnected_lsaps); while (self != NULL) { - ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;); if ((self->slsap_sel == slsap_sel)) { IRDA_DEBUG(4, "Source LSAP selector=%02x in use (unconnected)\n", self->slsap_sel); @@ -1737,7 +1738,7 @@ * Jean II */ errlsap: spin_unlock(&lap->lsaps->hb_spinlock); -errlap: +IRDA_ASSERT_LABEL(errlap:) spin_unlock_irqrestore(&irlmp->links->hb_spinlock, flags); return TRUE; @@ -1759,8 +1760,8 @@ __u8 lsap_sel; int wrapped = 0; - ASSERT(irlmp != NULL, return -1;); - ASSERT(irlmp->magic == LMP_MAGIC, return -1;); + IRDA_ASSERT(irlmp != NULL, return -1;); + IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return -1;); /* Most users don't really care which LSAPs they are given, * and therefore we automatically give them a free LSAP. @@ -1788,8 +1789,8 @@ /* Make sure we terminate the loop */ if (wrapped++) { - ERROR("%s: no more free LSAPs !\n", - __FUNCTION__); + IRDA_ERROR("%s: no more free LSAPs !\n", + __FUNCTION__); return 0; } } @@ -1948,7 +1949,7 @@ seq_puts(seq, "\nRegistered Link Layers:\n"); else if (iter->hashbin == irlmp->unconnected_lsaps) { self = v; - ASSERT(self->magic == LMP_LSAP_MAGIC, return -EINVAL; ); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -EINVAL; ); seq_printf(seq, "lsap state: %s, ", irlsap_state[ self->lsap_state]); seq_printf(seq, @@ -1977,7 +1978,8 @@ for (self = (struct lsap_cb *) hashbin_get_first(lap->lsaps); self != NULL; self = (struct lsap_cb *)hashbin_get_next(lap->lsaps)) { - ASSERT(self->magic == LMP_LSAP_MAGIC, break;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, + goto outloop;); seq_printf(seq, " lsap state: %s, ", irlsap_state[ self->lsap_state]); seq_printf(seq, @@ -1987,6 +1989,7 @@ seq_putc(seq, '\n'); } + IRDA_ASSERT_LABEL(outloop:) spin_unlock(&lap->lsaps->hb_spinlock); seq_putc(seq, '\n'); } else @@ -2008,7 +2011,7 @@ int rc = -ENOMEM; struct irlmp_iter_state *s; - ASSERT(irlmp != NULL, return -EINVAL;); + IRDA_ASSERT(irlmp != NULL, return -EINVAL;); s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) diff -Nru a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c --- a/net/irda/irlmp_event.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/irlmp_event.c 2005-03-30 16:58:50 -08:00 @@ -130,7 +130,7 @@ LSAP_STATE state) { /* - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __FUNCTION__, irlsap_state[state]); */ self->lsap_state = state; @@ -140,8 +140,8 @@ int irlmp_do_lsap_event(struct lsap_cb *self, IRLMP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __FUNCTION__, irlmp_event[event], irlsap_state[ self->lsap_state]); @@ -158,8 +158,8 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event, struct sk_buff *skb) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __FUNCTION__, irlmp_event[event], @@ -189,8 +189,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); irlmp_do_lsap_event(self, LM_WATCHDOG_TIMEOUT, NULL); } @@ -201,8 +201,8 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); irlmp_do_lap_event(self, LM_LAP_IDLE_TIMEOUT, NULL); } @@ -260,7 +260,7 @@ struct sk_buff *skb) { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self->irlap != NULL, return;); + IRDA_ASSERT(self->irlap != NULL, return;); switch (event) { case LM_LAP_DISCOVERY_REQUEST: @@ -495,8 +495,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); switch (event) { #ifdef CONFIG_IRDA_ULTRA @@ -511,8 +511,8 @@ IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __FUNCTION__); if (self->conn_skb) { - WARNING("%s: busy with another request!\n", - __FUNCTION__); + IRDA_WARNING("%s: busy with another request!\n", + __FUNCTION__); return -EBUSY; } /* Don't forget to refcount it (see irlmp_connect_request()) */ @@ -528,8 +528,8 @@ break; case LM_CONNECT_INDICATION: if (self->conn_skb) { - WARNING("%s: busy with another request!\n", - __FUNCTION__); + IRDA_WARNING("%s: busy with another request!\n", + __FUNCTION__); return -EBUSY; } /* Don't forget to refcount it (see irlap_driver_rcv()) */ @@ -575,8 +575,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); switch (event) { case LM_CONNECT_RESPONSE: @@ -587,9 +587,9 @@ lsap = hashbin_remove(irlmp->unconnected_lsaps, (long) self, NULL); - ASSERT(lsap == self, return -1;); - ASSERT(self->lap != NULL, return -1;); - ASSERT(self->lap->lsaps != NULL, return -1;); + IRDA_ASSERT(lsap == self, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap->lsaps != NULL, return -1;); hashbin_insert(self->lap->lsaps, (irda_queue_t *) self, (long) self, NULL); @@ -637,8 +637,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); switch (event) { case LM_CONNECT_REQUEST: @@ -703,9 +703,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); - ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); switch (event) { case LM_DATA_REQUEST: /* Optimize for the common case */ @@ -716,7 +716,7 @@ irlmp_data_indication(self, skb); break; case LM_UDATA_REQUEST: - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); irlmp_send_data_pdu(self->lap, self->dlsap_sel, self->slsap_sel, TRUE, skb); break; @@ -759,11 +759,11 @@ case LM_DISCONNECT_INDICATION: irlmp_next_lsap_state(self, LSAP_DISCONNECTED); - ASSERT(self->lap != NULL, return -1;); - ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); - ASSERT(skb->len > 3, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb->len > 3, return -1;); reason = skb->data[3]; /* Try to close the LAP connection */ @@ -793,8 +793,8 @@ LM_REASON reason; int ret = 0; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__); @@ -809,11 +809,11 @@ case LM_DISCONNECT_INDICATION: irlmp_next_lsap_state(self, LSAP_DISCONNECTED); - ASSERT(self->lap != NULL, return -1;); - ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); - ASSERT(skb->len > 3, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(skb->len > 3, return -1;); reason = skb->data[3]; /* Try to close the LAP connection */ @@ -827,8 +827,8 @@ del_timer(&self->watchdog_timer); - ASSERT(self->lap != NULL, return -1;); - ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;); reason = irlmp_convert_lap_reason(self->lap->reason); @@ -837,7 +837,7 @@ case LM_WATCHDOG_TIMEOUT: IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__); - ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); irlmp_next_lsap_state(self, LSAP_DISCONNECTED); @@ -868,12 +868,12 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(irlmp != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(irlmp != NULL, return -1;); switch (event) { case LM_LAP_CONNECT_CONFIRM: - ASSERT(self->conn_skb != NULL, return -1;); + IRDA_ASSERT(self->conn_skb != NULL, return -1;); tx_skb = self->conn_skb; self->conn_skb = NULL; @@ -888,7 +888,7 @@ case LM_WATCHDOG_TIMEOUT: IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __FUNCTION__); - ASSERT(self->lap != NULL, return -1;); + IRDA_ASSERT(self->lap != NULL, return -1;); irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); irlmp_next_lsap_state(self, LSAP_DISCONNECTED); diff -Nru a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c --- a/net/irda/irlmp_frame.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irlmp_frame.c 2005-03-30 16:58:49 -08:00 @@ -63,9 +63,9 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); frame = skb->data; @@ -98,9 +98,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); - ASSERT(skb->len > 2, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(skb->len > 2, return;); fp = skb->data; @@ -209,9 +209,9 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); - ASSERT(skb->len > 2, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(skb->len > 2, return;); fp = skb->data; @@ -273,8 +273,8 @@ { IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(lap != NULL, return;); - ASSERT(lap->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(lap != NULL, return;); + IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); lap->reason = reason; lap->daddr = DEV_ADDR_ANY; @@ -304,7 +304,7 @@ /* Update destination device address */ self->daddr = daddr; - ASSERT(self->saddr == saddr, return;); + IRDA_ASSERT(self->saddr == saddr, return;); irlmp_do_lap_event(self, LM_LAP_CONNECT_INDICATION, skb); } @@ -320,9 +320,9 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); - ASSERT(qos != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(qos != NULL, return;); /* Don't need use the skb for now */ @@ -363,8 +363,8 @@ void irlmp_link_discovery_indication(struct lap_cb *self, discovery_t *discovery) { - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); /* Add to main log, cleanup */ irlmp_add_discovery(irlmp->cachelog, discovery); @@ -386,8 +386,8 @@ { IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == LMP_LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); /* Add to main log, cleanup */ irlmp_add_discovery_log(irlmp->cachelog, log); diff -Nru a/net/irda/irqueue.c b/net/irda/irqueue.c --- a/net/irda/irqueue.c 2005-03-30 16:58:47 -08:00 +++ b/net/irda/irqueue.c 2005-03-30 16:58:47 -08:00 @@ -391,8 +391,8 @@ unsigned long flags = 0; int i; - ASSERT(hashbin != NULL, return -1;); - ASSERT(hashbin->magic == HB_MAGIC, return -1;); + IRDA_ASSERT(hashbin != NULL, return -1;); + IRDA_ASSERT(hashbin->magic == HB_MAGIC, return -1;); /* Synchronize */ if ( hashbin->hb_type & HB_LOCK ) { @@ -447,8 +447,8 @@ IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); - ASSERT( hashbin != NULL, return;); - ASSERT( hashbin->magic == HB_MAGIC, return;); + IRDA_ASSERT( hashbin != NULL, return;); + IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;); /* * Locate hashbin @@ -560,8 +560,8 @@ IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); - ASSERT( hashbin != NULL, return NULL;); - ASSERT( hashbin->magic == HB_MAGIC, return NULL;); + IRDA_ASSERT( hashbin != NULL, return NULL;); + IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); /* * Locate hashbin @@ -653,9 +653,9 @@ IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); - ASSERT( hashbin != NULL, return NULL;); - ASSERT( hashbin->magic == HB_MAGIC, return NULL;); - ASSERT( entry != NULL, return NULL;); + IRDA_ASSERT( hashbin != NULL, return NULL;); + IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); + IRDA_ASSERT( entry != NULL, return NULL;); /* Synchronize */ if ( hashbin->hb_type & HB_LOCK ) { @@ -714,8 +714,8 @@ IRDA_DEBUG( 4, "hashbin_find()\n"); - ASSERT( hashbin != NULL, return NULL;); - ASSERT( hashbin->magic == HB_MAGIC, return NULL;); + IRDA_ASSERT( hashbin != NULL, return NULL;); + IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); /* * Locate hashbin @@ -836,8 +836,8 @@ irda_queue_t *entry; int i; - ASSERT( hashbin != NULL, return NULL;); - ASSERT( hashbin->magic == HB_MAGIC, return NULL;); + IRDA_ASSERT( hashbin != NULL, return NULL;); + IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); if ( hashbin == NULL) return NULL; @@ -872,11 +872,11 @@ int bin; int i; - ASSERT( hashbin != NULL, return NULL;); - ASSERT( hashbin->magic == HB_MAGIC, return NULL;); + IRDA_ASSERT( hashbin != NULL, return NULL;); + IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); if ( hashbin->hb_current == NULL) { - ASSERT( hashbin->hb_current != NULL, return NULL;); + IRDA_ASSERT( hashbin->hb_current != NULL, return NULL;); return NULL; } entry = hashbin->hb_current->q_next; diff -Nru a/net/irda/irttp.c b/net/irda/irttp.c --- a/net/irda/irttp.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/irttp.c 2005-03-30 16:58:49 -08:00 @@ -98,7 +98,8 @@ irttp->tsaps = hashbin_new(HB_LOCK); if (!irttp->tsaps) { - ERROR("%s: can't allocate IrTTP hashbin!\n", __FUNCTION__); + IRDA_ERROR("%s: can't allocate IrTTP hashbin!\n", + __FUNCTION__); return -ENOMEM; } @@ -114,8 +115,8 @@ void __exit irttp_cleanup(void) { /* Check for main structure */ - ASSERT(irttp != NULL, return;); - ASSERT(irttp->magic == TTP_MAGIC, return;); + IRDA_ASSERT(irttp != NULL, return;); + IRDA_ASSERT(irttp->magic == TTP_MAGIC, return;); /* * Delete hashbin and close all TSAP instances in it @@ -210,8 +211,8 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); /* Deallocate frames waiting to be sent */ while ((skb = skb_dequeue(&self->tx_queue)) != NULL) @@ -238,8 +239,8 @@ struct sk_buff *skb, *frag; int n = 0; /* Fragment index */ - ASSERT(self != NULL, return NULL;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); + IRDA_ASSERT(self != NULL, return NULL;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __FUNCTION__, self->rx_sdu_size); @@ -274,7 +275,7 @@ * droped the last fragment (when self->rx_sdu_size exceed * self->rx_max_sdu_size), where n < self->rx_sdu_size. * Jean II */ - ASSERT(n <= self->rx_sdu_size, n = self->rx_sdu_size;); + IRDA_ASSERT(n <= self->rx_sdu_size, n = self->rx_sdu_size;); /* Set the new length */ skb_trim(skb, n); @@ -298,9 +299,9 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); /* * Split frame into a number of segments @@ -353,8 +354,8 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); if (get) param->pv.i = self->tx_max_sdu_size; @@ -381,8 +382,8 @@ struct lsap_cb *lsap; notify_t ttp_notify; - ASSERT(irttp != NULL, return NULL;); - ASSERT(irttp->magic == TTP_MAGIC, return NULL;); + IRDA_ASSERT(irttp != NULL, return NULL;); + IRDA_ASSERT(irttp->magic == TTP_MAGIC, return NULL;); /* The IrLMP spec (IrLMP 1.1 p10) says that we have the right to * use only 0x01-0x6F. Of course, we can use LSAP_ANY as well. @@ -430,7 +431,7 @@ */ lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); if (lsap == NULL) { - WARNING("%s: unable to allocate LSAP!!\n", __FUNCTION__); + IRDA_WARNING("%s: unable to allocate LSAP!!\n", __FUNCTION__); return NULL; } @@ -466,8 +467,8 @@ static void __irttp_close_tsap(struct tsap_cb *self) { /* First make sure we're connected. */ - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); irttp_flush_queues(self); @@ -500,14 +501,15 @@ IRDA_DEBUG(4, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); /* Make sure tsap has been disconnected */ if (self->connected) { /* Check if disconnect is not pending */ if (!test_bit(0, &self->disconnect_pend)) { - WARNING("%s: TSAP still connected!\n", __FUNCTION__); + IRDA_WARNING("%s: TSAP still connected!\n", + __FUNCTION__); irttp_disconnect_request(self, NULL, P_NORMAL); } self->close_pend = TRUE; @@ -518,7 +520,7 @@ tsap = hashbin_remove(irttp->tsaps, (long) self, NULL); - ASSERT(tsap == self, return -1;); + IRDA_ASSERT(tsap == self, return -1;); /* Close corresponding LSAP */ if (self->lsap) { @@ -540,9 +542,9 @@ */ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) { - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__); @@ -582,16 +584,16 @@ __u8 *frame; int ret; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__, skb_queue_len(&self->tx_queue)); /* Check that nothing bad happens */ if ((skb->len == 0) || (!self->connected)) { - WARNING("%s: No data, or not connected\n", __FUNCTION__); + IRDA_WARNING("%s: No data, or not connected\n", __FUNCTION__); ret = -ENOTCONN; goto err; } @@ -601,8 +603,8 @@ * inside an IrLAP frame */ if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) { - ERROR("%s: SAR disabled, and data is to large for IrLAP!\n", - __FUNCTION__); + IRDA_ERROR("%s: SAR disabled, and data is to large for IrLAP!\n", + __FUNCTION__); ret = -EMSGSIZE; goto err; } @@ -615,8 +617,8 @@ (self->tx_max_sdu_size != TTP_SAR_UNBOUND) && (skb->len > self->tx_max_sdu_size)) { - ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n", - __FUNCTION__); + IRDA_ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n", + __FUNCTION__); ret = -EMSGSIZE; goto err; } @@ -638,7 +640,7 @@ /* Queue frame, or queue frame segments */ if ((self->tx_max_sdu_size == 0) || (skb->len < self->max_seg_size)) { /* Queue frame */ - ASSERT(skb_headroom(skb) >= TTP_HEADER, return -1;); + IRDA_ASSERT(skb_headroom(skb) >= TTP_HEADER, return -1;); frame = skb_push(skb, TTP_HEADER); frame[0] = 0x00; /* Clear more bit */ @@ -800,8 +802,8 @@ unsigned long flags; int n; - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__, @@ -857,9 +859,9 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); - ASSERT(skb != NULL, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(skb != NULL, return -1;); self->stats.rx_packets++; @@ -974,8 +976,8 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); /* Check if client has already closed the TSAP and gone away */ if (self->close_pend) @@ -1003,8 +1005,8 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self); @@ -1046,8 +1048,8 @@ { IRDA_DEBUG(1, "%s()\n", __FUNCTION__); - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); switch (flow) { case FLOW_STOP: @@ -1086,8 +1088,8 @@ IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __FUNCTION__, max_sdu_size); - ASSERT(self != NULL, return -EBADR;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); + IRDA_ASSERT(self != NULL, return -EBADR;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); if (self->connected) { if(userdata) @@ -1109,8 +1111,8 @@ * Check that the client has reserved enough space for * headers */ - ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER, - { dev_kfree_skb(userdata); return -1; } ); + IRDA_ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER, + { dev_kfree_skb(userdata); return -1; } ); } /* Initialize connection parameters */ @@ -1138,8 +1140,8 @@ /* SAR enabled? */ if (max_sdu_size > 0) { - ASSERT(skb_headroom(tx_skb) >= (TTP_MAX_HEADER + TTP_SAR_HEADER), - { dev_kfree_skb(tx_skb); return -1; } ); + IRDA_ASSERT(skb_headroom(tx_skb) >= (TTP_MAX_HEADER + TTP_SAR_HEADER), + { dev_kfree_skb(tx_skb); return -1; } ); /* Insert SAR parameters */ frame = skb_push(tx_skb, TTP_HEADER+TTP_SAR_HEADER); @@ -1185,9 +1187,9 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); self->max_seg_size = max_seg_size - TTP_HEADER; self->max_header_size = max_header_size + TTP_HEADER; @@ -1213,7 +1215,7 @@ parameters = skb->data[0] & 0x80; - ASSERT(skb->len >= TTP_HEADER, return;); + IRDA_ASSERT(skb->len >= TTP_HEADER, return;); skb_pull(skb, TTP_HEADER); if (parameters) { @@ -1225,8 +1227,8 @@ /* Any errors in the parameter list? */ if (ret < 0) { - WARNING("%s: error extracting parameters\n", - __FUNCTION__); + IRDA_WARNING("%s: error extracting parameters\n", + __FUNCTION__); dev_kfree_skb(skb); /* Do not accept this connection attempt */ @@ -1269,9 +1271,9 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); - ASSERT(skb != NULL, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(skb != NULL, return;); lsap = (struct lsap_cb *) sap; @@ -1290,7 +1292,7 @@ parameters = skb->data[0] & 0x80; - ASSERT(skb->len >= TTP_HEADER, return;); + IRDA_ASSERT(skb->len >= TTP_HEADER, return;); skb_pull(skb, TTP_HEADER); if (parameters) { @@ -1302,8 +1304,8 @@ /* Any errors in the parameter list? */ if (ret < 0) { - WARNING("%s: error extracting parameters\n", - __FUNCTION__); + IRDA_WARNING("%s: error extracting parameters\n", + __FUNCTION__); dev_kfree_skb(skb); /* Do not accept this connection attempt */ @@ -1337,8 +1339,8 @@ int ret; __u8 n; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __FUNCTION__, self->stsap_sel); @@ -1357,8 +1359,8 @@ * Check that the client has reserved enough space for * headers */ - ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER, - { dev_kfree_skb(userdata); return -1; } ); + IRDA_ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER, + { dev_kfree_skb(userdata); return -1; } ); } self->avail_credit = 0; @@ -1380,8 +1382,8 @@ /* SAR enabled? */ if (max_sdu_size > 0) { - ASSERT(skb_headroom(tx_skb) >= (TTP_MAX_HEADER + TTP_SAR_HEADER), - { dev_kfree_skb(tx_skb); return -1; } ); + IRDA_ASSERT(skb_headroom(tx_skb) >= (TTP_MAX_HEADER + TTP_SAR_HEADER), + { dev_kfree_skb(tx_skb); return -1; } ); /* Insert TTP header with SAR parameters */ frame = skb_push(tx_skb, TTP_HEADER+TTP_SAR_HEADER); @@ -1481,8 +1483,8 @@ { int ret; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); /* Already disconnected? */ if (!self->connected) { @@ -1579,8 +1581,8 @@ self = (struct tsap_cb *) instance; - ASSERT(self != NULL, return;); - ASSERT(self->magic == TTP_TSAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); /* Prevent higher layer to send more data */ self->connected = FALSE; @@ -1879,7 +1881,7 @@ int rc = -ENOMEM; struct irttp_iter_state *s; - ASSERT(irttp != NULL, return -EINVAL;); + IRDA_ASSERT(irttp != NULL, return -EINVAL;); s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) diff -Nru a/net/irda/parameters.c b/net/irda/parameters.c --- a/net/irda/parameters.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/parameters.c 2005-03-30 16:58:49 -08:00 @@ -160,7 +160,8 @@ } /* Check if buffer is long enough for insertion */ if (len < (2+p.pl)) { - WARNING("%s: buffer to short for insertion!\n", __FUNCTION__); + IRDA_WARNING("%s: buffer to short for insertion!\n", + __FUNCTION__); return -1; } IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, @@ -185,7 +186,8 @@ break; default: - WARNING("%s: length %d not supported\n", __FUNCTION__, p.pl); + IRDA_WARNING("%s: length %d not supported\n", + __FUNCTION__, p.pl); /* Skip parameter */ return -1; } @@ -214,9 +216,9 @@ /* Check if buffer is long enough for parsing */ if (len < (2+p.pl)) { - WARNING("%s: buffer to short for parsing! " - "Need %d bytes, but len is only %d\n", - __FUNCTION__, p.pl, len); + IRDA_WARNING("%s: buffer to short for parsing! " + "Need %d bytes, but len is only %d\n", + __FUNCTION__, p.pl, len); return -1; } @@ -226,9 +228,9 @@ * PV_INTEGER means that the handler is flexible. */ if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) { - ERROR("%s: invalid parameter length! " - "Expected %d bytes, but value had %d bytes!\n", - __FUNCTION__, type & PV_MASK, p.pl); + IRDA_ERROR("%s: invalid parameter length! " + "Expected %d bytes, but value had %d bytes!\n", + __FUNCTION__, type & PV_MASK, p.pl); /* Most parameters are bit/byte fields or little endian, * so it's ok to only extract a subset of it (the subset @@ -265,7 +267,8 @@ le32_to_cpus(&p.pv.i); break; default: - WARNING("%s: length %d not supported\n", __FUNCTION__, p.pl); + IRDA_WARNING("%s: length %d not supported\n", + __FUNCTION__, p.pl); /* Skip parameter */ return p.pl+2; @@ -301,9 +304,9 @@ /* Check if buffer is long enough for parsing */ if (len < (2+p.pl)) { - WARNING("%s: buffer to short for parsing! " - "Need %d bytes, but len is only %d\n", - __FUNCTION__, p.pl, len); + IRDA_WARNING("%s: buffer to short for parsing! " + "Need %d bytes, but len is only %d\n", + __FUNCTION__, p.pl, len); return -1; } @@ -340,9 +343,9 @@ /* Check if buffer is long enough for parsing */ if (len < (2+p.pl)) { - WARNING("%s: buffer to short for parsing! " - "Need %d bytes, but len is only %d\n", - __FUNCTION__, p.pl, len); + IRDA_WARNING("%s: buffer to short for parsing! " + "Need %d bytes, but len is only %d\n", + __FUNCTION__, p.pl, len); return -1; } @@ -459,8 +462,8 @@ int ret = -1; int n = 0; - ASSERT(buf != NULL, return ret;); - ASSERT(info != 0, return ret;); + IRDA_ASSERT(buf != NULL, return ret;); + IRDA_ASSERT(info != 0, return ret;); pi_minor = pi & info->pi_mask; pi_major = pi >> info->pi_major_offset; @@ -484,7 +487,7 @@ /* Check if handler has been implemented */ if (!pi_minor_info->func) { - MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi); + IRDA_MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi); /* Skip this parameter */ return -1; } @@ -513,8 +516,8 @@ int ret = -1; int n = 0; - ASSERT(buf != NULL, return ret;); - ASSERT(info != 0, return ret;); + IRDA_ASSERT(buf != NULL, return ret;); + IRDA_ASSERT(info != 0, return ret;); pi_minor = buf[n] & info->pi_mask; pi_major = buf[n] >> info->pi_major_offset; @@ -541,7 +544,8 @@ /* Check if handler has been implemented */ if (!pi_minor_info->func) { - MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, buf[n]); + IRDA_MESSAGE("%s: no handler for pi=%#x\n", + __FUNCTION__, buf[n]); /* Skip this parameter */ return 2 + buf[n + 1]; /* Continue */ } @@ -565,8 +569,8 @@ int ret = -1; int n = 0; - ASSERT(buf != NULL, return ret;); - ASSERT(info != 0, return ret;); + IRDA_ASSERT(buf != NULL, return ret;); + IRDA_ASSERT(info != 0, return ret;); /* * Parse all parameters. Each parameter must be at least two bytes diff -Nru a/net/irda/qos.c b/net/irda/qos.c --- a/net/irda/qos.c 2005-03-30 16:58:50 -08:00 +++ b/net/irda/qos.c 2005-03-30 16:58:50 -08:00 @@ -200,7 +200,7 @@ * able to check precisely what's going on. If a end user sees this, * it's very likely the peer. - Jean II */ if (word == 0) { - WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n", + IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n", __FUNCTION__); /* The only safe choice (we don't know the array size) */ word = 0x1; @@ -278,8 +278,8 @@ */ void irda_qos_compute_intersection(struct qos_info *qos, struct qos_info *new) { - ASSERT(qos != NULL, return;); - ASSERT(new != NULL, return;); + IRDA_ASSERT(qos != NULL, return;); + IRDA_ASSERT(new != NULL, return;); /* Apply */ qos->baud_rate.bits &= new->baud_rate.bits; @@ -351,7 +351,7 @@ if (sysctl_min_tx_turn_time > qos->min_turn_time.value) { int i; - WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n", + IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n", __FUNCTION__, sysctl_min_tx_turn_time); /* We don't really need bits, but easier this way */ @@ -390,7 +390,7 @@ } #else /* Use method described in section 6.6.11 of IrLAP */ while (irlap_requested_line_capacity(qos) > line_capacity) { - ASSERT(index != 0, return;); + IRDA_ASSERT(index != 0, return;); /* Must be able to send at least one frame */ if (qos->window_size.value > 1) { @@ -402,8 +402,8 @@ IRDA_DEBUG(2, "%s(), reducing data size to %d\n", __FUNCTION__, qos->data_size.value); } else { - WARNING("%s(), nothing more we can do!\n", - __FUNCTION__); + IRDA_WARNING("%s(), nothing more we can do!\n", + __FUNCTION__); } } #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */ @@ -532,8 +532,8 @@ struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) { param->pv.i = self->qos_rx.baud_rate.bits; @@ -568,8 +568,8 @@ struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) param->pv.i = self->qos_rx.link_disc_time.bits; @@ -600,8 +600,8 @@ { struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) param->pv.i = self->qos_rx.max_turn_time.bits; @@ -622,8 +622,8 @@ { struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) param->pv.i = self->qos_rx.data_size.bits; @@ -645,8 +645,8 @@ { struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) param->pv.i = self->qos_rx.window_size.bits; @@ -666,8 +666,8 @@ { struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) param->pv.i = self->qos_rx.additional_bofs.bits; @@ -688,8 +688,8 @@ { struct irlap_cb *self = (struct irlap_cb *) instance; - ASSERT(self != NULL, return -1;); - ASSERT(self->magic == LAP_MAGIC, return -1;); + IRDA_ASSERT(self != NULL, return -1;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); if (get) param->pv.i = self->qos_rx.min_turn_time.bits; @@ -716,8 +716,8 @@ i = value_index(speed, baud_rates, 10); j = value_index(max_turn_time, max_turn_times, 4); - ASSERT(((i >=0) && (i <10)), return 0;); - ASSERT(((j >=0) && (j <4)), return 0;); + IRDA_ASSERT(((i >=0) && (i <10)), return 0;); + IRDA_ASSERT(((j >=0) && (j <4)), return 0;); line_capacity = max_line_capacities[i][j]; @@ -748,7 +748,7 @@ { int index; - ASSERT(qos != NULL, return;); + IRDA_ASSERT(qos != NULL, return;); index = msb_index(qos->baud_rate.bits); qos->baud_rate.value = baud_rates[index]; diff -Nru a/net/irda/timer.c b/net/irda/timer.c --- a/net/irda/timer.c 2005-03-30 16:58:49 -08:00 +++ b/net/irda/timer.c 2005-03-30 16:58:49 -08:00 @@ -144,8 +144,8 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_do_event(self, SLOT_TIMER_EXPIRED, NULL, NULL); } @@ -160,8 +160,8 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_do_event(self, QUERY_TIMER_EXPIRED, NULL, NULL); } @@ -176,8 +176,8 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_do_event(self, FINAL_TIMER_EXPIRED, NULL, NULL); } @@ -192,8 +192,8 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_do_event(self, WD_TIMER_EXPIRED, NULL, NULL); } @@ -208,8 +208,8 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); - ASSERT(self->magic == LAP_MAGIC, return;); + IRDA_ASSERT(self != NULL, return;); + IRDA_ASSERT(self->magic == LAP_MAGIC, return;); irlap_do_event(self, BACKOFF_TIMER_EXPIRED, NULL, NULL); } @@ -224,7 +224,7 @@ { struct irlap_cb *self = (struct irlap_cb *) data; - ASSERT(self != NULL, return;); + IRDA_ASSERT(self != NULL, return;); irda_device_set_media_busy(self->netdev, FALSE); /* Note : the LAP event will be send in irlap_stop_mbusy_timer(), diff -Nru a/net/irda/wrapper.c b/net/irda/wrapper.c --- a/net/irda/wrapper.c 2005-03-30 16:58:51 -08:00 +++ b/net/irda/wrapper.c 2005-03-30 16:58:51 -08:00 @@ -133,7 +133,11 @@ * bufsize-5 since the maximum number of bytes that can be * transmitted after this point is 5. */ - ASSERT(n < (buffsize-5), return n;); + if(n >= (buffsize-5)) { + IRDA_ERROR("%s(), tx buffer overflow (n=%d)\n", + __FUNCTION__, n); + return n; + } n += stuff_byte(skb->data[i], tx_buff+n); fcs.value = irda_fcs(fcs.value, skb->data[i]); @@ -381,7 +385,7 @@ break; case LINK_ESCAPE: - WARNING("%s: state not defined\n", __FUNCTION__); + IRDA_WARNING("%s: state not defined\n", __FUNCTION__); break; case BEGIN_FRAME: diff -Nru a/net/key/af_key.c b/net/key/af_key.c --- a/net/key/af_key.c 2005-03-30 16:58:50 -08:00 +++ b/net/key/af_key.c 2005-03-30 16:58:50 -08:00 @@ -593,7 +593,7 @@ /* address family check */ sockaddr_size = pfkey_sockaddr_size(x->props.family); if (!sockaddr_size) - ERR_PTR(-EINVAL); + return ERR_PTR(-EINVAL); /* base, SA, (lifetime (HSC),) address(SD), (address(P),) key(AE), (identity(SD),) (sensitivity)> */ diff -Nru a/net/netlink/Makefile b/net/netlink/Makefile --- a/net/netlink/Makefile 2005-03-30 16:58:48 -08:00 +++ b/net/netlink/Makefile 2005-03-30 16:58:48 -08:00 @@ -3,4 +3,3 @@ # obj-y := af_netlink.o -obj-$(CONFIG_NETLINK_DEV) += netlink_dev.o diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c 2005-03-30 16:58:48 -08:00 +++ b/net/netlink/af_netlink.c 2005-03-30 16:58:48 -08:00 @@ -55,10 +55,6 @@ #define Nprintk(a...) -#if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE) -#define NL_EMULATE_DEV -#endif - struct netlink_sock { /* struct sock has to be the first member of netlink_sock */ struct sock sk; @@ -67,7 +63,6 @@ u32 dst_pid; unsigned int dst_groups; unsigned long state; - int (*handler)(int unit, struct sk_buff *skb); wait_queue_head_t wait; struct netlink_callback *cb; spinlock_t cb_lock; @@ -593,10 +588,6 @@ nlk = nlk_sk(sk); -#ifdef NL_EMULATE_DEV - if (nlk->handler) - return 0; -#endif if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || test_bit(0, &nlk->state)) { DECLARE_WAITQUEUE(wait, current); @@ -636,14 +627,6 @@ int len = skb->len; nlk = nlk_sk(sk); -#ifdef NL_EMULATE_DEV - if (nlk->handler) { - skb_orphan(skb); - len = nlk->handler(protocol, skb); - sock_put(sk); - return len; - } -#endif skb_queue_tail(&sk->sk_receive_queue, skb); sk->sk_data_ready(sk, len); @@ -708,12 +691,7 @@ static __inline__ int netlink_broadcast_deliver(struct sock *sk, struct sk_buff *skb) { struct netlink_sock *nlk = nlk_sk(sk); -#ifdef NL_EMULATE_DEV - if (nlk->handler) { - nlk->handler(sk->sk_protocol, skb); - return 0; - } else -#endif + if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf && !test_bit(0, &nlk->state)) { skb_set_owner_r(skb, sk); diff -Nru a/net/netlink/netlink_dev.c b/net/netlink/netlink_dev.c --- a/net/netlink/netlink_dev.c 2005-03-30 16:58:48 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,278 +0,0 @@ -/* - * NETLINK An implementation of a loadable kernel mode driver providing - * multiple kernel/user space bidirectional communications links. - * - * Author: Alan Cox - * - * 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. - * - * Now netlink devices are emulated on the top of netlink sockets - * by compatibility reasons. Remove this file after a period. --ANK - * - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -static long open_map; -static struct socket *netlink_user[MAX_LINKS]; -static struct class_simple *netlink_class; - -/* - * Device operations - */ - -static unsigned int netlink_poll(struct file *file, poll_table * wait) -{ - struct socket *sock = netlink_user[iminor(file->f_dentry->d_inode)]; - - if (sock->ops->poll==NULL) - return 0; - return sock->ops->poll(file, sock, wait); -} - -/* - * Write a message to the kernel side of a communication link - */ - -static ssize_t netlink_write(struct file * file, const char __user * buf, - size_t count, loff_t *pos) -{ - struct inode *inode = file->f_dentry->d_inode; - struct socket *sock = netlink_user[iminor(inode)]; - struct msghdr msg; - struct iovec iov; - - iov.iov_base = (void __user*)buf; - iov.iov_len = count; - msg.msg_name=NULL; - msg.msg_namelen=0; - msg.msg_controllen=0; - msg.msg_flags=0; - msg.msg_iov=&iov; - msg.msg_iovlen=1; - - return sock_sendmsg(sock, &msg, count); -} - -/* - * Read a message from the kernel side of the communication link - */ - -static ssize_t netlink_read(struct file * file, char __user * buf, - size_t count, loff_t *pos) -{ - struct inode *inode = file->f_dentry->d_inode; - struct socket *sock = netlink_user[iminor(inode)]; - struct msghdr msg; - struct iovec iov; - - iov.iov_base = buf; - iov.iov_len = count; - msg.msg_name=NULL; - msg.msg_namelen=0; - msg.msg_controllen=0; - msg.msg_flags=0; - msg.msg_iov=&iov; - msg.msg_iovlen=1; - if (file->f_flags&O_NONBLOCK) - msg.msg_flags=MSG_DONTWAIT; - - return sock_recvmsg(sock, &msg, count, msg.msg_flags); -} - -static int netlink_open(struct inode * inode, struct file * file) -{ - unsigned int minor = iminor(inode); - struct socket *sock; - struct sockaddr_nl nladdr; - int err; - - if (minor>=MAX_LINKS) - return -ENODEV; - if (test_and_set_bit(minor, &open_map)) - return -EBUSY; - - err = sock_create_kern(PF_NETLINK, SOCK_RAW, minor, &sock); - if (err < 0) - goto out; - - memset(&nladdr, 0, sizeof(nladdr)); - nladdr.nl_family = AF_NETLINK; - nladdr.nl_groups = ~0; - if ((err = sock->ops->bind(sock, (struct sockaddr*)&nladdr, sizeof(nladdr))) < 0) { - sock_release(sock); - goto out; - } - - netlink_user[minor] = sock; - return 0; - -out: - clear_bit(minor, &open_map); - return err; -} - -static int netlink_release(struct inode * inode, struct file * file) -{ - unsigned int minor = iminor(inode); - struct socket *sock; - - sock = netlink_user[minor]; - netlink_user[minor] = NULL; - clear_bit(minor, &open_map); - sock_release(sock); - return 0; -} - - -static int netlink_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - unsigned int minor = iminor(inode); - int retval = 0; - - if (minor >= MAX_LINKS) - return -ENODEV; - switch ( cmd ) { - default: - retval = -EINVAL; - } - return retval; -} - - -static struct file_operations netlink_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .read = netlink_read, - .write = netlink_write, - .poll = netlink_poll, - .ioctl = netlink_ioctl, - .open = netlink_open, - .release = netlink_release, -}; - -static struct { - char *name; - int minor; -} entries[] = { - { - .name = "route", - .minor = NETLINK_ROUTE, - }, - { - .name = "skip", - .minor = NETLINK_SKIP, - }, - { - .name = "usersock", - .minor = NETLINK_USERSOCK, - }, - { - .name = "fwmonitor", - .minor = NETLINK_FIREWALL, - }, - { - .name = "tcpdiag", - .minor = NETLINK_TCPDIAG, - }, - { - .name = "nflog", - .minor = NETLINK_NFLOG, - }, - { - .name = "xfrm", - .minor = NETLINK_XFRM, - }, - { - .name = "arpd", - .minor = NETLINK_ARPD, - }, - { - .name = "route6", - .minor = NETLINK_ROUTE6, - }, - { - .name = "ip6_fw", - .minor = NETLINK_IP6_FW, - }, - { - .name = "dnrtmsg", - .minor = NETLINK_DNRTMSG, - }, -}; - -static int __init init_netlink(void) -{ - int i; - - if (register_chrdev(NETLINK_MAJOR,"netlink", &netlink_fops)) { - printk(KERN_ERR "netlink: unable to get major %d\n", NETLINK_MAJOR); - return -EIO; - } - - netlink_class = class_simple_create(THIS_MODULE, "netlink"); - if (IS_ERR(netlink_class)) { - printk (KERN_ERR "Error creating netlink class.\n"); - unregister_chrdev(NETLINK_MAJOR, "netlink"); - return PTR_ERR(netlink_class); - } - - devfs_mk_dir("netlink"); - - /* Someone tell me the official names for the uppercase ones */ - for (i = 0; i < ARRAY_SIZE(entries); i++) { - devfs_mk_cdev(MKDEV(NETLINK_MAJOR, entries[i].minor), - S_IFCHR|S_IRUSR|S_IWUSR, "netlink/%s", entries[i].name); - class_simple_device_add(netlink_class, MKDEV(NETLINK_MAJOR, entries[i].minor), NULL, "%s", entries[i].name); - } - - for (i = 0; i < 16; i++) { - devfs_mk_cdev(MKDEV(NETLINK_MAJOR, i + 16), - S_IFCHR|S_IRUSR|S_IWUSR, "netlink/tap%d", i); - class_simple_device_add(netlink_class, MKDEV(NETLINK_MAJOR, i + 16), NULL, "tap%d", i); - } - - return 0; -} - -static void __exit cleanup_netlink(void) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(entries); i++) { - devfs_remove("netlink/%s", entries[i].name); - class_simple_device_remove(MKDEV(NETLINK_MAJOR, entries[i].minor)); - } - for (i = 0; i < 16; i++) { - devfs_remove("netlink/tap%d", i); - class_simple_device_remove(MKDEV(NETLINK_MAJOR, i + 16)); - } - devfs_remove("netlink"); - class_simple_destroy(netlink_class); - unregister_chrdev(NETLINK_MAJOR, "netlink"); -} - -MODULE_LICENSE("GPL"); -module_init(init_netlink); -module_exit(cleanup_netlink); diff -Nru a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c --- a/net/netrom/af_netrom.c 2005-03-30 16:58:48 -08:00 +++ b/net/netrom/af_netrom.c 2005-03-30 16:58:48 -08:00 @@ -66,24 +66,7 @@ static struct sock *nr_alloc_sock(void) { - nr_cb *nr; - struct sock *sk = sk_alloc(PF_NETROM, GFP_ATOMIC, 1, NULL); - - if (!sk) - goto out; - - nr = sk->sk_protinfo = kmalloc(sizeof(*nr), GFP_ATOMIC); - if (!nr) - goto frees; - - memset(nr, 0x00, sizeof(*nr)); - nr->sk = sk; -out: - return sk; -frees: - sk_free(sk); - sk = NULL; - goto out; + return sk_alloc(PF_NETROM, GFP_ATOMIC, sizeof(struct nr_sock), NULL); } /* @@ -169,7 +152,7 @@ spin_lock_bh(&nr_list_lock); sk_for_each(s, node, &nr_list) { - nr_cb *nr = nr_sk(s); + struct nr_sock *nr = nr_sk(s); if (nr->my_index == index && nr->my_id == id) { bh_lock_sock(s); @@ -193,7 +176,7 @@ spin_lock_bh(&nr_list_lock); sk_for_each(s, node, &nr_list) { - nr_cb *nr = nr_sk(s); + struct nr_sock *nr = nr_sk(s); if (nr->your_index == index && nr->your_id == id && !ax25cmp(&nr->dest_addr, dest)) { @@ -300,7 +283,7 @@ char __user *optval, int optlen) { struct sock *sk = sock->sk; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); int opt; if (level != SOL_NETROM) @@ -352,7 +335,7 @@ char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); int val = 0; int len; @@ -418,7 +401,7 @@ static int nr_create(struct socket *sock, int protocol) { struct sock *sk; - nr_cb *nr; + struct nr_sock *nr; if (sock->type != SOCK_SEQPACKET || protocol != 0) return -ESOCKTNOSUPPORT; @@ -456,7 +439,7 @@ static struct sock *nr_make_new(struct sock *osk) { struct sock *sk; - nr_cb *nr, *onr; + struct nr_sock *nr, *onr; if (osk->sk_type != SOCK_SEQPACKET) return NULL; @@ -508,7 +491,7 @@ static int nr_release(struct socket *sock) { struct sock *sk = sock->sk; - nr_cb *nr; + struct nr_sock *nr; if (sk == NULL) return 0; @@ -556,7 +539,7 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; struct net_device *dev; ax25_address *user, *source; @@ -625,7 +608,7 @@ int addr_len, int flags) { struct sock *sk = sock->sk; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr; ax25_address *user, *source = NULL; struct net_device *dev; @@ -822,7 +805,7 @@ { struct full_sockaddr_ax25 *sax = (struct full_sockaddr_ax25 *)uaddr; struct sock *sk = sock->sk; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); lock_sock(sk); if (peer != 0) { @@ -850,7 +833,7 @@ { struct sock *sk; struct sock *make; - nr_cb *nr_make; + struct nr_sock *nr_make; ax25_address *src, *dest, *user; unsigned short circuit_index, circuit_id; unsigned short peer_circuit_index, peer_circuit_id; @@ -942,7 +925,7 @@ user = (ax25_address *)(skb->data + 21); - if (!sk || sk->sk_ack_backlog == sk->sk_max_ack_backlog || + if (sk == NULL || sk_acceptq_is_full(sk) || (make = nr_make_new(sk)) == NULL) { nr_transmit_refusal(skb, 0); if (sk) @@ -1015,7 +998,7 @@ struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); struct sockaddr_ax25 *usax = (struct sockaddr_ax25 *)msg->msg_name; int err; struct sockaddr_ax25 sax; @@ -1275,7 +1258,7 @@ { struct sock *s = v; struct net_device *dev; - nr_cb *nr; + struct nr_sock *nr; const char *devname; if (v == SEQ_START_TOKEN) diff -Nru a/net/netrom/nr_in.c b/net/netrom/nr_in.c --- a/net/netrom/nr_in.c 2005-03-30 16:58:48 -08:00 +++ b/net/netrom/nr_in.c 2005-03-30 16:58:48 -08:00 @@ -34,7 +34,7 @@ static int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) { struct sk_buff *skbo, *skbn = skb; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); skb_pull(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN); @@ -76,7 +76,7 @@ { switch (frametype) { case NR_CONNACK: { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); nr_stop_t1timer(sk); nr_start_idletimer(sk); @@ -138,7 +138,7 @@ */ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype) { - nr_cb *nrom = nr_sk(sk); + struct nr_sock *nrom = nr_sk(sk); struct sk_buff_head temp_queue; struct sk_buff *skbn; unsigned short save_vr; @@ -264,7 +264,7 @@ /* Higher level upcall for a LAPB frame - called with sk locked */ int nr_process_rx_frame(struct sock *sk, struct sk_buff *skb) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); int queued = 0, frametype; if (nr->state == NR_STATE_0) diff -Nru a/net/netrom/nr_out.c b/net/netrom/nr_out.c --- a/net/netrom/nr_out.c 2005-03-30 16:58:48 -08:00 +++ b/net/netrom/nr_out.c 2005-03-30 16:58:48 -08:00 @@ -82,7 +82,7 @@ */ static void nr_send_iframe(struct sock *sk, struct sk_buff *skb) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); if (skb == NULL) return; @@ -101,7 +101,7 @@ void nr_send_nak_frame(struct sock *sk) { struct sk_buff *skb, *skbn; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); if ((skb = skb_peek(&nr->ack_queue)) == NULL) return; @@ -125,7 +125,7 @@ void nr_kick(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); struct sk_buff *skb, *skbn; unsigned short start, end; @@ -188,7 +188,7 @@ void nr_transmit_buffer(struct sock *sk, struct sk_buff *skb) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); unsigned char *dptr; /* @@ -223,7 +223,7 @@ void nr_establish_data_link(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); nr->condition = 0x00; nr->n2count = 0; @@ -241,7 +241,7 @@ */ void nr_enquiry_response(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); int frametype = NR_INFOACK; if (nr->condition & NR_COND_OWN_RX_BUSY) { @@ -259,7 +259,7 @@ void nr_check_iframes_acked(struct sock *sk, unsigned short nr) { - nr_cb *nrom = nr_sk(sk); + struct nr_sock *nrom = nr_sk(sk); if (nrom->vs == nr) { nr_frames_acked(sk, nr); diff -Nru a/net/netrom/nr_subr.c b/net/netrom/nr_subr.c --- a/net/netrom/nr_subr.c 2005-03-30 16:58:51 -08:00 +++ b/net/netrom/nr_subr.c 2005-03-30 16:58:51 -08:00 @@ -34,7 +34,7 @@ */ void nr_clear_queues(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); skb_queue_purge(&sk->sk_write_queue); skb_queue_purge(&nr->ack_queue); @@ -49,7 +49,7 @@ */ void nr_frames_acked(struct sock *sk, unsigned short nr) { - nr_cb *nrom = nr_sk(sk); + struct nr_sock *nrom = nr_sk(sk); struct sk_buff *skb; /* @@ -88,7 +88,7 @@ */ int nr_validate_nr(struct sock *sk, unsigned short nr) { - nr_cb *nrom = nr_sk(sk); + struct nr_sock *nrom = nr_sk(sk); unsigned short vc = nrom->va; while (vc != nrom->vs) { @@ -104,7 +104,7 @@ */ int nr_in_rx_window(struct sock *sk, unsigned short ns) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); unsigned short vc = nr->vr; unsigned short vt = (nr->vl + nr->window) % NR_MODULUS; @@ -122,7 +122,7 @@ */ void nr_write_internal(struct sock *sk, int frametype) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); struct sk_buff *skb; unsigned char *dptr; int len, timeout; diff -Nru a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c --- a/net/netrom/nr_timer.c 2005-03-30 16:58:51 -08:00 +++ b/net/netrom/nr_timer.c 2005-03-30 16:58:51 -08:00 @@ -38,7 +38,7 @@ void nr_init_timers(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); init_timer(&nr->t1timer); nr->t1timer.data = (unsigned long)sk; @@ -63,28 +63,28 @@ void nr_start_t1timer(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); mod_timer(&nr->t1timer, jiffies + nr->t1); } void nr_start_t2timer(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); mod_timer(&nr->t2timer, jiffies + nr->t2); } void nr_start_t4timer(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); mod_timer(&nr->t4timer, jiffies + nr->t4); } void nr_start_idletimer(struct sock *sk) { - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); if (nr->idle > 0) mod_timer(&nr->idletimer, jiffies + nr->idle); @@ -128,7 +128,7 @@ static void nr_heartbeat_expiry(unsigned long param) { struct sock *sk = (struct sock *)param; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); bh_lock_sock(sk); switch (nr->state) { @@ -167,7 +167,7 @@ static void nr_t2timer_expiry(unsigned long param) { struct sock *sk = (struct sock *)param; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); bh_lock_sock(sk); if (nr->condition & NR_COND_ACK_PENDING) { @@ -189,7 +189,7 @@ static void nr_idletimer_expiry(unsigned long param) { struct sock *sk = (struct sock *)param; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); bh_lock_sock(sk); @@ -217,7 +217,7 @@ static void nr_t1timer_expiry(unsigned long param) { struct sock *sk = (struct sock *)param; - nr_cb *nr = nr_sk(sk); + struct nr_sock *nr = nr_sk(sk); bh_lock_sock(sk); switch (nr->state) { diff -Nru a/net/rose/af_rose.c b/net/rose/af_rose.c --- a/net/rose/af_rose.c 2005-03-30 16:58:48 -08:00 +++ b/net/rose/af_rose.c 2005-03-30 16:58:48 -08:00 @@ -128,24 +128,7 @@ static struct sock *rose_alloc_sock(void) { - rose_cb *rose; - struct sock *sk = sk_alloc(PF_ROSE, GFP_ATOMIC, 1, NULL); - - if (!sk) - goto out; - - rose = sk->sk_protinfo = kmalloc(sizeof(*rose), GFP_ATOMIC); - if (!rose) - goto frees; - - memset(rose, 0x00, sizeof(*rose)); - rose->sk = sk; -out: - return sk; -frees: - sk_free(sk); - sk = NULL; - goto out; + return sk_alloc(PF_ROSE, GFP_ATOMIC, sizeof(struct rose_sock), NULL); } /* @@ -169,7 +152,7 @@ spin_lock_bh(&rose_list_lock); sk_for_each(s, node, &rose_list) { - rose_cb *rose = rose_sk(s); + struct rose_sock *rose = rose_sk(s); if (rose->neighbour == neigh) { rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0); @@ -190,7 +173,7 @@ spin_lock_bh(&rose_list_lock); sk_for_each(s, node, &rose_list) { - rose_cb *rose = rose_sk(s); + struct rose_sock *rose = rose_sk(s); if (rose->device == dev) { rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0); @@ -247,7 +230,7 @@ spin_lock_bh(&rose_list_lock); sk_for_each(s, node, &rose_list) { - rose_cb *rose = rose_sk(s); + struct rose_sock *rose = rose_sk(s); if (!rosecmp(&rose->source_addr, addr) && !ax25cmp(&rose->source_call, call) && @@ -256,7 +239,7 @@ } sk_for_each(s, node, &rose_list) { - rose_cb *rose = rose_sk(s); + struct rose_sock *rose = rose_sk(s); if (!rosecmp(&rose->source_addr, addr) && !ax25cmp(&rose->source_call, &null_ax25_address) && @@ -279,7 +262,7 @@ spin_lock_bh(&rose_list_lock); sk_for_each(s, node, &rose_list) { - rose_cb *rose = rose_sk(s); + struct rose_sock *rose = rose_sk(s); if (rose->lci == lci && rose->neighbour == neigh) goto found; @@ -372,7 +355,7 @@ char __user *optval, int optlen) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); int opt; if (level != SOL_ROSE) @@ -432,7 +415,7 @@ char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); int val = 0; int len; @@ -491,7 +474,7 @@ struct sock *sk = sock->sk; if (sk->sk_state != TCP_LISTEN) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); rose->dest_ndigis = 0; memset(&rose->dest_addr, 0, ROSE_ADDR_LEN); @@ -508,7 +491,7 @@ static int rose_create(struct socket *sock, int protocol) { struct sock *sk; - rose_cb *rose; + struct rose_sock *rose; if (sock->type != SOCK_SEQPACKET || protocol != 0) return -ESOCKTNOSUPPORT; @@ -547,7 +530,7 @@ static struct sock *rose_make_new(struct sock *osk) { struct sock *sk; - rose_cb *rose, *orose; + struct rose_sock *rose, *orose; if (osk->sk_type != SOCK_SEQPACKET) return NULL; @@ -600,7 +583,7 @@ static int rose_release(struct socket *sock) { struct sock *sk = sock->sk; - rose_cb *rose; + struct rose_sock *rose; if (sk == NULL) return 0; @@ -646,7 +629,7 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; struct net_device *dev; ax25_address *user, *source; @@ -705,7 +688,7 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; unsigned char cause, diagnostic; ax25_address *user; @@ -906,7 +889,7 @@ { struct full_sockaddr_rose *srose = (struct full_sockaddr_rose *)uaddr; struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); int n; if (peer != 0) { @@ -935,7 +918,7 @@ { struct sock *sk; struct sock *make; - rose_cb *make_rose; + struct rose_sock *make_rose; struct rose_facilities_struct facilities; int n, len; @@ -958,7 +941,7 @@ /* * We can't accept the Call Request. */ - if (!sk || sk->sk_ack_backlog == sk->sk_max_ack_backlog || + if (sk == NULL || sk_acceptq_is_full(sk) || (make = rose_make_new(sk)) == NULL) { rose_transmit_clear_request(neigh, lci, ROSE_NETWORK_CONGESTION, 120); return 0; @@ -1016,7 +999,7 @@ struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); struct sockaddr_rose *usrose = (struct sockaddr_rose *)msg->msg_name; int err; struct full_sockaddr_rose srose; @@ -1186,7 +1169,7 @@ struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); struct sockaddr_rose *srose = (struct sockaddr_rose *)msg->msg_name; size_t copied; unsigned char *asmptr; @@ -1251,7 +1234,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); void __user *argp = (void __user *)arg; switch (cmd) { @@ -1386,7 +1369,7 @@ else { struct sock *s = v; - rose_cb *rose = rose_sk(s); + struct rose_sock *rose = rose_sk(s); const char *devname, *callsign; const struct net_device *dev = rose->device; diff -Nru a/net/rose/rose_in.c b/net/rose/rose_in.c --- a/net/rose/rose_in.c 2005-03-30 16:58:49 -08:00 +++ b/net/rose/rose_in.c 2005-03-30 16:58:49 -08:00 @@ -41,7 +41,7 @@ */ static int rose_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); switch (frametype) { case ROSE_CALL_ACCEPTED: @@ -78,7 +78,7 @@ */ static int rose_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); switch (frametype) { case ROSE_CLEAR_REQUEST: @@ -106,7 +106,7 @@ */ static int rose_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, int q, int d, int m) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); int queued = 0; switch (frametype) { @@ -216,7 +216,7 @@ */ static int rose_state4_machine(struct sock *sk, struct sk_buff *skb, int frametype) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); switch (frametype) { case ROSE_RESET_REQUEST: @@ -265,7 +265,7 @@ /* Higher level upcall for a LAPB frame */ int rose_process_rx_frame(struct sock *sk, struct sk_buff *skb) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); int queued = 0, frametype, ns, nr, q, d, m; if (rose->state == ROSE_STATE_0) diff -Nru a/net/rose/rose_out.c b/net/rose/rose_out.c --- a/net/rose/rose_out.c 2005-03-30 16:58:50 -08:00 +++ b/net/rose/rose_out.c 2005-03-30 16:58:50 -08:00 @@ -33,7 +33,7 @@ */ static void rose_send_iframe(struct sock *sk, struct sk_buff *skb) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); if (skb == NULL) return; @@ -48,7 +48,7 @@ void rose_kick(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); struct sk_buff *skb, *skbn; unsigned short start, end; @@ -112,7 +112,7 @@ void rose_enquiry_response(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); if (rose->condition & ROSE_COND_OWN_RX_BUSY) rose_write_internal(sk, ROSE_RNR); diff -Nru a/net/rose/rose_route.c b/net/rose/rose_route.c --- a/net/rose/rose_route.c 2005-03-30 16:58:50 -08:00 +++ b/net/rose/rose_route.c 2005-03-30 16:58:50 -08:00 @@ -899,7 +899,8 @@ */ if ((sk = rose_find_socket(lci, rose_neigh)) != NULL) { if (frametype == ROSE_CALL_REQUEST) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); + /* Remove an existing unused socket */ rose_clear_queues(sk); rose->cause = ROSE_NETWORK_CONGESTION; diff -Nru a/net/rose/rose_subr.c b/net/rose/rose_subr.c --- a/net/rose/rose_subr.c 2005-03-30 16:58:50 -08:00 +++ b/net/rose/rose_subr.c 2005-03-30 16:58:50 -08:00 @@ -28,7 +28,7 @@ #include #include -static int rose_create_facilities(unsigned char *buffer, rose_cb *rose); +static int rose_create_facilities(unsigned char *buffer, struct rose_sock *rose); /* * This routine purges all of the queues of frames. @@ -47,7 +47,7 @@ void rose_frames_acked(struct sock *sk, unsigned short nr) { struct sk_buff *skb; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); /* * Remove all the ack-ed frames from the ack queue. @@ -85,7 +85,7 @@ */ int rose_validate_nr(struct sock *sk, unsigned short nr) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); unsigned short vc = rose->va; while (vc != rose->vs) { @@ -102,7 +102,7 @@ */ void rose_write_internal(struct sock *sk, int frametype) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); struct sk_buff *skb; unsigned char *dptr; unsigned char lci1, lci2; @@ -396,7 +396,7 @@ return 1; } -static int rose_create_facilities(unsigned char *buffer, rose_cb *rose) +static int rose_create_facilities(unsigned char *buffer, struct rose_sock *rose) { unsigned char *p = buffer + 1; char *callsign; @@ -492,7 +492,7 @@ void rose_disconnect(struct sock *sk, int reason, int cause, int diagnostic) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); rose_stop_timer(sk); rose_stop_idletimer(sk); diff -Nru a/net/rose/rose_timer.c b/net/rose/rose_timer.c --- a/net/rose/rose_timer.c 2005-03-30 16:58:49 -08:00 +++ b/net/rose/rose_timer.c 2005-03-30 16:58:49 -08:00 @@ -46,7 +46,7 @@ void rose_start_t1timer(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); del_timer(&rose->timer); @@ -59,7 +59,7 @@ void rose_start_t2timer(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); del_timer(&rose->timer); @@ -72,7 +72,7 @@ void rose_start_t3timer(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); del_timer(&rose->timer); @@ -85,7 +85,7 @@ void rose_start_hbtimer(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); del_timer(&rose->timer); @@ -98,7 +98,7 @@ void rose_start_idletimer(struct sock *sk) { - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); del_timer(&rose->idletimer); @@ -129,7 +129,7 @@ static void rose_heartbeat_expiry(unsigned long param) { struct sock *sk = (struct sock *)param; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); bh_lock_sock(sk); switch (rose->state) { @@ -166,7 +166,7 @@ static void rose_timer_expiry(unsigned long param) { struct sock *sk = (struct sock *)param; - rose_cb *rose = rose_sk(sk); + struct rose_sock *rose = rose_sk(sk); bh_lock_sock(sk); switch (rose->state) { diff -Nru a/net/rxrpc/krxiod.c b/net/rxrpc/krxiod.c --- a/net/rxrpc/krxiod.c 2005-03-30 16:58:47 -08:00 +++ b/net/rxrpc/krxiod.c 2005-03-30 16:58:47 -08:00 @@ -138,6 +138,8 @@ _debug("### End Work"); + try_to_freeze(PF_FREEZE); + /* discard pending signals */ rxrpc_discard_my_signals(); diff -Nru a/net/rxrpc/krxsecd.c b/net/rxrpc/krxsecd.c --- a/net/rxrpc/krxsecd.c 2005-03-30 16:58:50 -08:00 +++ b/net/rxrpc/krxsecd.c 2005-03-30 16:58:50 -08:00 @@ -107,6 +107,8 @@ _debug("### End Inbound Calls"); + try_to_freeze(PF_FREEZE); + /* discard pending signals */ rxrpc_discard_my_signals(); diff -Nru a/net/rxrpc/krxtimod.c b/net/rxrpc/krxtimod.c --- a/net/rxrpc/krxtimod.c 2005-03-30 16:58:47 -08:00 +++ b/net/rxrpc/krxtimod.c 2005-03-30 16:58:47 -08:00 @@ -90,6 +90,8 @@ complete_and_exit(&krxtimod_dead, 0); } + try_to_freeze(PF_FREEZE); + /* discard pending signals */ rxrpc_discard_my_signals(); diff -Nru a/net/sched/cls_fw.c b/net/sched/cls_fw.c --- a/net/sched/cls_fw.c 2005-03-30 16:58:48 -08:00 +++ b/net/sched/cls_fw.c 2005-03-30 16:58:48 -08:00 @@ -338,8 +338,9 @@ rta->rta_len = skb->tail - b; - if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) - goto rtattr_failure; + if (f->exts.action && f->exts.action->type == TCA_OLD_COMPAT) + if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) + goto rtattr_failure; return skb->len; diff -Nru a/net/sched/cls_route.c b/net/sched/cls_route.c --- a/net/sched/cls_route.c 2005-03-30 16:58:48 -08:00 +++ b/net/sched/cls_route.c 2005-03-30 16:58:48 -08:00 @@ -599,8 +599,9 @@ rta->rta_len = skb->tail - b; - if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0) - goto rtattr_failure; + if (f->exts.action && f->exts.action->type == TCA_OLD_COMPAT) + if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0) + goto rtattr_failure; return skb->len; diff -Nru a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c --- a/net/sched/cls_tcindex.c 2005-03-30 16:58:48 -08:00 +++ b/net/sched/cls_tcindex.c 2005-03-30 16:58:48 -08:00 @@ -496,8 +496,9 @@ goto rtattr_failure; rta->rta_len = skb->tail-b; - if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0) - goto rtattr_failure; + if (r->exts.action && r->exts.action->type == TCA_OLD_COMPAT) + if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0) + goto rtattr_failure; } return skb->len; diff -Nru a/net/sched/cls_u32.c b/net/sched/cls_u32.c --- a/net/sched/cls_u32.c 2005-03-30 16:58:48 -08:00 +++ b/net/sched/cls_u32.c 2005-03-30 16:58:48 -08:00 @@ -775,7 +775,7 @@ } rta->rta_len = skb->tail - b; - if (TC_U32_KEY(n->handle)) + if (TC_U32_KEY(n->handle) && n->exts.action && n->exts.action->type == TCA_OLD_COMPAT) if (tcf_exts_dump_stats(skb, &n->exts, &u32_ext_map) < 0) goto rtattr_failure; return skb->len; diff -Nru a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c --- a/net/sctp/sm_statefuns.c 2005-03-30 16:58:47 -08:00 +++ b/net/sctp/sm_statefuns.c 2005-03-30 16:58:47 -08:00 @@ -268,7 +268,7 @@ */ if (!sctp_sstate(sk, LISTENING) || (sctp_style(sk, TCP) && - (sk->sk_ack_backlog >= sk->sk_max_ack_backlog))) + sk_acceptq_is_full(sk))) return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); /* 3.1 A packet containing an INIT chunk MUST have a zero Verification diff -Nru a/net/socket.c b/net/socket.c --- a/net/socket.c 2005-03-30 16:58:48 -08:00 +++ b/net/socket.c 2005-03-30 16:58:48 -08:00 @@ -993,8 +993,7 @@ sock = SOCKET_I(filp->f_dentry->d_inode); if ((sk=sock->sk) == NULL) { - if (fna) - kfree(fna); + kfree(fna); return -EINVAL; } diff -Nru a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c --- a/net/sunrpc/svcsock.c 2005-03-30 16:58:47 -08:00 +++ b/net/sunrpc/svcsock.c 2005-03-30 16:58:47 -08:00 @@ -1186,6 +1186,7 @@ arg->len = (pages-1)*PAGE_SIZE; arg->tail[0].iov_len = 0; + try_to_freeze(PF_FREEZE); if (signalled()) return -EINTR; diff -Nru a/net/x25/af_x25.c b/net/x25/af_x25.c --- a/net/x25/af_x25.c 2005-03-30 16:58:50 -08:00 +++ b/net/x25/af_x25.c 2005-03-30 16:58:50 -08:00 @@ -859,7 +859,7 @@ /* * We can't accept the Call Request. */ - if (!sk || sk->sk_ack_backlog == sk->sk_max_ack_backlog) + if (sk == NULL || sk_acceptq_is_full(sk)) goto out_clear_request; /* diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c --- a/net/xfrm/xfrm_policy.c 2005-03-30 16:58:48 -08:00 +++ b/net/xfrm/xfrm_policy.c 2005-03-30 16:58:48 -08:00 @@ -301,18 +301,22 @@ static void xfrm_policy_kill(struct xfrm_policy *policy) { write_lock_bh(&policy->lock); - if (policy->dead) - goto out; - + if (policy->dead) { + write_unlock_bh(&policy->lock); + return; + } policy->dead = 1; spin_lock(&xfrm_policy_gc_lock); list_add(&policy->list, &xfrm_policy_gc_list); + /* + * Unlock the policy (out of order unlocking), to make sure + * the GC context does not free it with an active lock: + */ + write_unlock_bh(&policy->lock); spin_unlock(&xfrm_policy_gc_lock); - schedule_work(&xfrm_policy_gc_work); -out: - write_unlock_bh(&policy->lock); + schedule_work(&xfrm_policy_gc_work); } /* Generate new index... KAME seems to generate them ordered by cost diff -Nru a/scripts/checkstack.pl b/scripts/checkstack.pl --- a/scripts/checkstack.pl 2005-03-30 16:58:48 -08:00 +++ b/scripts/checkstack.pl 2005-03-30 16:58:48 -08:00 @@ -79,8 +79,8 @@ sub bysize($) { my ($asize, $bsize); - ($asize = $a) =~ s/.* +(.*)$/$1/; - ($bsize = $b) =~ s/.* +(.*)$/$1/; + ($asize = $a) =~ s/.*: *(.*)$/$1/; + ($bsize = $b) =~ s/.*: *(.*)$/$1/; $bsize <=> $asize } diff -Nru a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c --- a/scripts/kconfig/gconf.c 2005-03-30 16:58:50 -08:00 +++ b/scripts/kconfig/gconf.c 2005-03-30 16:58:50 -08:00 @@ -11,6 +11,7 @@ #endif #include "lkc.h" +#include "images.c" #include #include @@ -186,6 +187,8 @@ GtkWidget *widget; GtkTextBuffer *txtbuf; char title[256]; + GdkPixmap *pixmap; + GdkBitmap *mask; GtkStyle *style; xml = glade_xml_new(glade_file, "window1", NULL); @@ -218,6 +221,36 @@ style = gtk_widget_get_style(main_wnd); widget = glade_xml_get_widget(xml, "toolbar1"); + pixmap = gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask, + &style->bg[GTK_STATE_NORMAL], + (gchar **) xpm_single_view); + gtk_image_set_from_pixmap(GTK_IMAGE + (((GtkToolbarChild + *) (g_list_nth(GTK_TOOLBAR(widget)-> + children, + 5)->data))->icon), + pixmap, mask); + pixmap = + gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask, + &style->bg[GTK_STATE_NORMAL], + (gchar **) xpm_split_view); + gtk_image_set_from_pixmap(GTK_IMAGE + (((GtkToolbarChild + *) (g_list_nth(GTK_TOOLBAR(widget)-> + children, + 6)->data))->icon), + pixmap, mask); + pixmap = + gdk_pixmap_create_from_xpm_d(main_wnd->window, &mask, + &style->bg[GTK_STATE_NORMAL], + (gchar **) xpm_tree_view); + gtk_image_set_from_pixmap(GTK_IMAGE + (((GtkToolbarChild + *) (g_list_nth(GTK_TOOLBAR(widget)-> + children, + 7)->data))->icon), + pixmap, mask); + switch (view_mode) { case SINGLE_VIEW: widget = glade_xml_get_widget(xml, "button4"); @@ -1138,42 +1171,6 @@ return FALSE; } - -/* Conf management */ - -static const char *xpm_menu[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" ", -" . ", -" .. ", -" ... ", -" .... ", -" ..... ", -" .... ", -" ... ", -" .. ", -" . ", -" "}; - -static const char *xpm_void[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; /* Fill a row of strings */ static gchar **fill_row(struct menu *menu) diff -Nru a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.glade --- a/scripts/kconfig/gconf.glade 2005-03-30 16:58:48 -08:00 +++ b/scripts/kconfig/gconf.glade 2005-03-30 16:58:48 -08:00 @@ -310,13 +310,13 @@ True - + True Goes up of one level (single view) Back True - gtk-undo - + gtk-undo + @@ -327,24 +327,24 @@ - + True Load a config file Load True - gtk-open - + gtk-open + - + True Save a config file Save True - gtk-save - + gtk-save + @@ -355,34 +355,34 @@ - + True Single view Single True - gtk-indent + gtk-missing-image - + True Split view Split True - gtk-copy + gtk-missing-image - + True Full view Full True - gtk-justify-left + gtk-missing-image @@ -394,24 +394,22 @@ - + True Collapse the whole tree in the right frame Collapse True - gtk-zoom-out - + - + True Expand the whole tree in the right frame Expand True - gtk-zoom-in - + diff -Nru a/scripts/kernel-doc b/scripts/kernel-doc --- a/scripts/kernel-doc 2005-03-30 16:58:48 -08:00 +++ b/scripts/kernel-doc 2005-03-30 16:58:48 -08:00 @@ -1626,11 +1626,11 @@ # replace <, >, and & sub xml_escape($) { - shift; - s/\&/\\\\\\amp;/g; - s/\/\\\\\\gt;/g; - return $_; + my $text = shift; + $text =~ s/\&/\\\\\\amp;/g; + $text =~ s/\/\\\\\\gt;/g; + return $text; } sub process_file($) { diff -Nru a/security/selinux/avc.c b/security/selinux/avc.c --- a/security/selinux/avc.c 2005-03-30 16:58:49 -08:00 +++ b/security/selinux/avc.c 2005-03-30 16:58:49 -08:00 @@ -139,7 +139,7 @@ * @tclass: target security class * @av: access vector */ -void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av) +static void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av) { const char **common_pts = NULL; u32 common_base = 0; @@ -199,7 +199,7 @@ * @tsid: target security identifier * @tclass: target security class */ -void avc_dump_query(struct audit_buffer *ab, u32 ssid, u32 tsid, u16 tclass) +static void avc_dump_query(struct audit_buffer *ab, u32 ssid, u32 tsid, u16 tclass) { int rc; char *scontext; @@ -828,136 +828,6 @@ return rc; } -static int avc_update_cache(u32 event, u32 ssid, u32 tsid, - u16 tclass, u32 perms) -{ - struct avc_node *node; - int i; - - rcu_read_lock(); - - if (ssid == SECSID_WILD || tsid == SECSID_WILD) { - /* apply to all matching nodes */ - for (i = 0; i < AVC_CACHE_SLOTS; i++) { - list_for_each_entry_rcu(node, &avc_cache.slots[i], list) { - if (avc_sidcmp(ssid, node->ae.ssid) && - avc_sidcmp(tsid, node->ae.tsid) && - tclass == node->ae.tclass ) { - avc_update_node(event, perms, node->ae.ssid, - node->ae.tsid, node->ae.tclass); - } - } - } - } else { - /* apply to one node */ - avc_update_node(event, perms, ssid, tsid, tclass); - } - - rcu_read_unlock(); - - return 0; -} - -static int avc_control(u32 event, u32 ssid, u32 tsid, - u16 tclass, u32 perms, - u32 seqno, u32 *out_retained) -{ - struct avc_callback_node *c; - u32 tretained = 0, cretained = 0; - int rc = 0; - - /* - * try_revoke only removes permissions from the cache - * state if they are not retained by the object manager. - * Hence, try_revoke must wait until after the callbacks have - * been invoked to update the cache state. - */ - if (event != AVC_CALLBACK_TRY_REVOKE) - avc_update_cache(event,ssid,tsid,tclass,perms); - - for (c = avc_callbacks; c; c = c->next) - { - if ((c->events & event) && - avc_sidcmp(c->ssid, ssid) && - avc_sidcmp(c->tsid, tsid) && - c->tclass == tclass && - (c->perms & perms)) { - cretained = 0; - rc = c->callback(event, ssid, tsid, tclass, - (c->perms & perms), - &cretained); - if (rc) - goto out; - tretained |= cretained; - } - } - - if (event == AVC_CALLBACK_TRY_REVOKE) { - /* revoke any unretained permissions */ - perms &= ~tretained; - avc_update_cache(event,ssid,tsid,tclass,perms); - *out_retained = tretained; - } - - avc_latest_notif_update(seqno, 0); - -out: - return rc; -} - -/** - * avc_ss_grant - Grant previously denied permissions. - * @ssid: source security identifier or %SECSID_WILD - * @tsid: target security identifier or %SECSID_WILD - * @tclass: target security class - * @perms: permissions to grant - * @seqno: policy sequence number - */ -int avc_ss_grant(u32 ssid, u32 tsid, u16 tclass, - u32 perms, u32 seqno) -{ - return avc_control(AVC_CALLBACK_GRANT, - ssid, tsid, tclass, perms, seqno, NULL); -} - -/** - * avc_ss_try_revoke - Try to revoke previously granted permissions. - * @ssid: source security identifier or %SECSID_WILD - * @tsid: target security identifier or %SECSID_WILD - * @tclass: target security class - * @perms: permissions to grant - * @seqno: policy sequence number - * @out_retained: subset of @perms that are retained - * - * Try to revoke previously granted permissions, but - * only if they are not retained as migrated permissions. - * Return the subset of permissions that are retained via @out_retained. - */ -int avc_ss_try_revoke(u32 ssid, u32 tsid, u16 tclass, - u32 perms, u32 seqno, u32 *out_retained) -{ - return avc_control(AVC_CALLBACK_TRY_REVOKE, - ssid, tsid, tclass, perms, seqno, out_retained); -} - -/** - * avc_ss_revoke - Revoke previously granted permissions. - * @ssid: source security identifier or %SECSID_WILD - * @tsid: target security identifier or %SECSID_WILD - * @tclass: target security class - * @perms: permissions to grant - * @seqno: policy sequence number - * - * Revoke previously granted permissions, even if - * they are retained as migrated permissions. - */ -int avc_ss_revoke(u32 ssid, u32 tsid, u16 tclass, - u32 perms, u32 seqno) -{ - return avc_control(AVC_CALLBACK_REVOKE, - ssid, tsid, tclass, perms, seqno, NULL); -} - /** * avc_ss_reset - Flush the cache and revalidate migrated permissions. * @seqno: policy sequence number @@ -988,46 +858,6 @@ avc_latest_notif_update(seqno, 0); out: return rc; -} - -/** - * avc_ss_set_auditallow - Enable or disable auditing of granted permissions. - * @ssid: source security identifier or %SECSID_WILD - * @tsid: target security identifier or %SECSID_WILD - * @tclass: target security class - * @perms: permissions to grant - * @seqno: policy sequence number - * @enable: enable flag. - */ -int avc_ss_set_auditallow(u32 ssid, u32 tsid, u16 tclass, - u32 perms, u32 seqno, u32 enable) -{ - if (enable) - return avc_control(AVC_CALLBACK_AUDITALLOW_ENABLE, - ssid, tsid, tclass, perms, seqno, NULL); - else - return avc_control(AVC_CALLBACK_AUDITALLOW_DISABLE, - ssid, tsid, tclass, perms, seqno, NULL); -} - -/** - * avc_ss_set_auditdeny - Enable or disable auditing of denied permissions. - * @ssid: source security identifier or %SECSID_WILD - * @tsid: target security identifier or %SECSID_WILD - * @tclass: target security class - * @perms: permissions to grant - * @seqno: policy sequence number - * @enable: enable flag. - */ -int avc_ss_set_auditdeny(u32 ssid, u32 tsid, u16 tclass, - u32 perms, u32 seqno, u32 enable) -{ - if (enable) - return avc_control(AVC_CALLBACK_AUDITDENY_ENABLE, - ssid, tsid, tclass, perms, seqno, NULL); - else - return avc_control(AVC_CALLBACK_AUDITDENY_DISABLE, - ssid, tsid, tclass, perms, seqno, NULL); } /** diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c --- a/security/selinux/hooks.c 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/hooks.c 2005-03-30 16:58:50 -08:00 @@ -67,6 +67,7 @@ #include #include #include +#include #include "avc.h" #include "objsec.h" @@ -829,7 +830,9 @@ __FUNCTION__, context, -rc, inode->i_sb->s_id, inode->i_ino); kfree(context); - goto out; + /* Leave with the unlabeled SID */ + rc = 0; + break; } } kfree(context); @@ -921,9 +924,9 @@ /* Check permission betweeen a pair of tasks, e.g. signal checks, fork check, ptrace check, etc. */ -int task_has_perm(struct task_struct *tsk1, - struct task_struct *tsk2, - u32 perms) +static int task_has_perm(struct task_struct *tsk1, + struct task_struct *tsk2, + u32 perms) { struct task_security_struct *tsec1, *tsec2; @@ -934,8 +937,8 @@ } /* Check whether a task is allowed to use a capability. */ -int task_has_capability(struct task_struct *tsk, - int cap) +static int task_has_capability(struct task_struct *tsk, + int cap) { struct task_security_struct *tsec; struct avc_audit_data ad; @@ -951,8 +954,8 @@ } /* Check whether a task is allowed to use a system operation. */ -int task_has_system(struct task_struct *tsk, - u32 perms) +static int task_has_system(struct task_struct *tsk, + u32 perms) { struct task_security_struct *tsec; @@ -965,10 +968,10 @@ /* Check whether a task has a particular permission to an inode. The 'adp' parameter is optional and allows other audit data to be passed (e.g. the dentry). */ -int inode_has_perm(struct task_struct *tsk, - struct inode *inode, - u32 perms, - struct avc_audit_data *adp) +static int inode_has_perm(struct task_struct *tsk, + struct inode *inode, + u32 perms, + struct avc_audit_data *adp) { struct task_security_struct *tsec; struct inode_security_struct *isec; @@ -1190,10 +1193,10 @@ } /* Check whether a task can perform a filesystem operation. */ -int superblock_has_perm(struct task_struct *tsk, - struct super_block *sb, - u32 perms, - struct avc_audit_data *ad) +static int superblock_has_perm(struct task_struct *tsk, + struct super_block *sb, + u32 perms, + struct avc_audit_data *ad) { struct task_security_struct *tsec; struct superblock_security_struct *sbsec; @@ -1250,7 +1253,7 @@ } /* Set an inode's SID to a specified value. */ -int inode_security_set_sid(struct inode *inode, u32 sid) +static int inode_security_set_sid(struct inode *inode, u32 sid) { struct inode_security_struct *isec = inode->i_security; struct superblock_security_struct *sbsec = inode->i_sb->s_security; @@ -3091,7 +3094,53 @@ static int selinux_socket_connect(struct socket *sock, struct sockaddr *address, int addrlen) { - return socket_has_perm(current, sock, SOCKET__CONNECT); + struct inode_security_struct *isec; + int err; + + err = socket_has_perm(current, sock, SOCKET__CONNECT); + if (err) + return err; + + /* + * If a TCP socket, check name_connect permission for the port. + */ + isec = SOCK_INODE(sock)->i_security; + if (isec->sclass == SECCLASS_TCP_SOCKET) { + struct sock *sk = sock->sk; + struct avc_audit_data ad; + struct sockaddr_in *addr4 = NULL; + struct sockaddr_in6 *addr6 = NULL; + unsigned short snum; + u32 sid; + + if (sk->sk_family == PF_INET) { + addr4 = (struct sockaddr_in *)address; + if (addrlen != sizeof(struct sockaddr_in)) + return -EINVAL; + snum = ntohs(addr4->sin_port); + } else { + addr6 = (struct sockaddr_in6 *)address; + if (addrlen != sizeof(struct sockaddr_in6)) + return -EINVAL; + snum = ntohs(addr6->sin6_port); + } + + err = security_port_sid(sk->sk_family, sk->sk_type, + sk->sk_protocol, snum, &sid); + if (err) + goto out; + + AVC_AUDIT_DATA_INIT(&ad,NET); + ad.u.net.dport = htons(snum); + ad.u.net.family = sk->sk_family; + err = avc_has_perm(isec->sid, sid, isec->sclass, + TCP_SOCKET__NAME_CONNECT, &ad); + if (err) + goto out; + } + +out: + return err; } static int selinux_socket_listen(struct socket *sock, int backlog) @@ -3383,6 +3432,15 @@ err = selinux_nlmsg_lookup(isec->sclass, nlh->nlmsg_type, &perm); if (err) { + if (err == -EINVAL) { + audit_log(current->audit_context, + "SELinux: unrecognized netlink message" + " type=%hu for sclass=%hu\n", + nlh->nlmsg_type, isec->sclass); + if (!selinux_enforcing) + err = 0; + } + /* Ignore */ if (err == -ENOENT) err = 0; @@ -4019,7 +4077,7 @@ } /* module stacking operations */ -int selinux_register_security (const char *name, struct security_operations *ops) +static int selinux_register_security (const char *name, struct security_operations *ops) { if (secondary_ops != original_ops) { printk(KERN_INFO "%s: There is already a secondary security " @@ -4036,7 +4094,7 @@ return 0; } -int selinux_unregister_security (const char *name, struct security_operations *ops) +static int selinux_unregister_security (const char *name, struct security_operations *ops) { if (ops != secondary_ops) { printk (KERN_INFO "%s: trying to unregister a security module " @@ -4203,7 +4261,7 @@ return size; } -struct security_operations selinux_ops = { +static struct security_operations selinux_ops = { .ptrace = selinux_ptrace, .capget = selinux_capget, .capset_check = selinux_capset_check, @@ -4352,7 +4410,7 @@ #endif }; -__init int selinux_init(void) +static __init int selinux_init(void) { struct task_security_struct *tsec; diff -Nru a/security/selinux/include/av_perm_to_string.h b/security/selinux/include/av_perm_to_string.h --- a/security/selinux/include/av_perm_to_string.h 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/include/av_perm_to_string.h 2005-03-30 16:58:50 -08:00 @@ -25,6 +25,7 @@ S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn") S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom") S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NAME_CONNECT, "name_connect") S_(SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind") S_(SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind") S_(SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv") diff -Nru a/security/selinux/include/av_permissions.h b/security/selinux/include/av_permissions.h --- a/security/selinux/include/av_permissions.h 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/include/av_permissions.h 2005-03-30 16:58:50 -08:00 @@ -253,6 +253,7 @@ #define TCP_SOCKET__NEWCONN 0x00800000UL #define TCP_SOCKET__ACCEPTFROM 0x01000000UL #define TCP_SOCKET__NODE_BIND 0x02000000UL +#define TCP_SOCKET__NAME_CONNECT 0x04000000UL #define UDP_SOCKET__IOCTL 0x00000001UL #define UDP_SOCKET__READ 0x00000002UL diff -Nru a/security/selinux/include/avc.h b/security/selinux/include/avc.h --- a/security/selinux/include/avc.h 2005-03-30 16:58:47 -08:00 +++ b/security/selinux/include/avc.h 2005-03-30 16:58:47 -08:00 @@ -93,13 +93,6 @@ }; /* - * AVC display support - */ -struct audit_buffer; -void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av); -void avc_dump_query(struct audit_buffer *ab, u32 ssid, u32 tsid, u16 tclass); - -/* * AVC operations */ diff -Nru a/security/selinux/include/avc_ss.h b/security/selinux/include/avc_ss.h --- a/security/selinux/include/avc_ss.h 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/include/avc_ss.h 2005-03-30 16:58:50 -08:00 @@ -8,20 +8,7 @@ #include "flask.h" -int avc_ss_grant(u32 ssid, u32 tsid, u16 tclass, u32 perms, u32 seqno); - -int avc_ss_try_revoke(u32 ssid, u32 tsid, u16 tclass, u32 perms, u32 seqno, - u32 *out_retained); - -int avc_ss_revoke(u32 ssid, u32 tsid, u16 tclass, u32 perms, u32 seqno); - int avc_ss_reset(u32 seqno); - -int avc_ss_set_auditallow(u32 ssid, u32 tsid, u16 tclass, u32 perms, - u32 seqno, u32 enable); - -int avc_ss_set_auditdeny(u32 ssid, u32 tsid, u16 tclass, u32 perms, - u32 seqno, u32 enable); #endif /* _SELINUX_AVC_SS_H_ */ diff -Nru a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h --- a/security/selinux/include/objsec.h 2005-03-30 16:58:48 -08:00 +++ b/security/selinux/include/objsec.h 2005-03-30 16:58:48 -08:00 @@ -107,8 +107,6 @@ u32 peer_sid; /* SID of peer */ }; -extern int inode_security_set_sid(struct inode *inode, u32 sid); - extern unsigned int selinux_checkreqprot; #endif /* _SELINUX_OBJSEC_H_ */ diff -Nru a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c --- a/security/selinux/selinuxfs.c 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/selinuxfs.c 2005-03-30 16:58:50 -08:00 @@ -54,8 +54,8 @@ extern void selnl_notify_setenforce(int val); /* Check whether a task is allowed to use a security operation. */ -int task_has_security(struct task_struct *tsk, - u32 perms) +static int task_has_security(struct task_struct *tsk, + u32 perms) { struct task_security_struct *tsec; diff -Nru a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c --- a/security/selinux/ss/avtab.c 2005-03-30 16:58:49 -08:00 +++ b/security/selinux/ss/avtab.c 2005-03-30 16:58:49 -08:00 @@ -31,7 +31,8 @@ static kmem_cache_t *avtab_node_cachep; static struct avtab_node* -avtab_insert_node(struct avtab *h, int hvalue, struct avtab_node * prev, struct avtab_node * cur, +avtab_insert_node(struct avtab *h, int hvalue, + struct avtab_node * prev, struct avtab_node * cur, struct avtab_key *key, struct avtab_datum *datum) { struct avtab_node * newnode; @@ -53,7 +54,7 @@ return newnode; } -int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) +static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum) { int hvalue; struct avtab_node *prev, *cur, *newnode; @@ -236,30 +237,6 @@ h->htable = NULL; } - -int avtab_map(struct avtab *h, - int (*apply) (struct avtab_key *k, - struct avtab_datum *d, - void *args), - void *args) -{ - int i, ret; - struct avtab_node *cur; - - if (!h) - return 0; - - for (i = 0; i < AVTAB_SIZE; i++) { - cur = h->htable[i]; - while (cur != NULL) { - ret = apply(&cur->key, &cur->datum, args); - if (ret) - return ret; - cur = cur->next; - } - } - return 0; -} int avtab_init(struct avtab *h) { diff -Nru a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h --- a/security/selinux/ss/avtab.h 2005-03-30 16:58:48 -08:00 +++ b/security/selinux/ss/avtab.h 2005-03-30 16:58:48 -08:00 @@ -58,14 +58,8 @@ }; int avtab_init(struct avtab *); -int avtab_insert(struct avtab *h, struct avtab_key *k, struct avtab_datum *d); struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k, int specified); void avtab_destroy(struct avtab *h); -int avtab_map(struct avtab *h, - int (*apply) (struct avtab_key *k, - struct avtab_datum *d, - void *args), - void *args); void avtab_hash_eval(struct avtab *h, char *tag); int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey); diff -Nru a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c --- a/security/selinux/ss/conditional.c 2005-03-30 16:58:47 -08:00 +++ b/security/selinux/ss/conditional.c 2005-03-30 16:58:47 -08:00 @@ -208,7 +208,7 @@ return 0; } -int bool_isvalid(struct cond_bool_datum *b) +static int bool_isvalid(struct cond_bool_datum *b) { if (!(b->state == 0 || b->state == 1)) return 0; diff -Nru a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c --- a/security/selinux/ss/ebitmap.c 2005-03-30 16:58:51 -08:00 +++ b/security/selinux/ss/ebitmap.c 2005-03-30 16:58:51 -08:00 @@ -9,49 +9,6 @@ #include "ebitmap.h" #include "policydb.h" -int ebitmap_or(struct ebitmap *dst, struct ebitmap *e1, struct ebitmap *e2) -{ - struct ebitmap_node *n1, *n2, *new, *prev; - - ebitmap_init(dst); - - n1 = e1->node; - n2 = e2->node; - prev = NULL; - while (n1 || n2) { - new = kmalloc(sizeof(*new), GFP_ATOMIC); - if (!new) { - ebitmap_destroy(dst); - return -ENOMEM; - } - memset(new, 0, sizeof(*new)); - if (n1 && n2 && n1->startbit == n2->startbit) { - new->startbit = n1->startbit; - new->map = n1->map | n2->map; - n1 = n1->next; - n2 = n2->next; - } else if (!n2 || (n1 && n1->startbit < n2->startbit)) { - new->startbit = n1->startbit; - new->map = n1->map; - n1 = n1->next; - } else { - new->startbit = n2->startbit; - new->map = n2->map; - n2 = n2->next; - } - - new->next = NULL; - if (prev) - prev->next = new; - else - dst->node = new; - prev = new; - } - - dst->highbit = (e1->highbit > e2->highbit) ? e1->highbit : e2->highbit; - return 0; -} - int ebitmap_cmp(struct ebitmap *e1, struct ebitmap *e2) { struct ebitmap_node *n1, *n2; diff -Nru a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h --- a/security/selinux/ss/ebitmap.h 2005-03-30 16:58:48 -08:00 +++ b/security/selinux/ss/ebitmap.h 2005-03-30 16:58:48 -08:00 @@ -38,7 +38,6 @@ } int ebitmap_cmp(struct ebitmap *e1, struct ebitmap *e2); -int ebitmap_or(struct ebitmap *dst, struct ebitmap *e1, struct ebitmap *e2); int ebitmap_cpy(struct ebitmap *dst, struct ebitmap *src); int ebitmap_contains(struct ebitmap *e1, struct ebitmap *e2); int ebitmap_get_bit(struct ebitmap *e, unsigned long bit); diff -Nru a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c --- a/security/selinux/ss/hashtab.c 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/ss/hashtab.c 2005-03-30 16:58:50 -08:00 @@ -73,81 +73,6 @@ return 0; } -int hashtab_remove(struct hashtab *h, void *key, - void (*destroy)(void *k, void *d, void *args), - void *args) -{ - u32 hvalue; - struct hashtab_node *cur, *last; - - if (!h) - return -EINVAL; - - hvalue = h->hash_value(h, key); - last = NULL; - cur = h->htable[hvalue]; - while (cur != NULL && h->keycmp(h, key, cur->key) > 0) { - last = cur; - cur = cur->next; - } - - if (cur == NULL || (h->keycmp(h, key, cur->key) != 0)) - return -ENOENT; - - if (last == NULL) - h->htable[hvalue] = cur->next; - else - last->next = cur->next; - - if (destroy) - destroy(cur->key, cur->datum, args); - kfree(cur); - h->nel--; - return 0; -} - -int hashtab_replace(struct hashtab *h, void *key, void *datum, - void (*destroy)(void *k, void *d, void *args), - void *args) -{ - u32 hvalue; - struct hashtab_node *prev, *cur, *newnode; - - if (!h) - return -EINVAL; - - hvalue = h->hash_value(h, key); - prev = NULL; - cur = h->htable[hvalue]; - while (cur != NULL && h->keycmp(h, key, cur->key) > 0) { - prev = cur; - cur = cur->next; - } - - if (cur && (h->keycmp(h, key, cur->key) == 0)) { - if (destroy) - destroy(cur->key, cur->datum, args); - cur->key = key; - cur->datum = datum; - } else { - newnode = kmalloc(sizeof(*newnode), GFP_KERNEL); - if (newnode == NULL) - return -ENOMEM; - memset(newnode, 0, sizeof(*newnode)); - newnode->key = key; - newnode->datum = datum; - if (prev) { - newnode->next = prev->next; - prev->next = newnode; - } else { - newnode->next = h->htable[hvalue]; - h->htable[hvalue] = newnode; - } - } - - return 0; -} - void *hashtab_search(struct hashtab *h, void *key) { u32 hvalue; @@ -214,44 +139,6 @@ return 0; } - -void hashtab_map_remove_on_error(struct hashtab *h, - int (*apply)(void *k, void *d, void *args), - void (*destroy)(void *k, void *d, void *args), - void *args) -{ - u32 i; - int ret; - struct hashtab_node *last, *cur, *temp; - - if (!h) - return; - - for (i = 0; i < h->size; i++) { - last = NULL; - cur = h->htable[i]; - while (cur != NULL) { - ret = apply(cur->key, cur->datum, args); - if (ret) { - if (last) - last->next = cur->next; - else - h->htable[i] = cur->next; - - temp = cur; - cur = cur->next; - if (destroy) - destroy(temp->key, temp->datum, args); - kfree(temp); - h->nel--; - } else { - last = cur; - cur = cur->next; - } - } - } - return; -} void hashtab_stat(struct hashtab *h, struct hashtab_info *info) { diff -Nru a/security/selinux/ss/hashtab.h b/security/selinux/ss/hashtab.h --- a/security/selinux/ss/hashtab.h 2005-03-30 16:58:49 -08:00 +++ b/security/selinux/ss/hashtab.h 2005-03-30 16:58:49 -08:00 @@ -54,33 +54,6 @@ int hashtab_insert(struct hashtab *h, void *k, void *d); /* - * Removes the entry with the specified key from the hash table. - * Applies the specified destroy function to (key,datum,args) for - * the entry. - * - * Returns -ENOENT if no entry has the specified key, - * -EINVAL for general errors or - *0 otherwise. - */ -int hashtab_remove(struct hashtab *h, void *k, - void (*destroy)(void *k, void *d, void *args), - void *args); - -/* - * Insert or replace the specified (key, datum) pair in the specified - * hash table. If an entry for the specified key already exists, - * then the specified destroy function is applied to (key,datum,args) - * for the entry prior to replacing the entry's contents. - * - * Returns -ENOMEM if insufficient space is available, - * -EINVAL for general errors or - * 0 otherwise. - */ -int hashtab_replace(struct hashtab *h, void *k, void *d, - void (*destroy)(void *k, void *d, void *args), - void *args); - -/* * Searches for the entry with the specified key in the hash table. * * Returns NULL if no entry has the specified key or @@ -107,17 +80,6 @@ int hashtab_map(struct hashtab *h, int (*apply)(void *k, void *d, void *args), void *args); - -/* - * Same as hashtab_map, except that if apply returns a non-zero status, - * then the (key,datum) pair will be removed from the hashtab and the - * destroy function will be applied to (key,datum,args). - */ -void hashtab_map_remove_on_error(struct hashtab *h, - int (*apply)(void *k, void *d, void *args), - void (*destroy)(void *k, void *d, void *args), - void *args); - /* Fill info with some hash table statistics */ void hashtab_stat(struct hashtab *h, struct hashtab_info *info); diff -Nru a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c --- a/security/selinux/ss/policydb.c 2005-03-30 16:58:48 -08:00 +++ b/security/selinux/ss/policydb.c 2005-03-30 16:58:48 -08:00 @@ -110,7 +110,7 @@ /* * Initialize the role table. */ -int roles_init(struct policydb *p) +static int roles_init(struct policydb *p) { char *key = NULL; int rc; @@ -149,7 +149,7 @@ /* * Initialize a policy database structure. */ -int policydb_init(struct policydb *p) +static int policydb_init(struct policydb *p) { int i, rc; @@ -321,7 +321,7 @@ * * Caller must clean up upon failure. */ -int policydb_index_classes(struct policydb *p) +static int policydb_index_classes(struct policydb *p) { int rc; @@ -378,7 +378,7 @@ * * Caller must clean up on failure. */ -int policydb_index_others(struct policydb *p) +static int policydb_index_others(struct policydb *p) { int i, rc = 0; @@ -566,7 +566,7 @@ cat_destroy, }; -void ocontext_destroy(struct ocontext *c, int i) +static void ocontext_destroy(struct ocontext *c, int i) { context_destroy(&c->context[0]); context_destroy(&c->context[1]); diff -Nru a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h --- a/security/selinux/ss/policydb.h 2005-03-30 16:58:49 -08:00 +++ b/security/selinux/ss/policydb.h 2005-03-30 16:58:49 -08:00 @@ -240,9 +240,6 @@ unsigned int policyvers; }; -extern int policydb_init(struct policydb *p); -extern int policydb_index_classes(struct policydb *p); -extern int policydb_index_others(struct policydb *p); extern void policydb_destroy(struct policydb *p); extern int policydb_load_isids(struct policydb *p, struct sidtab *s); extern int policydb_context_isvalid(struct policydb *p, struct context *c); diff -Nru a/security/selinux/ss/services.c b/security/selinux/ss/services.c --- a/security/selinux/ss/services.c 2005-03-30 16:58:50 -08:00 +++ b/security/selinux/ss/services.c 2005-03-30 16:58:50 -08:00 @@ -52,7 +52,7 @@ #define LOAD_LOCK down(&load_sem) #define LOAD_UNLOCK up(&load_sem) -struct sidtab sidtab; +static struct sidtab sidtab; struct policydb policydb; int ss_initialized = 0; @@ -64,9 +64,9 @@ */ static u32 latest_granting = 0; -/* Forward declarations. */ -int context_struct_to_string(struct context *context, char **scontext, - u32 *scontext_len); +/* Forward declaration. */ +static int context_struct_to_string(struct context *context, char **scontext, + u32 *scontext_len); /* * Return the boolean value of a constraint expression @@ -79,10 +79,10 @@ * of the process performing the transition. All other callers of * constraint_expr_eval should pass in NULL for xcontext. */ -int constraint_expr_eval(struct context *scontext, - struct context *tcontext, - struct context *xcontext, - struct constraint_expr *cexpr) +static int constraint_expr_eval(struct context *scontext, + struct context *tcontext, + struct context *xcontext, + struct constraint_expr *cexpr) { u32 val1, val2; struct context *c; @@ -515,7 +515,7 @@ * to point to this string and set `*scontext_len' to * the length of the string. */ -int context_struct_to_string(struct context *context, char **scontext, u32 *scontext_len) +static int context_struct_to_string(struct context *context, char **scontext, u32 *scontext_len) { char *scontextp; diff -Nru a/security/selinux/ss/services.h b/security/selinux/ss/services.h --- a/security/selinux/ss/services.h 2005-03-30 16:58:47 -08:00 +++ b/security/selinux/ss/services.h 2005-03-30 16:58:47 -08:00 @@ -9,12 +9,6 @@ #include "policydb.h" #include "sidtab.h" -/* - * The security server uses two global data structures - * when providing its services: the SID table (sidtab) - * and the policy database (policydb). - */ -extern struct sidtab sidtab; extern struct policydb policydb; #endif /* _SS_SERVICES_H_ */ diff -Nru a/security/selinux/ss/sidtab.c b/security/selinux/ss/sidtab.c --- a/security/selinux/ss/sidtab.c 2005-03-30 16:58:49 -08:00 +++ b/security/selinux/ss/sidtab.c 2005-03-30 16:58:49 -08:00 @@ -87,42 +87,6 @@ return rc; } -int sidtab_remove(struct sidtab *s, u32 sid) -{ - int hvalue, rc = 0; - struct sidtab_node *cur, *last; - - if (!s) { - rc = -ENOENT; - goto out; - } - - hvalue = SIDTAB_HASH(sid); - last = NULL; - cur = s->htable[hvalue]; - while (cur != NULL && sid > cur->sid) { - last = cur; - cur = cur->next; - } - - if (cur == NULL || sid != cur->sid) { - rc = -ENOENT; - goto out; - } - - if (last == NULL) - s->htable[hvalue] = cur->next; - else - last->next = cur->next; - - context_destroy(&cur->context); - - kfree(cur); - s->nel--; -out: - return rc; -} - struct context *sidtab_search(struct sidtab *s, u32 sid) { int hvalue; diff -Nru a/sound/core/control.c b/sound/core/control.c --- a/sound/core/control.c 2005-03-30 16:58:47 -08:00 +++ b/sound/core/control.c 2005-03-30 16:58:47 -08:00 @@ -519,20 +519,25 @@ static int snd_ctl_card_info(snd_card_t * card, snd_ctl_file_t * ctl, unsigned int cmd, void __user *arg) { - snd_ctl_card_info_t info; + snd_ctl_card_info_t *info; - memset(&info, 0, sizeof(info)); + info = kcalloc(1, sizeof(*info), GFP_KERNEL); + if (! info) + return -ENOMEM; down_read(&snd_ioctl_rwsem); - info.card = card->number; - strlcpy(info.id, card->id, sizeof(info.id)); - strlcpy(info.driver, card->driver, sizeof(info.driver)); - strlcpy(info.name, card->shortname, sizeof(info.name)); - strlcpy(info.longname, card->longname, sizeof(info.longname)); - strlcpy(info.mixername, card->mixername, sizeof(info.mixername)); - strlcpy(info.components, card->components, sizeof(info.components)); + info->card = card->number; + strlcpy(info->id, card->id, sizeof(info->id)); + strlcpy(info->driver, card->driver, sizeof(info->driver)); + strlcpy(info->name, card->shortname, sizeof(info->name)); + strlcpy(info->longname, card->longname, sizeof(info->longname)); + strlcpy(info->mixername, card->mixername, sizeof(info->mixername)); + strlcpy(info->components, card->components, sizeof(info->components)); up_read(&snd_ioctl_rwsem); - if (copy_to_user(arg, &info, sizeof(snd_ctl_card_info_t))) + if (copy_to_user(arg, info, sizeof(snd_ctl_card_info_t))) { + kfree(info); return -EFAULT; + } + kfree(info); return 0; } diff -Nru a/sound/core/info.c b/sound/core/info.c --- a/sound/core/info.c 2005-03-30 16:58:50 -08:00 +++ b/sound/core/info.c 2005-03-30 16:58:50 -08:00 @@ -92,19 +92,18 @@ int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) { va_list args; - int res; - char sbuffer[512]; + int len, res; if (buffer->stop || buffer->error) return 0; + len = buffer->len - buffer->size; va_start(args, fmt); - res = vscnprintf(sbuffer, sizeof(sbuffer), fmt, args); + res = vsnprintf(buffer->curr, len, fmt, args); va_end(args); - if (buffer->size + res >= buffer->len) { + if (res >= len) { buffer->stop = 1; return 0; } - strcpy(buffer->curr, sbuffer); buffer->curr += res; buffer->size += res; return res; diff -Nru a/sound/core/misc.c b/sound/core/misc.c --- a/sound/core/misc.c 2005-03-30 16:58:48 -08:00 +++ b/sound/core/misc.c 2005-03-30 16:58:48 -08:00 @@ -40,7 +40,6 @@ void snd_verbose_printk(const char *file, int line, const char *format, ...) { va_list args; - char tmpbuf[512]; if (format[0] == '<' && format[1] >= '0' && format[1] <= '9' && format[2] == '>') { char tmp[] = "<0>"; @@ -51,9 +50,8 @@ printk("ALSA %s:%d: ", file, line); } va_start(args, format); - vsnprintf(tmpbuf, sizeof(tmpbuf), format, args); + vprintk(format, args); va_end(args); - printk(tmpbuf); } #endif @@ -61,7 +59,6 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) { va_list args; - char tmpbuf[512]; if (format[0] == '<' && format[1] >= '0' && format[1] <= '9' && format[2] == '>') { char tmp[] = "<0>"; @@ -72,9 +69,8 @@ printk(KERN_DEBUG "ALSA %s:%d: ", file, line); } va_start(args, format); - vsnprintf(tmpbuf, sizeof(tmpbuf), format, args); + vprintk(format, args); va_end(args); - printk(tmpbuf); } #endif diff -Nru a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c --- a/sound/core/oss/mixer_oss.c 2005-03-30 16:58:49 -08:00 +++ b/sound/core/oss/mixer_oss.c 2005-03-30 16:58:49 -08:00 @@ -857,7 +857,7 @@ static int snd_mixer_oss_build_test(snd_mixer_oss_t *mixer, struct slot *slot, const char *name, int index, int item) { - snd_ctl_elem_info_t info; + snd_ctl_elem_info_t *info; snd_kcontrol_t *kcontrol; snd_card_t *card = mixer->card; int err; @@ -868,15 +868,22 @@ up_read(&card->controls_rwsem); return 0; } - if ((err = kcontrol->info(kcontrol, &info)) < 0) { + info = kmalloc(sizeof(*info), GFP_KERNEL); + if (! info) { up_read(&card->controls_rwsem); + return -ENOMEM; + } + if ((err = kcontrol->info(kcontrol, info)) < 0) { + up_read(&card->controls_rwsem); + kfree(info); return err; } slot->numid[item] = kcontrol->id.numid; up_read(&card->controls_rwsem); - if (info.count > slot->channels) - slot->channels = info.count; + if (info->count > slot->channels) + slot->channels = info->count; slot->present |= 1 << item; + kfree(info); return 0; } @@ -961,10 +968,16 @@ return 0; down_read(&mixer->card->controls_rwsem); if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) { - snd_ctl_elem_info_t uinfo; + snd_ctl_elem_info_t *uinfo; - memset(&uinfo, 0, sizeof(uinfo)); - if (kctl->info(kctl, &uinfo)) { + uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL); + if (! uinfo) { + up_read(&mixer->card->controls_rwsem); + return -ENOMEM; + } + + memset(uinfo, 0, sizeof(*uinfo)); + if (kctl->info(kctl, uinfo)) { up_read(&mixer->card->controls_rwsem); return 0; } @@ -974,21 +987,22 @@ if (!strcmp(str, "Master Mono")) strcpy(str, "Mix Mono"); slot.capture_item = 0; - if (!strcmp(uinfo.value.enumerated.name, str)) { + if (!strcmp(uinfo->value.enumerated.name, str)) { slot.present |= SNDRV_MIXER_OSS_PRESENT_CAPTURE; } else { - for (slot.capture_item = 1; slot.capture_item < uinfo.value.enumerated.items; slot.capture_item++) { - uinfo.value.enumerated.item = slot.capture_item; - if (kctl->info(kctl, &uinfo)) { + for (slot.capture_item = 1; slot.capture_item < uinfo->value.enumerated.items; slot.capture_item++) { + uinfo->value.enumerated.item = slot.capture_item; + if (kctl->info(kctl, uinfo)) { up_read(&mixer->card->controls_rwsem); return 0; } - if (!strcmp(uinfo.value.enumerated.name, str)) { + if (!strcmp(uinfo->value.enumerated.name, str)) { slot.present |= SNDRV_MIXER_OSS_PRESENT_CAPTURE; break; } } } + kfree(uinfo); } up_read(&mixer->card->controls_rwsem); if (slot.present != 0) { diff -Nru a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c --- a/sound/core/oss/pcm_oss.c 2005-03-30 16:58:50 -08:00 +++ b/sound/core/oss/pcm_oss.c 2005-03-30 16:58:50 -08:00 @@ -2294,7 +2294,7 @@ snd_info_buffer_t * buffer) { snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data; - char line[256], str[32], task_name[32], *ptr; + char line[128], str[32], task_name[32], *ptr; int idx1; snd_pcm_oss_setup_t *setup, *setup1, template; diff -Nru a/sound/core/pcm.c b/sound/core/pcm.c --- a/sound/core/pcm.c 2005-03-30 16:58:50 -08:00 +++ b/sound/core/pcm.c 2005-03-30 16:58:50 -08:00 @@ -270,25 +270,35 @@ #ifdef CONFIG_PROC_FS static void snd_pcm_proc_info_read(snd_pcm_substream_t *substream, snd_info_buffer_t *buffer) { - snd_pcm_info_t info; + snd_pcm_info_t *info; int err; + snd_runtime_check(substream, return); - err = snd_pcm_info(substream, &info); + + info = kmalloc(sizeof(*info), GFP_KERNEL); + if (! info) { + printk(KERN_DEBUG "snd_pcm_proc_info_read: cannot malloc\n"); + return; + } + + err = snd_pcm_info(substream, info); if (err < 0) { snd_iprintf(buffer, "error %d\n", err); + kfree(info); return; } - snd_iprintf(buffer, "card: %d\n", info.card); - snd_iprintf(buffer, "device: %d\n", info.device); - snd_iprintf(buffer, "subdevice: %d\n", info.subdevice); - snd_iprintf(buffer, "stream: %s\n", snd_pcm_stream_name(info.stream)); - snd_iprintf(buffer, "id: %s\n", info.id); - snd_iprintf(buffer, "name: %s\n", info.name); - snd_iprintf(buffer, "subname: %s\n", info.subname); - snd_iprintf(buffer, "class: %d\n", info.dev_class); - snd_iprintf(buffer, "subclass: %d\n", info.dev_subclass); - snd_iprintf(buffer, "subdevices_count: %d\n", info.subdevices_count); - snd_iprintf(buffer, "subdevices_avail: %d\n", info.subdevices_avail); + snd_iprintf(buffer, "card: %d\n", info->card); + snd_iprintf(buffer, "device: %d\n", info->device); + snd_iprintf(buffer, "subdevice: %d\n", info->subdevice); + snd_iprintf(buffer, "stream: %s\n", snd_pcm_stream_name(info->stream)); + snd_iprintf(buffer, "id: %s\n", info->id); + snd_iprintf(buffer, "name: %s\n", info->name); + snd_iprintf(buffer, "subname: %s\n", info->subname); + snd_iprintf(buffer, "class: %d\n", info->dev_class); + snd_iprintf(buffer, "subclass: %d\n", info->dev_subclass); + snd_iprintf(buffer, "subdevices_count: %d\n", info->subdevices_count); + snd_iprintf(buffer, "subdevices_avail: %d\n", info->subdevices_avail); + kfree(info); } static void snd_pcm_stream_proc_info_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) diff -Nru a/sound/core/pcm_native.c b/sound/core/pcm_native.c --- a/sound/core/pcm_native.c 2005-03-30 16:58:48 -08:00 +++ b/sound/core/pcm_native.c 2005-03-30 16:58:48 -08:00 @@ -113,10 +113,18 @@ int snd_pcm_info_user(snd_pcm_substream_t * substream, snd_pcm_info_t __user * _info) { - snd_pcm_info_t info; - int err = snd_pcm_info(substream, &info); - if (copy_to_user(_info, &info, sizeof(info))) - return -EFAULT; + snd_pcm_info_t *info; + int err; + + info = kmalloc(sizeof(*info), GFP_KERNEL); + if (! info) + return -ENOMEM; + err = snd_pcm_info(substream, info); + if (err >= 0) { + if (copy_to_user(_info, info, sizeof(*info))) + err = -EFAULT; + } + kfree(info); return err; } @@ -1038,7 +1046,13 @@ */ int snd_pcm_suspend(snd_pcm_substream_t *substream) { - return snd_pcm_action(&snd_pcm_action_suspend, substream, 0); + int err; + unsigned long flags; + + snd_pcm_stream_lock_irqsave(substream, flags); + err = snd_pcm_action(&snd_pcm_action_suspend, substream, 0); + snd_pcm_stream_unlock_irqrestore(substream, flags); + return err; } /** @@ -1057,11 +1071,8 @@ /* FIXME: the open/close code should lock this as well */ if (substream->runtime == NULL) continue; - snd_pcm_stream_lock(substream); - if (substream->runtime->status->state != SNDRV_PCM_STATE_SUSPENDED) - err = snd_pcm_suspend(substream); - snd_pcm_stream_unlock(substream); - if (err < 0) + err = snd_pcm_suspend(substream); + if (err < 0 && err != -EBUSY) return err; } } @@ -3097,8 +3108,8 @@ area->vm_flags |= VM_IO; size = area->vm_end - area->vm_start; offset = area->vm_pgoff << PAGE_SHIFT; - if (io_remap_page_range(area, area->vm_start, - substream->runtime->dma_addr + offset, + if (io_remap_pfn_range(area, area->vm_start, + (substream->runtime->dma_addr + offset) >> PAGE_SHIFT, size, area->vm_page_prot)) return -EAGAIN; atomic_inc(&substream->runtime->mmap_count); diff -Nru a/sound/core/rawmidi.c b/sound/core/rawmidi.c --- a/sound/core/rawmidi.c 2005-03-30 16:58:47 -08:00 +++ b/sound/core/rawmidi.c 2005-03-30 16:58:47 -08:00 @@ -85,12 +85,18 @@ (!substream->append || runtime->avail >= count); } -static void snd_rawmidi_event_tasklet(unsigned long data) +static void snd_rawmidi_input_event_tasklet(unsigned long data) { snd_rawmidi_substream_t *substream = (snd_rawmidi_substream_t *)data; substream->runtime->event(substream); } +static void snd_rawmidi_output_trigger_tasklet(unsigned long data) +{ + snd_rawmidi_substream_t *substream = (snd_rawmidi_substream_t *)data; + substream->ops->trigger(substream, 1); +} + static int snd_rawmidi_runtime_create(snd_rawmidi_substream_t * substream) { snd_rawmidi_runtime_t *runtime; @@ -99,8 +105,14 @@ return -ENOMEM; spin_lock_init(&runtime->lock); init_waitqueue_head(&runtime->sleep); - tasklet_init(&runtime->event_tasklet, snd_rawmidi_event_tasklet, - (unsigned long)substream); + if (substream->stream == SNDRV_RAWMIDI_STREAM_INPUT) + tasklet_init(&runtime->tasklet, + snd_rawmidi_input_event_tasklet, + (unsigned long)substream); + else + tasklet_init(&runtime->tasklet, + snd_rawmidi_output_trigger_tasklet, + (unsigned long)substream); runtime->event = NULL; runtime->buffer_size = PAGE_SIZE; runtime->avail_min = 1; @@ -127,23 +139,34 @@ return 0; } -static void snd_rawmidi_trigger(snd_rawmidi_substream_t * substream, int up) +static inline void snd_rawmidi_output_trigger(snd_rawmidi_substream_t * substream, int up) +{ + if (up) { + tasklet_hi_schedule(&substream->runtime->tasklet); + } else { + tasklet_kill(&substream->runtime->tasklet); + substream->ops->trigger(substream, 0); + } +} + +static void snd_rawmidi_input_trigger(snd_rawmidi_substream_t * substream, int up) { substream->ops->trigger(substream, up); if (!up && substream->runtime->event) - tasklet_kill(&substream->runtime->event_tasklet); + tasklet_kill(&substream->runtime->tasklet); } int snd_rawmidi_drop_output(snd_rawmidi_substream_t * substream) { + unsigned long flags; snd_rawmidi_runtime_t *runtime = substream->runtime; - snd_rawmidi_trigger(substream, 0); + snd_rawmidi_output_trigger(substream, 0); runtime->drain = 0; - /* interrupts are not enabled at this moment, - so spinlock is not required */ + spin_lock_irqsave(&runtime->lock, flags); runtime->appl_ptr = runtime->hw_ptr = 0; runtime->avail = runtime->buffer_size; + spin_unlock_irqrestore(&runtime->lock, flags); return 0; } @@ -178,13 +201,15 @@ int snd_rawmidi_drain_input(snd_rawmidi_substream_t * substream) { + unsigned long flags; snd_rawmidi_runtime_t *runtime = substream->runtime; - snd_rawmidi_trigger(substream, 0); + snd_rawmidi_input_trigger(substream, 0); runtime->drain = 0; - /* interrupts aren't enabled at this moment, so spinlock isn't needed */ + spin_lock_irqsave(&runtime->lock, flags); runtime->appl_ptr = runtime->hw_ptr = 0; runtime->avail = 0; + spin_unlock_irqrestore(&runtime->lock, flags); return 0; } @@ -458,7 +483,7 @@ substream = rfile->input; rfile->input = NULL; runtime = substream->runtime; - snd_rawmidi_trigger(substream, 0); + snd_rawmidi_input_trigger(substream, 0); substream->ops->close(substream); if (runtime->private_free != NULL) runtime->private_free(substream); @@ -477,7 +502,7 @@ snd_rawmidi_kernel_write(substream, &buf, 1); } if (snd_rawmidi_drain_output(substream) == -ERESTARTSYS) - snd_rawmidi_trigger(substream, 0); + snd_rawmidi_output_trigger(substream, 0); substream->ops->close(substream); if (runtime->private_free != NULL) runtime->private_free(substream); @@ -875,7 +900,7 @@ } if (result > 0) { if (runtime->event) - tasklet_hi_schedule(&runtime->event_tasklet); + tasklet_hi_schedule(&runtime->tasklet); else if (snd_rawmidi_ready(substream)) wake_up(&runtime->sleep); } @@ -919,7 +944,7 @@ long snd_rawmidi_kernel_read(snd_rawmidi_substream_t *substream, unsigned char *buf, long count) { - snd_rawmidi_trigger(substream, 1); + snd_rawmidi_input_trigger(substream, 1); return snd_rawmidi_kernel_read1(substream, buf, count, 1); } @@ -936,7 +961,7 @@ if (substream == NULL) return -EIO; runtime = substream->runtime; - snd_rawmidi_trigger(substream, 1); + snd_rawmidi_input_trigger(substream, 1); result = 0; while (count > 0) { spin_lock_irq(&runtime->lock); @@ -1072,11 +1097,8 @@ runtime->avail += count; substream->bytes += count; if (count > 0) { - if (runtime->drain || - (runtime->event == NULL && snd_rawmidi_ready(substream))) + if (runtime->drain || snd_rawmidi_ready(substream)) wake_up(&runtime->sleep); - if (runtime->event) - tasklet_hi_schedule(&runtime->event_tasklet); } spin_unlock_irqrestore(&runtime->lock, flags); return count; @@ -1146,7 +1168,7 @@ count1 = runtime->avail < runtime->buffer_size; spin_unlock_irqrestore(&runtime->lock, flags); if (count1) - snd_rawmidi_trigger(substream, 1); + snd_rawmidi_output_trigger(substream, 1); return result; } @@ -1231,7 +1253,7 @@ rfile = file->private_data; if (rfile->input != NULL) { runtime = rfile->input->runtime; - snd_rawmidi_trigger(rfile->input, 1); + snd_rawmidi_input_trigger(rfile->input, 1); poll_wait(file, &runtime->sleep, wait); } if (rfile->output != NULL) { diff -Nru a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c --- a/sound/core/seq/oss/seq_oss_init.c 2005-03-30 16:58:47 -08:00 +++ b/sound/core/seq/oss/seq_oss_init.c 2005-03-30 16:58:47 -08:00 @@ -66,10 +66,17 @@ { int rc; snd_seq_client_callback_t callback; - snd_seq_client_info_t info; - snd_seq_port_info_t port; + snd_seq_client_info_t *info; + snd_seq_port_info_t *port; snd_seq_port_callback_t port_callback; + info = kmalloc(sizeof(*info), GFP_KERNEL); + port = kmalloc(sizeof(*port), GFP_KERNEL); + if (!info || !port) { + rc = -ENOMEM; + goto __error; + } + /* create ALSA client */ memset(&callback, 0, sizeof(callback)); @@ -79,38 +86,38 @@ rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS, &callback); if (rc < 0) - return rc; + goto __error; system_client = rc; debug_printk(("new client = %d\n", rc)); /* set client information */ - memset(&info, 0, sizeof(info)); - info.client = system_client; - info.type = KERNEL_CLIENT; - strcpy(info.name, "OSS sequencer"); + memset(info, 0, sizeof(*info)); + info->client = system_client; + info->type = KERNEL_CLIENT; + strcpy(info->name, "OSS sequencer"); - rc = call_ctl(SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &info); + rc = call_ctl(SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, info); /* look up midi devices */ snd_seq_oss_midi_lookup_ports(system_client); /* create annoucement receiver port */ - memset(&port, 0, sizeof(port)); - strcpy(port.name, "Receiver"); - port.addr.client = system_client; - port.capability = SNDRV_SEQ_PORT_CAP_WRITE; /* receive only */ - port.type = 0; + memset(port, 0, sizeof(*port)); + strcpy(port->name, "Receiver"); + port->addr.client = system_client; + port->capability = SNDRV_SEQ_PORT_CAP_WRITE; /* receive only */ + port->type = 0; memset(&port_callback, 0, sizeof(port_callback)); /* don't set port_callback.owner here. otherwise the module counter * is incremented and we can no longer release the module.. */ port_callback.event_input = receive_announce; - port.kernel = &port_callback; + port->kernel = &port_callback; - call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, &port); - if ((system_port = port.addr.port) >= 0) { + call_ctl(SNDRV_SEQ_IOCTL_CREATE_PORT, port); + if ((system_port = port->addr.port) >= 0) { snd_seq_port_subscribe_t subs; memset(&subs, 0, sizeof(subs)); @@ -120,9 +127,12 @@ subs.dest.port = system_port; call_ctl(SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs); } + rc = 0; - - return 0; + __error: + kfree(port); + kfree(info); + return rc; } diff -Nru a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c --- a/sound/core/seq/oss/seq_oss_midi.c 2005-03-30 16:58:47 -08:00 +++ b/sound/core/seq/oss/seq_oss_midi.c 2005-03-30 16:58:47 -08:00 @@ -73,26 +73,27 @@ int __init snd_seq_oss_midi_lookup_ports(int client) { - snd_seq_system_info_t sysinfo; - snd_seq_client_info_t clinfo; - snd_seq_port_info_t pinfo; - int rc; + snd_seq_client_info_t *clinfo; + snd_seq_port_info_t *pinfo; - rc = snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SYSTEM_INFO, &sysinfo); - if (rc < 0) - return rc; - - memset(&clinfo, 0, sizeof(clinfo)); - memset(&pinfo, 0, sizeof(pinfo)); - clinfo.client = -1; - while (snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT, &clinfo) == 0) { - if (clinfo.client == client) + clinfo = kcalloc(1, sizeof(*clinfo), GFP_KERNEL); + pinfo = kcalloc(1, sizeof(*pinfo), GFP_KERNEL); + if (! clinfo || ! pinfo) { + kfree(clinfo); + kfree(pinfo); + return -ENOMEM; + } + clinfo->client = -1; + while (snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT, clinfo) == 0) { + if (clinfo->client == client) continue; /* ignore myself */ - pinfo.addr.client = clinfo.client; - pinfo.addr.port = -1; - while (snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT, &pinfo) == 0) - snd_seq_oss_midi_check_new_port(&pinfo); + pinfo->addr.client = clinfo->client; + pinfo->addr.port = -1; + while (snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT, pinfo) == 0) + snd_seq_oss_midi_check_new_port(pinfo); } + kfree(clinfo); + kfree(pinfo); return 0; } diff -Nru a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c --- a/sound/core/seq/seq_midi.c 2005-03-30 16:58:51 -08:00 +++ b/sound/core/seq/seq_midi.c 2005-03-30 16:58:51 -08:00 @@ -289,8 +289,8 @@ { seq_midisynth_client_t *client; seq_midisynth_t *msynth, *ms; - snd_seq_port_info_t port; - snd_rawmidi_info_t info; + snd_seq_port_info_t *port; + snd_rawmidi_info_t *info; int newclient = 0; unsigned int p, ports; snd_seq_client_callback_t callbacks; @@ -300,20 +300,25 @@ unsigned int input_count = 0, output_count = 0; snd_assert(card != NULL && device >= 0 && device < SNDRV_RAWMIDI_DEVICES, return -EINVAL); - info.device = device; - info.stream = SNDRV_RAWMIDI_STREAM_OUTPUT; - info.subdevice = 0; - if (snd_rawmidi_info_select(card, &info) >= 0) - output_count = info.subdevices_count; - info.stream = SNDRV_RAWMIDI_STREAM_INPUT; - if (snd_rawmidi_info_select(card, &info) >= 0) { - input_count = info.subdevices_count; + info = kmalloc(sizeof(*info), GFP_KERNEL); + if (! info) + return -ENOMEM; + info->device = device; + info->stream = SNDRV_RAWMIDI_STREAM_OUTPUT; + info->subdevice = 0; + if (snd_rawmidi_info_select(card, info) >= 0) + output_count = info->subdevices_count; + info->stream = SNDRV_RAWMIDI_STREAM_INPUT; + if (snd_rawmidi_info_select(card, info) >= 0) { + input_count = info->subdevices_count; } ports = output_count; if (ports < input_count) ports = input_count; - if (ports == 0) + if (ports == 0) { + kfree(info); return -ENODEV; + } if (ports > (256 / SNDRV_RAWMIDI_DEVICES)) ports = 256 / SNDRV_RAWMIDI_DEVICES; @@ -324,6 +329,7 @@ client = kcalloc(1, sizeof(*client), GFP_KERNEL); if (client == NULL) { up(®ister_mutex); + kfree(info); return -ENOMEM; } memset(&callbacks, 0, sizeof(callbacks)); @@ -333,14 +339,16 @@ if (client->seq_client < 0) { kfree(client); up(®ister_mutex); + kfree(info); return -ENOMEM; } - set_client_name(client, card, &info); + set_client_name(client, card, info); } else if (device == 0) - set_client_name(client, card, &info); /* use the first device's name */ + set_client_name(client, card, info); /* use the first device's name */ msynth = kcalloc(ports, sizeof(seq_midisynth_t), GFP_KERNEL); - if (msynth == NULL) + port = kmalloc(sizeof(*port), GFP_KERNEL); + if (msynth == NULL || port == NULL) goto __nomem; for (p = 0; p < ports; p++) { @@ -350,42 +358,42 @@ goto __nomem; /* declare port */ - memset(&port, 0, sizeof(port)); - port.addr.client = client->seq_client; - port.addr.port = device * (256 / SNDRV_RAWMIDI_DEVICES) + p; - port.flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT; - memset(&info, 0, sizeof(info)); - info.device = device; + memset(port, 0, sizeof(*port)); + port->addr.client = client->seq_client; + port->addr.port = device * (256 / SNDRV_RAWMIDI_DEVICES) + p; + port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT; + memset(info, 0, sizeof(*info)); + info->device = device; if (p < output_count) - info.stream = SNDRV_RAWMIDI_STREAM_OUTPUT; + info->stream = SNDRV_RAWMIDI_STREAM_OUTPUT; else - info.stream = SNDRV_RAWMIDI_STREAM_INPUT; - info.subdevice = p; - if (snd_rawmidi_info_select(card, &info) >= 0) - strcpy(port.name, info.subname); - if (! port.name[0]) { - if (info.name[0]) { + info->stream = SNDRV_RAWMIDI_STREAM_INPUT; + info->subdevice = p; + if (snd_rawmidi_info_select(card, info) >= 0) + strcpy(port->name, info->subname); + if (! port->name[0]) { + if (info->name[0]) { if (ports > 1) - snprintf(port.name, sizeof(port.name), "%s-%d", info.name, p); + snprintf(port->name, sizeof(port->name), "%s-%d", info->name, p); else - snprintf(port.name, sizeof(port.name), "%s", info.name); + snprintf(port->name, sizeof(port->name), "%s", info->name); } else { /* last resort */ if (ports > 1) - sprintf(port.name, "MIDI %d-%d-%d", card->number, device, p); + sprintf(port->name, "MIDI %d-%d-%d", card->number, device, p); else - sprintf(port.name, "MIDI %d-%d", card->number, device); + sprintf(port->name, "MIDI %d-%d", card->number, device); } } - if ((info.flags & SNDRV_RAWMIDI_INFO_OUTPUT) && p < output_count) - port.capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; - if ((info.flags & SNDRV_RAWMIDI_INFO_INPUT) && p < input_count) - port.capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; - if ((port.capability & (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ)) == (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ) && - info.flags & SNDRV_RAWMIDI_INFO_DUPLEX) - port.capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; - port.type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; - port.midi_channels = 16; + if ((info->flags & SNDRV_RAWMIDI_INFO_OUTPUT) && p < output_count) + port->capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; + if ((info->flags & SNDRV_RAWMIDI_INFO_INPUT) && p < input_count) + port->capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; + if ((port->capability & (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ)) == (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ) && + info->flags & SNDRV_RAWMIDI_INFO_DUPLEX) + port->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; + port->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; + port->midi_channels = 16; memset(&pcallbacks, 0, sizeof(pcallbacks)); pcallbacks.owner = THIS_MODULE; pcallbacks.private_data = ms; @@ -394,11 +402,11 @@ pcallbacks.use = midisynth_use; pcallbacks.unuse = midisynth_unuse; pcallbacks.event_input = event_process_midi; - port.kernel = &pcallbacks; - if (snd_seq_kernel_client_ctl(client->seq_client, SNDRV_SEQ_IOCTL_CREATE_PORT, &port)<0) + port->kernel = &pcallbacks; + if (snd_seq_kernel_client_ctl(client->seq_client, SNDRV_SEQ_IOCTL_CREATE_PORT, port)<0) goto __nomem; ms->seq_client = client->seq_client; - ms->seq_port = port.addr.port; + ms->seq_port = port->addr.port; } client->ports_per_device[device] = ports; client->ports[device] = msynth; @@ -418,6 +426,8 @@ snd_seq_delete_kernel_client(client->seq_client); kfree(client); } + kfree(info); + kfree(port); up(®ister_mutex); return -ENOMEM; } diff -Nru a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c --- a/sound/core/seq/seq_midi_emul.c 2005-03-30 16:58:50 -08:00 +++ b/sound/core/seq/seq_midi_emul.c 2005-03-30 16:58:50 -08:00 @@ -244,8 +244,8 @@ if (chan->gm_hold) { /* Hold this note until pedal is turned off */ chan->note[note] |= SNDRV_MIDI_NOTE_RELEASED; - } else if (chan->note[note] & SNDRV_MIDI_NOTE_SUSTENUTO) { - /* Mark this note as release; it will be turned off when sustenuto + } else if (chan->note[note] & SNDRV_MIDI_NOTE_SOSTENUTO) { + /* Mark this note as release; it will be turned off when sostenuto * is turned off */ chan->note[note] |= SNDRV_MIDI_NOTE_RELEASED; } else { @@ -287,18 +287,18 @@ break; case MIDI_CTL_PORTAMENTO: break; - case MIDI_CTL_SUSTENUTO: + case MIDI_CTL_SOSTENUTO: if (value) { /* Mark each note that is currently held down */ for (i = 0; i < 128; i++) { if (chan->note[i] & SNDRV_MIDI_NOTE_ON) - chan->note[i] |= SNDRV_MIDI_NOTE_SUSTENUTO; + chan->note[i] |= SNDRV_MIDI_NOTE_SOSTENUTO; } } else { /* release all notes that were held */ for (i = 0; i < 128; i++) { - if (chan->note[i] & SNDRV_MIDI_NOTE_SUSTENUTO) { - chan->note[i] &= ~SNDRV_MIDI_NOTE_SUSTENUTO; + if (chan->note[i] & SNDRV_MIDI_NOTE_SOSTENUTO) { + chan->note[i] &= ~SNDRV_MIDI_NOTE_SOSTENUTO; if (chan->note[i] & SNDRV_MIDI_NOTE_RELEASED) { chan->note[i] = SNDRV_MIDI_NOTE_OFF; if (ops->note_off) diff -Nru a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c --- a/sound/core/seq/seq_system.c 2005-03-30 16:58:49 -08:00 +++ b/sound/core/seq/seq_system.c 2005-03-30 16:58:49 -08:00 @@ -123,13 +123,19 @@ snd_seq_client_callback_t callbacks; snd_seq_port_callback_t pcallbacks; - snd_seq_client_info_t inf; - snd_seq_port_info_t port; + snd_seq_client_info_t *inf; + snd_seq_port_info_t *port; + + inf = kcalloc(1, sizeof(*inf), GFP_KERNEL); + port = kcalloc(1, sizeof(*port), GFP_KERNEL); + if (! inf || ! port) { + kfree(inf); + kfree(port); + return -ENOMEM; + } memset(&callbacks, 0, sizeof(callbacks)); memset(&pcallbacks, 0, sizeof(pcallbacks)); - memset(&inf, 0, sizeof(inf)); - memset(&port, 0, sizeof(port)); pcallbacks.owner = THIS_MODULE; pcallbacks.event_input = event_input_timer; @@ -138,33 +144,35 @@ sysclient = snd_seq_create_kernel_client(NULL, 0, &callbacks); /* set our name */ - inf.client = 0; - inf.type = KERNEL_CLIENT; - strcpy(inf.name, "System"); - snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &inf); + inf->client = 0; + inf->type = KERNEL_CLIENT; + strcpy(inf->name, "System"); + snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, inf); /* register timer */ - strcpy(port.name, "Timer"); - port.capability = SNDRV_SEQ_PORT_CAP_WRITE; /* accept queue control */ - port.capability |= SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ; /* for broadcast */ - port.kernel = &pcallbacks; - port.type = 0; - port.flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT; - port.addr.client = sysclient; - port.addr.port = SNDRV_SEQ_PORT_SYSTEM_TIMER; - snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, &port); + strcpy(port->name, "Timer"); + port->capability = SNDRV_SEQ_PORT_CAP_WRITE; /* accept queue control */ + port->capability |= SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ; /* for broadcast */ + port->kernel = &pcallbacks; + port->type = 0; + port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT; + port->addr.client = sysclient; + port->addr.port = SNDRV_SEQ_PORT_SYSTEM_TIMER; + snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, port); /* register announcement port */ - strcpy(port.name, "Announce"); - port.capability = SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ; /* for broadcast only */ - port.kernel = NULL; - port.type = 0; - port.flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT; - port.addr.client = sysclient; - port.addr.port = SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE; - snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, &port); - announce_port = port.addr.port; + strcpy(port->name, "Announce"); + port->capability = SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ; /* for broadcast only */ + port->kernel = NULL; + port->type = 0; + port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT; + port->addr.client = sysclient; + port->addr.port = SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE; + snd_seq_kernel_client_ctl(sysclient, SNDRV_SEQ_IOCTL_CREATE_PORT, port); + announce_port = port->addr.port; + kfree(inf); + kfree(port); return 0; } diff -Nru a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c --- a/sound/core/seq/seq_virmidi.c 2005-03-30 16:58:49 -08:00 +++ b/sound/core/seq/seq_virmidi.c 2005-03-30 16:58:49 -08:00 @@ -354,39 +354,48 @@ int client; snd_seq_client_callback_t callbacks; snd_seq_port_callback_t pcallbacks; - snd_seq_client_info_t info; - snd_seq_port_info_t pinfo; + snd_seq_client_info_t *info; + snd_seq_port_info_t *pinfo; int err; if (rdev->client >= 0) return 0; + info = kmalloc(sizeof(*info), GFP_KERNEL); + pinfo = kmalloc(sizeof(*pinfo), GFP_KERNEL); + if (! info || ! pinfo) { + err = -ENOMEM; + goto __error; + } + memset(&callbacks, 0, sizeof(callbacks)); callbacks.private_data = rdev; callbacks.allow_input = 1; callbacks.allow_output = 1; client = snd_seq_create_kernel_client(rdev->card, rdev->device, &callbacks); - if (client < 0) - return client; + if (client < 0) { + err = client; + goto __error; + } rdev->client = client; /* set client name */ - memset(&info, 0, sizeof(info)); - info.client = client; - info.type = KERNEL_CLIENT; - sprintf(info.name, "%s %d-%d", rdev->rmidi->name, rdev->card->number, rdev->device); + memset(info, 0, sizeof(*info)); + info->client = client; + info->type = KERNEL_CLIENT; + sprintf(info->name, "%s %d-%d", rdev->rmidi->name, rdev->card->number, rdev->device); snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &info); /* create a port */ - memset(&pinfo, 0, sizeof(pinfo)); - pinfo.addr.client = client; - sprintf(pinfo.name, "VirMIDI %d-%d", rdev->card->number, rdev->device); + memset(pinfo, 0, sizeof(*pinfo)); + pinfo->addr.client = client; + sprintf(pinfo->name, "VirMIDI %d-%d", rdev->card->number, rdev->device); /* set all capabilities */ - pinfo.capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; - pinfo.capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; - pinfo.capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; - pinfo.type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; - pinfo.midi_channels = 16; + pinfo->capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; + pinfo->capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; + pinfo->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; + pinfo->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; + pinfo->midi_channels = 16; memset(&pcallbacks, 0, sizeof(pcallbacks)); pcallbacks.owner = THIS_MODULE; pcallbacks.private_data = rdev; @@ -395,16 +404,21 @@ pcallbacks.use = snd_virmidi_use; pcallbacks.unuse = snd_virmidi_unuse; pcallbacks.event_input = snd_virmidi_event_input; - pinfo.kernel = &pcallbacks; + pinfo->kernel = &pcallbacks; err = snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_CREATE_PORT, &pinfo); if (err < 0) { snd_seq_delete_kernel_client(client); rdev->client = -1; - return err; + goto __error; } - rdev->port = pinfo.addr.port; - return 0; /* success */ + rdev->port = pinfo->addr.port; + err = 0; /* success */ + + __error: + kfree(info); + kfree(pinfo); + return err; } diff -Nru a/sound/core/timer.c b/sound/core/timer.c --- a/sound/core/timer.c 2005-03-30 16:58:49 -08:00 +++ b/sound/core/timer.c 2005-03-30 16:58:49 -08:00 @@ -37,10 +37,12 @@ #include #endif -#if !defined(CONFIG_SND_RTCTIMER) && !defined(CONFIG_SND_RTCTIMER_MODULE) -#define DEFAULT_TIMER_LIMIT 1 -#else +#if defined(CONFIG_SND_HPET) || defined(CONFIG_SND_HPET_MODULE) +#define DEFAULT_TIMER_LIMIT 3 +#elif defined(CONFIG_SND_RTCTIMER) || defined(CONFIG_SND_RTCTIMER_MODULE) #define DEFAULT_TIMER_LIMIT 2 +#else +#define DEFAULT_TIMER_LIMIT 1 #endif static int timer_limit = DEFAULT_TIMER_LIMIT; @@ -1117,7 +1119,8 @@ if (tu->qused >= tu->queue_size) { tu->overrun++; } else { - memcpy(&tu->queue[tu->qtail++], tread, sizeof(*tread)); + memcpy(&tu->tqueue[tu->qtail++], tread, sizeof(*tread)); + tu->qtail %= tu->queue_size; tu->qused++; } } @@ -1140,6 +1143,8 @@ spin_lock(&tu->qlock); snd_timer_user_append_to_tqueue(tu, &r1); spin_unlock(&tu->qlock); + kill_fasync(&tu->fasync, SIGIO, POLL_IN); + wake_up(&tu->qchange_sleep); } static void snd_timer_user_tinterrupt(snd_timer_instance_t *timeri, @@ -1342,39 +1347,45 @@ static int snd_timer_user_ginfo(struct file *file, snd_timer_ginfo_t __user *_ginfo) { - snd_timer_ginfo_t ginfo; + snd_timer_ginfo_t *ginfo; snd_timer_id_t tid; snd_timer_t *t; struct list_head *p; int err = 0; - if (copy_from_user(&ginfo, _ginfo, sizeof(ginfo))) + ginfo = kmalloc(sizeof(*ginfo), GFP_KERNEL); + if (! ginfo) + return -ENOMEM; + if (copy_from_user(ginfo, _ginfo, sizeof(*ginfo))) { + kfree(ginfo); return -EFAULT; - tid = ginfo.tid; - memset(&ginfo, 0, sizeof(ginfo)); - ginfo.tid = tid; + } + tid = ginfo->tid; + memset(ginfo, 0, sizeof(*ginfo)); + ginfo->tid = tid; down(®ister_mutex); t = snd_timer_find(&tid); if (t != NULL) { - ginfo.card = t->card ? t->card->number : -1; + ginfo->card = t->card ? t->card->number : -1; if (t->hw.flags & SNDRV_TIMER_HW_SLAVE) - ginfo.flags |= SNDRV_TIMER_FLG_SLAVE; - strlcpy(ginfo.id, t->id, sizeof(ginfo.id)); - strlcpy(ginfo.name, t->name, sizeof(ginfo.name)); - ginfo.resolution = t->hw.resolution; + ginfo->flags |= SNDRV_TIMER_FLG_SLAVE; + strlcpy(ginfo->id, t->id, sizeof(ginfo->id)); + strlcpy(ginfo->name, t->name, sizeof(ginfo->name)); + ginfo->resolution = t->hw.resolution; if (t->hw.resolution_min > 0) { - ginfo.resolution_min = t->hw.resolution_min; - ginfo.resolution_max = t->hw.resolution_max; + ginfo->resolution_min = t->hw.resolution_min; + ginfo->resolution_max = t->hw.resolution_max; } list_for_each(p, &t->open_list_head) { - ginfo.clients++; + ginfo->clients++; } } else { err = -ENODEV; } up(®ister_mutex); - if (err >= 0 && copy_to_user(_ginfo, &ginfo, sizeof(ginfo))) + if (err >= 0 && copy_to_user(_ginfo, ginfo, sizeof(*ginfo))) err = -EFAULT; + kfree(ginfo); return err; } @@ -1488,23 +1499,28 @@ static int snd_timer_user_info(struct file *file, snd_timer_info_t __user *_info) { snd_timer_user_t *tu; - snd_timer_info_t info; + snd_timer_info_t *info; snd_timer_t *t; + int err = 0; tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); t = tu->timeri->timer; snd_assert(t != NULL, return -ENXIO); - memset(&info, 0, sizeof(info)); - info.card = t->card ? t->card->number : -1; + + info = kcalloc(1, sizeof(*info), GFP_KERNEL); + if (! info) + return -ENOMEM; + info->card = t->card ? t->card->number : -1; if (t->hw.flags & SNDRV_TIMER_HW_SLAVE) - info.flags |= SNDRV_TIMER_FLG_SLAVE; - strlcpy(info.id, t->id, sizeof(info.id)); - strlcpy(info.name, t->name, sizeof(info.name)); - info.resolution = t->hw.resolution; - if (copy_to_user(_info, &info, sizeof(*_info))) - return -EFAULT; - return 0; + info->flags |= SNDRV_TIMER_FLG_SLAVE; + strlcpy(info->id, t->id, sizeof(info->id)); + strlcpy(info->name, t->name, sizeof(info->name)); + info->resolution = t->hw.resolution; + if (copy_to_user(_info, info, sizeof(*_info))) + err = -EFAULT; + kfree(info); + return err; } static int snd_timer_user_params(struct file *file, snd_timer_params_t __user *_params) diff -Nru a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c --- a/sound/drivers/mpu401/mpu401_uart.c 2005-03-30 16:58:48 -08:00 +++ b/sound/drivers/mpu401/mpu401_uart.c 2005-03-30 16:58:48 -08:00 @@ -92,21 +92,19 @@ static void _snd_mpu401_uart_interrupt(mpu401_t *mpu) { - unsigned long flags; - - spin_lock_irqsave(&mpu->input_lock, flags); + spin_lock(&mpu->input_lock); if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { snd_mpu401_uart_input_read(mpu); } else { snd_mpu401_uart_clear_rx(mpu); } - spin_unlock_irqrestore(&mpu->input_lock, flags); + spin_unlock(&mpu->input_lock); /* ok. for better Tx performance try do some output when input is done */ if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) && test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) { - spin_lock_irqsave(&mpu->output_lock, flags); + spin_lock(&mpu->output_lock); snd_mpu401_uart_output_write(mpu); - spin_unlock_irqrestore(&mpu->output_lock, flags); + spin_unlock(&mpu->output_lock); } } @@ -134,14 +132,13 @@ */ static void snd_mpu401_uart_timer(unsigned long data) { - unsigned long flags; mpu401_t *mpu = (mpu401_t *)data; - spin_lock_irqsave(&mpu->timer_lock, flags); + spin_lock(&mpu->timer_lock); /*mpu->mode |= MPU401_MODE_TIMER;*/ mpu->timer.expires = 1 + jiffies; add_timer(&mpu->timer); - spin_unlock_irqrestore(&mpu->timer_lock, flags); + spin_unlock(&mpu->timer_lock); if (mpu->rmidi) _snd_mpu401_uart_interrupt(mpu); } diff -Nru a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c --- a/sound/drivers/mtpav.c 2005-03-30 16:58:50 -08:00 +++ b/sound/drivers/mtpav.c 2005-03-30 16:58:50 -08:00 @@ -580,13 +580,12 @@ static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id, struct pt_regs *regs) { - unsigned long flags; mtpav_t *mcard = dev_id; //printk("irqh()\n"); - spin_lock_irqsave(&mcard->spinlock, flags); + spin_lock(&mcard->spinlock); snd_mtpav_read_bytes(mcard); - spin_unlock_irqrestore(&mcard->spinlock, flags); + spin_unlock(&mcard->spinlock); return IRQ_HANDLED; } diff -Nru a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c --- a/sound/drivers/serial-u16550.c 2005-03-30 16:58:47 -08:00 +++ b/sound/drivers/serial-u16550.c 2005-03-30 16:58:47 -08:00 @@ -292,18 +292,17 @@ */ static irqreturn_t snd_uart16550_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - unsigned long flags; snd_uart16550_t *uart; uart = (snd_uart16550_t *) dev_id; - spin_lock_irqsave(&uart->open_lock, flags); + spin_lock(&uart->open_lock); if (uart->filemode == SERIAL_MODE_NOT_OPENED) { - spin_unlock_irqrestore(&uart->open_lock, flags); + spin_unlock(&uart->open_lock); return IRQ_NONE; } inb(uart->base + UART_IIR); /* indicate to the UART that the interrupt has been serviced */ snd_uart16550_io_loop(uart); - spin_unlock_irqrestore(&uart->open_lock, flags); + spin_unlock(&uart->open_lock); return IRQ_HANDLED; } diff -Nru a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c --- a/sound/i2c/other/ak4114.c 2005-03-30 16:58:47 -08:00 +++ b/sound/i2c/other/ak4114.c 2005-03-30 16:58:47 -08:00 @@ -159,7 +159,7 @@ /* bring up statistics / event queing */ chip->init = 0; INIT_WORK(&chip->work, ak4114_stats, chip); - queue_delayed_work(chip->workqueue, &chip->work, 1); + queue_delayed_work(chip->workqueue, &chip->work, HZ / 10); } static unsigned int external_rate(unsigned char rcs1) @@ -569,7 +569,7 @@ if (chip->init) return; snd_ak4114_check_rate_and_errors(chip, 0); - queue_delayed_work(chip->workqueue, &chip->work, 1); + queue_delayed_work(chip->workqueue, &chip->work, HZ / 10); } EXPORT_SYMBOL(snd_ak4114_create); diff -Nru a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c --- a/sound/i2c/other/ak4xxx-adda.c 2005-03-30 16:58:50 -08:00 +++ b/sound/i2c/other/ak4xxx-adda.c 2005-03-30 16:58:50 -08:00 @@ -366,113 +366,121 @@ int snd_akm4xxx_build_controls(akm4xxx_t *ak) { unsigned int idx, num_emphs; + snd_kcontrol_t *ctl; int err; + ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); + if (! ctl) + return -ENOMEM; + for (idx = 0; idx < ak->num_dacs; ++idx) { - snd_kcontrol_t ctl; - memset(&ctl, 0, sizeof(ctl)); - strcpy(ctl.id.name, "DAC Volume"); - ctl.id.index = idx + ak->idx_offset * 2; - ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - ctl.count = 1; - ctl.info = snd_akm4xxx_volume_info; - ctl.get = snd_akm4xxx_volume_get; - ctl.put = snd_akm4xxx_volume_put; + memset(ctl, 0, sizeof(*ctl)); + strcpy(ctl->id.name, "DAC Volume"); + ctl->id.index = idx + ak->idx_offset * 2; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + ctl->count = 1; + ctl->info = snd_akm4xxx_volume_info; + ctl->get = snd_akm4xxx_volume_get; + ctl->put = snd_akm4xxx_volume_put; switch (ak->type) { case SND_AK4524: - ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 6, 0, 127); /* register 6 & 7 */ + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 6, 0, 127); /* register 6 & 7 */ break; case SND_AK4528: - ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* register 4 & 5 */ + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* register 4 & 5 */ break; case SND_AK4529: { int val = idx < 6 ? idx + 2 : (idx - 6) + 0xb; /* registers 2-7 and b,c */ - ctl.private_value = AK_COMPOSE(0, val, 0, 255) | AK_INVERT; + ctl->private_value = AK_COMPOSE(0, val, 0, 255) | AK_INVERT; break; } case SND_AK4355: - ctl.private_value = AK_COMPOSE(0, idx + 4, 0, 255); /* register 4-9, chip #0 only */ + ctl->private_value = AK_COMPOSE(0, idx + 4, 0, 255); /* register 4-9, chip #0 only */ break; case SND_AK4358: if (idx >= 6) - ctl.private_value = AK_COMPOSE(0, idx + 5, 0, 255); /* register 4-9, chip #0 only */ + ctl->private_value = AK_COMPOSE(0, idx + 5, 0, 255); /* register 4-9, chip #0 only */ else - ctl.private_value = AK_COMPOSE(0, idx + 4, 0, 255); /* register 4-9, chip #0 only */ + ctl->private_value = AK_COMPOSE(0, idx + 4, 0, 255); /* register 4-9, chip #0 only */ break; case SND_AK4381: - ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 3, 0, 255); /* register 3 & 4 */ + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 3, 0, 255); /* register 3 & 4 */ break; default: - return -EINVAL; - } - ctl.private_data = ak; - if ((err = snd_ctl_add(ak->card, snd_ctl_new(&ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) - return err; + err = -EINVAL; + goto __error; + } + ctl->private_data = ak; + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) + goto __error; } for (idx = 0; idx < ak->num_adcs && ak->type == SND_AK4524; ++idx) { - snd_kcontrol_t ctl; - memset(&ctl, 0, sizeof(ctl)); - strcpy(ctl.id.name, "ADC Volume"); - ctl.id.index = idx + ak->idx_offset * 2; - ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - ctl.count = 1; - ctl.info = snd_akm4xxx_volume_info; - ctl.get = snd_akm4xxx_volume_get; - ctl.put = snd_akm4xxx_volume_put; - ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* register 4 & 5 */ - ctl.private_data = ak; - if ((err = snd_ctl_add(ak->card, snd_ctl_new(&ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) - return err; - memset(&ctl, 0, sizeof(ctl)); - strcpy(ctl.id.name, "IPGA Analog Capture Volume"); - ctl.id.index = idx + ak->idx_offset * 2; - ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - ctl.count = 1; - ctl.info = snd_akm4xxx_ipga_gain_info; - ctl.get = snd_akm4xxx_ipga_gain_get; - ctl.put = snd_akm4xxx_ipga_gain_put; - ctl.private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 0); /* register 4 & 5 */ - ctl.private_data = ak; - if ((err = snd_ctl_add(ak->card, snd_ctl_new(&ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) - return err; + memset(ctl, 0, sizeof(*ctl)); + strcpy(ctl->id.name, "ADC Volume"); + ctl->id.index = idx + ak->idx_offset * 2; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + ctl->count = 1; + ctl->info = snd_akm4xxx_volume_info; + ctl->get = snd_akm4xxx_volume_get; + ctl->put = snd_akm4xxx_volume_put; + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* register 4 & 5 */ + ctl->private_data = ak; + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) + goto __error; + + memset(ctl, 0, sizeof(*ctl)); + strcpy(ctl->id.name, "IPGA Analog Capture Volume"); + ctl->id.index = idx + ak->idx_offset * 2; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + ctl->count = 1; + ctl->info = snd_akm4xxx_ipga_gain_info; + ctl->get = snd_akm4xxx_ipga_gain_get; + ctl->put = snd_akm4xxx_ipga_gain_put; + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 0); /* register 4 & 5 */ + ctl->private_data = ak; + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) + goto __error; } if (ak->type == SND_AK4355 || ak->type == SND_AK4358) num_emphs = 1; else num_emphs = ak->num_dacs / 2; for (idx = 0; idx < num_emphs; idx++) { - snd_kcontrol_t ctl; - memset(&ctl, 0, sizeof(ctl)); - strcpy(ctl.id.name, "Deemphasis"); - ctl.id.index = idx + ak->idx_offset; - ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - ctl.count = 1; - ctl.info = snd_akm4xxx_deemphasis_info; - ctl.get = snd_akm4xxx_deemphasis_get; - ctl.put = snd_akm4xxx_deemphasis_put; + memset(ctl, 0, sizeof(*ctl)); + strcpy(ctl->id.name, "Deemphasis"); + ctl->id.index = idx + ak->idx_offset; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + ctl->count = 1; + ctl->info = snd_akm4xxx_deemphasis_info; + ctl->get = snd_akm4xxx_deemphasis_get; + ctl->put = snd_akm4xxx_deemphasis_put; switch (ak->type) { case SND_AK4524: case SND_AK4528: - ctl.private_value = AK_COMPOSE(idx, 3, 0, 0); /* register 3 */ + ctl->private_value = AK_COMPOSE(idx, 3, 0, 0); /* register 3 */ break; case SND_AK4529: { int shift = idx == 3 ? 6 : (2 - idx) * 2; - ctl.private_value = AK_COMPOSE(0, 8, shift, 0); /* register 8 with shift */ + ctl->private_value = AK_COMPOSE(0, 8, shift, 0); /* register 8 with shift */ break; } case SND_AK4355: case SND_AK4358: - ctl.private_value = AK_COMPOSE(idx, 3, 0, 0); + ctl->private_value = AK_COMPOSE(idx, 3, 0, 0); break; case SND_AK4381: - ctl.private_value = AK_COMPOSE(idx, 1, 1, 0); + ctl->private_value = AK_COMPOSE(idx, 1, 1, 0); break; } - ctl.private_data = ak; - if ((err = snd_ctl_add(ak->card, snd_ctl_new(&ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) - return err; + ctl->private_data = ak; + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) + goto __error; } - return 0; + err = 0; + + __error: + kfree(ctl); + return err; } static int __init alsa_akm4xxx_module_init(void) diff -Nru a/sound/isa/Kconfig b/sound/isa/Kconfig --- a/sound/isa/Kconfig 2005-03-30 16:58:50 -08:00 +++ b/sound/isa/Kconfig 2005-03-30 16:58:50 -08:00 @@ -3,6 +3,16 @@ menu "ISA devices" depends on SND!=n && ISA +config SND_AD1848_LIB + tristate + select SND_PCM + select SND_GENERIC_PM + +config SND_CS4231_LIB + tristate + select SND_PCM + select SND_GENERIC_PM + config SND_AD1816A tristate "Analog Devices SoundPort AD1816A" depends on SND && ISAPNP @@ -19,8 +29,7 @@ config SND_AD1848 tristate "Generic AD1848/CS4248 driver" depends on SND - select SND_PCM - select SND_GENERIC_PM + select SND_AD1848_LIB help Say Y here to include support for AD1848 (Analog Devices) or CS4248 (Cirrus Logic - Crystal Semiconductors) chips. @@ -35,8 +44,7 @@ tristate "Generic Cirrus Logic CS4231 driver" depends on SND select SND_MPU401_UART - select SND_PCM - select SND_GENERIC_PM + select SND_CS4231_LIB help Say Y here to include support for CS4231 chips from Cirrus Logic - Crystal Semiconductors. @@ -49,8 +57,7 @@ depends on SND select SND_OPL3_LIB select SND_MPU401_UART - select SND_PCM - select SND_GENERIC_PM + select SND_CS4231_LIB help Say Y here to include support for CS4232 chips from Cirrus Logic - Crystal Semiconductors. @@ -63,8 +70,7 @@ depends on SND select SND_OPL3_LIB select SND_MPU401_UART - select SND_PCM - select SND_GENERIC_PM + select SND_CS4231_LIB help Say Y to include support for CS4235,CS4236,CS4237B,CS4238B, CS4239 chips from Cirrus Logic - Crystal Semiconductors. @@ -143,7 +149,7 @@ tristate "Gravis UltraSound MAX" depends on SND select SND_RAWMIDI - select SND_PCM + select SND_CS4231_LIB select SND_GUS_SYNTH help Say Y here to include support for Gravis UltraSound MAX @@ -156,7 +162,7 @@ tristate "AMD InterWave, Gravis UltraSound PnP" depends on SND select SND_RAWMIDI - select SND_PCM + select SND_CS4231_LIB select SND_GUS_SYNTH help Say Y here to include support for AMD InterWave based @@ -170,7 +176,7 @@ tristate "AMD InterWave + TEA6330T (UltraSound 32-Pro)" depends on SND select SND_RAWMIDI - select SND_PCM + select SND_CS4231_LIB select SND_GUS_SYNTH help Say Y here to include support for AMD InterWave based @@ -186,7 +192,7 @@ select SND_OPL3_LIB select SND_OPL4_LIB select SND_MPU401_UART - select SND_PCM + select SND_AD1848_LIB help Say Y here to include support for soundcards based on Opti 82C92x or OTI-601 chips and using an AD1848 codec. @@ -200,7 +206,7 @@ select SND_OPL3_LIB select SND_OPL4_LIB select SND_MPU401_UART - select SND_PCM + select SND_CS4231_LIB help Say Y here to include support for soundcards based on Opti 82C92x chips and using a CS4231 codec. @@ -273,7 +279,7 @@ depends on SND select SND_OPL3_LIB select SND_MPU401_UART - select SND_PCM + select SND_CS4231_LIB help Say Y here to include support for Turtle Beach Maui, Tropez and Tropez+ soundcards based on the Wavefront chip. @@ -299,7 +305,7 @@ depends on SND && ISAPNP select SND_OPL3_LIB select SND_MPU401_UART - select SND_PCM + select SND_CS4231_LIB help Say Y here to include support for soundcards based on the Aztech Systems AZT2320 chip. @@ -310,7 +316,7 @@ config SND_CMI8330 tristate "C-Media CMI8330" depends on SND - select SND_PCM + select SND_AD1848_LIB help Say Y here to include support for soundcards based on the C-Media CMI8330 chip. @@ -336,8 +342,7 @@ depends on SND select SND_OPL3_LIB select SND_MPU401_UART - select SND_PCM - select SND_GENERIC_PM + select SND_CS4231_LIB help Say Y here to include support for Yamaha OPL3-SA2 and OPL3-SA3 chips. @@ -348,7 +353,7 @@ config SND_SGALAXY tristate "Aztech Sound Galaxy" depends on SND - select SND_PCM + select SND_AD1848_LIB help Say Y here to include support for Aztech Sound Galaxy soundcards. @@ -361,7 +366,7 @@ depends on SND select SND_HWDEP select SND_MPU401_UART - select SND_PCM + select SND_CS4231_LIB help Say Y here to include support for Ensoniq SoundScape PnP soundcards. diff -Nru a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c --- a/sound/isa/gus/gus_synth.c 2005-03-30 16:58:49 -08:00 +++ b/sound/isa/gus/gus_synth.c 2005-03-30 16:58:49 -08:00 @@ -214,7 +214,7 @@ snd_gus_card_t *gus; int client, i; snd_seq_client_callback_t callbacks; - snd_seq_client_info_t cinfo; + snd_seq_client_info_t *cinfo; snd_seq_port_subscribe_t sub; snd_iwffff_ops_t *iwops; snd_gf1_ops_t *gf1ops; @@ -227,21 +227,28 @@ init_MUTEX(&gus->register_mutex); gus->gf1.seq_client = -1; + cinfo = kmalloc(sizeof(*cinfo), GFP_KERNEL); + if (! cinfo) + return -ENOMEM; + /* allocate new client */ memset(&callbacks, 0, sizeof(callbacks)); callbacks.private_data = gus; callbacks.allow_output = callbacks.allow_input = 1; client = gus->gf1.seq_client = snd_seq_create_kernel_client(gus->card, 1, &callbacks); - if (client < 0) + if (client < 0) { + kfree(cinfo); return client; + } /* change name of client */ - memset(&cinfo, 0, sizeof(cinfo)); - cinfo.client = client; - cinfo.type = KERNEL_CLIENT; - sprintf(cinfo.name, gus->interwave ? "AMD InterWave" : "GF1"); - snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo); + memset(cinfo, 0, sizeof(*cinfo)); + cinfo->client = client; + cinfo->type = KERNEL_CLIENT; + sprintf(cinfo->name, gus->interwave ? "AMD InterWave" : "GF1"); + snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, cinfo); + kfree(cinfo); for (i = 0; i < 4; i++) snd_gus_synth_create_port(gus, i); diff -Nru a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c --- a/sound/isa/wavefront/wavefront_synth.c 2005-03-30 16:58:51 -08:00 +++ b/sound/isa/wavefront/wavefront_synth.c 2005-03-30 16:58:51 -08:00 @@ -1201,7 +1201,11 @@ { int i; int num_samples; - unsigned char msample_hdr[WF_MSAMPLE_BYTES]; + unsigned char *msample_hdr; + + msample_hdr = kmalloc(sizeof(WF_MSAMPLE_BYTES), GFP_KERNEL); + if (! msample_hdr) + return -ENOMEM; munge_int32 (header->number, &msample_hdr[0], 2); @@ -1234,11 +1238,13 @@ (unsigned char *) (long) ((num_samples*2)+3), msample_hdr)) { snd_printk ("download of multisample failed.\n"); + kfree(msample_hdr); return -(EIO); } dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE); + kfree(msample_hdr); return (0); } @@ -1356,78 +1362,103 @@ static int wavefront_load_patch (snd_wavefront_t *dev, const char __user *addr) - { - wavefront_patch_info header; + wavefront_patch_info *header; + int err; - if (copy_from_user (&header, addr, sizeof(wavefront_patch_info) - + header = kmalloc(sizeof(*header), GFP_KERNEL); + if (! header) + return -ENOMEM; + + if (copy_from_user (header, addr, sizeof(wavefront_patch_info) - sizeof(wavefront_any))) { snd_printk ("bad address for load patch.\n"); - return -(EFAULT); + err = -EFAULT; + goto __error; } DPRINT (WF_DEBUG_LOAD_PATCH, "download " "Sample type: %d " "Sample number: %d " "Sample size: %d\n", - header.subkey, - header.number, - header.size); + header->subkey, + header->number, + header->size); - switch (header.subkey) { + switch (header->subkey) { case WF_ST_SAMPLE: /* sample or sample_header, based on patch->size */ - if (copy_from_user (&header.hdr.s, header.hdrptr, - sizeof (wavefront_sample))) - return -EFAULT; + if (copy_from_user (&header->hdr.s, header->hdrptr, + sizeof (wavefront_sample))) { + err = -EFAULT; + break; + } - return wavefront_send_sample (dev, &header, header.dataptr, 0); + err = wavefront_send_sample (dev, header, header->dataptr, 0); + break; case WF_ST_MULTISAMPLE: - if (copy_from_user (&header.hdr.s, header.hdrptr, - sizeof (wavefront_multisample))) - return -EFAULT; - - return wavefront_send_multisample (dev, &header); + if (copy_from_user (&header->hdr.s, header->hdrptr, + sizeof (wavefront_multisample))) { + err = -EFAULT; + break; + } + err = wavefront_send_multisample (dev, header); + break; case WF_ST_ALIAS: - if (copy_from_user (&header.hdr.a, header.hdrptr, - sizeof (wavefront_alias))) - return -EFAULT; + if (copy_from_user (&header->hdr.a, header->hdrptr, + sizeof (wavefront_alias))) { + err = -EFAULT; + break; + } - return wavefront_send_alias (dev, &header); + err = wavefront_send_alias (dev, header); + break; case WF_ST_DRUM: - if (copy_from_user (&header.hdr.d, header.hdrptr, - sizeof (wavefront_drum))) - return -EFAULT; + if (copy_from_user (&header->hdr.d, header->hdrptr, + sizeof (wavefront_drum))) { + err = -EFAULT; + break; + } - return wavefront_send_drum (dev, &header); + err = wavefront_send_drum (dev, header); + break; case WF_ST_PATCH: - if (copy_from_user (&header.hdr.p, header.hdrptr, - sizeof (wavefront_patch))) - return -EFAULT; - - return wavefront_send_patch (dev, &header); + if (copy_from_user (&header->hdr.p, header->hdrptr, + sizeof (wavefront_patch))) { + err = -EFAULT; + break; + } + + err = wavefront_send_patch (dev, header); + break; case WF_ST_PROGRAM: - if (copy_from_user (&header.hdr.pr, header.hdrptr, - sizeof (wavefront_program))) - return -EFAULT; + if (copy_from_user (&header->hdr.pr, header->hdrptr, + sizeof (wavefront_program))) { + err = -EFAULT; + break; + } - return wavefront_send_program (dev, &header); + err = wavefront_send_program (dev, header); + break; default: snd_printk ("unknown patch type %d.\n", - header.subkey); - return -(EINVAL); + header->subkey); + err = -EINVAL; + break; } - return 0; + __error: + kfree(header); + return err; } /*********************************************************************** @@ -1620,8 +1651,9 @@ snd_card_t *card; snd_wavefront_t *dev; snd_wavefront_card_t *acard; - wavefront_control wc; + wavefront_control *wc; void __user *argp = (void __user *)arg; + int err; card = (snd_card_t *) hw->card; @@ -1640,14 +1672,19 @@ break; case WFCTL_WFCMD: - if (copy_from_user (&wc, argp, sizeof (wc))) - return -EFAULT; - if (wavefront_synth_control (acard, &wc) < 0) { - return -EIO; - } - if (copy_to_user (argp, &wc, sizeof (wc))) - return -EFAULT; - break; + wc = kmalloc(sizeof(*wc), GFP_KERNEL); + if (! wc) + return -ENOMEM; + if (copy_from_user (wc, argp, sizeof (*wc))) + err = -EFAULT; + else if (wavefront_synth_control (acard, wc) < 0) + err = -EIO; + else if (copy_to_user (argp, wc, sizeof (*wc))) + err = -EFAULT; + else + err = 0; + kfree(wc); + return err; default: return -EINVAL; diff -Nru a/sound/oss/ali5455.c b/sound/oss/ali5455.c --- a/sound/oss/ali5455.c 2005-03-30 16:58:50 -08:00 +++ b/sound/oss/ali5455.c 2005-03-30 16:58:50 -08:00 @@ -3528,7 +3528,7 @@ } #ifdef CONFIG_PM -static int ali_pm_suspend(struct pci_dev *dev, u32 pm_state) +static int ali_pm_suspend(struct pci_dev *dev, pm_message_t pm_state) { struct ali_card *card = pci_get_drvdata(dev); struct ali_state *state; diff -Nru a/sound/oss/cs4281/cs4281_wrapper-24.c b/sound/oss/cs4281/cs4281_wrapper-24.c --- a/sound/oss/cs4281/cs4281_wrapper-24.c 2005-03-30 16:58:48 -08:00 +++ b/sound/oss/cs4281/cs4281_wrapper-24.c 2005-03-30 16:58:48 -08:00 @@ -27,7 +27,7 @@ #include static int cs4281_resume_null(struct pci_dev *pcidev) { return 0; } -static int cs4281_suspend_null(struct pci_dev *pcidev, u32 state) { return 0; } +static int cs4281_suspend_null(struct pci_dev *pcidev, pm_message_t state) { return 0; } #define free_dmabuf(state, dmabuf) \ pci_free_consistent(state->pcidev, \ diff -Nru a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c --- a/sound/oss/cs46xx.c 2005-03-30 16:58:50 -08:00 +++ b/sound/oss/cs46xx.c 2005-03-30 16:58:50 -08:00 @@ -388,7 +388,7 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type); static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspendflag); static void cs461x_clear_serial_FIFOs(struct cs_card *card, int type); -static int cs46xx_suspend_tbl(struct pci_dev *pcidev, u32 state); +static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state); static int cs46xx_resume_tbl(struct pci_dev *pcidev); #ifndef CS46XX_ACPI_SUPPORT @@ -5774,7 +5774,7 @@ #endif #if CS46XX_ACPI_SUPPORT -static int cs46xx_suspend_tbl(struct pci_dev *pcidev, u32 state) +static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state) { struct cs_card *s = PCI_GET_DRIVER_DATA(pcidev); CS_DBGOUT(CS_PM | CS_FUNCTION, 2, diff -Nru a/sound/oss/cs46xxpm-24.h b/sound/oss/cs46xxpm-24.h --- a/sound/oss/cs46xxpm-24.h 2005-03-30 16:58:50 -08:00 +++ b/sound/oss/cs46xxpm-24.h 2005-03-30 16:58:50 -08:00 @@ -36,7 +36,7 @@ * for now (12/22/00) only enable the pm_register PM support. * allow these table entries to be null. */ -static int cs46xx_suspend_tbl(struct pci_dev *pcidev, u32 state); +static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state); static int cs46xx_resume_tbl(struct pci_dev *pcidev); #define cs_pm_register(a, b, c) NULL #define cs_pm_unregister_all(a) diff -Nru a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c --- a/sound/oss/dmasound/dmasound_awacs.c 2005-03-30 16:58:48 -08:00 +++ b/sound/oss/dmasound/dmasound_awacs.c 2005-03-30 16:58:48 -08:00 @@ -2987,10 +2987,13 @@ set_hw_byteswap(io) ; /* figure out if the h/w can do it */ - /* get default volume from nvram - * vol = (~nvram_read_byte(0x1308) & 7) << 1; - */ +#ifdef CONFIG_NVRAM + /* get default volume from nvram */ vol = ((pmac_xpram_read( 8 ) & 7 ) << 1 ); +#else + vol = 0; +#endif + /* set up tracking values */ spk_vol = vol * 100 ; spk_vol /= 7 ; /* get set value to a percentage */ diff -Nru a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c --- a/sound/oss/esssolo1.c 2005-03-30 16:58:47 -08:00 +++ b/sound/oss/esssolo1.c 2005-03-30 16:58:47 -08:00 @@ -2257,7 +2257,7 @@ } static int -solo1_suspend(struct pci_dev *pci_dev, u32 state) { +solo1_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct solo1_state *s = (struct solo1_state*)pci_get_drvdata(pci_dev); if (!s) return 1; diff -Nru a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c --- a/sound/oss/i810_audio.c 2005-03-30 16:58:49 -08:00 +++ b/sound/oss/i810_audio.c 2005-03-30 16:58:49 -08:00 @@ -3470,7 +3470,7 @@ } #ifdef CONFIG_PM -static int i810_pm_suspend(struct pci_dev *dev, u32 pm_state) +static int i810_pm_suspend(struct pci_dev *dev, pm_message_t pm_state) { struct i810_card *card = pci_get_drvdata(dev); struct i810_state *state; diff -Nru a/sound/oss/maestro3.c b/sound/oss/maestro3.c --- a/sound/oss/maestro3.c 2005-03-30 16:58:50 -08:00 +++ b/sound/oss/maestro3.c 2005-03-30 16:58:50 -08:00 @@ -375,7 +375,7 @@ * I'm not very good at laying out functions in a file :) */ static int m3_notifier(struct notifier_block *nb, unsigned long event, void *buf); -static int m3_suspend(struct pci_dev *pci_dev, u32 state); +static int m3_suspend(struct pci_dev *pci_dev, pm_message_t state); static void check_suspend(struct m3_card *card); static struct notifier_block m3_reboot_nb = { @@ -2777,12 +2777,12 @@ for(card = devs; card != NULL; card = card->next) { if(!card->in_suspend) - m3_suspend(card->pcidev, 3); /* XXX legal? */ + m3_suspend(card->pcidev, PMSG_SUSPEND); /* XXX legal? */ } return 0; } -static int m3_suspend(struct pci_dev *pci_dev, u32 state) +static int m3_suspend(struct pci_dev *pci_dev, pm_message_t state) { unsigned long flags; int i; diff -Nru a/sound/oss/trident.c b/sound/oss/trident.c --- a/sound/oss/trident.c 2005-03-30 16:58:49 -08:00 +++ b/sound/oss/trident.c 2005-03-30 16:58:49 -08:00 @@ -487,7 +487,7 @@ static struct trident_channel *ali_alloc_pcm_channel(struct trident_card *card); static void ali_restore_regs(struct trident_card *card); static void ali_save_regs(struct trident_card *card); -static int trident_suspend(struct pci_dev *dev, u32 unused); +static int trident_suspend(struct pci_dev *dev, pm_message_t unused); static int trident_resume(struct pci_dev *dev); static void ali_free_pcm_channel(struct trident_card *card, unsigned int channel); static int ali_setup_multi_channels(struct trident_card *card, int chan_nums); @@ -3723,7 +3723,7 @@ } static int -trident_suspend(struct pci_dev *dev, u32 unused) +trident_suspend(struct pci_dev *dev, pm_message_t unused) { struct trident_card *card = pci_get_drvdata(dev); diff -Nru a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c --- a/sound/oss/ymfpci.c 2005-03-30 16:58:49 -08:00 +++ b/sound/oss/ymfpci.c 2005-03-30 16:58:49 -08:00 @@ -2074,7 +2074,7 @@ /* */ -static int ymf_suspend(struct pci_dev *pcidev, u32 unused) +static int ymf_suspend(struct pci_dev *pcidev, pm_message_t unused) { struct ymf_unit *unit = pci_get_drvdata(pcidev); unsigned long flags; diff -Nru a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c --- a/sound/pci/ac97/ac97_codec.c 2005-03-30 16:58:51 -08:00 +++ b/sound/pci/ac97/ac97_codec.c 2005-03-30 16:58:51 -08:00 @@ -105,8 +105,8 @@ { 0x41445374, 0xffffffff, "AD1981B", patch_ad1981b, NULL }, { 0x41445375, 0xffffffff, "AD1985", patch_ad1985, NULL }, { 0x41445378, 0xffffffff, "AD1986", patch_ad1985, NULL }, -{ 0x414c4300, 0xffffff00, "ALC100/100P", NULL, NULL }, -{ 0x414c4710, 0xfffffff0, "ALC200/200P", NULL, NULL }, +{ 0x414c4300, 0xffffff00, "ALC100,100P", NULL, NULL }, +{ 0x414c4710, 0xfffffff0, "ALC200,200P", NULL, NULL }, { 0x414c4721, 0xffffffff, "ALC650D", NULL, NULL }, /* already patched */ { 0x414c4722, 0xffffffff, "ALC650E", NULL, NULL }, /* already patched */ { 0x414c4723, 0xffffffff, "ALC650F", NULL, NULL }, /* already patched */ @@ -145,11 +145,11 @@ { 0x49434552, 0xffffffff, "VT1616i", patch_vt1616, NULL }, // VT1616 compatible (chipset integrated) { 0x49544520, 0xffffffff, "IT2226E", NULL, NULL }, { 0x49544561, 0xffffffff, "IT2646E", patch_it2646, NULL }, -{ 0x4e534300, 0xffffffff, "LM4540/43/45/46/48", NULL, NULL }, // only guess --jk +{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk { 0x4e534331, 0xffffffff, "LM4549", NULL, NULL }, { 0x4e534350, 0xffffffff, "LM4550", NULL, NULL }, { 0x50534304, 0xffffffff, "UCB1400", NULL, NULL }, -{ 0x53494c20, 0xffffffe0, "Si3036/8", NULL, mpatch_si3036 }, +{ 0x53494c20, 0xffffffe0, "Si3036,8", NULL, mpatch_si3036 }, { 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] @@ -158,26 +158,26 @@ { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF { 0x57454301, 0xffffffff, "W83971D", NULL, NULL }, { 0x574d4c00, 0xffffffff, "WM9701A", NULL, NULL }, -{ 0x574d4C03, 0xffffffff, "WM9703/WM9707/WM9708/WM9717", patch_wolfson03, NULL}, -{ 0x574d4C04, 0xffffffff, "WM9704M/WM9704Q", patch_wolfson04, NULL}, -{ 0x574d4C05, 0xffffffff, "WM9705/WM9710", patch_wolfson05, NULL}, +{ 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL}, +{ 0x574d4C04, 0xffffffff, "WM9704M,WM9704Q", patch_wolfson04, NULL}, +{ 0x574d4C05, 0xffffffff, "WM9705,WM9710", patch_wolfson05, NULL}, { 0x574d4C09, 0xffffffff, "WM9709", NULL, NULL}, -{ 0x574d4C12, 0xffffffff, "WM9711/WM9712", patch_wolfson11, NULL}, -{ 0x574d4c13, 0xffffffff, "WM9713/WM9714", patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF}, +{ 0x574d4C12, 0xffffffff, "WM9711,WM9712", patch_wolfson11, NULL}, +{ 0x574d4c13, 0xffffffff, "WM9713,WM9714", patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF}, { 0x594d4800, 0xffffffff, "YMF743", NULL, NULL }, { 0x594d4802, 0xffffffff, "YMF752", NULL, NULL }, { 0x594d4803, 0xffffffff, "YMF753", patch_yamaha_ymf753, NULL }, -{ 0x83847600, 0xffffffff, "STAC9700/83/84", patch_sigmatel_stac9700, NULL }, -{ 0x83847604, 0xffffffff, "STAC9701/3/4/5", NULL, NULL }, +{ 0x83847600, 0xffffffff, "STAC9700,83,84", patch_sigmatel_stac9700, NULL }, +{ 0x83847604, 0xffffffff, "STAC9701,3,4,5", NULL, NULL }, { 0x83847605, 0xffffffff, "STAC9704", NULL, NULL }, -{ 0x83847608, 0xffffffff, "STAC9708/11", patch_sigmatel_stac9708, NULL }, -{ 0x83847609, 0xffffffff, "STAC9721/23", patch_sigmatel_stac9721, NULL }, +{ 0x83847608, 0xffffffff, "STAC9708,11", patch_sigmatel_stac9708, NULL }, +{ 0x83847609, 0xffffffff, "STAC9721,23", patch_sigmatel_stac9721, NULL }, { 0x83847644, 0xffffffff, "STAC9744", patch_sigmatel_stac9744, NULL }, -{ 0x83847650, 0xffffffff, "STAC9750/51", NULL, NULL }, // patch? -{ 0x83847652, 0xffffffff, "STAC9752/53", NULL, NULL }, // patch? -{ 0x83847656, 0xffffffff, "STAC9756/57", patch_sigmatel_stac9756, NULL }, -{ 0x83847658, 0xffffffff, "STAC9758/59", patch_sigmatel_stac9758, NULL }, -{ 0x83847666, 0xffffffff, "STAC9766/67", NULL, NULL }, // patch? +{ 0x83847650, 0xffffffff, "STAC9750,51", NULL, NULL }, // patch? +{ 0x83847652, 0xffffffff, "STAC9752,53", NULL, NULL }, // patch? +{ 0x83847656, 0xffffffff, "STAC9756,57", patch_sigmatel_stac9756, NULL }, +{ 0x83847658, 0xffffffff, "STAC9758,59", patch_sigmatel_stac9758, NULL }, +{ 0x83847666, 0xffffffff, "STAC9766,67", NULL, NULL }, // patch? { 0, 0, NULL, NULL, NULL } }; @@ -1486,7 +1486,7 @@ } /* build S/PDIF controls */ - if (ac97->ext_id & AC97_EI_SPDIF) { + if ((ac97->ext_id & AC97_EI_SPDIF) && !(ac97->scaps & AC97_SCAP_NO_SPDIF)) { if (ac97->build_ops->build_spdif) { if ((err = ac97->build_ops->build_spdif(ac97)) < 0) return err; diff -Nru a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c --- a/sound/pci/ac97/ac97_patch.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/ac97/ac97_patch.c 2005-03-30 16:58:50 -08:00 @@ -1728,7 +1728,7 @@ ac97_t *ac97 = snd_kcontrol_chip(kcontrol); return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 3 << 12, - (unsigned short)ucontrol->value.enumerated.item[0], + (unsigned short)ucontrol->value.enumerated.item[0] << 12, 0); } diff -Nru a/sound/pci/als4000.c b/sound/pci/als4000.c --- a/sound/pci/als4000.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/als4000.c 2005-03-30 16:58:50 -08:00 @@ -601,9 +601,9 @@ gameport_set_name(gp, "ALS4000 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(acard->pci)); - gp->dev.parent = &acard->pci->dev; + gameport_set_dev_parent(gp, &acard->pci->dev); gp->io = io_port; - gp->port_data = r; + gameport_set_port_data(gp, r); /* Enable legacy joystick port */ snd_als4000_set_addr(acard->gcr, 0, 0, 0, 1); @@ -616,7 +616,7 @@ static void snd_als4000_free_gameport(snd_card_als4000_t *acard) { if (acard->gameport) { - struct resource *r = acard->gameport->port_data; + struct resource *r = gameport_get_port_data(acard->gameport); gameport_unregister_port(acard->gameport); acard->gameport = NULL; diff -Nru a/sound/pci/atiixp.c b/sound/pci/atiixp.c --- a/sound/pci/atiixp.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/atiixp.c 2005-03-30 16:58:49 -08:00 @@ -250,6 +250,7 @@ int running; int pcm_open_flag; int ac97_pcm_type; /* index # of ac97_pcm to access, -1 = not used */ + unsigned int saved_curptr; }; /* @@ -1375,6 +1376,8 @@ ac97.pci = chip->pci; ac97.num = i; ac97.scaps = AC97_SCAP_SKIP_MODEM; + if (! chip->spdif_over_aclink) + ac97.scaps |= AC97_SCAP_NO_SPDIF; if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { chip->ac97[i] = NULL; /* to be sure */ snd_printdd("atiixp: codec %d not available for audio\n", i); @@ -1404,8 +1407,12 @@ int i; for (i = 0; i < NUM_ATI_PCMDEVS; i++) - if (chip->pcmdevs[i]) + if (chip->pcmdevs[i]) { + atiixp_dma_t *dma = &chip->dmas[i]; + if (dma->substream && dma->running) + dma->saved_curptr = readl(chip->remap_addr + dma->ops->dt_cur); snd_pcm_suspend_all(chip->pcmdevs[i]); + } for (i = 0; i < NUM_ATI_CODECS; i++) if (chip->ac97[i]) snd_ac97_suspend(chip->ac97[i]); @@ -1432,6 +1439,17 @@ for (i = 0; i < NUM_ATI_CODECS; i++) if (chip->ac97[i]) snd_ac97_resume(chip->ac97[i]); + + for (i = 0; i < NUM_ATI_PCMDEVS; i++) + if (chip->pcmdevs[i]) { + atiixp_dma_t *dma = &chip->dmas[i]; + if (dma->substream && dma->running) { + dma->ops->enable_dma(chip, 1); + writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, + chip->remap_addr + dma->ops->llp_offset); + writel(dma->saved_curptr, chip->remap_addr + dma->ops->dt_cur); + } + } return 0; } diff -Nru a/sound/pci/au88x0/au88x0_game.c b/sound/pci/au88x0/au88x0_game.c --- a/sound/pci/au88x0/au88x0_game.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/au88x0/au88x0_game.c 2005-03-30 16:58:47 -08:00 @@ -44,20 +44,20 @@ static unsigned char vortex_game_read(struct gameport *gameport) { - vortex_t *vortex = gameport->port_data; + vortex_t *vortex = gameport_get_port_data(gameport); return hwread(vortex->mmio, VORTEX_GAME_LEGACY); } static void vortex_game_trigger(struct gameport *gameport) { - vortex_t *vortex = gameport->port_data; + vortex_t *vortex = gameport_get_port_data(gameport); hwwrite(vortex->mmio, VORTEX_GAME_LEGACY, 0xff); } static int vortex_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - vortex_t *vortex = gameport->port_data; + vortex_t *vortex = gameport_get_port_data(gameport); int i; *buttons = (~hwread(vortex->mmio, VORTEX_GAME_LEGACY) >> 4) & 0xf; @@ -73,7 +73,7 @@ static int vortex_game_open(struct gameport *gameport, int mode) { - vortex_t *vortex = gameport->port_data; + vortex_t *vortex = gameport_get_port_data(gameport); switch (mode) { case GAMEPORT_MODE_COOKED: @@ -106,14 +106,14 @@ gameport_set_name(gp, "AU88x0 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(vortex->pci_dev)); - gp->dev.parent = &vortex->pci_dev->dev; + gameport_set_dev_parent(gp, &vortex->pci_dev->dev); gp->read = vortex_game_read; gp->trigger = vortex_game_trigger; gp->cooked_read = vortex_game_cooked_read; gp->open = vortex_game_open; - gp->port_data = vortex; + gameport_set_port_data(gp, vortex); gp->fuzz = 64; gameport_register_port(gp); diff -Nru a/sound/pci/au88x0/au88x0_mixer.c b/sound/pci/au88x0/au88x0_mixer.c --- a/sound/pci/au88x0/au88x0_mixer.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/au88x0/au88x0_mixer.c 2005-03-30 16:58:47 -08:00 @@ -26,6 +26,7 @@ memset(&ac97, 0, sizeof(ac97)); // Intialize AC97 codec stuff. ac97.private_data = vortex; + ac97.scaps = AC97_SCAP_NO_SPDIF; err = snd_ac97_mixer(pbus, &ac97, &vortex->codec); vortex->isquad = ((vortex->codec == NULL) ? 0 : (vortex->codec->ext_id&0x80)); return err; diff -Nru a/sound/pci/azt3328.c b/sound/pci/azt3328.c --- a/sound/pci/azt3328.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/azt3328.c 2005-03-30 16:58:49 -08:00 @@ -1245,9 +1245,9 @@ gameport_set_name(gp, "AZF3328 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); gp->io = 0x200; - gp->port_data = r; + gameport_set_port_data(gp, r); snd_azf3328_io2_write(chip, IDX_IO2_LEGACY_ADDR, snd_azf3328_io2_read(chip, IDX_IO2_LEGACY_ADDR) | LEGACY_JOY); @@ -1260,7 +1260,7 @@ static void snd_azf3328_free_joystick(azf3328_t *chip) { if (chip->gameport) { - struct resource *r = chip->gameport->port_data; + struct resource *r = gameport_get_port_data(chip->gameport); gameport_unregister_port(chip->gameport); chip->gameport = NULL; diff -Nru a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c --- a/sound/pci/ca0106/ca0106_main.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/ca0106/ca0106_main.c 2005-03-30 16:58:50 -08:00 @@ -187,9 +187,9 @@ .rate_max = 192000, .channels_min = 2, //1, .channels_max = 2, //6, - .buffer_bytes_max = (32*1024), + .buffer_bytes_max = ((65536 - 64) * 8), .period_bytes_min = 64, - .period_bytes_max = (16*1024), + .period_bytes_max = (65536 - 64), .periods_min = 2, .periods_max = 8, .fifo_size = 0, @@ -206,9 +206,9 @@ .rate_max = 48000, .channels_min = 2, .channels_max = 2, - .buffer_bytes_max = (32*1024), + .buffer_bytes_max = ((65536 - 64) * 8), .period_bytes_min = 64, - .period_bytes_max = (16*1024), + .period_bytes_max = (65536 - 64), .periods_min = 2, .periods_max = 2, .fifo_size = 0, @@ -513,6 +513,8 @@ snd_ca0106_ptr_write(emu, PLAYBACK_LIST_PTR, channel, 0); snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr); snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes + /* FIXME test what 0 bytes does. */ + snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, 0); // buffer size in bytes snd_ca0106_ptr_write(emu, PLAYBACK_POINTER, channel, 0); snd_ca0106_ptr_write(emu, 0x07, channel, 0x0); snd_ca0106_ptr_write(emu, 0x08, channel, 0); diff -Nru a/sound/pci/cmipci.c b/sound/pci/cmipci.c --- a/sound/pci/cmipci.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/cmipci.c 2005-03-30 16:58:49 -08:00 @@ -2592,9 +2592,9 @@ } gameport_set_name(gp, "C-Media Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(cm->pci)); - gp->dev.parent = &cm->pci->dev; + gameport_set_dev_parent(gp, &cm->pci->dev); gp->io = io_port; - gp->port_data = r; + gameport_set_port_data(gp, r); snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); @@ -2606,7 +2606,7 @@ static void snd_cmipci_free_gameport(cmipci_t *cm) { if (cm->gameport) { - struct resource *r = cm->gameport->port_data; + struct resource *r = gameport_get_port_data(cm->gameport); gameport_unregister_port(cm->gameport); cm->gameport = NULL; diff -Nru a/sound/pci/cs4281.c b/sound/pci/cs4281.c --- a/sound/pci/cs4281.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/cs4281.c 2005-03-30 16:58:50 -08:00 @@ -697,11 +697,10 @@ static int snd_cs4281_trigger(snd_pcm_substream_t *substream, int cmd) { - unsigned long flags; cs4281_dma_t *dma = (cs4281_dma_t *)substream->runtime->private_data; cs4281_t *chip = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_PAUSE_PUSH: dma->valDCR |= BA0_DCR_MSK; @@ -728,13 +727,13 @@ dma->valFCR &= ~BA0_FCR_FEN; break; default: - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return -EINVAL; } snd_cs4281_pokeBA0(chip, dma->regDMR, dma->valDMR); snd_cs4281_pokeBA0(chip, dma->regFCR, dma->valFCR); snd_cs4281_pokeBA0(chip, dma->regDCR, dma->valDCR); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return 0; } @@ -1241,7 +1240,7 @@ static void snd_cs4281_gameport_trigger(struct gameport *gameport) { - cs4281_t *chip = gameport->port_data; + cs4281_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return); snd_cs4281_pokeBA0(chip, BA0_JSPT, 0xff); @@ -1249,7 +1248,7 @@ static unsigned char snd_cs4281_gameport_read(struct gameport *gameport) { - cs4281_t *chip = gameport->port_data; + cs4281_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return 0); return snd_cs4281_peekBA0(chip, BA0_JSPT); @@ -1258,7 +1257,7 @@ #ifdef COOKED_MODE static int snd_cs4281_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - cs4281_t *chip = gameport->port_data; + cs4281_t *chip = gameport_get_port_data(gameport); unsigned js1, js2, jst; snd_assert(chip, return 0); @@ -1309,12 +1308,12 @@ gameport_set_name(gp, "CS4281 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); gp->open = snd_cs4281_gameport_open; gp->read = snd_cs4281_gameport_read; gp->trigger = snd_cs4281_gameport_trigger; gp->cooked_read = snd_cs4281_gameport_cooked_read; - gp->port_data = chip; + gameport_set_port_data(gp, chip); snd_cs4281_pokeBA0(chip, BA0_JSIO, 0xFF); // ? snd_cs4281_pokeBA0(chip, BA0_JSCTL, JSCTL_SP_MEDIUM_SLOW); @@ -1332,8 +1331,8 @@ } } #else -static inline int snd_cs4281_gameport(cs4281_t *chip) { return -ENOSYS; } -static inline void snd_cs4281_gameport_free(cs4281_t *chip) { } +static inline int snd_cs4281_create_gameport(cs4281_t *chip) { return -ENOSYS; } +static inline void snd_cs4281_free_gameport(cs4281_t *chip) { } #endif /* CONFIG_GAMEPORT || (MODULE && CONFIG_GAMEPORT_MODULE) */ @@ -1849,7 +1848,6 @@ static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs) { cs4281_t *chip = dev_id; - unsigned long flags; unsigned int status, dma, val; cs4281_dma_t *cdma; @@ -1865,7 +1863,7 @@ for (dma = 0; dma < 4; dma++) if (status & BA0_HISR_DMA(dma)) { cdma = &chip->dma[dma]; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); /* ack DMA IRQ */ val = snd_cs4281_peekBA0(chip, cdma->regHDSR); /* workaround, sometimes CS4281 acknowledges */ @@ -1874,16 +1872,16 @@ if ((val & BA0_HDSR_DHTC) && !(cdma->frag & 1)) { cdma->frag--; chip->spurious_dhtc_irq++; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); continue; } if ((val & BA0_HDSR_DTC) && (cdma->frag & 1)) { cdma->frag--; chip->spurious_dtc_irq++; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); continue; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); snd_pcm_period_elapsed(cdma->substream); } } @@ -1891,7 +1889,7 @@ if ((status & BA0_HISR_MIDI) && chip->rmidi) { unsigned char c; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); while ((snd_cs4281_peekBA0(chip, BA0_MIDSR) & BA0_MIDSR_RBE) == 0) { c = snd_cs4281_peekBA0(chip, BA0_MIDRP); if ((chip->midcr & BA0_MIDCR_RIE) == 0) @@ -1908,7 +1906,7 @@ } snd_cs4281_pokeBA0(chip, BA0_MIDWP, c); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); } /* EOI to the PCI part... reenables interrupts */ diff -Nru a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c --- a/sound/pci/cs46xx/cs46xx_lib.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/cs46xx/cs46xx_lib.c 2005-03-30 16:58:47 -08:00 @@ -765,9 +765,6 @@ static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream, int cmd) { -#ifndef CONFIG_SND_CS46XX_NEW_DSP - unsigned long flags; -#endif cs46xx_t *chip = snd_pcm_substream_chip(substream); /*snd_pcm_runtime_t *runtime = substream->runtime;*/ int result = 0; @@ -792,7 +789,7 @@ if (substream->runtime->periods != CS46XX_FRAGS) snd_cs46xx_playback_transfer(substream); #else - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); if (substream->runtime->periods != CS46XX_FRAGS) snd_cs46xx_playback_transfer(substream); { unsigned int tmp; @@ -800,7 +797,7 @@ tmp &= 0x0000ffff; snd_cs46xx_poke(chip, BA1_PCTL, chip->play_ctl | tmp); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); #endif break; case SNDRV_PCM_TRIGGER_STOP: @@ -813,13 +810,13 @@ if (!cpcm->pcm_channel->unlinked) cs46xx_dsp_pcm_unlink(chip,cpcm->pcm_channel); #else - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); { unsigned int tmp; tmp = snd_cs46xx_peek(chip, BA1_PCTL); tmp &= 0x0000ffff; snd_cs46xx_poke(chip, BA1_PCTL, tmp); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); #endif break; default: @@ -833,12 +830,11 @@ static int snd_cs46xx_capture_trigger(snd_pcm_substream_t * substream, int cmd) { - unsigned long flags; cs46xx_t *chip = snd_pcm_substream_chip(substream); unsigned int tmp; int result = 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -856,7 +852,7 @@ result = -EINVAL; break; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return result; } @@ -1153,7 +1149,6 @@ static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - unsigned long flags; cs46xx_t *chip = dev_id; u32 status1; #ifdef CONFIG_SND_CS46XX_NEW_DSP @@ -1217,7 +1212,7 @@ if ((status1 & HISR_MIDI) && chip->rmidi) { unsigned char c; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); while ((snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_RBE) == 0) { c = snd_cs46xx_peekBA0(chip, BA0_MIDRP); if ((chip->midcr & MIDCR_RIE) == 0) @@ -1234,7 +1229,7 @@ } snd_cs46xx_pokeBA0(chip, BA0_MIDWP, c); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); } /* * EOI to the PCI part....reenables interrupts @@ -2695,7 +2690,7 @@ static void snd_cs46xx_gameport_trigger(struct gameport *gameport) { - cs46xx_t *chip = gameport->port_data; + cs46xx_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return); snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); @@ -2703,7 +2698,7 @@ static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) { - cs46xx_t *chip = gameport->port_data; + cs46xx_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return 0); return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io); @@ -2711,7 +2706,7 @@ static int snd_cs46xx_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - cs46xx_t *chip = gameport->port_data; + cs46xx_t *chip = gameport_get_port_data(gameport); unsigned js1, js2, jst; snd_assert(chip, return 0); @@ -2757,8 +2752,8 @@ gameport_set_name(gp, "CS46xx Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; - gp->port_data = chip; + gameport_set_dev_parent(gp, &chip->pci->dev); + gameport_set_port_data(gp, chip); gp->open = snd_cs46xx_gameport_open; gp->read = snd_cs46xx_gameport_read; diff -Nru a/sound/pci/emu10k1/Makefile b/sound/pci/emu10k1/Makefile --- a/sound/pci/emu10k1/Makefile 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/emu10k1/Makefile 2005-03-30 16:58:48 -08:00 @@ -5,7 +5,7 @@ snd-emu10k1-objs := emu10k1.o emu10k1_main.o \ irq.o memory.o voice.o emumpu401.o emupcm.o io.o \ - emuproc.o emumixer.o emufx.o timer.o + emuproc.o emumixer.o emufx.o timer.o p16v.o snd-emu10k1-synth-objs := emu10k1_synth.o emu10k1_callback.o emu10k1_patch.o snd-emu10k1x-objs := emu10k1x.o diff -Nru a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c --- a/sound/pci/emu10k1/emu10k1.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/emu10k1/emu10k1.c 2005-03-30 16:58:47 -08:00 @@ -138,7 +138,15 @@ if ((err = snd_emu10k1_pcm_efx(emu, 2, NULL)) < 0) { snd_card_free(card); return err; - } + } + /* This stores the periods table. */ + if (emu->audigy && emu->revision == 4) { /* P16V */ + if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1024, &emu->p16v_buffer) < 0) { + snd_p16v_free(emu); + return -ENOMEM; + } + } + if ((err = snd_emu10k1_mixer(emu)) < 0) { snd_card_free(card); return err; @@ -152,8 +160,13 @@ if ((err = snd_emu10k1_pcm_multi(emu, 3, NULL)) < 0) { snd_card_free(card); return err; - } - + } + if (emu->audigy && emu->revision == 4) { /* P16V */ + if ((err = snd_p16v_pcm(emu, 4, NULL)) < 0) { + snd_card_free(card); + return err; + } + } if (emu->audigy) { if ((err = snd_emu10k1_audigy_midi(emu)) < 0) { snd_card_free(card); @@ -185,23 +198,11 @@ } #endif - if (emu->audigy && (emu->serial == 0x10011102) ) { - strcpy(card->driver, "Audigy2"); - strcpy(card->shortname, "Sound Blaster Audigy2_Value"); - } else if (emu->audigy && (emu->revision == 4) ) { - strcpy(card->driver, "Audigy2"); - strcpy(card->shortname, "Sound Blaster Audigy2"); - } else if (emu->audigy) { - strcpy(card->driver, "Audigy"); - strcpy(card->shortname, "Sound Blaster Audigy"); - } else if (emu->APS) { - strcpy(card->driver, "E-mu APS"); - strcpy(card->shortname, "E-mu APS"); - } else { - strcpy(card->driver, "EMU10K1"); - strcpy(card->shortname, "Sound Blaster Live!"); - } - sprintf(card->longname, "%s (rev.%d, serial:0x%x) at 0x%lx, irq %i", card->shortname, emu->revision, emu->serial, emu->port, emu->irq); + strcpy(card->driver, emu->card_capabilities->driver); + strcpy(card->shortname, emu->card_capabilities->name); + snprintf(card->longname, sizeof(card->longname), + "%s (rev.%d, serial:0x%x) at 0x%lx, irq %i", + card->shortname, emu->revision, emu->serial, emu->port, emu->irq); if ((err = snd_card_register(card)) < 0) { snd_card_free(card); diff -Nru a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c --- a/sound/pci/emu10k1/emu10k1_main.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/emu10k1/emu10k1_main.c 2005-03-30 16:58:50 -08:00 @@ -39,6 +39,7 @@ #include #include +#include "p16v.h" #if 0 MODULE_AUTHOR("Jaroslav Kysela , Creative Labs, Inc."); @@ -178,14 +179,17 @@ tmp &= 0xfffff1ff; tmp |= (0x2<<9); snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp); - + /* Setup SRCSel (Enable Spdif,I2S SRCMulti) */ - outl(0x600000, emu->port + 0x20); - outl(0x14, emu->port + 0x24); - + snd_emu10k1_ptr20_write(emu, SRCSel, 0, 0x14); /* Setup SRCMulti Input Audio Enable */ - outl(0x6E0000, emu->port + 0x20); - outl(0xFF00FF00, emu->port + 0x24); + /* Use 0xFFFFFFFF to enable P16V sounds. */ + snd_emu10k1_ptr20_write(emu, SRCMULTI_ENABLE, 0, 0xFFFFFFFF); + + /* Enabled Phased (8-channel) P16V playback */ + outl(0x0201, emu->port + HCFG2); + /* Set playback routing. */ + snd_emu10k1_ptr_write(emu, CAPTURE_P16V_SOURCE, 0, 78e4); } if (emu->audigy && (emu->serial == 0x10011102) ) { /* audigy2 Value */ /* Hacks for Alice3 to work independent of haP16V driver */ @@ -596,6 +600,8 @@ if (emu->port) pci_release_regions(emu->pci); pci_disable_device(emu->pci); + if (emu->audigy && emu->revision == 4) /* P16V */ + snd_p16v_free(emu); kfree(emu); return 0; } @@ -606,6 +612,85 @@ return snd_emu10k1_free(emu); } +/* vendor, device, subsystem, emu10k1_chip, emu10k2_chip, ca0102_chip, ca0108_chip, ca0151_chip, spk71, spdif_bug, ac97_chip, ecard, driver, name */ + +static emu_chip_details_t emu_chip_details[] = { + /* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102, + .driver = "Audigy2", .name = "Audigy 2 Value [SB0400]", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1} , + {.vendor = 0x1102, .device = 0x0008, + .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", + .emu10k2_chip = 1, + .ca0108_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20071102, + .driver = "Audigy2", .name = "Audigy 4 PRO [SB0380]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102, + .driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102, + .driver = "Audigy2", .name = "Audigy 2 ZS [2001]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10071102, + .driver = "Audigy2", .name = "Audigy 2 [SB0240]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102, + .driver = "Audigy2", .name = "Audigy 2 EX [1005]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spdif_bug = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, + .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, + .driver = "Audigy", .name = "Audigy 1 or 2 [Unknown]", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .spdif_bug = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x40011102, + .driver = "EMU10K1", .name = "E-mu APS [4001]", + .emu10k1_chip = 1, + .ecard = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80641102, + .driver = "EMU10K1", .name = "SB Live 5.1", + .emu10k1_chip = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0002, + .driver = "EMU10K1", .name = "SB Live [Unknown]", + .emu10k1_chip = 1, + .ac97_chip = 1} , + { } /* terminator */ +}; + int __devinit snd_emu10k1_create(snd_card_t * card, struct pci_dev * pci, unsigned short extin_mask, @@ -617,15 +702,14 @@ emu10k1_t *emu; int err; int is_audigy; + unsigned char revision; + const emu_chip_details_t *c; static snd_device_ops_t ops = { .dev_free = snd_emu10k1_dev_free, }; *remu = NULL; - // is_audigy = (int)pci->driver_data; - is_audigy = (pci->device == 0x0004) || ( (pci->device == 0x0008) ); - /* enable PCI device */ if ((err = pci_enable_device(pci)) < 0) return err; @@ -635,15 +719,6 @@ pci_disable_device(pci); return -ENOMEM; } - /* set the DMA transfer mask */ - emu->dma_mask = is_audigy ? AUDIGY_DMA_MASK : EMU10K1_DMA_MASK; - if (pci_set_dma_mask(pci, emu->dma_mask) < 0 || - pci_set_consistent_dma_mask(pci, emu->dma_mask) < 0) { - snd_printk(KERN_ERR "architecture does not support PCI busmaster DMA with mask 0x%lx\n", emu->dma_mask); - kfree(emu); - pci_disable_device(pci); - return -ENXIO; - } emu->card = card; spin_lock_init(&emu->reg_lock); spin_lock_init(&emu->emu_lock); @@ -658,8 +733,43 @@ emu->irq = -1; emu->synth = NULL; emu->get_synth_voice = NULL; + /* read revision & serial */ + pci_read_config_byte(pci, PCI_REVISION_ID, &revision); + emu->revision = revision; + pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &emu->serial); + pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &emu->model); + emu->card_type = EMU10K1_CARD_CREATIVE; + snd_printdd("vendor=0x%x, device=0x%x, subsystem_vendor_id=0x%x, subsystem_id=0x%x\n",pci->vendor, pci->device, emu->serial, emu->model); + + for (c = emu_chip_details; c->vendor; c++) { + if (c->vendor == pci->vendor && c->device == pci->device) { + if (c->subsystem == emu->serial) break; + if (c->subsystem == 0) break; + } + } + if (c->vendor == 0) { + snd_printk(KERN_ERR "emu10k1: Card not recognised\n"); + kfree(emu); + pci_disable_device(pci); + return -ENOENT; + } + emu->card_capabilities = c; + if (c->subsystem != 0) + snd_printdd("Sound card name=%s\n", c->name); + else + snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x\n", c->name, pci->vendor, pci->device, emu->serial); + + is_audigy = emu->audigy = c->emu10k2_chip; - emu->audigy = is_audigy; + /* set the DMA transfer mask */ + emu->dma_mask = is_audigy ? AUDIGY_DMA_MASK : EMU10K1_DMA_MASK; + if (pci_set_dma_mask(pci, emu->dma_mask) < 0 || + pci_set_consistent_dma_mask(pci, emu->dma_mask) < 0) { + snd_printk(KERN_ERR "architecture does not support PCI busmaster DMA with mask 0x%lx\n", emu->dma_mask); + kfree(emu); + pci_disable_device(pci); + return -ENXIO; + } if (is_audigy) emu->gpr_base = A_FXGPREGBASE; else @@ -705,30 +815,15 @@ emu->memhdr->block_extra_size = sizeof(emu10k1_memblk_t) - sizeof(snd_util_memblk_t); pci_set_master(pci); - /* read revision & serial */ - pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&emu->revision); - pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &emu->serial); - pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &emu->model); - emu->card_type = EMU10K1_CARD_CREATIVE; - if (emu->serial == 0x40011102) { + + if (c->ecard) { emu->card_type = EMU10K1_CARD_EMUAPS; emu->APS = 1; - emu->no_ac97 = 1; /* APS has no AC97 chip */ - } - else if (emu->revision == 4 && emu->serial == 0x10051102) { - /* Audigy 2 EX has apparently no effective AC97 controls - * (for both input and output), so we skip the AC97 detections - */ - snd_printdd(KERN_INFO "Audigy2 EX is detected. skipping ac97.\n"); - emu->no_ac97 = 1; - } - - if (emu->revision == 4 && (emu->model == 0x2001 || emu->model == 0x2002)) { - /* Audigy 2 ZS */ - snd_printdd(KERN_INFO "Audigy2 ZS is detected. setting 7.1 mode.\n"); - emu->spk71 = 1; } + if (! c->ac97_chip) + emu->no_ac97 = 1; + emu->spk71 = c->spk71; emu->fx8010.fxbus_mask = 0x303f; if (extin_mask == 0) diff -Nru a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c --- a/sound/pci/emu10k1/emu10k1x.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/emu10k1/emu10k1x.c 2005-03-30 16:58:48 -08:00 @@ -749,6 +749,7 @@ memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; + ac97.scaps = AC97_SCAP_NO_SPDIF; return snd_ac97_mixer(pbus, &ac97, &chip->ac97); } @@ -1265,7 +1266,6 @@ static void do_emu10k1x_midi_interrupt(emu10k1x_t *emu, emu10k1x_midi_t *midi, unsigned int status) { - unsigned long flags; unsigned char byte; if (midi->rmidi == NULL) { @@ -1285,7 +1285,7 @@ } spin_unlock(&midi->input_lock); - spin_lock_irqsave(&midi->output_lock, flags); + spin_lock(&midi->output_lock); if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) { if (midi->substream_output && snd_rawmidi_transmit(midi->substream_output, &byte, 1) == 1) { @@ -1294,7 +1294,7 @@ snd_emu10k1x_intr_disable(emu, midi->tx_enable); } } - spin_unlock_irqrestore(&midi->output_lock, flags); + spin_unlock(&midi->output_lock); } static void snd_emu10k1x_midi_interrupt(emu10k1x_t *emu, unsigned int status) diff -Nru a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c --- a/sound/pci/emu10k1/emufx.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/emu10k1/emufx.c 2005-03-30 16:58:49 -08:00 @@ -634,7 +634,8 @@ snd_ctl_elem_id_t __user *_id; snd_ctl_elem_id_t id; emu10k1_fx8010_control_gpr_t __user *_gctl; - emu10k1_fx8010_control_gpr_t gctl; + emu10k1_fx8010_control_gpr_t *gctl; + int err; for (i = 0, _id = icode->gpr_del_controls; i < icode->gpr_del_control_count; i++, _id++) { @@ -643,29 +644,42 @@ if (snd_emu10k1_look_for_ctl(emu, &id) == NULL) return -ENOENT; } + gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); + if (! gctl) + return -ENOMEM; + err = 0; for (i = 0, _gctl = icode->gpr_add_controls; i < icode->gpr_add_control_count; i++, _gctl++) { - if (copy_from_user(&gctl, _gctl, sizeof(gctl))) - return -EFAULT; - if (snd_emu10k1_look_for_ctl(emu, &gctl.id)) + if (copy_from_user(gctl, _gctl, sizeof(*gctl))) { + err = -EFAULT; + goto __error; + } + if (snd_emu10k1_look_for_ctl(emu, &gctl->id)) continue; down_read(&emu->card->controls_rwsem); - if (snd_ctl_find_id(emu->card, &gctl.id) != NULL) { + if (snd_ctl_find_id(emu->card, &gctl->id) != NULL) { up_read(&emu->card->controls_rwsem); - return -EEXIST; + err = -EEXIST; + goto __error; } up_read(&emu->card->controls_rwsem); - if (gctl.id.iface != SNDRV_CTL_ELEM_IFACE_MIXER && - gctl.id.iface != SNDRV_CTL_ELEM_IFACE_PCM) - return -EINVAL; + if (gctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER && + gctl->id.iface != SNDRV_CTL_ELEM_IFACE_PCM) { + err = -EINVAL; + goto __error; + } } for (i = 0, _gctl = icode->gpr_list_controls; i < icode->gpr_list_control_count; i++, _gctl++) { /* FIXME: we need to check the WRITE access */ - if (copy_from_user(&gctl, _gctl, sizeof(gctl))) - return -EFAULT; + if (copy_from_user(gctl, _gctl, sizeof(*gctl))) { + err = -EFAULT; + goto __error; + } } - return 0; + __error: + kfree(gctl); + return err; } static void snd_emu10k1_ctl_private_free(snd_kcontrol_t *kctl) @@ -682,52 +696,59 @@ { unsigned int i, j; emu10k1_fx8010_control_gpr_t __user *_gctl; - emu10k1_fx8010_control_gpr_t gctl; - snd_emu10k1_fx8010_ctl_t *ctl, nctl; + emu10k1_fx8010_control_gpr_t *gctl; + snd_emu10k1_fx8010_ctl_t *ctl, *nctl; snd_kcontrol_new_t knew; snd_kcontrol_t *kctl; snd_ctl_elem_value_t *val; int err = 0; val = (snd_ctl_elem_value_t *)kmalloc(sizeof(*val), GFP_KERNEL); - if (!val) - return -ENOMEM; + gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); + nctl = kmalloc(sizeof(*nctl), GFP_KERNEL); + if (!val || !gctl || !nctl) { + err = -ENOMEM; + goto __error; + } + for (i = 0, _gctl = icode->gpr_add_controls; i < icode->gpr_add_control_count; i++, _gctl++) { - if (copy_from_user(&gctl, _gctl, sizeof(gctl))) { + if (copy_from_user(gctl, _gctl, sizeof(*gctl))) { err = -EFAULT; goto __error; } - snd_runtime_check(gctl.id.iface == SNDRV_CTL_ELEM_IFACE_MIXER || - gctl.id.iface == SNDRV_CTL_ELEM_IFACE_PCM, err = -EINVAL; goto __error); - snd_runtime_check(gctl.id.name[0] != '\0', err = -EINVAL; goto __error); - ctl = snd_emu10k1_look_for_ctl(emu, &gctl.id); + snd_runtime_check(gctl->id.iface == SNDRV_CTL_ELEM_IFACE_MIXER || + gctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM, err = -EINVAL; goto __error); + snd_runtime_check(gctl->id.name[0] != '\0', err = -EINVAL; goto __error); + ctl = snd_emu10k1_look_for_ctl(emu, &gctl->id); memset(&knew, 0, sizeof(knew)); - knew.iface = gctl.id.iface; - knew.name = gctl.id.name; - knew.index = gctl.id.index; - knew.device = gctl.id.device; - knew.subdevice = gctl.id.subdevice; + knew.iface = gctl->id.iface; + knew.name = gctl->id.name; + knew.index = gctl->id.index; + knew.device = gctl->id.device; + knew.subdevice = gctl->id.subdevice; knew.info = snd_emu10k1_gpr_ctl_info; knew.get = snd_emu10k1_gpr_ctl_get; knew.put = snd_emu10k1_gpr_ctl_put; - memset(&nctl, 0, sizeof(nctl)); - nctl.vcount = gctl.vcount; - nctl.count = gctl.count; + memset(nctl, 0, sizeof(*nctl)); + nctl->vcount = gctl->vcount; + nctl->count = gctl->count; for (j = 0; j < 32; j++) { - nctl.gpr[j] = gctl.gpr[j]; - nctl.value[j] = ~gctl.value[j]; /* inverted, we want to write new value in gpr_ctl_put() */ - val->value.integer.value[j] = gctl.value[j]; - } - nctl.min = gctl.min; - nctl.max = gctl.max; - nctl.translation = gctl.translation; + nctl->gpr[j] = gctl->gpr[j]; + nctl->value[j] = ~gctl->value[j]; /* inverted, we want to write new value in gpr_ctl_put() */ + val->value.integer.value[j] = gctl->value[j]; + } + nctl->min = gctl->min; + nctl->max = gctl->max; + nctl->translation = gctl->translation; if (ctl == NULL) { ctl = (snd_emu10k1_fx8010_ctl_t *)kmalloc(sizeof(*ctl), GFP_KERNEL); - if (ctl == NULL) - continue; + if (ctl == NULL) { + err = -ENOMEM; + goto __error; + } knew.private_value = (unsigned long)ctl; - memcpy(ctl, &nctl, sizeof(nctl)); + *ctl = *nctl; if ((err = snd_ctl_add(emu->card, kctl = snd_ctl_new1(&knew, emu))) < 0) { kfree(ctl); goto __error; @@ -737,15 +758,17 @@ list_add_tail(&ctl->list, &emu->fx8010.gpr_ctl); } else { /* overwrite */ - nctl.list = ctl->list; - nctl.kcontrol = ctl->kcontrol; - memcpy(ctl, &nctl, sizeof(nctl)); + nctl->list = ctl->list; + nctl->kcontrol = ctl->kcontrol; + *ctl = *nctl; snd_ctl_notify(emu->card, SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, &ctl->kcontrol->id); } snd_emu10k1_gpr_ctl_put(ctl->kcontrol, val); } __error: + kfree(nctl); + kfree(gctl); kfree(val); return err; } @@ -774,40 +797,47 @@ { unsigned int i = 0, j; unsigned int total = 0; - emu10k1_fx8010_control_gpr_t gctl; + emu10k1_fx8010_control_gpr_t *gctl; emu10k1_fx8010_control_gpr_t __user *_gctl; snd_emu10k1_fx8010_ctl_t *ctl; snd_ctl_elem_id_t *id; struct list_head *list; + gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); + if (! gctl) + return -ENOMEM; + _gctl = icode->gpr_list_controls; list_for_each(list, &emu->fx8010.gpr_ctl) { ctl = emu10k1_gpr_ctl(list); total++; if (_gctl && i < icode->gpr_list_control_count) { - memset(&gctl, 0, sizeof(gctl)); + memset(gctl, 0, sizeof(*gctl)); id = &ctl->kcontrol->id; - gctl.id.iface = id->iface; - strlcpy(gctl.id.name, id->name, sizeof(gctl.id.name)); - gctl.id.index = id->index; - gctl.id.device = id->device; - gctl.id.subdevice = id->subdevice; - gctl.vcount = ctl->vcount; - gctl.count = ctl->count; + gctl->id.iface = id->iface; + strlcpy(gctl->id.name, id->name, sizeof(gctl->id.name)); + gctl->id.index = id->index; + gctl->id.device = id->device; + gctl->id.subdevice = id->subdevice; + gctl->vcount = ctl->vcount; + gctl->count = ctl->count; for (j = 0; j < 32; j++) { - gctl.gpr[j] = ctl->gpr[j]; - gctl.value[j] = ctl->value[j]; + gctl->gpr[j] = ctl->gpr[j]; + gctl->value[j] = ctl->value[j]; } - gctl.min = ctl->min; - gctl.max = ctl->max; - gctl.translation = ctl->translation; - if (copy_to_user(_gctl, &gctl, sizeof(gctl))) + gctl->min = ctl->min; + gctl->max = ctl->max; + gctl->translation = ctl->translation; + if (copy_to_user(_gctl, gctl, sizeof(*gctl))) { + kfree(gctl); return -EFAULT; + } _gctl++; i++; } } icode->gpr_list_control_total = total; + kfree(gctl); return 0; } @@ -1339,6 +1369,7 @@ /* A_PUT_STEREO_OUTPUT(A_EXTOUT_FRONT_L, A_EXTOUT_FRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); */ /* IEC958 Optical Raw Playback Switch */ + gpr_map[gpr++] = 0; gpr_map[gpr++] = 0x1008; gpr_map[gpr++] = 0xffff0000; for (z = 0; z < 2; z++) { @@ -1349,7 +1380,14 @@ A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z); A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); - A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); + if ((z==1) && (emu->card_capabilities->spdif_bug)) { + /* Due to a SPDIF output bug on some Audigy cards, this code delays the Right channel by 1 sample */ + snd_printk("Installing spdif_bug patch: %s\n", emu->card_capabilities->name); + A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(gpr - 3), A_C_00000000, A_C_00000000); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 3), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); + } else { + A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); + } } snd_emu10k1_init_stereo_onoff_control(controls + nctl++, "IEC958 Optical Raw Playback Switch", gpr, 0); gpr += 2; @@ -2092,7 +2130,7 @@ memset(info, 0, sizeof(info)); info->card = emu->card_type; info->internal_tram_size = emu->fx8010.itram_size; - info->external_tram_size = emu->fx8010.etram_pages.bytes; + info->external_tram_size = emu->fx8010.etram_pages.bytes / 2; fxbus = fxbuses; extin = emu->audigy ? audigy_ins : creative_ins; extout = emu->audigy ? audigy_outs : creative_outs; diff -Nru a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c --- a/sound/pci/emu10k1/emumixer.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/emu10k1/emumixer.c 2005-03-30 16:58:50 -08:00 @@ -3,6 +3,7 @@ * Takashi Iwai * Creative Labs, Inc. * Routines for control of EMU10K1 chips / mixer routines + * Multichannel PCM support Copyright (c) Lee Revell * * BUGS: * -- @@ -481,9 +482,13 @@ change = 1; } } - if (change && mix->epcm->voices[ch]) - update_emu10k1_fxrt(emu, mix->epcm->voices[ch]->number, - &mix->send_routing[0][0]); + + if (change && mix->epcm) { + if (mix->epcm->voices[ch]) { + update_emu10k1_fxrt(emu, mix->epcm->voices[ch]->number, + &mix->send_routing[0][0]); + } + } spin_unlock_irqrestore(&emu->reg_lock, flags); return change; } @@ -543,9 +548,12 @@ change = 1; } } - if (change && mix->epcm->voices[ch]) - update_emu10k1_send_volume(emu, mix->epcm->voices[ch]->number, - &mix->send_volume[0][0]); + if (change && mix->epcm) { + if (mix->epcm->voices[ch]) { + update_emu10k1_send_volume(emu, mix->epcm->voices[ch]->number, + &mix->send_volume[0][0]); + } + } spin_unlock_irqrestore(&emu->reg_lock, flags); return change; } @@ -599,8 +607,11 @@ mix->attn[0] = val; change = 1; } - if (change && mix->epcm->voices[ch]) - snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[ch]->number, mix->attn[0]); + if (change && mix->epcm) { + if (mix->epcm->voices[ch]) { + snd_emu10k1_ptr_write(emu, VTFT_VOLUMETARGET, mix->epcm->voices[ch]->number, mix->attn[0]); + } + } spin_unlock_irqrestore(&emu->reg_lock, flags); return change; } @@ -795,6 +806,7 @@ memset(&ac97, 0, sizeof(ac97)); ac97.private_data = emu; ac97.private_free = snd_emu10k1_mixer_free_ac97; + ac97.scaps = AC97_SCAP_NO_SPDIF; if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) return err; if (emu->audigy) { @@ -912,11 +924,6 @@ return -ENOMEM; if ((err = snd_ctl_add(card, kctl))) return err; - if ((kctl = ctl_find(card, SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT))) != NULL) { - /* already defined by ac97, remove it */ - /* FIXME: or do we need both controls? */ - remove_ctl(card, SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT)); - } if ((kctl = snd_ctl_new1(&snd_emu10k1_spdif_control, emu)) == NULL) return -ENOMEM; if ((err = snd_ctl_add(card, kctl))) @@ -939,6 +946,10 @@ if ((err = snd_ctl_add(card, kctl))) return err; } - + if (emu->audigy && emu->revision == 4) { /* P16V */ + if ((err = snd_p16v_mixer(emu))) + return err; + } + return 0; } diff -Nru a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c --- a/sound/pci/emu10k1/emumpu401.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/emu10k1/emumpu401.c 2005-03-30 16:58:47 -08:00 @@ -73,7 +73,6 @@ static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsigned int status) { - unsigned long flags; unsigned char byte; if (midi->rmidi == NULL) { @@ -93,7 +92,7 @@ } spin_unlock(&midi->input_lock); - spin_lock_irqsave(&midi->output_lock, flags); + spin_lock(&midi->output_lock); if ((status & midi->ipr_tx) && mpu401_output_ready(emu, midi)) { if (midi->substream_output && snd_rawmidi_transmit(midi->substream_output, &byte, 1) == 1) { @@ -102,7 +101,7 @@ snd_emu10k1_intr_disable(emu, midi->tx_enable); } } - spin_unlock_irqrestore(&midi->output_lock, flags); + spin_unlock(&midi->output_lock); } static void snd_emu10k1_midi_interrupt(emu10k1_t *emu, unsigned int status) diff -Nru a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c --- a/sound/pci/emu10k1/emupcm.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/emu10k1/emupcm.c 2005-03-30 16:58:47 -08:00 @@ -2,6 +2,7 @@ * Copyright (c) by Jaroslav Kysela * Creative Labs, Inc. * Routines for control of EMU10K1 chips / PCM routines + * Multichannel PCM support Copyright (c) Lee Revell * * BUGS: * -- @@ -109,14 +110,17 @@ snd_emu10k1_voice_free(epcm->emu, epcm->voices[1]); epcm->voices[1] = NULL; } - if (voices == 1 && epcm->voices[0] != NULL) - return 0; /* already allocated */ - if (voices == 2 && epcm->voices[0] != NULL && epcm->voices[1] != NULL) - return 0; - if (voices > 1) { - if (epcm->voices[0] != NULL && epcm->voices[1] == NULL) { - snd_emu10k1_voice_free(epcm->emu, epcm->voices[0]); - epcm->voices[0] = NULL; + for (i = 0; i < voices; i++) { + if (epcm->voices[i] == NULL) + break; + } + if (i == voices) + return 0; /* already allocated */ + + for (i = 0; i < ARRAY_SIZE(epcm->voices); i++) { + if (epcm->voices[i]) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); + epcm->voices[i] = NULL; } } err = snd_emu10k1_voice_alloc(epcm->emu, @@ -271,11 +275,11 @@ int master, int extra, emu10k1_voice_t *evoice, unsigned int start_addr, - unsigned int end_addr) + unsigned int end_addr, + emu10k1_pcm_mixer_t *mix) { snd_pcm_substream_t *substream = evoice->epcm->substream; snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_mixer_t *mix; unsigned int silent_page, tmp; int voice, stereo, w_16; unsigned char attn, send_amount[8]; @@ -285,11 +289,6 @@ unsigned int ccis; voice = evoice->number; - if (evoice->epcm->type == PLAYBACK_EFX) - mix = &emu->efx_pcm_mixer[voice - evoice->epcm->voices[0]->number]; - else - mix = &emu->pcm_mixer[substream->number]; - stereo = runtime->channels == 2; w_16 = snd_pcm_format_width(runtime->format) == 16; @@ -493,14 +492,16 @@ } end_addr += start_addr; snd_emu10k1_pcm_init_voice(emu, 1, 1, epcm->extra, - start_addr, end_addr); + start_addr, end_addr, NULL); start_addr = epcm->start_addr; end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); snd_emu10k1_pcm_init_voice(emu, 1, 0, epcm->voices[0], - start_addr, end_addr); + start_addr, end_addr, + &emu->pcm_mixer[substream->number]); if (epcm->voices[1]) snd_emu10k1_pcm_init_voice(emu, 0, 0, epcm->voices[1], - start_addr, end_addr); + start_addr, end_addr, + &emu->pcm_mixer[substream->number]); return 0; } @@ -522,16 +523,18 @@ channel_size = ( end_addr - start_addr ) / NUM_EFX_PLAYBACK; snd_emu10k1_pcm_init_voice(emu, 1, 1, epcm->extra, - start_addr, start_addr + (channel_size / 2)); + start_addr, start_addr + (channel_size / 2), NULL); /* only difference with the master voice is we use it for the pointer */ snd_emu10k1_pcm_init_voice(emu, 1, 0, epcm->voices[0], - start_addr, start_addr + channel_size); + start_addr, start_addr + channel_size, + &emu->efx_pcm_mixer[0]); start_addr += channel_size; for (i = 1; i < NUM_EFX_PLAYBACK; i++) { snd_emu10k1_pcm_init_voice(emu, 0, 0, epcm->voices[i], - start_addr, start_addr+channel_size); + start_addr, start_addr + channel_size, + &emu->efx_pcm_mixer[i]); start_addr += channel_size; } @@ -650,12 +653,13 @@ } } -static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, int master, int extra) +static void snd_emu10k1_playback_prepare_voice(emu10k1_t *emu, emu10k1_voice_t *evoice, + int master, int extra, + emu10k1_pcm_mixer_t *mix) { snd_pcm_substream_t *substream; snd_pcm_runtime_t *runtime; - emu10k1_pcm_mixer_t *mix; - unsigned int attn; + unsigned int attn, vattn; unsigned int voice, tmp; if (evoice == NULL) /* skip second voice for mono */ @@ -664,15 +668,12 @@ runtime = substream->runtime; voice = evoice->number; - mix = evoice->epcm->type == PLAYBACK_EFX - ? &emu->efx_pcm_mixer[voice - evoice->epcm->voices[0]->number] - : &emu->pcm_mixer[substream->number]; - attn = extra ? 0 : 0x00ff; tmp = runtime->channels == 2 ? (master ? 1 : 2) : 0; + vattn = mix != NULL ? (mix->attn[tmp] << 16) : 0; snd_emu10k1_ptr_write(emu, IFATN, voice, attn); - snd_emu10k1_ptr_write(emu, VTFT, voice, (mix->attn[tmp] << 16) | 0xffff); - snd_emu10k1_ptr_write(emu, CVCF, voice, (mix->attn[tmp] << 16) | 0xffff); + snd_emu10k1_ptr_write(emu, VTFT, voice, vattn | 0xffff); + snd_emu10k1_ptr_write(emu, CVCF, voice, vattn | 0xffff); snd_emu10k1_ptr_write(emu, DCYSUSV, voice, 0x7f7f); snd_emu10k1_voice_clear_loop_stop(emu, voice); } @@ -721,7 +722,9 @@ emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; emu10k1_pcm_t *epcm = runtime->private_data; + emu10k1_pcm_mixer_t *mix; int result = 0; + // printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); spin_lock(&emu->reg_lock); switch (cmd) { @@ -730,9 +733,10 @@ snd_emu10k1_playback_invalidate_cache(emu, 0, epcm->voices[0]); /* follow thru */ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0); - snd_emu10k1_playback_prepare_voice(emu, epcm->voices[1], 0, 0); - snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1); + mix = &emu->pcm_mixer[substream->number]; + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0, mix); + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[1], 0, 0, mix); + snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1, NULL); snd_emu10k1_playback_trigger_voice(emu, epcm->voices[0], 1, 0); snd_emu10k1_playback_trigger_voice(emu, epcm->voices[1], 0, 0); snd_emu10k1_playback_trigger_voice(emu, epcm->extra, 1, 1); @@ -847,7 +851,7 @@ emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; emu10k1_pcm_t *epcm = runtime->private_data; - int i = 0; + int i; int result = 0; spin_lock(&emu->reg_lock); @@ -861,16 +865,16 @@ /* follow thru */ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 0, 0); - snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1); - for (i = 1; i < NUM_EFX_PLAYBACK; i++) { - snd_emu10k1_playback_prepare_voice(emu, epcm->voices[i], 0, 0); - } + snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1, NULL); + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 0, 0, + &emu->efx_pcm_mixer[0]); + for (i = 1; i < NUM_EFX_PLAYBACK; i++) + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[i], 0, 0, + &emu->efx_pcm_mixer[i]); snd_emu10k1_playback_trigger_voice(emu, epcm->voices[0], 0, 0); snd_emu10k1_playback_trigger_voice(emu, epcm->extra, 1, 1); - for (i = 1; i < NUM_EFX_PLAYBACK; i++) { + for (i = 1; i < NUM_EFX_PLAYBACK; i++) snd_emu10k1_playback_trigger_voice(emu, epcm->voices[i], 0, 0); - } epcm->running = 1; break; case SNDRV_PCM_TRIGGER_STOP: @@ -1273,7 +1277,7 @@ pcm->info_flags = 0; pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; - strcpy(pcm->name, "EMU10K1"); + strcpy(pcm->name, "ADC Capture/Standard PCM Playback"); emu->pcm = pcm; for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) @@ -1308,7 +1312,7 @@ pcm->info_flags = 0; pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; - strcpy(pcm->name, "EMU10K1 multichannel EFX"); + strcpy(pcm->name, "Multichannel Playback"); emu->pcm = pcm; for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) @@ -1357,7 +1361,7 @@ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_mic_ops); pcm->info_flags = 0; - strcpy(pcm->name, "EMU10K1 MIC"); + strcpy(pcm->name, "Mic Capture"); emu->pcm_mic = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); @@ -1695,7 +1699,7 @@ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops); pcm->info_flags = 0; - strcpy(pcm->name, "EMU10K1 EFX"); + strcpy(pcm->name, "Multichannel Capture/PT Playback"); emu->pcm_efx = pcm; if (rpcm) *rpcm = pcm; diff -Nru a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c --- a/sound/pci/emu10k1/emuproc.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/emu10k1/emuproc.c 2005-03-30 16:58:48 -08:00 @@ -184,7 +184,7 @@ snd_iprintf(buffer, "Card : %s\n", emu->audigy ? "Audigy" : (emu->APS ? "EMU APS" : "Creative")); snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size); - snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes); + snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes / 2); snd_iprintf(buffer, "\n"); snd_iprintf(buffer, "Effect Send Routing :\n"); for (idx = 0; idx < NUM_G; idx++) { @@ -413,7 +413,7 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry, - snd_info_buffer_t * buffer, int iobase, int offset, int length) + snd_info_buffer_t * buffer, int iobase, int offset, int length, int voices) { emu10k1_t *emu = entry->private_data; unsigned long value; @@ -425,7 +425,7 @@ snd_iprintf(buffer, "Registers 0x%x\n", iobase); for(i = offset; i < offset+length; i++) { snd_iprintf(buffer, "%02X: ",i); - for (j = 0; j < 64; j++) { + for (j = 0; j < voices; j++) { if(iobase == 0) value = snd_ptr_read(emu, 0, i, j); else @@ -466,25 +466,25 @@ static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40); + snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64); } static void snd_emu_proc_ptr_reg_read00b(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40); + snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64); } static void snd_emu_proc_ptr_reg_read20a(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40); + snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4); } static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40); + snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); } #endif diff -Nru a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c --- a/sound/pci/emu10k1/io.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/emu10k1/io.c 2005-03-30 16:58:48 -08:00 @@ -91,6 +91,38 @@ } } +unsigned int snd_emu10k1_ptr20_read(emu10k1_t * emu, + unsigned int reg, + unsigned int chn) +{ + unsigned long flags; + unsigned int regptr, val; + + regptr = (reg << 16) | chn; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + 0x20 + PTR); + val = inl(emu->port + 0x20 + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + return val; +} + +void snd_emu10k1_ptr20_write(emu10k1_t *emu, + unsigned int reg, + unsigned int chn, + unsigned int data) +{ + unsigned int regptr; + unsigned long flags; + + regptr = (reg << 16) | chn; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + 0x20 + PTR); + outl(data, emu->port + 0x20 + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + void snd_emu10k1_intr_enable(emu10k1_t *emu, unsigned int intrenb) { unsigned long flags; diff -Nru a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c --- a/sound/pci/emu10k1/irq.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/emu10k1/irq.c 2005-03-30 16:58:49 -08:00 @@ -33,7 +33,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) { emu10k1_t *emu = dev_id; - unsigned int status, orig_status; + unsigned int status, status2, orig_status, orig_status2; int handled = 0; while ((status = inl(emu->port + IPR)) != 0) { @@ -149,7 +149,7 @@ } if (status) { unsigned int bits; - snd_printk(KERN_ERR "emu10k1: unhandled interrupt: 0x%08x\n", status); + //snd_printk(KERN_ERR "emu10k1: unhandled interrupt: 0x%08x\n", status); //make sure any interrupts we don't handle are disabled: bits = INTE_FXDSPENABLE | INTE_PCIERRORENABLE | @@ -169,6 +169,21 @@ snd_emu10k1_intr_disable(emu, bits); } outl(orig_status, emu->port + IPR); /* ack all */ + } + if (emu->audigy && emu->revision == 4) { /* P16V */ + while ((status2 = inl(emu->port + IPR2)) != 0) { + u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */ + emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]); + orig_status2 = status2; + if(status2 & mask) { + if(pvoice->use) { + snd_pcm_period_elapsed(pvoice->epcm->substream); + } else { + snd_printk(KERN_ERR "p16v: status: 0x%08x, mask=0x%08x, pvoice=%p, use=%d\n", status2, mask, pvoice, pvoice->use); + } + } + outl(orig_status2, emu->port + IPR2); /* ack all */ + } } return IRQ_RETVAL(handled); } diff -Nru a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/emu10k1/p16v.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,736 @@ +/* + * Copyright (c) by James Courtier-Dutton + * Driver p16v chips + * Version: 0.22 + * + * FEATURES currently supported: + * Output fixed at S32_LE, 2 channel to hw:0,0 + * Rates: 44.1, 48, 96, 192. + * + * Changelog: + * 0.8 + * Use separate card based buffer for periods table. + * 0.9 + * Use 2 channel output streams instead of 8 channel. + * (8 channel output streams might be good for ASIO type output) + * Corrected speaker output, so Front -> Front etc. + * 0.10 + * Fixed missed interrupts. + * 0.11 + * Add Sound card model number and names. + * Add Analog volume controls. + * 0.12 + * Corrected playback interrupts. Now interrupt per period, instead of half period. + * 0.13 + * Use single trigger for multichannel. + * 0.14 + * Mic capture now works at fixed: S32_LE, 96000Hz, Stereo. + * 0.15 + * Force buffer_size / period_size == INTEGER. + * 0.16 + * Update p16v.c to work with changed alsa api. + * 0.17 + * Update p16v.c to work with changed alsa api. Removed boot_devs. + * 0.18 + * Merging with snd-emu10k1 driver. + * 0.19 + * One stereo channel at 24bit now works. + * 0.20 + * Added better register defines. + * 0.21 + * Integrated with snd-emu10k1 driver. + * 0.22 + * Removed #if 0 ... #endif + * + * + * BUGS: + * Some stability problems when unloading the snd-p16v kernel module. + * -- + * + * TODO: + * SPDIF out. + * Find out how to change capture sample rates. E.g. To record SPDIF at 48000Hz. + * Currently capture fixed at 48000Hz. + * + * -- + * GENERAL INFO: + * Model: SB0240 + * P16V Chip: CA0151-DBS + * Audigy 2 Chip: CA0102-IAT + * AC97 Codec: STAC 9721 + * ADC: Philips 1361T (Stereo 24bit) + * DAC: CS4382-K (8-channel, 24bit, 192Khz) + * + * This code was initally based on code from ALSA's emu10k1x.c which is: + * Copyright (c) by Francisco Moraes + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "p16v.h" + +#define SET_CHANNEL 0 /* Testing channel outputs 0=Front, 1=Center/LFE, 2=Unknown, 3=Rear */ +#define PCM_FRONT_CHANNEL 0 +#define PCM_REAR_CHANNEL 1 +#define PCM_CENTER_LFE_CHANNEL 2 +#define PCM_UNKNOWN_CHANNEL 3 +#define CONTROL_FRONT_CHANNEL 0 +#define CONTROL_REAR_CHANNEL 3 +#define CONTROL_CENTER_LFE_CHANNEL 1 +#define CONTROL_UNKNOWN_CHANNEL 2 + +/* Card IDs: + * Class 0401: 1102:0004 (rev 04) Subsystem: 1102:2002 -> Audigy2 ZS 7.1 Model:SB0350 + * Class 0401: 1102:0004 (rev 04) Subsystem: 1102:1007 -> Audigy2 6.1 Model:SB0240 + * Class 0401: 1102:0004 (rev 04) Subsystem: 1102:1002 -> Audigy2 Platinum Model:SB msb0240230009266 + * Class 0401: 1102:0004 (rev 04) Subsystem: 1102:2007 -> Audigy4 Pro Model:SB0380 M1SB0380472001901E + * + */ + + /* hardware definition */ +static snd_pcm_hardware_t snd_p16v_playback_hw = { + .info = (SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_S32_LE, /* Only supports 24-bit samples padded to 32 bits. */ + .rates = SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_48000 , + .rate_min = 48000, + .rate_max = 192000, + .channels_min = 8, + .channels_max = 8, + .buffer_bytes_max = (32*1024), + .period_bytes_min = 64, + .period_bytes_max = (16*1024), + .periods_min = 2, + .periods_max = 8, + .fifo_size = 0, +}; + +static void snd_p16v_pcm_free_substream(snd_pcm_runtime_t *runtime) +{ + snd_pcm_t *epcm = runtime->private_data; + + if (epcm) { + //snd_printk("epcm free: %p\n", epcm); + kfree(epcm); + } +} + +/* open_playback callback */ +static int snd_p16v_pcm_open_playback_channel(snd_pcm_substream_t *substream, int channel_id) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + emu10k1_voice_t *channel = &(emu->p16v_voices[channel_id]); + emu10k1_pcm_t *epcm; + snd_pcm_runtime_t *runtime = substream->runtime; + int err; + + epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); + //snd_printk("epcm kcalloc: %p\n", epcm); + + if (epcm == NULL) + return -ENOMEM; + epcm->emu = emu; + epcm->substream = substream; + //snd_printk("epcm device=%d, channel_id=%d\n", substream->pcm->device, channel_id); + + runtime->private_data = epcm; + runtime->private_free = snd_p16v_pcm_free_substream; + + runtime->hw = snd_p16v_playback_hw; + + channel->emu = emu; + channel->number = channel_id; + + channel->use=1; + //snd_printk("p16v: open channel_id=%d, channel=%p, use=0x%x\n", channel_id, channel, channel->use); + //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel); + //channel->interrupt = snd_p16v_pcm_channel_interrupt; + channel->epcm=epcm; + if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) + return err; + + return 0; +} + +/* close callback */ +static int snd_p16v_pcm_close_playback(snd_pcm_substream_t *substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + //snd_pcm_runtime_t *runtime = substream->runtime; + //emu10k1_pcm_t *epcm = runtime->private_data; + emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use=0; +/* FIXME: maybe zero others */ + return 0; +} + +static int snd_p16v_pcm_open_playback_front(snd_pcm_substream_t *substream) +{ + return snd_p16v_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); +} + +/* hw_params callback */ +static int snd_p16v_pcm_hw_params_playback(snd_pcm_substream_t *substream, + snd_pcm_hw_params_t * hw_params) +{ + int result; + //snd_printk("hw_params alloc: substream=%p\n", substream); + result = snd_pcm_lib_malloc_pages(substream, + params_buffer_bytes(hw_params)); + //snd_printk("hw_params alloc: result=%d\n", result); + //dump_stack(); + return result; +} + +/* hw_free callback */ +static int snd_p16v_pcm_hw_free_playback(snd_pcm_substream_t *substream) +{ + int result; + //snd_printk("hw_params free: substream=%p\n", substream); + result = snd_pcm_lib_free_pages(substream); + //snd_printk("hw_params free: result=%d\n", result); + //dump_stack(); + return result; +} + +/* prepare playback callback */ +static int snd_p16v_pcm_prepare_playback(snd_pcm_substream_t *substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + //emu10k1_pcm_t *epcm = runtime->private_data; + int channel = substream->pcm->device - emu->p16v_device_offset; + u32 *table_base = (u32 *)(emu->p16v_buffer.area+(8*16*channel)); + u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size); + int i; + u32 tmp; + + //snd_printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1)); + //snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base); + //snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->p16v_buffer.addr, emu->p16v_buffer.area, emu->p16v_buffer.bytes); + tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel); + switch (runtime->rate) { + case 44100: + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe000) | 0x8000); /* FIXME: This will change the capture rate as well! */ + break; + case 48000: + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe000) | 0x0000); /* FIXME: This will change the capture rate as well! */ + break; + case 96000: + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe000) | 0x4000); /* FIXME: This will change the capture rate as well! */ + break; + case 192000: + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, (tmp & ~0xe000) | 0x2000); /* FIXME: This will change the capture rate as well! */ + break; + default: + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, channel, 0x0000); /* FIXME: This will change the capture rate as well! */ + break; + } + /* FIXME: Check emu->buffer.size before actually writing to it. */ + for(i=0; i < runtime->periods; i++) { + table_base[i*2]=runtime->dma_addr+(i*period_size_bytes); + table_base[(i*2)+1]=period_size_bytes<<16; + } + + snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_ADDR, channel, emu->p16v_buffer.addr+(8*16*channel)); + snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_SIZE, channel, (runtime->periods - 1) << 19); + snd_emu10k1_ptr20_write(emu, PLAYBACK_LIST_PTR, channel, 0); + snd_emu10k1_ptr20_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr); + snd_emu10k1_ptr20_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes + snd_emu10k1_ptr20_write(emu, PLAYBACK_POINTER, channel, 0); + snd_emu10k1_ptr20_write(emu, 0x07, channel, 0x0); + snd_emu10k1_ptr20_write(emu, 0x08, channel, 0); + + return 0; +} + +static void snd_p16v_intr_enable(emu10k1_t *emu, unsigned int intrenb) +{ + unsigned long flags; + unsigned int enable; + + spin_lock_irqsave(&emu->emu_lock, flags); + enable = inl(emu->port + INTE2) | intrenb; + outl(enable, emu->port + INTE2); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +static void snd_p16v_intr_disable(emu10k1_t *emu, unsigned int intrenb) +{ + unsigned long flags; + unsigned int disable; + + spin_lock_irqsave(&emu->emu_lock, flags); + disable = inl(emu->port + INTE2) & (~intrenb); + outl(disable, emu->port + INTE2); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +/* trigger_playback callback */ +static int snd_p16v_pcm_trigger_playback(snd_pcm_substream_t *substream, + int cmd) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime; + emu10k1_pcm_t *epcm; + int channel; + int result = 0; + struct list_head *pos; + snd_pcm_substream_t *s; + u32 basic = 0; + u32 inte = 0; + int running=0; + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + running=1; + break; + case SNDRV_PCM_TRIGGER_STOP: + default: + running=0; + break; + } + snd_pcm_group_for_each(pos, substream) { + s = snd_pcm_group_substream_entry(pos); + runtime = s->runtime; + epcm = runtime->private_data; + channel = substream->pcm->device-emu->p16v_device_offset; + //snd_printk("p16v channel=%d\n",channel); + epcm->running = running; + basic |= (0x1<runtime; + emu10k1_pcm_t *epcm = runtime->private_data; + snd_pcm_uframes_t ptr, ptr1, ptr2,ptr3,ptr4 = 0; + int channel = substream->pcm->device - emu->p16v_device_offset; + if (!epcm->running) + return 0; + + ptr3 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel); + ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); + ptr4 = snd_emu10k1_ptr20_read(emu, PLAYBACK_LIST_PTR, channel); + if (ptr3 != ptr4) ptr1 = snd_emu10k1_ptr20_read(emu, PLAYBACK_POINTER, channel); + ptr2 = bytes_to_frames(runtime, ptr1); + ptr2+= (ptr4 >> 3) * runtime->period_size; + ptr=ptr2; + if (ptr >= runtime->buffer_size) + ptr -= runtime->buffer_size; + + return ptr; +} + +/* operators */ +static snd_pcm_ops_t snd_p16v_playback_front_ops = { + .open = snd_p16v_pcm_open_playback_front, + .close = snd_p16v_pcm_close_playback, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_p16v_pcm_hw_params_playback, + .hw_free = snd_p16v_pcm_hw_free_playback, + .prepare = snd_p16v_pcm_prepare_playback, + .trigger = snd_p16v_pcm_trigger_playback, + .pointer = snd_p16v_pcm_pointer_playback, +}; + +int snd_p16v_free(emu10k1_t *chip) +{ + // release the data + if (chip->p16v_buffer.area) { + snd_dma_free_pages(&chip->p16v_buffer); + //snd_printk("period lables free: %p\n", &chip->p16v_buffer); + } + return 0; +} + +static void snd_p16v_pcm_free(snd_pcm_t *pcm) +{ + emu10k1_t *emu = pcm->private_data; + //snd_printk("snd_p16v_pcm_free pcm: called\n"); + snd_pcm_lib_preallocate_free_for_all(pcm); + emu->pcm = NULL; +} + +int snd_p16v_pcm(emu10k1_t *emu, int device, snd_pcm_t **rpcm) +{ + snd_pcm_t *pcm; + snd_pcm_substream_t *substream; + int err; + int capture=0; + + //snd_printk("snd_p16v_pcm called. device=%d\n", device); + emu->p16v_device_offset = device; + if (rpcm) + *rpcm = NULL; + //if (device == 0) capture=1; + if ((err = snd_pcm_new(emu->card, "p16v", device, 1, capture, &pcm)) < 0) + return err; + + pcm->private_data = emu; + pcm->private_free = snd_p16v_pcm_free; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_p16v_playback_front_ops); + + pcm->info_flags = 0; + pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; + strcpy(pcm->name, "p16v"); + emu->pcm = pcm; + + for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; + substream; + substream = substream->next) { + if ((err = snd_pcm_lib_preallocate_pages(substream, + SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(emu->pci), + 64*1024, 64*1024)) < 0) /* FIXME: 32*1024 for sound buffer, between 32and64 for Periods table. */ + return err; + //snd_printk("preallocate playback substream: err=%d\n", err); + } + + for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; + substream; + substream = substream->next) { + if ((err = snd_pcm_lib_preallocate_pages(substream, + SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(emu->pci), + 64*1024, 64*1024)) < 0) + return err; + //snd_printk("preallocate capture substream: err=%d\n", err); + } + + if (rpcm) + *rpcm = pcm; + + return 0; +} + +static int snd_p16v_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 255; + return 0; +} + +static int snd_p16v_volume_get(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol, int reg, int high_low) +{ + emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + u32 value; + + value = snd_emu10k1_ptr20_read(emu, reg, high_low); + if (high_low == 1) { + ucontrol->value.integer.value[0] = 0xff - ((value >> 24) & 0xff); /* Left */ + ucontrol->value.integer.value[1] = 0xff - ((value >> 16) & 0xff); /* Right */ + } else { + ucontrol->value.integer.value[0] = 0xff - ((value >> 8) & 0xff); /* Left */ + ucontrol->value.integer.value[1] = 0xff - ((value >> 0) & 0xff); /* Right */ + } + return 0; +} + +static int snd_p16v_volume_get_spdif_front(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER7; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_get_spdif_center_lfe(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER7; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} +static int snd_p16v_volume_get_spdif_unknown(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER8; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} +static int snd_p16v_volume_get_spdif_rear(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER8; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_get_analog_front(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER9; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_get_analog_center_lfe(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER9; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} +static int snd_p16v_volume_get_analog_rear(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER10; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_get_analog_unknown(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER10; + return snd_p16v_volume_get(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol, int reg, int high_low) +{ + emu10k1_t *emu = snd_kcontrol_chip(kcontrol); + u32 value; + value = snd_emu10k1_ptr20_read(emu, reg, 0); + //value = value & 0xffff; + if (high_low == 1) { + value &= 0xffff; + value = value | ((0xff - ucontrol->value.integer.value[0]) << 24) | ((0xff - ucontrol->value.integer.value[1]) << 16); + } else { + value &= 0xffff0000; + value = value | ((0xff - ucontrol->value.integer.value[0]) << 8) | ((0xff - ucontrol->value.integer.value[1]) ); + } + snd_emu10k1_ptr20_write(emu, reg, 0, value); + return 1; +} + +static int snd_p16v_volume_put_spdif_front(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER7; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_spdif_center_lfe(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER7; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_spdif_unknown(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER8; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_spdif_rear(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER8; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_analog_front(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER9; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_analog_center_lfe(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER9; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_analog_rear(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 1; + int reg = PLAYBACK_VOLUME_MIXER10; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static int snd_p16v_volume_put_analog_unknown(snd_kcontrol_t * kcontrol, + snd_ctl_elem_value_t * ucontrol) +{ + int high_low = 0; + int reg = PLAYBACK_VOLUME_MIXER10; + return snd_p16v_volume_put(kcontrol, ucontrol, reg, high_low); +} + +static snd_kcontrol_new_t snd_p16v_volume_control_analog_front = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD Analog Front Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_analog_front, + .put = snd_p16v_volume_put_analog_front +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_analog_center_lfe = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD Analog Center/LFE Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_analog_center_lfe, + .put = snd_p16v_volume_put_analog_center_lfe +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_analog_unknown = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD Analog Unknown Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_analog_unknown, + .put = snd_p16v_volume_put_analog_unknown +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_analog_rear = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD Analog Rear Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_analog_rear, + .put = snd_p16v_volume_put_analog_rear +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_spdif_front = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD SPDIF Front Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_spdif_front, + .put = snd_p16v_volume_put_spdif_front +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_spdif_center_lfe = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD SPDIF Center/LFE Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_spdif_center_lfe, + .put = snd_p16v_volume_put_spdif_center_lfe +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_spdif_unknown = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD SPDIF Unknown Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_spdif_unknown, + .put = snd_p16v_volume_put_spdif_unknown +}; + +static snd_kcontrol_new_t snd_p16v_volume_control_spdif_rear = +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "HD SPDIF Rear Volume", + .info = snd_p16v_volume_info, + .get = snd_p16v_volume_get_spdif_rear, + .put = snd_p16v_volume_put_spdif_rear +}; + +int snd_p16v_mixer(emu10k1_t *emu) +{ + int err; + snd_kcontrol_t *kctl; + snd_card_t *card = emu->card; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_front, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_rear, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_center_lfe, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_analog_unknown, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_spdif_front, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_spdif_rear, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_spdif_center_lfe, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + if ((kctl = snd_ctl_new1(&snd_p16v_volume_control_spdif_unknown, emu)) == NULL) + return -ENOMEM; + if ((err = snd_ctl_add(card, kctl))) + return err; + return 0; +} + diff -Nru a/sound/pci/emu10k1/p16v.h b/sound/pci/emu10k1/p16v.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/emu10k1/p16v.h 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,299 @@ +/* + * Copyright (c) by James Courtier-Dutton + * Driver p16v chips + * Version: 0.21 + * + * FEATURES currently supported: + * Output fixed at S32_LE, 2 channel to hw:0,0 + * Rates: 44.1, 48, 96, 192. + * + * Changelog: + * 0.8 + * Use separate card based buffer for periods table. + * 0.9 + * Use 2 channel output streams instead of 8 channel. + * (8 channel output streams might be good for ASIO type output) + * Corrected speaker output, so Front -> Front etc. + * 0.10 + * Fixed missed interrupts. + * 0.11 + * Add Sound card model number and names. + * Add Analog volume controls. + * 0.12 + * Corrected playback interrupts. Now interrupt per period, instead of half period. + * 0.13 + * Use single trigger for multichannel. + * 0.14 + * Mic capture now works at fixed: S32_LE, 96000Hz, Stereo. + * 0.15 + * Force buffer_size / period_size == INTEGER. + * 0.16 + * Update p16v.c to work with changed alsa api. + * 0.17 + * Update p16v.c to work with changed alsa api. Removed boot_devs. + * 0.18 + * Merging with snd-emu10k1 driver. + * 0.19 + * One stereo channel at 24bit now works. + * 0.20 + * Added better register defines. + * 0.21 + * Split from p16v.c + * + * + * BUGS: + * Some stability problems when unloading the snd-p16v kernel module. + * -- + * + * TODO: + * SPDIF out. + * Find out how to change capture sample rates. E.g. To record SPDIF at 48000Hz. + * Currently capture fixed at 48000Hz. + * + * -- + * GENERAL INFO: + * Model: SB0240 + * P16V Chip: CA0151-DBS + * Audigy 2 Chip: CA0102-IAT + * AC97 Codec: STAC 9721 + * ADC: Philips 1361T (Stereo 24bit) + * DAC: CS4382-K (8-channel, 24bit, 192Khz) + * + * This code was initally based on code from ALSA's emu10k1x.c which is: + * Copyright (c) by Francisco Moraes + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/********************************************************************************************************/ +/* Audigy2 P16V pointer-offset register set, accessed through the PTR2 and DATA2 registers */ +/********************************************************************************************************/ + +/* The sample rate of the SPDIF outputs is set by modifying a register in the EMU10K2 PTR register A_SPDIF_SAMPLERATE. + * The sample rate is also controlled by the same registers that control the rate of the EMU10K2 sample rate converters. + */ + +/* Initally all registers from 0x00 to 0x3f have zero contents. */ +#define PLAYBACK_LIST_ADDR 0x00 /* Base DMA address of a list of pointers to each period/size */ + /* One list entry: 4 bytes for DMA address, + * 4 bytes for period_size << 16. + * One list entry is 8 bytes long. + * One list entry for each period in the buffer. + */ +#define PLAYBACK_LIST_SIZE 0x01 /* Size of list in bytes << 16. E.g. 8 periods -> 0x00380000 */ +#define PLAYBACK_LIST_PTR 0x02 /* Pointer to the current period being played */ +#define PLAYBACK_UNKNOWN3 0x03 /* Not used */ +#define PLAYBACK_DMA_ADDR 0x04 /* Playback DMA addresss */ +#define PLAYBACK_PERIOD_SIZE 0x05 /* Playback period size. win2000 uses 0x04000000 */ +#define PLAYBACK_POINTER 0x06 /* Playback period pointer. Used with PLAYBACK_LIST_PTR to determine buffer position currently in DAC */ +#define PLAYBACK_FIFO_END_ADDRESS 0x07 /* Playback FIFO end address */ +#define PLAYBACK_FIFO_POINTER 0x08 /* Playback FIFO pointer and number of valid sound samples in cache */ +#define PLAYBACK_UNKNOWN9 0x09 /* Not used */ +#define CAPTURE_DMA_ADDR 0x10 /* Capture DMA address */ +#define CAPTURE_BUFFER_SIZE 0x11 /* Capture buffer size */ +#define CAPTURE_POINTER 0x12 /* Capture buffer pointer. Sample currently in ADC */ +#define CAPTURE_FIFO_POINTER 0x13 /* Capture FIFO pointer and number of valid sound samples in cache */ +#define CAPTURE_P16V_VOLUME1 0x14 /* Low: Capture volume 0xXXXX3030 */ +#define CAPTURE_P16V_VOLUME2 0x15 /* High:Has no effect on capture volume */ +#define CAPTURE_P16V_SOURCE 0x16 /* P16V source select. Set to 0x0700E4E5 for AC97 CAPTURE */ + /* [0:1] Capture input 0 channel select. 0 = Capture output 0. + * 1 = Capture output 1. + * 2 = Capture output 2. + * 3 = Capture output 3. + * [3:2] Capture input 1 channel select. 0 = Capture output 0. + * 1 = Capture output 1. + * 2 = Capture output 2. + * 3 = Capture output 3. + * [5:4] Capture input 2 channel select. 0 = Capture output 0. + * 1 = Capture output 1. + * 2 = Capture output 2. + * 3 = Capture output 3. + * [7:6] Capture input 3 channel select. 0 = Capture output 0. + * 1 = Capture output 1. + * 2 = Capture output 2. + * 3 = Capture output 3. + * [9:8] Playback input 0 channel select. 0 = Play output 0. + * 1 = Play output 1. + * 2 = Play output 2. + * 3 = Play output 3. + * [11:10] Playback input 1 channel select. 0 = Play output 0. + * 1 = Play output 1. + * 2 = Play output 2. + * 3 = Play output 3. + * [13:12] Playback input 2 channel select. 0 = Play output 0. + * 1 = Play output 1. + * 2 = Play output 2. + * 3 = Play output 3. + * [15:14] Playback input 3 channel select. 0 = Play output 0. + * 1 = Play output 1. + * 2 = Play output 2. + * 3 = Play output 3. + * [19:16] Playback mixer output enable. 1 bit per channel. + * [23:20] Capture mixer output enable. 1 bit per channel. + * [26:24] FX engine channel capture 0 = 0x60-0x67. + * 1 = 0x68-0x6f. + * 2 = 0x70-0x77. + * 3 = 0x78-0x7f. + * 4 = 0x80-0x87. + * 5 = 0x88-0x8f. + * 6 = 0x90-0x97. + * 7 = 0x98-0x9f. + * [31:27] Not used. + */ + + /* 0x1 = capture on. + * 0x100 = capture off. + * 0x200 = capture off. + * 0x1000 = capture off. + */ +#define CAPTURE_RATE_STATUS 0x17 /* Capture sample rate. Read only */ + /* [15:0] Not used. + * [18:16] Channel 0 Detected sample rate. 0 - 44.1khz + * 1 - 48 khz + * 2 - 96 khz + * 3 - 192 khz + * 7 - undefined rate. + * [19] Channel 0. 1 - Valid, 0 - Not Valid. + * [22:20] Channel 1 Detected sample rate. + * [23] Channel 1. 1 - Valid, 0 - Not Valid. + * [26:24] Channel 2 Detected sample rate. + * [27] Channel 2. 1 - Valid, 0 - Not Valid. + * [30:28] Channel 3 Detected sample rate. + * [31] Channel 3. 1 - Valid, 0 - Not Valid. + */ +/* 0x18 - 0x1f unused */ +#define PLAYBACK_LAST_SAMPLE 0x20 /* The sample currently being played. Read only */ +/* 0x21 - 0x3f unused */ +#define BASIC_INTERRUPT 0x40 /* Used by both playback and capture interrupt handler */ + /* Playback (0x1< 77770000 so it must be some sort of route. + * bit 0x1 starts DMA playback on channel_id 0 + */ +/* 0x41,42 take values from 0 - 0xffffffff, but have no effect on playback */ +/* 0x43,0x48 do not remember settings */ +/* 0x41-45 unused */ +#define WATERMARK 0x46 /* Test bit to indicate cache level usage */ + /* Values it can have while playing on channel 0. + * 0000f000, 0000f004, 0000f008, 0000f00c. + * Readonly. + */ +/* 0x47-0x4f unused */ +/* 0x50-0x5f Capture cache data */ +#define SRCSel 0x60 /* SRCSel. Default 0x4. Bypass P16V 0x14 */ + /* [0] 0 = 10K2 audio, 1 = SRC48 mixer output. + * [2] 0 = 10K2 audio, 1 = SRCMulti SPDIF mixer output. + * [4] 0 = 10K2 audio, 1 = SRCMulti I2S mixer output. + */ + /* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */ + /* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */ + /* SRC48 and SRCMULTI sample rate select and output select. */ + /* 0xffffffff -> 0xC0000015 + * 0xXXXXXXX4 = Enable Front Left/Right + * Enable PCMs + */ + +/* 0x61 -> 0x6c are Volume controls */ +#define PLAYBACK_VOLUME_MIXER1 0x61 /* SRC48 Low to mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER2 0x62 /* SRC48 High to mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER3 0x63 /* SRCMULTI SPDIF Low to mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER4 0x64 /* SRCMULTI SPDIF High to mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER5 0x65 /* SRCMULTI I2S Low to mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER6 0x66 /* SRCMULTI I2S High to mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER7 0x67 /* P16V Low to SRCMULTI SPDIF mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER8 0x68 /* P16V High to SRCMULTI SPDIF mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER9 0x69 /* P16V Low to SRCMULTI I2S mixer input volume control. */ + /* 0xXXXX3030 = PCM0 Volume (Front). + * 0x3030XXXX = PCM1 Volume (Center) + */ +#define PLAYBACK_VOLUME_MIXER10 0x6a /* P16V High to SRCMULTI I2S mixer input volume control. */ + /* 0x3030XXXX = PCM3 Volume (Rear). */ +#define PLAYBACK_VOLUME_MIXER11 0x6b /* E10K2 Low to SRC48 mixer input volume control. */ +#define PLAYBACK_VOLUME_MIXER12 0x6c /* E10K2 High to SRC48 mixer input volume control. */ + +#define SRC48_ENABLE 0x6d /* SRC48 input audio enable */ + /* SRC48 converts samples rates 44.1, 48, 96, 192 to 48 khz. */ + /* [23:16] The corresponding P16V channel to SRC48 enabled if == 1. + * [31:24] The corresponding E10K2 channel to SRC48 enabled. + */ +#define SRCMULTI_ENABLE 0x6e /* SRCMulti input audio enable. Default 0xffffffff */ + /* SRCMulti converts 48khz samples rates to 44.1, 48, 96, 192 to 48. */ + /* [7:0] The corresponding P16V channel to SRCMulti_I2S enabled if == 1. + * [15:8] The corresponding E10K2 channel to SRCMulti I2S enabled. + * [23:16] The corresponding P16V channel to SRCMulti SPDIF enabled. + * [31:24] The corresponding E10K2 channel to SRCMulti SPDIF enabled. + */ + /* Bypass P16V 0xff00ff00 + * Bitmap. 0 = Off, 1 = On. + * P16V playback outputs: + * 0xXXXXXXX1 = PCM0 Left. (Front) + * 0xXXXXXXX2 = PCM0 Right. + * 0xXXXXXXX4 = PCM1 Left. (Center/LFE) + * 0xXXXXXXX8 = PCM1 Right. + * 0xXXXXXX1X = PCM2 Left. (Unknown) + * 0xXXXXXX2X = PCM2 Right. + * 0xXXXXXX4X = PCM3 Left. (Rear) + * 0xXXXXXX8X = PCM3 Right. + */ +#define AUDIO_OUT_ENABLE 0x6f /* Default: 000100FF */ + /* [3:0] Does something, but not documented. Probably capture enable. + * [7:4] Playback channels enable. not documented. + * [16] AC97 output enable if == 1 + * [30] 0 = SRCMulti_I2S input from fxengine 0x68-0x6f. + * 1 = SRCMulti_I2S input from SRC48 output. + * [31] 0 = SRCMulti_SPDIF input from fxengine 0x60-0x67. + * 1 = SRCMulti_SPDIF input from SRC48 output. + */ + /* 0xffffffff -> C00100FF */ + /* 0 -> Not playback sound, irq still running */ + /* 0xXXXXXX10 = PCM0 Left/Right On. (Front) + * 0xXXXXXX20 = PCM1 Left/Right On. (Center/LFE) + * 0xXXXXXX40 = PCM2 Left/Right On. (Unknown) + * 0xXXXXXX80 = PCM3 Left/Right On. (Rear) + */ +#define PLAYBACK_SPDIF_SELECT 0x70 /* Default: 12030F00 */ + /* 0xffffffff -> 3FF30FFF */ + /* 0x00000001 pauses stream/irq fail. */ + /* All other bits do not effect playback */ +#define PLAYBACK_SPDIF_SRC_SELECT 0x71 /* Default: 0000E4E4 */ + /* 0xffffffff -> F33FFFFF */ + /* All bits do not effect playback */ +#define PLAYBACK_SPDIF_USER_DATA0 0x72 /* SPDIF out user data 0 */ +#define PLAYBACK_SPDIF_USER_DATA1 0x73 /* SPDIF out user data 1 */ +/* 0x74-0x75 unknown */ +#define CAPTURE_SPDIF_CONTROL 0x76 /* SPDIF in control setting */ +#define CAPTURE_SPDIF_STATUS 0x77 /* SPDIF in status */ +#define CAPURE_SPDIF_USER_DATA0 0x78 /* SPDIF in user data 0 */ +#define CAPURE_SPDIF_USER_DATA1 0x79 /* SPDIF in user data 1 */ +#define CAPURE_SPDIF_USER_DATA2 0x7a /* SPDIF in user data 2 */ + diff -Nru a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c --- a/sound/pci/emu10k1/timer.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/emu10k1/timer.c 2005-03-30 16:58:50 -08:00 @@ -1,10 +1,8 @@ /* * Copyright (c) by Lee Revell - * + * Clemens Ladisch * Routines for control of EMU10K1 chips * - * Copied from similar code by Clemens Ladisch in the ymfpci driver - * * BUGS: * -- * diff -Nru a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c --- a/sound/pci/emu10k1/voice.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/emu10k1/voice.c 2005-03-30 16:58:48 -08:00 @@ -62,15 +62,13 @@ continue; } - /* make sure the block of voices does not cross the 32 voice boundary */ - //if (((i % 32) + number) > 32) - // continue; - skip = 0; for (k = 0; k < number; k++) { voice = &emu->voices[(i+k) % NUM_G]; - if (voice->use) + if (voice->use) { skip = 1; + break; + } } if (!skip) { // printk("allocated voice %d\n", i); @@ -81,12 +79,8 @@ } } - if (first_voice == last_voice) { - printk("BUG (or not enough voices), number %d, next free %d!\n", - number, - emu->next_free_voice); + if (first_voice == last_voice) return -ENOMEM; - } for (i=0; i < number; i++) { voice = &emu->voices[(first_voice + i) % NUM_G]; diff -Nru a/sound/pci/ens1370.c b/sound/pci/ens1370.c --- a/sound/pci/ens1370.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/ens1370.c 2005-03-30 16:58:50 -08:00 @@ -754,8 +754,6 @@ static int snd_ensoniq_trigger(snd_pcm_substream_t *substream, int cmd) { - unsigned long flags; - ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); switch (cmd) { case SNDRV_PCM_TRIGGER_PAUSE_PUSH: @@ -775,13 +773,13 @@ } else if (s == ensoniq->capture_substream) return -EINVAL; } - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); if (cmd == SNDRV_PCM_TRIGGER_PAUSE_PUSH) ensoniq->sctrl |= what; else ensoniq->sctrl &= ~what; outl(ensoniq->sctrl, ES_REG(ensoniq, SERIAL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); break; } case SNDRV_PCM_TRIGGER_START: @@ -803,13 +801,13 @@ snd_pcm_trigger_done(s, substream); } } - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); if (cmd == SNDRV_PCM_TRIGGER_START) ensoniq->ctrl |= what; else ensoniq->ctrl &= ~what; outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); break; } default: @@ -958,11 +956,10 @@ static snd_pcm_uframes_t snd_ensoniq_playback1_pointer(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); size_t ptr; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); if (inl(ES_REG(ensoniq, CONTROL)) & ES_DAC1_EN) { outl(ES_MEM_PAGEO(ES_PAGE_DAC), ES_REG(ensoniq, MEM_PAGE)); ptr = ES_REG_FCURR_COUNTI(inl(ES_REG(ensoniq, DAC1_SIZE))); @@ -970,17 +967,16 @@ } else { ptr = 0; } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); return ptr; } static snd_pcm_uframes_t snd_ensoniq_playback2_pointer(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); size_t ptr; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); if (inl(ES_REG(ensoniq, CONTROL)) & ES_DAC2_EN) { outl(ES_MEM_PAGEO(ES_PAGE_DAC), ES_REG(ensoniq, MEM_PAGE)); ptr = ES_REG_FCURR_COUNTI(inl(ES_REG(ensoniq, DAC2_SIZE))); @@ -988,17 +984,16 @@ } else { ptr = 0; } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); return ptr; } static snd_pcm_uframes_t snd_ensoniq_capture_pointer(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); size_t ptr; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); if (inl(ES_REG(ensoniq, CONTROL)) & ES_ADC_EN) { outl(ES_MEM_PAGEO(ES_PAGE_ADC), ES_REG(ensoniq, MEM_PAGE)); ptr = ES_REG_FCURR_COUNTI(inl(ES_REG(ensoniq, ADC_SIZE))); @@ -1006,7 +1001,7 @@ } else { ptr = 0; } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); return ptr; } @@ -1802,7 +1797,7 @@ gameport_set_name(gp, "ES137x"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(ensoniq->pci)); - gp->dev.parent = &ensoniq->pci->dev; + gameport_set_dev_parent(gp, &ensoniq->pci->dev); gp->io = io_port; ensoniq->ctrl |= ES_JYSTK_EN; @@ -2088,14 +2083,13 @@ static void snd_ensoniq_midi_interrupt(ensoniq_t * ensoniq) { - unsigned long flags; snd_rawmidi_t * rmidi = ensoniq->rmidi; unsigned char status, mask, byte; if (rmidi == NULL) return; /* do Rx at first */ - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); mask = ensoniq->uartm & ES_MODE_INPUT ? ES_RXRDY : 0; while (mask) { status = inb(ES_REG(ensoniq, UART_STATUS)); @@ -2104,10 +2098,10 @@ byte = inb(ES_REG(ensoniq, UART_DATA)); snd_rawmidi_receive(ensoniq->midi_input, &byte, 1); } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); /* do Tx at second */ - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); mask = ensoniq->uartm & ES_MODE_OUTPUT ? ES_TXRDY : 0; while (mask) { status = inb(ES_REG(ensoniq, UART_STATUS)); @@ -2121,7 +2115,7 @@ outb(byte, ES_REG(ensoniq, UART_DATA)); } } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); } static int snd_ensoniq_midi_input_open(snd_rawmidi_substream_t * substream) @@ -2288,7 +2282,6 @@ static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - unsigned long flags; ensoniq_t *ensoniq = dev_id; unsigned int status, sctrl; @@ -2299,7 +2292,7 @@ if (!(status & ES_INTR)) return IRQ_NONE; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock(&ensoniq->reg_lock); sctrl = ensoniq->sctrl; if (status & ES_DAC1) sctrl &= ~ES_P1_INT_EN; @@ -2309,7 +2302,7 @@ sctrl &= ~ES_R1_INT_EN; outl(sctrl, ES_REG(ensoniq, SERIAL)); outl(ensoniq->sctrl, ES_REG(ensoniq, SERIAL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock(&ensoniq->reg_lock); if (status & ES_UART) snd_ensoniq_midi_interrupt(ensoniq); diff -Nru a/sound/pci/es1938.c b/sound/pci/es1938.c --- a/sound/pci/es1938.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/es1938.c 2005-03-30 16:58:49 -08:00 @@ -1435,7 +1435,7 @@ gameport_set_name(gp, "ES1938"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); gp->io = chip->game_port; gameport_register_port(gp); diff -Nru a/sound/pci/es1968.c b/sound/pci/es1968.c --- a/sound/pci/es1968.c 2005-03-30 16:58:51 -08:00 +++ b/sound/pci/es1968.c 2005-03-30 16:58:51 -08:00 @@ -586,6 +586,7 @@ spinlock_t reg_lock; spinlock_t ac97_lock; struct tasklet_struct hwvol_tq; + unsigned int in_suspend; /* Maestro Stuff */ u16 maestro_map[32]; @@ -1937,6 +1938,9 @@ outb(0x88, chip->io_port + 0x1e); outb(0x88, chip->io_port + 0x1f); + if (chip->in_suspend) + return; + if (! chip->master_switch || ! chip->master_volume) return; @@ -2410,6 +2414,7 @@ if (! chip->do_pm) return 0; + chip->in_suspend = 1; snd_pcm_suspend_all(chip->pcm); snd_ac97_suspend(chip->ac97); snd_es1968_bob_stop(chip); @@ -2421,6 +2426,7 @@ static int es1968_resume(snd_card_t *card) { es1968_t *chip = card->pm_private_data; + struct list_head *p; if (! chip->do_pm) return 0; @@ -2441,10 +2447,23 @@ /* restore ac97 state */ snd_ac97_resume(chip->ac97); + list_for_each(p, &chip->substream_list) { + esschan_t *es = list_entry(p, esschan_t, list); + switch (es->mode) { + case ESM_MODE_PLAY: + snd_es1968_playback_setup(chip, es, es->substream->runtime); + break; + case ESM_MODE_CAPTURE: + snd_es1968_capture_setup(chip, es, es->substream->runtime); + break; + } + } + /* start timer again */ if (chip->bobclient) snd_es1968_bob_start(chip); + chip->in_suspend = 0; return 0; } #endif /* CONFIG_PM */ @@ -2477,8 +2496,9 @@ gameport_set_name(gp, "ES1968 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); gp->io = JOYSTICK_ADDR; + gameport_set_port_data(gp, r); gameport_register_port(gp); @@ -2488,7 +2508,7 @@ static void snd_es1968_free_gameport(es1968_t *chip) { if (chip->gameport) { - struct resource *r = chip->gameport->port_data; + struct resource *r = gameport_get_port_data(chip->gameport); gameport_unregister_port(chip->gameport); chip->gameport = NULL; diff -Nru a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile --- a/sound/pci/hda/Makefile 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/hda/Makefile 2005-03-30 16:58:47 -08:00 @@ -1,5 +1,5 @@ snd-hda-intel-objs := hda_intel.o -snd-hda-codec-objs := hda_codec.o hda_generic.o patch_realtek.o patch_cmedia.o +snd-hda-codec-objs := hda_codec.o hda_generic.o patch_realtek.o patch_cmedia.o patch_analog.o ifdef CONFIG_PROC_FS snd-hda-codec-objs += hda_proc.o endif diff -Nru a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c --- a/sound/pci/hda/hda_codec.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/hda/hda_codec.c 2005-03-30 16:58:50 -08:00 @@ -49,6 +49,7 @@ /* codec vendor labels */ static struct hda_vendor_id hda_vendor_ids[] = { { 0x10ec, "Realtek" }, + { 0x13f6, "C-Media" }, { 0x434d, "C-Media" }, {} /* terminator */ }; @@ -610,6 +611,8 @@ if (! info) return 0; if (! (info->status & INFO_AMP_CAPS)) { + if (!(snd_hda_param_read(codec, nid, AC_PAR_AUDIO_WIDGET_CAP) & AC_WCAP_AMP_OVRD)) + nid = codec->afg; info->amp_caps = snd_hda_param_read(codec, nid, direction == HDA_OUTPUT ? AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP); info->status |= INFO_AMP_CAPS; @@ -954,6 +957,9 @@ if (change || codec->in_resume) { codec->spdif_ctls = val; snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1, val & 0xff); + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, + AC_AMP_SET_RIGHT | AC_AMP_SET_LEFT | + AC_AMP_SET_OUTPUT | ((val & 1) ? 0 : 0x80)); } up(&codec->spdif_mutex); return change; diff -Nru a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c --- a/sound/pci/hda/hda_generic.c 2005-03-30 16:58:51 -08:00 +++ b/sound/pci/hda/hda_generic.c 2005-03-30 16:58:51 -08:00 @@ -617,6 +617,7 @@ char name[32]; int err; int created = 0; + snd_kcontrol_new_t knew; if (type) sprintf(name, "%s %s Switch", type, dir_sfx); @@ -624,16 +625,14 @@ sprintf(name, "%s Switch", dir_sfx); if ((node->wid_caps & AC_WCAP_IN_AMP) && (node->amp_in_caps & AC_AMPCAP_MUTE)) { - snd_kcontrol_new_t knew = - HDA_CODEC_MUTE(name, node->nid, index, HDA_INPUT); + knew = (snd_kcontrol_new_t)HDA_CODEC_MUTE(name, node->nid, index, HDA_INPUT); snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index); if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) return err; created = 1; } else if ((node->wid_caps & AC_WCAP_OUT_AMP) && (node->amp_out_caps & AC_AMPCAP_MUTE)) { - snd_kcontrol_new_t knew = - HDA_CODEC_MUTE(name, node->nid, 0, HDA_OUTPUT); + knew = (snd_kcontrol_new_t)HDA_CODEC_MUTE(name, node->nid, 0, HDA_OUTPUT); snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid); if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) return err; @@ -646,16 +645,14 @@ sprintf(name, "%s Volume", dir_sfx); if ((node->wid_caps & AC_WCAP_IN_AMP) && (node->amp_in_caps & AC_AMPCAP_NUM_STEPS)) { - snd_kcontrol_new_t knew = - HDA_CODEC_VOLUME(name, node->nid, index, HDA_INPUT); + knew = (snd_kcontrol_new_t)HDA_CODEC_VOLUME(name, node->nid, index, HDA_INPUT); snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index); if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) return err; created = 1; } else if ((node->wid_caps & AC_WCAP_OUT_AMP) && (node->amp_out_caps & AC_AMPCAP_NUM_STEPS)) { - snd_kcontrol_new_t knew = - HDA_CODEC_VOLUME(name, node->nid, 0, HDA_OUTPUT); + knew = (snd_kcontrol_new_t)HDA_CODEC_VOLUME(name, node->nid, 0, HDA_OUTPUT); snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid); if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) return err; diff -Nru a/sound/pci/hda/hda_patch.h b/sound/pci/hda/hda_patch.h --- a/sound/pci/hda/hda_patch.h 2005-03-30 16:58:51 -08:00 +++ b/sound/pci/hda/hda_patch.h 2005-03-30 16:58:51 -08:00 @@ -6,9 +6,12 @@ extern struct hda_codec_preset snd_hda_preset_realtek[]; /* C-Media codecs */ extern struct hda_codec_preset snd_hda_preset_cmedia[]; +/* Analog Devices codecs */ +extern struct hda_codec_preset snd_hda_preset_analog[]; static const struct hda_codec_preset *hda_preset_tables[] = { snd_hda_preset_realtek, snd_hda_preset_cmedia, + snd_hda_preset_analog, NULL }; diff -Nru a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/hda/patch_analog.c 2005-03-30 16:58:51 -08:00 @@ -0,0 +1,445 @@ +/* + * HD audio interface patch for AD1986A + * + * Copyright (c) 2005 Takashi Iwai + * + * This driver 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. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include "hda_codec.h" +#include "hda_local.h" + +struct ad1986a_spec { + struct semaphore amp_mutex; /* PCM volume/mute control mutex */ + struct hda_multi_out multiout; /* playback */ + unsigned int cur_mux; /* capture source */ + struct hda_pcm pcm_rec[2]; /* PCM information */ +}; + +#define AD1986A_SPDIF_OUT 0x02 +#define AD1986A_FRONT_DAC 0x03 +#define AD1986A_SURR_DAC 0x04 +#define AD1986A_CLFE_DAC 0x05 +#define AD1986A_ADC 0x06 + +static hda_nid_t ad1986a_dac_nids[3] = { + AD1986A_FRONT_DAC, AD1986A_SURR_DAC, AD1986A_CLFE_DAC +}; + +static struct hda_input_mux ad1986a_capture_source = { + .num_items = 7, + .items = { + { "Mic", 0x0 }, + { "CD", 0x1 }, + { "Aux", 0x3 }, + { "Line", 0x4 }, + { "Mix", 0x5 }, + { "Mono", 0x6 }, + { "Phone", 0x7 }, + }, +}; + +/* + * PCM control + * + * bind volumes/mutes of 3 DACs as a single PCM control for simplicity + */ + +#define ad1986a_pcm_amp_vol_info snd_hda_mixer_amp_volume_info + +static int ad1986a_pcm_amp_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct ad1986a_spec *ad = codec->spec; + + down(&ad->amp_mutex); + snd_hda_mixer_amp_volume_get(kcontrol, ucontrol); + up(&ad->amp_mutex); + return 0; +} + +static int ad1986a_pcm_amp_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct ad1986a_spec *ad = codec->spec; + int i, change = 0; + + down(&ad->amp_mutex); + for (i = 0; i < ARRAY_SIZE(ad1986a_dac_nids); i++) { + kcontrol->private_value = HDA_COMPOSE_AMP_VAL(ad1986a_dac_nids[i], 3, 0, HDA_OUTPUT); + change |= snd_hda_mixer_amp_volume_put(kcontrol, ucontrol); + } + kcontrol->private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT); + up(&ad->amp_mutex); + return change; +} + +#define ad1986a_pcm_amp_sw_info snd_hda_mixer_amp_volume_info + +static int ad1986a_pcm_amp_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct ad1986a_spec *ad = codec->spec; + + down(&ad->amp_mutex); + snd_hda_mixer_amp_switch_get(kcontrol, ucontrol); + up(&ad->amp_mutex); + return 0; +} + +static int ad1986a_pcm_amp_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct ad1986a_spec *ad = codec->spec; + int i, change = 0; + + down(&ad->amp_mutex); + for (i = 0; i < ARRAY_SIZE(ad1986a_dac_nids); i++) { + kcontrol->private_value = HDA_COMPOSE_AMP_VAL(ad1986a_dac_nids[i], 3, 0, HDA_OUTPUT); + change |= snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); + } + kcontrol->private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT); + up(&ad->amp_mutex); + return change; +} + +/* + * input MUX handling + */ +static int ad1986a_mux_enum_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + return snd_hda_input_mux_info(&ad1986a_capture_source, uinfo); +} + +static int ad1986a_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct ad1986a_spec *spec = codec->spec; + + ucontrol->value.enumerated.item[0] = spec->cur_mux; + return 0; +} + +static int ad1986a_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct ad1986a_spec *spec = codec->spec; + + return snd_hda_input_mux_put(codec, &ad1986a_capture_source, ucontrol, + AD1986A_ADC, &spec->cur_mux); +} + +/* + * mixers + */ +static snd_kcontrol_new_t ad1986a_mixers[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "PCM Playback Volume", + .info = ad1986a_pcm_amp_vol_info, + .get = ad1986a_pcm_amp_vol_get, + .put = ad1986a_pcm_amp_vol_put, + .private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT) + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "PCM Playback Switch", + .info = ad1986a_pcm_amp_sw_info, + .get = ad1986a_pcm_amp_sw_get, + .put = ad1986a_pcm_amp_sw_put, + .private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT) + }, + HDA_CODEC_VOLUME("Front Playback Volume", 0x1b, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Surround Playback Volume", 0x1c, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Surround Playback Switch", 0x1c, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x1d, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x1d, 2, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x1d, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x1d, 2, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Headphone Playback Volume", 0x1a, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x17, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Aux Playback Volume", 0x16, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x18, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x18, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Mono Playback Switch", 0x1e, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Source", + .info = ad1986a_mux_enum_info, + .get = ad1986a_mux_enum_get, + .put = ad1986a_mux_enum_put, + }, + HDA_CODEC_MUTE("Stereo Downmix Switch", 0x09, 0x0, HDA_OUTPUT), + { } /* end */ +}; + +/* + * initialization verbs + */ +static struct hda_verb ad1986a_init_verbs[] = { + /* Front, Surround, CLFE DAC; mute as default */ + {0x03, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x05, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + /* Downmix - off */ + {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + /* HP, Line-Out, Surround, CLFE selectors */ + {0x0a, AC_VERB_SET_CONNECT_SEL, 0x0}, + {0x0b, AC_VERB_SET_CONNECT_SEL, 0x0}, + {0x0c, AC_VERB_SET_CONNECT_SEL, 0x0}, + {0x0d, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* Mono selector */ + {0x0e, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* Mic selector: Mic 1/2 pin */ + {0x0f, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* Line-in selector: Line-in */ + {0x10, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* Mic 1/2 swap */ + {0x11, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* Record selector: mic */ + {0x12, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* Mic, Phone, CD, Aux, Line-In amp; mute as default */ + {0x13, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + /* PC beep */ + {0x18, AC_VERB_SET_CONNECT_SEL, 0x0}, + /* HP, Line-Out, Surround, CLFE, Mono pins; mute as default */ + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + {0x1e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + { } /* end */ +}; + + +static int ad1986a_init(struct hda_codec *codec) +{ + snd_hda_sequence_write(codec, ad1986a_init_verbs); + return 0; +} + +static int ad1986a_build_controls(struct hda_codec *codec) +{ + int err; + + err = snd_hda_add_new_ctls(codec, ad1986a_mixers); + if (err < 0) + return err; + err = snd_hda_create_spdif_out_ctls(codec, AD1986A_SPDIF_OUT); + if (err < 0) + return err; + return 0; +} + +/* + * Analog playback callbacks + */ +static int ad1986a_playback_pcm_open(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + snd_pcm_substream_t *substream) +{ + struct ad1986a_spec *spec = codec->spec; + return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream); +} + +static int ad1986a_playback_pcm_prepare(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + unsigned int stream_tag, + unsigned int format, + snd_pcm_substream_t *substream) +{ + struct ad1986a_spec *spec = codec->spec; + return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, + format, substream); +} + +static int ad1986a_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + snd_pcm_substream_t *substream) +{ + struct ad1986a_spec *spec = codec->spec; + return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); +} + +/* + * Digital out + */ +static int ad1986a_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + snd_pcm_substream_t *substream) +{ + struct ad1986a_spec *spec = codec->spec; + return snd_hda_multi_out_dig_open(codec, &spec->multiout); +} + +static int ad1986a_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + snd_pcm_substream_t *substream) +{ + struct ad1986a_spec *spec = codec->spec; + return snd_hda_multi_out_dig_close(codec, &spec->multiout); +} + +/* + * Analog capture + */ +static int ad1986a_capture_pcm_prepare(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + unsigned int stream_tag, + unsigned int format, + snd_pcm_substream_t *substream) +{ + snd_hda_codec_setup_stream(codec, AD1986A_ADC, stream_tag, 0, format); + return 0; +} + +static int ad1986a_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + snd_pcm_substream_t *substream) +{ + snd_hda_codec_setup_stream(codec, AD1986A_ADC, 0, 0, 0); + return 0; +} + + +/* + */ +static struct hda_pcm_stream ad1986a_pcm_analog_playback = { + .substreams = 1, + .channels_min = 2, + .channels_max = 6, + .nid = AD1986A_FRONT_DAC, /* NID to query formats and rates */ + .ops = { + .open = ad1986a_playback_pcm_open, + .prepare = ad1986a_playback_pcm_prepare, + .cleanup = ad1986a_playback_pcm_cleanup + }, +}; + +static struct hda_pcm_stream ad1986a_pcm_analog_capture = { + .substreams = 2, + .channels_min = 2, + .channels_max = 2, + .nid = AD1986A_ADC, /* NID to query formats and rates */ + .ops = { + .prepare = ad1986a_capture_pcm_prepare, + .cleanup = ad1986a_capture_pcm_cleanup + }, +}; + +static struct hda_pcm_stream ad1986a_pcm_digital_playback = { + .substreams = 1, + .channels_min = 2, + .channels_max = 2, + .nid = AD1986A_SPDIF_OUT, + .ops = { + .open = ad1986a_dig_playback_pcm_open, + .close = ad1986a_dig_playback_pcm_close + }, +}; + +static int ad1986a_build_pcms(struct hda_codec *codec) +{ + struct ad1986a_spec *spec = codec->spec; + struct hda_pcm *info = spec->pcm_rec; + + codec->num_pcms = 2; + codec->pcm_info = info; + + info->name = "AD1986A Analog"; + info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad1986a_pcm_analog_playback; + info->stream[SNDRV_PCM_STREAM_CAPTURE] = ad1986a_pcm_analog_capture; + info++; + + info->name = "AD1986A Digital"; + info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad1986a_pcm_digital_playback; + + return 0; +} + +static void ad1986a_free(struct hda_codec *codec) +{ + kfree(codec->spec); +} + +#ifdef CONFIG_PM +static int ad1986a_resume(struct hda_codec *codec) +{ + ad1986a_init(codec); + snd_hda_resume_ctls(codec, ad1986a_mixers); + snd_hda_resume_spdif_out(codec); + return 0; +} +#endif + +static struct hda_codec_ops ad1986a_patch_ops = { + .build_controls = ad1986a_build_controls, + .build_pcms = ad1986a_build_pcms, + .init = ad1986a_init, + .free = ad1986a_free, +#ifdef CONFIG_PM + .resume = ad1986a_resume, +#endif +}; + +static int patch_ad1986a(struct hda_codec *codec) +{ + struct ad1986a_spec *spec; + + spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); + if (spec == NULL) + return -ENOMEM; + + init_MUTEX(&spec->amp_mutex); + codec->spec = spec; + + spec->multiout.max_channels = 6; + spec->multiout.num_dacs = ARRAY_SIZE(ad1986a_dac_nids); + spec->multiout.dac_nids = ad1986a_dac_nids; + spec->multiout.dig_out_nid = AD1986A_SPDIF_OUT; + + codec->patch_ops = ad1986a_patch_ops; + + return 0; +} + +/* + * patch entries + */ +struct hda_codec_preset snd_hda_preset_analog[] = { + { .id = 0x11d41986, .name = "AD1986A", .patch = patch_ad1986a }, + {} /* terminator */ +}; diff -Nru a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c --- a/sound/pci/hda/patch_cmedia.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/hda/patch_cmedia.c 2005-03-30 16:58:49 -08:00 @@ -112,9 +112,9 @@ /* 3-stack / 6 channel */ static struct hda_verb cmi9880_ch6_init[] = { - /* set line-in PIN for input */ + /* set line-in PIN for output */ { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, - /* set mic PIN for input, also enable vref */ + /* set mic PIN for output */ { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, /* route front PCM (DAC1) to HP */ { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x00 }, @@ -123,9 +123,9 @@ /* 3-stack+front / 8 channel */ static struct hda_verb cmi9880_ch8_init[] = { - /* set line-in PIN for input */ + /* set line-in PIN for output */ { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, - /* set mic PIN for input, also enable vref */ + /* set mic PIN for output */ { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, /* route rear-surround PCM (DAC4) to HP */ { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x03 }, @@ -565,7 +565,7 @@ spec->board_config = snd_hda_check_board_config(codec, cmi9880_cfg_tbl); if (spec->board_config < 0) { snd_printd(KERN_INFO "hda_codec: Unknown model for CMI9880\n"); - spec->board_config = CMI_MINIMAL; + spec->board_config = CMI_FULL_DIG; /* try everything */ } switch (spec->board_config) { @@ -615,6 +615,7 @@ * patch entries */ struct hda_codec_preset snd_hda_preset_cmedia[] = { + { .id = 0x13f69880, .name = "CMI9880", .patch = patch_cmi9880 }, { .id = 0x434d4980, .name = "CMI9880", .patch = patch_cmi9880 }, {} /* terminator */ }; diff -Nru a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c --- a/sound/pci/hda/patch_realtek.c 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/hda/patch_realtek.c 2005-03-30 16:58:47 -08:00 @@ -1133,6 +1133,8 @@ HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x07, 0x05, HDA_INPUT), HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Headphone Playback Switch", 0x10, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x11, 1, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT), { @@ -1162,6 +1164,8 @@ {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, /* enable HP */ {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, + /* enable Mono */ + {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, /* unmute amp left and right */ {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000}, /* set connection select to line in (default select for this ADC) */ @@ -1174,6 +1178,10 @@ {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, /* mute pin widget amp left and right (no gain on this amp) */ {0x10, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, + /* unmute Mono mixer amp left and right (volume = 0) */ + {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, + /* mute pin widget amp left and right (no gain on this amp) */ + {0x11, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, /* mute LINE-2 out */ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 & Line In 2 = 0x03 */ @@ -1190,6 +1198,9 @@ /* Unmute Headphone out path */ {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, + /* Unmute Mono out path */ + {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, + {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, { } }; diff -Nru a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c --- a/sound/pci/mixart/mixart.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/mixart/mixart.c 2005-03-30 16:58:49 -08:00 @@ -1062,7 +1062,7 @@ free_irq(mgr->irq, (void *)mgr); /* reset board if some firmware was loaded */ - if(mgr->hwdep->dsp_loaded) { + if(mgr->dsp_loaded) { snd_mixart_reset_board(mgr); snd_printdd("reset miXart !\n"); } @@ -1203,7 +1203,7 @@ snd_iprintf(buffer, "Digigram miXart (alsa card %d)\n\n", chip->chip_idx); /* stats available when embedded OS is running */ - if (chip->mgr->hwdep->dsp_loaded & ( 1 << MIXART_MOTHERBOARD_ELF_INDEX)) { + if (chip->mgr->dsp_loaded & ( 1 << MIXART_MOTHERBOARD_ELF_INDEX)) { snd_iprintf(buffer, "- hardware -\n"); switch (chip->mgr->board_type ) { case MIXART_DAUGHTER_TYPE_NONE : snd_iprintf(buffer, "\tmiXart8 (no daughter board)\n\n"); break; @@ -1381,7 +1381,7 @@ } } - /* init firmware status (mgr->hwdep->dsp_loaded reset in hwdep_new) */ + /* init firmware status (mgr->dsp_loaded reset in hwdep_new) */ mgr->board_type = MIXART_DAUGHTER_TYPE_NONE; /* create array of streaminfo */ diff -Nru a/sound/pci/mixart/mixart.h b/sound/pci/mixart/mixart.h --- a/sound/pci/mixart/mixart.h 2005-03-30 16:58:47 -08:00 +++ b/sound/pci/mixart/mixart.h 2005-03-30 16:58:47 -08:00 @@ -112,7 +112,7 @@ struct semaphore setup_mutex; /* mutex used in hw_params, open and close */ /* hardware interface */ - snd_hwdep_t *hwdep; + unsigned int dsp_loaded; /* bit flags of loaded dsp indices */ unsigned int board_type; /* read from embedded once elf file is loaded, 250 = miXart8, 251 = with AES, 252 = with Cobranet */ struct snd_dma_buffer flowinfo; diff -Nru a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c --- a/sound/pci/mixart/mixart_hwdep.c 2005-03-30 16:58:51 -08:00 +++ b/sound/pci/mixart/mixart_hwdep.c 2005-03-30 16:58:51 -08:00 @@ -142,26 +142,35 @@ u32 k; int err; mixart_msg_t request; - mixart_enum_connector_resp_t connector; - mixart_audio_info_req_t audio_info_req; - mixart_audio_info_resp_t audio_info; - - audio_info_req.line_max_level = MIXART_FLOAT_P_22_0_TO_HEX; - audio_info_req.micro_max_level = MIXART_FLOAT_M_20_0_TO_HEX; - audio_info_req.cd_max_level = MIXART_FLOAT____0_0_TO_HEX; + mixart_enum_connector_resp_t *connector; + mixart_audio_info_req_t *audio_info_req; + mixart_audio_info_resp_t *audio_info; + + connector = kmalloc(sizeof(*connector), GFP_KERNEL); + audio_info_req = kmalloc(sizeof(*audio_info_req), GFP_KERNEL); + audio_info = kmalloc(sizeof(*audio_info), GFP_KERNEL); + if (! connector || ! audio_info_req || ! audio_info) { + err = -ENOMEM; + goto __error; + } + + audio_info_req->line_max_level = MIXART_FLOAT_P_22_0_TO_HEX; + audio_info_req->micro_max_level = MIXART_FLOAT_M_20_0_TO_HEX; + audio_info_req->cd_max_level = MIXART_FLOAT____0_0_TO_HEX; request.message_id = MSG_SYSTEM_ENUM_PLAY_CONNECTOR; request.uid = (mixart_uid_t){0,0}; /* board num = 0 */ request.data = NULL; request.size = 0; - err = snd_mixart_send_msg(mgr, &request, sizeof(connector), &connector); - if((err < 0) || (connector.error_code) || (connector.uid_count > MIXART_MAX_PHYS_CONNECTORS)) { + err = snd_mixart_send_msg(mgr, &request, sizeof(*connector), connector); + if((err < 0) || (connector->error_code) || (connector->uid_count > MIXART_MAX_PHYS_CONNECTORS)) { snd_printk(KERN_ERR "error MSG_SYSTEM_ENUM_PLAY_CONNECTOR\n"); - return -EINVAL; + err = -EINVAL; + goto __error; } - for(k=0; k < connector.uid_count; k++) { + for(k=0; k < connector->uid_count; k++) { mixart_pipe_t* pipe; if(k < MIXART_FIRST_DIG_AUDIO_ID) { @@ -170,25 +179,25 @@ pipe = &mgr->chip[(k-MIXART_FIRST_DIG_AUDIO_ID)/2]->pipe_out_dig; } if(k & 1) { - pipe->uid_right_connector = connector.uid[k]; /* odd */ + pipe->uid_right_connector = connector->uid[k]; /* odd */ } else { - pipe->uid_left_connector = connector.uid[k]; /* even */ + pipe->uid_left_connector = connector->uid[k]; /* even */ } - /* snd_printk(KERN_DEBUG "playback connector[%d].object_id = %x\n", k, connector.uid[k].object_id); */ + /* snd_printk(KERN_DEBUG "playback connector[%d].object_id = %x\n", k, connector->uid[k].object_id); */ /* TODO: really need send_msg MSG_CONNECTOR_GET_AUDIO_INFO for each connector ? perhaps for analog level caps ? */ request.message_id = MSG_CONNECTOR_GET_AUDIO_INFO; - request.uid = connector.uid[k]; - request.data = &audio_info_req; - request.size = sizeof(audio_info_req); + request.uid = connector->uid[k]; + request.data = audio_info_req; + request.size = sizeof(*audio_info_req); - err = snd_mixart_send_msg(mgr, &request, sizeof(audio_info), &audio_info); + err = snd_mixart_send_msg(mgr, &request, sizeof(*audio_info), audio_info); if( err < 0 ) { snd_printk(KERN_ERR "error MSG_CONNECTOR_GET_AUDIO_INFO\n"); - return err; + goto __error; } - /*snd_printk(KERN_DEBUG "play analog_info.analog_level_present = %x\n", audio_info.info.analog_info.analog_level_present);*/ + /*snd_printk(KERN_DEBUG "play analog_info.analog_level_present = %x\n", audio_info->info.analog_info.analog_level_present);*/ } request.message_id = MSG_SYSTEM_ENUM_RECORD_CONNECTOR; @@ -196,13 +205,14 @@ request.data = NULL; request.size = 0; - err = snd_mixart_send_msg(mgr, &request, sizeof(connector), &connector); - if((err < 0) || (connector.error_code) || (connector.uid_count > MIXART_MAX_PHYS_CONNECTORS)) { + err = snd_mixart_send_msg(mgr, &request, sizeof(*connector), connector); + if((err < 0) || (connector->error_code) || (connector->uid_count > MIXART_MAX_PHYS_CONNECTORS)) { snd_printk(KERN_ERR "error MSG_SYSTEM_ENUM_RECORD_CONNECTOR\n"); - return -EINVAL; + err = -EINVAL; + goto __error; } - for(k=0; k < connector.uid_count; k++) { + for(k=0; k < connector->uid_count; k++) { mixart_pipe_t* pipe; if(k < MIXART_FIRST_DIG_AUDIO_ID) { @@ -211,28 +221,34 @@ pipe = &mgr->chip[(k-MIXART_FIRST_DIG_AUDIO_ID)/2]->pipe_in_dig; } if(k & 1) { - pipe->uid_right_connector = connector.uid[k]; /* odd */ + pipe->uid_right_connector = connector->uid[k]; /* odd */ } else { - pipe->uid_left_connector = connector.uid[k]; /* even */ + pipe->uid_left_connector = connector->uid[k]; /* even */ } - /* snd_printk(KERN_DEBUG "capture connector[%d].object_id = %x\n", k, connector.uid[k].object_id); */ + /* snd_printk(KERN_DEBUG "capture connector[%d].object_id = %x\n", k, connector->uid[k].object_id); */ /* TODO: really need send_msg MSG_CONNECTOR_GET_AUDIO_INFO for each connector ? perhaps for analog level caps ? */ request.message_id = MSG_CONNECTOR_GET_AUDIO_INFO; - request.uid = connector.uid[k]; - request.data = &audio_info_req; - request.size = sizeof(audio_info_req); + request.uid = connector->uid[k]; + request.data = audio_info_req; + request.size = sizeof(*audio_info_req); - err = snd_mixart_send_msg(mgr, &request, sizeof(audio_info), &audio_info); + err = snd_mixart_send_msg(mgr, &request, sizeof(*audio_info), audio_info); if( err < 0 ) { snd_printk(KERN_ERR "error MSG_CONNECTOR_GET_AUDIO_INFO\n"); - return err; + goto __error; } - /*snd_printk(KERN_DEBUG "rec analog_info.analog_level_present = %x\n", audio_info.info.analog_info.analog_level_present);*/ + /*snd_printk(KERN_DEBUG "rec analog_info.analog_level_present = %x\n", audio_info->info.analog_info.analog_level_present);*/ } + err = 0; - return 0; + __error: + kfree(connector); + kfree(audio_info_req); + kfree(audio_info); + + return err; } static int mixart_enum_physio(mixart_mgr_t *mgr) @@ -546,6 +562,7 @@ release_firmware(fw_entry); if (err < 0) return err; + mgr->dsp_loaded |= 1 << i; } return 0; } @@ -573,7 +590,7 @@ strcpy(info->id, "miXart"); info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX; - if (mgr->hwdep->dsp_loaded & (1 << MIXART_MOTHERBOARD_ELF_INDEX)) + if (mgr->dsp_loaded & (1 << MIXART_MOTHERBOARD_ELF_INDEX)) info->chip_ready = 1; info->version = MIXART_DRIVER_VERSION; @@ -599,6 +616,9 @@ } err = mixart_dsp_load(mgr, dsp->index, &fw); vfree(fw.data); + if (err < 0) + return err; + mgr->dsp_loaded |= 1 << dsp->index; return err; } @@ -619,8 +639,7 @@ hw->ops.dsp_load = mixart_hwdep_dsp_load; hw->exclusive = 1; sprintf(hw->name, SND_MIXART_HWDEP_ID); - mgr->hwdep = hw; - mgr->hwdep->dsp_loaded = 0; + mgr->dsp_loaded = 0; return snd_card_register(mgr->chip[0]->card); } diff -Nru a/sound/pci/rme32.c b/sound/pci/rme32.c --- a/sound/pci/rme32.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/rme32.c 2005-03-30 16:58:50 -08:00 @@ -1183,15 +1183,14 @@ { rme32_t *rme32 = snd_pcm_substream_chip(substream); snd_pcm_indirect_t *rec, *cprec; - unsigned long flags; rec = &rme32->playback_pcm; cprec = &rme32->capture_pcm; - spin_lock_irqsave(&rme32->lock, flags); + spin_lock(&rme32->lock); rec->hw_queue_size = RME32_BUFFER_SIZE; if (rme32->running & (1 << SNDRV_PCM_STREAM_CAPTURE)) rec->hw_queue_size -= cprec->hw_ready; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock(&rme32->lock); snd_pcm_indirect_playback_transfer(substream, rec, snd_rme32_pb_trans_copy); return 0; diff -Nru a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c --- a/sound/pci/rme9652/hdsp.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/rme9652/hdsp.c 2005-03-30 16:58:48 -08:00 @@ -3905,7 +3905,6 @@ static int snd_hdsp_trigger(snd_pcm_substream_t *substream, int cmd) { - unsigned long flags; hdsp_t *hdsp = snd_pcm_substream_chip(substream); snd_pcm_substream_t *other; int running; @@ -3925,7 +3924,7 @@ return -EIO; } - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock(&hdsp->lock); running = hdsp->running; switch (cmd) { case SNDRV_PCM_TRIGGER_START: @@ -3936,7 +3935,7 @@ break; default: snd_BUG(); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock(&hdsp->lock); return -EINVAL; } if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) @@ -3978,7 +3977,7 @@ else if (hdsp->running && !running) hdsp_stop_audio(hdsp); hdsp->running = running; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock(&hdsp->lock); return 0; } diff -Nru a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c --- a/sound/pci/sonicvibes.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/sonicvibes.c 2005-03-30 16:58:49 -08:00 @@ -1183,7 +1183,7 @@ gameport_set_name(gp, "SonicVibes Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(sonic->pci)); - gp->dev.parent = &sonic->pci->dev; + gameport_set_dev_parent(gp, &sonic->pci->dev); gp->io = sonic->game_port; gameport_register_port(gp); diff -Nru a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c --- a/sound/pci/trident/trident_main.c 2005-03-30 16:58:49 -08:00 +++ b/sound/pci/trident/trident_main.c 2005-03-30 16:58:49 -08:00 @@ -3112,7 +3112,7 @@ static unsigned char snd_trident_gameport_read(struct gameport *gameport) { - trident_t *chip = gameport->port_data; + trident_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return 0); return inb(TRID_REG(chip, GAMEPORT_LEGACY)); @@ -3120,7 +3120,7 @@ static void snd_trident_gameport_trigger(struct gameport *gameport) { - trident_t *chip = gameport->port_data; + trident_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return); outb(0xff, TRID_REG(chip, GAMEPORT_LEGACY)); @@ -3128,7 +3128,7 @@ static int snd_trident_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) { - trident_t *chip = gameport->port_data; + trident_t *chip = gameport_get_port_data(gameport); int i; snd_assert(chip, return 0); @@ -3145,7 +3145,7 @@ static int snd_trident_gameport_open(struct gameport *gameport, int mode) { - trident_t *chip = gameport->port_data; + trident_t *chip = gameport_get_port_data(gameport); snd_assert(chip, return 0); @@ -3175,9 +3175,9 @@ gameport_set_name(gp, "Trident 4DWave"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); - gp->port_data = chip; + gameport_set_port_data(gp, chip); gp->fuzz = 64; gp->read = snd_trident_gameport_read; gp->trigger = snd_trident_gameport_trigger; diff -Nru a/sound/pci/via82xx.c b/sound/pci/via82xx.c --- a/sound/pci/via82xx.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/via82xx.c 2005-03-30 16:58:50 -08:00 @@ -1660,9 +1660,9 @@ gameport_set_name(gp, "VIA686 Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); gp->io = JOYSTICK_ADDR; - gp->port_data = r; + gameport_set_port_data(gp, r); /* Enable legacy joystick port */ *legacy |= VIA_FUNC_ENABLE_GAME; @@ -1676,7 +1676,7 @@ static void snd_via686_free_gameport(via82xx_t *chip) { if (chip->gameport) { - struct resource *r = chip->gameport->port_data; + struct resource *r = gameport_get_port_data(chip->gameport); gameport_unregister_port(chip->gameport); chip->gameport = NULL; @@ -1838,14 +1838,10 @@ static int __devinit snd_via82xx_chip_init(via82xx_t *chip) { - ac97_t ac97; unsigned int val; int max_count; unsigned char pval; - memset(&ac97, 0, sizeof(ac97)); - ac97.private_data = chip; - #if 0 /* broken on K7M? */ if (chip->chip_type == TYPE_VIA686) /* disable all legacy ports */ @@ -1897,11 +1893,6 @@ if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY) snd_printk("AC'97 codec is not ready [0x%x]\n", val); - /* and then reset codec.. */ - snd_via82xx_codec_ready(chip, 0); - snd_via82xx_codec_write(&ac97, AC97_RESET, 0x0000); - snd_via82xx_codec_read(&ac97, 0); - #if 0 /* FIXME: we don't support the second codec yet so skip the detection now.. */ snd_via82xx_codec_xwrite(chip, VIA_REG_AC97_READ | VIA_REG_AC97_SECONDARY_VALID | @@ -2168,6 +2159,7 @@ { .vendor = 0x1458, .device = 0xa002, .action = VIA_DXS_ENABLE }, /* Gigabyte GA-7VAXP */ { .vendor = 0x1462, .device = 0x3800, .action = VIA_DXS_ENABLE }, /* MSI KT266 */ { .vendor = 0x1462, .device = 0x5901, .action = VIA_DXS_NO_VRA }, /* MSI KT6 Delta-SR */ + { .vendor = 0x1462, .device = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ { .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ { .vendor = 0x147b, .device = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */ { .vendor = 0x147b, .device = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */ diff -Nru a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c --- a/sound/pci/via82xx_modem.c 2005-03-30 16:58:50 -08:00 +++ b/sound/pci/via82xx_modem.c 2005-03-30 16:58:50 -08:00 @@ -940,14 +940,10 @@ static int __devinit snd_via82xx_chip_init(via82xx_t *chip) { - ac97_t ac97; unsigned int val; int max_count; unsigned char pval; - memset(&ac97, 0, sizeof(ac97)); - ac97.private_data = chip; - pci_read_config_byte(chip->pci, VIA_MC97_CTRL, &pval); if((pval & VIA_MC97_CTRL_INIT) != VIA_MC97_CTRL_INIT) { pci_write_config_byte(chip->pci, 0x44, pval|VIA_MC97_CTRL_INIT); @@ -995,13 +991,6 @@ if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY) snd_printk("AC'97 codec is not ready [0x%x]\n", val); - - /* and then reset codec.. */ -#if 0 /* do we need it? when? */ - snd_via82xx_codec_ready(chip, 0); - snd_via82xx_codec_write(&ac97, AC97_RESET, 0x0000); - snd_via82xx_codec_read(&ac97, 0); -#endif snd_via82xx_codec_xwrite(chip, VIA_REG_AC97_READ | VIA_REG_AC97_SECONDARY_VALID | diff -Nru a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c --- a/sound/pci/ymfpci/ymfpci.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pci/ymfpci/ymfpci.c 2005-03-30 16:58:48 -08:00 @@ -138,8 +138,9 @@ gameport_set_name(gp, "Yamaha YMF Gameport"); gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); - gp->dev.parent = &chip->pci->dev; + gameport_set_dev_parent(gp, &chip->pci->dev); gp->io = io_port; + gameport_set_port_data(gp, r); if (chip->pci->device >= 0x0010) /* YMF 744/754 */ pci_write_config_word(chip->pci, PCIR_DSXG_JOYBASE, io_port); @@ -155,7 +156,7 @@ void snd_ymfpci_free_gameport(ymfpci_t *chip) { if (chip->gameport) { - struct resource *r = chip->gameport->port_data; + struct resource *r = gameport_get_port_data(chip->gameport); gameport_unregister_port(chip->gameport); chip->gameport = NULL; diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c 2005-03-30 16:58:48 -08:00 +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c 2005-03-30 16:58:48 -08:00 @@ -272,12 +272,17 @@ client_handle_t handle = link->handle; pdacf_t *pdacf = link->priv; tuple_t tuple; - cisparse_t parse; + cisparse_t *parse = NULL; config_info_t conf; u_short buf[32]; int last_fn, last_ret; snd_printdd(KERN_DEBUG "pdacf_config called\n"); + parse = kmalloc(sizeof(*parse), GFP_KERNEL); + if (! parse) { + snd_printk(KERN_ERR "pdacf_config: cannot allocate\n"); + return; + } tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; tuple.Attributes = 0; tuple.TupleData = (cisdata_t *)buf; @@ -286,9 +291,10 @@ tuple.DesiredTuple = CISTPL_CONFIG; CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple)); CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple)); - CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse)); - link->conf.ConfigBase = parse.config.base; + CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, parse)); + link->conf.ConfigBase = parse->config.base; link->conf.ConfigIndex = 0x5; + kfree(parse); CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(handle, &conf)); link->conf.Vcc = conf.Vcc; diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c 2005-03-30 16:58:49 -08:00 +++ b/sound/usb/usbaudio.c 2005-03-30 16:58:49 -08:00 @@ -1141,7 +1141,7 @@ data[0] = 1; if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, - PITCH_CONTROL << 8, ep, data, 1, HZ)) < 0) { + PITCH_CONTROL << 8, ep, data, 1, 1000)) < 0) { snd_printk(KERN_ERR "%d:%d:%d: cannot set enable PITCH\n", dev->devnum, iface, ep); return err; @@ -1167,14 +1167,14 @@ data[2] = rate >> 16; if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, - SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) { + SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) { snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d to ep 0x%x\n", dev->devnum, iface, fmt->altsetting, rate, ep); return err; } if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN, - SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) { + SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) { snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq at ep 0x%x\n", dev->devnum, iface, fmt->altsetting, ep); return 0; /* some devices don't support reading */ @@ -1606,62 +1606,65 @@ return changed; } +#define MAX_MASK 64 + /* * check whether the registered audio formats need special hw-constraints */ static int check_hw_params_convention(snd_usb_substream_t *subs) { int i; - u32 channels[64]; - u32 rates[64]; + u32 *channels; + u32 *rates; u32 cmaster, rmaster; u32 rate_min = 0, rate_max = 0; struct list_head *p; + int err = 1; - memset(channels, 0, sizeof(channels)); - memset(rates, 0, sizeof(rates)); + channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); + rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); list_for_each(p, &subs->fmt_list) { struct audioformat *f; f = list_entry(p, struct audioformat, list); /* unconventional channels? */ if (f->channels > 32) - return 1; + goto __out; /* continuous rate min/max matches? */ if (f->rates & SNDRV_PCM_RATE_CONTINUOUS) { if (rate_min && f->rate_min != rate_min) - return 1; + goto __out; if (rate_max && f->rate_max != rate_max) - return 1; + goto __out; rate_min = f->rate_min; rate_max = f->rate_max; } /* combination of continuous rates and fixed rates? */ if (rates[f->format] & SNDRV_PCM_RATE_CONTINUOUS) { if (f->rates != rates[f->format]) - return 1; + goto __out; } if (f->rates & SNDRV_PCM_RATE_CONTINUOUS) { if (rates[f->format] && rates[f->format] != f->rates) - return 1; + goto __out; } channels[f->format] |= (1 << f->channels); rates[f->format] |= f->rates; } /* check whether channels and rates match for all formats */ cmaster = rmaster = 0; - for (i = 0; i < 64; i++) { + for (i = 0; i < MAX_MASK; i++) { if (cmaster != channels[i] && cmaster && channels[i]) - return 1; + goto __out; if (rmaster != rates[i] && rmaster && rates[i]) - return 1; + goto __out; if (channels[i]) cmaster = channels[i]; if (rates[i]) rmaster = rates[i]; } /* check whether channels match for all distinct rates */ - memset(channels, 0, sizeof(channels)); + memset(channels, 0, MAX_MASK * sizeof(u32)); list_for_each(p, &subs->fmt_list) { struct audioformat *f; f = list_entry(p, struct audioformat, list); @@ -1675,11 +1678,16 @@ cmaster = 0; for (i = 0; i < 32; i++) { if (cmaster != channels[i] && cmaster && channels[i]) - return 1; + goto __out; if (channels[i]) cmaster = channels[i]; } - return 0; + err = 0; + + __out: + kfree(channels); + kfree(rates); + return err; } @@ -2936,7 +2944,7 @@ snd_printdd("sending Extigy boot sequence...\n"); /* Send message to force it to reconnect with full interface. */ err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev,0), - 0x10, 0x43, 0x0001, 0x000a, NULL, 0, HZ); + 0x10, 0x43, 0x0001, 0x000a, NULL, 0, 1000); if (err < 0) snd_printdd("error sending boot message: %d\n", err); err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, sizeof(dev->descriptor)); diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c --- a/sound/usb/usbmidi.c 2005-03-30 16:58:50 -08:00 +++ b/sound/usb/usbmidi.c 2005-03-30 16:58:50 -08:00 @@ -287,7 +287,7 @@ memcpy(buf, data, len); dump_urb("sending", buf, len); err = usb_bulk_msg(ep->umidi->chip->dev, ep->urb->pipe, buf, len, - NULL, HZ / 4); + NULL, 250); kfree(buf); return err; }