aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2013-04-07 22:10:00 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-08 16:55:27 -0400
commit32ceabcad3c8abd46de033778497c2e77a097554 (patch)
tree47dc2f3233685a3456bf49d56341e1113a7dac20
parent49cfbf675cd18330cef3c4613e890b0044510e95 (diff)
stmmac: improve/review and fix kernel-doc
this patch reviews/improves and adds some fixes in the code doc. Also kernel-doc passes w/o any warnings. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c184
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c8
2 files changed, 142 insertions, 50 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3ac9bd7b0781..77f36225062b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -81,14 +81,14 @@
81#define JUMBO_LEN 9000 81#define JUMBO_LEN 9000
82 82
83/* Module parameters */ 83/* Module parameters */
84#define TX_TIMEO 5000 /* default 5 seconds */ 84#define TX_TIMEO 5000
85static int watchdog = TX_TIMEO; 85static int watchdog = TX_TIMEO;
86module_param(watchdog, int, S_IRUGO | S_IWUSR); 86module_param(watchdog, int, S_IRUGO | S_IWUSR);
87MODULE_PARM_DESC(watchdog, "Transmit timeout in milliseconds"); 87MODULE_PARM_DESC(watchdog, "Transmit timeout in milliseconds (default 5s)");
88 88
89static int debug = -1; /* -1: default, 0: no output, 16: all */ 89static int debug = -1;
90module_param(debug, int, S_IRUGO | S_IWUSR); 90module_param(debug, int, S_IRUGO | S_IWUSR);
91MODULE_PARM_DESC(debug, "Message Level (0: no output, 16: all)"); 91MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)");
92 92
93int phyaddr = -1; 93int phyaddr = -1;
94module_param(phyaddr, int, S_IRUGO); 94module_param(phyaddr, int, S_IRUGO);
@@ -173,6 +173,18 @@ static void stmmac_verify_args(void)
173 eee_timer = STMMAC_DEFAULT_LPI_TIMER; 173 eee_timer = STMMAC_DEFAULT_LPI_TIMER;
174} 174}
175 175
176/**
177 * stmmac_clk_csr_set - dynamically set the MDC clock
178 * @priv: driver private structure
179 * Description: this is to dynamically set the MDC clock according to the csr
180 * clock input.
181 * Note:
182 * If a specific clk_csr value is passed from the platform
183 * this means that the CSR Clock Range selection cannot be
184 * changed at run-time and it is fixed (as reported in the driver
185 * documentation). Viceversa the driver will try to set the MDC
186 * clock dynamically according to the actual clock input.
187 */
176static void stmmac_clk_csr_set(struct stmmac_priv *priv) 188static void stmmac_clk_csr_set(struct stmmac_priv *priv)
177{ 189{
178 u32 clk_rate; 190 u32 clk_rate;
@@ -222,8 +234,11 @@ static inline u32 stmmac_tx_avail(struct stmmac_priv *priv)
222 return priv->dirty_tx + priv->dma_tx_size - priv->cur_tx - 1; 234 return priv->dirty_tx + priv->dma_tx_size - priv->cur_tx - 1;
223} 235}
224 236
225/* On some ST platforms, some HW system configuraton registers have to be 237/**
226 * set according to the link speed negotiated. 238 * stmmac_hw_fix_mac_speed: callback for speed selection
239 * @priv: driver private structure
240 * Description: on some platforms (e.g. ST), some HW system configuraton
241 * registers have to be set according to the link speed negotiated.
227 */ 242 */
228static inline void stmmac_hw_fix_mac_speed(struct stmmac_priv *priv) 243static inline void stmmac_hw_fix_mac_speed(struct stmmac_priv *priv)
229{ 244{
@@ -234,6 +249,11 @@ static inline void stmmac_hw_fix_mac_speed(struct stmmac_priv *priv)
234 phydev->speed); 249 phydev->speed);
235} 250}
236 251
252/**
253 * stmmac_enable_eee_mode: Check and enter in LPI mode
254 * @priv: driver private structure
255 * Description: this function is to verify and enter in LPI mode for EEE.
256 */
237static void stmmac_enable_eee_mode(struct stmmac_priv *priv) 257static void stmmac_enable_eee_mode(struct stmmac_priv *priv)
238{ 258{
239 /* Check and enter in LPI mode */ 259 /* Check and enter in LPI mode */
@@ -242,19 +262,24 @@ static void stmmac_enable_eee_mode(struct stmmac_priv *priv)
242 priv->hw->mac->set_eee_mode(priv->ioaddr); 262 priv->hw->mac->set_eee_mode(priv->ioaddr);
243} 263}
244 264
265/**
266 * stmmac_disable_eee_mode: disable/exit from EEE
267 * @priv: driver private structure
268 * Description: this function is to exit and disable EEE in case of
269 * LPI state is true. This is called by the xmit.
270 */
245void stmmac_disable_eee_mode(struct stmmac_priv *priv) 271void stmmac_disable_eee_mode(struct stmmac_priv *priv)
246{ 272{
247 /* Exit and disable EEE in case of we are are in LPI state. */
248 priv->hw->mac->reset_eee_mode(priv->ioaddr); 273 priv->hw->mac->reset_eee_mode(priv->ioaddr);
249 del_timer_sync(&priv->eee_ctrl_timer); 274 del_timer_sync(&priv->eee_ctrl_timer);
250 priv->tx_path_in_lpi_mode = false; 275 priv->tx_path_in_lpi_mode = false;
251} 276}
252 277
253/** 278/**
254 * stmmac_eee_ctrl_timer 279 * stmmac_eee_ctrl_timer: EEE TX SW timer.
255 * @arg : data hook 280 * @arg : data hook
256 * Description: 281 * Description:
257 * If there is no data transfer and if we are not in LPI state, 282 * if there is no data transfer and if we are not in LPI state,
258 * then MAC Transmitter can be moved to LPI state. 283 * then MAC Transmitter can be moved to LPI state.
259 */ 284 */
260static void stmmac_eee_ctrl_timer(unsigned long arg) 285static void stmmac_eee_ctrl_timer(unsigned long arg)
@@ -266,8 +291,8 @@ static void stmmac_eee_ctrl_timer(unsigned long arg)
266} 291}
267 292
268/** 293/**
269 * stmmac_eee_init 294 * stmmac_eee_init: init EEE
270 * @priv: private device pointer 295 * @priv: driver private structure
271 * Description: 296 * Description:
272 * If the EEE support has been enabled while configuring the driver, 297 * If the EEE support has been enabled while configuring the driver,
273 * if the GMAC actually supports the EEE (from the HW cap reg) and the 298 * if the GMAC actually supports the EEE (from the HW cap reg) and the
@@ -303,18 +328,22 @@ out:
303 return ret; 328 return ret;
304} 329}
305 330
331/**
332 * stmmac_eee_adjust: adjust HW EEE according to the speed
333 * @priv: driver private structure
334 * Description:
335 * When the EEE has been already initialised we have to
336 * modify the PLS bit in the LPI ctrl & status reg according
337 * to the PHY link status. For this reason.
338 */
306static void stmmac_eee_adjust(struct stmmac_priv *priv) 339static void stmmac_eee_adjust(struct stmmac_priv *priv)
307{ 340{
308 /* When the EEE has been already initialised we have to
309 * modify the PLS bit in the LPI ctrl & status reg according
310 * to the PHY link status. For this reason.
311 */
312 if (priv->eee_enabled) 341 if (priv->eee_enabled)
313 priv->hw->mac->set_eee_pls(priv->ioaddr, priv->phydev->link); 342 priv->hw->mac->set_eee_pls(priv->ioaddr, priv->phydev->link);
314} 343}
315 344
316/* stmmac_get_tx_hwtstamp: 345/* stmmac_get_tx_hwtstamp: get HW TX timestamps
317 * @priv : pointer to private device structure. 346 * @priv: driver private structure
318 * @entry : descriptor index to be used. 347 * @entry : descriptor index to be used.
319 * @skb : the socket buffer 348 * @skb : the socket buffer
320 * Description : 349 * Description :
@@ -356,8 +385,8 @@ static void stmmac_get_tx_hwtstamp(struct stmmac_priv *priv,
356 return; 385 return;
357} 386}
358 387
359/* stmmac_get_rx_hwtstamp: 388/* stmmac_get_rx_hwtstamp: get HW RX timestamps
360 * @priv : pointer to private device structure. 389 * @priv: driver private structure
361 * @entry : descriptor index to be used. 390 * @entry : descriptor index to be used.
362 * @skb : the socket buffer 391 * @skb : the socket buffer
363 * Description : 392 * Description :
@@ -618,6 +647,13 @@ static int stmmac_hwtstamp_ioctl(struct net_device *dev, struct ifreq *ifr)
618 sizeof(struct hwtstamp_config)) ? -EFAULT : 0; 647 sizeof(struct hwtstamp_config)) ? -EFAULT : 0;
619} 648}
620 649
650/**
651 * stmmac_init_ptp: init PTP
652 * @priv: driver private structure
653 * Description: this is to verify if the HW supports the PTPv1 or v2.
654 * This is done by looking at the HW cap. register.
655 * Also it registers the ptp driver.
656 */
621static int stmmac_init_ptp(struct stmmac_priv *priv) 657static int stmmac_init_ptp(struct stmmac_priv *priv)
622{ 658{
623 if (!(priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp)) 659 if (!(priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp))
@@ -740,6 +776,13 @@ static void stmmac_adjust_link(struct net_device *dev)
740 DBG(probe, DEBUG, "stmmac_adjust_link: exiting\n"); 776 DBG(probe, DEBUG, "stmmac_adjust_link: exiting\n");
741} 777}
742 778
779/**
780 * stmmac_check_pcs_mode: verify if RGMII/SGMII is supported
781 * @priv: driver private structure
782 * Description: this is to verify if the HW supports the PCS.
783 * Physical Coding Sublayer (PCS) interface that can be used when the MAC is
784 * configured for the TBI, RTBI, or SGMII PHY interface.
785 */
743static void stmmac_check_pcs_mode(struct stmmac_priv *priv) 786static void stmmac_check_pcs_mode(struct stmmac_priv *priv)
744{ 787{
745 int interface = priv->plat->interface; 788 int interface = priv->plat->interface;
@@ -821,9 +864,10 @@ static int stmmac_init_phy(struct net_device *dev)
821} 864}
822 865
823/** 866/**
824 * stmmac_display_ring 867 * stmmac_display_ring: display ring
825 * @p: pointer to the ring. 868 * @head: pointer to the head of the ring passed.
826 * @size: size of the ring. 869 * @size: size of the ring.
870 * @extend_desc: to verify if extended descriptors are used.
827 * Description: display the control/status and buffer descriptors. 871 * Description: display the control/status and buffer descriptors.
828 */ 872 */
829static void stmmac_display_ring(void *head, int size, int extend_desc) 873static void stmmac_display_ring(void *head, int size, int extend_desc)
@@ -887,6 +931,12 @@ static int stmmac_set_bfsize(int mtu, int bufsize)
887 return ret; 931 return ret;
888} 932}
889 933
934/**
935 * stmmac_clear_descriptors: clear descriptors
936 * @priv: driver private structure
937 * Description: this function is called to clear the tx and rx descriptors
938 * in case of both basic and extended descriptors are used.
939 */
890static void stmmac_clear_descriptors(struct stmmac_priv *priv) 940static void stmmac_clear_descriptors(struct stmmac_priv *priv)
891{ 941{
892 int i; 942 int i;
@@ -1129,7 +1179,7 @@ static void free_dma_desc_resources(struct stmmac_priv *priv)
1129 1179
1130/** 1180/**
1131 * stmmac_dma_operation_mode - HW DMA operation mode 1181 * stmmac_dma_operation_mode - HW DMA operation mode
1132 * @priv : pointer to the private device structure. 1182 * @priv: driver private structure
1133 * Description: it sets the DMA operation mode: tx/rx DMA thresholds 1183 * Description: it sets the DMA operation mode: tx/rx DMA thresholds
1134 * or Store-And-Forward capability. 1184 * or Store-And-Forward capability.
1135 */ 1185 */
@@ -1153,7 +1203,7 @@ static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
1153 1203
1154/** 1204/**
1155 * stmmac_tx_clean: 1205 * stmmac_tx_clean:
1156 * @priv: private data pointer 1206 * @priv: driver private structure
1157 * Description: it reclaims resources after transmission completes. 1207 * Description: it reclaims resources after transmission completes.
1158 */ 1208 */
1159static void stmmac_tx_clean(struct stmmac_priv *priv) 1209static void stmmac_tx_clean(struct stmmac_priv *priv)
@@ -1245,8 +1295,8 @@ static inline void stmmac_disable_dma_irq(struct stmmac_priv *priv)
1245 1295
1246 1296
1247/** 1297/**
1248 * stmmac_tx_err: 1298 * stmmac_tx_err: irq tx error mng function
1249 * @priv: pointer to the private device structure 1299 * @priv: driver private structure
1250 * Description: it cleans the descriptors and restarts the transmission 1300 * Description: it cleans the descriptors and restarts the transmission
1251 * in case of errors. 1301 * in case of errors.
1252 */ 1302 */
@@ -1275,6 +1325,14 @@ static void stmmac_tx_err(struct stmmac_priv *priv)
1275 netif_wake_queue(priv->dev); 1325 netif_wake_queue(priv->dev);
1276} 1326}
1277 1327
1328/**
1329 * stmmac_dma_interrupt: DMA ISR
1330 * @priv: driver private structure
1331 * Description: this is the DMA ISR. It is called by the main ISR.
1332 * It calls the dwmac dma routine to understand which type of interrupt
1333 * happened. In case of there is a Normal interrupt and either TX or RX
1334 * interrupt happened so the NAPI is scheduled.
1335 */
1278static void stmmac_dma_interrupt(struct stmmac_priv *priv) 1336static void stmmac_dma_interrupt(struct stmmac_priv *priv)
1279{ 1337{
1280 int status; 1338 int status;
@@ -1297,13 +1355,16 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
1297 stmmac_tx_err(priv); 1355 stmmac_tx_err(priv);
1298} 1356}
1299 1357
1358/**
1359 * stmmac_mmc_setup: setup the Mac Management Counters (MMC)
1360 * @priv: driver private structure
1361 * Description: this masks the MMC irq, in fact, the counters are managed in SW.
1362 */
1300static void stmmac_mmc_setup(struct stmmac_priv *priv) 1363static void stmmac_mmc_setup(struct stmmac_priv *priv)
1301{ 1364{
1302 unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET | 1365 unsigned int mode = MMC_CNTRL_RESET_ON_READ | MMC_CNTRL_COUNTER_RESET |
1303 MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET; 1366 MMC_CNTRL_PRESET | MMC_CNTRL_FULL_HALF_PRESET;
1304 1367
1305 /* Mask MMC irq, counters are managed in SW and registers
1306 * are cleared on each READ eventually. */
1307 dwmac_mmc_intr_all_mask(priv->ioaddr); 1368 dwmac_mmc_intr_all_mask(priv->ioaddr);
1308 1369
1309 if (priv->dma_cap.rmon) { 1370 if (priv->dma_cap.rmon) {
@@ -1332,9 +1393,11 @@ static u32 stmmac_get_synopsys_id(struct stmmac_priv *priv)
1332} 1393}
1333 1394
1334/** 1395/**
1335 * stmmac_selec_desc_mode 1396 * stmmac_selec_desc_mode: to select among: normal/alternate/extend descriptors
1336 * @priv : private structure 1397 * @priv: driver private structure
1337 * Description: select the Enhanced/Alternate or Normal descriptors 1398 * Description: select the Enhanced/Alternate or Normal descriptors.
1399 * In case of Enhanced/Alternate, it looks at the extended descriptors are
1400 * supported by the HW cap. register.
1338 */ 1401 */
1339static void stmmac_selec_desc_mode(struct stmmac_priv *priv) 1402static void stmmac_selec_desc_mode(struct stmmac_priv *priv)
1340{ 1403{
@@ -1356,8 +1419,8 @@ static void stmmac_selec_desc_mode(struct stmmac_priv *priv)
1356} 1419}
1357 1420
1358/** 1421/**
1359 * stmmac_get_hw_features 1422 * stmmac_get_hw_features: get MAC capabilities from the HW cap. register.
1360 * @priv : private device pointer 1423 * @priv: driver private structure
1361 * Description: 1424 * Description:
1362 * new GMAC chip generations have a new register to indicate the 1425 * new GMAC chip generations have a new register to indicate the
1363 * presence of the optional feature/functions. 1426 * presence of the optional feature/functions.
@@ -1415,10 +1478,15 @@ static int stmmac_get_hw_features(struct stmmac_priv *priv)
1415 return hw_cap; 1478 return hw_cap;
1416} 1479}
1417 1480
1481/**
1482 * stmmac_check_ether_addr: check if the MAC addr is valid
1483 * @priv: driver private structure
1484 * Description:
1485 * it is to verify if the MAC address is valid, in case of failures it
1486 * generates a random MAC address
1487 */
1418static void stmmac_check_ether_addr(struct stmmac_priv *priv) 1488static void stmmac_check_ether_addr(struct stmmac_priv *priv)
1419{ 1489{
1420 /* verify if the MAC address is valid, in case of failures it
1421 * generates a random MAC address */
1422 if (!is_valid_ether_addr(priv->dev->dev_addr)) { 1490 if (!is_valid_ether_addr(priv->dev->dev_addr)) {
1423 priv->hw->mac->get_umac_addr((void __iomem *) 1491 priv->hw->mac->get_umac_addr((void __iomem *)
1424 priv->dev->base_addr, 1492 priv->dev->base_addr,
@@ -1430,15 +1498,20 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv)
1430 priv->dev->dev_addr); 1498 priv->dev->dev_addr);
1431} 1499}
1432 1500
1501/**
1502 * stmmac_init_dma_engine: DMA init.
1503 * @priv: driver private structure
1504 * Description:
1505 * It inits the DMA invoking the specific MAC/GMAC callback.
1506 * Some DMA parameters can be passed from the platform;
1507 * in case of these are not passed a default is kept for the MAC or GMAC.
1508 */
1433static int stmmac_init_dma_engine(struct stmmac_priv *priv) 1509static int stmmac_init_dma_engine(struct stmmac_priv *priv)
1434{ 1510{
1435 int pbl = DEFAULT_DMA_PBL, fixed_burst = 0, burst_len = 0; 1511 int pbl = DEFAULT_DMA_PBL, fixed_burst = 0, burst_len = 0;
1436 int mixed_burst = 0; 1512 int mixed_burst = 0;
1437 int atds = 0; 1513 int atds = 0;
1438 1514
1439 /* Some DMA parameters can be passed from the platform;
1440 * in case of these are not passed we keep a default
1441 * (good for all the chips) and init the DMA! */
1442 if (priv->plat->dma_cfg) { 1515 if (priv->plat->dma_cfg) {
1443 pbl = priv->plat->dma_cfg->pbl; 1516 pbl = priv->plat->dma_cfg->pbl;
1444 fixed_burst = priv->plat->dma_cfg->fixed_burst; 1517 fixed_burst = priv->plat->dma_cfg->fixed_burst;
@@ -1455,7 +1528,7 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
1455} 1528}
1456 1529
1457/** 1530/**
1458 * stmmac_tx_timer: 1531 * stmmac_tx_timer: mitigation sw timer for tx.
1459 * @data: data pointer 1532 * @data: data pointer
1460 * Description: 1533 * Description:
1461 * This is the timer handler to directly invoke the stmmac_tx_clean. 1534 * This is the timer handler to directly invoke the stmmac_tx_clean.
@@ -1468,8 +1541,8 @@ static void stmmac_tx_timer(unsigned long data)
1468} 1541}
1469 1542
1470/** 1543/**
1471 * stmmac_tx_timer: 1544 * stmmac_init_tx_coalesce: init tx mitigation options.
1472 * @priv: private data structure 1545 * @priv: driver private structure
1473 * Description: 1546 * Description:
1474 * This inits the transmit coalesce parameters: i.e. timer rate, 1547 * This inits the transmit coalesce parameters: i.e. timer rate,
1475 * timer handler and default threshold used for enabling the 1548 * timer handler and default threshold used for enabling the
@@ -1699,10 +1772,12 @@ static int stmmac_release(struct net_device *dev)
1699} 1772}
1700 1773
1701/** 1774/**
1702 * stmmac_xmit: 1775 * stmmac_xmit: Tx entry point of the driver
1703 * @skb : the socket buffer 1776 * @skb : the socket buffer
1704 * @dev : device pointer 1777 * @dev : device pointer
1705 * Description : Tx entry point of the driver. 1778 * Description : this is the tx entry point of the driver.
1779 * It programs the chain or the ring and supports oversized frames
1780 * and SG feature.
1706 */ 1781 */
1707static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) 1782static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
1708{ 1783{
@@ -1868,6 +1943,12 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
1868 return NETDEV_TX_OK; 1943 return NETDEV_TX_OK;
1869} 1944}
1870 1945
1946/**
1947 * stmmac_rx_refill: refill used skb preallocated buffers
1948 * @priv: driver private structure
1949 * Description : this is to reallocate the skb for the reception process
1950 * that is based on zero-copy.
1951 */
1871static inline void stmmac_rx_refill(struct stmmac_priv *priv) 1952static inline void stmmac_rx_refill(struct stmmac_priv *priv)
1872{ 1953{
1873 unsigned int rxsize = priv->dma_rx_size; 1954 unsigned int rxsize = priv->dma_rx_size;
@@ -1907,6 +1988,13 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
1907 } 1988 }
1908} 1989}
1909 1990
1991/**
1992 * stmmac_rx_refill: refill used skb preallocated buffers
1993 * @priv: driver private structure
1994 * @limit: napi bugget.
1995 * Description : this the function called by the napi poll method.
1996 * It gets all the frames inside the ring.
1997 */
1910static int stmmac_rx(struct stmmac_priv *priv, int limit) 1998static int stmmac_rx(struct stmmac_priv *priv, int limit)
1911{ 1999{
1912 unsigned int rxsize = priv->dma_rx_size; 2000 unsigned int rxsize = priv->dma_rx_size;
@@ -2170,6 +2258,14 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev,
2170 return features; 2258 return features;
2171} 2259}
2172 2260
2261/**
2262 * stmmac_interrupt - main ISR
2263 * @irq: interrupt number.
2264 * @dev_id: to pass the net device pointer.
2265 * Description: this is the main driver interrupt service routine.
2266 * It calls the DMA ISR and also the core ISR to manage PMT, MMC, LPI
2267 * interrupts.
2268 */
2173static irqreturn_t stmmac_interrupt(int irq, void *dev_id) 2269static irqreturn_t stmmac_interrupt(int irq, void *dev_id)
2174{ 2270{
2175 struct net_device *dev = (struct net_device *)dev_id; 2271 struct net_device *dev = (struct net_device *)dev_id;
@@ -2218,7 +2314,7 @@ static void stmmac_poll_controller(struct net_device *dev)
2218 * a proprietary structure used to pass information to the driver. 2314 * a proprietary structure used to pass information to the driver.
2219 * @cmd: IOCTL command 2315 * @cmd: IOCTL command
2220 * Description: 2316 * Description:
2221 * Currently it supports just the phy_mii_ioctl(...) and HW time stamping. 2317 * Currently it supports the phy_mii_ioctl(...) and HW time stamping.
2222 */ 2318 */
2223static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 2319static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2224{ 2320{
@@ -2451,7 +2547,7 @@ static const struct net_device_ops stmmac_netdev_ops = {
2451 2547
2452/** 2548/**
2453 * stmmac_hw_init - Init the MAC device 2549 * stmmac_hw_init - Init the MAC device
2454 * @priv : pointer to the private device structure. 2550 * @priv: driver private structure
2455 * Description: this function detects which MAC device 2551 * Description: this function detects which MAC device
2456 * (GMAC/MAC10-100) has to attached, checks the HW capability 2552 * (GMAC/MAC10-100) has to attached, checks the HW capability
2457 * (if supported) and sets the driver's features (for example 2553 * (if supported) and sets the driver's features (for example
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index 93d4beff92c7..b8b0eeed0f92 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -174,9 +174,7 @@ static struct ptp_clock_info stmmac_ptp_clock_ops = {
174 174
175/** 175/**
176 * stmmac_ptp_register 176 * stmmac_ptp_register
177 * 177 * @priv: driver private structure
178 * @ndev: net device pointer
179 *
180 * Description: this function will register the ptp clock driver 178 * Description: this function will register the ptp clock driver
181 * to kernel. It also does some house keeping work. 179 * to kernel. It also does some house keeping work.
182 */ 180 */
@@ -199,9 +197,7 @@ int stmmac_ptp_register(struct stmmac_priv *priv)
199 197
200/** 198/**
201 * stmmac_ptp_unregister 199 * stmmac_ptp_unregister
202 * 200 * @priv: driver private structure
203 * @ndev: net device pointer
204 *
205 * Description: this function will remove/unregister the ptp clock driver 201 * Description: this function will remove/unregister the ptp clock driver
206 * from the kernel. 202 * from the kernel.
207 */ 203 */