mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	USB: serial: remove unnecessary reinitialisations of urb->dev
Remove unnecessary reinitialisations of urb->dev before each submission, which were based on the (no longer valid) assumption that serial->dev will be set to NULL on close. Compile-only tested. Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Support Department <support@connecttech.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
		
							parent
							
								
									016af7ec49
								
							
						
					
					
						commit
						5833041f1b
					
				
					 20 changed files with 8 additions and 107 deletions
				
			
		| 
						 | 
					@ -335,7 +335,6 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dbg("%s - submitting interrupt urb", __func__);
 | 
						dbg("%s - submitting interrupt urb", __func__);
 | 
				
			||||||
	port->interrupt_in_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	r = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
						r = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
	if (r) {
 | 
						if (r) {
 | 
				
			||||||
		dev_err(&port->dev, "%s - failed submitting interrupt urb,"
 | 
							dev_err(&port->dev, "%s - failed submitting interrupt urb,"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -138,7 +138,6 @@ static int cyberjack_startup(struct usb_serial *serial)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i = 0; i < serial->num_ports; ++i) {
 | 
						for (i = 0; i < serial->num_ports; ++i) {
 | 
				
			||||||
		int result;
 | 
							int result;
 | 
				
			||||||
		serial->port[i]->interrupt_in_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(serial->port[i]->interrupt_in_urb,
 | 
							result = usb_submit_urb(serial->port[i]->interrupt_in_urb,
 | 
				
			||||||
					GFP_KERNEL);
 | 
										GFP_KERNEL);
 | 
				
			||||||
		if (result)
 | 
							if (result)
 | 
				
			||||||
| 
						 | 
					@ -347,7 +346,6 @@ static void cyberjack_read_int_callback(struct urb *urb)
 | 
				
			||||||
		spin_unlock(&priv->lock);
 | 
							spin_unlock(&priv->lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!old_rdtodo) {
 | 
							if (!old_rdtodo) {
 | 
				
			||||||
			port->read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
								result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
			if (result)
 | 
								if (result)
 | 
				
			||||||
				dev_err(&port->dev, "%s - failed resubmitting "
 | 
									dev_err(&port->dev, "%s - failed resubmitting "
 | 
				
			||||||
| 
						 | 
					@ -358,7 +356,6 @@ static void cyberjack_read_int_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
resubmit:
 | 
					resubmit:
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
						result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (result)
 | 
						if (result)
 | 
				
			||||||
		dev_err(&port->dev, "usb_submit_urb(read int) failed\n");
 | 
							dev_err(&port->dev, "usb_submit_urb(read int) failed\n");
 | 
				
			||||||
| 
						 | 
					@ -411,7 +408,6 @@ static void cyberjack_read_bulk_callback(struct urb *urb)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Continue to read if we have still urbs to do. */
 | 
						/* Continue to read if we have still urbs to do. */
 | 
				
			||||||
	if (todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/) {
 | 
						if (todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/) {
 | 
				
			||||||
		port->read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result)
 | 
							if (result)
 | 
				
			||||||
			dev_err(&port->dev, "%s - failed resubmitting read "
 | 
								dev_err(&port->dev, "%s - failed resubmitting read "
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1136,8 +1136,6 @@ static void cypress_unthrottle(struct tty_struct *tty)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (actually_throttled) {
 | 
						if (actually_throttled) {
 | 
				
			||||||
		port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
							result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
		if (result) {
 | 
							if (result) {
 | 
				
			||||||
			dev_err(&port->dev, "%s - failed submitting read urb, "
 | 
								dev_err(&port->dev, "%s - failed submitting read urb, "
 | 
				
			||||||
| 
						 | 
					@ -1326,7 +1324,6 @@ static void cypress_write_int_callback(struct urb *urb)
 | 
				
			||||||
		dbg("%s - nonzero write bulk status received: %d",
 | 
							dbg("%s - nonzero write bulk status received: %d",
 | 
				
			||||||
			__func__, status);
 | 
								__func__, status);
 | 
				
			||||||
		port->interrupt_out_urb->transfer_buffer_length = 1;
 | 
							port->interrupt_out_urb->transfer_buffer_length = 1;
 | 
				
			||||||
		port->interrupt_out_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (!result)
 | 
							if (!result)
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -438,7 +438,6 @@ static int digi_write_oob_command(struct usb_serial_port *port,
 | 
				
			||||||
			len &= ~3;
 | 
								len &= ~3;
 | 
				
			||||||
		memcpy(oob_port->write_urb->transfer_buffer, buf, len);
 | 
							memcpy(oob_port->write_urb->transfer_buffer, buf, len);
 | 
				
			||||||
		oob_port->write_urb->transfer_buffer_length = len;
 | 
							oob_port->write_urb->transfer_buffer_length = len;
 | 
				
			||||||
		oob_port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC);
 | 
							ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (ret == 0) {
 | 
							if (ret == 0) {
 | 
				
			||||||
			oob_priv->dp_write_urb_in_use = 1;
 | 
								oob_priv->dp_write_urb_in_use = 1;
 | 
				
			||||||
| 
						 | 
					@ -516,7 +515,6 @@ static int digi_write_inb_command(struct usb_serial_port *port,
 | 
				
			||||||
			memcpy(data, buf, len);
 | 
								memcpy(data, buf, len);
 | 
				
			||||||
			port->write_urb->transfer_buffer_length = len;
 | 
								port->write_urb->transfer_buffer_length = len;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
							ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (ret == 0) {
 | 
							if (ret == 0) {
 | 
				
			||||||
| 
						 | 
					@ -587,7 +585,6 @@ static int digi_set_modem_signals(struct usb_serial_port *port,
 | 
				
			||||||
	data[7] = 0;
 | 
						data[7] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	oob_port->write_urb->transfer_buffer_length = 8;
 | 
						oob_port->write_urb->transfer_buffer_length = 8;
 | 
				
			||||||
	oob_port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC);
 | 
						ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (ret == 0) {
 | 
						if (ret == 0) {
 | 
				
			||||||
| 
						 | 
					@ -683,10 +680,8 @@ static void digi_rx_unthrottle(struct tty_struct *tty)
 | 
				
			||||||
	spin_lock_irqsave(&priv->dp_port_lock, flags);
 | 
						spin_lock_irqsave(&priv->dp_port_lock, flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* restart read chain */
 | 
						/* restart read chain */
 | 
				
			||||||
	if (priv->dp_throttle_restart) {
 | 
						if (priv->dp_throttle_restart)
 | 
				
			||||||
		port->read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		ret = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
							ret = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* turn throttle off */
 | 
						/* turn throttle off */
 | 
				
			||||||
	priv->dp_throttled = 0;
 | 
						priv->dp_throttled = 0;
 | 
				
			||||||
| 
						 | 
					@ -979,7 +974,6 @@ static int digi_write(struct tty_struct *tty, struct usb_serial_port *port,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->write_urb->transfer_buffer_length = data_len+2;
 | 
						port->write_urb->transfer_buffer_length = data_len+2;
 | 
				
			||||||
	port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*data++ = DIGI_CMD_SEND_DATA;
 | 
						*data++ = DIGI_CMD_SEND_DATA;
 | 
				
			||||||
	*data++ = data_len;
 | 
						*data++ = data_len;
 | 
				
			||||||
| 
						 | 
					@ -1055,7 +1049,6 @@ static void digi_write_bulk_callback(struct urb *urb)
 | 
				
			||||||
			= (unsigned char)priv->dp_out_buf_len;
 | 
								= (unsigned char)priv->dp_out_buf_len;
 | 
				
			||||||
		port->write_urb->transfer_buffer_length =
 | 
							port->write_urb->transfer_buffer_length =
 | 
				
			||||||
						priv->dp_out_buf_len + 2;
 | 
											priv->dp_out_buf_len + 2;
 | 
				
			||||||
		port->write_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		memcpy(port->write_urb->transfer_buffer + 2, priv->dp_out_buf,
 | 
							memcpy(port->write_urb->transfer_buffer + 2, priv->dp_out_buf,
 | 
				
			||||||
			priv->dp_out_buf_len);
 | 
								priv->dp_out_buf_len);
 | 
				
			||||||
		ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
							ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
				
			||||||
| 
						 | 
					@ -1257,7 +1250,6 @@ static int digi_startup_device(struct usb_serial *serial)
 | 
				
			||||||
	/* set USB_DISABLE_SPD flag for write bulk urbs */
 | 
						/* set USB_DISABLE_SPD flag for write bulk urbs */
 | 
				
			||||||
	for (i = 0; i < serial->type->num_ports + 1; i++) {
 | 
						for (i = 0; i < serial->type->num_ports + 1; i++) {
 | 
				
			||||||
		port = serial->port[i];
 | 
							port = serial->port[i];
 | 
				
			||||||
		port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		ret = usb_submit_urb(port->read_urb, GFP_KERNEL);
 | 
							ret = usb_submit_urb(port->read_urb, GFP_KERNEL);
 | 
				
			||||||
		if (ret != 0) {
 | 
							if (ret != 0) {
 | 
				
			||||||
			dev_err(&port->dev,
 | 
								dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					@ -1400,7 +1392,6 @@ static void digi_read_bulk_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* continue read */
 | 
						/* continue read */
 | 
				
			||||||
	urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	ret = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						ret = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (ret != 0 && ret != -EPERM) {
 | 
						if (ret != 0 && ret != -EPERM) {
 | 
				
			||||||
		dev_err(&port->dev,
 | 
							dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -901,7 +901,6 @@ static int garmin_init_session(struct usb_serial_port *port)
 | 
				
			||||||
		usb_kill_urb(port->interrupt_in_urb);
 | 
							usb_kill_urb(port->interrupt_in_urb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		dbg("%s - adding interrupt input", __func__);
 | 
							dbg("%s - adding interrupt input", __func__);
 | 
				
			||||||
		port->interrupt_in_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
							status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
		if (status)
 | 
							if (status)
 | 
				
			||||||
			dev_err(&serial->dev->dev,
 | 
								dev_err(&serial->dev->dev,
 | 
				
			||||||
| 
						 | 
					@ -1353,7 +1352,6 @@ static void garmin_read_int_callback(struct urb *urb)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	garmin_read_process(garmin_data_p, data, urb->actual_length, 0);
 | 
						garmin_read_process(garmin_data_p, data, urb->actual_length, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	retval = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						retval = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (retval)
 | 
						if (retval)
 | 
				
			||||||
		dev_err(&urb->dev->dev,
 | 
							dev_err(&urb->dev->dev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -610,7 +610,6 @@ static void edge_interrupt_callback(struct urb *urb)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					/* we have pending bytes on the
 | 
										/* we have pending bytes on the
 | 
				
			||||||
					   bulk in pipe, send a request */
 | 
										   bulk in pipe, send a request */
 | 
				
			||||||
					edge_serial->read_urb->dev = edge_serial->serial->dev;
 | 
					 | 
				
			||||||
					result = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
 | 
										result = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
 | 
				
			||||||
					if (result) {
 | 
										if (result) {
 | 
				
			||||||
						dev_err(&edge_serial->serial->dev->dev, "%s - usb_submit_urb(read bulk) failed with result = %d\n", __func__, result);
 | 
											dev_err(&edge_serial->serial->dev->dev, "%s - usb_submit_urb(read bulk) failed with result = %d\n", __func__, result);
 | 
				
			||||||
| 
						 | 
					@ -711,7 +710,6 @@ static void edge_bulk_in_callback(struct urb *urb)
 | 
				
			||||||
	/* check to see if there's any more data for us to read */
 | 
						/* check to see if there's any more data for us to read */
 | 
				
			||||||
	if (edge_serial->rxBytesAvail > 0) {
 | 
						if (edge_serial->rxBytesAvail > 0) {
 | 
				
			||||||
		dbg("%s - posting a read", __func__);
 | 
							dbg("%s - posting a read", __func__);
 | 
				
			||||||
		edge_serial->read_urb->dev = edge_serial->serial->dev;
 | 
					 | 
				
			||||||
		retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
 | 
							retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (retval) {
 | 
							if (retval) {
 | 
				
			||||||
			dev_err(&urb->dev->dev,
 | 
								dev_err(&urb->dev->dev,
 | 
				
			||||||
| 
						 | 
					@ -1330,7 +1328,6 @@ static void send_more_port_data(struct edgeport_serial *edge_serial,
 | 
				
			||||||
	edge_port->txCredits -= count;
 | 
						edge_port->txCredits -= count;
 | 
				
			||||||
	edge_port->icount.tx += count;
 | 
						edge_port->icount.tx += count;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	urb->dev = edge_serial->serial->dev;
 | 
					 | 
				
			||||||
	status = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						status = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (status) {
 | 
						if (status) {
 | 
				
			||||||
		/* something went wrong */
 | 
							/* something went wrong */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1770,12 +1770,11 @@ static void edge_bulk_in_callback(struct urb *urb)
 | 
				
			||||||
exit:
 | 
					exit:
 | 
				
			||||||
	/* continue read unless stopped */
 | 
						/* continue read unless stopped */
 | 
				
			||||||
	spin_lock(&edge_port->ep_lock);
 | 
						spin_lock(&edge_port->ep_lock);
 | 
				
			||||||
	if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING) {
 | 
						if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING)
 | 
				
			||||||
		urb->dev = edge_port->port->serial->dev;
 | 
					 | 
				
			||||||
		retval = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							retval = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	} else if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPING) {
 | 
						else if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPING)
 | 
				
			||||||
		edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPED;
 | 
							edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPED;
 | 
				
			||||||
	}
 | 
					
 | 
				
			||||||
	spin_unlock(&edge_port->ep_lock);
 | 
						spin_unlock(&edge_port->ep_lock);
 | 
				
			||||||
	if (retval)
 | 
						if (retval)
 | 
				
			||||||
		dev_err(&urb->dev->dev,
 | 
							dev_err(&urb->dev->dev,
 | 
				
			||||||
| 
						 | 
					@ -1954,7 +1953,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		urb->complete = edge_interrupt_callback;
 | 
							urb->complete = edge_interrupt_callback;
 | 
				
			||||||
		urb->context = edge_serial;
 | 
							urb->context = edge_serial;
 | 
				
			||||||
		urb->dev = dev;
 | 
					 | 
				
			||||||
		status = usb_submit_urb(urb, GFP_KERNEL);
 | 
							status = usb_submit_urb(urb, GFP_KERNEL);
 | 
				
			||||||
		if (status) {
 | 
							if (status) {
 | 
				
			||||||
			dev_err(&port->dev,
 | 
								dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					@ -1982,7 +1980,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
	edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
 | 
						edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
 | 
				
			||||||
	urb->complete = edge_bulk_in_callback;
 | 
						urb->complete = edge_bulk_in_callback;
 | 
				
			||||||
	urb->context = edge_port;
 | 
						urb->context = edge_port;
 | 
				
			||||||
	urb->dev = dev;
 | 
					 | 
				
			||||||
	status = usb_submit_urb(urb, GFP_KERNEL);
 | 
						status = usb_submit_urb(urb, GFP_KERNEL);
 | 
				
			||||||
	if (status) {
 | 
						if (status) {
 | 
				
			||||||
		dev_err(&port->dev,
 | 
							dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					@ -2262,7 +2259,6 @@ static int restart_read(struct edgeport_port *edge_port)
 | 
				
			||||||
		urb = edge_port->port->read_urb;
 | 
							urb = edge_port->port->read_urb;
 | 
				
			||||||
		urb->complete = edge_bulk_in_callback;
 | 
							urb->complete = edge_bulk_in_callback;
 | 
				
			||||||
		urb->context = edge_port;
 | 
							urb->context = edge_port;
 | 
				
			||||||
		urb->dev = edge_port->port->serial->dev;
 | 
					 | 
				
			||||||
		status = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							status = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
 | 
						edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -330,7 +330,6 @@ static int keyspan_write(struct tty_struct *tty,
 | 
				
			||||||
		/* send the data out the bulk port */
 | 
							/* send the data out the bulk port */
 | 
				
			||||||
		this_urb->transfer_buffer_length = todo + dataOffset;
 | 
							this_urb->transfer_buffer_length = todo + dataOffset;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
							err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (err != 0)
 | 
							if (err != 0)
 | 
				
			||||||
			dbg("usb_submit_urb(write bulk) failed (%d)", err);
 | 
								dbg("usb_submit_urb(write bulk) failed (%d)", err);
 | 
				
			||||||
| 
						 | 
					@ -396,7 +395,6 @@ static void	usa26_indat_callback(struct urb *urb)
 | 
				
			||||||
	tty_kref_put(tty);
 | 
						tty_kref_put(tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -492,7 +490,6 @@ static void	usa26_instat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -542,7 +539,6 @@ static void usa28_indat_callback(struct urb *urb)
 | 
				
			||||||
		tty_kref_put(tty);
 | 
							tty_kref_put(tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Resubmit urb so we continue receiving */
 | 
							/* Resubmit urb so we continue receiving */
 | 
				
			||||||
		urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
		if (err != 0)
 | 
							if (err != 0)
 | 
				
			||||||
			dbg("%s - resubmit read urb failed. (%d)",
 | 
								dbg("%s - resubmit read urb failed. (%d)",
 | 
				
			||||||
| 
						 | 
					@ -627,7 +623,6 @@ static void	usa28_instat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Resubmit urb so we continue receiving */
 | 
							/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -722,8 +717,6 @@ static void	usa49_instat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -781,7 +774,6 @@ static void	usa49_indat_callback(struct urb *urb)
 | 
				
			||||||
	tty_kref_put(tty);
 | 
						tty_kref_put(tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -852,8 +844,6 @@ static void usa49wg_indat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -929,7 +919,6 @@ static void usa90_indat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -980,7 +969,6 @@ static void	usa90_instat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -1056,7 +1044,6 @@ static void	usa67_instat_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Resubmit urb so we continue receiving */
 | 
						/* Resubmit urb so we continue receiving */
 | 
				
			||||||
	urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
							dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -1156,7 +1143,6 @@ static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
		urb = p_priv->in_urbs[i];
 | 
							urb = p_priv->in_urbs[i];
 | 
				
			||||||
		if (urb == NULL)
 | 
							if (urb == NULL)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		urb->dev = serial->dev;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* make sure endpoint data toggle is synchronized
 | 
							/* make sure endpoint data toggle is synchronized
 | 
				
			||||||
		   with the device */
 | 
							   with the device */
 | 
				
			||||||
| 
						 | 
					@ -1172,7 +1158,6 @@ static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
		urb = p_priv->out_urbs[i];
 | 
							urb = p_priv->out_urbs[i];
 | 
				
			||||||
		if (urb == NULL)
 | 
							if (urb == NULL)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		/* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
 | 
							/* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe),
 | 
				
			||||||
						usb_pipeout(urb->pipe), 0); */
 | 
											usb_pipeout(urb->pipe), 0); */
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -1889,7 +1874,6 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
 | 
				
			||||||
	/* send the data out the device on control endpoint */
 | 
						/* send the data out the device on control endpoint */
 | 
				
			||||||
	this_urb->transfer_buffer_length = sizeof(msg);
 | 
						this_urb->transfer_buffer_length = sizeof(msg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 | 
							dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -2017,7 +2001,6 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
 | 
				
			||||||
	/* send the data out the device on control endpoint */
 | 
						/* send the data out the device on control endpoint */
 | 
				
			||||||
	this_urb->transfer_buffer_length = sizeof(msg);
 | 
						this_urb->transfer_buffer_length = sizeof(msg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - usb_submit_urb(setup) failed", __func__);
 | 
							dbg("%s - usb_submit_urb(setup) failed", __func__);
 | 
				
			||||||
| 
						 | 
					@ -2204,8 +2187,6 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* send the data out the device on control endpoint */
 | 
							/* send the data out the device on control endpoint */
 | 
				
			||||||
		this_urb->transfer_buffer_length = sizeof(msg);
 | 
							this_urb->transfer_buffer_length = sizeof(msg);
 | 
				
			||||||
 | 
					 | 
				
			||||||
		this_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
| 
						 | 
					@ -2348,7 +2329,6 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
 | 
				
			||||||
	/* send the data out the device on control endpoint */
 | 
						/* send the data out the device on control endpoint */
 | 
				
			||||||
	this_urb->transfer_buffer_length = sizeof(msg);
 | 
						this_urb->transfer_buffer_length = sizeof(msg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
		dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 | 
							dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 | 
				
			||||||
| 
						 | 
					@ -2494,7 +2474,6 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* send the data out the device on control endpoint */
 | 
						/* send the data out the device on control endpoint */
 | 
				
			||||||
	this_urb->transfer_buffer_length = sizeof(msg);
 | 
						this_urb->transfer_buffer_length = sizeof(msg);
 | 
				
			||||||
	this_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
						err = usb_submit_urb(this_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (err != 0)
 | 
						if (err != 0)
 | 
				
			||||||
| 
						 | 
					@ -2583,14 +2562,12 @@ static int keyspan_startup(struct usb_serial *serial)
 | 
				
			||||||
	keyspan_setup_urbs(serial);
 | 
						keyspan_setup_urbs(serial);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (s_priv->instat_urb != NULL) {
 | 
						if (s_priv->instat_urb != NULL) {
 | 
				
			||||||
		s_priv->instat_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL);
 | 
							err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL);
 | 
				
			||||||
		if (err != 0)
 | 
							if (err != 0)
 | 
				
			||||||
			dbg("%s - submit instat urb failed %d", __func__,
 | 
								dbg("%s - submit instat urb failed %d", __func__,
 | 
				
			||||||
				err);
 | 
									err);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (s_priv->indat_urb != NULL) {
 | 
						if (s_priv->indat_urb != NULL) {
 | 
				
			||||||
		s_priv->indat_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL);
 | 
							err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL);
 | 
				
			||||||
		if (err != 0)
 | 
							if (err != 0)
 | 
				
			||||||
			dbg("%s - submit indat urb failed %d", __func__,
 | 
								dbg("%s - submit indat urb failed %d", __func__,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -237,7 +237,6 @@ static void keyspan_pda_rx_unthrottle(struct tty_struct *tty)
 | 
				
			||||||
	struct usb_serial_port *port = tty->driver_data;
 | 
						struct usb_serial_port *port = tty->driver_data;
 | 
				
			||||||
	/* just restart the receive interrupt URB */
 | 
						/* just restart the receive interrupt URB */
 | 
				
			||||||
	dbg("keyspan_pda_rx_unthrottle port %d", port->number);
 | 
						dbg("keyspan_pda_rx_unthrottle port %d", port->number);
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
 | 
						if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
 | 
				
			||||||
		dbg(" usb_submit_urb(read urb) failed");
 | 
							dbg(" usb_submit_urb(read urb) failed");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -545,7 +544,6 @@ static int keyspan_pda_write(struct tty_struct *tty,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		priv->tx_room -= count;
 | 
							priv->tx_room -= count;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
							rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (rc) {
 | 
							if (rc) {
 | 
				
			||||||
			dbg(" usb_submit_urb(write bulk) failed");
 | 
								dbg(" usb_submit_urb(write bulk) failed");
 | 
				
			||||||
| 
						 | 
					@ -664,7 +662,6 @@ static int keyspan_pda_open(struct tty_struct *tty,
 | 
				
			||||||
	priv->tx_throttled = *room ? 0 : 1;
 | 
						priv->tx_throttled = *room ? 0 : 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*Start reading from the device*/
 | 
						/*Start reading from the device*/
 | 
				
			||||||
	port->interrupt_in_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
						rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
	if (rc) {
 | 
						if (rc) {
 | 
				
			||||||
		dbg("%s - usb_submit_urb(read int) failed", __func__);
 | 
							dbg("%s - usb_submit_urb(read int) failed", __func__);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -219,9 +219,6 @@ static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
	dbg("%s - port %d", __func__, port->number);
 | 
						dbg("%s - port %d", __func__, port->number);
 | 
				
			||||||
	priv = usb_get_serial_port_data(port);
 | 
						priv = usb_get_serial_port_data(port);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* someone sets the dev to 0 if the close method has been called */
 | 
					 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* allocate memory for transfer buffer */
 | 
						/* allocate memory for transfer buffer */
 | 
				
			||||||
	transfer_buffer = kzalloc(transfer_buffer_length, GFP_KERNEL);
 | 
						transfer_buffer = kzalloc(transfer_buffer_length, GFP_KERNEL);
 | 
				
			||||||
	if (!transfer_buffer)
 | 
						if (!transfer_buffer)
 | 
				
			||||||
| 
						 | 
					@ -381,8 +378,6 @@ static void kobil_read_int_callback(struct urb *urb)
 | 
				
			||||||
		tty_flip_buffer_push(tty);
 | 
							tty_flip_buffer_push(tty);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	tty_kref_put(tty);
 | 
						tty_kref_put(tty);
 | 
				
			||||||
	/* someone sets the dev to 0 if the close method has been called */
 | 
					 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
						result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
				
			||||||
	dbg("%s - port %d Send read URB returns: %i",
 | 
						dbg("%s - port %d Send read URB returns: %i",
 | 
				
			||||||
| 
						 | 
					@ -463,17 +458,9 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port,
 | 
				
			||||||
		priv->filled = 0;
 | 
							priv->filled = 0;
 | 
				
			||||||
		priv->cur_pos = 0;
 | 
							priv->cur_pos = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* someone sets the dev to 0 if the close method
 | 
					 | 
				
			||||||
		   has been called */
 | 
					 | 
				
			||||||
		port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		/* start reading (except TWIN and KAAN SIM) */
 | 
							/* start reading (except TWIN and KAAN SIM) */
 | 
				
			||||||
		if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID ||
 | 
							if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID ||
 | 
				
			||||||
			priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) {
 | 
								priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) {
 | 
				
			||||||
			/* someone sets the dev to 0 if the close method has
 | 
					 | 
				
			||||||
			   been called */
 | 
					 | 
				
			||||||
			port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			result = usb_submit_urb(port->interrupt_in_urb,
 | 
								result = usb_submit_urb(port->interrupt_in_urb,
 | 
				
			||||||
								GFP_NOIO);
 | 
													GFP_NOIO);
 | 
				
			||||||
			dbg("%s - port %d Send read URB returns: %i",
 | 
								dbg("%s - port %d Send read URB returns: %i",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -482,7 +482,6 @@ static int  mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
	mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
 | 
						mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
 | 
				
			||||||
	spin_unlock_irqrestore(&priv->lock, flags);
 | 
						spin_unlock_irqrestore(&priv->lock, flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
 | 
						retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
 | 
				
			||||||
	if (retval) {
 | 
						if (retval) {
 | 
				
			||||||
		dev_err(&port->dev,
 | 
							dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					@ -491,7 +490,6 @@ static int  mct_u232_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
		goto error;
 | 
							goto error;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
						retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
	if (retval) {
 | 
						if (retval) {
 | 
				
			||||||
		usb_kill_urb(port->read_urb);
 | 
							usb_kill_urb(port->read_urb);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -940,8 +940,6 @@ static void mos7720_bulk_in_callback(struct urb *urb)
 | 
				
			||||||
	tty_kref_put(tty);
 | 
						tty_kref_put(tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (port->read_urb->status != -EINPROGRESS) {
 | 
						if (port->read_urb->status != -EINPROGRESS) {
 | 
				
			||||||
		port->read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
							retval = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (retval)
 | 
							if (retval)
 | 
				
			||||||
			dbg("usb_submit_urb(read bulk) failed, retval = %d",
 | 
								dbg("usb_submit_urb(read bulk) failed, retval = %d",
 | 
				
			||||||
| 
						 | 
					@ -1727,8 +1725,6 @@ static void change_port_settings(struct tty_struct *tty,
 | 
				
			||||||
	write_mos_reg(serial, port_number, IER, 0x0c);
 | 
						write_mos_reg(serial, port_number, IER, 0x0c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (port->read_urb->status != -EINPROGRESS) {
 | 
						if (port->read_urb->status != -EINPROGRESS) {
 | 
				
			||||||
		port->read_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
							status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (status)
 | 
							if (status)
 | 
				
			||||||
			dbg("usb_submit_urb(read bulk) failed, status = %d",
 | 
								dbg("usb_submit_urb(read bulk) failed, status = %d",
 | 
				
			||||||
| 
						 | 
					@ -1779,7 +1775,6 @@ static void mos7720_set_termios(struct tty_struct *tty,
 | 
				
			||||||
	change_port_settings(tty, mos7720_port, old_termios);
 | 
						change_port_settings(tty, mos7720_port, old_termios);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (port->read_urb->status != -EINPROGRESS) {
 | 
						if (port->read_urb->status != -EINPROGRESS) {
 | 
				
			||||||
		port->read_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
							status = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (status)
 | 
							if (status)
 | 
				
			||||||
			dbg("usb_submit_urb(read bulk) failed, status = %d",
 | 
								dbg("usb_submit_urb(read bulk) failed, status = %d",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -792,8 +792,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mos7840_port->read_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	mos7840_port->read_urb_busy = true;
 | 
						mos7840_port->read_urb_busy = true;
 | 
				
			||||||
	retval = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
 | 
						retval = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2058,7 +2056,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
 | 
				
			||||||
	mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
 | 
						mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (mos7840_port->read_urb_busy == false) {
 | 
						if (mos7840_port->read_urb_busy == false) {
 | 
				
			||||||
		mos7840_port->read_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		mos7840_port->read_urb_busy = true;
 | 
							mos7840_port->read_urb_busy = true;
 | 
				
			||||||
		status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
 | 
							status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (status) {
 | 
							if (status) {
 | 
				
			||||||
| 
						 | 
					@ -2130,7 +2127,6 @@ static void mos7840_set_termios(struct tty_struct *tty,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (mos7840_port->read_urb_busy == false) {
 | 
						if (mos7840_port->read_urb_busy == false) {
 | 
				
			||||||
		mos7840_port->read_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		mos7840_port->read_urb_busy = true;
 | 
							mos7840_port->read_urb_busy = true;
 | 
				
			||||||
		status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
 | 
							status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (status) {
 | 
							if (status) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -154,6 +154,7 @@ static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
			port->read_urb->transfer_buffer,
 | 
								port->read_urb->transfer_buffer,
 | 
				
			||||||
			port->read_urb->transfer_buffer_length,
 | 
								port->read_urb->transfer_buffer_length,
 | 
				
			||||||
			omninet_read_bulk_callback, port);
 | 
								omninet_read_bulk_callback, port);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 | 
						result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 | 
				
			||||||
	if (result)
 | 
						if (result)
 | 
				
			||||||
		dev_err(&port->dev,
 | 
							dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					@ -262,7 +263,6 @@ static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port,
 | 
				
			||||||
	/* send the data out the bulk port, always 64 bytes */
 | 
						/* send the data out the bulk port, always 64 bytes */
 | 
				
			||||||
	wport->write_urb->transfer_buffer_length = 64;
 | 
						wport->write_urb->transfer_buffer_length = 64;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wport->write_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
 | 
						result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (result) {
 | 
						if (result) {
 | 
				
			||||||
		set_bit(0, &wport->write_urbs_free);
 | 
							set_bit(0, &wport->write_urbs_free);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -384,7 +384,6 @@ static void opticon_unthrottle(struct tty_struct *tty)
 | 
				
			||||||
	priv->actually_throttled = false;
 | 
						priv->actually_throttled = false;
 | 
				
			||||||
	spin_unlock_irqrestore(&priv->lock, flags);
 | 
						spin_unlock_irqrestore(&priv->lock, flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	priv->bulk_read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	if (was_throttled) {
 | 
						if (was_throttled) {
 | 
				
			||||||
		result = usb_submit_urb(priv->bulk_read_urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(priv->bulk_read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result)
 | 
							if (result)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -264,7 +264,6 @@ static void setup_line(struct work_struct *work)
 | 
				
			||||||
	spin_unlock_irqrestore(&priv->lock, flags);
 | 
						spin_unlock_irqrestore(&priv->lock, flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dbg("%s(): submitting interrupt urb", __func__);
 | 
						dbg("%s(): submitting interrupt urb", __func__);
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
						result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
	if (result != 0) {
 | 
						if (result != 0) {
 | 
				
			||||||
		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
							dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
				
			||||||
| 
						 | 
					@ -321,7 +320,6 @@ static void send_data(struct work_struct *work)
 | 
				
			||||||
		priv->flags.write_urb_in_use = 0;
 | 
							priv->flags.write_urb_in_use = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		dbg("%s(): submitting interrupt urb", __func__);
 | 
							dbg("%s(): submitting interrupt urb", __func__);
 | 
				
			||||||
		port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
 | 
							result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
 | 
				
			||||||
		if (result != 0) {
 | 
							if (result != 0) {
 | 
				
			||||||
			dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
								dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
				
			||||||
| 
						 | 
					@ -334,7 +332,6 @@ static void send_data(struct work_struct *work)
 | 
				
			||||||
					port->write_urb->transfer_buffer,
 | 
										port->write_urb->transfer_buffer,
 | 
				
			||||||
					count, &port->lock);
 | 
										count, &port->lock);
 | 
				
			||||||
	port->write_urb->transfer_buffer_length = count;
 | 
						port->write_urb->transfer_buffer_length = count;
 | 
				
			||||||
	port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(port->write_urb, GFP_NOIO);
 | 
						result = usb_submit_urb(port->write_urb, GFP_NOIO);
 | 
				
			||||||
	if (result != 0) {
 | 
						if (result != 0) {
 | 
				
			||||||
		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
							dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
				
			||||||
| 
						 | 
					@ -583,7 +580,6 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
	kfree(buf);
 | 
						kfree(buf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dbg("%s(): submitting interrupt urb", __func__);
 | 
						dbg("%s(): submitting interrupt urb", __func__);
 | 
				
			||||||
	port->interrupt_in_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
						result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 | 
				
			||||||
	if (result != 0) {
 | 
						if (result != 0) {
 | 
				
			||||||
		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
							dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 | 
				
			||||||
| 
						 | 
					@ -837,7 +833,6 @@ static void oti6858_read_int_callback(struct urb *urb)
 | 
				
			||||||
	if (can_recv) {
 | 
						if (can_recv) {
 | 
				
			||||||
		int result;
 | 
							int result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		port->read_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result != 0) {
 | 
							if (result != 0) {
 | 
				
			||||||
			priv->flags.read_urb_in_use = 0;
 | 
								priv->flags.read_urb_in_use = 0;
 | 
				
			||||||
| 
						 | 
					@ -866,7 +861,6 @@ static void oti6858_read_int_callback(struct urb *urb)
 | 
				
			||||||
		int result;
 | 
							int result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*		dbg("%s(): submitting interrupt urb", __func__); */
 | 
					/*		dbg("%s(): submitting interrupt urb", __func__); */
 | 
				
			||||||
		urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result != 0) {
 | 
							if (result != 0) {
 | 
				
			||||||
			dev_err(&urb->dev->dev,
 | 
								dev_err(&urb->dev->dev,
 | 
				
			||||||
| 
						 | 
					@ -918,7 +912,6 @@ static void oti6858_read_bulk_callback(struct urb *urb)
 | 
				
			||||||
	tty_kref_put(tty);
 | 
						tty_kref_put(tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* schedule the interrupt urb */
 | 
						/* schedule the interrupt urb */
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
						result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (result != 0 && result != -EPERM) {
 | 
						if (result != 0 && result != -EPERM) {
 | 
				
			||||||
		dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 | 
							dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 | 
				
			||||||
| 
						 | 
					@ -955,7 +948,6 @@ static void oti6858_write_bulk_callback(struct urb *urb)
 | 
				
			||||||
		dbg("%s(): overflow in write", __func__);
 | 
							dbg("%s(): overflow in write", __func__);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		port->write_urb->transfer_buffer_length = 1;
 | 
							port->write_urb->transfer_buffer_length = 1;
 | 
				
			||||||
		port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result) {
 | 
							if (result) {
 | 
				
			||||||
			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 | 
								dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 | 
				
			||||||
| 
						 | 
					@ -968,7 +960,6 @@ static void oti6858_write_bulk_callback(struct urb *urb)
 | 
				
			||||||
	priv->flags.write_urb_in_use = 0;
 | 
						priv->flags.write_urb_in_use = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* schedule the interrupt urb if we are still open */
 | 
						/* schedule the interrupt urb if we are still open */
 | 
				
			||||||
	port->interrupt_in_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	dbg("%s(): submitting interrupt urb", __func__);
 | 
						dbg("%s(): submitting interrupt urb", __func__);
 | 
				
			||||||
	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
						result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (result != 0) {
 | 
						if (result != 0) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -681,7 +681,6 @@ static void sierra_instat_callback(struct urb *urb)
 | 
				
			||||||
	/* Resubmit urb so we continue receiving IRQ data */
 | 
						/* Resubmit urb so we continue receiving IRQ data */
 | 
				
			||||||
	if (status != -ESHUTDOWN && status != -ENOENT) {
 | 
						if (status != -ESHUTDOWN && status != -ENOENT) {
 | 
				
			||||||
		usb_mark_last_busy(serial->dev);
 | 
							usb_mark_last_busy(serial->dev);
 | 
				
			||||||
		urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							err = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
		if (err && err != -EPERM)
 | 
							if (err && err != -EPERM)
 | 
				
			||||||
			dev_err(&port->dev, "%s: resubmit intr urb "
 | 
								dev_err(&port->dev, "%s: resubmit intr urb "
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -182,7 +182,6 @@ static void symbol_unthrottle(struct tty_struct *tty)
 | 
				
			||||||
	priv->actually_throttled = false;
 | 
						priv->actually_throttled = false;
 | 
				
			||||||
	spin_unlock_irq(&priv->lock);
 | 
						spin_unlock_irq(&priv->lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	priv->int_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	if (was_throttled) {
 | 
						if (was_throttled) {
 | 
				
			||||||
		result = usb_submit_urb(priv->int_urb, GFP_KERNEL);
 | 
							result = usb_submit_urb(priv->int_urb, GFP_KERNEL);
 | 
				
			||||||
		if (result)
 | 
							if (result)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -537,7 +537,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		urb->complete = ti_interrupt_callback;
 | 
							urb->complete = ti_interrupt_callback;
 | 
				
			||||||
		urb->context = tdev;
 | 
							urb->context = tdev;
 | 
				
			||||||
		urb->dev = dev;
 | 
					 | 
				
			||||||
		status = usb_submit_urb(urb, GFP_KERNEL);
 | 
							status = usb_submit_urb(urb, GFP_KERNEL);
 | 
				
			||||||
		if (status) {
 | 
							if (status) {
 | 
				
			||||||
			dev_err(&port->dev,
 | 
								dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					@ -621,7 +620,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)
 | 
				
			||||||
	tport->tp_read_urb_state = TI_READ_URB_RUNNING;
 | 
						tport->tp_read_urb_state = TI_READ_URB_RUNNING;
 | 
				
			||||||
	urb->complete = ti_bulk_in_callback;
 | 
						urb->complete = ti_bulk_in_callback;
 | 
				
			||||||
	urb->context = tport;
 | 
						urb->context = tport;
 | 
				
			||||||
	urb->dev = dev;
 | 
					 | 
				
			||||||
	status = usb_submit_urb(urb, GFP_KERNEL);
 | 
						status = usb_submit_urb(urb, GFP_KERNEL);
 | 
				
			||||||
	if (status) {
 | 
						if (status) {
 | 
				
			||||||
		dev_err(&port->dev, "%s - submit read urb failed, %d\n",
 | 
							dev_err(&port->dev, "%s - submit read urb failed, %d\n",
 | 
				
			||||||
| 
						 | 
					@ -1236,12 +1234,11 @@ static void ti_bulk_in_callback(struct urb *urb)
 | 
				
			||||||
exit:
 | 
					exit:
 | 
				
			||||||
	/* continue to read unless stopping */
 | 
						/* continue to read unless stopping */
 | 
				
			||||||
	spin_lock(&tport->tp_lock);
 | 
						spin_lock(&tport->tp_lock);
 | 
				
			||||||
	if (tport->tp_read_urb_state == TI_READ_URB_RUNNING) {
 | 
						if (tport->tp_read_urb_state == TI_READ_URB_RUNNING)
 | 
				
			||||||
		urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		retval = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							retval = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
	} else if (tport->tp_read_urb_state == TI_READ_URB_STOPPING) {
 | 
						else if (tport->tp_read_urb_state == TI_READ_URB_STOPPING)
 | 
				
			||||||
		tport->tp_read_urb_state = TI_READ_URB_STOPPED;
 | 
							tport->tp_read_urb_state = TI_READ_URB_STOPPED;
 | 
				
			||||||
	}
 | 
					
 | 
				
			||||||
	spin_unlock(&tport->tp_lock);
 | 
						spin_unlock(&tport->tp_lock);
 | 
				
			||||||
	if (retval)
 | 
						if (retval)
 | 
				
			||||||
		dev_err(dev, "%s - resubmit read urb failed, %d\n",
 | 
							dev_err(dev, "%s - resubmit read urb failed, %d\n",
 | 
				
			||||||
| 
						 | 
					@ -1576,7 +1573,6 @@ static int ti_restart_read(struct ti_port *tport, struct tty_struct *tty)
 | 
				
			||||||
		spin_unlock_irqrestore(&tport->tp_lock, flags);
 | 
							spin_unlock_irqrestore(&tport->tp_lock, flags);
 | 
				
			||||||
		urb->complete = ti_bulk_in_callback;
 | 
							urb->complete = ti_bulk_in_callback;
 | 
				
			||||||
		urb->context = tport;
 | 
							urb->context = tport;
 | 
				
			||||||
		urb->dev = tport->tp_port->serial->dev;
 | 
					 | 
				
			||||||
		status = usb_submit_urb(urb, GFP_KERNEL);
 | 
							status = usb_submit_urb(urb, GFP_KERNEL);
 | 
				
			||||||
	} else  {
 | 
						} else  {
 | 
				
			||||||
		tport->tp_read_urb_state = TI_READ_URB_RUNNING;
 | 
							tport->tp_read_urb_state = TI_READ_URB_RUNNING;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -702,7 +702,6 @@ static void whiteheat_close(struct usb_serial_port *port)
 | 
				
			||||||
static int whiteheat_write(struct tty_struct *tty,
 | 
					static int whiteheat_write(struct tty_struct *tty,
 | 
				
			||||||
	struct usb_serial_port *port, const unsigned char *buf, int count)
 | 
						struct usb_serial_port *port, const unsigned char *buf, int count)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct usb_serial *serial = port->serial;
 | 
					 | 
				
			||||||
	struct whiteheat_private *info = usb_get_serial_port_data(port);
 | 
						struct whiteheat_private *info = usb_get_serial_port_data(port);
 | 
				
			||||||
	struct whiteheat_urb_wrap *wrap;
 | 
						struct whiteheat_urb_wrap *wrap;
 | 
				
			||||||
	struct urb *urb;
 | 
						struct urb *urb;
 | 
				
			||||||
| 
						 | 
					@ -738,7 +737,6 @@ static int whiteheat_write(struct tty_struct *tty,
 | 
				
			||||||
		usb_serial_debug_data(debug, &port->dev,
 | 
							usb_serial_debug_data(debug, &port->dev,
 | 
				
			||||||
				__func__, bytes, urb->transfer_buffer);
 | 
									__func__, bytes, urb->transfer_buffer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		urb->transfer_buffer_length = bytes;
 | 
							urb->transfer_buffer_length = bytes;
 | 
				
			||||||
		result = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result) {
 | 
							if (result) {
 | 
				
			||||||
| 
						 | 
					@ -984,7 +982,6 @@ static void command_port_read_callback(struct urb *urb)
 | 
				
			||||||
		dbg("%s - bad reply from firmware", __func__);
 | 
							dbg("%s - bad reply from firmware", __func__);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Continue trying to always read */
 | 
						/* Continue trying to always read */
 | 
				
			||||||
	command_port->read_urb->dev = command_port->serial->dev;
 | 
					 | 
				
			||||||
	result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
 | 
						result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
 | 
				
			||||||
	if (result)
 | 
						if (result)
 | 
				
			||||||
		dbg("%s - failed resubmitting read urb, error %d",
 | 
							dbg("%s - failed resubmitting read urb, error %d",
 | 
				
			||||||
| 
						 | 
					@ -1090,7 +1087,6 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command,
 | 
				
			||||||
	transfer_buffer[0] = command;
 | 
						transfer_buffer[0] = command;
 | 
				
			||||||
	memcpy(&transfer_buffer[1], data, datasize);
 | 
						memcpy(&transfer_buffer[1], data, datasize);
 | 
				
			||||||
	command_port->write_urb->transfer_buffer_length = datasize + 1;
 | 
						command_port->write_urb->transfer_buffer_length = datasize + 1;
 | 
				
			||||||
	command_port->write_urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
	retval = usb_submit_urb(command_port->write_urb, GFP_NOIO);
 | 
						retval = usb_submit_urb(command_port->write_urb, GFP_NOIO);
 | 
				
			||||||
	if (retval) {
 | 
						if (retval) {
 | 
				
			||||||
		dbg("%s - submit urb failed", __func__);
 | 
							dbg("%s - submit urb failed", __func__);
 | 
				
			||||||
| 
						 | 
					@ -1311,7 +1307,6 @@ static int start_command_port(struct usb_serial *serial)
 | 
				
			||||||
		/* Work around HCD bugs */
 | 
							/* Work around HCD bugs */
 | 
				
			||||||
		usb_clear_halt(serial->dev, command_port->read_urb->pipe);
 | 
							usb_clear_halt(serial->dev, command_port->read_urb->pipe);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		command_port->read_urb->dev = serial->dev;
 | 
					 | 
				
			||||||
		retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
 | 
							retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
 | 
				
			||||||
		if (retval) {
 | 
							if (retval) {
 | 
				
			||||||
			dev_err(&serial->dev->dev,
 | 
								dev_err(&serial->dev->dev,
 | 
				
			||||||
| 
						 | 
					@ -1359,7 +1354,6 @@ static int start_port_read(struct usb_serial_port *port)
 | 
				
			||||||
		list_del(tmp);
 | 
							list_del(tmp);
 | 
				
			||||||
		wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
 | 
							wrap = list_entry(tmp, struct whiteheat_urb_wrap, list);
 | 
				
			||||||
		urb = wrap->urb;
 | 
							urb = wrap->urb;
 | 
				
			||||||
		urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		spin_unlock_irqrestore(&info->lock, flags);
 | 
							spin_unlock_irqrestore(&info->lock, flags);
 | 
				
			||||||
		retval = usb_submit_urb(urb, GFP_KERNEL);
 | 
							retval = usb_submit_urb(urb, GFP_KERNEL);
 | 
				
			||||||
		if (retval) {
 | 
							if (retval) {
 | 
				
			||||||
| 
						 | 
					@ -1439,7 +1433,6 @@ static void rx_data_softint(struct work_struct *work)
 | 
				
			||||||
			sent += tty_insert_flip_string(tty,
 | 
								sent += tty_insert_flip_string(tty,
 | 
				
			||||||
				urb->transfer_buffer, urb->actual_length);
 | 
									urb->transfer_buffer, urb->actual_length);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		urb->dev = port->serial->dev;
 | 
					 | 
				
			||||||
		result = usb_submit_urb(urb, GFP_ATOMIC);
 | 
							result = usb_submit_urb(urb, GFP_ATOMIC);
 | 
				
			||||||
		if (result) {
 | 
							if (result) {
 | 
				
			||||||
			dev_err(&port->dev,
 | 
								dev_err(&port->dev,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue