Re: [PATCH v3 13/16] iommu/intel-svm: notify page request to guest

2017-12-04 Thread Lu Baolu
; sdev = NULL; > > - if (sdev && sdev->ops && sdev->ops->fault_cb) { > - int rwxp = (req->rd_req << 3) | (req->wr_req << 2) | > - (req->exe_req <

Re: [PATCH v3 13/16] iommu/intel-svm: notify page request to guest

2017-12-04 Thread Lu Baolu
ess = (u64)req->addr << VTD_PAGE_SHIFT; > if (!req->pasid_present) { > @@ -649,11 +719,7 @@ static irqreturn_t prq_event_thread(int irq, void *d) > if (WARN_ON(>list == >devs)) > sdev = NULL; > > - if

Re: [PATCH v3 12/16] iommu/vt-d: report unrecoverable device faults

2017-12-04 Thread Lu Baolu
Hi, On 11/18/2017 02:55 AM, Jacob Pan wrote: > Currently, when device DMA faults are detected by IOMMU the fault > reasons are printed but the driver of the offending device is "... but the driver of the offending device is not involved in ..." Best regards, Lu Baolu >

Re: [PATCH v3 12/16] iommu/vt-d: report unrecoverable device faults

2017-12-04 Thread Lu Baolu
Hi, On 11/18/2017 02:55 AM, Jacob Pan wrote: > Currently, when device DMA faults are detected by IOMMU the fault > reasons are printed but the driver of the offending device is "... but the driver of the offending device is not involved in ..." Best regards, Lu Baolu >

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-04 Thread Lu Baolu
gt; +EXPORT_SYMBOL_GPL(iommu_unregister_device_fault_handler); > + > + > +int iommu_report_device_fault(struct device *dev, struct iommu_fault_event > *evt) > +{ > + /* we only report device fault if there is a handler registered */ > + if (!dev->iommu_param || !dev-&

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-04 Thread Lu Baolu
;iommu_param; > + > + if (!idata) > + return -EINVAL; > + > + kfree(idata->fault_param); > + idata->fault_param = NULL; > + put_device(dev); > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(iommu_unregister_device_fault_handler);

Re: [PATCH v3 07/16] iommu/vt-d: assign PFSID in device TLB invalidation

2017-12-04 Thread Lu Baolu
ed, which should be set to 0. > + */ > + if (!ecap_dit(info->iommu->ecap)) > + info->pfsid = 0; > + else if (pdev && pdev->is_virtfn) { > + if (ecap_dit(info->iommu->ecap)) Isn't this condition always true when it comes here

Re: [PATCH v3 07/16] iommu/vt-d: assign PFSID in device TLB invalidation

2017-12-04 Thread Lu Baolu
if (!ecap_dit(info->iommu->ecap)) > + info->pfsid = 0; > + else if (pdev && pdev->is_virtfn) { > + if (ecap_dit(info->iommu->ecap)) Isn't this condition always true when it comes here? Best regards, Lu Baolu > +

Re: [PATCH v3 06/16] iommu/vt-d: add svm/sva invalidate function

2017-12-04 Thread Lu Baolu
int iommu_prot) > @@ -5304,7 +5481,7 @@ static int intel_iommu_bind_pasid_table(struct > iommu_domain *domain, > iommu = device_to_iommu(dev, , ); > if (!iommu) > return -ENODEV; > - /* VT-d spec 9.4 says pasid table size is encoded as 2^(x+5) */ &

Re: [PATCH v3 06/16] iommu/vt-d: add svm/sva invalidate function

2017-12-04 Thread Lu Baolu
_table(struct > iommu_domain *domain, > iommu = device_to_iommu(dev, , ); > if (!iommu) > return -ENODEV; > - /* VT-d spec 9.4 says pasid table size is encoded as 2^(x+5) */ > + /* VT-d spec section 9.4 says pasid table size is encoded as 2^(x+5) */

Re: [PATCH 1/1] usb: serial: usb_debug: Add new USB device id

2017-11-28 Thread Lu Baolu
Hi Johan, On 11/28/2017 05:01 PM, Johan Hovold wrote: > On Tue, Nov 28, 2017 at 12:40:59PM +0800, Lu Baolu wrote: >> USB vendor id and product id for Linux USB Debug Target is added. >> >> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> >> --- >> driv

Re: [PATCH 1/1] usb: serial: usb_debug: Add new USB device id

2017-11-28 Thread Lu Baolu
Hi Johan, On 11/28/2017 05:01 PM, Johan Hovold wrote: > On Tue, Nov 28, 2017 at 12:40:59PM +0800, Lu Baolu wrote: >> USB vendor id and product id for Linux USB Debug Target is added. >> >> Signed-off-by: Lu Baolu >> --- >> drivers/usb/serial/usb_debug.c | 2 ++

Re: [PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer

2017-11-28 Thread Lu Baolu
Hi Felipe, On 11/28/2017 04:05 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >> The kernel FIFO implementation, kfifo, provides interfaces to manipulate >> a first-in-first-out circular buffer. Use kfifo instead of the homemade >>

Re: [PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer

2017-11-28 Thread Lu Baolu
Hi Felipe, On 11/28/2017 04:05 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> The kernel FIFO implementation, kfifo, provides interfaces to manipulate >> a first-in-first-out circular buffer. Use kfifo instead of the homemade >> one to make the cod

Re: [PATCH 1/1] usb: early: Correct the endpoint type value for bulk in endpoint

2017-11-27 Thread Lu Baolu
Hi, On 11/28/2017 03:29 PM, Greg Kroah-Hartman wrote: > On Tue, Nov 28, 2017 at 12:52:24PM +0800, Lu Baolu wrote: >> This corrects the endpiont type value set to the DbC bulk in endpoint. >> The previous value doesn't cause any problems because that we now only >> use the b

Re: [PATCH 1/1] usb: early: Correct the endpoint type value for bulk in endpoint

2017-11-27 Thread Lu Baolu
Hi, On 11/28/2017 03:29 PM, Greg Kroah-Hartman wrote: > On Tue, Nov 28, 2017 at 12:52:24PM +0800, Lu Baolu wrote: >> This corrects the endpiont type value set to the DbC bulk in endpoint. >> The previous value doesn't cause any problems because that we now only >> use the b

[PATCH 1/1] usb: early: Correct the endpoint type value for bulk in endpoint

2017-11-27 Thread Lu Baolu
This corrects the endpiont type value set to the DbC bulk in endpoint. The previous value doesn't cause any problems because that we now only use the bulk out endpoint. Set the hardware with the correct value any way. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/earl

[PATCH 1/1] usb: early: Correct the endpoint type value for bulk in endpoint

2017-11-27 Thread Lu Baolu
This corrects the endpiont type value set to the DbC bulk in endpoint. The previous value doesn't cause any problems because that we now only use the bulk out endpoint. Set the hardware with the correct value any way. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 2 +- 1 file

[PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer

2017-11-27 Thread Lu Baolu
The kernel FIFO implementation, kfifo, provides interfaces to manipulate a first-in-first-out circular buffer. Use kfifo instead of the homemade one to make the code more concise and readable. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/gadget/function/u_serial.c

[PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer

2017-11-27 Thread Lu Baolu
The kernel FIFO implementation, kfifo, provides interfaces to manipulate a first-in-first-out circular buffer. Use kfifo instead of the homemade one to make the code more concise and readable. Signed-off-by: Lu Baolu --- drivers/usb/gadget/function/u_serial.c | 192

[PATCH 1/1] usb: serial: usb_debug: Add new USB device id

2017-11-27 Thread Lu Baolu
USB vendor id and product id for Linux USB Debug Target is added. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ab5a2ac..4

[PATCH 1/1] usb: serial: usb_debug: Add new USB device id

2017-11-27 Thread Lu Baolu
USB vendor id and product id for Linux USB Debug Target is added. Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ab5a2ac..47636b6 100644 --- a/drivers/usb

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-14 Thread Lu Baolu
; + if (!db->buf_buf) >>> + return -ENOMEM; >>> + >>> + db->buf_size = size; >>> + db->buf_put = db->buf_buf; >>> + db->buf_get = db->buf_buf; >>> + >>> + return 0; >>> +} > you may wanna have a look at kfifo. > Yeah! kfifo gives me exactly what I want here. I will replace it with kfifo. Thank you. Best regards, Lu Baolu

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-14 Thread Lu Baolu
return -ENOMEM; >>> + >>> + db->buf_size = size; >>> + db->buf_put = db->buf_buf; >>> + db->buf_get = db->buf_buf; >>> + >>> + return 0; >>> +} > you may wanna have a look at kfifo. > Yeah! kfifo gives me exactly what I want here. I will replace it with kfifo. Thank you. Best regards, Lu Baolu

Re: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-11-06 Thread Lu Baolu
Hi, On 11/07/2017 04:13 AM, Alex Williamson wrote: > On Thu, 19 Oct 2017 08:39:14 +0800 > Lu Baolu <baolu...@linux.intel.com> wrote: > >> intel_svm_alloc_pasid_tables() might return an error but never be >> checked by the callers. Later when intel_svm_bind_mm() is cal

Re: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-11-06 Thread Lu Baolu
Hi, On 11/07/2017 04:13 AM, Alex Williamson wrote: > On Thu, 19 Oct 2017 08:39:14 +0800 > Lu Baolu wrote: > >> intel_svm_alloc_pasid_tables() might return an error but never be >> checked by the callers. Later when intel_svm_bind_mm() is called, >> there are no ch

[PATCH 2/2] USB: serial: Change DbC debug device binding ID

2017-11-06 Thread Lu Baolu
;sta...@vger.kernel.org> # v4.12+ Cc: Johan Hovold <jo...@kernel.org> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb

[PATCH 2/2] USB: serial: Change DbC debug device binding ID

2017-11-06 Thread Lu Baolu
# v4.12+ Cc: Johan Hovold Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 12f4c5a..48f285a 100644 --- a/drivers/usb/serial/usb_debug.c +++

[PATCH 1/2] USB: early: Use new USB product ID and strings for DbC device

2017-11-06 Thread Lu Baolu
a valid one. The description strings are changed accordingly. This patch should be back-ported to kernels as old as v4.12, that contain the commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability"). Cc: <sta...@vger.kernel.org> # v4.12+ Signed-off-by: Lu Baolu <baolu

[PATCH 1/2] USB: early: Use new USB product ID and strings for DbC device

2017-11-06 Thread Lu Baolu
a valid one. The description strings are changed accordingly. This patch should be back-ported to kernels as old as v4.12, that contain the commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability"). Cc: # v4.12+ Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.h | 6

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-06 Thread Lu Baolu
Hi, On 11/06/2017 04:00 PM, Greg Kroah-Hartman wrote: > On Mon, Nov 06, 2017 at 08:35:41AM +0800, Lu Baolu wrote: >> Hi, >> >> On 11/03/2017 02:27 PM, Greg Kroah-Hartman wrote: >>> On Fri, Nov 03, 2017 at 08:45:46AM +0800, Lu Baolu wrote: >>>> Hi, &g

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-06 Thread Lu Baolu
Hi, On 11/06/2017 04:00 PM, Greg Kroah-Hartman wrote: > On Mon, Nov 06, 2017 at 08:35:41AM +0800, Lu Baolu wrote: >> Hi, >> >> On 11/03/2017 02:27 PM, Greg Kroah-Hartman wrote: >>> On Fri, Nov 03, 2017 at 08:45:46AM +0800, Lu Baolu wrote: >>>> Hi, &g

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-05 Thread Lu Baolu
Hi, On 11/03/2017 02:27 PM, Greg Kroah-Hartman wrote: > On Fri, Nov 03, 2017 at 08:45:46AM +0800, Lu Baolu wrote: >> Hi, >> >> On 11/03/2017 12:51 AM, Greg Kroah-Hartman wrote: >>> On Thu, Nov 02, 2017 at 12:38:57PM +0200, Felipe Balbi wrote: >>>>

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-05 Thread Lu Baolu
Hi, On 11/03/2017 02:27 PM, Greg Kroah-Hartman wrote: > On Fri, Nov 03, 2017 at 08:45:46AM +0800, Lu Baolu wrote: >> Hi, >> >> On 11/03/2017 12:51 AM, Greg Kroah-Hartman wrote: >>> On Thu, Nov 02, 2017 at 12:38:57PM +0200, Felipe Balbi wrote: >>>>&g

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-02 Thread Lu Baolu
;> >> > and disabling of the debug capability. >>>>>>> > >> >> > >>>>>>> > >> >> > When the debug capability is enabled, it will present a debug >>>>>>> > >> >> &g

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-02 Thread Lu Baolu
y. >>>>>>> > >> >> > >>>>>>> > >> >> > When the debug capability is enabled, it will present a debug >>>>>>> > >> >> > device >>>>>>> > >> >> >

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-01 Thread Lu Baolu
Hi Greg, On 09/05/2017 09:58 AM, Lu Baolu wrote: > xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) > can be implemented with the Debug Capability(DbC). It presents a debug > device which is fully compliant with the USB framework and provides the > equivalent of

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-01 Thread Lu Baolu
Hi Greg, On 09/05/2017 09:58 AM, Lu Baolu wrote: > xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) > can be implemented with the Debug Capability(DbC). It presents a debug > device which is fully compliant with the USB framework and provides the > equivalent of

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-10-24 Thread Lu Baolu
> On 05.09.2017 04:58, Lu Baolu wrote: >> xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) >> can be implemented with the Debug Capability(DbC). It presents a debug >> device which is fully compliant with the USB framework and provides the >> equi

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-10-24 Thread Lu Baolu
> On 05.09.2017 04:58, Lu Baolu wrote: >> xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) >> can be implemented with the Debug Capability(DbC). It presents a debug >> device which is fully compliant with the USB framework and provides the >> equi

Re: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-10-19 Thread Lu Baolu
Hi Yi, On 10/19/2017 02:40 PM, Liu, Yi L wrote: > >> -Original Message- >> From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- >> boun...@lists.linux-foundation.org] On Behalf Of Lu Baolu >> Sent: Thursday, October 19, 2017 8:39 AM >> To: j..

Re: [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-10-19 Thread Lu Baolu
Hi Yi, On 10/19/2017 02:40 PM, Liu, Yi L wrote: > >> -Original Message- >> From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- >> boun...@lists.linux-foundation.org] On Behalf Of Lu Baolu >> Sent: Thursday, October 19, 2017 8:39 AM >> To: j..

[PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-10-18 Thread Lu Baolu
intel_svm_alloc_pasid_tables() might return an error but never be checked by the callers. Later when intel_svm_bind_mm() is called, there are no checks for valid pasid tables before enabling them. Signed-off-by: Ashok Raj <ashok@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.

[PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails

2017-10-18 Thread Lu Baolu
intel_svm_alloc_pasid_tables() might return an error but never be checked by the callers. Later when intel_svm_bind_mm() is called, there are no checks for valid pasid tables before enabling them. Signed-off-by: Ashok Raj Signed-off-by: Lu Baolu --- drivers/iommu/intel-svm.c | 2 +- 1 file

[PATCH 3/3] iommu/vt-d: Clear pasid table entry when memory unbound

2017-10-18 Thread Lu Baolu
In intel_svm_unbind_mm(), pasid table entry must be cleared during svm free. Otherwise, hardware may be set up with a wild pointer. Suggested-by: Ashok Raj <ashok@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/iommu/intel-svm.c | 2 ++ 1 file changed,

[PATCH 3/3] iommu/vt-d: Clear pasid table entry when memory unbound

2017-10-18 Thread Lu Baolu
In intel_svm_unbind_mm(), pasid table entry must be cleared during svm free. Otherwise, hardware may be set up with a wild pointer. Suggested-by: Ashok Raj Signed-off-by: Lu Baolu --- drivers/iommu/intel-svm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/intel-svm.c b

[PATCH 2/3] iommu/vt-d: Clear Page Request Overflow fault bit

2017-10-18 Thread Lu Baolu
Currently Page Request Overflow bit in IOMMU Fault Status register is not cleared. Not clearing this bit would mean that any future page-request is going to be automatically dropped by IOMMU. Suggested-by: Ashok Raj <ashok@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.

[PATCH 2/3] iommu/vt-d: Clear Page Request Overflow fault bit

2017-10-18 Thread Lu Baolu
Currently Page Request Overflow bit in IOMMU Fault Status register is not cleared. Not clearing this bit would mean that any future page-request is going to be automatically dropped by IOMMU. Suggested-by: Ashok Raj Signed-off-by: Lu Baolu --- drivers/iommu/dmar.c| 3 ++- include

[PATCH 1/1] usb: Apply hardware LPM attributes to 3.1 device

2017-10-13 Thread Lu Baolu
The devices running at SuperSpeedPlus speed are also LPM capable. Apply usb3 hardware LPM attributes to those devices as well. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/core/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/us

[PATCH 1/1] usb: Apply hardware LPM attributes to 3.1 device

2017-10-13 Thread Lu Baolu
The devices running at SuperSpeedPlus speed are also LPM capable. Apply usb3 hardware LPM attributes to those devices as well. Signed-off-by: Lu Baolu --- drivers/usb/core/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core

[PATCH v3 3/3] usb: doc: Update document for USB3 debug port usage

2017-09-04 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file chang

[PATCH v3 3/3] usb: doc: Update document for USB3 debug port usage

2017-09-04 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file changed, 68 insertions(+) diff --git

[PATCH v3 1/3] usb: xhci: Make some static functions global

2017-09-04 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-mem.c

[PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-09-04 Thread Lu Baolu
. Hence it can be remote accessed by a debug host. Another use case can probably be found in servers. It provides a peer-to-peer USB link between two host-only machines. This provides a reasonable out-of-band communication method between two servers. Signed-off-by: Lu Baolu <baolu...@linux.intel.

[PATCH v3 1/3] usb: xhci: Make some static functions global

2017-09-04 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-mem.c | 94

[PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-09-04 Thread Lu Baolu
. Hence it can be remote accessed by a debug host. Another use case can probably be found in servers. It provides a peer-to-peer USB link between two host-only machines. This provides a reasonable out-of-band communication method between two servers. Signed-off-by: Lu Baolu --- .../ABI/testing/sysfs

[PATCH v3 0/3] usb: xhci: Add debug capability support in xhci

2017-09-04 Thread Lu Baolu
communication method between two servers. Best regards, Lu Baolu --- Change log: v1->v2: - Add a new patch to move u_serial.c from drivers/usb/gadget/function to drivers/usb/common/ and move u_serial.h to include/linux/usb/. v2->v3: - Remove the use of u_serial and add a new tt

[PATCH v3 0/3] usb: xhci: Add debug capability support in xhci

2017-09-04 Thread Lu Baolu
communication method between two servers. Best regards, Lu Baolu --- Change log: v1->v2: - Add a new patch to move u_serial.c from drivers/usb/gadget/function to drivers/usb/common/ and move u_serial.h to include/linux/usb/. v2->v3: - Remove the use of u_serial and add a new tt

Re: [PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-19 Thread Lu Baolu
Hi, On 08/18/2017 09:31 PM, Mathias Nyman wrote: > On 16.08.2017 05:15, Lu Baolu wrote: >> Hi, >> >> On 08/15/2017 07:30 PM, Mathias Nyman wrote: >>> On 11.08.2017 05:41, Lu Baolu wrote: >>>> Xhci driver handles USB transaction errors on transfer events

Re: [PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-19 Thread Lu Baolu
Hi, On 08/18/2017 09:31 PM, Mathias Nyman wrote: > On 16.08.2017 05:15, Lu Baolu wrote: >> Hi, >> >> On 08/15/2017 07:30 PM, Mathias Nyman wrote: >>> On 11.08.2017 05:41, Lu Baolu wrote: >>>> Xhci driver handles USB transaction errors on transfer events

[PATCH v4 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-16 Thread Lu Baolu
ecking virt dev for test mode in PATCH 1/5. v3->v4: - Resolve xhci->mutex locking issue in 5/5. Lu Baolu (5): usb: xhci: Disable slot even virt-dev is null usb: xhci: Fix potential memory leak in xhci_disable_slot() usb: xhci: Fix memory leak when xhci_disable_slot() returns error

[PATCH v4 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-16 Thread Lu Baolu
ecking virt dev for test mode in PATCH 1/5. v3->v4: - Resolve xhci->mutex locking issue in 5/5. Lu Baolu (5): usb: xhci: Disable slot even virt-dev is null usb: xhci: Fix potential memory leak in xhci_disable_slot() usb: xhci: Fix memory leak when xhci_disable_slot() returns error

[PATCH v4 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-16 Thread Lu Baolu
m> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

[PATCH v4 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-16 Thread Lu Baolu
pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --

[PATCH v4 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-16 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/

[PATCH v4 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-16 Thread Lu Baolu
c: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xh

[PATCH v4 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-16 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index cb2461a..2df601e 100644

[PATCH v4 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-16 Thread Lu Baolu
c: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 00721e8..6fcb98d 100644 --- a/drivers/usb/host/xhci-h

[PATCH v4 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-16 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

[PATCH v4 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-16 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2df601

[PATCH v4 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-16 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/driv

[PATCH v4 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-16 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index d6b728d..c8a64d2

Re: [PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-15 Thread Lu Baolu
Hi, On 08/15/2017 07:30 PM, Mathias Nyman wrote: > On 11.08.2017 05:41, Lu Baolu wrote: >> Xhci driver handles USB transaction errors on transfer events, >> but transaction errors are possible on address device command >> completion events as well. >> >> The

Re: [PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-15 Thread Lu Baolu
Hi, On 08/15/2017 07:30 PM, Mathias Nyman wrote: > On 11.08.2017 05:41, Lu Baolu wrote: >> Xhci driver handles USB transaction errors on transfer events, >> but transaction errors are possible on address device command >> completion events as well. >> >> The

[PATCH v3 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
m> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

[PATCH v3 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --

[PATCH v3 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
ecking virt dev for test mode in PATCH 1/5. Lu Baolu (5): usb: xhci: Disable slot even virt-dev is null usb: xhci: Fix potential memory leak in xhci_disable_slot() usb: xhci: Fix memory leak when xhci_disable_slot() returns error usb: xhci: Return error when host is dead in xhci_disabl

[PATCH v3 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
ecking virt dev for test mode in PATCH 1/5. Lu Baolu (5): usb: xhci: Disable slot even virt-dev is null usb: xhci: Fix potential memory leak in xhci_disable_slot() usb: xhci: Fix memory leak when xhci_disable_slot() returns error usb: xhci: Return error when host is dead in xhci_disabl

[PATCH v3 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-10 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/

[PATCH v3 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
c: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xh

[PATCH v3 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-10 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index cb2461a..2df601e 100644

[PATCH v3 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
c: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 00721e8..6fcb98d 100644 --- a/drivers/usb/host/xhci-h

[PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/driv

[PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index d6b728d..95780f8 100644

[PATCH v3 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

[PATCH v3 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2df601

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
Hi, On 08/10/2017 06:00 PM, Mathias Nyman wrote: > On 10.08.2017 03:35, Lu Baolu wrote: >> Hi, >> >> On 08/09/2017 03:58 PM, Mathias Nyman wrote: >>> On 27.07.2017 05:21, Lu Baolu wrote: >>>> xhci_disable_slot() is a helper for disabling a slot when a de

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
Hi, On 08/10/2017 06:00 PM, Mathias Nyman wrote: > On 10.08.2017 03:35, Lu Baolu wrote: >> Hi, >> >> On 08/09/2017 03:58 PM, Mathias Nyman wrote: >>> On 27.07.2017 05:21, Lu Baolu wrote: >>>> xhci_disable_slot() is a helper for disabling a slot when a de

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-09 Thread Lu Baolu
Hi, On 08/09/2017 03:58 PM, Mathias Nyman wrote: > On 27.07.2017 05:21, Lu Baolu wrote: >> xhci_disable_slot() is a helper for disabling a slot when a device >> goes away or recovers from error situations. Currently, it checks >> the corespoding virt-dev pointer and returns

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-09 Thread Lu Baolu
Hi, On 08/09/2017 03:58 PM, Mathias Nyman wrote: > On 27.07.2017 05:21, Lu Baolu wrote: >> xhci_disable_slot() is a helper for disabling a slot when a device >> goes away or recovers from error situations. Currently, it checks >> the corespoding virt-dev pointer and returns

Re: [PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-08 Thread Lu Baolu
Hi, On 08/08/2017 02:14 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >>> Lu Baolu <baolu...@linux.intel.com> writes: >>>> The component u_serial provides a glue layer between TTY layer >>>> and a U

Re: [PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-08 Thread Lu Baolu
Hi, On 08/08/2017 02:14 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >>> Lu Baolu writes: >>>> The component u_serial provides a glue layer between TTY layer >>>> and a USB gadget device needed to provide a basic serial port >>>>

Re: [PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-07 Thread Lu Baolu
Hi, On 08/07/2017 04:13 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >> The component u_serial provides a glue layer between TTY layer >> and a USB gadget device needed to provide a basic serial port >> functionality. Currently, u_

Re: [PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-07 Thread Lu Baolu
Hi, On 08/07/2017 04:13 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> The component u_serial provides a glue layer between TTY layer >> and a USB gadget device needed to provide a basic serial port >> functionality. Currently, u_serial sits under gad

[PATCH v2 4/4] usb: doc: Update document for USB3 debug port usage

2017-08-07 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file chang

[PATCH v2 4/4] usb: doc: Update document for USB3 debug port usage

2017-08-07 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file changed, 68 insertions(+) diff --git

[PATCH v2 1/4] usb: xhci: Make some static functions global

2017-08-07 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-mem.c

[PATCH v2 1/4] usb: xhci: Make some static functions global

2017-08-07 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-mem.c | 94

[PATCH v2 3/4] usb: xhci: Add DbC support in xHCI driver

2017-08-07 Thread Lu Baolu
. Hence it can be remote accessed by a debug host. Another use case can probably be found in servers. It provides a peer-to-peer USB link between two host-only machines. This provides a reasonable out-of-band communication method between two servers. Signed-off-by: Lu Baolu <baolu...@linux.intel.

[PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-07 Thread Lu Baolu
-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/Kconfig|3 + drivers/usb/Makefile |3 +- drivers/usb/common/Makefile|1 + drivers/usb/common/u_serial.c | 1604 +++ drivers/usb/

<    3   4   5   6   7   8   9   10   11   12   >