|
@@ -785,12 +785,7 @@ static void nii_poll_tx ( struct net_device *netdev, unsigned int stat ) {
|
785
|
785
|
return;
|
786
|
786
|
|
787
|
787
|
/* Sanity check */
|
788
|
|
- if ( ! nii->txbuf ) {
|
789
|
|
- DBGC ( nii, "NII %s reported spurious TX completion\n",
|
790
|
|
- nii->dev.name );
|
791
|
|
- netdev_tx_err ( netdev, NULL, -EPIPE );
|
792
|
|
- return;
|
793
|
|
- }
|
|
788
|
+ assert ( nii->txbuf != NULL );
|
794
|
789
|
|
795
|
790
|
/* Complete transmission */
|
796
|
791
|
iobuf = nii->txbuf;
|
|
@@ -888,7 +883,7 @@ static void nii_poll ( struct net_device *netdev ) {
|
888
|
883
|
/* Get status */
|
889
|
884
|
op = NII_OP ( PXE_OPCODE_GET_STATUS,
|
890
|
885
|
( PXE_OPFLAGS_GET_INTERRUPT_STATUS |
|
891
|
|
- PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS |
|
|
886
|
+ ( nii->txbuf ? PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS : 0)|
|
892
|
887
|
( nii->media ? PXE_OPFLAGS_GET_MEDIA_STATUS : 0 ) ) );
|
893
|
888
|
if ( ( stat = nii_issue_db ( nii, op, &db, sizeof ( db ) ) ) < 0 ) {
|
894
|
889
|
rc = -EIO_STAT ( stat );
|
|
@@ -898,7 +893,8 @@ static void nii_poll ( struct net_device *netdev ) {
|
898
|
893
|
}
|
899
|
894
|
|
900
|
895
|
/* Process any TX completions */
|
901
|
|
- nii_poll_tx ( netdev, stat );
|
|
896
|
+ if ( nii->txbuf )
|
|
897
|
+ nii_poll_tx ( netdev, stat );
|
902
|
898
|
|
903
|
899
|
/* Process any RX completions */
|
904
|
900
|
nii_poll_rx ( netdev );
|