Merge branch 'for-next' into for-linus
This commit is contained in:
Коммит
9ddd84f872
|
@ -468,8 +468,6 @@
|
|||
return err;
|
||||
}
|
||||
|
||||
snd_card_set_dev(card, &pci->dev);
|
||||
|
||||
*rchip = chip;
|
||||
return 0;
|
||||
}
|
||||
|
@ -492,7 +490,8 @@
|
|||
}
|
||||
|
||||
/* (2) */
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -591,7 +590,8 @@
|
|||
struct snd_card *card;
|
||||
int err;
|
||||
....
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
0, &card);
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
@ -809,28 +809,34 @@
|
|||
|
||||
<para>
|
||||
As mentioned above, to create a card instance, call
|
||||
<function>snd_card_create()</function>.
|
||||
<function>snd_card_new()</function>.
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
struct snd_card *card;
|
||||
int err;
|
||||
err = snd_card_create(index, id, module, extra_size, &card);
|
||||
err = snd_card_new(&pci->dev, index, id, module, extra_size, &card);
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The function takes five arguments, the card-index number, the
|
||||
id string, the module pointer (usually
|
||||
The function takes six arguments: the parent device pointer,
|
||||
the card-index number, the id string, the module pointer (usually
|
||||
<constant>THIS_MODULE</constant>),
|
||||
the size of extra-data space, and the pointer to return the
|
||||
card instance. The extra_size argument is used to
|
||||
allocate card->private_data for the
|
||||
chip-specific data. Note that these data
|
||||
are allocated by <function>snd_card_create()</function>.
|
||||
are allocated by <function>snd_card_new()</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The first argument, the pointer of struct
|
||||
<structname>device</structname>, specifies the parent device.
|
||||
For PCI devices, typically &pci-> is passed there.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
@ -916,16 +922,16 @@
|
|||
</para>
|
||||
|
||||
<section id="card-management-chip-specific-snd-card-new">
|
||||
<title>1. Allocating via <function>snd_card_create()</function>.</title>
|
||||
<title>1. Allocating via <function>snd_card_new()</function>.</title>
|
||||
<para>
|
||||
As mentioned above, you can pass the extra-data-length
|
||||
to the 4th argument of <function>snd_card_create()</function>, i.e.
|
||||
to the 5th argument of <function>snd_card_new()</function>, i.e.
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct mychip), &card);
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct mychip), &card);
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
@ -954,7 +960,7 @@
|
|||
|
||||
<para>
|
||||
After allocating a card instance via
|
||||
<function>snd_card_create()</function> (with
|
||||
<function>snd_card_new()</function> (with
|
||||
<constant>0</constant> on the 4th arg), call
|
||||
<function>kzalloc()</function>.
|
||||
|
||||
|
@ -963,7 +969,8 @@
|
|||
<![CDATA[
|
||||
struct snd_card *card;
|
||||
struct mychip *chip;
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
0, &card);
|
||||
.....
|
||||
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
||||
]]>
|
||||
|
@ -1170,8 +1177,6 @@
|
|||
return err;
|
||||
}
|
||||
|
||||
snd_card_set_dev(card, &pci->dev);
|
||||
|
||||
*rchip = chip;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1526,30 +1531,6 @@
|
|||
|
||||
</section>
|
||||
|
||||
<section id="pci-resource-device-struct">
|
||||
<title>Registration of Device Struct</title>
|
||||
<para>
|
||||
At some point, typically after calling <function>snd_device_new()</function>,
|
||||
you need to register the struct <structname>device</structname> of the chip
|
||||
you're handling for udev and co. ALSA provides a macro for compatibility with
|
||||
older kernels. Simply call like the following:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
snd_card_set_dev(card, &pci->dev);
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
so that it stores the PCI's device pointer to the card. This will be
|
||||
referred by ALSA core functions later when the devices are registered.
|
||||
</para>
|
||||
<para>
|
||||
In the case of non-PCI, pass the proper device struct pointer of the BUS
|
||||
instead. (In the case of legacy ISA without PnP, you don't have to do
|
||||
anything.)
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="pci-resource-entries">
|
||||
<title>PCI Entries</title>
|
||||
<para>
|
||||
|
@ -5740,7 +5721,8 @@ struct _snd_pcm_runtime {
|
|||
struct mychip *chip;
|
||||
int err;
|
||||
....
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
0, &card);
|
||||
....
|
||||
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
|
||||
....
|
||||
|
@ -5752,7 +5734,7 @@ struct _snd_pcm_runtime {
|
|||
</informalexample>
|
||||
|
||||
When you created the chip data with
|
||||
<function>snd_card_create()</function>, it's anyway accessible
|
||||
<function>snd_card_new()</function>, it's anyway accessible
|
||||
via <structfield>private_data</structfield> field.
|
||||
|
||||
<informalexample>
|
||||
|
@ -5766,8 +5748,8 @@ struct _snd_pcm_runtime {
|
|||
struct mychip *chip;
|
||||
int err;
|
||||
....
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct mychip), &card);
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct mychip), &card);
|
||||
....
|
||||
chip = card->private_data;
|
||||
....
|
||||
|
|
|
@ -18,6 +18,7 @@ atmel,24c02 i2c serial eeprom (24cxx)
|
|||
atmel,at97sc3204t i2c trusted platform module (TPM)
|
||||
capella,cm32181 CM32181: Ambient Light Sensor
|
||||
catalyst,24c32 i2c serial eeprom
|
||||
cirrus,cs42l51 Cirrus Logic CS42L51 audio codec
|
||||
dallas,ds1307 64 x 8, Serial, I2C Real-Time Clock
|
||||
dallas,ds1338 I2C RTC with 56-Byte NV RAM
|
||||
dallas,ds1339 I2C Serial Real-Time Clock
|
||||
|
|
|
@ -17,6 +17,14 @@ Required properties for devices compatible with "atmel,at91sam9g45-ssc":
|
|||
See Documentation/devicetree/bindings/dma/atmel-dma.txt for details.
|
||||
- dma-names: Must be "tx", "rx".
|
||||
|
||||
Optional properties:
|
||||
- atmel,clk-from-rk-pin: bool property.
|
||||
- When SSC works in slave mode, according to the hardware design, the
|
||||
clock can get from TK pin, and also can get from RK pin. So, add
|
||||
this parameter to choose where the clock from.
|
||||
- By default the clock is from TK pin, if the clock from RK pin, this
|
||||
property is needed.
|
||||
|
||||
Examples:
|
||||
- PDC transfer:
|
||||
ssc0: ssc@fffbc000 {
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
Device Tree bindings for the Armada 370 DB audio
|
||||
================================================
|
||||
|
||||
These Device Tree bindings are used to describe the audio complex
|
||||
found on the Armada 370 DB platform.
|
||||
|
||||
Mandatory properties:
|
||||
|
||||
* compatible: must be "marvell,a370db-audio"
|
||||
|
||||
* marvell,audio-controller: a phandle that points to the audio
|
||||
controller of the Armada 370 SoC.
|
||||
|
||||
* marvell,audio-codec: a set of three phandles that points to:
|
||||
|
||||
1/ the analog audio codec connected to the Armada 370 SoC
|
||||
2/ the S/PDIF transceiver
|
||||
3/ the S/PDIF receiver
|
||||
|
||||
Example:
|
||||
|
||||
sound {
|
||||
compatible = "marvell,a370db-audio";
|
||||
marvell,audio-controller = <&audio_controller>;
|
||||
marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>;
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
CS42448/CS42888 audio CODEC
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : must contain one of "cirrus,cs42448" and "cirrus,cs42888"
|
||||
|
||||
- reg : the I2C address of the device for I2C
|
||||
|
||||
- clocks : a list of phandles + clock-specifiers, one for each entry in
|
||||
clock-names
|
||||
|
||||
- clock-names : must contain "mclk"
|
||||
|
||||
- VA-supply, VD-supply, VLS-supply, VLC-supply: power supplies for the device,
|
||||
as covered in Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
Example:
|
||||
|
||||
codec: cs42888@48 {
|
||||
compatible = "cirrus,cs42888";
|
||||
reg = <0x48>;
|
||||
clocks = <&codec_mclk 0>;
|
||||
clock-names = "mclk";
|
||||
VA-supply = <®_audio>;
|
||||
VD-supply = <®_audio>;
|
||||
VLS-supply = <®_audio>;
|
||||
VLC-supply = <®_audio>;
|
||||
};
|
|
@ -0,0 +1,22 @@
|
|||
* Dialog DA9055 Audio CODEC
|
||||
|
||||
DA9055 provides Audio CODEC support (I2C only).
|
||||
|
||||
The Audio CODEC device in DA9055 has it's own I2C address which is configurable,
|
||||
so the device is instantiated separately from the PMIC (MFD) device.
|
||||
|
||||
For details on accompanying PMIC I2C device, see the following:
|
||||
Documentation/devicetree/bindings/mfd/da9055.txt
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: "dlg,da9055-codec"
|
||||
- reg: Specifies the I2C slave address
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
codec: da9055-codec@1a {
|
||||
compatible = "dlg,da9055-codec";
|
||||
reg = <0x1a>;
|
||||
};
|
|
@ -5,12 +5,19 @@ Required properties:
|
|||
- ti,model : The user-visible name of this sound complex.
|
||||
- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
|
||||
- ti,mcasp-controller : The phandle of the McASP controller
|
||||
- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
|
||||
- ti,audio-routing : A list of the connections between audio components.
|
||||
Each entry is a pair of strings, the first being the connection's sink,
|
||||
the second being the connection's source. Valid names for sources and
|
||||
sinks are the codec's pins, and the jacks on the board:
|
||||
|
||||
Optional properties:
|
||||
- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec.
|
||||
- clocks : Reference to the master clock
|
||||
- clock-names : The clock should be named "mclk"
|
||||
- Either codec-clock-rate or the codec-clock reference has to be defined. If
|
||||
the both are defined the driver attempts to set referenced clock to the
|
||||
defined rate and takes the rate from the clock reference.
|
||||
|
||||
Board connectors:
|
||||
|
||||
* Headphone Jack
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
Audio complex for Eukrea boards with tlv320aic23 codec.
|
||||
|
||||
Required properties:
|
||||
- compatible : "eukrea,asoc-tlv320"
|
||||
- eukrea,model : The user-visible name of this sound complex.
|
||||
- ssi-controller : The phandle of the SSI controller.
|
||||
- fsl,mux-int-port : The internal port of the i.MX audio muxer (AUDMUX).
|
||||
- fsl,mux-ext-port : The external port of the i.MX audio muxer.
|
||||
|
||||
Note: The AUDMUX port numbering should start at 1, which is consistent with
|
||||
hardware manual.
|
||||
|
||||
Example:
|
||||
|
||||
sound {
|
||||
compatible = "eukrea,asoc-tlv320";
|
||||
eukrea,model = "imx51-eukrea-tlv320aic23";
|
||||
ssi-controller = <&ssi2>;
|
||||
fsl,mux-int-port = <2>;
|
||||
fsl,mux-ext-port = <3>;
|
||||
};
|
|
@ -34,6 +34,10 @@ Required properties:
|
|||
that ESAI would work in the synchronous mode, which means all the settings
|
||||
for Receiving would be duplicated from Transmition related registers.
|
||||
|
||||
- big-endian : If this property is absent, the native endian mode will
|
||||
be in use as default, or the big endian mode will be in use for all the
|
||||
device registers.
|
||||
|
||||
Example:
|
||||
|
||||
esai: esai@02024000 {
|
||||
|
@ -46,5 +50,6 @@ esai: esai@02024000 {
|
|||
dma-names = "rx", "tx";
|
||||
fsl,fifo-depth = <128>;
|
||||
fsl,esai-synchronous;
|
||||
big-endian;
|
||||
status = "disabled";
|
||||
};
|
||||
|
|
|
@ -29,6 +29,10 @@ Required properties:
|
|||
can also be referred to TxClk_Source
|
||||
bit of register SPDIF_STC.
|
||||
|
||||
- big-endian : If this property is absent, the native endian mode will
|
||||
be in use as default, or the big endian mode will be in use for all the
|
||||
device registers.
|
||||
|
||||
Example:
|
||||
|
||||
spdif: spdif@02004000 {
|
||||
|
@ -50,5 +54,6 @@ spdif: spdif@02004000 {
|
|||
"rxtx5", "rxtx6",
|
||||
"rxtx7";
|
||||
|
||||
big-endian;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@ Required properties:
|
|||
- compatible:
|
||||
"marvell,kirkwood-audio" for Kirkwood platforms
|
||||
"marvell,dove-audio" for Dove platforms
|
||||
"marvell,armada370-audio" for Armada 370 platforms
|
||||
|
||||
- reg: physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
PCM512x audio CODECs
|
||||
|
||||
These devices support both I2C and SPI (configured with pin strapping
|
||||
on the board).
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : One of "ti,pcm5121" or "ti,pcm5122"
|
||||
|
||||
- reg : the I2C address of the device for I2C, the chip select
|
||||
number for SPI.
|
||||
|
||||
- AVDD-supply, DVDD-supply, and CPVDD-supply : power supplies for the
|
||||
device, as covered in bindings/regulator/regulator.txt
|
||||
|
||||
Optional properties:
|
||||
|
||||
- clocks : A clock specifier for the clock connected as SCLK. If this
|
||||
is absent the device will be configured to clock from BCLK.
|
||||
|
||||
Example:
|
||||
|
||||
pcm5122: pcm5122@4c {
|
||||
compatible = "ti,pcm5122";
|
||||
reg = <0x4c>;
|
||||
|
||||
AVDD-supply = <®_3v3_analog>;
|
||||
DVDD-supply = <®_1v8>;
|
||||
CPVDD-supply = <®_3v3>;
|
||||
};
|
|
@ -0,0 +1,96 @@
|
|||
Renesas R-Car sound
|
||||
|
||||
Required properties:
|
||||
- compatible : "renesas,rcar_sound-gen1" if generation1
|
||||
"renesas,rcar_sound-gen2" if generation2
|
||||
- reg : Should contain the register physical address.
|
||||
required register is
|
||||
SRU/ADG/SSI if generation1
|
||||
SRU/ADG/SSIU/SSI if generation2
|
||||
- rcar_sound,ssi : SSI subnode
|
||||
- rcar_sound,scu : SCU subnode
|
||||
- rcar_sound,dai : DAI subnode
|
||||
|
||||
SSI subnode properties:
|
||||
- interrupts : Should contain SSI interrupt for PIO transfer
|
||||
- shared-pin : if shared clock pin
|
||||
|
||||
DAI subnode properties:
|
||||
- playback : list of playback modules
|
||||
- capture : list of capture modules
|
||||
|
||||
Example:
|
||||
|
||||
rcar_sound: rcar_sound@0xffd90000 {
|
||||
#sound-dai-cells = <1>;
|
||||
compatible = "renesas,rcar_sound-gen2";
|
||||
reg = <0 0xec500000 0 0x1000>, /* SCU */
|
||||
<0 0xec5a0000 0 0x100>, /* ADG */
|
||||
<0 0xec540000 0 0x1000>, /* SSIU */
|
||||
<0 0xec541000 0 0x1280>; /* SSI */
|
||||
|
||||
rcar_sound,src {
|
||||
src0: src@0 { };
|
||||
src1: src@1 { };
|
||||
src2: src@2 { };
|
||||
src3: src@3 { };
|
||||
src4: src@4 { };
|
||||
src5: src@5 { };
|
||||
src6: src@6 { };
|
||||
src7: src@7 { };
|
||||
src8: src@8 { };
|
||||
src9: src@9 { };
|
||||
};
|
||||
|
||||
rcar_sound,ssi {
|
||||
ssi0: ssi@0 {
|
||||
interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi1: ssi@1 {
|
||||
interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi2: ssi@2 {
|
||||
interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi3: ssi@3 {
|
||||
interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi4: ssi@4 {
|
||||
interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi5: ssi@5 {
|
||||
interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi6: ssi@6 {
|
||||
interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi7: ssi@7 {
|
||||
interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi8: ssi@8 {
|
||||
interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
ssi9: ssi@9 {
|
||||
interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
rcar_sound,dai {
|
||||
dai0 {
|
||||
playback = <&ssi5 &src5>;
|
||||
capture = <&ssi6>;
|
||||
};
|
||||
dai1 {
|
||||
playback = <&ssi3>;
|
||||
};
|
||||
dai2 {
|
||||
capture = <&ssi4>;
|
||||
};
|
||||
dai3 {
|
||||
playback = <&ssi7>;
|
||||
};
|
||||
dai4 {
|
||||
capture = <&ssi8>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -8,13 +8,18 @@ Required properties:
|
|||
|
||||
Optional properties:
|
||||
|
||||
- simple-audio-card,name : User specified audio sound card name, one string
|
||||
property.
|
||||
- simple-audio-card,format : CPU/CODEC common audio format.
|
||||
"i2s", "right_j", "left_j" , "dsp_a"
|
||||
"dsp_b", "ac97", "pdm", "msb", "lsb"
|
||||
- simple-audio-card,widgets : Please refer to widgets.txt.
|
||||
- simple-audio-card,routing : A list of the connections between audio components.
|
||||
Each entry is a pair of strings, the first being the
|
||||
connection's sink, the second being the connection's
|
||||
source.
|
||||
- dai-tdm-slot-num : Please refer to tdm-slot.txt.
|
||||
- dai-tdm-slot-width : Please refer to tdm-slot.txt.
|
||||
|
||||
Required subnodes:
|
||||
|
||||
|
@ -38,15 +43,29 @@ Optional CPU/CODEC subnodes properties:
|
|||
clock node (= common clock), or "system-clock-frequency"
|
||||
(if system doens't support common clock)
|
||||
|
||||
Note:
|
||||
* For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and
|
||||
'frame-inversion', the simple card will use the settings of CODEC for both
|
||||
CPU and CODEC sides as we need to keep the settings identical for both ends
|
||||
of the link.
|
||||
|
||||
Example:
|
||||
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "VF610-Tower-Sound-Card";
|
||||
simple-audio-card,format = "left_j";
|
||||
simple-audio-card,widgets =
|
||||
"Microphone", "Microphone Jack",
|
||||
"Headphone", "Headphone Jack",
|
||||
"Speaker", "External Speaker";
|
||||
simple-audio-card,routing =
|
||||
"MIC_IN", "Mic Jack",
|
||||
"MIC_IN", "Microphone Jack",
|
||||
"Headphone Jack", "HP_OUT",
|
||||
"Ext Spk", "LINE_OUT";
|
||||
"External Speaker", "LINE_OUT";
|
||||
|
||||
dai-tdm-slot-num = <2>;
|
||||
dai-tdm-slot-width = <8>;
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&sh_fsi2 0>;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
SiRF internal audio CODEC
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : "sirf,atlas6-audio-codec" or "sirf,prima2-audio-codec"
|
||||
|
||||
- reg : the register address of the device.
|
||||
|
||||
- clocks: the clock of SiRF internal audio codec
|
||||
|
||||
Example:
|
||||
|
||||
audiocodec: audiocodec@b0040000 {
|
||||
compatible = "sirf,atlas6-audio-codec";
|
||||
reg = <0xb0040000 0x10000>;
|
||||
clocks = <&clks 27>;
|
||||
};
|
|
@ -0,0 +1,20 @@
|
|||
* SiRF SoC audio port
|
||||
|
||||
Required properties:
|
||||
- compatible: "sirf,audio-port"
|
||||
- reg: Base address and size entries:
|
||||
- dmas: List of DMA controller phandle and DMA request line ordered pairs.
|
||||
- dma-names: Identifier string for each DMA request line in the dmas property.
|
||||
These strings correspond 1:1 with the ordered pairs in dmas.
|
||||
|
||||
One of the DMA channels will be responsible for transmission (should be
|
||||
named "tx") and one for reception (should be named "rx").
|
||||
|
||||
Example:
|
||||
|
||||
audioport: audioport@b0040000 {
|
||||
compatible = "sirf,audio-port";
|
||||
reg = <0xb0040000 0x10000>;
|
||||
dmas = <&dmac1 3>, <&dmac1 8>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
* SiRF atlas6 and prima2 internal audio codec and port based audio setups
|
||||
|
||||
Required properties:
|
||||
- compatible: "sirf,sirf-audio-card"
|
||||
- sirf,audio-platform: phandle for the platform node
|
||||
- sirf,audio-codec: phandle for the SiRF internal codec node
|
||||
|
||||
Optional properties:
|
||||
- hp-pa-gpios: Need to be present if the board need control external
|
||||
headphone amplifier.
|
||||
- spk-pa-gpios: Need to be present if the board need control external
|
||||
speaker amplifier.
|
||||
- hp-switch-gpios: Need to be present if the board capable to detect jack
|
||||
insertion, removal.
|
||||
|
||||
Available audio endpoints for the audio-routing table:
|
||||
|
||||
Board connectors:
|
||||
* Headset Stereophone
|
||||
* Ext Spk
|
||||
* Line In
|
||||
* Mic
|
||||
|
||||
SiRF internal audio codec pins:
|
||||
* HPOUTL
|
||||
* HPOUTR
|
||||
* SPKOUT
|
||||
* Ext Mic
|
||||
* Mic Bias
|
||||
|
||||
Example:
|
||||
|
||||
sound {
|
||||
compatible = "sirf,sirf-audio-card";
|
||||
sirf,audio-codec = <&audiocodec>;
|
||||
sirf,audio-platform = <&audioport>;
|
||||
hp-pa-gpios = <&gpio 44 0>;
|
||||
spk-pa-gpios = <&gpio 46 0>;
|
||||
hp-switch-gpios = <&gpio 45 0>;
|
||||
};
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
TDM slot:
|
||||
|
||||
This specifies audio DAI's TDM slot.
|
||||
|
||||
TDM slot properties:
|
||||
dai-tdm-slot-num : Number of slots in use.
|
||||
dai-tdm-slot-width : Width in bits for each slot.
|
||||
|
||||
For instance:
|
||||
dai-tdm-slot-num = <2>;
|
||||
dai-tdm-slot-width = <8>;
|
||||
|
||||
And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
|
||||
to specify a explicit mapping of the channels and the slots. If it's absent
|
||||
the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
|
||||
tx and rx masks.
|
||||
|
||||
For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
|
||||
for an active slot as default, and the default active bits are at the LSB of
|
||||
the masks.
|
|
@ -0,0 +1,61 @@
|
|||
Texas Instruments - tlv320aic31xx Codec module
|
||||
|
||||
The tlv320aic31xx serial control bus communicates through I2C protocols
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible - "string" - One of:
|
||||
"ti,tlv320aic310x" - Generic TLV320AIC31xx with mono speaker amp
|
||||
"ti,tlv320aic311x" - Generic TLV320AIC31xx with stereo speaker amp
|
||||
"ti,tlv320aic3100" - TLV320AIC3100 (mono speaker amp, no MiniDSP)
|
||||
"ti,tlv320aic3110" - TLV320AIC3110 (stereo speaker amp, no MiniDSP)
|
||||
"ti,tlv320aic3120" - TLV320AIC3120 (mono speaker amp, MiniDSP)
|
||||
"ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP)
|
||||
|
||||
- reg - <int> - I2C slave address
|
||||
|
||||
|
||||
Optional properties:
|
||||
|
||||
- gpio-reset - gpio pin number used for codec reset
|
||||
- ai31xx-micbias-vg - MicBias Voltage setting
|
||||
1 or MICBIAS_2_0V - MICBIAS output is powered to 2.0V
|
||||
2 or MICBIAS_2_5V - MICBIAS output is powered to 2.5V
|
||||
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
|
||||
If this node is not mentioned or if the value is unknown, then
|
||||
micbias is set to 2.0V.
|
||||
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply,
|
||||
DVDD-supply : power supplies for the device as covered in
|
||||
Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
CODEC output pins:
|
||||
* HPL
|
||||
* HPR
|
||||
* SPL, devices with stereo speaker amp
|
||||
* SPR, devices with stereo speaker amp
|
||||
* SPK, devices with mono speaker amp
|
||||
* MICBIAS
|
||||
|
||||
CODEC input pins:
|
||||
* MIC1LP
|
||||
* MIC1RP
|
||||
* MIC1LM
|
||||
|
||||
The pins can be used in referring sound node's audio-routing property.
|
||||
|
||||
Example:
|
||||
#include <dt-bindings/sound/tlv320aic31xx-micbias.h>
|
||||
|
||||
tlv320aic31xx: tlv320aic31xx@18 {
|
||||
compatible = "ti,tlv320aic311x";
|
||||
reg = <0x18>;
|
||||
|
||||
ai31xx-micbias-vg = <MICBIAS_OFF>;
|
||||
|
||||
HPVDD-supply = <®ulator>;
|
||||
SPRVDD-supply = <®ulator>;
|
||||
SPLVDD-supply = <®ulator>;
|
||||
AVDD-supply = <®ulator>;
|
||||
IOVDD-supply = <®ulator>;
|
||||
DVDD-supply = <®ulator>;
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
Texas Instruments - tlv320aic32x4 Codec module
|
||||
|
||||
The tlv320aic32x4 serial control bus communicates through I2C protocols
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "ti,tlv320aic32x4"
|
||||
- reg: I2C slave address
|
||||
- supply-*: Required supply regulators are:
|
||||
"iov" - digital IO power supply
|
||||
"ldoin" - LDO power supply
|
||||
"dv" - Digital core power supply
|
||||
"av" - Analog core power supply
|
||||
If you supply ldoin, dv and av are optional. Otherwise they are required
|
||||
See regulator/regulator.txt for more information about the detailed binding
|
||||
format.
|
||||
|
||||
Optional properties:
|
||||
- reset-gpios: Reset-GPIO phandle with args as described in gpio/gpio.txt
|
||||
- clocks/clock-names: Clock named 'mclk' for the master clock of the codec.
|
||||
See clock/clock-bindings.txt for information about the detailed format.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
codec: tlv320aic32x4@18 {
|
||||
compatible = "ti,tlv320aic32x4";
|
||||
reg = <0x18>;
|
||||
clocks = <&clks 201>;
|
||||
clock-names = "mclk";
|
||||
};
|
|
@ -6,7 +6,6 @@ Required properties:
|
|||
|
||||
- compatible - "string" - One of:
|
||||
"ti,tlv320aic3x" - Generic TLV320AIC3x device
|
||||
"ti,tlv320aic32x4" - TLV320AIC32x4
|
||||
"ti,tlv320aic33" - TLV320AIC33
|
||||
"ti,tlv320aic3007" - TLV320AIC3007
|
||||
"ti,tlv320aic3106" - TLV320AIC3106
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
Widgets:
|
||||
|
||||
This mainly specifies audio off-codec DAPM widgets.
|
||||
|
||||
Each entry is a pair of strings in DT:
|
||||
|
||||
"template-wname", "user-supplied-wname"
|
||||
|
||||
The "template-wname" being the template widget name and currently includes:
|
||||
"Microphone", "Line", "Headphone" and "Speaker".
|
||||
|
||||
The "user-supplied-wname" being the user specified widget name.
|
||||
|
||||
For instance:
|
||||
simple-audio-widgets =
|
||||
"Microphone", "Microphone Jack",
|
||||
"Line", "Line In Jack",
|
||||
"Line", "Line Out Jack",
|
||||
"Headphone", "Headphone Jack",
|
||||
"Speaker", "Speaker External";
|
|
@ -453,7 +453,7 @@ TP_STATUS_COPY : This flag indicates that the frame (and associated
|
|||
enabled previously with setsockopt() and
|
||||
the PACKET_COPY_THRESH option.
|
||||
|
||||
The number of frames than can be buffered to
|
||||
The number of frames that can be buffered to
|
||||
be read with recvfrom is limited like a normal socket.
|
||||
See the SO_RCVBUF option in the socket (7) man page.
|
||||
|
||||
|
|
|
@ -21,26 +21,38 @@ has such a feature).
|
|||
|
||||
SO_TIMESTAMPING:
|
||||
|
||||
Instructs the socket layer which kind of information is wanted. The
|
||||
parameter is an integer with some of the following bits set. Setting
|
||||
other bits is an error and doesn't change the current state.
|
||||
Instructs the socket layer which kind of information should be collected
|
||||
and/or reported. The parameter is an integer with some of the following
|
||||
bits set. Setting other bits is an error and doesn't change the current
|
||||
state.
|
||||
|
||||
SOF_TIMESTAMPING_TX_HARDWARE: try to obtain send time stamp in hardware
|
||||
SOF_TIMESTAMPING_TX_SOFTWARE: if SOF_TIMESTAMPING_TX_HARDWARE is off or
|
||||
fails, then do it in software
|
||||
SOF_TIMESTAMPING_RX_HARDWARE: return the original, unmodified time stamp
|
||||
as generated by the hardware
|
||||
SOF_TIMESTAMPING_RX_SOFTWARE: if SOF_TIMESTAMPING_RX_HARDWARE is off or
|
||||
fails, then do it in software
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE: return original raw hardware time stamp
|
||||
SOF_TIMESTAMPING_SYS_HARDWARE: return hardware time stamp transformed to
|
||||
the system time base
|
||||
SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in
|
||||
software
|
||||
Four of the bits are requests to the stack to try to generate
|
||||
timestamps. Any combination of them is valid.
|
||||
|
||||
SOF_TIMESTAMPING_TX/RX determine how time stamps are generated.
|
||||
SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the
|
||||
following control message:
|
||||
SOF_TIMESTAMPING_TX_HARDWARE: try to obtain send time stamps in hardware
|
||||
SOF_TIMESTAMPING_TX_SOFTWARE: try to obtain send time stamps in software
|
||||
SOF_TIMESTAMPING_RX_HARDWARE: try to obtain receive time stamps in hardware
|
||||
SOF_TIMESTAMPING_RX_SOFTWARE: try to obtain receive time stamps in software
|
||||
|
||||
The other three bits control which timestamps will be reported in a
|
||||
generated control message. If none of these bits are set or if none of
|
||||
the set bits correspond to data that is available, then the control
|
||||
message will not be generated:
|
||||
|
||||
SOF_TIMESTAMPING_SOFTWARE: report systime if available
|
||||
SOF_TIMESTAMPING_SYS_HARDWARE: report hwtimetrans if available
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE: report hwtimeraw if available
|
||||
|
||||
It is worth noting that timestamps may be collected for reasons other
|
||||
than being requested by a particular socket with
|
||||
SOF_TIMESTAMPING_[TR]X_(HARD|SOFT)WARE. For example, most drivers that
|
||||
can generate hardware receive timestamps ignore
|
||||
SOF_TIMESTAMPING_RX_HARDWARE. It is still a good idea to set that flag
|
||||
in case future drivers pay attention.
|
||||
|
||||
If timestamps are reported, they will appear in a control message with
|
||||
cmsg_level==SOL_SOCKET, cmsg_type==SO_TIMESTAMPING, and a payload like
|
||||
this:
|
||||
|
||||
struct scm_timestamping {
|
||||
struct timespec systime;
|
||||
|
|
10
MAINTAINERS
10
MAINTAINERS
|
@ -1738,6 +1738,7 @@ F: include/uapi/linux/bfs_fs.h
|
|||
BLACKFIN ARCHITECTURE
|
||||
M: Steven Miao <realmz6@gmail.com>
|
||||
L: adi-buildroot-devel@lists.sourceforge.net
|
||||
T: git git://git.code.sf.net/p/adi-linux/code
|
||||
W: http://blackfin.uclinux.org
|
||||
S: Supported
|
||||
F: arch/blackfin/
|
||||
|
@ -2202,6 +2203,13 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
|||
S: Odd Fixes
|
||||
F: sound/soc/codecs/cs4270*
|
||||
|
||||
CIRRUS LOGIC AUDIO CODEC DRIVERS
|
||||
M: Brian Austin <brian.austin@cirrus.com>
|
||||
M: Paul Handrigan <Paul.Handrigan@cirrus.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: sound/soc/codecs/cs*
|
||||
|
||||
CLEANCACHE API
|
||||
M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
|
@ -6002,6 +6010,8 @@ F: include/linux/netdevice.h
|
|||
F: include/uapi/linux/in.h
|
||||
F: include/uapi/linux/net.h
|
||||
F: include/uapi/linux/netdevice.h
|
||||
F: tools/net/
|
||||
F: tools/testing/selftests/net/
|
||||
|
||||
NETWORKING [IPv4/IPv6]
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 3
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Shuffling Zombie Juror
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -988,14 +988,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = {
|
|||
.card = "FSI2A-WM8978",
|
||||
.codec = "wm8978.0-001a",
|
||||
.platform = "sh_fsi2",
|
||||
.daifmt = SND_SOC_DAIFMT_I2S,
|
||||
.daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
|
||||
.cpu_dai = {
|
||||
.name = "fsia-dai",
|
||||
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
|
||||
},
|
||||
.codec_dai = {
|
||||
.name = "wm8978-hifi",
|
||||
.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
|
||||
.sysclk = 12288000,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = {
|
|||
.card = "FSI2A-AK4648",
|
||||
.codec = "ak4642-codec.0-0012",
|
||||
.platform = "sh_fsi2",
|
||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
||||
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||
.cpu_dai = {
|
||||
.name = "fsia-dai",
|
||||
.fmt = SND_SOC_DAIFMT_CBS_CFS,
|
||||
},
|
||||
.codec_dai = {
|
||||
.name = "ak4642-hifi",
|
||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
||||
.sysclk = 11289600,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
|
|||
.card = "FSI2B-HDMI",
|
||||
.codec = "sh-mobile-hdmi",
|
||||
.platform = "sh_fsi2",
|
||||
.daifmt = SND_SOC_DAIFMT_CBS_CFS,
|
||||
.cpu_dai = {
|
||||
.name = "fsib-dai",
|
||||
.fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
|
||||
},
|
||||
.codec_dai = {
|
||||
.name = "sh_mobile_hdmi-hifi",
|
||||
|
@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = {
|
|||
.card = "FSI2A-AK4643",
|
||||
.codec = "ak4642-codec.0-0013",
|
||||
.platform = "sh_fsi2",
|
||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
||||
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||
.cpu_dai = {
|
||||
.name = "fsia-dai",
|
||||
.fmt = SND_SOC_DAIFMT_CBS_CFS,
|
||||
},
|
||||
.codec_dai = {
|
||||
.name = "ak4642-hifi",
|
||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
||||
.sysclk = 11289600,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -144,7 +144,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
|
|||
* definition, which doesn't have the same semantics. We don't want to
|
||||
* use -fno-builtin, so just hide the name ffs.
|
||||
*/
|
||||
#define ffs kernel_ffs
|
||||
#define ffs(x) kernel_ffs(x)
|
||||
|
||||
#include <asm-generic/bitops/fls.h>
|
||||
#include <asm-generic/bitops/__fls.h>
|
||||
|
|
|
@ -98,7 +98,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
|
|||
/* attempt to allocate a granule's worth of cached memory pages */
|
||||
|
||||
page = alloc_pages_exact_node(nid,
|
||||
GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
|
||||
GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE,
|
||||
IA64_GRANULE_SHIFT-PAGE_SHIFT);
|
||||
if (!page) {
|
||||
mutex_unlock(&uc_pool->add_chunk_mutex);
|
||||
|
|
|
@ -123,7 +123,8 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
|
|||
|
||||
area->nid = nid;
|
||||
area->order = order;
|
||||
area->pages = alloc_pages_exact_node(area->nid, GFP_KERNEL|GFP_THISNODE,
|
||||
area->pages = alloc_pages_exact_node(area->nid,
|
||||
GFP_KERNEL|__GFP_THISNODE,
|
||||
area->order);
|
||||
|
||||
if (!area->pages) {
|
||||
|
|
|
@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = {
|
|||
.card = "FSIB-DA7210",
|
||||
.codec = "da7210.0-001a",
|
||||
.platform = "sh_fsi.0",
|
||||
.daifmt = SND_SOC_DAIFMT_I2S,
|
||||
.daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
|
||||
.cpu_dai = {
|
||||
.name = "fsib-dai",
|
||||
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
|
||||
},
|
||||
.codec_dai = {
|
||||
.name = "da7210-hifi",
|
||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = {
|
|||
.card = "FSIA-AK4642",
|
||||
.codec = "ak4642-codec.0-0012",
|
||||
.platform = "sh_fsi.0",
|
||||
.daifmt = SND_SOC_DAIFMT_LEFT_J,
|
||||
.daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
|
||||
.cpu_dai = {
|
||||
.name = "fsia-dai",
|
||||
.fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
|
||||
},
|
||||
.codec_dai = {
|
||||
.name = "ak4642-hifi",
|
||||
.fmt = SND_SOC_DAIFMT_CBM_CFM,
|
||||
.sysclk = 11289600,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -341,10 +341,6 @@ config X86_USE_3DNOW
|
|||
def_bool y
|
||||
depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
|
||||
|
||||
config X86_OOSTORE
|
||||
def_bool y
|
||||
depends on (MWINCHIP3D || MWINCHIPC6) && MTRR
|
||||
|
||||
#
|
||||
# P6_NOPs are a relatively minor optimization that require a family >=
|
||||
# 6 processor, except that it is broken on certain VIA chips.
|
||||
|
|
|
@ -85,11 +85,7 @@
|
|||
#else
|
||||
# define smp_rmb() barrier()
|
||||
#endif
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
# define smp_wmb() wmb()
|
||||
#else
|
||||
# define smp_wmb() barrier()
|
||||
#endif
|
||||
#define smp_wmb() barrier()
|
||||
#define smp_read_barrier_depends() read_barrier_depends()
|
||||
#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
|
||||
#else /* !SMP */
|
||||
|
@ -100,7 +96,7 @@
|
|||
#define set_mb(var, value) do { var = value; barrier(); } while (0)
|
||||
#endif /* SMP */
|
||||
|
||||
#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
|
||||
#if defined(CONFIG_X86_PPRO_FENCE)
|
||||
|
||||
/*
|
||||
* For either of these options x86 doesn't have a strong TSO memory
|
||||
|
|
|
@ -237,7 +237,7 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
|
|||
|
||||
static inline void flush_write_buffers(void)
|
||||
{
|
||||
#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
|
||||
#if defined(CONFIG_X86_PPRO_FENCE)
|
||||
asm volatile("lock; addl $0,0(%%esp)": : :"memory");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -26,10 +26,9 @@
|
|||
# define LOCK_PTR_REG "D"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_X86_32) && \
|
||||
(defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE))
|
||||
#if defined(CONFIG_X86_32) && (defined(CONFIG_X86_PPRO_FENCE))
|
||||
/*
|
||||
* On PPro SMP or if we are using OOSTORE, we use a locked operation to unlock
|
||||
* On PPro SMP, we use a locked operation to unlock
|
||||
* (PPro errata 66, 92)
|
||||
*/
|
||||
# define UNLOCK_LOCK_PREFIX LOCK_PREFIX
|
||||
|
|
|
@ -8,236 +8,6 @@
|
|||
|
||||
#include "cpu.h"
|
||||
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
|
||||
static u32 power2(u32 x)
|
||||
{
|
||||
u32 s = 1;
|
||||
|
||||
while (s <= x)
|
||||
s <<= 1;
|
||||
|
||||
return s >>= 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set up an actual MCR
|
||||
*/
|
||||
static void centaur_mcr_insert(int reg, u32 base, u32 size, int key)
|
||||
{
|
||||
u32 lo, hi;
|
||||
|
||||
hi = base & ~0xFFF;
|
||||
lo = ~(size-1); /* Size is a power of 2 so this makes a mask */
|
||||
lo &= ~0xFFF; /* Remove the ctrl value bits */
|
||||
lo |= key; /* Attribute we wish to set */
|
||||
wrmsr(reg+MSR_IDT_MCR0, lo, hi);
|
||||
mtrr_centaur_report_mcr(reg, lo, hi); /* Tell the mtrr driver */
|
||||
}
|
||||
|
||||
/*
|
||||
* Figure what we can cover with MCR's
|
||||
*
|
||||
* Shortcut: We know you can't put 4Gig of RAM on a winchip
|
||||
*/
|
||||
static u32 ramtop(void)
|
||||
{
|
||||
u32 clip = 0xFFFFFFFFUL;
|
||||
u32 top = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < e820.nr_map; i++) {
|
||||
unsigned long start, end;
|
||||
|
||||
if (e820.map[i].addr > 0xFFFFFFFFUL)
|
||||
continue;
|
||||
/*
|
||||
* Don't MCR over reserved space. Ignore the ISA hole
|
||||
* we frob around that catastrophe already
|
||||
*/
|
||||
if (e820.map[i].type == E820_RESERVED) {
|
||||
if (e820.map[i].addr >= 0x100000UL &&
|
||||
e820.map[i].addr < clip)
|
||||
clip = e820.map[i].addr;
|
||||
continue;
|
||||
}
|
||||
start = e820.map[i].addr;
|
||||
end = e820.map[i].addr + e820.map[i].size;
|
||||
if (start >= end)
|
||||
continue;
|
||||
if (end > top)
|
||||
top = end;
|
||||
}
|
||||
/*
|
||||
* Everything below 'top' should be RAM except for the ISA hole.
|
||||
* Because of the limited MCR's we want to map NV/ACPI into our
|
||||
* MCR range for gunk in RAM
|
||||
*
|
||||
* Clip might cause us to MCR insufficient RAM but that is an
|
||||
* acceptable failure mode and should only bite obscure boxes with
|
||||
* a VESA hole at 15Mb
|
||||
*
|
||||
* The second case Clip sometimes kicks in is when the EBDA is marked
|
||||
* as reserved. Again we fail safe with reasonable results
|
||||
*/
|
||||
if (top > clip)
|
||||
top = clip;
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute a set of MCR's to give maximum coverage
|
||||
*/
|
||||
static int centaur_mcr_compute(int nr, int key)
|
||||
{
|
||||
u32 mem = ramtop();
|
||||
u32 root = power2(mem);
|
||||
u32 base = root;
|
||||
u32 top = root;
|
||||
u32 floor = 0;
|
||||
int ct = 0;
|
||||
|
||||
while (ct < nr) {
|
||||
u32 fspace = 0;
|
||||
u32 high;
|
||||
u32 low;
|
||||
|
||||
/*
|
||||
* Find the largest block we will fill going upwards
|
||||
*/
|
||||
high = power2(mem-top);
|
||||
|
||||
/*
|
||||
* Find the largest block we will fill going downwards
|
||||
*/
|
||||
low = base/2;
|
||||
|
||||
/*
|
||||
* Don't fill below 1Mb going downwards as there
|
||||
* is an ISA hole in the way.
|
||||
*/
|
||||
if (base <= 1024*1024)
|
||||
low = 0;
|
||||
|
||||
/*
|
||||
* See how much space we could cover by filling below
|
||||
* the ISA hole
|
||||
*/
|
||||
|
||||
if (floor == 0)
|
||||
fspace = 512*1024;
|
||||
else if (floor == 512*1024)
|
||||
fspace = 128*1024;
|
||||
|
||||
/* And forget ROM space */
|
||||
|
||||
/*
|
||||
* Now install the largest coverage we get
|
||||
*/
|
||||
if (fspace > high && fspace > low) {
|
||||
centaur_mcr_insert(ct, floor, fspace, key);
|
||||
floor += fspace;
|
||||
} else if (high > low) {
|
||||
centaur_mcr_insert(ct, top, high, key);
|
||||
top += high;
|
||||
} else if (low > 0) {
|
||||
base -= low;
|
||||
centaur_mcr_insert(ct, base, low, key);
|
||||
} else
|
||||
break;
|
||||
ct++;
|
||||
}
|
||||
/*
|
||||
* We loaded ct values. We now need to set the mask. The caller
|
||||
* must do this bit.
|
||||
*/
|
||||
return ct;
|
||||
}
|
||||
|
||||
static void centaur_create_optimal_mcr(void)
|
||||
{
|
||||
int used;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Allocate up to 6 mcrs to mark as much of ram as possible
|
||||
* as write combining and weak write ordered.
|
||||
*
|
||||
* To experiment with: Linux never uses stack operations for
|
||||
* mmio spaces so we could globally enable stack operation wc
|
||||
*
|
||||
* Load the registers with type 31 - full write combining, all
|
||||
* writes weakly ordered.
|
||||
*/
|
||||
used = centaur_mcr_compute(6, 31);
|
||||
|
||||
/*
|
||||
* Wipe unused MCRs
|
||||
*/
|
||||
for (i = used; i < 8; i++)
|
||||
wrmsr(MSR_IDT_MCR0+i, 0, 0);
|
||||
}
|
||||
|
||||
static void winchip2_create_optimal_mcr(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
int used;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Allocate up to 6 mcrs to mark as much of ram as possible
|
||||
* as write combining, weak store ordered.
|
||||
*
|
||||
* Load the registers with type 25
|
||||
* 8 - weak write ordering
|
||||
* 16 - weak read ordering
|
||||
* 1 - write combining
|
||||
*/
|
||||
used = centaur_mcr_compute(6, 25);
|
||||
|
||||
/*
|
||||
* Mark the registers we are using.
|
||||
*/
|
||||
rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
for (i = 0; i < used; i++)
|
||||
lo |= 1<<(9+i);
|
||||
wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
|
||||
/*
|
||||
* Wipe unused MCRs
|
||||
*/
|
||||
|
||||
for (i = used; i < 8; i++)
|
||||
wrmsr(MSR_IDT_MCR0+i, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle the MCR key on the Winchip 2.
|
||||
*/
|
||||
static void winchip2_unprotect_mcr(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
u32 key;
|
||||
|
||||
rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
lo &= ~0x1C0; /* blank bits 8-6 */
|
||||
key = (lo>>17) & 7;
|
||||
lo |= key<<6; /* replace with unlock key */
|
||||
wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
}
|
||||
|
||||
static void winchip2_protect_mcr(void)
|
||||
{
|
||||
u32 lo, hi;
|
||||
|
||||
rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
lo &= ~0x1C0; /* blank bits 8-6 */
|
||||
wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
}
|
||||
#endif /* CONFIG_X86_OOSTORE */
|
||||
|
||||
#define ACE_PRESENT (1 << 6)
|
||||
#define ACE_ENABLED (1 << 7)
|
||||
#define ACE_FCR (1 << 28) /* MSR_VIA_FCR */
|
||||
|
@ -362,20 +132,6 @@ static void init_centaur(struct cpuinfo_x86 *c)
|
|||
fcr_clr = DPDC;
|
||||
printk(KERN_NOTICE "Disabling bugged TSC.\n");
|
||||
clear_cpu_cap(c, X86_FEATURE_TSC);
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
centaur_create_optimal_mcr();
|
||||
/*
|
||||
* Enable:
|
||||
* write combining on non-stack, non-string
|
||||
* write combining on string, all types
|
||||
* weak write ordering
|
||||
*
|
||||
* The C6 original lacks weak read order
|
||||
*
|
||||
* Note 0x120 is write only on Winchip 1
|
||||
*/
|
||||
wrmsr(MSR_IDT_MCR_CTRL, 0x01F0001F, 0);
|
||||
#endif
|
||||
break;
|
||||
case 8:
|
||||
switch (c->x86_mask) {
|
||||
|
@ -392,40 +148,12 @@ static void init_centaur(struct cpuinfo_x86 *c)
|
|||
fcr_set = ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|
|
||||
E2MMX|EAMD3D;
|
||||
fcr_clr = DPDC;
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
winchip2_unprotect_mcr();
|
||||
winchip2_create_optimal_mcr();
|
||||
rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
/*
|
||||
* Enable:
|
||||
* write combining on non-stack, non-string
|
||||
* write combining on string, all types
|
||||
* weak write ordering
|
||||
*/
|
||||
lo |= 31;
|
||||
wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
winchip2_protect_mcr();
|
||||
#endif
|
||||
break;
|
||||
case 9:
|
||||
name = "3";
|
||||
fcr_set = ECX8|DSMC|DTLOCK|EMMX|EBRPRED|ERETSTK|
|
||||
E2MMX|EAMD3D;
|
||||
fcr_clr = DPDC;
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
winchip2_unprotect_mcr();
|
||||
winchip2_create_optimal_mcr();
|
||||
rdmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
/*
|
||||
* Enable:
|
||||
* write combining on non-stack, non-string
|
||||
* write combining on string, all types
|
||||
* weak write ordering
|
||||
*/
|
||||
lo |= 31;
|
||||
wrmsr(MSR_IDT_MCR_CTRL, lo, hi);
|
||||
winchip2_protect_mcr();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
name = "??";
|
||||
|
|
|
@ -3334,6 +3334,8 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
|
|||
if (!pmus)
|
||||
return -ENOMEM;
|
||||
|
||||
type->pmus = pmus;
|
||||
|
||||
type->unconstrainted = (struct event_constraint)
|
||||
__EVENT_CONSTRAINT(0, (1ULL << type->num_counters) - 1,
|
||||
0, type->num_counters, 0, 0);
|
||||
|
@ -3369,7 +3371,6 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
|
|||
}
|
||||
|
||||
type->pmu_group = &uncore_pmu_attr_group;
|
||||
type->pmus = pmus;
|
||||
return 0;
|
||||
fail:
|
||||
uncore_type_exit(type);
|
||||
|
|
|
@ -86,10 +86,19 @@ EXPORT_SYMBOL(__kernel_fpu_begin);
|
|||
|
||||
void __kernel_fpu_end(void)
|
||||
{
|
||||
if (use_eager_fpu())
|
||||
math_state_restore();
|
||||
else
|
||||
if (use_eager_fpu()) {
|
||||
/*
|
||||
* For eager fpu, most the time, tsk_used_math() is true.
|
||||
* Restore the user math as we are done with the kernel usage.
|
||||
* At few instances during thread exit, signal handling etc,
|
||||
* tsk_used_math() is false. Those few places will take proper
|
||||
* actions, so we don't need to restore the math here.
|
||||
*/
|
||||
if (likely(tsk_used_math(current)))
|
||||
math_state_restore();
|
||||
} else {
|
||||
stts();
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(__kernel_fpu_end);
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev)
|
|||
return;
|
||||
|
||||
pci_read_config_dword(nb_ht, 0x60, &val);
|
||||
node = val & 7;
|
||||
node = pcibus_to_node(dev->bus) | (val & 7);
|
||||
/*
|
||||
* Some hardware may return an invalid node ID,
|
||||
* so check it first:
|
||||
|
|
|
@ -3002,10 +3002,8 @@ static int cr8_write_interception(struct vcpu_svm *svm)
|
|||
u8 cr8_prev = kvm_get_cr8(&svm->vcpu);
|
||||
/* instruction emulation calls kvm_set_cr8() */
|
||||
r = cr_interception(svm);
|
||||
if (irqchip_in_kernel(svm->vcpu.kvm)) {
|
||||
clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);
|
||||
if (irqchip_in_kernel(svm->vcpu.kvm))
|
||||
return r;
|
||||
}
|
||||
if (cr8_prev <= kvm_get_cr8(&svm->vcpu))
|
||||
return r;
|
||||
kvm_run->exit_reason = KVM_EXIT_SET_TPR;
|
||||
|
@ -3567,6 +3565,8 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr)
|
|||
if (is_guest_mode(vcpu) && (vcpu->arch.hflags & HF_VINTR_MASK))
|
||||
return;
|
||||
|
||||
clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);
|
||||
|
||||
if (irr == -1)
|
||||
return;
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ bpf_slow_path_byte_msh:
|
|||
push %r9; \
|
||||
push SKBDATA; \
|
||||
/* rsi already has offset */ \
|
||||
mov $SIZE,%ecx; /* size */ \
|
||||
mov $SIZE,%edx; /* size */ \
|
||||
call bpf_internal_load_pointer_neg_helper; \
|
||||
test %rax,%rax; \
|
||||
pop SKBDATA; \
|
||||
|
|
|
@ -40,11 +40,7 @@
|
|||
#define smp_rmb() barrier()
|
||||
#endif /* CONFIG_X86_PPRO_FENCE */
|
||||
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
#define smp_wmb() wmb()
|
||||
#else /* CONFIG_X86_OOSTORE */
|
||||
#define smp_wmb() barrier()
|
||||
#endif /* CONFIG_X86_OOSTORE */
|
||||
|
||||
#define smp_read_barrier_depends() read_barrier_depends()
|
||||
#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
|
||||
|
|
|
@ -71,6 +71,17 @@ static int acpi_sleep_prepare(u32 acpi_state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool acpi_sleep_state_supported(u8 sleep_state)
|
||||
{
|
||||
acpi_status status;
|
||||
u8 type_a, type_b;
|
||||
|
||||
status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b);
|
||||
return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware
|
||||
|| (acpi_gbl_FADT.sleep_control.address
|
||||
&& acpi_gbl_FADT.sleep_status.address));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_SLEEP
|
||||
static u32 acpi_target_sleep_state = ACPI_STATE_S0;
|
||||
|
||||
|
@ -604,15 +615,9 @@ static void acpi_sleep_suspend_setup(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++) {
|
||||
acpi_status status;
|
||||
u8 type_a, type_b;
|
||||
|
||||
status = acpi_get_sleep_type_data(i, &type_a, &type_b);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++)
|
||||
if (acpi_sleep_state_supported(i))
|
||||
sleep_states[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
suspend_set_ops(old_suspend_ordering ?
|
||||
&acpi_suspend_ops_old : &acpi_suspend_ops);
|
||||
|
@ -740,11 +745,7 @@ static const struct platform_hibernation_ops acpi_hibernation_ops_old = {
|
|||
|
||||
static void acpi_sleep_hibernate_setup(void)
|
||||
{
|
||||
acpi_status status;
|
||||
u8 type_a, type_b;
|
||||
|
||||
status = acpi_get_sleep_type_data(ACPI_STATE_S4, &type_a, &type_b);
|
||||
if (ACPI_FAILURE(status))
|
||||
if (!acpi_sleep_state_supported(ACPI_STATE_S4))
|
||||
return;
|
||||
|
||||
hibernation_set_ops(old_suspend_ordering ?
|
||||
|
@ -793,8 +794,6 @@ static void acpi_power_off(void)
|
|||
|
||||
int __init acpi_sleep_init(void)
|
||||
{
|
||||
acpi_status status;
|
||||
u8 type_a, type_b;
|
||||
char supported[ACPI_S_STATE_COUNT * 3 + 1];
|
||||
char *pos = supported;
|
||||
int i;
|
||||
|
@ -806,8 +805,7 @@ int __init acpi_sleep_init(void)
|
|||
acpi_sleep_suspend_setup();
|
||||
acpi_sleep_hibernate_setup();
|
||||
|
||||
status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
if (acpi_sleep_state_supported(ACPI_STATE_S5)) {
|
||||
sleep_states[ACPI_STATE_S5] = 1;
|
||||
pm_power_off_prepare = acpi_power_off_prepare;
|
||||
pm_power_off = acpi_power_off;
|
||||
|
|
|
@ -4225,8 +4225,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
|||
|
||||
/* devices that don't properly handle queued TRIM commands */
|
||||
{ "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
|
||||
{ "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
|
||||
{ "Crucial_CT???M500SSD3", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
|
||||
{ "Crucial_CT???M500SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
|
||||
|
||||
/*
|
||||
* Some WD SATA-I drives spin up and down erratically when the link
|
||||
|
|
|
@ -2240,6 +2240,18 @@ int regmap_get_val_bytes(struct regmap *map)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_get_val_bytes);
|
||||
|
||||
int regmap_parse_val(struct regmap *map, const void *buf,
|
||||
unsigned int *val)
|
||||
{
|
||||
if (!map->format.parse_val)
|
||||
return -EINVAL;
|
||||
|
||||
*val = map->format.parse_val(buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regmap_parse_val);
|
||||
|
||||
static int __init regmap_initcall(void)
|
||||
{
|
||||
regmap_debugfs_initcall();
|
||||
|
|
|
@ -1129,7 +1129,7 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif,
|
|||
per_cpu(cpufreq_cpu_data, j) = policy;
|
||||
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
if (cpufreq_driver->get) {
|
||||
if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
|
||||
policy->cur = cpufreq_driver->get(policy->cpu);
|
||||
if (!policy->cur) {
|
||||
pr_err("%s: ->get() failed\n", __func__);
|
||||
|
@ -2143,7 +2143,7 @@ int cpufreq_update_policy(unsigned int cpu)
|
|||
* BIOS might change freq behind our back
|
||||
* -> ask driver for current freq and notify governors about a change
|
||||
*/
|
||||
if (cpufreq_driver->get) {
|
||||
if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
|
||||
new_policy.cur = cpufreq_driver->get(cpu);
|
||||
if (!policy->cur) {
|
||||
pr_debug("Driver did not initialize current freq");
|
||||
|
|
|
@ -4134,8 +4134,11 @@ static void cik_cp_compute_enable(struct radeon_device *rdev, bool enable)
|
|||
{
|
||||
if (enable)
|
||||
WREG32(CP_MEC_CNTL, 0);
|
||||
else
|
||||
else {
|
||||
WREG32(CP_MEC_CNTL, (MEC_ME1_HALT | MEC_ME2_HALT));
|
||||
rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX].ready = false;
|
||||
rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX].ready = false;
|
||||
}
|
||||
udelay(50);
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,8 @@ static void cik_sdma_gfx_stop(struct radeon_device *rdev)
|
|||
WREG32(SDMA0_GFX_RB_CNTL + reg_offset, rb_cntl);
|
||||
WREG32(SDMA0_GFX_IB_CNTL + reg_offset, 0);
|
||||
}
|
||||
rdev->ring[R600_RING_TYPE_DMA_INDEX].ready = false;
|
||||
rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -291,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable)
|
|||
u32 me_cntl, reg_offset;
|
||||
int i;
|
||||
|
||||
if (enable == false) {
|
||||
cik_sdma_gfx_stop(rdev);
|
||||
cik_sdma_rlc_stop(rdev);
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (i == 0)
|
||||
reg_offset = SDMA0_REGISTER_OFFSET;
|
||||
|
@ -420,10 +427,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev)
|
|||
if (!rdev->sdma_fw)
|
||||
return -EINVAL;
|
||||
|
||||
/* stop the gfx rings and rlc compute queues */
|
||||
cik_sdma_gfx_stop(rdev);
|
||||
cik_sdma_rlc_stop(rdev);
|
||||
|
||||
/* halt the MEs */
|
||||
cik_sdma_enable(rdev, false);
|
||||
|
||||
|
@ -492,9 +495,6 @@ int cik_sdma_resume(struct radeon_device *rdev)
|
|||
*/
|
||||
void cik_sdma_fini(struct radeon_device *rdev)
|
||||
{
|
||||
/* stop the gfx rings and rlc compute queues */
|
||||
cik_sdma_gfx_stop(rdev);
|
||||
cik_sdma_rlc_stop(rdev);
|
||||
/* halt the MEs */
|
||||
cik_sdma_enable(rdev, false);
|
||||
radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]);
|
||||
|
|
|
@ -33,6 +33,13 @@
|
|||
#include <linux/vga_switcheroo.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#if defined(CONFIG_VGA_SWITCHEROO)
|
||||
bool radeon_is_px(void);
|
||||
#else
|
||||
static inline bool radeon_is_px(void) { return false; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* radeon_driver_unload_kms - Main unload function for KMS.
|
||||
*
|
||||
|
@ -130,7 +137,8 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
|
|||
"Error during ACPI methods call\n");
|
||||
}
|
||||
|
||||
if (radeon_runtime_pm != 0) {
|
||||
if ((radeon_runtime_pm == 1) ||
|
||||
((radeon_runtime_pm == -1) && radeon_is_px())) {
|
||||
pm_runtime_use_autosuspend(dev->dev);
|
||||
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
|
||||
pm_runtime_set_active(dev->dev);
|
||||
|
|
|
@ -351,9 +351,11 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
|
|||
|
||||
moved:
|
||||
if (bo->evicted) {
|
||||
ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement);
|
||||
if (ret)
|
||||
pr_err("Can not flush read caches\n");
|
||||
if (bdev->driver->invalidate_caches) {
|
||||
ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement);
|
||||
if (ret)
|
||||
pr_err("Can not flush read caches\n");
|
||||
}
|
||||
bo->evicted = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -339,11 +339,13 @@ int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma,
|
|||
vma->vm_private_data = bo;
|
||||
|
||||
/*
|
||||
* PFNMAP is faster than MIXEDMAP due to reduced page
|
||||
* administration. So use MIXEDMAP only if private VMA, where
|
||||
* we need to support COW.
|
||||
* We'd like to use VM_PFNMAP on shared mappings, where
|
||||
* (vma->vm_flags & VM_SHARED) != 0, for performance reasons,
|
||||
* but for some reason VM_PFNMAP + x86 PAT + write-combine is very
|
||||
* bad for performance. Until that has been sorted out, use
|
||||
* VM_MIXEDMAP on all mappings. See freedesktop.org bug #75719
|
||||
*/
|
||||
vma->vm_flags |= (vma->vm_flags & VM_SHARED) ? VM_PFNMAP : VM_MIXEDMAP;
|
||||
vma->vm_flags |= VM_MIXEDMAP;
|
||||
vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
|
||||
return 0;
|
||||
out_unref:
|
||||
|
@ -359,7 +361,7 @@ int ttm_fbdev_mmap(struct vm_area_struct *vma, struct ttm_buffer_object *bo)
|
|||
|
||||
vma->vm_ops = &ttm_bo_vm_ops;
|
||||
vma->vm_private_data = ttm_bo_reference(bo);
|
||||
vma->vm_flags |= (vma->vm_flags & VM_SHARED) ? VM_PFNMAP : VM_MIXEDMAP;
|
||||
vma->vm_flags |= VM_MIXEDMAP;
|
||||
vma->vm_flags |= VM_IO | VM_DONTEXPAND;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -830,6 +830,24 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
|
|||
if (unlikely(ret != 0))
|
||||
goto out_unlock;
|
||||
|
||||
/*
|
||||
* A gb-aware client referencing a shared surface will
|
||||
* expect a backup buffer to be present.
|
||||
*/
|
||||
if (dev_priv->has_mob && req->shareable) {
|
||||
uint32_t backup_handle;
|
||||
|
||||
ret = vmw_user_dmabuf_alloc(dev_priv, tfile,
|
||||
res->backup_size,
|
||||
true,
|
||||
&backup_handle,
|
||||
&res->backup);
|
||||
if (unlikely(ret != 0)) {
|
||||
vmw_resource_unreference(&res);
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
||||
tmp = vmw_resource_reference(&srf->res);
|
||||
ret = ttm_prime_object_init(tfile, res->backup_size, &user_srf->prime,
|
||||
req->shareable, VMW_RES_SURFACE,
|
||||
|
|
|
@ -624,7 +624,8 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm)
|
|||
|
||||
/* Setup sound card */
|
||||
|
||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
|
||||
err = snd_card_new(&pm->pk->hdev->dev, index[dev], id[dev],
|
||||
THIS_MODULE, 0, &card);
|
||||
if (err < 0) {
|
||||
pk_error("failed to create pc-midi sound card\n");
|
||||
err = -ENOMEM;
|
||||
|
@ -660,8 +661,6 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm)
|
|||
snd_rawmidi_set_ops(rwmidi, SNDRV_RAWMIDI_STREAM_INPUT,
|
||||
&pcmidi_in_ops);
|
||||
|
||||
snd_card_set_dev(card, &pm->pk->hdev->dev);
|
||||
|
||||
/* create sysfs variables */
|
||||
err = device_create_file(&pm->pk->hdev->dev,
|
||||
sysfs_device_attr_channel);
|
||||
|
|
|
@ -387,7 +387,7 @@ config I2C_CBUS_GPIO
|
|||
|
||||
config I2C_CPM
|
||||
tristate "Freescale CPM1 or CPM2 (MPC8xx/826x)"
|
||||
depends on (CPM1 || CPM2) && OF_I2C
|
||||
depends on CPM1 || CPM2
|
||||
help
|
||||
This supports the use of the I2C interface on Freescale
|
||||
processors with CPM1 or CPM2.
|
||||
|
|
|
@ -979,12 +979,13 @@ static void issue_copy_real(struct dm_cache_migration *mg)
|
|||
int r;
|
||||
struct dm_io_region o_region, c_region;
|
||||
struct cache *cache = mg->cache;
|
||||
sector_t cblock = from_cblock(mg->cblock);
|
||||
|
||||
o_region.bdev = cache->origin_dev->bdev;
|
||||
o_region.count = cache->sectors_per_block;
|
||||
|
||||
c_region.bdev = cache->cache_dev->bdev;
|
||||
c_region.sector = from_cblock(mg->cblock) * cache->sectors_per_block;
|
||||
c_region.sector = cblock * cache->sectors_per_block;
|
||||
c_region.count = cache->sectors_per_block;
|
||||
|
||||
if (mg->writeback || mg->demote) {
|
||||
|
@ -2464,20 +2465,18 @@ static int cache_map(struct dm_target *ti, struct bio *bio)
|
|||
bool discarded_block;
|
||||
struct dm_bio_prison_cell *cell;
|
||||
struct policy_result lookup_result;
|
||||
struct per_bio_data *pb;
|
||||
struct per_bio_data *pb = init_per_bio_data(bio, pb_data_size);
|
||||
|
||||
if (from_oblock(block) > from_oblock(cache->origin_blocks)) {
|
||||
if (unlikely(from_oblock(block) >= from_oblock(cache->origin_blocks))) {
|
||||
/*
|
||||
* This can only occur if the io goes to a partial block at
|
||||
* the end of the origin device. We don't cache these.
|
||||
* Just remap to the origin and carry on.
|
||||
*/
|
||||
remap_to_origin_clear_discard(cache, bio, block);
|
||||
remap_to_origin(cache, bio);
|
||||
return DM_MAPIO_REMAPPED;
|
||||
}
|
||||
|
||||
pb = init_per_bio_data(bio, pb_data_size);
|
||||
|
||||
if (bio->bi_rw & (REQ_FLUSH | REQ_FUA | REQ_DISCARD)) {
|
||||
defer_bio(cache, bio);
|
||||
return DM_MAPIO_SUBMITTED;
|
||||
|
|
|
@ -145,11 +145,12 @@ static int snd_cx18_init(struct v4l2_device *v4l2_dev)
|
|||
/* This is a no-op for us. We'll use the cx->instance */
|
||||
|
||||
/* (2) Create a card instance */
|
||||
ret = snd_card_create(SNDRV_DEFAULT_IDX1, /* use first available id */
|
||||
SNDRV_DEFAULT_STR1, /* xid from end of shortname*/
|
||||
THIS_MODULE, 0, &sc);
|
||||
ret = snd_card_new(&cx->pci_dev->dev,
|
||||
SNDRV_DEFAULT_IDX1, /* use first available id */
|
||||
SNDRV_DEFAULT_STR1, /* xid from end of shortname*/
|
||||
THIS_MODULE, 0, &sc);
|
||||
if (ret) {
|
||||
CX18_ALSA_ERR("%s: snd_card_create() failed with err %d\n",
|
||||
CX18_ALSA_ERR("%s: snd_card_new() failed with err %d\n",
|
||||
__func__, ret);
|
||||
goto err_exit;
|
||||
}
|
||||
|
|
|
@ -489,7 +489,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
err = snd_card_new(&dev->pci->dev,
|
||||
SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, sizeof(struct cx23885_audio_dev), &card);
|
||||
if (err < 0)
|
||||
goto error;
|
||||
|
@ -500,8 +501,6 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev)
|
|||
chip->card = card;
|
||||
spin_lock_init(&chip->lock);
|
||||
|
||||
snd_card_set_dev(card, &dev->pci->dev);
|
||||
|
||||
err = snd_cx23885_pcm(chip, 0, "CX23885 Digital");
|
||||
if (err < 0)
|
||||
goto error;
|
||||
|
|
|
@ -645,8 +645,9 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev)
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
err = snd_card_create(index[devno], id[devno], THIS_MODULE,
|
||||
sizeof(struct cx25821_audio_dev), &card);
|
||||
err = snd_card_new(&dev->pci->dev, index[devno], id[devno],
|
||||
THIS_MODULE,
|
||||
sizeof(struct cx25821_audio_dev), &card);
|
||||
if (err < 0) {
|
||||
pr_info("DEBUG ERROR: cannot create snd_card_new in %s\n",
|
||||
__func__);
|
||||
|
@ -682,8 +683,6 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev)
|
|||
goto error;
|
||||
}
|
||||
|
||||
snd_card_set_dev(card, &chip->pci->dev);
|
||||
|
||||
strcpy(card->shortname, "cx25821");
|
||||
sprintf(card->longname, "%s at 0x%lx irq %d", chip->dev->name,
|
||||
chip->iobase, chip->irq);
|
||||
|
|
|
@ -852,8 +852,6 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,
|
|||
chip->irq = pci->irq;
|
||||
synchronize_irq(chip->irq);
|
||||
|
||||
snd_card_set_dev(card, &pci->dev);
|
||||
|
||||
*rchip = chip;
|
||||
*core_ptr = core;
|
||||
|
||||
|
@ -876,8 +874,8 @@ static int cx88_audio_initdev(struct pci_dev *pci,
|
|||
return (-ENOENT);
|
||||
}
|
||||
|
||||
err = snd_card_create(index[devno], id[devno], THIS_MODULE,
|
||||
sizeof(snd_cx88_card_t), &card);
|
||||
err = snd_card_new(&pci->dev, index[devno], id[devno], THIS_MODULE,
|
||||
sizeof(snd_cx88_card_t), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
@ -145,11 +145,12 @@ static int snd_ivtv_init(struct v4l2_device *v4l2_dev)
|
|||
/* This is a no-op for us. We'll use the itv->instance */
|
||||
|
||||
/* (2) Create a card instance */
|
||||
ret = snd_card_create(SNDRV_DEFAULT_IDX1, /* use first available id */
|
||||
SNDRV_DEFAULT_STR1, /* xid from end of shortname*/
|
||||
THIS_MODULE, 0, &sc);
|
||||
ret = snd_card_new(&itv->pdev->dev,
|
||||
SNDRV_DEFAULT_IDX1, /* use first available id */
|
||||
SNDRV_DEFAULT_STR1, /* xid from end of shortname*/
|
||||
THIS_MODULE, 0, &sc);
|
||||
if (ret) {
|
||||
IVTV_ALSA_ERR("%s: snd_card_create() failed with err %d\n",
|
||||
IVTV_ALSA_ERR("%s: snd_card_new() failed with err %d\n",
|
||||
__func__, ret);
|
||||
goto err_exit;
|
||||
}
|
||||
|
|
|
@ -1072,8 +1072,8 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
|
|||
if (!enable[devnum])
|
||||
return -ENODEV;
|
||||
|
||||
err = snd_card_create(index[devnum], id[devnum], THIS_MODULE,
|
||||
sizeof(snd_card_saa7134_t), &card);
|
||||
err = snd_card_new(&dev->pci->dev, index[devnum], id[devnum],
|
||||
THIS_MODULE, sizeof(snd_card_saa7134_t), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -1115,8 +1115,6 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
|
|||
if ((err = snd_card_saa7134_pcm(chip, 0)) < 0)
|
||||
goto __nodev;
|
||||
|
||||
snd_card_set_dev(card, &chip->pci->dev);
|
||||
|
||||
/* End of "creation" */
|
||||
|
||||
strcpy(card->shortname, "SAA7134");
|
||||
|
|
|
@ -665,8 +665,8 @@ static int cx231xx_audio_init(struct cx231xx *dev)
|
|||
cx231xx_info("cx231xx-audio.c: probing for cx231xx "
|
||||
"non standard usbaudio\n");
|
||||
|
||||
err = snd_card_create(index[devnr], "Cx231xx Audio", THIS_MODULE,
|
||||
0, &card);
|
||||
err = snd_card_new(&dev->udev->dev, index[devnr], "Cx231xx Audio",
|
||||
THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -682,7 +682,6 @@ static int cx231xx_audio_init(struct cx231xx *dev)
|
|||
pcm->info_flags = 0;
|
||||
pcm->private_data = dev;
|
||||
strcpy(pcm->name, "Conexant cx231xx Capture");
|
||||
snd_card_set_dev(card, &dev->udev->dev);
|
||||
strcpy(card->driver, "Cx231xx-Audio");
|
||||
strcpy(card->shortname, "Cx231xx Audio");
|
||||
strcpy(card->longname, "Conexant cx231xx Audio");
|
||||
|
|
|
@ -900,8 +900,8 @@ static int em28xx_audio_init(struct em28xx *dev)
|
|||
printk(KERN_INFO
|
||||
"em28xx-audio.c: Copyright (C) 2007-2014 Mauro Carvalho Chehab\n");
|
||||
|
||||
err = snd_card_create(index[devnr], "Em28xx Audio", THIS_MODULE, 0,
|
||||
&card);
|
||||
err = snd_card_new(&dev->udev->dev, index[devnr], "Em28xx Audio",
|
||||
THIS_MODULE, 0, &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -918,7 +918,6 @@ static int em28xx_audio_init(struct em28xx *dev)
|
|||
pcm->private_data = dev;
|
||||
strcpy(pcm->name, "Empia 28xx Capture");
|
||||
|
||||
snd_card_set_dev(card, &dev->udev->dev);
|
||||
strcpy(card->driver, "Em28xx-Audio");
|
||||
strcpy(card->shortname, "Em28xx Audio");
|
||||
strcpy(card->longname, "Empia Em28xx Audio");
|
||||
|
|
|
@ -98,13 +98,11 @@ int stk1160_ac97_register(struct stk1160 *dev)
|
|||
* Just want a card to access ac96 controls,
|
||||
* the actual capture interface will be handled by snd-usb-audio
|
||||
*/
|
||||
rc = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, 0, &card);
|
||||
rc = snd_card_new(dev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
|
||||
THIS_MODULE, 0, &card);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
snd_card_set_dev(card, dev->dev);
|
||||
|
||||
/* TODO: I'm not sure where should I get these names :-( */
|
||||
snprintf(card->shortname, sizeof(card->shortname),
|
||||
"stk1160-mixer");
|
||||
|
|
|
@ -300,7 +300,8 @@ int poseidon_audio_init(struct poseidon *p)
|
|||
struct snd_pcm *pcm;
|
||||
int ret;
|
||||
|
||||
ret = snd_card_create(-1, "Telegent", THIS_MODULE, 0, &card);
|
||||
ret = snd_card_new(&p->interface->dev, -1, "Telegent",
|
||||
THIS_MODULE, 0, &card);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -431,7 +431,8 @@ static int tm6000_audio_init(struct tm6000_core *dev)
|
|||
if (!enable[devnr])
|
||||
return -ENOENT;
|
||||
|
||||
rc = snd_card_create(index[devnr], "tm6000", THIS_MODULE, 0, &card);
|
||||
rc = snd_card_new(&dev->udev->dev, index[devnr], "tm6000",
|
||||
THIS_MODULE, 0, &card);
|
||||
if (rc < 0) {
|
||||
snd_printk(KERN_ERR "cannot create card instance %d\n", devnr);
|
||||
return rc;
|
||||
|
@ -445,7 +446,6 @@ static int tm6000_audio_init(struct tm6000_core *dev)
|
|||
le16_to_cpu(dev->udev->descriptor.idVendor),
|
||||
le16_to_cpu(dev->udev->descriptor.idProduct));
|
||||
snd_component_add(card, component);
|
||||
snd_card_set_dev(card, &dev->udev->dev);
|
||||
|
||||
chip = kzalloc(sizeof(struct snd_tm6000_card), GFP_KERNEL);
|
||||
if (!chip) {
|
||||
|
|
|
@ -150,6 +150,12 @@ static int ssc_probe(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
ssc->pdata = (struct atmel_ssc_platform_data *)plat_dat;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
ssc->clk_from_rk_pin =
|
||||
of_property_read_bool(np, "atmel,clk-from-rk-pin");
|
||||
}
|
||||
|
||||
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
|
||||
if (IS_ERR(ssc->regs))
|
||||
|
|
|
@ -240,7 +240,7 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name,
|
|||
|
||||
nid = cpu_to_node(cpu);
|
||||
page = alloc_pages_exact_node(nid,
|
||||
GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
|
||||
GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE,
|
||||
pg_order);
|
||||
if (page == NULL) {
|
||||
dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to alloc %d "
|
||||
|
|
|
@ -730,7 +730,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
|
|||
client_info->ntt = 0;
|
||||
}
|
||||
|
||||
if (!vlan_get_tag(skb, &client_info->vlan_id))
|
||||
if (vlan_get_tag(skb, &client_info->vlan_id))
|
||||
client_info->vlan_id = 0;
|
||||
|
||||
if (!client_info->assigned) {
|
||||
|
|
|
@ -121,6 +121,7 @@ static struct bond_opt_value bond_resend_igmp_tbl[] = {
|
|||
static struct bond_opt_value bond_lp_interval_tbl[] = {
|
||||
{ "minval", 1, BOND_VALFLAG_MIN | BOND_VALFLAG_DEFAULT},
|
||||
{ "maxval", INT_MAX, BOND_VALFLAG_MAX},
|
||||
{ NULL, -1, 0},
|
||||
};
|
||||
|
||||
static struct bond_option bond_opts[] = {
|
||||
|
|
|
@ -2507,6 +2507,7 @@ bnx2_fw_sync(struct bnx2 *bp, u32 msg_data, int ack, int silent)
|
|||
|
||||
bp->fw_wr_seq++;
|
||||
msg_data |= bp->fw_wr_seq;
|
||||
bp->fw_last_msg = msg_data;
|
||||
|
||||
bnx2_shmem_wr(bp, BNX2_DRV_MB, msg_data);
|
||||
|
||||
|
@ -4000,8 +4001,23 @@ bnx2_setup_wol(struct bnx2 *bp)
|
|||
wol_msg = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL;
|
||||
}
|
||||
|
||||
if (!(bp->flags & BNX2_FLAG_NO_WOL))
|
||||
bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT3 | wol_msg, 1, 0);
|
||||
if (!(bp->flags & BNX2_FLAG_NO_WOL)) {
|
||||
u32 val;
|
||||
|
||||
wol_msg |= BNX2_DRV_MSG_DATA_WAIT3;
|
||||
if (bp->fw_last_msg || BNX2_CHIP(bp) != BNX2_CHIP_5709) {
|
||||
bnx2_fw_sync(bp, wol_msg, 1, 0);
|
||||
return;
|
||||
}
|
||||
/* Tell firmware not to power down the PHY yet, otherwise
|
||||
* the chip will take a long time to respond to MMIO reads.
|
||||
*/
|
||||
val = bnx2_shmem_rd(bp, BNX2_PORT_FEATURE);
|
||||
bnx2_shmem_wr(bp, BNX2_PORT_FEATURE,
|
||||
val | BNX2_PORT_FEATURE_ASF_ENABLED);
|
||||
bnx2_fw_sync(bp, wol_msg, 1, 0);
|
||||
bnx2_shmem_wr(bp, BNX2_PORT_FEATURE, val);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4033,9 +4049,22 @@ bnx2_set_power_state(struct bnx2 *bp, pci_power_t state)
|
|||
|
||||
if (bp->wol)
|
||||
pci_set_power_state(bp->pdev, PCI_D3hot);
|
||||
} else {
|
||||
pci_set_power_state(bp->pdev, PCI_D3hot);
|
||||
break;
|
||||
|
||||
}
|
||||
if (!bp->fw_last_msg && BNX2_CHIP(bp) == BNX2_CHIP_5709) {
|
||||
u32 val;
|
||||
|
||||
/* Tell firmware not to power down the PHY yet,
|
||||
* otherwise the other port may not respond to
|
||||
* MMIO reads.
|
||||
*/
|
||||
val = bnx2_shmem_rd(bp, BNX2_BC_STATE_CONDITION);
|
||||
val &= ~BNX2_CONDITION_PM_STATE_MASK;
|
||||
val |= BNX2_CONDITION_PM_STATE_UNPREP;
|
||||
bnx2_shmem_wr(bp, BNX2_BC_STATE_CONDITION, val);
|
||||
}
|
||||
pci_set_power_state(bp->pdev, PCI_D3hot);
|
||||
|
||||
/* No more memory access after this point until
|
||||
* device is brought back to D0.
|
||||
|
|
|
@ -6900,6 +6900,7 @@ struct bnx2 {
|
|||
|
||||
u16 fw_wr_seq;
|
||||
u16 fw_drv_pulse_wr_seq;
|
||||
u32 fw_last_msg;
|
||||
|
||||
int rx_max_ring;
|
||||
int rx_ring_size;
|
||||
|
@ -7406,6 +7407,10 @@ struct bnx2_rv2p_fw_file {
|
|||
#define BNX2_CONDITION_MFW_RUN_NCSI 0x00006000
|
||||
#define BNX2_CONDITION_MFW_RUN_NONE 0x0000e000
|
||||
#define BNX2_CONDITION_MFW_RUN_MASK 0x0000e000
|
||||
#define BNX2_CONDITION_PM_STATE_MASK 0x00030000
|
||||
#define BNX2_CONDITION_PM_STATE_FULL 0x00030000
|
||||
#define BNX2_CONDITION_PM_STATE_PREP 0x00020000
|
||||
#define BNX2_CONDITION_PM_STATE_UNPREP 0x00010000
|
||||
|
||||
#define BNX2_BC_STATE_DEBUG_CMD 0x1dc
|
||||
#define BNX2_BC_STATE_BC_DBG_CMD_SIGNATURE 0x42440000
|
||||
|
|
|
@ -1704,7 +1704,7 @@ bfa_flash_sem_get(void __iomem *bar)
|
|||
while (!bfa_raw_sem_get(bar)) {
|
||||
if (--n <= 0)
|
||||
return BFA_STATUS_BADFLASH;
|
||||
udelay(10000);
|
||||
mdelay(10);
|
||||
}
|
||||
return BFA_STATUS_OK;
|
||||
}
|
||||
|
|
|
@ -632,11 +632,16 @@ static void gem_rx_refill(struct macb *bp)
|
|||
"Unable to allocate sk_buff\n");
|
||||
break;
|
||||
}
|
||||
bp->rx_skbuff[entry] = skb;
|
||||
|
||||
/* now fill corresponding descriptor entry */
|
||||
paddr = dma_map_single(&bp->pdev->dev, skb->data,
|
||||
bp->rx_buffer_size, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&bp->pdev->dev, paddr)) {
|
||||
dev_kfree_skb(skb);
|
||||
break;
|
||||
}
|
||||
|
||||
bp->rx_skbuff[entry] = skb;
|
||||
|
||||
if (entry == RX_RING_SIZE - 1)
|
||||
paddr |= MACB_BIT(RX_WRAP);
|
||||
|
@ -725,7 +730,7 @@ static int gem_rx(struct macb *bp, int budget)
|
|||
skb_put(skb, len);
|
||||
addr = MACB_BF(RX_WADDR, MACB_BFEXT(RX_WADDR, addr));
|
||||
dma_unmap_single(&bp->pdev->dev, addr,
|
||||
len, DMA_FROM_DEVICE);
|
||||
bp->rx_buffer_size, DMA_FROM_DEVICE);
|
||||
|
||||
skb->protocol = eth_type_trans(skb, bp->dev);
|
||||
skb_checksum_none_assert(skb);
|
||||
|
@ -1036,11 +1041,15 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
}
|
||||
|
||||
entry = macb_tx_ring_wrap(bp->tx_head);
|
||||
bp->tx_head++;
|
||||
netdev_vdbg(bp->dev, "Allocated ring entry %u\n", entry);
|
||||
mapping = dma_map_single(&bp->pdev->dev, skb->data,
|
||||
len, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&bp->pdev->dev, mapping)) {
|
||||
kfree_skb(skb);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
bp->tx_head++;
|
||||
tx_skb = &bp->tx_skb[entry];
|
||||
tx_skb->skb = skb;
|
||||
tx_skb->mapping = mapping;
|
||||
|
@ -1066,6 +1075,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if (CIRC_SPACE(bp->tx_head, bp->tx_tail, TX_RING_SIZE) < 1)
|
||||
netif_stop_queue(dev);
|
||||
|
||||
unlock:
|
||||
spin_unlock_irqrestore(&bp->lock, flags);
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
|
|
|
@ -528,13 +528,6 @@ fec_restart(struct net_device *ndev, int duplex)
|
|||
/* Clear any outstanding interrupt. */
|
||||
writel(0xffc00000, fep->hwp + FEC_IEVENT);
|
||||
|
||||
/* Setup multicast filter. */
|
||||
set_multicast_list(ndev);
|
||||
#ifndef CONFIG_M5272
|
||||
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
|
||||
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
|
||||
#endif
|
||||
|
||||
/* Set maximum receive buffer size. */
|
||||
writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE);
|
||||
|
||||
|
@ -655,6 +648,13 @@ fec_restart(struct net_device *ndev, int duplex)
|
|||
|
||||
writel(rcntl, fep->hwp + FEC_R_CNTRL);
|
||||
|
||||
/* Setup multicast filter. */
|
||||
set_multicast_list(ndev);
|
||||
#ifndef CONFIG_M5272
|
||||
writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
|
||||
writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
|
||||
#endif
|
||||
|
||||
if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) {
|
||||
/* enable ENET endian swap */
|
||||
ecntl |= (1 << 8);
|
||||
|
|
|
@ -522,10 +522,21 @@ retry:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static u64 ibmveth_encode_mac_addr(u8 *mac)
|
||||
{
|
||||
int i;
|
||||
u64 encoded = 0;
|
||||
|
||||
for (i = 0; i < ETH_ALEN; i++)
|
||||
encoded = (encoded << 8) | mac[i];
|
||||
|
||||
return encoded;
|
||||
}
|
||||
|
||||
static int ibmveth_open(struct net_device *netdev)
|
||||
{
|
||||
struct ibmveth_adapter *adapter = netdev_priv(netdev);
|
||||
u64 mac_address = 0;
|
||||
u64 mac_address;
|
||||
int rxq_entries = 1;
|
||||
unsigned long lpar_rc;
|
||||
int rc;
|
||||
|
@ -579,8 +590,7 @@ static int ibmveth_open(struct net_device *netdev)
|
|||
adapter->rx_queue.num_slots = rxq_entries;
|
||||
adapter->rx_queue.toggle = 1;
|
||||
|
||||
memcpy(&mac_address, netdev->dev_addr, netdev->addr_len);
|
||||
mac_address = mac_address >> 16;
|
||||
mac_address = ibmveth_encode_mac_addr(netdev->dev_addr);
|
||||
|
||||
rxq_desc.fields.flags_len = IBMVETH_BUF_VALID |
|
||||
adapter->rx_queue.queue_len;
|
||||
|
@ -1183,8 +1193,8 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
|
|||
/* add the addresses to the filter table */
|
||||
netdev_for_each_mc_addr(ha, netdev) {
|
||||
/* add the multicast address to the filter table */
|
||||
unsigned long mcast_addr = 0;
|
||||
memcpy(((char *)&mcast_addr)+2, ha->addr, ETH_ALEN);
|
||||
u64 mcast_addr;
|
||||
mcast_addr = ibmveth_encode_mac_addr(ha->addr);
|
||||
lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
|
||||
IbmVethMcastAddFilter,
|
||||
mcast_addr);
|
||||
|
@ -1372,9 +1382,6 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
|||
|
||||
netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);
|
||||
|
||||
adapter->mac_addr = 0;
|
||||
memcpy(&adapter->mac_addr, mac_addr_p, ETH_ALEN);
|
||||
|
||||
netdev->irq = dev->irq;
|
||||
netdev->netdev_ops = &ibmveth_netdev_ops;
|
||||
netdev->ethtool_ops = &netdev_ethtool_ops;
|
||||
|
@ -1383,7 +1390,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
|||
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
|
||||
netdev->features |= netdev->hw_features;
|
||||
|
||||
memcpy(netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
|
||||
memcpy(netdev->dev_addr, mac_addr_p, ETH_ALEN);
|
||||
|
||||
for (i = 0; i < IBMVETH_NUM_BUFF_POOLS; i++) {
|
||||
struct kobject *kobj = &adapter->rx_buff_pool[i].kobj;
|
||||
|
|
|
@ -138,7 +138,6 @@ struct ibmveth_adapter {
|
|||
struct napi_struct napi;
|
||||
struct net_device_stats stats;
|
||||
unsigned int mcastFilterSize;
|
||||
unsigned long mac_addr;
|
||||
void * buffer_list_addr;
|
||||
void * filter_list_addr;
|
||||
dma_addr_t buffer_list_dma;
|
||||
|
|
|
@ -742,6 +742,14 @@ static int mlx4_en_replace_mac(struct mlx4_en_priv *priv, int qpn,
|
|||
err = mlx4_en_uc_steer_add(priv, new_mac,
|
||||
&qpn,
|
||||
&entry->reg_id);
|
||||
if (err)
|
||||
return err;
|
||||
if (priv->tunnel_reg_id) {
|
||||
mlx4_flow_detach(priv->mdev->dev, priv->tunnel_reg_id);
|
||||
priv->tunnel_reg_id = 0;
|
||||
}
|
||||
err = mlx4_en_tunnel_steer_add(priv, new_mac, qpn,
|
||||
&priv->tunnel_reg_id);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
@ -1792,6 +1800,8 @@ void mlx4_en_stop_port(struct net_device *dev, int detach)
|
|||
mc_list[5] = priv->port;
|
||||
mlx4_multicast_detach(mdev->dev, &priv->rss_map.indir_qp,
|
||||
mc_list, MLX4_PROT_ETH, mclist->reg_id);
|
||||
if (mclist->tunnel_reg_id)
|
||||
mlx4_flow_detach(mdev->dev, mclist->tunnel_reg_id);
|
||||
}
|
||||
mlx4_en_clear_list(dev);
|
||||
list_for_each_entry_safe(mclist, tmp, &priv->curr_list, list) {
|
||||
|
|
|
@ -129,13 +129,14 @@ static void dump_dev_cap_flags2(struct mlx4_dev *dev, u64 flags)
|
|||
[0] = "RSS support",
|
||||
[1] = "RSS Toeplitz Hash Function support",
|
||||
[2] = "RSS XOR Hash Function support",
|
||||
[3] = "Device manage flow steering support",
|
||||
[3] = "Device managed flow steering support",
|
||||
[4] = "Automatic MAC reassignment support",
|
||||
[5] = "Time stamping support",
|
||||
[6] = "VST (control vlan insertion/stripping) support",
|
||||
[7] = "FSM (MAC anti-spoofing) support",
|
||||
[8] = "Dynamic QP updates support",
|
||||
[9] = "TCP/IP offloads/flow-steering for VXLAN support"
|
||||
[9] = "Device managed flow steering IPoIB support",
|
||||
[10] = "TCP/IP offloads/flow-steering for VXLAN support"
|
||||
};
|
||||
int i;
|
||||
|
||||
|
@ -859,7 +860,7 @@ int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave,
|
|||
MLX4_PUT(outbox->buf, field, QUERY_DEV_CAP_CQ_TS_SUPPORT_OFFSET);
|
||||
|
||||
/* For guests, disable vxlan tunneling */
|
||||
MLX4_GET(field, outbox, QUERY_DEV_CAP_VXLAN);
|
||||
MLX4_GET(field, outbox->buf, QUERY_DEV_CAP_VXLAN);
|
||||
field &= 0xf7;
|
||||
MLX4_PUT(outbox->buf, field, QUERY_DEV_CAP_VXLAN);
|
||||
|
||||
|
@ -869,7 +870,7 @@ int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave,
|
|||
MLX4_PUT(outbox->buf, field, QUERY_DEV_CAP_BF_OFFSET);
|
||||
|
||||
/* For guests, disable mw type 2 */
|
||||
MLX4_GET(bmme_flags, outbox, QUERY_DEV_CAP_BMME_FLAGS_OFFSET);
|
||||
MLX4_GET(bmme_flags, outbox->buf, QUERY_DEV_CAP_BMME_FLAGS_OFFSET);
|
||||
bmme_flags &= ~MLX4_BMME_FLAG_TYPE_2_WIN;
|
||||
MLX4_PUT(outbox->buf, bmme_flags, QUERY_DEV_CAP_BMME_FLAGS_OFFSET);
|
||||
|
||||
|
@ -883,7 +884,7 @@ int mlx4_QUERY_DEV_CAP_wrapper(struct mlx4_dev *dev, int slave,
|
|||
}
|
||||
|
||||
/* turn off ipoib managed steering for guests */
|
||||
MLX4_GET(field, outbox, QUERY_DEV_CAP_FLOW_STEERING_IPOIB_OFFSET);
|
||||
MLX4_GET(field, outbox->buf, QUERY_DEV_CAP_FLOW_STEERING_IPOIB_OFFSET);
|
||||
field &= ~0x80;
|
||||
MLX4_PUT(outbox->buf, field, QUERY_DEV_CAP_FLOW_STEERING_IPOIB_OFFSET);
|
||||
|
||||
|
|
|
@ -150,6 +150,8 @@ struct mlx4_port_config {
|
|||
struct pci_dev *pdev;
|
||||
};
|
||||
|
||||
static atomic_t pf_loading = ATOMIC_INIT(0);
|
||||
|
||||
int mlx4_check_port_params(struct mlx4_dev *dev,
|
||||
enum mlx4_port_type *port_type)
|
||||
{
|
||||
|
@ -749,7 +751,7 @@ static void mlx4_request_modules(struct mlx4_dev *dev)
|
|||
has_eth_port = true;
|
||||
}
|
||||
|
||||
if (has_ib_port)
|
||||
if (has_ib_port || (dev->caps.flags & MLX4_DEV_CAP_FLAG_IBOE))
|
||||
request_module_nowait(IB_DRV_NAME);
|
||||
if (has_eth_port)
|
||||
request_module_nowait(EN_DRV_NAME);
|
||||
|
@ -1407,6 +1409,11 @@ static int mlx4_init_slave(struct mlx4_dev *dev)
|
|||
u32 slave_read;
|
||||
u32 cmd_channel_ver;
|
||||
|
||||
if (atomic_read(&pf_loading)) {
|
||||
mlx4_warn(dev, "PF is not ready. Deferring probe\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
mutex_lock(&priv->cmd.slave_cmd_mutex);
|
||||
priv->cmd.max_cmds = 1;
|
||||
mlx4_warn(dev, "Sending reset\n");
|
||||
|
@ -2319,7 +2326,11 @@ static int __mlx4_init_one(struct pci_dev *pdev, int pci_dev_data)
|
|||
|
||||
if (num_vfs) {
|
||||
mlx4_warn(dev, "Enabling SR-IOV with %d VFs\n", num_vfs);
|
||||
|
||||
atomic_inc(&pf_loading);
|
||||
err = pci_enable_sriov(pdev, num_vfs);
|
||||
atomic_dec(&pf_loading);
|
||||
|
||||
if (err) {
|
||||
mlx4_err(dev, "Failed to enable SR-IOV, continuing without SR-IOV (err = %d).\n",
|
||||
err);
|
||||
|
@ -2684,6 +2695,7 @@ static struct pci_driver mlx4_driver = {
|
|||
.name = DRV_NAME,
|
||||
.id_table = mlx4_pci_table,
|
||||
.probe = mlx4_init_one,
|
||||
.shutdown = mlx4_remove_one,
|
||||
.remove = mlx4_remove_one,
|
||||
.err_handler = &mlx4_err_handler,
|
||||
};
|
||||
|
|
|
@ -209,7 +209,7 @@ static const struct {
|
|||
[RTL_GIGA_MAC_VER_16] =
|
||||
_R("RTL8101e", RTL_TD_0, NULL, JUMBO_1K, true),
|
||||
[RTL_GIGA_MAC_VER_17] =
|
||||
_R("RTL8168b/8111b", RTL_TD_1, NULL, JUMBO_4K, false),
|
||||
_R("RTL8168b/8111b", RTL_TD_0, NULL, JUMBO_4K, false),
|
||||
[RTL_GIGA_MAC_VER_18] =
|
||||
_R("RTL8168cp/8111cp", RTL_TD_1, NULL, JUMBO_6K, false),
|
||||
[RTL_GIGA_MAC_VER_19] =
|
||||
|
|
|
@ -151,7 +151,7 @@ static void stmmac_clean_desc3(void *priv_ptr, struct dma_desc *p)
|
|||
sizeof(struct dma_desc)));
|
||||
}
|
||||
|
||||
const struct stmmac_chain_mode_ops chain_mode_ops = {
|
||||
const struct stmmac_mode_ops chain_mode_ops = {
|
||||
.init = stmmac_init_dma_chain,
|
||||
.is_jumbo_frm = stmmac_is_jumbo_frm,
|
||||
.jumbo_frm = stmmac_jumbo_frm,
|
||||
|
|
|
@ -419,20 +419,13 @@ struct mii_regs {
|
|||
unsigned int data; /* MII Data */
|
||||
};
|
||||
|
||||
struct stmmac_ring_mode_ops {
|
||||
unsigned int (*is_jumbo_frm) (int len, int ehn_desc);
|
||||
unsigned int (*jumbo_frm) (void *priv, struct sk_buff *skb, int csum);
|
||||
void (*refill_desc3) (void *priv, struct dma_desc *p);
|
||||
void (*init_desc3) (struct dma_desc *p);
|
||||
void (*clean_desc3) (void *priv, struct dma_desc *p);
|
||||
int (*set_16kib_bfsize) (int mtu);
|
||||
};
|
||||
|
||||
struct stmmac_chain_mode_ops {
|
||||
struct stmmac_mode_ops {
|
||||
void (*init) (void *des, dma_addr_t phy_addr, unsigned int size,
|
||||
unsigned int extend_desc);
|
||||
unsigned int (*is_jumbo_frm) (int len, int ehn_desc);
|
||||
unsigned int (*jumbo_frm) (void *priv, struct sk_buff *skb, int csum);
|
||||
int (*set_16kib_bfsize)(int mtu);
|
||||
void (*init_desc3)(struct dma_desc *p);
|
||||
void (*refill_desc3) (void *priv, struct dma_desc *p);
|
||||
void (*clean_desc3) (void *priv, struct dma_desc *p);
|
||||
};
|
||||
|
@ -441,8 +434,7 @@ struct mac_device_info {
|
|||
const struct stmmac_ops *mac;
|
||||
const struct stmmac_desc_ops *desc;
|
||||
const struct stmmac_dma_ops *dma;
|
||||
const struct stmmac_ring_mode_ops *ring;
|
||||
const struct stmmac_chain_mode_ops *chain;
|
||||
const struct stmmac_mode_ops *mode;
|
||||
const struct stmmac_hwtimestamp *ptp;
|
||||
struct mii_regs mii; /* MII register Addresses */
|
||||
struct mac_link link;
|
||||
|
@ -460,7 +452,7 @@ void stmmac_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,
|
|||
void stmmac_set_mac(void __iomem *ioaddr, bool enable);
|
||||
|
||||
void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
|
||||
extern const struct stmmac_ring_mode_ops ring_mode_ops;
|
||||
extern const struct stmmac_chain_mode_ops chain_mode_ops;
|
||||
extern const struct stmmac_mode_ops ring_mode_ops;
|
||||
extern const struct stmmac_mode_ops chain_mode_ops;
|
||||
|
||||
#endif /* __COMMON_H__ */
|
||||
|
|
|
@ -100,10 +100,9 @@ static void stmmac_refill_desc3(void *priv_ptr, struct dma_desc *p)
|
|||
{
|
||||
struct stmmac_priv *priv = (struct stmmac_priv *)priv_ptr;
|
||||
|
||||
if (unlikely(priv->plat->has_gmac))
|
||||
/* Fill DES3 in case of RING mode */
|
||||
if (priv->dma_buf_sz >= BUF_SIZE_8KiB)
|
||||
p->des3 = p->des2 + BUF_SIZE_8KiB;
|
||||
/* Fill DES3 in case of RING mode */
|
||||
if (priv->dma_buf_sz >= BUF_SIZE_8KiB)
|
||||
p->des3 = p->des2 + BUF_SIZE_8KiB;
|
||||
}
|
||||
|
||||
/* In ring mode we need to fill the desc3 because it is used as buffer */
|
||||
|
@ -126,7 +125,7 @@ static int stmmac_set_16kib_bfsize(int mtu)
|
|||
return ret;
|
||||
}
|
||||
|
||||
const struct stmmac_ring_mode_ops ring_mode_ops = {
|
||||
const struct stmmac_mode_ops ring_mode_ops = {
|
||||
.is_jumbo_frm = stmmac_is_jumbo_frm,
|
||||
.jumbo_frm = stmmac_jumbo_frm,
|
||||
.refill_desc3 = stmmac_refill_desc3,
|
||||
|
|
|
@ -92,8 +92,8 @@ static int tc = TC_DEFAULT;
|
|||
module_param(tc, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(tc, "DMA threshold control value");
|
||||
|
||||
#define DMA_BUFFER_SIZE BUF_SIZE_4KiB
|
||||
static int buf_sz = DMA_BUFFER_SIZE;
|
||||
#define DEFAULT_BUFSIZE 1536
|
||||
static int buf_sz = DEFAULT_BUFSIZE;
|
||||
module_param(buf_sz, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(buf_sz, "DMA buffer size");
|
||||
|
||||
|
@ -136,8 +136,8 @@ static void stmmac_verify_args(void)
|
|||
dma_rxsize = DMA_RX_SIZE;
|
||||
if (unlikely(dma_txsize < 0))
|
||||
dma_txsize = DMA_TX_SIZE;
|
||||
if (unlikely((buf_sz < DMA_BUFFER_SIZE) || (buf_sz > BUF_SIZE_16KiB)))
|
||||
buf_sz = DMA_BUFFER_SIZE;
|
||||
if (unlikely((buf_sz < DEFAULT_BUFSIZE) || (buf_sz > BUF_SIZE_16KiB)))
|
||||
buf_sz = DEFAULT_BUFSIZE;
|
||||
if (unlikely(flow_ctrl > 1))
|
||||
flow_ctrl = FLOW_AUTO;
|
||||
else if (likely(flow_ctrl < 0))
|
||||
|
@ -286,10 +286,25 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
|
|||
|
||||
/* MAC core supports the EEE feature. */
|
||||
if (priv->dma_cap.eee) {
|
||||
/* Check if the PHY supports EEE */
|
||||
if (phy_init_eee(priv->phydev, 1))
|
||||
goto out;
|
||||
int tx_lpi_timer = priv->tx_lpi_timer;
|
||||
|
||||
/* Check if the PHY supports EEE */
|
||||
if (phy_init_eee(priv->phydev, 1)) {
|
||||
/* To manage at run-time if the EEE cannot be supported
|
||||
* anymore (for example because the lp caps have been
|
||||
* changed).
|
||||
* In that case the driver disable own timers.
|
||||
*/
|
||||
if (priv->eee_active) {
|
||||
pr_debug("stmmac: disable EEE\n");
|
||||
del_timer_sync(&priv->eee_ctrl_timer);
|
||||
priv->hw->mac->set_eee_timer(priv->ioaddr, 0,
|
||||
tx_lpi_timer);
|
||||
}
|
||||
priv->eee_active = 0;
|
||||
goto out;
|
||||
}
|
||||
/* Activate the EEE and start timers */
|
||||
if (!priv->eee_active) {
|
||||
priv->eee_active = 1;
|
||||
init_timer(&priv->eee_ctrl_timer);
|
||||
|
@ -300,13 +315,13 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
|
|||
|
||||
priv->hw->mac->set_eee_timer(priv->ioaddr,
|
||||
STMMAC_DEFAULT_LIT_LS,
|
||||
priv->tx_lpi_timer);
|
||||
tx_lpi_timer);
|
||||
} else
|
||||
/* Set HW EEE according to the speed */
|
||||
priv->hw->mac->set_eee_pls(priv->ioaddr,
|
||||
priv->phydev->link);
|
||||
|
||||
pr_info("stmmac: Energy-Efficient Ethernet initialized\n");
|
||||
pr_debug("stmmac: Energy-Efficient Ethernet initialized\n");
|
||||
|
||||
ret = true;
|
||||
}
|
||||
|
@ -886,10 +901,10 @@ static int stmmac_set_bfsize(int mtu, int bufsize)
|
|||
ret = BUF_SIZE_8KiB;
|
||||
else if (mtu >= BUF_SIZE_2KiB)
|
||||
ret = BUF_SIZE_4KiB;
|
||||
else if (mtu >= DMA_BUFFER_SIZE)
|
||||
else if (mtu > DEFAULT_BUFSIZE)
|
||||
ret = BUF_SIZE_2KiB;
|
||||
else
|
||||
ret = DMA_BUFFER_SIZE;
|
||||
ret = DEFAULT_BUFSIZE;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -951,9 +966,9 @@ static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p,
|
|||
|
||||
p->des2 = priv->rx_skbuff_dma[i];
|
||||
|
||||
if ((priv->mode == STMMAC_RING_MODE) &&
|
||||
if ((priv->hw->mode->init_desc3) &&
|
||||
(priv->dma_buf_sz == BUF_SIZE_16KiB))
|
||||
priv->hw->ring->init_desc3(p);
|
||||
priv->hw->mode->init_desc3(p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -984,11 +999,8 @@ static int init_dma_desc_rings(struct net_device *dev)
|
|||
unsigned int bfsize = 0;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
/* Set the max buffer size according to the DESC mode
|
||||
* and the MTU. Note that RING mode allows 16KiB bsize.
|
||||
*/
|
||||
if (priv->mode == STMMAC_RING_MODE)
|
||||
bfsize = priv->hw->ring->set_16kib_bfsize(dev->mtu);
|
||||
if (priv->hw->mode->set_16kib_bfsize)
|
||||
bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu);
|
||||
|
||||
if (bfsize < BUF_SIZE_16KiB)
|
||||
bfsize = stmmac_set_bfsize(dev->mtu, priv->dma_buf_sz);
|
||||
|
@ -1029,15 +1041,15 @@ static int init_dma_desc_rings(struct net_device *dev)
|
|||
/* Setup the chained descriptor addresses */
|
||||
if (priv->mode == STMMAC_CHAIN_MODE) {
|
||||
if (priv->extend_desc) {
|
||||
priv->hw->chain->init(priv->dma_erx, priv->dma_rx_phy,
|
||||
rxsize, 1);
|
||||
priv->hw->chain->init(priv->dma_etx, priv->dma_tx_phy,
|
||||
txsize, 1);
|
||||
priv->hw->mode->init(priv->dma_erx, priv->dma_rx_phy,
|
||||
rxsize, 1);
|
||||
priv->hw->mode->init(priv->dma_etx, priv->dma_tx_phy,
|
||||
txsize, 1);
|
||||
} else {
|
||||
priv->hw->chain->init(priv->dma_rx, priv->dma_rx_phy,
|
||||
rxsize, 0);
|
||||
priv->hw->chain->init(priv->dma_tx, priv->dma_tx_phy,
|
||||
txsize, 0);
|
||||
priv->hw->mode->init(priv->dma_rx, priv->dma_rx_phy,
|
||||
rxsize, 0);
|
||||
priv->hw->mode->init(priv->dma_tx, priv->dma_tx_phy,
|
||||
txsize, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1288,7 +1300,7 @@ static void stmmac_tx_clean(struct stmmac_priv *priv)
|
|||
DMA_TO_DEVICE);
|
||||
priv->tx_skbuff_dma[entry] = 0;
|
||||
}
|
||||
priv->hw->ring->clean_desc3(priv, p);
|
||||
priv->hw->mode->clean_desc3(priv, p);
|
||||
|
||||
if (likely(skb != NULL)) {
|
||||
dev_kfree_skb(skb);
|
||||
|
@ -1844,6 +1856,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
int nfrags = skb_shinfo(skb)->nr_frags;
|
||||
struct dma_desc *desc, *first;
|
||||
unsigned int nopaged_len = skb_headlen(skb);
|
||||
unsigned int enh_desc = priv->plat->enh_desc;
|
||||
|
||||
if (unlikely(stmmac_tx_avail(priv) < nfrags + 1)) {
|
||||
if (!netif_queue_stopped(dev)) {
|
||||
|
@ -1871,27 +1884,19 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
first = desc;
|
||||
|
||||
/* To program the descriptors according to the size of the frame */
|
||||
if (priv->mode == STMMAC_RING_MODE) {
|
||||
is_jumbo = priv->hw->ring->is_jumbo_frm(skb->len,
|
||||
priv->plat->enh_desc);
|
||||
if (unlikely(is_jumbo))
|
||||
entry = priv->hw->ring->jumbo_frm(priv, skb,
|
||||
csum_insertion);
|
||||
} else {
|
||||
is_jumbo = priv->hw->chain->is_jumbo_frm(skb->len,
|
||||
priv->plat->enh_desc);
|
||||
if (unlikely(is_jumbo))
|
||||
entry = priv->hw->chain->jumbo_frm(priv, skb,
|
||||
csum_insertion);
|
||||
}
|
||||
if (enh_desc)
|
||||
is_jumbo = priv->hw->mode->is_jumbo_frm(skb->len, enh_desc);
|
||||
|
||||
if (likely(!is_jumbo)) {
|
||||
desc->des2 = dma_map_single(priv->device, skb->data,
|
||||
nopaged_len, DMA_TO_DEVICE);
|
||||
priv->tx_skbuff_dma[entry] = desc->des2;
|
||||
priv->hw->desc->prepare_tx_desc(desc, 1, nopaged_len,
|
||||
csum_insertion, priv->mode);
|
||||
} else
|
||||
} else {
|
||||
desc = first;
|
||||
entry = priv->hw->mode->jumbo_frm(priv, skb, csum_insertion);
|
||||
}
|
||||
|
||||
for (i = 0; i < nfrags; i++) {
|
||||
const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
|
||||
|
@ -2029,7 +2034,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
|
|||
|
||||
p->des2 = priv->rx_skbuff_dma[entry];
|
||||
|
||||
priv->hw->ring->refill_desc3(priv, p);
|
||||
priv->hw->mode->refill_desc3(priv, p);
|
||||
|
||||
if (netif_msg_rx_status(priv))
|
||||
pr_debug("\trefill entry #%d\n", entry);
|
||||
|
@ -2633,11 +2638,11 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
|
|||
|
||||
/* To use the chained or ring mode */
|
||||
if (chain_mode) {
|
||||
priv->hw->chain = &chain_mode_ops;
|
||||
priv->hw->mode = &chain_mode_ops;
|
||||
pr_info(" Chain mode enabled\n");
|
||||
priv->mode = STMMAC_CHAIN_MODE;
|
||||
} else {
|
||||
priv->hw->ring = &ring_mode_ops;
|
||||
priv->hw->mode = &ring_mode_ops;
|
||||
pr_info(" Ring mode enabled\n");
|
||||
priv->mode = STMMAC_RING_MODE;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ static const struct of_device_id stmmac_dt_ids[] = {
|
|||
#ifdef CONFIG_DWMAC_STI
|
||||
{ .compatible = "st,stih415-dwmac", .data = &sti_gmac_data},
|
||||
{ .compatible = "st,stih416-dwmac", .data = &sti_gmac_data},
|
||||
{ .compatible = "st,stih127-dwmac", .data = &sti_gmac_data},
|
||||
{ .compatible = "st,stid127-dwmac", .data = &sti_gmac_data},
|
||||
#endif
|
||||
/* SoC specific glue layers should come before generic bindings */
|
||||
{ .compatible = "st,spear600-gmac"},
|
||||
|
|
|
@ -442,6 +442,8 @@ static int netvsc_probe(struct hv_device *dev,
|
|||
if (!net)
|
||||
return -ENOMEM;
|
||||
|
||||
netif_carrier_off(net);
|
||||
|
||||
net_device_ctx = netdev_priv(net);
|
||||
net_device_ctx->device_ctx = dev;
|
||||
hv_set_drvdata(dev, net);
|
||||
|
@ -473,6 +475,8 @@ static int netvsc_probe(struct hv_device *dev,
|
|||
pr_err("Unable to register netdev.\n");
|
||||
rndis_filter_device_remove(dev);
|
||||
free_netdev(net);
|
||||
} else {
|
||||
schedule_delayed_work(&net_device_ctx->dwork, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -243,6 +243,22 @@ static int rndis_filter_send_request(struct rndis_device *dev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void rndis_set_link_state(struct rndis_device *rdev,
|
||||
struct rndis_request *request)
|
||||
{
|
||||
u32 link_status;
|
||||
struct rndis_query_complete *query_complete;
|
||||
|
||||
query_complete = &request->response_msg.msg.query_complete;
|
||||
|
||||
if (query_complete->status == RNDIS_STATUS_SUCCESS &&
|
||||
query_complete->info_buflen == sizeof(u32)) {
|
||||
memcpy(&link_status, (void *)((unsigned long)query_complete +
|
||||
query_complete->info_buf_offset), sizeof(u32));
|
||||
rdev->link_state = link_status != 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void rndis_filter_receive_response(struct rndis_device *dev,
|
||||
struct rndis_message *resp)
|
||||
{
|
||||
|
@ -272,6 +288,10 @@ static void rndis_filter_receive_response(struct rndis_device *dev,
|
|||
sizeof(struct rndis_message) + RNDIS_EXT_LEN) {
|
||||
memcpy(&request->response_msg, resp,
|
||||
resp->msg_len);
|
||||
if (request->request_msg.ndis_msg_type ==
|
||||
RNDIS_MSG_QUERY && request->request_msg.msg.
|
||||
query_req.oid == RNDIS_OID_GEN_MEDIA_CONNECT_STATUS)
|
||||
rndis_set_link_state(dev, request);
|
||||
} else {
|
||||
netdev_err(ndev,
|
||||
"rndis response buffer overflow "
|
||||
|
@ -620,7 +640,6 @@ static int rndis_filter_query_device_link_status(struct rndis_device *dev)
|
|||
ret = rndis_filter_query_device(dev,
|
||||
RNDIS_OID_GEN_MEDIA_CONNECT_STATUS,
|
||||
&link_status, &size);
|
||||
dev->link_state = (link_status != 0) ? true : false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -546,12 +546,12 @@ at86rf230_xmit(struct ieee802154_dev *dev, struct sk_buff *skb)
|
|||
int rc;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock(&lp->lock);
|
||||
spin_lock_irqsave(&lp->lock, flags);
|
||||
if (lp->irq_busy) {
|
||||
spin_unlock(&lp->lock);
|
||||
spin_unlock_irqrestore(&lp->lock, flags);
|
||||
return -EBUSY;
|
||||
}
|
||||
spin_unlock(&lp->lock);
|
||||
spin_unlock_irqrestore(&lp->lock, flags);
|
||||
|
||||
might_sleep();
|
||||
|
||||
|
@ -725,10 +725,11 @@ static void at86rf230_irqwork_level(struct work_struct *work)
|
|||
static irqreturn_t at86rf230_isr(int irq, void *data)
|
||||
{
|
||||
struct at86rf230_local *lp = data;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock(&lp->lock);
|
||||
spin_lock_irqsave(&lp->lock, flags);
|
||||
lp->irq_busy = 1;
|
||||
spin_unlock(&lp->lock);
|
||||
spin_unlock_irqrestore(&lp->lock, flags);
|
||||
|
||||
schedule_work(&lp->irqwork);
|
||||
|
||||
|
|
|
@ -164,9 +164,9 @@ static const struct phy_setting settings[] = {
|
|||
* of that setting. Returns the index of the last setting if
|
||||
* none of the others match.
|
||||
*/
|
||||
static inline int phy_find_setting(int speed, int duplex)
|
||||
static inline unsigned int phy_find_setting(int speed, int duplex)
|
||||
{
|
||||
int idx = 0;
|
||||
unsigned int idx = 0;
|
||||
|
||||
while (idx < ARRAY_SIZE(settings) &&
|
||||
(settings[idx].speed != speed || settings[idx].duplex != duplex))
|
||||
|
@ -185,7 +185,7 @@ static inline int phy_find_setting(int speed, int duplex)
|
|||
* the mask in features. Returns the index of the last setting
|
||||
* if nothing else matches.
|
||||
*/
|
||||
static inline int phy_find_valid(int idx, u32 features)
|
||||
static inline unsigned int phy_find_valid(unsigned int idx, u32 features)
|
||||
{
|
||||
while (idx < MAX_NUM_SETTINGS && !(settings[idx].setting & features))
|
||||
idx++;
|
||||
|
@ -204,7 +204,7 @@ static inline int phy_find_valid(int idx, u32 features)
|
|||
static void phy_sanitize_settings(struct phy_device *phydev)
|
||||
{
|
||||
u32 features = phydev->supported;
|
||||
int idx;
|
||||
unsigned int idx;
|
||||
|
||||
/* Sanitize settings based on PHY capabilities */
|
||||
if ((features & SUPPORTED_Autoneg) == 0)
|
||||
|
@ -954,7 +954,8 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
|
|||
(phydev->interface == PHY_INTERFACE_MODE_RGMII))) {
|
||||
int eee_lp, eee_cap, eee_adv;
|
||||
u32 lp, cap, adv;
|
||||
int idx, status;
|
||||
int status;
|
||||
unsigned int idx;
|
||||
|
||||
/* Read phy status to properly get the right settings */
|
||||
status = phy_read_status(phydev);
|
||||
|
|
|
@ -11,7 +11,7 @@ obj-$(CONFIG_USB_HSO) += hso.o
|
|||
obj-$(CONFIG_USB_NET_AX8817X) += asix.o
|
||||
asix-y := asix_devices.o asix_common.o ax88172a.o
|
||||
obj-$(CONFIG_USB_NET_AX88179_178A) += ax88179_178a.o
|
||||
obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o r815x.o
|
||||
obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o
|
||||
obj-$(CONFIG_USB_NET_CDC_EEM) += cdc_eem.o
|
||||
obj-$(CONFIG_USB_NET_DM9601) += dm9601.o
|
||||
obj-$(CONFIG_USB_NET_SR9700) += sr9700.o
|
||||
|
|
|
@ -652,6 +652,13 @@ static const struct usb_device_id products[] = {
|
|||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/* Samsung USB Ethernet Adapters */
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, 0xa101, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
|
||||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/* WHITELIST!!!
|
||||
*
|
||||
* CDC Ether uses two interfaces, not necessarily consecutive.
|
||||
|
|
|
@ -449,9 +449,6 @@ enum rtl8152_flags {
|
|||
#define MCU_TYPE_PLA 0x0100
|
||||
#define MCU_TYPE_USB 0x0000
|
||||
|
||||
#define REALTEK_USB_DEVICE(vend, prod) \
|
||||
USB_DEVICE_INTERFACE_CLASS(vend, prod, USB_CLASS_VENDOR_SPEC)
|
||||
|
||||
struct rx_desc {
|
||||
__le32 opts1;
|
||||
#define RX_LEN_MASK 0x7fff
|
||||
|
@ -2739,6 +2736,12 @@ static int rtl8152_probe(struct usb_interface *intf,
|
|||
struct net_device *netdev;
|
||||
int ret;
|
||||
|
||||
if (udev->actconfig->desc.bConfigurationValue != 1) {
|
||||
usb_driver_set_configuration(udev, 1);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
usb_reset_device(udev);
|
||||
netdev = alloc_etherdev(sizeof(struct r8152));
|
||||
if (!netdev) {
|
||||
dev_err(&intf->dev, "Out of memory\n");
|
||||
|
@ -2819,9 +2822,9 @@ static void rtl8152_disconnect(struct usb_interface *intf)
|
|||
|
||||
/* table of devices that work with this driver */
|
||||
static struct usb_device_id rtl8152_table[] = {
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8152)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8153)},
|
||||
{REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, PRODUCT_ID_SAMSUNG)},
|
||||
{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8152)},
|
||||
{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8153)},
|
||||
{USB_DEVICE(VENDOR_ID_SAMSUNG, PRODUCT_ID_SAMSUNG)},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,248 +0,0 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/mii.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/cdc.h>
|
||||
#include <linux/usb/usbnet.h>
|
||||
|
||||
#define RTL815x_REQT_READ 0xc0
|
||||
#define RTL815x_REQT_WRITE 0x40
|
||||
#define RTL815x_REQ_GET_REGS 0x05
|
||||
#define RTL815x_REQ_SET_REGS 0x05
|
||||
|
||||
#define MCU_TYPE_PLA 0x0100
|
||||
#define OCP_BASE 0xe86c
|
||||
#define BASE_MII 0xa400
|
||||
|
||||
#define BYTE_EN_DWORD 0xff
|
||||
#define BYTE_EN_WORD 0x33
|
||||
#define BYTE_EN_BYTE 0x11
|
||||
|
||||
#define R815x_PHY_ID 32
|
||||
#define REALTEK_VENDOR_ID 0x0bda
|
||||
|
||||
|
||||
static int pla_read_word(struct usb_device *udev, u16 index)
|
||||
{
|
||||
int ret;
|
||||
u8 shift = index & 2;
|
||||
__le32 *tmp;
|
||||
|
||||
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
|
||||
if (!tmp)
|
||||
return -ENOMEM;
|
||||
|
||||
index &= ~3;
|
||||
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL815x_REQ_GET_REGS, RTL815x_REQT_READ,
|
||||
index, MCU_TYPE_PLA, tmp, sizeof(*tmp), 500);
|
||||
if (ret < 0)
|
||||
goto out2;
|
||||
|
||||
ret = __le32_to_cpu(*tmp);
|
||||
ret >>= (shift * 8);
|
||||
ret &= 0xffff;
|
||||
|
||||
out2:
|
||||
kfree(tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pla_write_word(struct usb_device *udev, u16 index, u32 data)
|
||||
{
|
||||
__le32 *tmp;
|
||||
u32 mask = 0xffff;
|
||||
u16 byen = BYTE_EN_WORD;
|
||||
u8 shift = index & 2;
|
||||
int ret;
|
||||
|
||||
tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
|
||||
if (!tmp)
|
||||
return -ENOMEM;
|
||||
|
||||
data &= mask;
|
||||
|
||||
if (shift) {
|
||||
byen <<= shift;
|
||||
mask <<= (shift * 8);
|
||||
data <<= (shift * 8);
|
||||
index &= ~3;
|
||||
}
|
||||
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL815x_REQ_GET_REGS, RTL815x_REQT_READ,
|
||||
index, MCU_TYPE_PLA, tmp, sizeof(*tmp), 500);
|
||||
if (ret < 0)
|
||||
goto out3;
|
||||
|
||||
data |= __le32_to_cpu(*tmp) & ~mask;
|
||||
*tmp = __cpu_to_le32(data);
|
||||
|
||||
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL815x_REQ_SET_REGS, RTL815x_REQT_WRITE,
|
||||
index, MCU_TYPE_PLA | byen, tmp, sizeof(*tmp),
|
||||
500);
|
||||
|
||||
out3:
|
||||
kfree(tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ocp_reg_read(struct usbnet *dev, u16 addr)
|
||||
{
|
||||
u16 ocp_base, ocp_index;
|
||||
int ret;
|
||||
|
||||
ocp_base = addr & 0xf000;
|
||||
ret = pla_write_word(dev->udev, OCP_BASE, ocp_base);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
ocp_index = (addr & 0x0fff) | 0xb000;
|
||||
ret = pla_read_word(dev->udev, ocp_index);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ocp_reg_write(struct usbnet *dev, u16 addr, u16 data)
|
||||
{
|
||||
u16 ocp_base, ocp_index;
|
||||
int ret;
|
||||
|
||||
ocp_base = addr & 0xf000;
|
||||
ret = pla_write_word(dev->udev, OCP_BASE, ocp_base);
|
||||
if (ret < 0)
|
||||
goto out1;
|
||||
|
||||
ocp_index = (addr & 0x0fff) | 0xb000;
|
||||
ret = pla_write_word(dev->udev, ocp_index, data);
|
||||
|
||||
out1:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int r815x_mdio_read(struct net_device *netdev, int phy_id, int reg)
|
||||
{
|
||||
struct usbnet *dev = netdev_priv(netdev);
|
||||
int ret;
|
||||
|
||||
if (phy_id != R815x_PHY_ID)
|
||||
return -EINVAL;
|
||||
|
||||
if (usb_autopm_get_interface(dev->intf) < 0)
|
||||
return -ENODEV;
|
||||
|
||||
ret = ocp_reg_read(dev, BASE_MII + reg * 2);
|
||||
|
||||
usb_autopm_put_interface(dev->intf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static
|
||||
void r815x_mdio_write(struct net_device *netdev, int phy_id, int reg, int val)
|
||||
{
|
||||
struct usbnet *dev = netdev_priv(netdev);
|
||||
|
||||
if (phy_id != R815x_PHY_ID)
|
||||
return;
|
||||
|
||||
if (usb_autopm_get_interface(dev->intf) < 0)
|
||||
return;
|
||||
|
||||
ocp_reg_write(dev, BASE_MII + reg * 2, val);
|
||||
|
||||
usb_autopm_put_interface(dev->intf);
|
||||
}
|
||||
|
||||
static int r8153_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = usbnet_cdc_bind(dev, intf);
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
dev->mii.dev = dev->net;
|
||||
dev->mii.mdio_read = r815x_mdio_read;
|
||||
dev->mii.mdio_write = r815x_mdio_write;
|
||||
dev->mii.phy_id_mask = 0x3f;
|
||||
dev->mii.reg_num_mask = 0x1f;
|
||||
dev->mii.phy_id = R815x_PHY_ID;
|
||||
dev->mii.supports_gmii = 1;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static int r8152_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = usbnet_cdc_bind(dev, intf);
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
dev->mii.dev = dev->net;
|
||||
dev->mii.mdio_read = r815x_mdio_read;
|
||||
dev->mii.mdio_write = r815x_mdio_write;
|
||||
dev->mii.phy_id_mask = 0x3f;
|
||||
dev->mii.reg_num_mask = 0x1f;
|
||||
dev->mii.phy_id = R815x_PHY_ID;
|
||||
dev->mii.supports_gmii = 0;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static const struct driver_info r8152_info = {
|
||||
.description = "RTL8152 ECM Device",
|
||||
.flags = FLAG_ETHER | FLAG_POINTTOPOINT,
|
||||
.bind = r8152_bind,
|
||||
.unbind = usbnet_cdc_unbind,
|
||||
.status = usbnet_cdc_status,
|
||||
.manage_power = usbnet_manage_power,
|
||||
};
|
||||
|
||||
static const struct driver_info r8153_info = {
|
||||
.description = "RTL8153 ECM Device",
|
||||
.flags = FLAG_ETHER | FLAG_POINTTOPOINT,
|
||||
.bind = r8153_bind,
|
||||
.unbind = usbnet_cdc_unbind,
|
||||
.status = usbnet_cdc_status,
|
||||
.manage_power = usbnet_manage_power,
|
||||
};
|
||||
|
||||
static const struct usb_device_id products[] = {
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(REALTEK_VENDOR_ID, 0x8152, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
|
||||
.driver_info = (unsigned long) &r8152_info,
|
||||
},
|
||||
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(REALTEK_VENDOR_ID, 0x8153, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
|
||||
.driver_info = (unsigned long) &r8153_info,
|
||||
},
|
||||
|
||||
{ }, /* END */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, products);
|
||||
|
||||
static struct usb_driver r815x_driver = {
|
||||
.name = "r815x",
|
||||
.id_table = products,
|
||||
.probe = usbnet_probe,
|
||||
.disconnect = usbnet_disconnect,
|
||||
.suspend = usbnet_suspend,
|
||||
.resume = usbnet_resume,
|
||||
.reset_resume = usbnet_resume,
|
||||
.supports_autosuspend = 1,
|
||||
.disable_hub_initiated_lpm = 1,
|
||||
};
|
||||
|
||||
module_usb_driver(r815x_driver);
|
||||
|
||||
MODULE_AUTHOR("Hayes Wang");
|
||||
MODULE_DESCRIPTION("Realtek USB ECM device");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -1762,11 +1762,20 @@ vmxnet3_netpoll(struct net_device *netdev)
|
|||
{
|
||||
struct vmxnet3_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
if (adapter->intr.mask_mode == VMXNET3_IMM_ACTIVE)
|
||||
vmxnet3_disable_all_intrs(adapter);
|
||||
|
||||
vmxnet3_do_poll(adapter, adapter->rx_queue[0].rx_ring[0].size);
|
||||
vmxnet3_enable_all_intrs(adapter);
|
||||
switch (adapter->intr.type) {
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
case VMXNET3_IT_MSIX: {
|
||||
int i;
|
||||
for (i = 0; i < adapter->num_rx_queues; i++)
|
||||
vmxnet3_msix_rx(0, &adapter->rx_queue[i]);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case VMXNET3_IT_MSI:
|
||||
default:
|
||||
vmxnet3_intr(0, adapter->netdev);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
#endif /* CONFIG_NET_POLL_CONTROLLER */
|
||||
|
|
|
@ -872,8 +872,11 @@ void iwl_mvm_bt_rssi_event(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
/* Rssi update while not associated ?! */
|
||||
if (WARN_ON_ONCE(mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT))
|
||||
/*
|
||||
* Rssi update while not associated - can happen since the statistics
|
||||
* are handled asynchronously
|
||||
*/
|
||||
if (mvmvif->ap_sta_id == IWL_MVM_STATION_COUNT)
|
||||
return;
|
||||
|
||||
/* No BT - reports should be disabled */
|
||||
|
|
|
@ -359,13 +359,12 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
|
|||
/* 7265 Series */
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5112, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5100, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x510A, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_n_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)},
|
||||
{IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче