summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* stmmac: pci: set default of the filter binsAndy Shevchenko2014-10-311-0/+7
| | | | | | | | | | | The commit 3b57de958e2a brought the support for a different amount of the filter bins, but didn't update the PCI driver accordingly. This patch appends the default values when the device is enumerated via PCI bus. Fixes: 3b57de958e2a (net: stmmac: Support devicetree configs for mcast and ucast filter entries) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
* net: stmmac: Add support for optional reset controlChen-Yu Tsai2014-01-201-2/+2
| | | | | | | | | | | The DWMAC has a reset assert line, which is used on some SoCs. Add an optional reset control to stmmac driver core. To support reset control deferred probing, this patch changes the driver probe function to return the actual error, instead of just -EINVAL. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmicro: make local variables staticstephen hemminger2014-01-021-3/+3
| | | | | | | | Make variables only used in one file static. Also avoids possible namespace collisions. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: remove unnecessary pci_set_drvdata()Jingoo Han2013-10-221-1/+0Star
| | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: code tidy-upGiuseppe CAVALLARO2013-04-081-1/+1
| | | | | | | | | This patch tidies up the code. I have run Linden (and verified with checkpatch) many part of the driver trying to reorganize some sections respecting the codying-style rules in the points where it was not done. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: don't return zero on failure path in stmmac_pci_probe()Alexey Khoroshilov2013-02-031-0/+1
| | | | | | | | | | | If stmmac_dvr_probe() fails in stmmac_pci_probe(), it breaks off initialization, deallocates all resources, but returns zero. The patch adds -ENODEV as return value in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman2012-12-071-1/+1
| | | | | | | | | | | | The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: remove __dev* attributesBill Pemberton2012-12-031-3/+3
| | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* net:stmmac: Remove bus_id from mdio platform data.Srinivas Kandagatla2012-08-311-1/+0Star
| | | | | | | | | | | | This patch removes bus_id from mdio platform data, The reason to remove bus_id is, stmmac mdio bus_id is always same as stmmac bus-id, so there is no point in passing this in different variable. Also stmmac ethernet driver connects to phy with bus_id passed its platform data. So, having single bus-id is much simpler. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functionsBen Hutchings2012-07-111-1/+1
| | | | | | | | | | Fix incorrect start markers, wrapped summary lines, missing section breaks, incorrect separators, and some name mismatches. Delete a few that are content-free. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: fix driver Kconfig when built as moduleGiuseppe CAVALLARO2012-06-061-28/+1Star
| | | | | | | | | | | | | | | | | | This patches fixes the driver when built as dynamic module. In fact, the platform part cannot be built and the probe fails (thanks to Bob Liu that reported this bug). v2: as D. Miller suggested, it is not necessary to make the pci and the platform code mutually exclusive. Having both could also help, at built time ,to verify that all the code is validated and compiles fine. v3: removed wrong Reviewed-by from the patch Reported-by: Bob Liu <lliubbo@gmail.com> cc: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: verify the dma_cfg platform fieldsGiuseppe CAVALLARO2012-04-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Recently the dma parameters that can be passed from the platform have been moved from the plat_stmmacenet_data to the stmmac_dma_cfg. In case of this new structure is not well allocated the driver can fails. This is an example how this field is managed in ST platforms static struct stmmac_dma_cfg gmac_dma_setting = { .pbl = 32, }; static struct plat_stmmacenet_data stih415_ethernet_platform_data[] = { { .dma_cfg = &gmac_dma_setting, .has_gmac = 1, [snip] This patch so verifies that the dma_cfg passed from the platform. In case of it is NULL there is no reason that the driver has to fail and some default values can be passed. These are ok for all the Synopsys chips and could impact on performances, only. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> cc: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: re-work the internal GMAC DMA platf parametersDeepak SIKRI2012-04-051-1/+2
| | | | | | | | | | | | | | | | | This patch re-works the internal GMAC DMA parameters passed from the platform. In the past, we only passed the pbl but, with new core, other parameters can be passed and are mandatory on some platforms. New parameters are documented in stmmac.txt because this patch has an impact for many platforms. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-02-191-3/+1Star
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c Small minor conflict in bnx2x, wherein one commit changed how statistics were stored in software, and another commit fixed endianness bugs wrt. reading the values provided by the chip in memory. Signed-off-by: David S. Miller <davem@davemloft.net>
| * stmmac: move hw init in the probe (v2)Giuseppe CAVALLARO2012-02-151-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the MAC HW initialization and the HW feature verification from the open to the probe function as D. Miller suggested. So the patch actually reorganizes and tidies-up some parts of the driver and indeed fixes some problem when tune its HW features. These can be overwritten by looking at the HW cap register at run-time and that generated problems. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Reviewed-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmicro: Fix typo in stmmac_pci.c and stmmac_platform.cMasanari Iida2012-02-131-1/+1
| | | | | | | | | | | | | | | | | | Correct spelling "drivr" to "driver" in drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | stmmac: Fix typo in stmmac_pci.cMasanari Iida2012-02-081-1/+1
|/ | | | | | | | Correct spelling "regiser" to "register" in drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: added PCI identifiersAlessandro Rubini2012-01-241-3/+3
| | | | | | | | | | STM has a device ID within its own VENDOR space, and it is being used in the STA2X11 I/O Hub. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: add the experimental PCI supportGiuseppe CAVALLARO2011-12-211-0/+221
This patch adds the PCI support (as EXPERIMENTAL) this has been also tested on XLINX XC2V3000 FF1152AMT0221 D1215994A VIRTEX FPGA board. To support the PCI bus the main part has been reworked and both the platform and the PCI specific parts have been moved into different files. Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>