.. | .. |
---|
685 | 685 | return 0; |
---|
686 | 686 | } |
---|
687 | 687 | |
---|
688 | | -/** |
---|
| 688 | +/* |
---|
689 | 689 | * line discipline callback wrappers |
---|
690 | 690 | * |
---|
691 | 691 | * The wrappers maintain line discipline references |
---|
.. | .. |
---|
1259 | 1259 | if (sanity_check(info, tty->name, "ioctl")) |
---|
1260 | 1260 | return -ENODEV; |
---|
1261 | 1261 | |
---|
1262 | | - if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && |
---|
1263 | | - (cmd != TIOCMIWAIT)) { |
---|
| 1262 | + if (cmd != TIOCMIWAIT) { |
---|
1264 | 1263 | if (tty_io_error(tty)) |
---|
1265 | 1264 | return -EIO; |
---|
1266 | 1265 | } |
---|
.. | .. |
---|
1521 | 1520 | #if SYNCLINK_GENERIC_HDLC |
---|
1522 | 1521 | |
---|
1523 | 1522 | /** |
---|
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 |
---|
1526 | 1527 | * |
---|
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. |
---|
1530 | 1529 | * |
---|
1531 | | - * returns 0 if success, otherwise error code |
---|
| 1530 | + * Return: 0 if success, otherwise error code |
---|
1532 | 1531 | */ |
---|
1533 | 1532 | static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, |
---|
1534 | 1533 | unsigned short parity) |
---|
.. | .. |
---|
1570 | 1569 | } |
---|
1571 | 1570 | |
---|
1572 | 1571 | /** |
---|
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 |
---|
1577 | 1575 | */ |
---|
1578 | 1576 | static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb, |
---|
1579 | 1577 | struct net_device *dev) |
---|
.. | .. |
---|
1611 | 1609 | } |
---|
1612 | 1610 | |
---|
1613 | 1611 | /** |
---|
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 |
---|
1616 | 1614 | * |
---|
1617 | | - * dev pointer to network device structure |
---|
| 1615 | + * Claim resources and initialize hardware. |
---|
1618 | 1616 | * |
---|
1619 | | - * returns 0 if success, otherwise error code |
---|
| 1617 | + * Return: 0 if success, otherwise error code |
---|
1620 | 1618 | */ |
---|
1621 | 1619 | static int hdlcdev_open(struct net_device *dev) |
---|
1622 | 1620 | { |
---|
.. | .. |
---|
1670 | 1668 | } |
---|
1671 | 1669 | |
---|
1672 | 1670 | /** |
---|
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 |
---|
1675 | 1673 | * |
---|
1676 | | - * dev pointer to network device structure |
---|
| 1674 | + * Shutdown hardware and release resources. |
---|
1677 | 1675 | * |
---|
1678 | | - * returns 0 if success, otherwise error code |
---|
| 1676 | + * Return: 0 if success, otherwise error code |
---|
1679 | 1677 | */ |
---|
1680 | 1678 | static int hdlcdev_close(struct net_device *dev) |
---|
1681 | 1679 | { |
---|
.. | .. |
---|
1700 | 1698 | } |
---|
1701 | 1699 | |
---|
1702 | 1700 | /** |
---|
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 |
---|
1704 | 1705 | * |
---|
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 |
---|
1710 | 1707 | */ |
---|
1711 | 1708 | static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
---|
1712 | 1709 | { |
---|
.. | .. |
---|
1804 | 1801 | } |
---|
1805 | 1802 | |
---|
1806 | 1803 | /** |
---|
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 |
---|
1810 | 1806 | */ |
---|
1811 | | -static void hdlcdev_tx_timeout(struct net_device *dev) |
---|
| 1807 | +static void hdlcdev_tx_timeout(struct net_device *dev, unsigned int txqueue) |
---|
1812 | 1808 | { |
---|
1813 | 1809 | SLMP_INFO *info = dev_to_port(dev); |
---|
1814 | 1810 | unsigned long flags; |
---|
.. | .. |
---|
1827 | 1823 | } |
---|
1828 | 1824 | |
---|
1829 | 1825 | /** |
---|
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 |
---|
1832 | 1828 | * |
---|
1833 | | - * info pointer to device instance information |
---|
| 1829 | + * Reenable network layer transmit if stopped. |
---|
1834 | 1830 | */ |
---|
1835 | 1831 | static void hdlcdev_tx_done(SLMP_INFO *info) |
---|
1836 | 1832 | { |
---|
.. | .. |
---|
1839 | 1835 | } |
---|
1840 | 1836 | |
---|
1841 | 1837 | /** |
---|
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 |
---|
1844 | 1842 | * |
---|
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. |
---|
1848 | 1844 | */ |
---|
1849 | 1845 | static void hdlcdev_rx(SLMP_INFO *info, char *buf, int size) |
---|
1850 | 1846 | { |
---|
.. | .. |
---|
1880 | 1876 | }; |
---|
1881 | 1877 | |
---|
1882 | 1878 | /** |
---|
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 |
---|
1885 | 1881 | * |
---|
1886 | | - * info pointer to device instance information |
---|
| 1882 | + * Do generic HDLC initialization. |
---|
1887 | 1883 | * |
---|
1888 | | - * returns 0 if success, otherwise error code |
---|
| 1884 | + * Return: 0 if success, otherwise error code |
---|
1889 | 1885 | */ |
---|
1890 | 1886 | static int hdlcdev_init(SLMP_INFO *info) |
---|
1891 | 1887 | { |
---|
.. | .. |
---|
1929 | 1925 | } |
---|
1930 | 1926 | |
---|
1931 | 1927 | /** |
---|
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 |
---|
1934 | 1930 | * |
---|
1935 | | - * info pointer to device instance information |
---|
| 1931 | + * Do generic HDLC cleanup. |
---|
1936 | 1932 | */ |
---|
1937 | 1933 | static void hdlcdev_exit(SLMP_INFO *info) |
---|
1938 | 1934 | { |
---|
.. | .. |
---|
3560 | 3556 | else |
---|
3561 | 3557 | info->sca_statctrl_requested = true; |
---|
3562 | 3558 | |
---|
3563 | | - info->memory_base = ioremap_nocache(info->phys_memory_base, |
---|
| 3559 | + info->memory_base = ioremap(info->phys_memory_base, |
---|
3564 | 3560 | SCA_MEM_SIZE); |
---|
3565 | 3561 | if (!info->memory_base) { |
---|
3566 | 3562 | printk( "%s(%d):%s Can't map shared memory, MemAddr=%08X\n", |
---|
.. | .. |
---|
3569 | 3565 | goto errout; |
---|
3570 | 3566 | } |
---|
3571 | 3567 | |
---|
3572 | | - info->lcr_base = ioremap_nocache(info->phys_lcr_base, PAGE_SIZE); |
---|
| 3568 | + info->lcr_base = ioremap(info->phys_lcr_base, PAGE_SIZE); |
---|
3573 | 3569 | if (!info->lcr_base) { |
---|
3574 | 3570 | printk( "%s(%d):%s Can't map LCR memory, MemAddr=%08X\n", |
---|
3575 | 3571 | __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); |
---|
.. | .. |
---|
3578 | 3574 | } |
---|
3579 | 3575 | info->lcr_base += info->lcr_offset; |
---|
3580 | 3576 | |
---|
3581 | | - info->sca_base = ioremap_nocache(info->phys_sca_base, PAGE_SIZE); |
---|
| 3577 | + info->sca_base = ioremap(info->phys_sca_base, PAGE_SIZE); |
---|
3582 | 3578 | if (!info->sca_base) { |
---|
3583 | 3579 | printk( "%s(%d):%s Can't map SCA memory, MemAddr=%08X\n", |
---|
3584 | 3580 | __FILE__,__LINE__,info->device_name, info->phys_sca_base ); |
---|
.. | .. |
---|
3587 | 3583 | } |
---|
3588 | 3584 | info->sca_base += info->sca_offset; |
---|
3589 | 3585 | |
---|
3590 | | - info->statctrl_base = ioremap_nocache(info->phys_statctrl_base, |
---|
| 3586 | + info->statctrl_base = ioremap(info->phys_statctrl_base, |
---|
3591 | 3587 | PAGE_SIZE); |
---|
3592 | 3588 | if (!info->statctrl_base) { |
---|
3593 | 3589 | printk( "%s(%d):%s Can't map SCA Status/Control memory, MemAddr=%08X\n", |
---|