diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-07 02:53:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-07 02:53:30 -0400 |
commit | 4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch) | |
tree | 9b75f5d5636004d9a9aa496924377379be09aa1f /Documentation | |
parent | b4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff) | |
parent | fb9e2d887243499b8d28efcf80821c4f6a092395 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bonding/bond_main.c
drivers/net/via-velocity.c
drivers/net/wireless/iwlwifi/iwl-agn.c
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-usb | 2 | ||||
-rw-r--r-- | Documentation/filesystems/ceph.txt | 139 | ||||
-rw-r--r-- | Documentation/ioctl/ioctl-number.txt | 1 | ||||
-rw-r--r-- | Documentation/kobject.txt | 60 | ||||
-rw-r--r-- | Documentation/networking/stmmac.txt | 143 |
5 files changed, 324 insertions, 21 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index a986e9bbba3d..bcebb9eaedce 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -160,7 +160,7 @@ Description: | |||
160 | match the driver to the device. For example: | 160 | match the driver to the device. For example: |
161 | # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id | 161 | # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id |
162 | 162 | ||
163 | What: /sys/bus/usb/device/.../avoid_reset | 163 | What: /sys/bus/usb/device/.../avoid_reset_quirk |
164 | Date: December 2009 | 164 | Date: December 2009 |
165 | Contact: Oliver Neukum <oliver@neukum.org> | 165 | Contact: Oliver Neukum <oliver@neukum.org> |
166 | Description: | 166 | Description: |
diff --git a/Documentation/filesystems/ceph.txt b/Documentation/filesystems/ceph.txt new file mode 100644 index 000000000000..6e03917316bd --- /dev/null +++ b/Documentation/filesystems/ceph.txt | |||
@@ -0,0 +1,139 @@ | |||
1 | Ceph Distributed File System | ||
2 | ============================ | ||
3 | |||
4 | Ceph is a distributed network file system designed to provide good | ||
5 | performance, reliability, and scalability. | ||
6 | |||
7 | Basic features include: | ||
8 | |||
9 | * POSIX semantics | ||
10 | * Seamless scaling from 1 to many thousands of nodes | ||
11 | * High availability and reliability. No single points of failure. | ||
12 | * N-way replication of data across storage nodes | ||
13 | * Fast recovery from node failures | ||
14 | * Automatic rebalancing of data on node addition/removal | ||
15 | * Easy deployment: most FS components are userspace daemons | ||
16 | |||
17 | Also, | ||
18 | * Flexible snapshots (on any directory) | ||
19 | * Recursive accounting (nested files, directories, bytes) | ||
20 | |||
21 | In contrast to cluster filesystems like GFS, OCFS2, and GPFS that rely | ||
22 | on symmetric access by all clients to shared block devices, Ceph | ||
23 | separates data and metadata management into independent server | ||
24 | clusters, similar to Lustre. Unlike Lustre, however, metadata and | ||
25 | storage nodes run entirely as user space daemons. Storage nodes | ||
26 | utilize btrfs to store data objects, leveraging its advanced features | ||
27 | (checksumming, metadata replication, etc.). File data is striped | ||
28 | across storage nodes in large chunks to distribute workload and | ||
29 | facilitate high throughputs. When storage nodes fail, data is | ||
30 | re-replicated in a distributed fashion by the storage nodes themselves | ||
31 | (with some minimal coordination from a cluster monitor), making the | ||
32 | system extremely efficient and scalable. | ||
33 | |||
34 | Metadata servers effectively form a large, consistent, distributed | ||
35 | in-memory cache above the file namespace that is extremely scalable, | ||
36 | dynamically redistributes metadata in response to workload changes, | ||
37 | and can tolerate arbitrary (well, non-Byzantine) node failures. The | ||
38 | metadata server takes a somewhat unconventional approach to metadata | ||
39 | storage to significantly improve performance for common workloads. In | ||
40 | particular, inodes with only a single link are embedded in | ||
41 | directories, allowing entire directories of dentries and inodes to be | ||
42 | loaded into its cache with a single I/O operation. The contents of | ||
43 | extremely large directories can be fragmented and managed by | ||
44 | independent metadata servers, allowing scalable concurrent access. | ||
45 | |||
46 | The system offers automatic data rebalancing/migration when scaling | ||
47 | from a small cluster of just a few nodes to many hundreds, without | ||
48 | requiring an administrator carve the data set into static volumes or | ||
49 | go through the tedious process of migrating data between servers. | ||
50 | When the file system approaches full, new nodes can be easily added | ||
51 | and things will "just work." | ||
52 | |||
53 | Ceph includes flexible snapshot mechanism that allows a user to create | ||
54 | a snapshot on any subdirectory (and its nested contents) in the | ||
55 | system. Snapshot creation and deletion are as simple as 'mkdir | ||
56 | .snap/foo' and 'rmdir .snap/foo'. | ||
57 | |||
58 | Ceph also provides some recursive accounting on directories for nested | ||
59 | files and bytes. That is, a 'getfattr -d foo' on any directory in the | ||
60 | system will reveal the total number of nested regular files and | ||
61 | subdirectories, and a summation of all nested file sizes. This makes | ||
62 | the identification of large disk space consumers relatively quick, as | ||
63 | no 'du' or similar recursive scan of the file system is required. | ||
64 | |||
65 | |||
66 | Mount Syntax | ||
67 | ============ | ||
68 | |||
69 | The basic mount syntax is: | ||
70 | |||
71 | # mount -t ceph monip[:port][,monip2[:port]...]:/[subdir] mnt | ||
72 | |||
73 | You only need to specify a single monitor, as the client will get the | ||
74 | full list when it connects. (However, if the monitor you specify | ||
75 | happens to be down, the mount won't succeed.) The port can be left | ||
76 | off if the monitor is using the default. So if the monitor is at | ||
77 | 1.2.3.4, | ||
78 | |||
79 | # mount -t ceph 1.2.3.4:/ /mnt/ceph | ||
80 | |||
81 | is sufficient. If /sbin/mount.ceph is installed, a hostname can be | ||
82 | used instead of an IP address. | ||
83 | |||
84 | |||
85 | |||
86 | Mount Options | ||
87 | ============= | ||
88 | |||
89 | ip=A.B.C.D[:N] | ||
90 | Specify the IP and/or port the client should bind to locally. | ||
91 | There is normally not much reason to do this. If the IP is not | ||
92 | specified, the client's IP address is determined by looking at the | ||
93 | address it's connection to the monitor originates from. | ||
94 | |||
95 | wsize=X | ||
96 | Specify the maximum write size in bytes. By default there is no | ||
97 | maximu. Ceph will normally size writes based on the file stripe | ||
98 | size. | ||
99 | |||
100 | rsize=X | ||
101 | Specify the maximum readahead. | ||
102 | |||
103 | mount_timeout=X | ||
104 | Specify the timeout value for mount (in seconds), in the case | ||
105 | of a non-responsive Ceph file system. The default is 30 | ||
106 | seconds. | ||
107 | |||
108 | rbytes | ||
109 | When stat() is called on a directory, set st_size to 'rbytes', | ||
110 | the summation of file sizes over all files nested beneath that | ||
111 | directory. This is the default. | ||
112 | |||
113 | norbytes | ||
114 | When stat() is called on a directory, set st_size to the | ||
115 | number of entries in that directory. | ||
116 | |||
117 | nocrc | ||
118 | Disable CRC32C calculation for data writes. If set, the OSD | ||
119 | must rely on TCP's error correction to detect data corruption | ||
120 | in the data payload. | ||
121 | |||
122 | noasyncreaddir | ||
123 | Disable client's use its local cache to satisfy readdir | ||
124 | requests. (This does not change correctness; the client uses | ||
125 | cached metadata only when a lease or capability ensures it is | ||
126 | valid.) | ||
127 | |||
128 | |||
129 | More Information | ||
130 | ================ | ||
131 | |||
132 | For more information on Ceph, see the home page at | ||
133 | http://ceph.newdream.net/ | ||
134 | |||
135 | The Linux kernel client source tree is available at | ||
136 | git://ceph.newdream.net/linux-ceph-client.git | ||
137 | |||
138 | and the source for the full system is at | ||
139 | git://ceph.newdream.net/ceph.git | ||
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 35c9b51d20ea..dd5806f4fcc4 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -291,6 +291,7 @@ Code Seq#(hex) Include File Comments | |||
291 | 0x92 00-0F drivers/usb/mon/mon_bin.c | 291 | 0x92 00-0F drivers/usb/mon/mon_bin.c |
292 | 0x93 60-7F linux/auto_fs.h | 292 | 0x93 60-7F linux/auto_fs.h |
293 | 0x94 all fs/btrfs/ioctl.h | 293 | 0x94 all fs/btrfs/ioctl.h |
294 | 0x97 00-7F fs/ceph/ioctl.h Ceph file system | ||
294 | 0x99 00-0F 537-Addinboard driver | 295 | 0x99 00-0F 537-Addinboard driver |
295 | <mailto:buk@buks.ipn.de> | 296 | <mailto:buk@buks.ipn.de> |
296 | 0xA0 all linux/sdp/sdp.h Industrial Device Project | 297 | 0xA0 all linux/sdp/sdp.h Industrial Device Project |
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt index bdb13817e1e9..3ab2472509cb 100644 --- a/Documentation/kobject.txt +++ b/Documentation/kobject.txt | |||
@@ -59,37 +59,56 @@ nice to have in other objects. The C language does not allow for the | |||
59 | direct expression of inheritance, so other techniques - such as structure | 59 | direct expression of inheritance, so other techniques - such as structure |
60 | embedding - must be used. | 60 | embedding - must be used. |
61 | 61 | ||
62 | So, for example, the UIO code has a structure that defines the memory | 62 | (As an aside, for those familiar with the kernel linked list implementation, |
63 | region associated with a uio device: | 63 | this is analogous as to how "list_head" structs are rarely useful on |
64 | their own, but are invariably found embedded in the larger objects of | ||
65 | interest.) | ||
64 | 66 | ||
65 | struct uio_mem { | 67 | So, for example, the UIO code in drivers/uio/uio.c has a structure that |
68 | defines the memory region associated with a uio device: | ||
69 | |||
70 | struct uio_map { | ||
66 | struct kobject kobj; | 71 | struct kobject kobj; |
67 | unsigned long addr; | 72 | struct uio_mem *mem; |
68 | unsigned long size; | 73 | }; |
69 | int memtype; | ||
70 | void __iomem *internal_addr; | ||
71 | }; | ||
72 | 74 | ||
73 | If you have a struct uio_mem structure, finding its embedded kobject is | 75 | If you have a struct uio_map structure, finding its embedded kobject is |
74 | just a matter of using the kobj member. Code that works with kobjects will | 76 | just a matter of using the kobj member. Code that works with kobjects will |
75 | often have the opposite problem, however: given a struct kobject pointer, | 77 | often have the opposite problem, however: given a struct kobject pointer, |
76 | what is the pointer to the containing structure? You must avoid tricks | 78 | what is the pointer to the containing structure? You must avoid tricks |
77 | (such as assuming that the kobject is at the beginning of the structure) | 79 | (such as assuming that the kobject is at the beginning of the structure) |
78 | and, instead, use the container_of() macro, found in <linux/kernel.h>: | 80 | and, instead, use the container_of() macro, found in <linux/kernel.h>: |
79 | 81 | ||
80 | container_of(pointer, type, member) | 82 | container_of(pointer, type, member) |
83 | |||
84 | where: | ||
85 | |||
86 | * "pointer" is the pointer to the embedded kobject, | ||
87 | * "type" is the type of the containing structure, and | ||
88 | * "member" is the name of the structure field to which "pointer" points. | ||
89 | |||
90 | The return value from container_of() is a pointer to the corresponding | ||
91 | container type. So, for example, a pointer "kp" to a struct kobject | ||
92 | embedded *within* a struct uio_map could be converted to a pointer to the | ||
93 | *containing* uio_map structure with: | ||
94 | |||
95 | struct uio_map *u_map = container_of(kp, struct uio_map, kobj); | ||
96 | |||
97 | For convenience, programmers often define a simple macro for "back-casting" | ||
98 | kobject pointers to the containing type. Exactly this happens in the | ||
99 | earlier drivers/uio/uio.c, as you can see here: | ||
100 | |||
101 | struct uio_map { | ||
102 | struct kobject kobj; | ||
103 | struct uio_mem *mem; | ||
104 | }; | ||
81 | 105 | ||
82 | where pointer is the pointer to the embedded kobject, type is the type of | 106 | #define to_map(map) container_of(map, struct uio_map, kobj) |
83 | the containing structure, and member is the name of the structure field to | ||
84 | which pointer points. The return value from container_of() is a pointer to | ||
85 | the given type. So, for example, a pointer "kp" to a struct kobject | ||
86 | embedded within a struct uio_mem could be converted to a pointer to the | ||
87 | containing uio_mem structure with: | ||
88 | 107 | ||
89 | struct uio_mem *u_mem = container_of(kp, struct uio_mem, kobj); | 108 | where the macro argument "map" is a pointer to the struct kobject in |
109 | question. That macro is subsequently invoked with: | ||
90 | 110 | ||
91 | Programmers often define a simple macro for "back-casting" kobject pointers | 111 | struct uio_map *map = to_map(kobj); |
92 | to the containing type. | ||
93 | 112 | ||
94 | 113 | ||
95 | Initialization of kobjects | 114 | Initialization of kobjects |
@@ -387,4 +406,5 @@ called, and the objects in the former circle release each other. | |||
387 | Example code to copy from | 406 | Example code to copy from |
388 | 407 | ||
389 | For a more complete example of using ksets and kobjects properly, see the | 408 | For a more complete example of using ksets and kobjects properly, see the |
390 | sample/kobject/kset-example.c code. | 409 | example programs samples/kobject/{kobject-example.c,kset-example.c}, |
410 | which will be built as loadable modules if you select CONFIG_SAMPLE_KOBJECT. | ||
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt new file mode 100644 index 000000000000..7ee770b5ef5f --- /dev/null +++ b/Documentation/networking/stmmac.txt | |||
@@ -0,0 +1,143 @@ | |||
1 | STMicroelectronics 10/100/1000 Synopsys Ethernet driver | ||
2 | |||
3 | Copyright (C) 2007-2010 STMicroelectronics Ltd | ||
4 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
5 | |||
6 | This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers | ||
7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. | ||
8 | |||
9 | Currently this network device driver is for all STM embedded MAC/GMAC | ||
10 | (7xxx SoCs). | ||
11 | |||
12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 | ||
13 | Universal version 4.0 have been used for developing the first code | ||
14 | implementation. | ||
15 | |||
16 | Please, for more information also visit: www.stlinux.com | ||
17 | |||
18 | 1) Kernel Configuration | ||
19 | The kernel configuration option is STMMAC_ETH: | ||
20 | Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) ---> | ||
21 | STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH) | ||
22 | |||
23 | 2) Driver parameters list: | ||
24 | debug: message level (0: no output, 16: all); | ||
25 | phyaddr: to manually provide the physical address to the PHY device; | ||
26 | dma_rxsize: DMA rx ring size; | ||
27 | dma_txsize: DMA tx ring size; | ||
28 | buf_sz: DMA buffer size; | ||
29 | tc: control the HW FIFO threshold; | ||
30 | tx_coe: Enable/Disable Tx Checksum Offload engine; | ||
31 | watchdog: transmit timeout (in milliseconds); | ||
32 | flow_ctrl: Flow control ability [on/off]; | ||
33 | pause: Flow Control Pause Time; | ||
34 | tmrate: timer period (only if timer optimisation is configured). | ||
35 | |||
36 | 3) Command line options | ||
37 | Driver parameters can be also passed in command line by using: | ||
38 | stmmaceth=dma_rxsize:128,dma_txsize:512 | ||
39 | |||
40 | 4) Driver information and notes | ||
41 | |||
42 | 4.1) Transmit process | ||
43 | The xmit method is invoked when the kernel needs to transmit a packet; it sets | ||
44 | the descriptors in the ring and informs the DMA engine that there is a packet | ||
45 | ready to be transmitted. | ||
46 | Once the controller has finished transmitting the packet, an interrupt is | ||
47 | triggered; So the driver will be able to release the socket buffers. | ||
48 | By default, the driver sets the NETIF_F_SG bit in the features field of the | ||
49 | net_device structure enabling the scatter/gather feature. | ||
50 | |||
51 | 4.2) Receive process | ||
52 | When one or more packets are received, an interrupt happens. The interrupts | ||
53 | are not queued so the driver has to scan all the descriptors in the ring during | ||
54 | the receive process. | ||
55 | This is based on NAPI so the interrupt handler signals only if there is work to be | ||
56 | done, and it exits. | ||
57 | Then the poll method will be scheduled at some future point. | ||
58 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket | ||
59 | buffers in order to avoid the memcpy (Zero-copy). | ||
60 | |||
61 | 4.3) Timer-Driver Interrupt | ||
62 | Instead of having the device that asynchronously notifies the frame receptions, the | ||
63 | driver configures a timer to generate an interrupt at regular intervals. | ||
64 | Based on the granularity of the timer, the frames that are received by the device | ||
65 | will experience different levels of latency. Some NICs have dedicated timer | ||
66 | device to perform this task. STMMAC can use either the RTC device or the TMU | ||
67 | channel 2 on STLinux platforms. | ||
68 | The timers frequency can be passed to the driver as parameter; when change it, | ||
69 | take care of both hardware capability and network stability/performance impact. | ||
70 | Several performance tests on STM platforms showed this optimisation allows to spare | ||
71 | the CPU while having the maximum throughput. | ||
72 | |||
73 | 4.4) WOL | ||
74 | Wake up on Lan feature through Magic Frame is only supported for the GMAC | ||
75 | core. | ||
76 | |||
77 | 4.5) DMA descriptors | ||
78 | Driver handles both normal and enhanced descriptors. The latter has been only | ||
79 | tested on DWC Ether MAC 10/100/1000 Universal version 3.41a. | ||
80 | |||
81 | 4.6) Ethtool support | ||
82 | Ethtool is supported. Driver statistics and internal errors can be taken using: | ||
83 | ethtool -S ethX command. It is possible to dump registers etc. | ||
84 | |||
85 | 4.7) Jumbo and Segmentation Offloading | ||
86 | Jumbo frames are supported and tested for the GMAC. | ||
87 | The GSO has been also added but it's performed in software. | ||
88 | LRO is not supported. | ||
89 | |||
90 | 4.8) Physical | ||
91 | The driver is compatible with PAL to work with PHY and GPHY devices. | ||
92 | |||
93 | 4.9) Platform information | ||
94 | Several information came from the platform; please refer to the | ||
95 | driver's Header file in include/linux directory. | ||
96 | |||
97 | struct plat_stmmacenet_data { | ||
98 | int bus_id; | ||
99 | int pbl; | ||
100 | int has_gmac; | ||
101 | void (*fix_mac_speed)(void *priv, unsigned int speed); | ||
102 | void (*bus_setup)(unsigned long ioaddr); | ||
103 | #ifdef CONFIG_STM_DRIVERS | ||
104 | struct stm_pad_config *pad_config; | ||
105 | #endif | ||
106 | void *bsp_priv; | ||
107 | }; | ||
108 | |||
109 | Where: | ||
110 | - pbl (Programmable Burst Length) is maximum number of | ||
111 | beats to be transferred in one DMA transaction. | ||
112 | GMAC also enables the 4xPBL by default. | ||
113 | - fix_mac_speed and bus_setup are used to configure internal target | ||
114 | registers (on STM platforms); | ||
115 | - has_gmac: GMAC core is on board (get it at run-time in the next step); | ||
116 | - bus_id: bus identifier. | ||
117 | |||
118 | struct plat_stmmacphy_data { | ||
119 | int bus_id; | ||
120 | int phy_addr; | ||
121 | unsigned int phy_mask; | ||
122 | int interface; | ||
123 | int (*phy_reset)(void *priv); | ||
124 | void *priv; | ||
125 | }; | ||
126 | |||
127 | Where: | ||
128 | - bus_id: bus identifier; | ||
129 | - phy_addr: physical address used for the attached phy device; | ||
130 | set it to -1 to get it at run-time; | ||
131 | - interface: physical MII interface mode; | ||
132 | - phy_reset: hook to reset HW function. | ||
133 | |||
134 | TODO: | ||
135 | - Continue to make the driver more generic and suitable for other Synopsys | ||
136 | Ethernet controllers used on other architectures (i.e. ARM). | ||
137 | - 10G controllers are not supported. | ||
138 | - MAC uses Normal descriptors and GMAC uses enhanced ones. | ||
139 | This is a limit that should be reviewed. MAC could want to | ||
140 | use the enhanced structure. | ||
141 | - Checksumming: Rx/Tx csum is done in HW in case of GMAC only. | ||
142 | - Review the timer optimisation code to use an embedded device that seems to be | ||
143 | available in new chip generations. | ||