Skip to content

Commit b4e69ac

Browse files
committed
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2 parents 144ce87 + 7cc2edb commit b4e69ac

File tree

33 files changed

+384
-240
lines changed

33 files changed

+384
-240
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
What: /sys/devices/platform/at91_can/net/<iface>/mb0_id
2+
Date: January 2011
3+
KernelVersion: 2.6.38
4+
Contact: Marc Kleine-Budde <kernel@pengutronix.de>
5+
Description:
6+
Value representing the can_id of mailbox 0.
7+
8+
Default: 0x7ff (standard frame)
9+
10+
Due to a chip bug (errata 50.2.6.3 & 50.3.5.3 in
11+
"AT91SAM9263 Preliminary 6249H-ATARM-27-Jul-09") the
12+
contents of mailbox 0 may be send under certain
13+
conditions (even if disabled or in rx mode).
14+
15+
The workaround in the errata suggests not to use the
16+
mailbox and load it with an unused identifier.
17+
18+
In order to use an extended can_id add the
19+
CAN_EFF_FLAG (0x80000000U) to the can_id. Example:
20+
21+
- standard id 0x7ff:
22+
echo 0x7ff > /sys/class/net/can0/mb0_id
23+
24+
- extended id 0x1fffffff:
25+
echo 0x9fffffff > /sys/class/net/can0/mb0_id

Documentation/networking/bonding.txt

Lines changed: 71 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ Table of Contents
4949
3.3 Configuring Bonding Manually with Ifenslave
5050
3.3.1 Configuring Multiple Bonds Manually
5151
3.4 Configuring Bonding Manually via Sysfs
52-
3.5 Overriding Configuration for Special Cases
52+
3.5 Configuration with Interfaces Support
53+
3.6 Overriding Configuration for Special Cases
5354

5455
4. Querying Bonding Configuration
5556
4.1 Bonding Configuration
@@ -161,8 +162,8 @@ onwards) do not have /usr/include/linux symbolically linked to the
161162
default kernel source include directory.
162163

163164
SECOND IMPORTANT NOTE:
164-
If you plan to configure bonding using sysfs, you do not need
165-
to use ifenslave.
165+
If you plan to configure bonding using sysfs or using the
166+
/etc/network/interfaces file, you do not need to use ifenslave.
166167

167168
2. Bonding Driver Options
168169
=========================
@@ -779,22 +780,26 @@ resend_igmp
779780

780781
You can configure bonding using either your distro's network
781782
initialization scripts, or manually using either ifenslave or the
782-
sysfs interface. Distros generally use one of two packages for the
783-
network initialization scripts: initscripts or sysconfig. Recent
784-
versions of these packages have support for bonding, while older
783+
sysfs interface. Distros generally use one of three packages for the
784+
network initialization scripts: initscripts, sysconfig or interfaces.
785+
Recent versions of these packages have support for bonding, while older
785786
versions do not.
786787

787788
We will first describe the options for configuring bonding for
788-
distros using versions of initscripts and sysconfig with full or
789-
partial support for bonding, then provide information on enabling
789+
distros using versions of initscripts, sysconfig and interfaces with full
790+
or partial support for bonding, then provide information on enabling
790791
bonding without support from the network initialization scripts (i.e.,
791792
older versions of initscripts or sysconfig).
792793

793-
If you're unsure whether your distro uses sysconfig or
794-
initscripts, or don't know if it's new enough, have no fear.
794+
If you're unsure whether your distro uses sysconfig,
795+
initscripts or interfaces, or don't know if it's new enough, have no fear.
795796
Determining this is fairly straightforward.
796797

797-
First, issue the command:
798+
First, look for a file called interfaces in /etc/network directory.
799+
If this file is present in your system, then your system use interfaces. See
800+
Configuration with Interfaces Support.
801+
802+
Else, issue the command:
798803

799804
$ rpm -qf /sbin/ifup
800805

@@ -1327,8 +1332,62 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval
13271332
echo +eth2 > /sys/class/net/bond1/bonding/slaves
13281333
echo +eth3 > /sys/class/net/bond1/bonding/slaves
13291334

