fs: Tweak mount options for all partitions

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
rtc: qpnp-rtc: Sets RTC time correctly

Currently RTC driver is not setting the RTC time
correctly. RTC H/w needs to be disabled before the
writes, and then re-enabled after the writes are completed.

Change-Id: I4f66a2ea5b8ba52a5e9dcf21da7a09c36b1c9074
CRs-Fixed: 610221
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
USB: dwc3: gadget: Add support for sending zero length packets

Currently driver is not honouring req->zero flag even though
function driver sets this flag. If device has to send IN data back
to host and length is multiple of endpoint maximum packet size, it
should send additional zero length packet at the end to terminate
transfer.

CRs-Fixed: 592504
Change-Id: I5a8aecc504098ed386a9a9d19f4f5b78c911a376
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: dwc3: Fix compilation error when debugfs is disabled

The code does not compile with debugfs disabled. Fix this.

Change-Id: I19b784495b57e7fc0c57b455dd80a63b79177569
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
usb: misc: mdm_ctrl_bridge: Honor device polling interval

Driver is not using polling interval from device end point
descriptor. Instead driver is using hard coded value which
is inconsistent with the polling frequency required by the
endpoint of the device. If device requires polling interval
shorter than hard coded value it leads to latency to the
end to end communication. Hence use polling interval from
endpoint descriptor of attached device.

Change-Id: Ifdd7c8d6bf7c56c9285bbbd84cd447214b0cf242
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
USB: gadget: ether: Fix memory corruption issues with multi_pkt_xfers

If gadget xmits packets before host sends RNDIS_MSG_INIT to update
maximum packets supported per transfer, then there is a possibility
of using freed skb memory later from xmit function. Fix such
races which may arise between tx_complete and start_xmit routines
depending on when multi_pkt_transfers are enabled.
Other option is to defer starting TX transfers until RNDIS_MSG_INIT
is received, but then it makes it difficult to handle scenarios
where host doesn't support this message or just doesn't send it.

CRs-fixed: 595367
Change-Id: I181da831120b38840ae4b8b74c1dacce129d1ba6
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
diag: Add new polling command

Diag driver should now support a new polling command for the tools
to recognize the target.

Change-Id: Ia7966cc74c5c74693cebfd64b178831e5ca6f2dd
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
Update ramdisk for CM-based ROMs
iommu: msm: Add timeouts for some operations

Under normal operations, accesses from the SMMU to DDR should
complete in timely manner. There may be some cases due to misconfiguration
where access to DDR will not error out but simply hang forever. This
will result in certain IOMMU accesses (hardware tablewalk and tlb
syncing) never being marked as complete. Avoid looping forever by
adding a timeout to these operations and noting when the timeout is
hit.

Change-Id: Ic0a4f04b7d0f14fc89b41e1e670d0501331fe8ad
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
msm: wfd: Invalidate output buffer when returned from Venus

Cached data from the output buffer needs to be invalidated before
being sent to userspace.

Change-Id: I3d23b7009ad011d8810057c9dca9d837669bcba2
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: wfd: Don't enforce FIFO ordering when buffers are returned

Buffers can be returned out of order in certain situations.  As such VSG
shouldn't be expecting buffers to returned in order.

Change-Id: I2db4baf6b2196fd084e47fcb17ac1b8ec065b58a
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
bcmdhd: decrease rx wakelock time from 500ms to 250ms for testing purposes.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
net: rmnet_usb: Use USB_DEVICE_INTERFACE_NUMBER

Use the USB_DEVICE_INTERFACE_NUMBER macro to add the supported
devices and their corresponding interface numbers. This replaces
the cumbersome per-PID bitfield used to map supported interfaces.

Change-Id: I738d79cda929a450086df8fb27247882df8bc696
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: Support multiple instances

Currently rmnet_usb supports a maximum of 4 net interfaces on a
single device at a time. This change allows the possibility of
multiple concurrent USB devices with RmNet interfaces to be
supported. The number and names of devices supported are now
specified by the following new module parameters:

* no_rmnet_devs - default: 1
* no_rmnet_insts_per_dev - default: 4
* rmnet_dev_names - default: "hsicctl"
* rmnet_data_init - initializes device nodes with above params

Userspace must now write to "rmnet_data_init" in order for the
control device nodes to be created.

Change-Id: I1e36d85b7fab4290ef64ef635162eb6e4de84e50
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: Add support for PID 0x9079

PID ID 9079 is a clone of 9048 intended for use over HSUSB
connection. The net device name for its interfaces will be
prefixed "rmnet2_usbX". The number and names of its control
interfaces will need to be initialized from userspace.

Change-Id: I98d25f23246c93f96a934dcfc2411c4b6d970b15
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: Fix assignment order of instances

Commit f0b04dee "net: rmnet_usb: Support multiple instances" changed
the storage of the pre-allocated control device structures by adding
them to a list. The problem with that approach is that across
disconnect/re-probe, each instance may not be re-associated with the
interface as used previously. This coupling must be ensured to allow
users of the control device files to continue to access the same
interfaces across subsystem restarts.

Fix this by creating the instances in a dynamically-allocated array.
Since we assume probe order is in increasing interface number per
USB device, use this to assign the same instance when the
device/interface is re-probed.

CRs-fixed: 453167
Change-Id: Ide20abdd7acf0194dfb9bbdd9d039a8888b23d93
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: usb: Add MUX support in embedded rmnet driver

Due to limited number of HSIC endpoints, to support
more than existing number of control and data channels,
driver needs to MUX all the data channels as well as
the control channels into one HSIC interface. MUX
support is enabled on PID 0x9075. MUX header is added
to IP/control packet based on the channel id while
transmitting to mdm device. Similarly, while receiving
driver removes and parses the MUX header and based on
channel id it forwards IP/control packet to appropriate
network interface/control channel.

Change-Id: If37c672347ab47be6e02d4efd33a70c46486b5f1
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: qmap: reset skb tail when changing data pointer

data pointer is moved to accommodate mux header but as tail pointer
is not updated resulting in loss of data during ip forwarding. Avoid
data loss by resetting tail pointer when manipulating data pointer.

Change-Id: Ica8c8fd25672cdb4ae036454fdaae98f1d327b22
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: Fix rx_submitted anchor list corruption

The control receive work is scheduled from interrupt URB completion
handler.  The receive work calls synchronous runtime PM API before
queuing the receive URB.  If suspend is in progress, runtime PM core
will immediately resume the device after the ongoing suspend is
completed.

The suspend and resume is handled by the rmnet data interface driver.
The control receive work state is checked before proceeding to suspend.
If work is pending, suspend is aborted.  Otherwise interrupt URB is
unlinked and considered control interface is suspended.  But a receive
work may get scheduled during interrupt URB unlinking or just before
unlink begins.  The receive work if at all scheduled in this window,
will be waiting for device resume.  The interface resume will queue the
interrupt URB before processing the current receive work and it will
lead to rx_submit anchor list corruption.

Check receive work state after unlinking the interrupt URB during
suspend.  If the work is pending, abort the suspend.

CRs-Fixed: 463353
Change-Id: I8920286be9e29ef02a2643f9b87de99b3294068a
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: initialize rmnet before registering with usb

registering with usb before initializing rmnet can trigger
interface probe before rmnet is initialized and can lead to crash.

Change-Id: I51a0b22a210a5878ff21910cdf436b5231f16308
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>