Rev 4327 | Rev 4351 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4327 | Rev 4332 | ||
---|---|---|---|
Line 728... | Line 728... | ||
728 | } |
728 | } |
729 | 729 | ||
730 | if (isr & ISR_PRX) |
730 | if (isr & ISR_PRX) |
731 | { |
731 | { |
732 | /* Only call dp_recv if there is a read request */ |
732 | /* Only call dp_recv if there is a read request */ |
733 | if (dep->de_flags & DEF_READING) |
733 | // if (dep->de_flags) & DEF_READING) |
734 | dp_recv(dep); |
734 | dp_recv(dep); |
735 | } |
735 | } |
736 | 736 | ||
737 | if (isr & ISR_RXE) dep->de_stat.ets_recvErr++; |
737 | if (isr & ISR_RXE) dep->de_stat.ets_recvErr++; |
738 | if (isr & ISR_CNT) |
738 | if (isr & ISR_CNT) |
Line 746... | Line 746... | ||
746 | dep->de_stat.ets_OVW++; |
746 | dep->de_stat.ets_OVW++; |
747 | #if 0 |
747 | #if 0 |
748 | { printW(); printf( |
748 | { printW(); printf( |
749 | "%s: got overwrite warning\n", dep->de_name); } |
749 | "%s: got overwrite warning\n", dep->de_name); } |
750 | #endif |
750 | #endif |
751 | if (dep->de_flags & DEF_READING) |
751 | /* if (dep->de_flags & DEF_READING) |
752 | { |
752 | { |
753 | printf( |
753 | printf( |
754 | "dp_check_ints: strange: overwrite warning and pending read request\n"); |
754 | "dp_check_ints: strange: overwrite warning and pending read request\n"); |
755 | dp_recv(dep); |
755 | dp_recv(dep); |
756 | } |
756 | } |
757 | } |
757 | */ } |
758 | if (isr & ISR_RDC) |
758 | if (isr & ISR_RDC) |
759 | { |
759 | { |
760 | /* Nothing to do */ |
760 | /* Nothing to do */ |
761 | } |
761 | } |
762 | if (isr & ISR_RST) |
762 | if (isr & ISR_RST) |
Line 773... | Line 773... | ||
773 | dep->de_flags |= DEF_STOPPED; |
773 | dep->de_flags |= DEF_STOPPED; |
774 | break; |
774 | break; |
775 | } |
775 | } |
776 | isr = inb_reg0(dep, DP_ISR); |
776 | isr = inb_reg0(dep, DP_ISR); |
777 | } |
777 | } |
778 | if ((dep->de_flags & (DEF_READING|DEF_STOPPED)) == |
778 | // if ((dep->de_flags & (DEF_READING|DEF_STOPPED)) == |
779 | (DEF_READING|DEF_STOPPED)) |
779 | // (DEF_READING|DEF_STOPPED)) |
- | 780 | if ((dep->de_flags & DEF_STOPPED) == DEF_STOPPED ) |
|
780 | { |
781 | { |
781 | /* The chip is stopped, and all arrived packets are |
782 | /* The chip is stopped, and all arrived packets are |
782 | * delivered. |
783 | * delivered. |
783 | */ |
784 | */ |
784 | dp_reset(dep); |
785 | dp_reset(dep); |
Line 975... | Line 976... | ||
975 | { |
976 | { |
976 | int last, count; |
977 | int last, count; |
977 | packet_t packet; |
978 | packet_t packet; |
978 | packet_t queue; |
979 | packet_t queue; |
979 | 980 | ||
980 | if (!(dep->de_flags & DEF_READING)) |
981 | // if (!(dep->de_flags & DEF_READING)) |
981 | return EGENERIC; |
982 | // return EGENERIC; |
982 | 983 | ||
983 | packet = netif_packet_get_1( length ); |
984 | packet = netif_packet_get_1( length ); |
984 | if( ! packet ) return ENOMEM; |
985 | if( ! packet ) return ENOMEM; |
985 | dep->de_read_iovec.iod_iovec[0].iov_addr = ( vir_bytes ) packet_suffix( packet, length ); |
986 | dep->de_read_iovec.iod_iovec[0].iov_addr = ( vir_bytes ) packet_suffix( packet, length ); |
986 | dep->de_read_iovec.iod_iovec[0].iov_size = length; |
987 | dep->de_read_iovec.iod_iovec[0].iov_size = length; |
Line 1006... | Line 1007... | ||
1006 | sizeof(dp_rcvhdr_t), &dep->de_read_iovec, 0, length); |
1007 | sizeof(dp_rcvhdr_t), &dep->de_read_iovec, 0, length); |
1007 | } |
1008 | } |
1008 | 1009 | ||
1009 | dep->de_read_s = length; |
1010 | dep->de_read_s = length; |
1010 | dep->de_flags |= DEF_PACK_RECV; |
1011 | dep->de_flags |= DEF_PACK_RECV; |
1011 | dep->de_flags &= ~DEF_READING; |
1012 | // dep->de_flags &= ~DEF_READING; |
1012 | 1013 | ||
1013 | queue = pq_add( dep->received_queue, packet, 0, 0 ); |
1014 | queue = pq_add( dep->received_queue, packet, 0, 0 ); |
1014 | if( queue ){ |
1015 | if( queue ){ |
1015 | dep->received_queue = queue; |
1016 | dep->received_queue = queue; |
1016 | }else{ |
1017 | }else{ |