1330-
3.5 Overriding Configuration for Special Cases
1335+
3.5 Configuration with Interfaces Support
1336+
-----------------------------------------
1337+
1338+
This section applies to distros which use /etc/network/interfaces file
1339+
to describe network interface configuration, most notably Debian and it's
1340+
derivatives.
1341+
1342+
The ifup and ifdown commands on Debian don't support bonding out of
1343+
the box. The ifenslave-2.6 package should be installed to provide bonding
1344+
support. Once installed, this package will provide bond-* options to be used
1345+
into /etc/network/interfaces.
1346+
1347+
Note that ifenslave-2.6 package will load the bonding module and use
1348+
the ifenslave command when appropriate.
1349+
1350+
Example Configurations
1351+
----------------------
1352+
1353+
In /etc/network/interfaces, the following stanza will configure bond0, in
1354+
active-backup mode, with eth0 and eth1 as slaves.
1355+
1356+
auto bond0
1357+
iface bond0 inet dhcp
1358+
bond-slaves eth0 eth1
1359+
bond-mode active-backup
1360+
bond-miimon 100
1361+
bond-primary eth0 eth1
1362+
1363+
If the above configuration doesn't work, you might have a system using
1364+
upstart for system startup. This is most notably true for recent
1365+
Ubuntu versions. The following stanza in /etc/network/interfaces will
1366+
produce the same result on those systems.
1367+
1368+
auto bond0
1369+
iface bond0 inet dhcp
1370+
bond-slaves none
1371+
bond-mode active-backup
1372+
bond-miimon 100
1373+
1374+
auto eth0
1375+
iface eth0 inet manual
1376+
bond-master bond0
1377+
bond-primary eth0 eth1
1378+
1379+
auto eth1
1380+
iface eth1 inet manual
1381+
bond-master bond0
1382+
bond-primary eth0 eth1
1383+
1384+
For a full list of bond-* supported options in /etc/network/interfaces and some
1385+
more advanced examples tailored to you particular distros, see the files in
1386+
/usr/share/doc/ifenslave-2.6.
1387+
1388+
3.6 Overriding Configuration for Special Cases
13311389
----------------------------------------------
1390+
13321391
When using the bonding driver, the physical port which transmits a frame is
13331392
typically selected by the bonding driver, and is not relevant to the user or
13341393
system administrator. The output port is simply selected using the policies of

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3327,7 +3327,6 @@ F: drivers/net/wimax/i2400m/
33273327
F: include/linux/wimax/i2400m.h
33283328

33293329
INTEL WIRELESS WIFI LINK (iwlwifi)
3330-
M: Reinette Chatre <reinette.chatre@intel.com>
33313330
M: Wey-Yi Guy <wey-yi.w.guy@intel.com>
33323331
M: Intel Linux Wireless <ilw@linux.intel.com>
33333332
L: linux-wireless@vger.kernel.org

drivers/bluetooth/ath3k.c

Lines changed: 20 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -47,46 +47,40 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
4747
#define USB_REQ_DFU_DNLOAD 1
4848
#define BULK_SIZE 4096
4949

