hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/tty/synclinkmp.c
....@@ -685,7 +685,7 @@
685685 return 0;
686686 }
687687
688
-/**
688
+/*
689689 * line discipline callback wrappers
690690 *
691691 * The wrappers maintain line discipline references
....@@ -1259,8 +1259,7 @@
12591259 if (sanity_check(info, tty->name, "ioctl"))
12601260 return -ENODEV;
12611261
1262
- if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
1263
- (cmd != TIOCMIWAIT)) {
1262
+ if (cmd != TIOCMIWAIT) {
12641263 if (tty_io_error(tty))
12651264 return -EIO;
12661265 }
....@@ -1521,14 +1520,14 @@
15211520 #if SYNCLINK_GENERIC_HDLC
15221521
15231522 /**
1524
- * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.)
1525
- * set encoding and frame check sequence (FCS) options
1523
+ * hdlcdev_attach - called by generic HDLC layer when protocol selected (PPP, frame relay, etc.)
1524
+ * @dev: pointer to network device structure
1525
+ * @encoding: serial encoding setting
1526
+ * @parity: FCS setting
15261527 *
1527
- * dev pointer to network device structure
1528
- * encoding serial encoding setting
1529
- * parity FCS setting
1528
+ * Set encoding and frame check sequence (FCS) options.
15301529 *
1531
- * returns 0 if success, otherwise error code
1530
+ * Return: 0 if success, otherwise error code
15321531 */
15331532 static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
15341533 unsigned short parity)
....@@ -1570,10 +1569,9 @@
15701569 }
15711570
15721571 /**
1573
- * called by generic HDLC layer to send frame
1574
- *
1575
- * skb socket buffer containing HDLC frame
1576
- * dev pointer to network device structure
1572
+ * hdlcdev_xmit - called by generic HDLC layer to send frame
1573
+ * @skb: socket buffer containing HDLC frame
1574
+ * @dev: pointer to network device structure
15771575 */
15781576 static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
15791577 struct net_device *dev)
....@@ -1611,12 +1609,12 @@
16111609 }
16121610
16131611 /**
1614
- * called by network layer when interface enabled
1615
- * claim resources and initialize hardware
1612
+ * hdlcdev_open - called by network layer when interface enabled
1613
+ * @dev: pointer to network device structure
16161614 *
1617
- * dev pointer to network device structure
1615
+ * Claim resources and initialize hardware.
16181616 *
1619
- * returns 0 if success, otherwise error code
1617
+ * Return: 0 if success, otherwise error code
16201618 */
16211619 static int hdlcdev_open(struct net_device *dev)
16221620 {
....@@ -1670,12 +1668,12 @@
16701668 }
16711669
16721670 /**
1673
- * called by network layer when interface is disabled
1674
- * shutdown hardware and release resources
1671
+ * hdlcdev_close - called by network layer when interface is disabled
1672
+ * @dev: pointer to network device structure
16751673 *
1676
- * dev pointer to network device structure
1674
+ * Shutdown hardware and release resources.
16771675 *
1678
- * returns 0 if success, otherwise error code
1676
+ * Return: 0 if success, otherwise error code
16791677 */
16801678 static int hdlcdev_close(struct net_device *dev)
16811679 {
....@@ -1700,13 +1698,12 @@
17001698 }
17011699
17021700 /**
1703
- * called by network layer to process IOCTL call to network device
1701
+ * hdlcdev_ioctl - called by network layer to process IOCTL call to network device
1702
+ * @dev: pointer to network device structure
1703
+ * @ifr: pointer to network interface request structure
1704
+ * @cmd: IOCTL command code
17041705 *
1705
- * dev pointer to network device structure
1706
- * ifr pointer to network interface request structure
1707
- * cmd IOCTL command code
1708
- *
1709
- * returns 0 if success, otherwise error code
1706
+ * Return: 0 if success, otherwise error code
17101707 */
17111708 static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
17121709 {
....@@ -1804,11 +1801,10 @@
18041801 }
18051802
18061803 /**
1807
- * called by network layer when transmit timeout is detected
1808
- *
1809
- * dev pointer to network device structure
1804
+ * hdlcdev_tx_timeout - called by network layer when transmit timeout is detected
1805
+ * @dev: pointer to network device structure
18101806 */
1811
-static void hdlcdev_tx_timeout(struct net_device *dev)
1807
+static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
18121808 {
18131809 SLMP_INFO *info = dev_to_port(dev);
18141810 unsigned long flags;
....@@ -1827,10 +1823,10 @@
18271823 }
18281824
18291825 /**
1830
- * called by device driver when transmit completes
1831
- * reenable network layer transmit if stopped
1826
+ * hdlcdev_tx_done - called by device driver when transmit completes
1827
+ * @info: pointer to device instance information
18321828 *
1833
- * info pointer to device instance information
1829
+ * Reenable network layer transmit if stopped.
18341830 */
18351831 static void hdlcdev_tx_done(SLMP_INFO *info)
18361832 {
....@@ -1839,12 +1835,12 @@
18391835 }
18401836
18411837 /**
1842
- * called by device driver when frame received
1843
- * pass frame to network layer
1838
+ * hdlcdev_rx - called by device driver when frame received
1839
+ * @info: pointer to device instance information
1840
+ * @buf: pointer to buffer contianing frame data
1841
+ * @size: count of data bytes in buf
18441842 *
1845
- * info pointer to device instance information
1846
- * buf pointer to buffer contianing frame data
1847
- * size count of data bytes in buf
1843
+ * Pass frame to network layer.
18481844 */
18491845 static void hdlcdev_rx(SLMP_INFO *info, char *buf, int size)
18501846 {
....@@ -1880,12 +1876,12 @@
18801876 };
18811877
18821878 /**
1883
- * called by device driver when adding device instance
1884
- * do generic HDLC initialization
1879
+ * hdlcdev_init - called by device driver when adding device instance
1880
+ * @info: pointer to device instance information
18851881 *
1886
- * info pointer to device instance information
1882
+ * Do generic HDLC initialization.
18871883 *
1888
- * returns 0 if success, otherwise error code
1884
+ * Return: 0 if success, otherwise error code
18891885 */
18901886 static int hdlcdev_init(SLMP_INFO *info)
18911887 {
....@@ -1929,10 +1925,10 @@
19291925 }
19301926
19311927 /**
1932
- * called by device driver when removing device instance
1933
- * do generic HDLC cleanup
1928
+ * hdlcdev_exit - called by device driver when removing device instance
1929
+ * @info: pointer to device instance information
19341930 *
1935
- * info pointer to device instance information
1931
+ * Do generic HDLC cleanup.
19361932 */
19371933 static void hdlcdev_exit(SLMP_INFO *info)
19381934 {
....@@ -3560,7 +3556,7 @@
35603556 else
35613557 info->sca_statctrl_requested = true;
35623558
3563
- info->memory_base = ioremap_nocache(info->phys_memory_base,
3559
+ info->memory_base = ioremap(info->phys_memory_base,
35643560 SCA_MEM_SIZE);
35653561 if (!info->memory_base) {
35663562 printk( "%s(%d):%s Can't map shared memory, MemAddr=%08X\n",
....@@ -3569,7 +3565,7 @@
35693565 goto errout;
35703566 }
35713567
3572
- info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE);
3568
+ info->lcr_base = ioremap(info->phys_lcr_base, PAGE_SIZE);
35733569 if (!info->lcr_base) {
35743570 printk( "%s(%d):%s Can't map LCR memory, MemAddr=%08X\n",
35753571 __FILE__,__LINE__,info->device_name, info->phys_lcr_base );
....@@ -3578,7 +3574,7 @@
35783574 }
35793575 info->lcr_base += info->lcr_offset;
35803576
3581
- info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE);
3577
+ info->sca_base = ioremap(info->phys_sca_base, PAGE_SIZE);
35823578 if (!info->sca_base) {
35833579 printk( "%s(%d):%s Can't map SCA memory, MemAddr=%08X\n",
35843580 __FILE__,__LINE__,info->device_name, info->phys_sca_base );
....@@ -3587,7 +3583,7 @@
35873583 }
35883584 info->sca_base += info->sca_offset;
35893585
3590
- info->statctrl_base = ioremap_nocache(info->phys_statctrl_base,
3586
+ info->statctrl_base = ioremap(info->phys_statctrl_base,
35913587 PAGE_SIZE);
35923588 if (!info->statctrl_base) {
35933589 printk( "%s(%d):%s Can't map SCA Status/Control memory, MemAddr=%08X\n",