| .. | .. |
|---|
| 140 | 140 | ss->line = port->minor; |
|---|
| 141 | 141 | ss->port = port->port_number; |
|---|
| 142 | 142 | ss->baud_base = tty_get_baud_rate(port->port.tty); |
|---|
| 143 | | - ss->close_delay = jiffies_to_msecs(port->port.close_delay) / 10; |
|---|
| 143 | + ss->close_delay = port->port.close_delay / 10; |
|---|
| 144 | 144 | ss->closing_wait = port->port.closing_wait == ASYNC_CLOSING_WAIT_NONE ? |
|---|
| 145 | 145 | ASYNC_CLOSING_WAIT_NONE : |
|---|
| 146 | | - jiffies_to_msecs(port->port.closing_wait) / 10; |
|---|
| 146 | + port->port.closing_wait / 10; |
|---|
| 147 | 147 | return 0; |
|---|
| 148 | 148 | } |
|---|
| 149 | 149 | EXPORT_SYMBOL(usb_wwan_get_serial_info); |
|---|
| .. | .. |
|---|
| 155 | 155 | unsigned int closing_wait, close_delay; |
|---|
| 156 | 156 | int retval = 0; |
|---|
| 157 | 157 | |
|---|
| 158 | | - close_delay = msecs_to_jiffies(ss->close_delay * 10); |
|---|
| 158 | + close_delay = ss->close_delay * 10; |
|---|
| 159 | 159 | closing_wait = ss->closing_wait == ASYNC_CLOSING_WAIT_NONE ? |
|---|
| 160 | | - ASYNC_CLOSING_WAIT_NONE : |
|---|
| 161 | | - msecs_to_jiffies(ss->closing_wait * 10); |
|---|
| 160 | + ASYNC_CLOSING_WAIT_NONE : ss->closing_wait * 10; |
|---|
| 162 | 161 | |
|---|
| 163 | 162 | mutex_lock(&port->port.mutex); |
|---|
| 164 | 163 | |
|---|
| .. | .. |
|---|
| 271 | 270 | if (status) { |
|---|
| 272 | 271 | dev_dbg(dev, "%s: nonzero status: %d on endpoint %02x.\n", |
|---|
| 273 | 272 | __func__, status, endpoint); |
|---|
| 274 | | - |
|---|
| 275 | | - /* don't resubmit on fatal errors */ |
|---|
| 276 | | - if (status == -ESHUTDOWN || status == -ENOENT) |
|---|
| 273 | + if (status == -ESHUTDOWN || status == -ENOENT || status == -EPROTO) |
|---|
| 277 | 274 | return; |
|---|
| 278 | 275 | } else { |
|---|
| 279 | 276 | if (urb->actual_length) { |
|---|
| .. | .. |
|---|
| 435 | 432 | |
|---|
| 436 | 433 | /* |
|---|
| 437 | 434 | * Need to take susp_lock to make sure port is not already being |
|---|
| 438 | | - * resumed, but no need to hold it due to the tty-port initialized |
|---|
| 439 | | - * flag. |
|---|
| 435 | + * resumed, but no need to hold it due to initialized |
|---|
| 440 | 436 | */ |
|---|
| 441 | 437 | spin_lock_irq(&intfdata->susp_lock); |
|---|
| 442 | 438 | if (--intfdata->open_ports == 0) |
|---|
| .. | .. |
|---|
| 467 | 463 | void (*callback) (struct urb *)) |
|---|
| 468 | 464 | { |
|---|
| 469 | 465 | struct usb_serial *serial = port->serial; |
|---|
| 470 | | - struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial); |
|---|
| 471 | 466 | struct urb *urb; |
|---|
| 472 | 467 | |
|---|
| 473 | 468 | urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ |
|---|
| .. | .. |
|---|
| 478 | 473 | usb_sndbulkpipe(serial->dev, endpoint) | dir, |
|---|
| 479 | 474 | buf, len, callback, ctx); |
|---|
| 480 | 475 | |
|---|
| 481 | | - if (intfdata->use_zlp && dir == USB_DIR_OUT) |
|---|
| 482 | | - urb->transfer_flags |= URB_ZERO_PACKET; |
|---|
| 476 | +#if 1 //Added by Quectel for Zero Packet |
|---|
| 477 | + if (dir == USB_DIR_OUT) { |
|---|
| 478 | + if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9090)) |
|---|
| 479 | + urb->transfer_flags |= URB_ZERO_PACKET; |
|---|
| 480 | + if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9003)) |
|---|
| 481 | + urb->transfer_flags |= URB_ZERO_PACKET; |
|---|
| 482 | + if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && serial->dev->descriptor.idProduct == cpu_to_le16(0x9215)) |
|---|
| 483 | + urb->transfer_flags |= URB_ZERO_PACKET; |
|---|
| 484 | + if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) |
|---|
| 485 | + urb->transfer_flags |= URB_ZERO_PACKET; |
|---|
| 486 | + } |
|---|
| 487 | +#endif |
|---|
| 483 | 488 | |
|---|
| 484 | 489 | return urb; |
|---|
| 485 | 490 | } |
|---|