Commit a8a87fdb authored by Kåre Särs's avatar Kåre Särs Committed by Jeff Garzik

[atm nicstar] fix incorrect traffic class assumption

I have encountered a bug in the nicstar ATM driver for linux.
If you open a CBR TX only connection on a specific vpi/vci and later open a RX 
only connection on the same vpi/vci, the RX connection will overwrite the 
pointer to the SCQ of the TX connection. This changes the cell rate of the TX 
channel and what is worse is that when the TX connection is closed we get a 
segmentationfault and the TX part of the vpi/vci remains reserved.

The bug in the driver is that if the opened channel is not TX CBR, the driver 
assumes it is TX UBR. I have attached a patch that adds a check for TX UBR. 
The patch is against RedHat kernel 2.4.18-3. I have checked linux vanilla 
kernels 2.4.19 and 2.5.49 and not found a fix.
parent 2a217dfb
...@@ -1538,7 +1538,7 @@ static int ns_open(struct atm_vcc *vcc, short vpi, int vci) ...@@ -1538,7 +1538,7 @@ static int ns_open(struct atm_vcc *vcc, short vpi, int vci)
fill_tst(card, n, vc); fill_tst(card, n, vc);
} }
else /* not CBR */ else if (vcc->qos.txtp.traffic_class == ATM_UBR)
{ {
vc->cbr_scd = 0x00000000; vc->cbr_scd = 0x00000000;
vc->scq = card->scq0; vc->scq = card->scq0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment