~ubuntu-branches/ubuntu/raring/ipxe/raring

« back to all changes in this revision

Viewing changes to src/net/netdevice.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-11-14 15:47:31 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20121114154731-jhuy5d1h2jw75qe9
Tags: 1.0.0+git-4.d6b0b76-0ubuntu1
* New upstream snapshot:
  - d/p/iscsi*.patch: Dropped - included in snapshot.
  - Refreshed all other patches.
* d/p/enable-https.patch: Enable HTTPS support (LP: #1025239).

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 *
14
14
 * You should have received a copy of the GNU General Public License
15
15
 * along with this program; if not, write to the Free Software
16
 
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
16
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
 * 02110-1301, USA.
17
18
 */
18
19
 
19
20
FILE_LICENCE ( GPL2_OR_LATER );
485
486
 err_probe:
486
487
        for_each_table_entry_continue_reverse ( driver, NET_DRIVERS )
487
488
                driver->remove ( netdev );
 
489
        clear_settings ( netdev_settings ( netdev ) );
488
490
        unregister_settings ( netdev_settings ( netdev ) );
489
491
 err_register_settings:
490
492
        return rc;
569
571
                driver->remove ( netdev );
570
572
 
571
573
        /* Unregister per-netdev configuration settings */
 
574
        clear_settings ( netdev_settings ( netdev ) );
572
575
        unregister_settings ( netdev_settings ( netdev ) );
573
576
 
574
577
        /* Remove from device list */
671
674
        struct ll_protocol *ll_protocol = netdev->ll_protocol;
672
675
        int rc;
673
676
 
674
 
        /* Force a poll on the netdevice to (potentially) clear any
675
 
         * backed-up TX completions.  This is needed on some network
676
 
         * devices to avoid excessive losses due to small TX ring
677
 
         * sizes.
678
 
         */
679
 
        netdev_poll ( netdev );
680
 
 
681
677
        /* Add link-layer header */
682
678
        if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, ll_source,
683
679
                                        net_protocol->net_proto ) ) != 0 ) {
750
746
                if ( netdev_rx_frozen ( netdev ) )
751
747
                        continue;
752
748
 
753
 
                /* Process at most one received packet.  Give priority
754
 
                 * to getting packets out of the NIC over processing
755
 
                 * the received packets, because we advertise a window
756
 
                 * that assumes that we can receive packets from the
757
 
                 * NIC faster than they arrive.
758
 
                 */
759
 
                if ( ( iobuf = netdev_rx_dequeue ( netdev ) ) ) {
 
749
                /* Process all received packets */
 
750
                while ( ( iobuf = netdev_rx_dequeue ( netdev ) ) ) {
760
751
 
761
752
                        DBGC2 ( netdev, "NETDEV %s processing %p (%p+%zx)\n",
762
753
                                netdev->name, iobuf, iobuf->data,