Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ebec8ca6
Commit
ebec8ca6
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.25
parent
5bdbe23a
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
647 additions
and
478 deletions
+647
-478
CREDITS
CREDITS
+4
-0
Documentation/kernel-parameters.txt
Documentation/kernel-parameters.txt
+4
-0
arch/i386/kernel/apm.c
arch/i386/kernel/apm.c
+11
-0
arch/i386/kernel/i386_ksyms.c
arch/i386/kernel/i386_ksyms.c
+1
-0
arch/i386/kernel/process.c
arch/i386/kernel/process.c
+7
-6
arch/sparc/config.in
arch/sparc/config.in
+102
-101
arch/sparc64/config.in
arch/sparc64/config.in
+124
-122
drivers/block/loop.c
drivers/block/loop.c
+16
-6
drivers/misc/acpi.c
drivers/misc/acpi.c
+67
-7
drivers/sbus/audio/Config.in
drivers/sbus/audio/Config.in
+6
-6
drivers/sbus/char/Config.in
drivers/sbus/char/Config.in
+13
-13
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+1
-0
drivers/sound/cmpci.c
drivers/sound/cmpci.c
+1
-1
drivers/sound/maestro.c
drivers/sound/maestro.c
+1
-1
drivers/usb/audio.c
drivers/usb/audio.c
+169
-98
drivers/usb/cpia.c
drivers/usb/cpia.c
+56
-85
drivers/usb/cpia.h
drivers/usb/cpia.h
+15
-6
drivers/video/clgenfb.c
drivers/video/clgenfb.c
+1
-1
drivers/video/fbcon-mac.c
drivers/video/fbcon-mac.c
+1
-1
fs/buffer.c
fs/buffer.c
+4
-2
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+10
-12
fs/ncpfs/ncplib_kernel.c
fs/ncpfs/ncplib_kernel.c
+1
-1
fs/open.c
fs/open.c
+1
-1
fs/proc/proc_misc.c
fs/proc/proc_misc.c
+6
-6
include/linux/acpi.h
include/linux/acpi.h
+20
-0
include/linux/fb.h
include/linux/fb.h
+1
-0
kernel/exit.c
kernel/exit.c
+2
-1
mm/swapfile.c
mm/swapfile.c
+1
-1
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+1
-0
No files found.
CREDITS
View file @
ebec8ca6
...
...
@@ -286,6 +286,10 @@ W: http://math-www.uni-paderborn.de/~axel/
D: Configuration help text support
D: Linux CD and Support Giveaway List
N: Erik Inge Bols
E: knan@mo.himolde.no
D: Misc kernel hacks
N: Zoltan Boszormenyi
E: zboszor@mol.hu
D: MTRR emulation with Cyrix style ARR registers
...
...
Documentation/kernel-parameters.txt
View file @
ebec8ca6
...
...
@@ -20,6 +20,7 @@ restrictions referred to are that the relevant option is valid if:
ISDN Appropriate ISDN support is enabled.
JOY Appropriate joystick support is enabled.
LP Printer support is enabled.
LOOP Loopback device support is enabled.
MCA MCA bus support is enabled.
MDA The MDA console is enabled.
MOUSE Appropriate mouse support is enabled.
...
...
@@ -208,6 +209,9 @@ or lp=auto driver. 'lp=reset' (which can be specified in
mac5380= [HW,SCSI]
max_loop=[0-255] [LOOP] States the maximum number of loopback devices
that can be mounted.
maxcpus= [SMP] States the maximum number of processors that
an SMP kernel should make use of.
...
...
arch/i386/kernel/apm.c
View file @
ebec8ca6
...
...
@@ -133,6 +133,12 @@
#include <asm/uaccess.h>
#include <asm/desc.h>
/*
* Make APM look as much as just another ACPI module as possible..
*/
#include <linux/acpi.h>
EXPORT_SYMBOL
(
apm_register_callback
);
EXPORT_SYMBOL
(
apm_unregister_callback
);
...
...
@@ -1400,6 +1406,11 @@ static int apm(void *unused)
apm_bios_info
.
flags
&=
~
APM_BIOS_DISENGAGED
;
}
/* Install our power off handler.. */
#ifdef CONFIG_APM_POWER_OFF
acpi_power_off
=
apm_power_off
;
#endif
apm_mainloop
();
return
0
;
}
...
...
arch/i386/kernel/i386_ksyms.c
View file @
ebec8ca6
...
...
@@ -45,6 +45,7 @@ EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL
(
disable_irq_nosync
);
EXPORT_SYMBOL
(
kernel_thread
);
EXPORT_SYMBOL
(
acpi_idle
);
EXPORT_SYMBOL
(
acpi_power_off
);
EXPORT_SYMBOL_NOVERS
(
__down_failed
);
EXPORT_SYMBOL_NOVERS
(
__down_failed_interruptible
);
...
...
arch/i386/kernel/process.c
View file @
ebec8ca6
...
...
@@ -29,9 +29,6 @@
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/init.h>
#if defined(CONFIG_APM) && defined(CONFIG_APM_POWER_OFF)
#include <linux/apm_bios.h>
#endif
#include <asm/uaccess.h>
#include <asm/pgtable.h>
...
...
@@ -66,6 +63,11 @@ void enable_hlt(void)
*/
void
(
*
acpi_idle
)(
void
)
=
NULL
;
/*
* Power off function, if any
*/
void
(
*
acpi_power_off
)(
void
)
=
NULL
;
/*
* The idle thread. There's no useful work to be
* done, so just try to conserve power and have a
...
...
@@ -310,9 +312,8 @@ void machine_halt(void)
void
machine_power_off
(
void
)
{
#if defined(CONFIG_APM) && defined(CONFIG_APM_POWER_OFF)
apm_power_off
();
#endif
if
(
acpi_power_off
)
acpi_power_off
();
}
...
...
arch/sparc/config.in
View file @
ebec8ca6
...
...
@@ -9,63 +9,56 @@ comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
endmenu
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
bool 'Kernel module loader' CONFIG_KMOD
fi
endmenu
mainmenu_option next_comment
comment 'General setup'
define_bool CONFIG_VT y
define_bool CONFIG_VT_CONSOLE y
bool 'Support for AP1000 multicomputer' CONFIG_AP1000
bool 'Symmetric multi-processing support (does not work on sun4/sun4c)' CONFIG_SMP
bool 'Support for AP1000 multicomputer' CONFIG_AP1000
if [ "$CONFIG_AP1000" = "y" ]; then
define_bool CONFIG_NO_KEYBOARD y
define_bool CONFIG_FDDI y
define_bool CONFIG_APFDDI y
define_bool CONFIG_APBLOCK y
define_bool CONFIG_APBIF y
tristate '
OPIU DDV Driver' CONFIG_DDV
define_bool CONFIG_NO_KEYBOARD y
define_bool CONFIG_FDDI y
define_bool CONFIG_APFDDI y
define_bool CONFIG_APBLOCK y
define_bool CONFIG_APBIF y
tristate '
OPIU DDV Driver' CONFIG_DDV
else
bool 'Support for SUN4 machines (disables SUN4[CDM] support)' CONFIG_SUN4
if [ "$CONFIG_SUN4" != "y" ]; then
bool '
Support for PCI and PS/2 keyboard/mouse' CONFIG_PCI
fi
mainmenu_option next_comment
comment 'Console drivers'
bool 'PROM console' CONFIG_PROM_CONSOLE
bool 'Support Frame buffer devices' CONFIG_FB
source drivers/video/Config.in
endmenu
# Global things across all Sun machines.
define_bool CONFIG_SBUS y
define_bool CONFIG_SBUSCHAR y
define_bool CONFIG_BUSMOUSE y
define_bool CONFIG_SUN_MOUSE y
define_bool CONFIG_SERIAL y
define_bool CONFIG_SUN_SERIAL y
define_bool CONFIG_SERIAL_CONSOLE y
define_bool CONFIG_SUN_KEYBOARD y
define_bool CONFIG_SUN_CONSOLE y
define_bool CONFIG_SUN_AUXIO y
define_bool CONFIG_SUN_IO y
if [ "$CONFIG_SUN4" != "y" ]; then
source drivers/sbus/char/Config.in
source drivers/sbus/audio/Config.in
fi
bool 'Support for SUN4 machines (disables SUN4[CDM] support)' CONFIG_SUN4
if [ "$CONFIG_SUN4" != "y" ]; then
bool '
Support for PCI and PS/2 keyboard/mouse' CONFIG_PCI
fi
mainmenu_option next_comment
comment 'Console drivers'
bool 'PROM console' CONFIG_PROM_CONSOLE
bool 'Support Frame buffer devices' CONFIG_FB
source drivers/video/Config.in
endmenu
# Global things across all Sun machines.
define_bool CONFIG_SBUS y
define_bool CONFIG_SBUSCHAR y
define_bool CONFIG_BUSMOUSE y
define_bool CONFIG_SUN_MOUSE y
define_bool CONFIG_SERIAL y
define_bool CONFIG_SUN_SERIAL y
define_bool CONFIG_SERIAL_CONSOLE y
define_bool CONFIG_SUN_KEYBOARD y
define_bool CONFIG_SUN_CONSOLE y
define_bool CONFIG_SUN_AUXIO y
define_bool CONFIG_SUN_IO y
if [ "$CONFIG_SUN4" != "y" ]; then
source drivers/sbus/char/Config.in
source drivers/sbus/audio/Config.in
fi
fi
tristate 'Openprom tree appears in /proc/openprom (EXPERIMENTAL)' CONFIG_SUN_OPENPROMFS
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Openprom tree appears in /proc/openprom (EXPERIMENTAL)' CONFIG_SUN_OPENPROMFS
fi
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
...
...
@@ -77,6 +70,15 @@ source drivers/parport/Config.in
dep_tristate ' Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
endmenu
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
bool ' Set version information on all symbols for modules' CONFIG_MODVERSIONS
bool ' Kernel module loader' CONFIG_KMOD
fi
endmenu
mainmenu_option next_comment
comment 'Floppy, IDE, and other block devices'
...
...
@@ -84,15 +86,15 @@ bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD
bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then
tristate '
Linear (append) mode' CONFIG_MD_LINEAR
tristate '
RAID-0 (striping) mode' CONFIG_MD_STRIPED
tristate '
RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate '
RAID-4/RAID-5 mode' CONFIG_MD_RAID5
tristate '
Linear (append) mode' CONFIG_MD_LINEAR
tristate '
RAID-0 (striping) mode' CONFIG_MD_STRIPED
tristate '
RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate '
RAID-4/RAID-5 mode' CONFIG_MD_RAID5
fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" ]; then
bool '
Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD
bool '
Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD
fi
tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
...
...
@@ -101,7 +103,7 @@ tristate 'Network block device support' CONFIG_BLK_DEV_NBD
endmenu
if [ "$CONFIG_NET" = "y" ]; then
source net/Config.in
source net/Config.in
fi
mainmenu_option next_comment
...
...
@@ -109,7 +111,7 @@ comment 'ISDN subsystem'
tristate 'ISDN support' CONFIG_ISDN
if [ "$CONFIG_ISDN" != "n" ]; then
source drivers/isdn/Config.in
source drivers/isdn/Config.in
fi
endmenu
...
...
@@ -119,65 +121,65 @@ comment 'SCSI support'
tristate 'SCSI support' CONFIG_SCSI
if [ "$CONFIG_SCSI" != "n" ]; then
comment 'SCSI support type (disk, tape, CDrom)'
comment 'SCSI support type (disk, tape, CDrom)'
dep_tristate '
SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
dep_tristate '
SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
dep_tristate '
SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
bool '
Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
fi
dep_tristate '
SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
dep_tristate '
SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
dep_tristate '
SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
dep_tristate '
SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
bool '
Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
fi
dep_tristate '
SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
bool '
Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
bool '
Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
bool '
Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
bool '
Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
mainmenu_option next_comment
comment 'SCSI low-level drivers'
mainmenu_option next_comment
comment 'SCSI low-level drivers'
bool 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
tristate 'PTI Qlogic,ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
endmenu
bool 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
tristate 'PTI Qlogic,ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
endmenu
fi
endmenu
source drivers/fc4/Config.in
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
tristate '
Dummy net driver support' CONFIG_DUMMY
tristate '
PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
comment 'CCP compressors for PPP are only built as modules.'
fi
tristate '
SLIP (serial line) support' CONFIG_SLIP
if [ "$CONFIG_SLIP" != "n" ]; then
bool '
CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
bool '
Keepalive and linefill' CONFIG_SLIP_SMART
bool '
Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
fi
tristate '
Sun LANCE support' CONFIG_SUNLANCE
tristate '
Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Sun BigMAC 10/100baseT support
' CONFIG_SUNBMAC
fi
tristate '
Sun QuadEthernet support' CONFIG_SUNQE
tristate '
MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS
#
bool '
FDDI driver support' CONFIG_FDDI
#
if [ "$CONFIG_FDDI" = "y" ]; then
#
fi
if [ "$CONFIG_ATM" = "y" ]; then
source drivers/atm/Config.in
fi
fi
endmenu
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
tristate '
Dummy net driver support' CONFIG_DUMMY
tristate '
PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
comment 'CCP compressors for PPP are only built as modules.'
fi
tristate '
SLIP (serial line) support' CONFIG_SLIP
if [ "$CONFIG_SLIP" != "n" ]; then
bool '
CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
bool '
Keepalive and linefill' CONFIG_SLIP_SMART
bool '
Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
fi
tristate '
Sun LANCE support' CONFIG_SUNLANCE
tristate '
Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' Sun BigMAC 10/100baseT support (EXPERIMENTAL)
' CONFIG_SUNBMAC
fi
tristate '
Sun QuadEthernet support' CONFIG_SUNQE
tristate '
MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS
#
bool '
FDDI driver support' CONFIG_FDDI
#
if [ "$CONFIG_FDDI" = "y" ]; then
#
fi
if [ "$CONFIG_ATM" = "y" ]; then
source drivers/atm/Config.in
fi
fi
endmenu
fi
# This one must be before the filesystem configs. -DaveM
...
...
@@ -185,7 +187,7 @@ mainmenu_option next_comment
comment 'Unix98 PTY support'
bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
fi
endmenu
...
...
@@ -202,4 +204,3 @@ comment 'Kernel hacking'
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
endmenu
arch/sparc64/config.in
View file @
ebec8ca6
...
...
@@ -9,15 +9,6 @@ comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
endmenu
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
bool 'Kernel module loader' CONFIG_KMOD
fi
endmenu
mainmenu_option next_comment
comment 'General setup'
...
...
@@ -49,25 +40,36 @@ bool 'PCI support' CONFIG_PCI
source drivers/sbus/char/Config.in
source drivers/sbus/audio/Config.in
tristate 'Openprom tree appears in /proc/openprom (EXPERIMENTAL)' CONFIG_SUN_OPENPROMFS
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Openprom tree appears in /proc/openprom (EXPERIMENTAL)' CONFIG_SUN_OPENPROMFS
fi
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
bool 'Kernel support for Linux/Sparc 32bit binary compatibility' CONFIG_SPARC32_COMPAT
tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
if [ "$CONFIG_SPARC32_COMPAT" != "n" ]; then
tristate '
Kernel support for 32-bit ELF binaries' CONFIG_BINFMT_ELF32
bool '
Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32
tristate '
Kernel support for 32-bit ELF binaries' CONFIG_BINFMT_ELF32
bool '
Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32
fi
tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Solaris binary emulation
' CONFIG_SOLARIS_EMUL
tristate 'Solaris binary emulation (EXPERIMENTAL)
' CONFIG_SOLARIS_EMUL
fi
source drivers/parport/Config.in
dep_tristate ' Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
if [ "$CONFIG_PCI" = "y" ]; then
tristate 'SUNW,envctrl support' CONFIG_ENVCTRL
tristate 'SUNW, envctrl support' CONFIG_ENVCTRL
fi
endmenu
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
bool ' Set version information on all symbols for modules' CONFIG_MODVERSIONS
bool ' Kernel module loader' CONFIG_KMOD
fi
endmenu
...
...
@@ -78,41 +80,41 @@ bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD
bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then
tristate '
Linear (append) mode' CONFIG_MD_LINEAR
tristate '
RAID-0 (striping) mode' CONFIG_MD_STRIPED
tristate '
RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate '
RAID-4/RAID-5 mode' CONFIG_MD_RAID5
tristate '
Linear (append) mode' CONFIG_MD_LINEAR
tristate '
RAID-0 (striping) mode' CONFIG_MD_STRIPED
tristate '
RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING
tristate '
RAID-4/RAID-5 mode' CONFIG_MD_RAID5
fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" ]; then
bool '
Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD
bool '
Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD
fi
tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
tristate 'Network block device support' CONFIG_BLK_DEV_NBD
if [ "$CONFIG_PCI" = "y" ]; then
tristate 'Ultra/PCI IDE disk/cdrom/tape/floppy support' CONFIG_BLK_DEV_IDE
if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
dep_tristate '
Include IDE/ATA-2 DISK support' CONFIG_BLK_DEV_IDEDISK $CONFIG_BLK_DEV_IDE
dep_tristate '
Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD $CONFIG_BLK_DEV_IDE
dep_tristate '
Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE
dep_tristate '
Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
dep_tristate '
SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE
define_bool CONFIG_BLK_DEV_IDEPCI y
define_bool CONFIG_BLK_DEV_IDEDMA y
define_bool CONFIG_IDEDMA_AUTO y
define_bool
IDEDMA_NEW_DRIVE_LISTINGS y
define_bool CONFIG_BLK_DEV_NS87415 y
define_bool CONFIG_BLK_DEV_CMD646 y
fi
tristate 'Ultra/PCI IDE disk/cdrom/tape/floppy support' CONFIG_BLK_DEV_IDE
if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
dep_tristate '
Include IDE/ATA-2 DISK support' CONFIG_BLK_DEV_IDEDISK $CONFIG_BLK_DEV_IDE
dep_tristate '
Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD $CONFIG_BLK_DEV_IDE
dep_tristate '
Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE
dep_tristate '
Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
dep_tristate '
SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE
define_bool CONFIG_BLK_DEV_IDEPCI y
define_bool CONFIG_BLK_DEV_IDEDMA y
define_bool CONFIG_IDEDMA_AUTO y
define_bool CONFIG_
IDEDMA_NEW_DRIVE_LISTINGS y
define_bool CONFIG_BLK_DEV_NS87415 y
define_bool CONFIG_BLK_DEV_CMD646 y
fi
fi
endmenu
if [ "$CONFIG_NET" = "y" ]; then
source net/Config.in
source net/Config.in
fi
mainmenu_option next_comment
...
...
@@ -121,95 +123,95 @@ comment 'SCSI support'
tristate 'SCSI support' CONFIG_SCSI
if [ "$CONFIG_SCSI" != "n" ]; then
comment 'SCSI support type (disk, tape, CDrom)'
dep_tristate '
SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
dep_tristate '
SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
dep_tristate '
SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
bool '
Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
fi
dep_tristate '
SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
bool '
Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
bool '
Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
mainmenu_option next_comment
comment 'SCSI low-level drivers'
bool 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
tristate 'PTI Qlogic,
ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
bool ' Enable Tagged Command Queueing (TCQ) by default' CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT
int '
Maximum number of TCQ commands per device' CONFIG_AIC7XXX_CMDS_PER_DEVICE 8
bool '
Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS N
int '
Delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 5
fi
dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
if [ "$CONFIG_SCSI_NCR53C8XX" != "n" ]; then
int '
default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
int '
maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
int '
synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 10
bool ' enable profiling' CONFIG_SCSI_NCR53C8XX_PROFILE
if [ "$CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS" = "0" ]; then
bool ' not allow targets to disconnect' CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' assume boards are SYMBIOS compatible
' CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
fi
fi
dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI
fi
endmenu
comment 'SCSI support type (disk, tape, CDrom)'
dep_tristate '
SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
dep_tristate '
SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
dep_tristate '
SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
bool '
Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
fi
dep_tristate '
SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
bool '
Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
bool '
Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
mainmenu_option next_comment
comment 'SCSI low-level drivers'
bool 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
tristate 'PTI Qlogic,
ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
bool ' Enable tagged command queueing (TCQ) by default' CONFIG_AIC7XXX_TAGGED_QUEUEING Y
int '
Maximum number of TCQ commands per device' CONFIG_AIC7XXX_CMDS_PER_DEVICE 8
bool '
Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS N
int '
Delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 5
fi
dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
if [ "$CONFIG_SCSI_NCR53C8XX" != "n" ]; then
int '
default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
int '
maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
int '
synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 10
bool ' enable profiling' CONFIG_SCSI_NCR53C8XX_PROFILE
if [ "$CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS" = "0" ]; then
bool ' not allow targets to disconnect' CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' assume boards are SYMBIOS compatible (EXPERIMENTAL)
' CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
fi
fi
dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI
fi
endmenu
fi
endmenu
source drivers/fc4/Config.in
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
tristate '
Dummy net driver support' CONFIG_DUMMY
tristate '
PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
comment '
CCP compressors for PPP are only built as modules.'
fi
tristate '
SLIP (serial line) support' CONFIG_SLIP
if [ "$CONFIG_SLIP" != "n" ]; then
bool '
CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
bool '
Keepalive and linefill' CONFIG_SLIP_SMART
bool '
Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
fi
bool '
Sun LANCE support' CONFIG_SUNLANCE
tristate '
Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Sun BigMAC 10/100baseT support
' CONFIG_SUNBMAC
fi
tristate '
Sun QuadEthernet support' CONFIG_SUNQE
tristate '
MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS
if [ "$CONFIG_PCI" = "y" ]; then
tristate '
Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5
tristate '
3c590/3c900 series (592/595/597) "Vortex/Boomerang" support' CONFIG_VORTEX
tristate '
RealTek 8129/8139 (not 8019/8029!) support' CONFIG_RTL8139
tristate '
PCI NE2000 support' CONFIG_NE2K_PCI
tristate '
EtherExpressPro/100 support' CONFIG_EEXPRESS_PRO100
tristate '
Adaptec Starfire support' CONFIG_ADAPTEC_STARFIRE
fi
#
bool '
FDDI driver support' CONFIG_FDDI
#
if [ "$CONFIG_FDDI" = "y" ]; then
#
fi
fi
endmenu
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
tristate '
Dummy net driver support' CONFIG_DUMMY
tristate '
PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
comment '
CCP compressors for PPP are only built as modules.'
fi
tristate '
SLIP (serial line) support' CONFIG_SLIP
if [ "$CONFIG_SLIP" != "n" ]; then
bool '
CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
bool '
Keepalive and linefill' CONFIG_SLIP_SMART
bool '
Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
fi
bool '
Sun LANCE support' CONFIG_SUNLANCE
tristate '
Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' Sun BigMAC 10/100baseT support (EXPERIMENTAL)
' CONFIG_SUNBMAC
fi
tristate '
Sun QuadEthernet support' CONFIG_SUNQE
tristate '
MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS
if [ "$CONFIG_PCI" = "y" ]; then
tristate '
Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5
tristate '
3c590/3c900 series (592/595/597) "Vortex/Boomerang" support' CONFIG_VORTEX
tristate '
RealTek 8129/8139 (not 8019/8029!) support' CONFIG_RTL8139
tristate '
PCI NE2000 support' CONFIG_NE2K_PCI
tristate '
EtherExpressPro/100 support' CONFIG_EEXPRESS_PRO100
tristate '
Adaptec Starfire support' CONFIG_ADAPTEC_STARFIRE
fi
#
bool '
FDDI driver support' CONFIG_FDDI
#
if [ "$CONFIG_FDDI" = "y" ]; then
#
fi
fi
endmenu
fi
# This one must be before the filesystem configs. -DaveM
...
...
@@ -217,7 +219,7 @@ mainmenu_option next_comment
comment 'Unix 98 PTY support'
bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
fi
endmenu
...
...
@@ -225,9 +227,9 @@ mainmenu_option next_comment
comment 'Video For Linux'
tristate 'Video For Linux' CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate '
BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
fi
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate '
BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
fi
fi
endmenu
...
...
drivers/block/loop.c
View file @
ebec8ca6
...
...
@@ -23,9 +23,12 @@
* Reed H. Petty, rhp@draper.net
*
* Maximum number of loop devices now dynamic via max_loop module parameter.
* Still fixed at 8 devices when compiled into the kernel normally.
* Russell Kroll <rkroll@exploits.org> 19990701
*
* Maximum number of loop devices when compiled-in now selectable by passing
* max_loop=<1-255> to the kernel on boot.
* Erik I. Bols, <eriki@himolde.no>, Oct 31, 1999
*
* Still To Fix:
* - Advisory locking is ignored here.
* - Should use an own CAP_* category instead of CAP_SYS_ADMIN
...
...
@@ -723,15 +726,12 @@ int __init loop_init(void)
}
if
((
max_loop
<
1
)
||
(
max_loop
>
255
))
{
printk
(
KERN_WARNING
"loop:
max_loop must be between 1 and 255
\n
"
);
return
-
EINVAL
;
printk
(
KERN_WARNING
"loop:
invalid max_loop (must be between 1 and 255), using default (8)
\n
"
);
max_loop
=
8
;
}
#ifndef MODULE
printk
(
KERN_INFO
"loop: registered device at major %d
\n
"
,
MAJOR_NR
);
#else
printk
(
KERN_INFO
"loop: enabling %d loop devices
\n
"
,
max_loop
);
#endif
loop_dev
=
kmalloc
(
max_loop
*
sizeof
(
struct
loop_device
),
GFP_KERNEL
);
if
(
!
loop_dev
)
{
...
...
@@ -778,3 +778,13 @@ void cleanup_module(void)
kfree
(
loop_blksizes
);
}
#endif
#ifndef MODULE
static
int
__init
max_loop_setup
(
char
*
str
)
{
max_loop
=
simple_strtol
(
str
,
NULL
,
0
);
return
1
;
}
__setup
(
"max_loop="
,
max_loop_setup
);
#endif
drivers/misc/acpi.c
View file @
ebec8ca6
...
...
@@ -74,6 +74,7 @@ static struct ctl_table_header *acpi_sysctl = NULL;
static
struct
acpi_facp
*
acpi_facp
=
NULL
;
static
int
acpi_fake_facp
=
0
;
static
struct
acpi_facs
*
acpi_facs
=
NULL
;
static
unsigned
long
acpi_facp_addr
=
0
;
static
unsigned
long
acpi_dsdt_addr
=
0
;
...
...
@@ -88,8 +89,19 @@ static unsigned long acpi_p_lvl2_lat = ~0UL;
static
unsigned
long
acpi_p_lvl3_lat
=
~
0UL
;
/* Initialize to guaranteed harmless port read */
static
unsigned
long
acpi_p_lvl2
=
0x80
;
static
unsigned
long
acpi_p_lvl3
=
0x80
;
static
unsigned
long
acpi_p_lvl2
=
ACPI_P_LVL_DISABLED
;
static
unsigned
long
acpi_p_lvl3
=
ACPI_P_LVL_DISABLED
;
// bits 8-15 are SLP_TYPa, bits 0-7 are SLP_TYPb
static
unsigned
long
acpi_slp_typ
[]
=
{
ACPI_SLP_TYP_DISABLED
,
/* S0 */
ACPI_SLP_TYP_DISABLED
,
/* S1 */
ACPI_SLP_TYP_DISABLED
,
/* S2 */
ACPI_SLP_TYP_DISABLED
,
/* S3 */
ACPI_SLP_TYP_DISABLED
,
/* S4 */
ACPI_SLP_TYP_DISABLED
/* S5 */
};
static
struct
ctl_table
acpi_table
[]
=
{
...
...
@@ -125,10 +137,14 @@ static struct ctl_table acpi_table[] =
{
ACPI_P_LVL2_LAT
,
"p_lvl2_lat"
,
&
acpi_p_lvl2_lat
,
sizeof
(
acpi_p_lvl2_lat
),
06
00
,
NULL
,
&
acpi_do_ulong
},
06
44
,
NULL
,
&
acpi_do_ulong
},
{
ACPI_P_LVL3_LAT
,
"p_lvl3_lat"
,
&
acpi_p_lvl3_lat
,
sizeof
(
acpi_p_lvl3_lat
),
0644
,
NULL
,
&
acpi_do_ulong
},
{
ACPI_S5_SLP_TYP
,
"s5_slp_typ"
,
&
acpi_slp_typ
[
5
],
sizeof
(
acpi_slp_typ
[
5
]),
0600
,
NULL
,
&
acpi_do_ulong
},
{
0
}
...
...
@@ -136,7 +152,7 @@ static struct ctl_table acpi_table[] =
static
struct
ctl_table
acpi_dir_table
[]
=
{
{
CTL_ACPI
,
"acpi"
,
NULL
,
0
,
05
00
,
acpi_table
},
{
CTL_ACPI
,
"acpi"
,
NULL
,
0
,
05
55
,
acpi_table
},
{
0
}
};
...
...
@@ -379,6 +395,11 @@ static int __init acpi_find_tables(void)
acpi_facp
=
(
struct
acpi_facp
*
)
dt
;
acpi_facp_addr
=
*
rsdt_entry
;
acpi_dsdt_addr
=
acpi_facp
->
dsdt
;
if
(
acpi_facp
->
facs
)
{
acpi_facs
=
(
struct
acpi_facs
*
)
acpi_map_table
(
acpi_facp
->
facs
);
}
}
else
{
acpi_unmap_table
(
dt
);
...
...
@@ -405,6 +426,7 @@ static void acpi_destroy_tables(void)
acpi_unmap_table
((
struct
acpi_table
*
)
acpi_facp
);
else
kfree
(
acpi_facp
);
acpi_unmap_table
((
struct
acpi_table
*
)
acpi_facs
);
}
/*
...
...
@@ -575,8 +597,8 @@ static void acpi_idle_handler(void)
case
3
:
pm2_cnt
=
acpi_facp
->
pm2_cnt
;
if
(
pm2_cnt
)
{
/* Disable PCI arbitration while sleeping,
to avoid DMA corruption? */
/* Disable PCI arbitration while sleeping,
to avoid DMA corruption? */
outb
(
inb
(
pm2_cnt
)
|
ACPI_ARB_DIS
,
pm2_cnt
);
inb
(
acpi_p_lvl3
);
outb
(
inb
(
pm2_cnt
)
&
~
ACPI_ARB_DIS
,
pm2_cnt
);
...
...
@@ -601,6 +623,42 @@ static void acpi_idle_handler(void)
sleep_level
=
1
;
}
/*
* Enter system sleep state
*/
static
void
acpi_enter_sx
(
int
state
)
{
unsigned
long
slp_typ
=
acpi_slp_typ
[
state
];
if
(
slp_typ
!=
ACPI_SLP_TYP_DISABLED
)
{
u16
typa
,
typb
,
value
;
// bits 8-15 are SLP_TYPa, bits 0-7 are SLP_TYPb
typa
=
(
slp_typ
>>
8
)
&
0xff
;
typb
=
slp_typ
&
0xff
;
typa
=
((
typa
<<
ACPI_SLP_TYP_SHIFT
)
&
ACPI_SLP_TYP_MASK
);
typb
=
((
typb
<<
ACPI_SLP_TYP_SHIFT
)
&
ACPI_SLP_TYP_MASK
);
// set SLP_TYPa/b and SLP_EN
if
(
acpi_facp
->
pm1a_cnt
)
{
value
=
inw
(
acpi_facp
->
pm1a_cnt
)
&
~
ACPI_SLP_TYP_MASK
;
outw
(
value
|
typa
|
ACPI_SLP_EN
,
acpi_facp
->
pm1a_cnt
);
}
if
(
acpi_facp
->
pm1b_cnt
)
{
value
=
inw
(
acpi_facp
->
pm1b_cnt
)
&
~
ACPI_SLP_TYP_MASK
;
outw
(
value
|
typb
|
ACPI_SLP_EN
,
acpi_facp
->
pm1b_cnt
);
}
}
}
/*
* Enter soft-off (S5)
*/
static
void
acpi_power_off_handler
(
void
)
{
acpi_enter_sx
(
5
);
}
/*
* Claim ACPI I/O ports
*/
...
...
@@ -806,7 +864,7 @@ static int acpi_do_event(ctl_table *ctl,
size_t
*
len
)
{
u32
pm1_status
=
0
,
gpe_status
=
0
;
char
str
[
4
*
sizeof
(
u32
)
+
6
];
char
str
[
4
*
sizeof
(
u32
)
+
7
];
int
size
;
if
(
write
)
...
...
@@ -879,6 +937,7 @@ static int __init acpi_init(void)
return
0
;
#endif
acpi_power_off
=
acpi_power_off_handler
;
acpi_idle
=
acpi_idle_handler
;
return
0
;
...
...
@@ -890,6 +949,7 @@ static int __init acpi_init(void)
static
void
__exit
acpi_exit
(
void
)
{
acpi_idle
=
NULL
;
acpi_power_off
=
NULL
;
unregister_sysctl_table
(
acpi_sysctl
);
acpi_disable
(
acpi_facp
);
...
...
drivers/sbus/audio/Config.in
View file @
ebec8ca6
...
...
@@ -4,11 +4,11 @@
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
comment 'Linux/SPARC audio subsystem (EXPERIMENTAL)'
comment 'Linux/SPARC audio subsystem (EXPERIMENTAL)'
tristate 'Audio support (EXPERIMENTAL)' CONFIG_SPARCAUDIO
dep_tristate ' AMD7930 Lowlevel Driver' CONFIG_SPARCAUDIO_AMD7930 $CONFIG_SPARCAUDIO
dep_tristate ' CS4231 Lowlevel Driver' CONFIG_SPARCAUDIO_CS4231 $CONFIG_SPARCAUDIO
dep_tristate ' DBRI Lowlevel Driver' CONFIG_SPARCAUDIO_DBRI $CONFIG_SPARCAUDIO
dep_tristate ' Dummy Lowlevel Driver' CONFIG_SPARCAUDIO_DUMMY $CONFIG_SPARCAUDIO
tristate 'Audio support (EXPERIMENTAL)' CONFIG_SPARCAUDIO
dep_tristate ' AMD7930 Lowlevel Driver' CONFIG_SPARCAUDIO_AMD7930 $CONFIG_SPARCAUDIO
dep_tristate ' CS4231 Lowlevel Driver' CONFIG_SPARCAUDIO_CS4231 $CONFIG_SPARCAUDIO
dep_tristate ' DBRI Lowlevel Driver' CONFIG_SPARCAUDIO_DBRI $CONFIG_SPARCAUDIO
dep_tristate ' Dummy Lowlevel Driver' CONFIG_SPARCAUDIO_DUMMY $CONFIG_SPARCAUDIO
fi
drivers/sbus/char/Config.in
View file @
ebec8ca6
...
...
@@ -2,21 +2,21 @@ comment 'Misc Linux/SPARC drivers'
tristate '/dev/openprom device support' CONFIG_SUN_OPENPROMIO
tristate 'Mostek real time clock support' CONFIG_SUN_MOSTEK_RTC
if [ "$ARCH" = "sparc64" ]; then
if [ "$CONFIG_PCI" = "y" ]; then
tristate 'Siemens SAB82532 serial support' CONFIG_SAB82532
fi
tristate 'OBP Flash Device support' CONFIG_OBP_FLASH
if [ "$CONFIG_PCI" = "y" ]; then
tristate 'Siemens SAB82532 serial support' CONFIG_SAB82532
fi
tristate 'OBP Flash Device support' CONFIG_OBP_FLASH
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Bidirectional parallel port support (obsolete
)' CONFIG_SUN_BPP
tristate 'Videopix Frame Grabber (EXPERIMENTAL)' CONFIG_SUN_VIDEOPIX
tristate 'Aurora Multiboard 1600se (EXPERIMENTAL)' CONFIG_SUN_AURORA
tristate 'Tadpole TS102 Microcontroller support
' CONFIG_TADPOLE_TS102_UCTRL
tristate 'Bidirectional parallel port support (OBSOLETE
)' CONFIG_SUN_BPP
tristate 'Videopix Frame Grabber (EXPERIMENTAL)' CONFIG_SUN_VIDEOPIX
tristate 'Aurora Multiboard 1600se (EXPERIMENTAL)' CONFIG_SUN_AURORA
tristate 'Tadpole TS102 Microcontroller support (EXPERIMENTAL)
' CONFIG_TADPOLE_TS102_UCTRL
# XXX Why don't we do "source drivers/char/Config.in" somewhere?
if [ "$CONFIG_PCI" = "y" ]; then
define_bool CONFIG_APM_RTC_IS_GMT y # no shit
bool 'PC-style RTC' CONFIG_RTC
fi
# XXX Why don't we do "source drivers/char/Config.in" somewhere?
if [ "$CONFIG_PCI" = "y" ]; then
define_bool CONFIG_APM_RTC_IS_GMT y # no shit
bool 'PC-style RTC' CONFIG_RTC
fi
fi
drivers/scsi/scsi.c
View file @
ebec8ca6
...
...
@@ -263,6 +263,7 @@ static struct dev_info device_list[] =
* SCSI code to reset bus.*/
{
"QUANTUM"
,
"LPS525S"
,
"3110"
,
BLIST_NOLUN
},
/* Locks sometimes if polled for lun != 0 */
{
"QUANTUM"
,
"PD1225S"
,
"3110"
,
BLIST_NOLUN
},
/* Locks sometimes if polled for lun != 0 */
{
"QUANTUM"
,
"FIREBALL ST4.3S"
,
"0F0C"
,
BLIST_NOLUN
},
/* Locks up when polled for lun != 0 */
{
"MEDIAVIS"
,
"CDR-H93MV"
,
"1.31"
,
BLIST_NOLUN
},
/* Locks up if polled for lun != 0 */
{
"SANKYO"
,
"CP525"
,
"6.64"
,
BLIST_NOLUN
},
/* causes failed REQ SENSE, extra reset */
{
"HP"
,
"C1750A"
,
"3226"
,
BLIST_NOLUN
},
/* scanjet iic */
...
...
drivers/sound/cmpci.c
View file @
ebec8ca6
...
...
@@ -1333,7 +1333,7 @@ static int cm_mmap(struct file *file, struct vm_area_struct *vma)
db
=
&
s
->
dma_adc
;
}
else
return
-
EINVAL
;
if
(
vma
->
vm_
offset
!=
0
)
if
(
vma
->
vm_
pgoff
!=
0
)
return
-
EINVAL
;
size
=
vma
->
vm_end
-
vma
->
vm_start
;
if
(
size
>
(
PAGE_SIZE
<<
db
->
buforder
))
...
...
drivers/sound/maestro.c
View file @
ebec8ca6
...
...
@@ -2339,7 +2339,7 @@ static int ess_mmap(struct file *file, struct vm_area_struct *vma)
db = &s->dma_adc;
} else
return -EINVAL;
if (vma->vm_
offset
!= 0)
if (vma->vm_
pgoff
!= 0)
return -EINVAL;
size = vma->vm_end - vma->vm_start;
if (size > (PAGE_SIZE << db->buforder))
...
...
drivers/usb/audio.c
View file @
ebec8ca6
...
...
@@ -33,6 +33,22 @@
* wants to use an Asynch out pipe. usb_audio_state now basically
* only contains lists of mixer and wave devices. We can therefore
* now have multiple mixer/wave devices per USB device.
* 1999-10-31: Thomas Sailer
* Audio can now be unloaded if it is not in use by any mixer
* or dsp client (formerly you had to disconnect the audio devices
* from the USB port)
* Finally, about three months after ordering, my "Maxxtro SPK222"
* speakers arrived, isn't disdata a great mail order company 8-)
* Parse class specific endpoint descriptor of the audiostreaming
* interfaces and take the endpoint attributes from there.
* Unbelievably, the Philips USB DAC has a sampling rate range
* of over a decade, yet does not support the sampling rate control!
* No wonder it sounds so bad, has very audible sampling rate
* conversion distortion. Don't try to listen to it using
* decent headphones!
* "Let's make things better" -> but please Philips start with your
* own stuff!!!!
*
*
*/
...
...
@@ -182,6 +198,7 @@ struct audioformat {
unsigned
int
sratelo
;
unsigned
int
sratehi
;
unsigned
char
altsetting
;
unsigned
char
attributes
;
};
struct
dmabuf
{
...
...
@@ -1530,6 +1547,7 @@ static int set_format_in(struct usb_audiodev *as)
struct
audioformat
*
fmt
;
unsigned
int
fmtnr
,
ep
;
unsigned
char
data
[
3
];
int
ret
;
if
(
u
->
interface
<
0
||
u
->
interface
>=
config
->
bNumInterfaces
)
return
0
;
...
...
@@ -1545,7 +1563,7 @@ static int set_format_in(struct usb_audiodev *as)
alts
->
endpoint
[
1
].
bmAttributes
!=
0x01
||
alts
->
endpoint
[
1
].
bSynchAddress
!=
0
||
alts
->
endpoint
[
1
].
bEndpointAddress
!=
(
alts
->
endpoint
[
0
].
bSynchAddress
&
0x7f
))
{
printk
(
KERN_ERR
"usb
_
audio: device %d interface %d altsetting %d invalid synch pipe
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d interface %d altsetting %d invalid synch pipe
\n
"
,
dev
->
devnum
,
u
->
interface
,
fmt
->
altsetting
);
return
-
1
;
}
...
...
@@ -1563,25 +1581,38 @@ static int set_format_in(struct usb_audiodev *as)
}
if
(
fmt
->
sratelo
==
fmt
->
sratehi
)
return
0
;
data
[
0
]
=
d
->
srate
;
data
[
1
]
=
d
->
srate
>>
8
;
data
[
2
]
=
d
->
srate
>>
16
;
ep
=
usb_pipeendpoint
(
u
->
datapipe
)
|
(
u
->
datapipe
&
USB_DIR_IN
);
if
(
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure to set input sampling frequency device %d endpoint 0x%x to %u
\n
"
,
dev
->
devnum
,
ep
,
d
->
srate
);
return
-
1
;
/* if endpoint has pitch control, enable it */
if
(
fmt
->
attributes
&
0x02
)
{
data
[
0
]
=
1
;
if
((
ret
=
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure (error %d) to set output pitch control device %d interface %u endpoint 0x%x to %u
\n
"
,
ret
,
dev
->
devnum
,
u
->
interface
,
ep
,
d
->
srate
);
return
-
1
;
}
}
if
(
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure to get input sampling frequency device %d endpoint 0x%x
\n
"
,
dev
->
devnum
,
ep
);
return
-
1
;
/* if endpoint has sampling rate control, set it */
if
(
fmt
->
attributes
&
0x01
)
{
data
[
0
]
=
d
->
srate
;
data
[
1
]
=
d
->
srate
>>
8
;
data
[
2
]
=
d
->
srate
>>
16
;
if
((
ret
=
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure (error %d) to set input sampling frequency device %d interface %u endpoint 0x%x to %u
\n
"
,
ret
,
dev
->
devnum
,
u
->
interface
,
ep
,
d
->
srate
);
return
-
1
;
}
if
((
ret
=
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure (error %d) to get input sampling frequency device %d interface %u endpoint 0x%x
\n
"
,
ret
,
dev
->
devnum
,
u
->
interface
,
ep
);
return
-
1
;
}
printk
(
KERN_DEBUG
"usbaudio: set_format_in: device %d interface %d altsetting %d srate req: %u real %u
\n
"
,
dev
->
devnum
,
u
->
interface
,
fmt
->
altsetting
,
d
->
srate
,
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
));
d
->
srate
=
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
);
}
printk
(
KERN_DEBUG
"usb_audio: set_format_in: device %d interface %d altsetting %d srate req: %u real %u
\n
"
,
dev
->
devnum
,
u
->
interface
,
fmt
->
altsetting
,
d
->
srate
,
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
));
d
->
srate
=
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
);
return
0
;
}
...
...
@@ -1596,6 +1627,7 @@ static int set_format_out(struct usb_audiodev *as)
struct
audioformat
*
fmt
;
unsigned
int
fmtnr
,
ep
;
unsigned
char
data
[
3
];
int
ret
;
if
(
u
->
interface
<
0
||
u
->
interface
>=
config
->
bNumInterfaces
)
return
0
;
...
...
@@ -1611,7 +1643,7 @@ static int set_format_out(struct usb_audiodev *as)
alts
->
endpoint
[
1
].
bmAttributes
!=
0x01
||
alts
->
endpoint
[
1
].
bSynchAddress
!=
0
||
alts
->
endpoint
[
1
].
bEndpointAddress
!=
(
alts
->
endpoint
[
0
].
bSynchAddress
|
0x80
))
{
printk
(
KERN_ERR
"usb
_
audio: device %d interface %d altsetting %d invalid synch pipe
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d interface %d altsetting %d invalid synch pipe
\n
"
,
dev
->
devnum
,
u
->
interface
,
fmt
->
altsetting
);
return
-
1
;
}
...
...
@@ -1629,25 +1661,38 @@ static int set_format_out(struct usb_audiodev *as)
}
if
(
fmt
->
sratelo
==
fmt
->
sratehi
)
return
0
;
data
[
0
]
=
d
->
srate
;
data
[
1
]
=
d
->
srate
>>
8
;
data
[
2
]
=
d
->
srate
>>
16
;
ep
=
usb_pipeendpoint
(
u
->
datapipe
)
|
(
u
->
datapipe
&
USB_DIR_IN
);
if
(
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure to set output sampling frequency device %d endpoint 0x%x to %u
\n
"
,
dev
->
devnum
,
ep
,
d
->
srate
);
return
-
1
;
/* if endpoint has pitch control, enable it */
if
(
fmt
->
attributes
&
0x02
)
{
data
[
0
]
=
1
;
if
((
ret
=
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure (error %d) to set output pitch control device %d interface %u endpoint 0x%x to %u
\n
"
,
ret
,
dev
->
devnum
,
u
->
interface
,
ep
,
d
->
srate
);
return
-
1
;
}
}
if
(
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure to get output sampling frequency device %d endpoint 0x%x
\n
"
,
dev
->
devnum
,
ep
);
return
-
1
;
/* if endpoint has sampling rate control, set it */
if
(
fmt
->
attributes
&
0x01
)
{
data
[
0
]
=
d
->
srate
;
data
[
1
]
=
d
->
srate
>>
8
;
data
[
2
]
=
d
->
srate
>>
16
;
if
((
ret
=
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure (error %d) to set output sampling frequency device %d interface %u endpoint 0x%x to %u
\n
"
,
ret
,
dev
->
devnum
,
u
->
interface
,
ep
,
d
->
srate
);
return
-
1
;
}
if
((
ret
=
usb_control_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
)
{
printk
(
KERN_ERR
"usbaudio: failure (error %d) to get output sampling frequency device %d interface %u endpoint 0x%x
\n
"
,
ret
,
dev
->
devnum
,
u
->
interface
,
ep
);
return
-
1
;
}
printk
(
KERN_DEBUG
"usbaudio: set_format_out: device %d interface %d altsetting %d srate req: %u real %u
\n
"
,
dev
->
devnum
,
u
->
interface
,
fmt
->
altsetting
,
d
->
srate
,
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
));
d
->
srate
=
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
);
}
printk
(
KERN_DEBUG
"usb_audio: set_format_out: device %d interface %d altsetting %d srate req: %u real %u
\n
"
,
dev
->
devnum
,
u
->
interface
,
fmt
->
altsetting
,
d
->
srate
,
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
));
d
->
srate
=
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
);
return
0
;
}
...
...
@@ -1766,7 +1811,7 @@ static int wrmixer(struct usb_mixerdev *ms, unsigned mixch, unsigned value)
return
0
;
err:
printk
(
KERN_ERR
"usb
_
audio: mixer request device %u if %u unit %u ch %u selector %u failed
\n
"
,
printk
(
KERN_ERR
"usbaudio: mixer request device %u if %u unit %u ch %u selector %u failed
\n
"
,
dev
->
devnum
,
ms
->
iface
,
ch
->
unitid
,
ch
->
chnum
,
ch
->
selector
);
return
-
1
;
}
...
...
@@ -1805,7 +1850,6 @@ static void release(struct usb_audio_state *s)
kfree
(
ms
);
}
kfree
(
s
);
MOD_DEC_USE_COUNT
;
}
extern
inline
int
prog_dmabuf_in
(
struct
usb_audiodev
*
as
)
...
...
@@ -1855,6 +1899,7 @@ static int usb_audio_open_mixdev(struct inode *inode, struct file *file)
}
file
->
private_data
=
ms
;
s
->
count
++
;
MOD_INC_USE_COUNT
;
up
(
&
open_sem
);
return
0
;
}
...
...
@@ -1866,6 +1911,7 @@ static int usb_audio_release_mixdev(struct inode *inode, struct file *file)
down
(
&
open_sem
);
release
(
s
);
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
@@ -2201,7 +2247,7 @@ static int usb_audio_mmap(struct file *file, struct vm_area_struct *vma)
db
=
&
as
->
usbin
.
dma
;
}
else
return
-
EINVAL
;
if
(
vma
->
vm_
offset
!=
0
)
if
(
vma
->
vm_
pgoff
!=
0
)
return
-
EINVAL
;
return
dmabuf_mmap
(
db
,
vma
->
vm_start
,
vma
->
vm_end
-
vma
->
vm_start
,
vma
->
vm_page_prot
);
}
...
...
@@ -2510,6 +2556,7 @@ static int usb_audio_open(struct inode *inode, struct file *file)
file
->
private_data
=
as
;
as
->
open_mode
|=
file
->
f_mode
&
(
FMODE_READ
|
FMODE_WRITE
);
s
->
count
++
;
MOD_INC_USE_COUNT
;
up
(
&
open_sem
);
return
0
;
}
...
...
@@ -2539,6 +2586,7 @@ static int usb_audio_release(struct inode *inode, struct file *file)
as
->
open_mode
&=
(
~
file
->
f_mode
)
&
(
FMODE_READ
|
FMODE_WRITE
);
release
(
s
);
wake_up
(
&
open_wait
);
MOD_DEC_USE_COUNT
;
return
0
;
}
...
...
@@ -2663,7 +2711,7 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
struct
usb_interface_descriptor
*
alts
;
struct
usb_interface
*
iface
;
struct
audioformat
*
fp
;
unsigned
char
*
fmt
;
unsigned
char
*
fmt
,
*
csep
;
unsigned
int
i
,
j
,
k
,
format
;
if
(
!
(
as
=
kmalloc
(
sizeof
(
struct
usb_audiodev
),
GFP_KERNEL
)))
...
...
@@ -2683,44 +2731,50 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
if
(
alts
->
bInterfaceClass
!=
USB_CLASS_AUDIO
||
alts
->
bInterfaceSubClass
!=
2
)
continue
;
if
(
alts
->
bNumEndpoints
<
1
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u does not have an endpoint
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u does not have an endpoint
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
if
((
alts
->
endpoint
[
0
].
bmAttributes
&
0x03
)
!=
0x01
||
!
(
alts
->
endpoint
[
0
].
bEndpointAddress
&
0x80
))
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u first endpoint not isochronous in
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u first endpoint not isochronous in
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
fmt
=
find_csinterface_descriptor
(
buffer
,
buflen
,
NULL
,
AS_GENERAL
,
asifin
,
i
);
if
(
!
fmt
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
if
(
fmt
[
0
]
<
7
||
fmt
[
6
]
!=
0
||
(
fmt
[
5
]
!=
1
&&
fmt
[
5
]
!=
2
))
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u format not supported
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u format not supported
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
format
=
(
fmt
[
5
]
==
2
)
?
(
AFMT_U16_LE
|
AFMT_U8
)
:
(
AFMT_S16_LE
|
AFMT_S8
);
fmt
=
find_csinterface_descriptor
(
buffer
,
buflen
,
NULL
,
FORMAT_TYPE
,
asifin
,
i
);
if
(
!
fmt
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
if
(
fmt
[
0
]
<
8
+
3
*
(
fmt
[
7
]
?
fmt
[
7
]
:
2
)
||
fmt
[
3
]
!=
1
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not supported
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not supported
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
if
(
fmt
[
4
]
<
1
||
fmt
[
4
]
>
2
||
fmt
[
5
]
<
1
||
fmt
[
5
]
>
2
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u unsupported channels %u framesize %u
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u unsupported channels %u framesize %u
\n
"
,
dev
->
devnum
,
asifin
,
i
,
fmt
[
4
],
fmt
[
5
]);
continue
;
}
csep
=
find_descriptor
(
buffer
,
buflen
,
NULL
,
USB_DT_CS_ENDPOINT
,
asifin
,
i
);
if
(
!
csep
||
csep
[
0
]
<
7
||
csep
[
2
]
!=
EP_GENERAL
)
{
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u no or invalid class specific endpoint descriptor
\n
"
,
dev
->
devnum
,
asifin
,
i
);
continue
;
}
if
(
as
->
numfmtin
>=
MAXFORMATS
)
continue
;
fp
=
&
as
->
fmtin
[
as
->
numfmtin
++
];
...
...
@@ -2740,8 +2794,9 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
if
(
k
<
fp
->
sratelo
)
fp
->
sratelo
=
k
;
}
printk
(
KERN_INFO
"usb_audio: device %u interface %u altsetting %u: format 0x%08x sratelo %u sratehi %u
\n
"
,
dev
->
devnum
,
asifin
,
i
,
fp
->
format
,
fp
->
sratelo
,
fp
->
sratehi
);
fp
->
attributes
=
csep
[
3
];
printk
(
KERN_INFO
"usbaudio: device %u interface %u altsetting %u: format 0x%08x sratelo %u sratehi %u attributes 0x%02x
\n
"
,
dev
->
devnum
,
asifin
,
i
,
fp
->
format
,
fp
->
sratelo
,
fp
->
sratehi
,
fp
->
attributes
);
}
}
/* search for output formats */
...
...
@@ -2752,44 +2807,50 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
if
(
alts
->
bInterfaceClass
!=
USB_CLASS_AUDIO
||
alts
->
bInterfaceSubClass
!=
2
)
continue
;
if
(
alts
->
bNumEndpoints
<
1
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u does not have an endpoint
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u does not have an endpoint
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
if
((
alts
->
endpoint
[
0
].
bmAttributes
&
0x03
)
!=
0x01
||
(
alts
->
endpoint
[
0
].
bEndpointAddress
&
0x80
))
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u first endpoint not isochronous out
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u first endpoint not isochronous out
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
fmt
=
find_csinterface_descriptor
(
buffer
,
buflen
,
NULL
,
AS_GENERAL
,
asifout
,
i
);
if
(
!
fmt
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
if
(
fmt
[
0
]
<
7
||
fmt
[
6
]
!=
0
||
(
fmt
[
5
]
!=
1
&&
fmt
[
5
]
!=
2
))
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u format not supported
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u format not supported
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
format
=
(
fmt
[
5
]
==
2
)
?
(
AFMT_U16_LE
|
AFMT_U8
)
:
(
AFMT_S16_LE
|
AFMT_S8
);
fmt
=
find_csinterface_descriptor
(
buffer
,
buflen
,
NULL
,
FORMAT_TYPE
,
asifout
,
i
);
if
(
!
fmt
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not found
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
if
(
fmt
[
0
]
<
8
+
3
*
(
fmt
[
7
]
?
fmt
[
7
]
:
2
)
||
fmt
[
3
]
!=
1
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not supported
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u FORMAT_TYPE descriptor not supported
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
if
(
fmt
[
4
]
<
1
||
fmt
[
4
]
>
2
||
fmt
[
5
]
<
1
||
fmt
[
5
]
>
2
)
{
printk
(
KERN_ERR
"usb
_
audio: device %u interface %u altsetting %u unsupported channels %u framesize %u
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u unsupported channels %u framesize %u
\n
"
,
dev
->
devnum
,
asifout
,
i
,
fmt
[
4
],
fmt
[
5
]);
continue
;
}
csep
=
find_descriptor
(
buffer
,
buflen
,
NULL
,
USB_DT_CS_ENDPOINT
,
asifout
,
i
);
if
(
!
csep
||
csep
[
0
]
<
7
||
csep
[
2
]
!=
EP_GENERAL
)
{
printk
(
KERN_ERR
"usbaudio: device %u interface %u altsetting %u no or invalid class specific endpoint descriptor
\n
"
,
dev
->
devnum
,
asifout
,
i
);
continue
;
}
if
(
as
->
numfmtout
>=
MAXFORMATS
)
continue
;
fp
=
&
as
->
fmtout
[
as
->
numfmtout
++
];
...
...
@@ -2809,8 +2870,9 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
if
(
k
<
fp
->
sratelo
)
fp
->
sratelo
=
k
;
}
printk
(
KERN_INFO
"usb_audio: device %u interface %u altsetting %u: format 0x%08x sratelo %u sratehi %u
\n
"
,
dev
->
devnum
,
asifout
,
i
,
fp
->
format
,
fp
->
sratelo
,
fp
->
sratehi
);
fp
->
attributes
=
csep
[
3
];
printk
(
KERN_INFO
"usbaudio: device %u interface %u altsetting %u: format 0x%08x sratelo %u sratehi %u attributes 0x%02x
\n
"
,
dev
->
devnum
,
asifout
,
i
,
fp
->
format
,
fp
->
sratelo
,
fp
->
sratehi
,
fp
->
attributes
);
}
}
if
(
as
->
numfmtin
==
0
&&
as
->
numfmtout
==
0
)
{
...
...
@@ -2818,7 +2880,7 @@ static void usb_audio_parsestreaming(struct usb_audio_state *s, unsigned char *b
return
;
}
if
((
as
->
dev_audio
=
register_sound_dsp
(
&
usb_audio_fops
,
-
1
))
<
0
)
{
printk
(
KERN_ERR
"usb
_
audio: cannot register dsp
\n
"
);
printk
(
KERN_ERR
"usbaudio: cannot register dsp
\n
"
);
kfree
(
as
);
return
;
}
...
...
@@ -2846,11 +2908,11 @@ static struct mixerchannel *getmixchannel(struct consmixstate *state, unsigned i
struct
mixerchannel
*
c
;
if
(
nr
>=
SOUND_MIXER_NRDEVICES
)
{
printk
(
KERN_ERR
"usb
_
audio: invalid OSS mixer channel %u
\n
"
,
nr
);
printk
(
KERN_ERR
"usbaudio: invalid OSS mixer channel %u
\n
"
,
nr
);
return
NULL
;
}
if
(
!
(
state
->
mixchmask
&
(
1
<<
nr
)))
{
printk
(
KERN_WARNING
"usb
_
audio: OSS mixer channel %u already in use
\n
"
,
nr
);
printk
(
KERN_WARNING
"usbaudio: OSS mixer channel %u already in use
\n
"
,
nr
);
return
NULL
;
}
c
=
&
state
->
mixch
[
state
->
nrmixch
++
];
...
...
@@ -3016,7 +3078,7 @@ static void prepmixch(struct consmixstate *state)
return
;
err:
printk
(
KERN_ERR
"usb
_
audio: mixer request device %u if %u unit %u ch %u selector %u failed
\n
"
,
printk
(
KERN_ERR
"usbaudio: mixer request device %u if %u unit %u ch %u selector %u failed
\n
"
,
dev
->
devnum
,
state
->
ctrlif
,
ch
->
unitid
,
ch
->
chnum
,
ch
->
selector
);
if
(
state
->
nrmixch
)
state
->
nrmixch
--
;
...
...
@@ -3052,11 +3114,11 @@ static void usb_audio_mixerunit(struct consmixstate *state, unsigned char *mixer
unsigned
int
i
;
if
(
!
mixer
[
4
])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u invalid MIXER_UNIT descriptor
\n
"
,
mixer
[
3
]);
printk
(
KERN_ERR
"usbaudio: unit %u invalid MIXER_UNIT descriptor
\n
"
,
mixer
[
3
]);
return
;
}
if
(
mixer
[
4
]
>
SOUND_MIXER_NRDEVICES
)
{
printk
(
KERN_ERR
"usb
_
audio: mixer unit %u: too many input pins
\n
"
,
mixer
[
3
]);
printk
(
KERN_ERR
"usbaudio: mixer unit %u: too many input pins
\n
"
,
mixer
[
3
]);
return
;
}
chidx
[
0
]
=
0
;
...
...
@@ -3070,7 +3132,7 @@ static void usb_audio_mixerunit(struct consmixstate *state, unsigned char *mixer
bmapsize
=
(
nroutch
*
chidx
[
mixer
[
4
]]
+
7
)
>>
3
;
bmap
+=
bmapsize
-
1
;
if
(
mixer
[
0
]
<
10
+
mixer
[
4
]
+
bmapsize
)
{
printk
(
KERN_ERR
"usb
_
audio: unit %u invalid MIXER_UNIT descriptor (bitmap too small)
\n
"
,
mixer
[
3
]);
printk
(
KERN_ERR
"usbaudio: unit %u invalid MIXER_UNIT descriptor (bitmap too small)
\n
"
,
mixer
[
3
]);
return
;
}
for
(
i
=
0
;
i
<
mixer
[
4
];
i
++
)
{
...
...
@@ -3109,7 +3171,7 @@ static void usb_audio_selectorunit(struct consmixstate *state, unsigned char *se
unsigned
int
chnum
,
i
;
if
(
!
selector
[
4
])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u invalid SELECTOR_UNIT descriptor
\n
"
,
selector
[
3
]);
printk
(
KERN_ERR
"usbaudio: unit %u invalid SELECTOR_UNIT descriptor
\n
"
,
selector
[
3
]);
return
;
}
usb_audio_recurseunit
(
state
,
selector
[
5
]);
...
...
@@ -3117,7 +3179,7 @@ static void usb_audio_selectorunit(struct consmixstate *state, unsigned char *se
for
(
i
=
1
;
i
<
selector
[
4
];
i
++
)
{
usb_audio_recurseunit
(
state
,
selector
[
5
+
i
]);
if
(
chnum
!=
state
->
nrchannels
)
{
printk
(
KERN_ERR
"usb
_
audio: selector unit %u: input pins with varying channel numbers
\n
"
,
selector
[
3
]);
printk
(
KERN_ERR
"usbaudio: selector unit %u: input pins with varying channel numbers
\n
"
,
selector
[
3
]);
state
->
termtype
=
0
;
state
->
chconfig
=
0
;
state
->
nrchannels
=
0
;
...
...
@@ -3143,18 +3205,20 @@ static void usb_audio_processingunit(struct consmixstate *state, unsigned char *
static
void
usb_audio_featureunit
(
struct
consmixstate
*
state
,
unsigned
char
*
ftr
)
{
struct
usb_device
*
dev
=
state
->
s
->
usbdev
;
struct
mixerchannel
*
ch
;
unsigned
short
chftr
,
mchftr
;
unsigned
char
data
[
1
];
usb_audio_recurseunit
(
state
,
ftr
[
4
]);
if
(
state
->
nrchannels
==
0
)
{
printk
(
KERN_ERR
"usb
_
audio: feature unit %u source has no channels
\n
"
,
ftr
[
3
]);
printk
(
KERN_ERR
"usbaudio: feature unit %u source has no channels
\n
"
,
ftr
[
3
]);
return
;
}
if
(
state
->
nrchannels
>
2
)
printk
(
KERN_WARNING
"usb
_
audio: feature unit %u: OSS mixer interface does not support more than 2 channels
\n
"
,
ftr
[
3
]);
printk
(
KERN_WARNING
"usbaudio: feature unit %u: OSS mixer interface does not support more than 2 channels
\n
"
,
ftr
[
3
]);
if
(
ftr
[
0
]
<
7
+
ftr
[
5
]
*
(
1
+
state
->
nrchannels
))
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid FEATURE_UNIT descriptor
\n
"
,
ftr
[
3
]);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid FEATURE_UNIT descriptor
\n
"
,
ftr
[
3
]);
return
;
}
mchftr
=
ftr
[
6
];
...
...
@@ -3192,7 +3256,7 @@ static void usb_audio_featureunit(struct consmixstate *state, unsigned char *ftr
prepmixch
(
state
);
}
}
else
if
(
mchftr
&
4
)
{
ch
=
getmixchannel
(
state
,
getvolchannel
(
state
)
);
ch
=
getmixchannel
(
state
,
SOUND_MIXER_BASS
);
if
(
ch
)
{
ch
->
unitid
=
ftr
[
3
];
ch
->
selector
=
BASS_CONTROL
;
...
...
@@ -3212,7 +3276,7 @@ static void usb_audio_featureunit(struct consmixstate *state, unsigned char *ftr
prepmixch
(
state
);
}
}
else
if
(
mchftr
&
16
)
{
ch
=
getmixchannel
(
state
,
getvolchannel
(
state
)
);
ch
=
getmixchannel
(
state
,
SOUND_MIXER_TREBLE
);
if
(
ch
)
{
ch
->
unitid
=
ftr
[
3
];
ch
->
selector
=
TREBLE_CONTROL
;
...
...
@@ -3221,6 +3285,14 @@ static void usb_audio_featureunit(struct consmixstate *state, unsigned char *ftr
prepmixch
(
state
);
}
}
/* if there are mute controls, unmute them */
if
((
chftr
&
1
)
||
(
mchftr
&
1
))
{
printk
(
KERN_DEBUG
"usbaudio: unmuting feature unit %u interface %u
\n
"
,
ftr
[
3
],
state
->
ctrlif
);
data
[
0
]
=
0
;
if
(
usb_control_msg
(
dev
,
usb_sndctrlpipe
(
dev
,
0
),
SET_CUR
,
USB_RECIP_INTERFACE
|
USB_TYPE_CLASS
|
USB_DIR_OUT
,
(
MUTE_CONTROL
<<
8
)
|
0xff
,
state
->
ctrlif
|
(
ftr
[
3
]
<<
8
),
data
,
1
,
HZ
)
<
0
)
printk
(
KERN_WARNING
"usbaudio: failure to unmute feature unit %u interface %u
\n
"
,
ftr
[
3
],
state
->
ctrlif
);
}
}
static
void
usb_audio_recurseunit
(
struct
consmixstate
*
state
,
unsigned
char
unitid
)
...
...
@@ -3229,12 +3301,12 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
unsigned
int
i
,
j
;
if
(
test_and_set_bit
(
unitid
,
&
state
->
unitbitmap
))
{
printk
(
KERN_ERR
"usb
_
audio: mixer path recursion detected, unit %d!
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: mixer path recursion detected, unit %d!
\n
"
,
unitid
);
return
;
}
p1
=
find_audiocontrol_unit
(
state
->
buffer
,
state
->
buflen
,
NULL
,
unitid
,
state
->
ctrlif
);
if
(
!
p1
)
{
printk
(
KERN_ERR
"usb
_
audio: unit %d not found!
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %d not found!
\n
"
,
unitid
);
return
;
}
state
->
nrchannels
=
0
;
...
...
@@ -3243,7 +3315,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
switch
(
p1
[
2
])
{
case
INPUT_TERMINAL
:
if
(
p1
[
0
]
<
12
)
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid INPUT_TERMINAL descriptor
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid INPUT_TERMINAL descriptor
\n
"
,
unitid
);
return
;
}
state
->
nrchannels
=
p1
[
7
];
...
...
@@ -3253,7 +3325,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
case
MIXER_UNIT
:
if
(
p1
[
0
]
<
10
||
p1
[
0
]
<
10
+
p1
[
4
])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid MIXER_UNIT descriptor
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid MIXER_UNIT descriptor
\n
"
,
unitid
);
return
;
}
usb_audio_mixerunit
(
state
,
p1
);
...
...
@@ -3261,7 +3333,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
case
SELECTOR_UNIT
:
if
(
p1
[
0
]
<
6
||
p1
[
0
]
<
6
+
p1
[
4
])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid SELECTOR_UNIT descriptor
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid SELECTOR_UNIT descriptor
\n
"
,
unitid
);
return
;
}
usb_audio_selectorunit
(
state
,
p1
);
...
...
@@ -3269,7 +3341,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
case
FEATURE_UNIT
:
if
(
p1
[
0
]
<
7
||
p1
[
0
]
<
7
+
p1
[
5
])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid FEATURE_UNIT descriptor
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid FEATURE_UNIT descriptor
\n
"
,
unitid
);
return
;
}
usb_audio_featureunit
(
state
,
p1
);
...
...
@@ -3277,7 +3349,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
case
PROCESSING_UNIT
:
if
(
p1
[
0
]
<
13
||
p1
[
0
]
<
13
+
p1
[
6
]
||
p1
[
0
]
<
13
+
p1
[
6
]
+
p1
[
11
+
p1
[
6
]]
||
p1
[
0
]
<
13
+
p1
[
6
]
+
p1
[
11
+
p1
[
6
]]
+
p1
[
13
+
p1
[
6
]
+
p1
[
11
+
p1
[
6
]]])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid PROCESSING_UNIT descriptor
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid PROCESSING_UNIT descriptor
\n
"
,
unitid
);
return
;
}
usb_audio_processingunit
(
state
,
p1
);
...
...
@@ -3285,7 +3357,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
case
EXTENSION_UNIT
:
if
(
p1
[
0
]
<
13
||
p1
[
0
]
<
13
+
p1
[
6
]
||
p1
[
0
]
<
13
+
p1
[
6
]
+
p1
[
11
+
p1
[
6
]])
{
printk
(
KERN_ERR
"usb
_
audio: unit %u: invalid EXTENSION_UNIT descriptor
\n
"
,
unitid
);
printk
(
KERN_ERR
"usbaudio: unit %u: invalid EXTENSION_UNIT descriptor
\n
"
,
unitid
);
return
;
}
for
(
j
=
i
=
0
;
i
<
p1
[
6
];
i
++
)
{
...
...
@@ -3301,7 +3373,7 @@ static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unit
return
;
default:
printk
(
KERN_ERR
"usb
_
audio: unit %u: unexpected type 0x%02x
\n
"
,
unitid
,
p1
[
2
]);
printk
(
KERN_ERR
"usbaudio: unit %u: unexpected type 0x%02x
\n
"
,
unitid
,
p1
[
2
]);
return
;
}
}
...
...
@@ -3319,11 +3391,11 @@ static void usb_audio_constructmixer(struct usb_audio_state *s, unsigned char *b
state
.
buflen
=
buflen
;
state
.
ctrlif
=
ctrlif
;
set_bit
(
oterm
[
3
],
&
state
.
unitbitmap
);
/* mark terminal ID as visited */
printk
(
KERN_INFO
"usb
_
audio: constructing mixer for Terminal %u type 0x%04x
\n
"
,
printk
(
KERN_INFO
"usbaudio: constructing mixer for Terminal %u type 0x%04x
\n
"
,
oterm
[
3
],
oterm
[
4
]
|
(
oterm
[
5
]
<<
8
));
usb_audio_recurseunit
(
&
state
,
oterm
[
7
]);
if
(
!
state
.
nrmixch
)
{
printk
(
KERN_INFO
"usb
_
audio: no mixer controls found for Terminal %u
\n
"
,
oterm
[
3
]);
printk
(
KERN_INFO
"usbaudio: no mixer controls found for Terminal %u
\n
"
,
oterm
[
3
]);
return
;
}
if
(
!
(
ms
=
kmalloc
(
sizeof
(
struct
usb_mixerdev
)
+
state
.
nrmixch
*
sizeof
(
struct
mixerchannel
),
GFP_KERNEL
)))
...
...
@@ -3334,7 +3406,7 @@ static void usb_audio_constructmixer(struct usb_audio_state *s, unsigned char *b
ms
->
iface
=
ctrlif
;
ms
->
numch
=
state
.
nrmixch
;
if
((
ms
->
dev_mixer
=
register_sound_mixer
(
&
usb_mixer_fops
,
-
1
))
<
0
)
{
printk
(
KERN_ERR
"usb
_
audio: cannot register mixer
\n
"
);
printk
(
KERN_ERR
"usbaudio: cannot register mixer
\n
"
);
kfree
(
ms
);
return
;
}
...
...
@@ -3359,49 +3431,49 @@ static void * usb_audio_parsecontrol(struct usb_device *dev, unsigned char *buff
s
->
count
=
1
;
/* find audiocontrol interface */
if
(
!
(
p1
=
find_csinterface_descriptor
(
buffer
,
buflen
,
NULL
,
HEADER
,
ctrlif
,
-
1
)))
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u no HEADER found
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u no HEADER found
\n
"
,
dev
->
devnum
,
ctrlif
);
goto
ret
;
}
if
(
p1
[
0
]
<
8
+
p1
[
7
])
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u HEADER error
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u HEADER error
\n
"
,
dev
->
devnum
,
ctrlif
);
goto
ret
;
}
if
(
!
p1
[
7
])
printk
(
KERN_INFO
"usb
_
audio: device %d audiocontrol interface %u has no AudioStreaming and MidiStreaming interfaces
\n
"
,
printk
(
KERN_INFO
"usbaudio: device %d audiocontrol interface %u has no AudioStreaming and MidiStreaming interfaces
\n
"
,
dev
->
devnum
,
ctrlif
);
for
(
i
=
0
;
i
<
p1
[
7
];
i
++
)
{
j
=
p1
[
8
+
i
];
if
(
j
>=
config
->
bNumInterfaces
)
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u interface %u does not exist
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u interface %u does not exist
\n
"
,
dev
->
devnum
,
ctrlif
,
j
);
continue
;
}
iface
=
&
config
->
interface
[
j
];
if
(
iface
->
altsetting
[
0
].
bInterfaceClass
!=
USB_CLASS_AUDIO
)
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u interface %u is not an AudioClass interface
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u interface %u is not an AudioClass interface
\n
"
,
dev
->
devnum
,
ctrlif
,
j
);
continue
;
}
if
(
iface
->
altsetting
[
0
].
bInterfaceSubClass
==
3
)
{
printk
(
KERN_INFO
"usb
_
audio: device %d audiocontrol interface %u interface %u MIDIStreaming not supported
\n
"
,
printk
(
KERN_INFO
"usbaudio: device %d audiocontrol interface %u interface %u MIDIStreaming not supported
\n
"
,
dev
->
devnum
,
ctrlif
,
j
);
continue
;
}
if
(
iface
->
altsetting
[
0
].
bInterfaceSubClass
!=
2
)
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u interface %u invalid AudioClass subtype
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u interface %u invalid AudioClass subtype
\n
"
,
dev
->
devnum
,
ctrlif
,
j
);
continue
;
}
if
(
iface
->
num_altsetting
<
2
||
iface
->
altsetting
[
0
].
bNumEndpoints
>
0
)
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u altsetting 0 not zero bandwidth
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u altsetting 0 not zero bandwidth
\n
"
,
dev
->
devnum
,
ctrlif
);
continue
;
}
if
(
iface
->
altsetting
[
1
].
bNumEndpoints
<
1
)
{
printk
(
KERN_ERR
"usb
_
audio: device %d audiocontrol interface %u interface %u has no endpoint
\n
"
,
printk
(
KERN_ERR
"usbaudio: device %d audiocontrol interface %u interface %u has no endpoint
\n
"
,
dev
->
devnum
,
ctrlif
,
j
);
continue
;
}
...
...
@@ -3419,7 +3491,7 @@ static void * usb_audio_parsecontrol(struct usb_device *dev, unsigned char *buff
}
}
}
printk
(
KERN_INFO
"usb
_
audio: device %d audiocontrol interface %u has %u input and %u output AudioStreaming interfaces
\n
"
,
printk
(
KERN_INFO
"usbaudio: device %d audiocontrol interface %u has %u input and %u output AudioStreaming interfaces
\n
"
,
dev
->
devnum
,
ctrlif
,
numifin
,
numifout
);
for
(
i
=
0
;
i
<
numifin
&&
i
<
numifout
;
i
++
)
usb_audio_parsestreaming
(
s
,
buffer
,
buflen
,
ifin
[
i
],
ifout
[
i
]);
...
...
@@ -3444,7 +3516,6 @@ static void * usb_audio_parsecontrol(struct usb_device *dev, unsigned char *buff
down
(
&
open_sem
);
list_add_tail
(
&
s
->
audiodev
,
&
audiodevs
);
up
(
&
open_sem
);
MOD_INC_USE_COUNT
;
return
s
;
}
...
...
@@ -3462,7 +3533,7 @@ static void * usb_audio_probe(struct usb_device *dev, unsigned int ifnum)
if
(
config
->
interface
[
i
].
altsetting
[
0
].
bInterfaceClass
==
USB_CLASS_AUDIO
&&
config
->
interface
[
i
].
altsetting
[
0
].
bInterfaceSubClass
==
1
)
/* audiocontrol interface found */
goto
audioctrlfound
;
printk
(
KERN_DEBUG
"usb
_
audio: vendor id 0x%04x, product id 0x%04x contains no AudioControl interface
\n
"
,
printk
(
KERN_DEBUG
"usbaudio: vendor id 0x%04x, product id 0x%04x contains no AudioControl interface
\n
"
,
dev
->
descriptor
.
idVendor
,
dev
->
descriptor
.
idProduct
);
return
NULL
;
...
...
@@ -3471,17 +3542,17 @@ static void * usb_audio_probe(struct usb_device *dev, unsigned int ifnum)
for
(
i
=
0
;
i
<
dev
->
descriptor
.
bNumConfigurations
;
i
++
)
if
(
dev
->
config
+
i
==
config
)
goto
configfound
;
printk
(
KERN_ERR
"usb
_
audio: cannot find active configuration number of device %d
\n
"
,
dev
->
devnum
);
printk
(
KERN_ERR
"usbaudio: cannot find active configuration number of device %d
\n
"
,
dev
->
devnum
);
return
NULL
;
configfound:
ret
=
usb_get_descriptor
(
dev
,
USB_DT_CONFIG
,
i
,
buf
,
8
);
if
(
ret
)
{
printk
(
KERN_ERR
"usb
_
audio: cannot get first 8 bytes of config descriptor %d of device %d
\n
"
,
i
,
dev
->
devnum
);
printk
(
KERN_ERR
"usbaudio: cannot get first 8 bytes of config descriptor %d of device %d
\n
"
,
i
,
dev
->
devnum
);
return
NULL
;
}
if
(
buf
[
1
]
!=
USB_DT_CONFIG
||
buf
[
0
]
<
9
)
{
printk
(
KERN_ERR
"usb
_
audio: invalid config descriptor %d of device %d
\n
"
,
i
,
dev
->
devnum
);
printk
(
KERN_ERR
"usbaudio: invalid config descriptor %d of device %d
\n
"
,
i
,
dev
->
devnum
);
return
NULL
;
}
buflen
=
buf
[
2
]
|
(
buf
[
3
]
<<
8
);
...
...
@@ -3490,7 +3561,7 @@ static void * usb_audio_probe(struct usb_device *dev, unsigned int ifnum)
ret
=
usb_get_descriptor
(
dev
,
USB_DT_CONFIG
,
i
,
buffer
,
buflen
);
if
(
ret
)
{
kfree
(
buffer
);
printk
(
KERN_ERR
"usb
_
audio: cannot get config descriptor %d of device %d
\n
"
,
i
,
dev
->
devnum
);
printk
(
KERN_ERR
"usbaudio: cannot get config descriptor %d of device %d
\n
"
,
i
,
dev
->
devnum
);
return
NULL
;
}
/* find first audio control interface; we currently cannot handle more than one */
...
...
drivers/usb/cpia.c
View file @
ebec8ca6
...
...
@@ -29,6 +29,7 @@
#define CPIA_DEBUG
/* Gobs of debugging info */
/* Video Size 384 x 288 x 3 bytes for RGB */
/* 384 because xawtv tries to grab 384 even though we tell it 352 is our max */
#define MAX_FRAME_SIZE (384 * 288 * 3)
/*******************************/
...
...
@@ -209,8 +210,8 @@ static int usb_cpia_grab_frame(struct usb_device *dev, int streamstartline)
static
int
usb_cpia_upload_frame
(
struct
usb_device
*
dev
,
int
forceupload
)
{
return
usb_control_msg
(
dev
,
usb_sndctrlpipe
(
dev
,
0
),
USB_REQ_CPIA_UPLOAD_FRAME
,
USB_TYPE_VENDOR
|
USB_RECIP_DEVICE
,
forceupload
,
0
,
NULL
,
0
,
HZ
);
USB_REQ_CPIA_UPLOAD_FRAME
,
USB_TYPE_VENDOR
|
USB_RECIP_DEVICE
,
forceupload
,
0
,
NULL
,
0
,
HZ
);
}
static
int
usb_cpia_set_grab_mode
(
struct
usb_device
*
dev
,
int
continuousgrab
)
...
...
@@ -246,6 +247,16 @@ static int usb_cpia_set_compression(struct usb_device *dev, int compmode, int de
(
decimation
<<
8
)
+
compmode
,
0
,
NULL
,
0
,
HZ
);
}
#ifdef NOTUSED
static
int
usb_cpia_set_compression_target
(
struct
usb_device
*
dev
,
int
target
,
int
targetfr
,
int
targetq
)
{
return
usb_control_msg
(
dev
,
usb_sndctrlpipe
(
dev
,
0
),
USB_REQ_CPIA_SET_COMPRESSION_TARGET
,
USB_TYPE_VENDOR
|
USB_RECIP_DEVICE
,
(
targetfr
<<
8
)
+
target
,
targetq
,
NULL
,
0
,
HZ
);
}
#endif
#ifdef NOTUSED
static
int
usb_cpia_initstreamcap
(
struct
usb_device
*
dev
,
int
skipframes
,
int
streamstartline
)
{
...
...
@@ -286,6 +297,7 @@ static void cpia_parse_data(struct usb_cpia *cpia)
unsigned
char
*
data
=
cpia
->
scratch
;
unsigned
long
l
;
/* Grab the current frame and the previous frame */
frame
=
&
cpia
->
frame
[
cpia
->
curframe
];
pframe
=
&
cpia
->
frame
[(
cpia
->
curframe
-
1
+
CPIA_NUMFRAMES
)
%
CPIA_NUMFRAMES
];
...
...
@@ -316,9 +328,9 @@ static void cpia_parse_data(struct usb_cpia *cpia)
/* See if we found the end of the frame */
while
(
scratch_left
(
data
)
>=
4
)
{
if
(
*
((
__u32
*
)
data
)
==
0xFFFFFFFF
)
{
printk
(
"found end of frame
\n
"
);
data
+=
4
;
goto
error
;
printk
(
KERN_INFO
"cpia: EOF while scanning for magic
\n
"
);
goto
error
;
}
data
++
;
}
...
...
@@ -349,7 +361,6 @@ goto error;
frame
->
scanstate
=
STATE_LINES
;
frame
->
curline
=
0
;
break
;
case
STATE_LINES
:
{
...
...
@@ -365,10 +376,9 @@ goto error;
/* Grab the length */
len
=
data
[
0
]
+
(
data
[
1
]
<<
8
);
printk
(
"line %d, %d bytes long
\n
"
,
frame
->
curline
,
len
);
/* Check to make sure it's nothing outrageous */
if
(
len
>
(
frame
->
hdrwidth
*
2
)
+
1
)
{
printk
(
KERN_INFO
"cpia: bad length, resynching
\n
"
);
printk
(
KERN_INFO
"cpia: bad length, resynching
(expected %d, got %d)
\n
"
,
(
frame
->
hdrwidth
*
2
)
+
1
,
len
);
goto
error
;
}
...
...
@@ -382,12 +392,6 @@ printk("line %d, %d bytes long\n", frame->curline, len);
/* Is the end of the line there */
if
(
data
[
len
-
1
]
!=
0xFD
)
{
printk
(
KERN_INFO
"cpia: lost synch
\n
"
);
end
=
data
+
len
-
1
-
4
;
printk
(
"%02X %02X %02X %02X %02X %02X %02X %02X
\n
"
,
end
[
0
],
end
[
1
],
end
[
2
],
end
[
3
],
end
[
4
],
end
[
5
],
end
[
6
],
end
[
7
]);
goto
error
;
}
...
...
@@ -428,12 +432,6 @@ y1 *= 76310;
*
f
++
=
LIMIT
(
b
+
y
);
*
f
++
=
LIMIT
(
g
+
y
);
*
f
++
=
LIMIT
(
r
+
y
);
*
f
++
=
LIMIT
(
b
+
y1
);
*
f
++
=
LIMIT
(
g
+
y1
);
*
f
++
=
LIMIT
(
r
+
y1
);
fp
+=
6
;
/*
f[0] = f[1] = f[2] = *data;
f += 3;
data += 2;
fp += 3;
*/
}
}
}
else
{
...
...
@@ -471,10 +469,11 @@ y1 *= 76310;
}
nextframe:
if
(
scratch_left
(
data
)
>=
4
&&
*
((
__u32
*
)
data
)
==
0xFFFFFFFF
)
{
#ifdef CPIA_DEBUG
printk
(
"cpia: marking as success
\n
"
);
#endif
if
(
scratch_left
(
data
)
>=
4
&&
*
((
__u32
*
)
data
)
==
0xFFFFFFFF
)
data
+=
4
;
printk
(
"end of frame found normally
\n
"
);
}
frame
->
grabstate
=
FRAME_DONE
;
cpia
->
curframe
=
-
1
;
...
...
@@ -486,6 +485,9 @@ printk("end of frame found normally\n");
goto
out
;
error:
#ifdef CPIA_DEBUG
printk
(
"cpia: marking as error
\n
"
);
#endif
frame
->
grabstate
=
FRAME_ERROR
;
cpia
->
curframe
=
-
1
;
cpia
->
compress
=
0
;
...
...
@@ -495,7 +497,6 @@ printk("end of frame found normally\n");
wake_up_interruptible
(
&
frame
->
wq
);
out:
printk
(
"scanned %d bytes, %d left
\n
"
,
data
-
cpia
->
scratch
,
scratch_left
(
data
));
/* Grab the remaining */
l
=
scratch_left
(
data
);
memmove
(
cpia
->
scratch
,
data
,
l
);
...
...
@@ -546,7 +547,7 @@ static int cpia_isoc_irq(int status, void *__buffer, int len, void *isocdesc)
int
i
;
if
(
!
cpia
->
streaming
)
{
printk
(
"oops, not streaming, but interrupt
\n
"
);
printk
(
"
cpia:
oops, not streaming, but interrupt
\n
"
);
return
0
;
}
...
...
@@ -556,7 +557,6 @@ static int cpia_isoc_irq(int status, void *__buffer, int len, void *isocdesc)
/* Copy the data received into our scratch buffer */
len
=
cpia_compress_isochronous
(
cpia
,
sbuf
->
isodesc
);
printk
(
"%d bytes received
\n
"
,
len
);
/* If we don't have a frame we're current working on, complain */
if
(
len
)
{
if
(
cpia
->
curframe
<
0
)
...
...
@@ -589,7 +589,7 @@ static int cpia_init_isoc(struct usb_cpia *cpia)
/* Alternate interface 3 is is the biggest frame size */
if
(
usb_set_interface
(
cpia
->
dev
,
1
,
3
)
<
0
)
{
printk
(
"usb_set_interface error
\n
"
);
printk
(
KERN_ERR
"usb_set_interface error
\n
"
);
return
-
EBUSY
;
}
...
...
@@ -644,21 +644,7 @@ static int cpia_init_isoc(struct usb_cpia *cpia)
if
(
err
)
printk
(
KERN_ERR
"CPiA USB driver error (%d) on usb_run_isoc
\n
"
,
err
);
#ifdef CPIA_DEBUG
printk
(
"done scheduling
\n
"
);
#endif
#if 0
if (usb_cpia_grab_frame(dev, 120) < 0) {
printk(KERN_INFO "cpia_grab_frame error\n");
return -EBUSY;
}
#endif
cpia
->
streaming
=
1
;
#ifdef CPIA_DEBUG
printk
(
"now streaming
\n
"
);
#endif
return
0
;
}
...
...
@@ -668,21 +654,12 @@ static void cpia_stop_isoc(struct usb_cpia *cpia)
if
(
!
cpia
->
streaming
)
return
;
cpia
->
streaming
=
0
;
/* Turn off continuous grab */
if
(
usb_cpia_set_grab_mode
(
cpia
->
dev
,
0
)
<
0
)
{
printk
(
KERN_INFO
"cpia_set_grab_mode error
\n
"
);
return
/* -EBUSY */
;
}
#if 0
if (usb_cpia_grab_frame(cpia->dev, 0) < 0) {
printk(KERN_INFO "cpia_grab_frame error\n");
return /* -EBUSY */;
}
#endif
/* Set packet size to 0 */
if
(
usb_set_interface
(
cpia
->
dev
,
1
,
0
)
<
0
)
{
printk
(
KERN_INFO
"usb_set_interface error
\n
"
);
...
...
@@ -693,6 +670,8 @@ static void cpia_stop_isoc(struct usb_cpia *cpia)
usb_kill_isoc
(
cpia
->
sbuf
[
1
].
isodesc
);
usb_kill_isoc
(
cpia
->
sbuf
[
0
].
isodesc
);
cpia
->
streaming
=
0
;
/* Delete them all */
usb_free_isoc
(
cpia
->
sbuf
[
1
].
isodesc
);
usb_free_isoc
(
cpia
->
sbuf
[
0
].
isodesc
);
...
...
@@ -703,29 +682,23 @@ static int cpia_new_frame(struct usb_cpia *cpia, int framenum)
struct
cpia_frame
*
frame
;
int
width
,
height
;
printk
(
"new frame %d
\n
"
,
framenum
);
if
(
framenum
==
-
1
)
{
int
i
;
for
(
i
=
0
;
i
<
CPIA_NUMFRAMES
;
i
++
)
if
(
cpia
->
frame
[
i
].
grabstate
==
FRAME_READY
)
break
;
if
(
i
>=
CPIA_NUMFRAMES
)
{
printk
(
"no frame ready
\n
"
);
return
0
;
}
framenum
=
i
;
printk
(
"using frame %d
\n
"
,
framenum
);
}
if
(
cpia
->
curframe
!=
-
1
&&
cpia
->
curframe
!=
framenum
)
/* If we're not grabbing a frame right now and the other frame is */
/* ready to be grabbed into, then use it instead */
if
(
cpia
->
curframe
==
-
1
)
{
if
(
cpia
->
frame
[(
framenum
-
1
+
CPIA_NUMFRAMES
)
%
CPIA_NUMFRAMES
].
grabstate
==
FRAME_READY
)
framenum
=
(
framenum
-
1
+
CPIA_NUMFRAMES
)
%
CPIA_NUMFRAMES
;
}
else
return
0
;
frame
=
&
cpia
->
frame
[
framenum
];
width
=
frame
->
width
;
height
=
frame
->
height
;
frame
->
grabstate
=
FRAME_GRABBING
;
frame
->
scanstate
=
STATE_SCANNING
;
cpia
->
curframe
=
framenum
;
/* Make sure it's not too big */
if
(
width
>
352
)
width
=
352
;
...
...
@@ -739,7 +712,8 @@ printk("using frame %d\n", framenum);
if
(
usb_cpia_set_roi
(
cpia
->
dev
,
0
,
width
/
8
,
0
,
height
/
4
)
<
0
)
return
-
EBUSY
;
if
(
usb_cpia_set_compression
(
cpia
->
dev
,
cpia
->
compress
?
1
:
0
,
0
)
<
0
)
{
if
(
usb_cpia_set_compression
(
cpia
->
dev
,
cpia
->
compress
?
COMP_AUTO
:
COMP_DISABLED
,
DONT_DECIMATE
)
<
0
)
{
printk
(
KERN_INFO
"cpia_set_compression error
\n
"
);
return
-
EBUSY
;
}
...
...
@@ -748,16 +722,11 @@ printk("using frame %d\n", framenum);
cpia
->
compress
=
(
cpia
->
compress
+
1
)
%
30
;
/* Grab the frame */
if
(
usb_cpia_upload_frame
(
cpia
->
dev
,
1
)
<
0
)
{
if
(
usb_cpia_upload_frame
(
cpia
->
dev
,
WAIT_FOR_NEXT_FRAME
)
<
0
)
{
printk
(
KERN_INFO
"cpia_upload_frame error
\n
"
);
return
-
EBUSY
;
}
frame
->
grabstate
=
FRAME_GRABBING
;
frame
->
scanstate
=
STATE_SCANNING
;
cpia
->
curframe
=
framenum
;
return
0
;
}
...
...
@@ -864,8 +833,8 @@ static int cpia_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
b
.
audios
=
0
;
b
.
maxwidth
=
352
;
/* CIF */
b
.
maxheight
=
288
;
/* " */
b
.
minwidth
=
176
;
/* QCIF */
b
.
minheight
=
144
;
/* " */
b
.
minwidth
=
8
;
b
.
minheight
=
4
;
if
(
copy_to_user
(
arg
,
&
b
,
sizeof
(
b
)))
return
-
EFAULT
;
...
...
@@ -1067,11 +1036,11 @@ static int cpia_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
return
-
EINVAL
;
case
FRAME_READY
:
case
FRAME_GRABBING
:
case
FRAME_ERROR
:
redo:
do
{
printk
(
"enter sleeping
\n
"
);
init_waitqueue_head
(
&
cpia
->
frame
[
frame
].
wq
);
interruptible_sleep_on
(
&
cpia
->
frame
[
frame
].
wq
);
printk
(
"back from sleeping
\n
"
);
if
(
signal_pending
(
current
))
return
-
EINTR
;
}
while
(
cpia
->
frame
[
frame
].
grabstate
==
...
...
@@ -1093,8 +1062,9 @@ printk("back from sleeping\n");
#ifdef CPIA_DEBUG
printk
(
"cpia: finished, synced to frame %d
\n
"
,
frame
);
#endif
cpia
->
frame
[
frame
].
grabstate
=
FRAME_UNUSED
;
return
cpia_new_frame
(
cpia
,
-
1
)
;
return
0
;
}
case
VIDIOCGFBUF
:
{
...
...
@@ -1212,7 +1182,7 @@ static int usb_cpia_configure(struct usb_cpia *cpia)
return
-
EBUSY
;
}
printk
(
"cpia: Firmware v%d.%d, VC Hardware v%d.%d
\n
"
,
printk
(
KERN_DEBUG
"cpia: Firmware v%d.%d, VC Hardware v%d.%d
\n
"
,
version
[
0
],
version
[
1
],
version
[
2
],
version
[
3
]);
memcpy
(
&
cpia
->
vdev
,
&
cpia_template
,
sizeof
(
cpia_template
));
...
...
@@ -1235,8 +1205,8 @@ static int usb_cpia_configure(struct usb_cpia *cpia)
goto
error
;
}
printk
(
"cpia: VP v%d rev %d
\n
"
,
version
[
0
],
version
[
1
]);
printk
(
"cpia: Camera Head ID %04X
\n
"
,
(
version
[
3
]
<<
8
)
+
version
[
2
]);
printk
(
KERN_DEBUG
"cpia: VP v%d rev %d
\n
"
,
version
[
0
],
version
[
1
]);
printk
(
KERN_DEBUG
"cpia: Camera Head ID %04X
\n
"
,
(
version
[
3
]
<<
8
)
+
version
[
2
]);
/* Turn on continuous grab */
if
(
usb_cpia_set_grab_mode
(
dev
,
1
)
<
0
)
{
...
...
@@ -1251,13 +1221,14 @@ static int usb_cpia_configure(struct usb_cpia *cpia)
}
/* Set video into CIF mode, and order into YUYV mode */
if
(
usb_cpia_set_format
(
dev
,
CPIA_CIF
,
1
,
CPIA_YUYV
)
<
0
)
{
if
(
usb_cpia_set_format
(
dev
,
FORMAT_CIF
,
FORMAT_422
,
FORMAT_YUYV
)
<
0
)
{
printk
(
KERN_INFO
"cpia_set_format error
\n
"
);
goto
error
;
}
/* Turn off compression */
if
(
usb_cpia_set_compression
(
dev
,
0
,
0
)
<
0
)
{
if
(
usb_cpia_set_compression
(
dev
,
COMP_DISABLED
,
DONT_DECIMATE
)
<
0
)
{
printk
(
KERN_INFO
"cpia_set_compression error
\n
"
);
goto
error
;
}
...
...
@@ -1300,10 +1271,10 @@ static void * cpia_probe(struct usb_device *dev, unsigned int ifnum)
return
NULL
;
/* We found a CPiA */
printk
(
"USB CPiA camera found
\n
"
);
printk
(
KERN_INFO
"USB CPiA camera found
\n
"
);
if
((
cpia
=
kmalloc
(
sizeof
(
*
cpia
),
GFP_KERNEL
))
==
NULL
)
{
printk
(
"couldn't kmalloc cpia struct
\n
"
);
printk
(
KERN_ERR
"couldn't kmalloc cpia struct
\n
"
);
return
NULL
;
}
...
...
drivers/usb/cpia.h
View file @
ebec8ca6
...
...
@@ -50,15 +50,30 @@
#define USB_REQ_CPIA_GRAB_FRAME 0xC1
#define USB_REQ_CPIA_UPLOAD_FRAME 0xC2
#define WAIT_FOR_NEXT_FRAME 0
#define FORCE_FRAME_UPLOAD 1
#define USB_REQ_CPIA_SET_GRAB_MODE 0xC3
#define USB_REQ_CPIA_INIT_STREAM_CAP 0xC4
#define USB_REQ_CPIA_FINI_STREAM_CAP 0xC5
#define USB_REQ_CPIA_START_STREAM_CAP 0xC6
#define USB_REQ_CPIA_END_STREAM_CAP 0xC7
#define USB_REQ_CPIA_SET_FORMAT 0xC8
#define FORMAT_QCIF 0
#define FORMAT_CIF 1
#define FORMAT_YUYV 0
#define FORMAT_UYVY 1
#define FORMAT_420 0
#define FORMAT_422 1
#define USB_REQ_CPIA_SET_ROI 0xC9
#define USB_REQ_CPIA_SET_COMPRESSION 0xCA
#define COMP_DISABLED 0
#define COMP_AUTO 1
#define COMP_MANUAL 2
#define DONT_DECIMATE 0
#define DECIMATE 1
#define USB_REQ_CPIA_SET_COMPRESSION_TARGET 0xCB
#define TARGET_QUALITY 0
#define TARGET_FRAMERATE 1
#define USB_REQ_CPIA_SET_YUV_THRESH 0xCC
#define USB_REQ_CPIA_SET_COMPRESSION_PARAMS 0xCD
#define USB_REQ_CPIA_DISCARD_FRAME 0xCE
...
...
@@ -72,12 +87,6 @@
#define USB_REQ_CPIA_DOWNLOAD_DRAM 0xEA
/* #define USB_REQ_CPIA_NULL_CMD 0x?? */
#define CPIA_QCIF 0
#define CPIA_CIF 1
#define CPIA_YUYV 0
#define CPIA_UYVY 1
#define STREAM_BUF_SIZE (PAGE_SIZE * 4)
/* #define STREAM_BUF_SIZE (FRAMES_PER_DESC * FRAME_SIZE_PER_DESC) */
...
...
drivers/video/clgenfb.c
View file @
ebec8ca6
...
...
@@ -2476,7 +2476,7 @@ static void __init get_of_addrs (const struct device_node *dp,
for
(
i
=
0
;
i
<
dp
->
n_addrs
;
++
i
)
{
unsigned
long
addr
=
dp
->
addrs
[
i
].
address
;
unsigned
long
size
=
dp
->
addrs
[
i
].
size
;
printk
(
"dp->addrs[%d].address =
$
lx, dp->addrs[%d].size = %lx
\n
"
,
printk
(
"dp->addrs[%d].address =
%
lx, dp->addrs[%d].size = %lx
\n
"
,
i
,
addr
,
i
,
size
);
if
(
size
>=
0x800000
)
{
*
display
=
addr
;
...
...
drivers/video/fbcon-mac.c
View file @
ebec8ca6
...
...
@@ -455,7 +455,7 @@ static int get_pixel_mac(struct display *p, int pixel_x, int pixel_y)
u8
*
dest
,
bit
;
u16
*
dest16
;
u32
*
dest32
;
u8
pixel
;
u8
pixel
=
0
;
switch
(
p
->
var
.
bits_per_pixel
)
{
case
1
:
...
...
fs/buffer.c
View file @
ebec8ca6
...
...
@@ -823,7 +823,7 @@ static int balance_dirty_state(kdev_t dev)
unsigned
long
dirty
,
tot
,
hard_dirty_limit
,
soft_dirty_limit
;
dirty
=
size_buffers_type
[
BUF_DIRTY
]
>>
PAGE_SHIFT
;
tot
=
nr_lru_pages
+
nr_free_pages
+
nr_free_highpages
;
tot
=
nr_lru_pages
+
nr_free_pages
-
nr_free_highpages
;
hard_dirty_limit
=
tot
*
bdf_prm
.
b_un
.
nfract
/
100
;
soft_dirty_limit
=
hard_dirty_limit
>>
1
;
...
...
@@ -1294,7 +1294,9 @@ static void unmap_underlying_metadata(struct buffer_head * bh)
{
#if 0
if (buffer_new(bh)) {
struct old_bh = get_hash_table(bh->b_dev, bh->b_blocknr, bh->b_size);
struct buffer_head *old_bh;
old_bh = get_hash_table(bh->b_dev, bh->b_blocknr, bh->b_size);
if (old_bh) {
unmap_buffer(old_bh);
/* Here we could run brelse or bforget. We use
...
...
fs/ncpfs/dir.c
View file @
ebec8ca6
...
...
@@ -470,20 +470,14 @@ ncp_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
static
time_t
ncp_obtain_mtime
(
struct
dentry
*
dentry
)
{
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
parent
=
dentry
->
d_parent
->
d_inode
;
struct
ncp_server
*
server
=
NCP_SERVER
(
inode
);
struct
nw_info_struct
i
;
int
len
=
dentry
->
d_name
.
len
;
__u8
__name
[
len
+
1
];
if
(
!
ncp_conn_valid
(
server
)
||
(
inode
==
inode
->
i_sb
->
s_root
->
d_inode
)
||
ncp_is_server_root
(
parent
))
ncp_is_server_root
(
inode
))
return
0
;
memcpy
(
__name
,
dentry
->
d_name
.
name
,
len
);
io2vol
(
server
,
__name
,
!
ncp_preserve_case
(
parent
));
if
(
ncp_obtain_info
(
server
,
parent
,
__name
,
&
i
))
if
(
ncp_obtain_info
(
server
,
inode
,
NULL
,
&
i
))
return
0
;
return
ncp_date_dos2unix
(
le16_to_cpu
(
i
.
modifyTime
),
...
...
@@ -498,7 +492,8 @@ static int ncp_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct
ncp_server
*
server
=
NCP_SERVER
(
inode
);
union
ncp_dir_cache
*
cache
=
NULL
;
struct
ncp_cache_control
ctl
;
int
result
;
int
result
,
mtime_valid
=
0
;
time_t
mtime
=
0
;
ctl
.
page
=
NULL
;
ctl
.
cache
=
NULL
;
...
...
@@ -535,12 +530,11 @@ static int ncp_readdir(struct file *filp, void *dirent, filldir_t filldir)
goto
init_cache
;
if
(
filp
->
f_pos
==
2
)
{
time_t
mtime
;
if
(
jiffies
-
ctl
.
head
.
time
>=
NCP_MAX_AGE
(
server
))
goto
init_cache
;
mtime
=
ncp_obtain_mtime
(
dentry
);
mtime_valid
=
1
;
if
((
!
mtime
)
||
(
mtime
!=
ctl
.
head
.
mtime
))
goto
init_cache
;
}
...
...
@@ -599,7 +593,11 @@ static int ncp_readdir(struct file *filp, void *dirent, filldir_t filldir)
ctl
.
cache
=
cache
;
init_cache:
ncp_invalidate_dircache_entries
(
dentry
);
ctl
.
head
.
mtime
=
ncp_obtain_mtime
(
dentry
);
if
(
!
mtime_valid
)
{
mtime
=
ncp_obtain_mtime
(
dentry
);
mtime_valid
=
1
;
}
ctl
.
head
.
mtime
=
mtime
;
ctl
.
head
.
time
=
jiffies
;
ctl
.
head
.
eof
=
0
;
ctl
.
fpos
=
2
;
...
...
fs/ncpfs/ncplib_kernel.c
View file @
ebec8ca6
...
...
@@ -387,7 +387,7 @@ ncp_ObtainSpecificDirBase(struct ncp_server *server,
ncp_add_byte
(
server
,
6
);
/* subfunction */
ncp_add_byte
(
server
,
nsSrc
);
ncp_add_byte
(
server
,
nsDst
);
ncp_add_word
(
server
,
0x8006
);
/* get all */
ncp_add_word
(
server
,
htons
(
0x0680
)
);
/* get all */
ncp_add_dword
(
server
,
RIM_ALL
);
ncp_add_handle_path
(
server
,
vol_num
,
dir_base
,
1
,
path
);
...
...
fs/open.c
View file @
ebec8ca6
...
...
@@ -707,7 +707,7 @@ int get_unused_fd(void)
/* Do we need to expand the fdset array? */
if
(
fd
>=
current
->
files
->
max_fdset
)
{
error
=
expand_fdset
(
files
,
0
);
error
=
expand_fdset
(
files
,
fd
);
if
(
!
error
)
{
error
=
-
EMFILE
;
goto
repeat
;
...
...
fs/proc/proc_misc.c
View file @
ebec8ca6
...
...
@@ -140,16 +140,16 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
* display in kilobytes.
*/
#define K(x) ((x) << (PAGE_SHIFT - 10))
#define B(x) ((x) << PAGE_SHIFT)
si_meminfo
(
&
i
);
si_swapinfo
(
&
i
);
len
=
sprintf
(
page
,
" total: used: free: shared: buffers: cached:
\n
"
"Mem: %8lu %8lu %8lu %8lu %8lu %8u
\n
"
"Swap: %8lu %8lu %8lu
\n
"
,
K
(
i
.
totalram
),
K
(
i
.
totalram
-
i
.
freeram
),
K
(
i
.
freeram
),
K
(
i
.
sharedram
),
K
(
i
.
bufferram
),
K
(
atomic_read
(
&
page_cache_size
)),
K
(
i
.
totalswap
),
K
(
i
.
totalswap
-
i
.
freeswap
),
K
(
i
.
freeswap
));
B
(
i
.
totalram
),
B
(
i
.
totalram
-
i
.
freeram
),
B
(
i
.
freeram
),
B
(
i
.
sharedram
),
B
(
i
.
bufferram
),
B
(
atomic_read
(
&
page_cache_size
)),
B
(
i
.
totalswap
),
B
(
i
.
totalswap
-
i
.
freeswap
),
B
(
i
.
freeswap
));
/*
* Tagged format, for easy grepping and expansion.
* The above will go away eventually, once the tools
...
...
@@ -181,7 +181,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
if
(
len
>
count
)
len
=
count
;
if
(
len
<
0
)
len
=
0
;
return
len
;
#undef B
#undef K
}
...
...
include/linux/acpi.h
View file @
ebec8ca6
...
...
@@ -53,6 +53,9 @@
#define ACPI_SLP_TYP2 0x1000
#define ACPI_SLP_EN 0x2000
#define ACPI_SLP_TYP_MASK 0x1c00
#define ACPI_SLP_TYP_SHIFT 10
/* PM_TMR masks */
#define ACPI_TMR_MASK 0x00ffffff
#define ACPI_TMR_HZ 3580000
/* 3.58 MHz */
...
...
@@ -82,6 +85,9 @@
#define ACPI_TMR_VAL_EXT 0x00000100
#define ACPI_DCK_CAP 0x00000200
/* FACS flags */
#define ACPI_S4BIOS 0x00000001
struct
acpi_rsdp
{
__u32
signature
[
2
];
__u8
checksum
;
...
...
@@ -145,6 +151,15 @@ struct acpi_facp {
__u32
flags
;
};
struct
acpi_facs
{
__u32
signature
;
__u32
length
;
__u32
hw_signature
;
__u32
fw_wake_vector
;
__u32
global_lock
;
__u32
flags
;
};
/*
* Sysctl declarations
*/
...
...
@@ -166,8 +181,12 @@ enum
ACPI_P_LVL3
,
ACPI_P_LVL2_LAT
,
ACPI_P_LVL3_LAT
,
ACPI_S5_SLP_TYP
};
#define ACPI_P_LVL_DISABLED 0x80
#define ACPI_SLP_TYP_DISABLED (~0UL)
/*
* PIIX4-specific ACPI info (for systems with PIIX4 but no ACPI tables)
*/
...
...
@@ -208,6 +227,7 @@ enum
#ifdef __KERNEL__
extern
void
(
*
acpi_idle
)(
void
);
extern
void
(
*
acpi_power_off
)(
void
);
#endif
...
...
include/linux/fb.h
View file @
ebec8ca6
...
...
@@ -83,6 +83,7 @@
#define FB_ACCEL_NV5 29
/* nVidia RIVA TNT2 */
#define FB_ACCEL_CT_6555x 30
/* C&T 6555x */
#define FB_ACCEL_3DFX_BANSHEE 31
/* 3Dfx Banshee */
#define FB_ACCEL_ATI_RAGE128 32
/* ATI Rage128 family */
struct
fb_fix_screeninfo
{
char
id
[
16
];
/* identification string eg "TT Builtin" */
...
...
kernel/exit.c
View file @
ebec8ca6
...
...
@@ -455,6 +455,7 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
add_wait_queue
(
&
current
->
wait_chldexit
,
&
wait
);
repeat:
flag
=
0
;
current
->
state
=
TASK_INTERRUPTIBLE
;
read_lock
(
&
tasklist_lock
);
for
(
p
=
current
->
p_cptr
;
p
;
p
=
p
->
p_osptr
)
{
if
(
pid
>
0
)
{
...
...
@@ -521,12 +522,12 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
retval
=
-
ERESTARTSYS
;
if
(
signal_pending
(
current
))
goto
end_wait4
;
current
->
state
=
TASK_INTERRUPTIBLE
;
schedule
();
goto
repeat
;
}
retval
=
-
ECHILD
;
end_wait4:
current
->
state
=
TASK_RUNNING
;
remove_wait_queue
(
&
current
->
wait_chldexit
,
&
wait
);
return
retval
;
}
...
...
mm/swapfile.c
View file @
ebec8ca6
...
...
@@ -243,7 +243,7 @@ static inline void unuse_pte(struct vm_area_struct * vma, unsigned long address,
return
;
set_pte
(
dir
,
pte_mkdirty
(
mk_pte
(
page
,
vma
->
vm_page_prot
)));
swap_free
(
entry
);
get_page
(
mem_map
+
MAP_NR
(
page
)
);
get_page
(
page
);
++
vma
->
vm_mm
->
rss
;
}
...
...
net/sunrpc/clnt.c
View file @
ebec8ca6
...
...
@@ -545,6 +545,7 @@ call_status(struct rpc_task *task)
if
(
status
>=
0
)
{
task
->
tk_action
=
call_decode
;
return
;
}
task
->
tk_status
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment