- 10 Jun, 2003 2 commits
-
-
Patrick Mochel authored
-
Patrick Mochel authored
-
- 09 Jun, 2003 5 commits
-
-
Patrick Mochel authored
-
Patrick Mochel authored
- Suspend system devices last, after interrupts have been enabled. - Resume them first, before interrupts are enabled. - Shut them down last, after everything else.
-
Patrick Mochel authored
Shorthand macro for initializing only the name of an embedded kset in an object.
-
Patrick Mochel authored
-
Patrick Mochel authored
System devices are special, and after two years of listening to Linus preach this, it finally sunk in enough to do something about. We don't need to regard them as real devices that reside on a peripheral bus and can be dynamically bound to drivers. If we discover, e.g. a CPU, we know by default that we have a driver for it, and we know damn well that we have a CPU. We still need to keep track of all the devices, and all the devices of a particular type. The kobject infrastructure allows us to do this, without the overhead of the regular model. A new subsystem is defined that registers as a child object of devices_subsys, giving us: /sys/devices/system/ struct sysdev_class { struct list_head drivers; /* Default operations for these types of devices */ int (*shutdown)(struct sys_device *); int (*suspend)(struct sys_device *, u32 state); int (*resume)(struct sys_device *); struct kset kset; }; Defines a type of system device. These are registered on startup, by e.g. drivers/base/cpu.c. The methods are default operations for devices of that type that may or may not be used. For things like the i8259 controller, these will be filled in, since it is registered by the same component that the device controls reside in. For things like CPUs, generic code will register the class, but other architecture-specific or otherwise configurable drivers may register auxillary drivers, that look like: struct sysdev_driver { struct list_head entry; int (*add)(struct sys_device *); int (*remove)(struct sys_device *); int (*shutdown)(struct sys_device *); int (*suspend)(struct sys_device *, u32 state); int (*resume)(struct sys_device *); }; Each auxillary driver gets called during each operation on a device of a particular class. Auxillary drivers may register with a NULL class parameter, in which case they will be added to a list of 'global drivers' that get called for each device of each class. Besides providing a decent of cleanup for system device drivers, this also allows: - Special handling of system devices during power transitions. We no longer have to worry about shutting down the PIC before we shut down any devices. We can shut down the system devices after we've shut down every other device. Ditto for suspend/resume cycles. Almost (if not) all PM actions for system devices happen with interrupts off, and require only one call, which makes that easier. But, we can also make sure we take care of these last during suspend and first during resume. - Easy expression of configurable device-specific interfaces. Namely cpufreq and mtrr. We don't have to worry about mispresentation in the driver model (like recent MTRR patches) or using a cumbersome interface ({device,class}_interface) that don't receive all the necessary calls. - Consolidation of userspace representation. No longer do we have /sys/devices/sys, /sys/bus/sys, and /sys/class/cpu, etc. We have only /sys/devices/system: # tree /sys/devices/system/ /sys/devices/system/ |-- cpu | `-- cpu0 |-- i8259 | `-- i82590 |-- lapic | `-- lapic0 |-- rtc | `-- rtc0 `-- timer `-- timer0 Each directory in 'system' is the class, and each directory under that is the instance of each device in that class.
-
- 05 Jun, 2003 33 commits
-
-
Jeff Garzik authored
into redhat.com:/garz/repo/net-drivers-2.5
-
Hideaki Yoshifuji authored
-
Scott Feldman authored
dev_ioctl already checks capable(CAP_NET_ADMIN) for SOICETHTOOL, so privileged reference are not necessary.
-
Scott Feldman authored
Add 10GbE support for ethtool.
-
Zwane Mwaikambo authored
This one should be safe as we're protected by the xmit_lock in all instances
-
Jeff Garzik authored
-
Simon Kelley authored
Attached is a driver for Atmel at76c50x WiFi cards. This code started out as a GPL release from Atmel of pretty horrible quality and I've extensively re-worked it with the aim of making it acceptable in the kernel. Please could you take a look and either pass it into the patch stream or let me know what's wrong with it? The code has been tested on at least three different brand cards by different people. Jean Tourrilhes took a look at an earlier version an was positive. He's put incorporating this into 2.6 as a priority 1. The patch works fine on 2.5.70. The firmware issue has been addressed now. The only firmware in the driver is a small stub which reads the MAC address from NVRAM on the card. The source for that is included so there are no GPL issues. The main firmware is loaded from userspace using Manuel Estrada Sainz's sysfs firmware class. I know that the patch for that has been accepted but it hasn't turned up anywhere I can see yet. The driver compiles fine even without the firmware class. I've made a package of the firmware images which is available from my website. The remaining issues with the driver are migrating PCMCIA to the new driver model and PCI support. I'm happy to produce followup patches as the PCMCIA system gets evolved to the new driver model: the timing on that is controlled by others. This set of chips includes a PCI version and the driver should support that, but AFAIK there is no PCI hardware available anywhere. If Atmel can provide me with some it will be simple to add PCI support. The driver uses the CRC32 library module and the firmware loader. I've not put in dependencies on those, but when the lastest set of patches go into Kconfig I'll set it up so that selecting the Atmel driver selects CRC32 and FW_LOADER too.
-
Stephen Hemminger authored
Inspecting the sb1000 driver showed some interesting bugs: - net device pointer is used before the device is allocated; gcc does catch this. - unregister is called even though device not registered successfully - net device is not freed on remove. Compiles but don't have hardware to test. Don't know how it ever worked though.
-
Hollis Blanchard authored
Two ioctl functions in sound/oss/awe_wave.c were directly dereferencing a user-supplied pointer in a few places.
-
Linus Torvalds authored
Jörn missed a few places of FAR conversion in inflate
-
Jörn Engel authored
Remove the stale support for K&R function declarations through the OF() macro. This is the last patch to clean up zconf.h, at least for now.
-
Jörn Engel authored
This nice macro must have been one of the good intentions on the road to hell. Completely unused. :)
-
Jörn Engel authored
Just a simple s/ZEXPORT//.
-
Jörn Engel authored
This one was just simple s/ZEXTERN/extern/g.
-
Jörn Engel authored
Remove unused __32BIT__ and STDC macros
-
Jörn Engel authored
This removes FAR, the typedefs using FAR (Bytef and friends) and the function prototypes for zalloc and zfree that should have gone earlier already.
-
bk://kernel.bkbits.net/gregkh/linux/tty-2.5Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
bk://ldm.bkbits.net/linux-2.5-coreLinus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
Greg Kroah-Hartman authored
-
Patrick Mochel authored
What happens when you get a patch that does something an applied patch already does, but a little better, and merge it sloppily: You end up calling the wrong function because you've defined equivalent methods in two places. Bad Pat, Bad.
-
bk://kernel.bkbits.net/gregkh/linux/i2c-2.5Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
bk://kernel.bkbits.net/gregkh/linux/pci-2.5Linus Torvalds authored
into home.transmeta.com:/home/torvalds/v2.5/linux
-
Patrick Mochel authored
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-core
-
Greg Kroah-Hartman authored
This fixes a race with looking at files in /sys/class/tty/ and removing a tty device.
-
Patrick Mochel authored
-
Greg Kroah-Hartman authored
into kroah.com:/home/greg/linux/BK/pci-2.5
-
Greg Kroah-Hartman authored
into kroah.com:/home/greg/linux/BK/gregkh-2.5
-
Greg Kroah-Hartman authored
into kroah.com:/home/greg/linux/BK/tty-2.5
-
Patrick Mochel authored
From Mike Anderson: I have been using it on an outstanding patch for scsi_set_host_offline. It appears to work fine in my testing.
-
Greg Kroah-Hartman authored
into kroah.com:/home/greg/linux/BK/i2c-2.5
-
Kurt Robideau authored
Update the Rocketport driver
-
Greg Kroah-Hartman authored
-
Stephen Hemminger authored
There is a typo in the current 2.5.70 bk version of class_device_release that was not there in my original patch. By confusing the class and the class_device, the release function oops. cd->release is always the function itself (class_device_release), cls->release is the one setup for the class (net_class in my case).
-