bytes = (data[0] & 0x07)+1; i=1; 
bytes = (data[0] & 0x07) + 1; i = 1; 
static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs){	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;	struct cypress_private *priv = usb_get_serial_port_data(port);	struct tty_struct *tty;	unsigned char *data = urb->transfer_buffer;	unsigned long flags;	char tty_flag = TTY_NORMAL;		int havedata = 0;	int bytes = 0;	int result;	int i = 0;	dbg("%s - port %d", __FUNCTION__, port->number);	if (urb->status) {		dbg("%s - nonzero read status received: %d", __FUNCTION__, urb->status);		return;	}	spin_lock_irqsave(&priv->lock, flags);	if (priv->rx_flags & THROTTLED) {		dbg("%s - now throttling", __FUNCTION__);		priv->rx_flags |= ACTUALLY_THROTTLED;		spin_unlock_irqrestore(&priv->lock, flags);		return;	}	spin_unlock_irqrestore(&priv->lock, flags);	tty = port->tty;	if (!tty) {		dbg("%s - bad tty pointer - exiting", __FUNCTION__);		return;	}	spin_lock_irqsave(&priv->lock, flags);	switch(urb->actual_length) {		case 32:			/* This is for the CY7C64013... */			priv->current_status = data[0] & 0xF8;			bytes = data[1]+2;			i=2;			if (bytes > 2)				havedata = 1;			break;		case 8:			/* This is for the CY7C63743... */			priv->current_status = data[0] & 0xF8;			bytes = (data[0] & 0x07)+1;			i=1;			if (bytes > 1)				havedata = 1;			break;		default:			dbg("%s - wrong packet size - received %d bytes", __FUNCTION__, urb->actual_length);			spin_unlock_irqrestore(&priv->lock, flags);			goto continue_read;	}	spin_unlock_irqrestore(&priv->lock, flags);	usb_serial_debug_data (debug, &port->dev, __FUNCTION__, urb->actual_length, data);	spin_lock_irqsave(&priv->lock, flags);	/* check to see if status has changed */	if (priv != NULL) {		if (priv->current_status != priv->prev_status) {			priv->diff_status |= priv->current_status ^ priv->prev_status;			wake_up_interruptible(&priv->delta_msr_wait);			priv->prev_status = priv->current_status;		}	}	spin_unlock_irqrestore(&priv->lock, flags);		/* hangup, as defined in acm.c... this might be a bad place for it though */	if (tty && !(tty->termios->c_cflag & CLOCAL) && !(priv->current_status & UART_CD)) {		dbg("%s - calling hangup", __FUNCTION__);		tty_hangup(tty);		goto continue_read;	}	/* There is one error bit... I'm assuming it is a parity error indicator	 * as the generic firmware will set this bit to 1 if a parity error occurs.	 * I can not find reference to any other error events.	 *	 */	spin_lock_irqsave(&priv->lock, flags);	if (priv->current_status & CYP_ERROR) {		spin_unlock_irqrestore(&priv->lock, flags);		tty_flag = TTY_PARITY;		dbg("%s - Parity Error detected", __FUNCTION__);	} else		spin_unlock_irqrestore(&priv->lock, flags);	/* process read if there is data other than line status */	if (tty && (bytes > i)) {		for (; i < bytes ; ++i) {			dbg("pushing byte number %d - %d - %c",i,data[i],data[i]);			if(tty->flip.count >= TTY_FLIPBUF_SIZE) {				tty_flip_buffer_push(tty);			}			tty_insert_flip_char(tty, data[i], tty_flag);		}		tty_flip_buffer_push(port->tty);	}	spin_lock_irqsave(&priv->lock, flags);	priv->bytes_in += bytes;  /* control and status byte(s) are also counted */	spin_unlock_irqrestore(&priv->lock, flags);continue_read:		/* Continue trying to always read... unless the port has closed.  */	if (port->open_count > 0) {	usb_fill_int_urb(port->interrupt_in_urb, port->serial->dev,		usb_rcvintpipe(port->serial->dev, port->interrupt_in_endpointAddress),		port->interrupt_in_urb->transfer_buffer,		port->interrupt_in_urb->transfer_buffer_length,		cypress_read_int_callback, port,		interval);	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);	if (result)		dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);	}		return;} /* cypress_read_int_callback */
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b9db07fba7f113764d7379b0f68324a9a5450306/cypress_m8.c/clean/drivers/usb/serial/cypress_m8.c