50-
struct ath3k_data {
51-
struct usb_device *udev;
52-
u8 *fw_data;
53-
u32 fw_size;
54-
u32 fw_sent;
55-
};
56-
57-
static int ath3k_load_firmware(struct ath3k_data *data,
58-
unsigned char *firmware,
59-
int count)
50+
static int ath3k_load_firmware(struct usb_device *udev,
51+
const struct firmware *firmware)
6052
{
6153
u8 *send_buf;
6254
int err, pipe, len, size, sent = 0;
55+
int count = firmware->size;
6356

64-
BT_DBG("ath3k %p udev %p", data, data->udev);
57+
BT_DBG("udev %p", udev);
6558

66-
pipe = usb_sndctrlpipe(data->udev, 0);
59+
pipe = usb_sndctrlpipe(udev, 0);
6760

68-
if ((usb_control_msg(data->udev, pipe,
61+
send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
62+
if (!send_buf) {
63+
BT_ERR("Can't allocate memory chunk for firmware");
64+
return -ENOMEM;
65+
}
66+
67+
memcpy(send_buf, firmware->data, 20);
68+
if ((err = usb_control_msg(udev, pipe,
6969
USB_REQ_DFU_DNLOAD,
7070
USB_TYPE_VENDOR, 0, 0,
71-
firmware, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
71+
send_buf, 20, USB_CTRL_SET_TIMEOUT)) < 0) {
7272
BT_ERR("Can't change to loading configuration err");
73-
return -EBUSY;
73+
goto error;
7474
}
7575
sent += 20;
7676
count -= 20;
7777

78-
send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
79-
if (!send_buf) {
80-
BT_ERR("Can't allocate memory chunk for firmware");
81-
return -ENOMEM;
82-
}
83-
8478
while (count) {
8579
size = min_t(uint, count, BULK_SIZE);
86-
pipe = usb_sndbulkpipe(data->udev, 0x02);
87-
memcpy(send_buf, firmware + sent, size);
80+
pipe = usb_sndbulkpipe(udev, 0x02);
81+
memcpy(send_buf, firmware->data + sent, size);
8882

89-
err = usb_bulk_msg(data->udev, pipe, send_buf, size,
83+
err = usb_bulk_msg(udev, pipe, send_buf, size,
9084
&len, 3000);
9185

9286
if (err || (len != size)) {
@@ -112,57 +106,28 @@ static int ath3k_probe(struct usb_interface *intf,
112106
{
113107
const struct firmware *firmware;
114108
struct usb_device *udev = interface_to_usbdev(intf);
115-
struct ath3k_data *data;
116-
int size;
117109

118110
BT_DBG("intf %p id %p", intf, id);
119111

120112
if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
121113
return -ENODEV;
122114

123-
data = kzalloc(sizeof(*data), GFP_KERNEL);
124-
if (!data)
125-
return -ENOMEM;
126-
127-
data->udev = udev;
128-
129115
if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
130-
kfree(data);
131116
return -EIO;
132117
}
133118

134-
size = max_t(uint, firmware->size, 4096);
135-
data->fw_data = kmalloc(size, GFP_KERNEL);
136-
if (!data->fw_data) {
119+
if (ath3k_load_firmware(udev, firmware)) {
137120
release_firmware(firmware);
138-
kfree(data);
139-
return -ENOMEM;
140-
}
141-
142-
memcpy(data->fw_data, firmware->data, firmware->size);
143-
data->fw_size = firmware->size;
144-
data->fw_sent = 0;
145-
release_firmware(firmware);
146-
147-
usb_set_intfdata(intf, data);
148-
if (ath3k_load_firmware(data, data->fw_data, data->fw_size)) {
149-
usb_set_intfdata(intf, NULL);
150-
kfree(data->fw_data);
151-
kfree(data);
152121
return -EIO;
153122
}
123+
release_firmware(firmware);
154124

155125
return 0;
156126
}
157127

158128
static void ath3k_disconnect(struct usb_interface *intf)
159129
{
160-
struct ath3k_data *data = usb_get_intfdata(intf);
161-
162130
BT_DBG("ath3k_disconnect intf %p", intf);
163-
164-
kfree(data->fw_data);
165-
kfree(data);
166131
}
167132

168133
static struct usb_driver ath3k_driver = {

drivers/net/bnx2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7553,6 +7553,10 @@ bnx2_set_flags(struct net_device *dev, u32 data)
75537553
!(data & ETH_FLAG_RXVLAN))
75547554
return -EINVAL;
75557555

7556+
/* TSO with VLAN tag won't work with current firmware */
7557+
if (!(data & ETH_FLAG_TXVLAN))
7558+
return -EINVAL;
7559+
75567560
rc = ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH | ETH_FLAG_RXVLAN |
75577561
ETH_FLAG_TXVLAN);
75587562
if (rc)

0 commit comments

Comments
 (0)