Sun Aug 9 09:20:30 2020 UTC ()
fix a couple of minor issues:
- un_ed is not a function, but an array
- fix a typo
- add a blank line after a list


(mrg)
diff -r1.11 -r1.12 src/share/man/man9/usbnet.9

cvs diff -r1.11 -r1.12 src/share/man/man9/usbnet.9 (expand / switch to unified diff)

--- src/share/man/man9/usbnet.9 2020/03/20 08:02:55 1.11
+++ src/share/man/man9/usbnet.9 2020/08/09 09:20:30 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: usbnet.9,v 1.11 2020/03/20 08:02:55 wiz Exp $ 1.\" $NetBSD: usbnet.9,v 1.12 2020/08/09 09:20:30 mrg Exp $
2.\" 2.\"
3.\" Copyright (c) 2019 Matthew R. Green 3.\" Copyright (c) 2019 Matthew R. Green
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. The name of the author may not be used to endorse or promote products 14.\" 3. The name of the author may not be used to endorse or promote products
@@ -570,28 +570,28 @@ members, and the @@ -570,28 +570,28 @@ members, and the
570.Fn uno_stop , 570.Fn uno_stop ,
571.Fn uno_init , 571.Fn uno_init ,
572.Fn uno_tx_prepare , 572.Fn uno_tx_prepare ,
573and 573and
574.Fn uno_rx_loop 574.Fn uno_rx_loop
575callbacks of 575callbacks of
576.Va usbnet_ops . 576.Va usbnet_ops .
577.Pp 577.Pp
578Typically, the device attach routine will fill in members of the 578Typically, the device attach routine will fill in members of the
579.Va usbnet 579.Va usbnet
580structure, as listed in 580structure, as listed in
581.Sx AUTOCONFIGURATION . 581.Sx AUTOCONFIGURATION .
582The 582The
583.Fn un_ed 583.Dv un_ed
584member should have the 584array should have the
585.Dv USBNET_ENDPT_RX 585.Dv USBNET_ENDPT_RX
586and 586and
587.Dv USBNET_ENDPT_TX 587.Dv USBNET_ENDPT_TX
588array entries filled in, and optionally the 588array entries filled in, and optionally the
589.Dv USBNET_ENDPT_INTR 589.Dv USBNET_ENDPT_INTR
590entry filled in if applicable. 590entry filled in if applicable.
591.Pp 591.Pp
592The optional 592The optional
593.Fn uno_stop 593.Fn uno_stop
594callback performs device-specific operations to shutdown the 594callback performs device-specific operations to shutdown the
595transmit or receive handling. 595transmit or receive handling.
596.Fn uno_stop 596.Fn uno_stop
597will be called with the usbnet lock held. 597will be called with the usbnet lock held.
@@ -662,26 +662,27 @@ For devices that have MII support these  @@ -662,26 +662,27 @@ For devices that have MII support these
662must be provided: 662must be provided:
663.Bl -tag -width 4n 663.Bl -tag -width 4n
664.It uno_read_reg 664.It uno_read_reg
665Read an MII register for a particular PHY. 665Read an MII register for a particular PHY.
666Returns standard 666Returns standard
667.Xr errno 2 . 667.Xr errno 2 .
668.It uno_write_reg 668.It uno_write_reg
669Write an MII register for a particular PHY. 669Write an MII register for a particular PHY.
670Returns standard 670Returns standard
671.Xr errno 2 . 671.Xr errno 2 .
672.It uno_statchg 672.It uno_statchg
673Handle a status change event for this interface. 673Handle a status change event for this interface.
674.El 674.El
 675.Pp
675The read and write callbacks are called with the core lock held. 676The read and write callbacks are called with the core lock held.
676See 677See
677.Fn usbnet_lock_mii 678.Fn usbnet_lock_mii
678and 679and
679.Fn usbnet_unlock_mii . 680.Fn usbnet_unlock_mii .
680.Sh INTERRUPT PIPE 681.Sh INTERRUPT PIPE
681The interrupt specific callback, 682The interrupt specific callback,
682.Dq uno_intr , 683.Dq uno_intr ,
683is an optional callback that can be called periodically, registered by 684is an optional callback that can be called periodically, registered by
684.Nm 685.Nm
685using the 686using the
686.Fn usbd_open_pipe_intr 687.Fn usbd_open_pipe_intr
687function (instead of the 688function (instead of the
@@ -795,27 +796,27 @@ routine can use the default handling wit @@ -795,27 +796,27 @@ routine can use the default handling wit
795device specific programming (multicast filters, etc.), which can be 796device specific programming (multicast filters, etc.), which can be
796empty, or, the override ioctl can be used for heavier requirements. 797empty, or, the override ioctl can be used for heavier requirements.
797The device 798The device
798.Dq stop 799.Dq stop
799routine is replaced with a simple call that turns off the 800routine is replaced with a simple call that turns off the
800device-specific transmitter and receiver if necessary, as the 801device-specific transmitter and receiver if necessary, as the
801framework handles pipes and transfers and buffers. 802framework handles pipes and transfers and buffers.
802.It Device locking 803.It Device locking
803The 804The
804.Nm 805.Nm
805framework provides three locks for the system: core lock, 806framework provides three locks for the system: core lock,
806receive lock, and transmit lock. 807receive lock, and transmit lock.
807The normal locking order 808The normal locking order
808for these locks is ifnet lock -> usbnet core lock -> usbnet rxlock -> usbne 809for these locks is ifnet lock -> usbnet core lock -> usbnet rxlock -> usbnet
809txlock, or, ifnet lock -> usbnet core lock. 810txlock, or, ifnet lock -> usbnet core lock.
810Also note that the core lock may be taken when the ifnet lock is not 811Also note that the core lock may be taken when the ifnet lock is not
811held. 812held.
812.It MII handling 813.It MII handling
813For devices with MII support the three normal callbacks 814For devices with MII support the three normal callbacks
814.Pq read, write, and status change 815.Pq read, write, and status change
815must be converted to 816must be converted to
816.Va usbnet . 817.Va usbnet .
817These functions are called with the core lock is held 818These functions are called with the core lock is held
818.Po 819.Po
819see 820see
820.Dq Fn usbnet_isowned_core 821.Dq Fn usbnet_isowned_core
821.Pc , 822.Pc ,