Re: [PATCH 02/10] arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
On Wed, Nov 07, 2012 at 01:20:41PM +0100, Marc Kleine-Budde wrote: > On 11/07/2012 12:22 PM, Jean-Christophe PLAGNIOL-VILLARD wrote: > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > Cc: Nicolas Ferre > > Cc: linux-...@vger.kernel.org > > Cc: linux-in...@vger.kernel.org > > Cc: linux-...@vger.kernel.org > > Cc: linux-...@vger.kernel.org > > Cc: net...@vger.kernel.org > > Cc: linux-pcm...@lists.infradead.org > > Cc: rtc-li...@googlegroups.com > > Cc: spi-devel-gene...@lists.sourceforge.net > > Cc: linux-ser...@vger.kernel.org > > Cc: linux-usb@vger.kernel.org > > Cc: linux-fb...@vger.kernel.org > > --- > > HI all, > > > > If it's ok with everyone this will go via at91 > > with the patch serie than clean up the include/mach > > Fine with me. > > > For preparation to switch to arm multiarch kernel > > Acked-by: Marc Kleine-Budde (for the CAN related > changes) Acked-by: Dmitry Torokhov for input piece. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH usb-linus] USB: keyspan: fix typo causing GPF on open
Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and memory leaks) had a small typo which made the driver use wrong offsets when mapping serial port private data. This results in in a GPF when the port is opened. Reported-by: Richard Cc: Cc: Johan Hovold Signed-off-by: Bjørn Mork --- Hello Richard, I wonder if you are able to test and verify this? I do not guarantee that there aren't other issues around, but this small typo looked like an obvious killer... Bjørn drivers/usb/serial/keyspan.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 7179b0c..cff8dd5 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial) static int keyspan_port_probe(struct usb_serial_port *port) { struct usb_serial *serial = port->serial; - struct keyspan_port_private *s_priv; + struct keyspan_serial_private *s_priv; struct keyspan_port_private *p_priv; const struct keyspan_device_details *d_details; struct callbacks *cback; @@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port *port) if (!p_priv) return -ENOMEM; - s_priv = usb_get_serial_data(port->serial); p_priv->device_details = d_details; /* Setup values for the various callback routines */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] staging: usbip: make the code consistent using the variable name 'vhci' instead of 'dum'.
Signed-off-by: Harvey Yang --- drivers/staging/usbip/vhci_hcd.c | 80 +++--- 1 files changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 620d1be..6771668 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -244,7 +244,7 @@ static inline void hub_descriptor(struct usb_hub_descriptor *desc) static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength) { - struct vhci_hcd *dum; + struct vhci_hcd *vhci; int retval = 0; unsigned long flags; int rhport; @@ -264,13 +264,13 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, pr_err("invalid port number %d\n", wIndex); rhport = ((__u8)(wIndex & 0x00ff)) - 1; - dum = hcd_to_vhci(hcd); + vhci = hcd_to_vhci(hcd); - spin_lock_irqsave(&dum->lock, flags); + spin_lock_irqsave(&vhci->lock, flags); /* store old status and compare now and old later */ if (usbip_dbg_flag_vhci_rh) { - memcpy(prev_port_status, dum->port_status, + memcpy(prev_port_status, vhci->port_status, sizeof(prev_port_status)); } @@ -281,31 +281,31 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, case ClearPortFeature: switch (wValue) { case USB_PORT_FEAT_SUSPEND: - if (dum->port_status[rhport] & USB_PORT_STAT_SUSPEND) { + if (vhci->port_status[rhport] & USB_PORT_STAT_SUSPEND) { /* 20msec signaling */ - dum->resuming = 1; - dum->re_timeout = + vhci->resuming = 1; + vhci->re_timeout = jiffies + msecs_to_jiffies(20); } break; case USB_PORT_FEAT_POWER: usbip_dbg_vhci_rh(" ClearPortFeature: " "USB_PORT_FEAT_POWER\n"); - dum->port_status[rhport] = 0; - /* dum->address = 0; */ - /* dum->hdev = 0; */ - dum->resuming = 0; + vhci->port_status[rhport] = 0; + /* vhci->address = 0; */ + /* vhci->hdev = 0; */ + vhci->resuming = 0; break; case USB_PORT_FEAT_C_RESET: usbip_dbg_vhci_rh(" ClearPortFeature: " "USB_PORT_FEAT_C_RESET\n"); - switch (dum->vdev[rhport].speed) { + switch (vhci->vdev[rhport].speed) { case USB_SPEED_HIGH: - dum->port_status[rhport] |= + vhci->port_status[rhport] |= USB_PORT_STAT_HIGH_SPEED; break; case USB_SPEED_LOW: - dum->port_status[rhport] |= + vhci->port_status[rhport] |= USB_PORT_STAT_LOW_SPEED; break; default: @@ -314,7 +314,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, default: usbip_dbg_vhci_rh(" ClearPortFeature: default %x\n", wValue); - dum->port_status[rhport] &= ~(1 << wValue); + vhci->port_status[rhport] &= ~(1 << wValue); break; } break; @@ -338,40 +338,40 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, /* whoever resets or resumes must GetPortStatus to * complete it!! * */ - if (dum->resuming && time_after(jiffies, dum->re_timeout)) { - dum->port_status[rhport] |= + if (vhci->resuming && time_after(jiffies, vhci->re_timeout)) { + vhci->port_status[rhport] |= (1 << USB_PORT_FEAT_C_SUSPEND); - dum->port_status[rhport] &= + vhci->port_status[rhport] &= ~(1 << USB_PORT_FEAT_SUSPEND); - dum->resuming = 0; - dum->re_timeout = 0; - /* if (dum->driver && dum->driver->resume) { -*
Re: [PATCH 02/10] arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
Hi Jean-Christophe, On 7 November 2012 12:22, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > Cc: Nicolas Ferre > Cc: linux-...@vger.kernel.org > Cc: linux-in...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: net...@vger.kernel.org > Cc: linux-pcm...@lists.infradead.org > Cc: rtc-li...@googlegroups.com > Cc: spi-devel-gene...@lists.sourceforge.net > Cc: linux-ser...@vger.kernel.org > Cc: linux-usb@vger.kernel.org > Cc: linux-fb...@vger.kernel.org > --- > HI all, > > If it's ok with everyone this will go via at91 > with the patch serie than clean up the include/mach > > For preparation to switch to arm multiarch kernel > > Best Regards, > J. > arch/arm/mach-at91/include/mach/board.h | 55 -- > arch/avr32/mach-at32ap/include/mach/board.h |7 --- > drivers/ata/pata_at91.c |2 +- > drivers/input/touchscreen/atmel_tsadcc.c|2 +- > drivers/mmc/host/atmel-mci.c|2 +- > drivers/net/can/at91_can.c |3 +- > drivers/net/ethernet/cadence/at91_ether.c |2 +- > drivers/pcmcia/at91_cf.c|2 +- > drivers/rtc/rtc-at91sam9.c |2 +- > drivers/spi/spi-atmel.c |2 +- > drivers/tty/serial/atmel_serial.c |2 +- > drivers/usb/gadget/at91_udc.c |2 +- > drivers/usb/gadget/atmel_usba_udc.c |2 +- > drivers/usb/host/ohci-at91.c|2 +- > drivers/video/atmel_lcdfb.c |2 +- > include/linux/platform_data/atmel.h | 67 > +++ > 16 files changed, 80 insertions(+), 76 deletions(-) > diff --git a/drivers/net/ethernet/cadence/at91_ether.c > b/drivers/net/ethernet/cadence/at91_ether.c > index 4e980a7..35fc6edb 100644 > --- a/drivers/net/ethernet/cadence/at91_ether.c > +++ b/drivers/net/ethernet/cadence/at91_ether.c > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -38,7 +39,6 @@ > > #include > #include > -#include > > #include "at91_ether.h" The at91_ether driver in net-next does not need to be change since it all mach includes has already been removed by other patches and it includes linux/platform_data/macb.h directly. What tree was these patches based on? The at91_ether driver changes has been in linux-next for a long while now. regards Joachim Eastwood -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH usb-linus] USB: keyspan: fix typo causing GPF on open
On Sat, Nov 10, 2012 at 10:13 AM, Bjørn Mork wrote: > Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and > memory leaks) had a small typo which made the driver use wrong > offsets when mapping serial port private data. This results in > in a GPF when the port is opened. > > Reported-by: Richard > Cc: > Cc: Johan Hovold > Signed-off-by: Bjørn Mork Acked-by: Johan Hovold > --- > Hello Richard, > > I wonder if you are able to test and verify this? I do not guarantee > that there aren't other issues around, but this small typo looked like > an obvious killer... Good catch, Bjørn. Greg, this one needs to be backported to v3.6.x. Note that the usb_get_serial_data call below was simply redundant, so that part is really a clean up rather than part of the fix. Thanks, Johan > Bjørn > > drivers/usb/serial/keyspan.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c > index 7179b0c..cff8dd5 100644 > --- a/drivers/usb/serial/keyspan.c > +++ b/drivers/usb/serial/keyspan.c > @@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial) > static int keyspan_port_probe(struct usb_serial_port *port) > { > struct usb_serial *serial = port->serial; > - struct keyspan_port_private *s_priv; > + struct keyspan_serial_private *s_priv; > struct keyspan_port_private *p_priv; > const struct keyspan_device_details *d_details; > struct callbacks *cback; > @@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port > *port) > if (!p_priv) > return -ENOMEM; > > - s_priv = usb_get_serial_data(port->serial); > p_priv->device_details = d_details; > > /* Setup values for the various callback routines */ > -- > 1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: kmemleak report on isp1763 and sierra MC8705
On Fri, Nov 9, 2012 at 11:14 PM, Richard Retanubun wrote: > On 29/10/12 06:14 PM, Alan Stern wrote: >> >> On Mon, 29 Oct 2012, Richard Retanubun wrote: >>> >>> Focusing down on one of the dumps: >>> >>> unreferenced object 0xd3849740 (size 8): >>> comm "khubd", pid 1026, jiffies 232553037 (age 506.597s) >>> hex dump (first 8 bytes): >>> 4d 43 38 37 30 35 00 00 MC8705.. >>> backtrace: >>> [] usb_cache_string+0x74/0xac [usbcore] >>> [] usb_enumerate_device+0x44/0xf8 [usbcore] >>> [] usb_new_device+0x3c/0x13c [usbcore] >>> [] hub_thread+0xc8c/0x1544 [usbcore] >>> [] kthread+0x7c/0x80 >>> [] kernel_thread+0x4c/0x68 >>> >>> I have a small question. How does the memory kmalloc-ed() in >>> usb_cache_string is supposed to be released? >>> (during usb_serial_disconnect()?) >> >> >> It doesn't get released during usb_serial_disconnect(). It gets >> released during usb_release_dev() in drivers/usb/core/usb.c. >> >>> Is the sierra driver is supposed to participate >>> in the tear down process (in sierra_release() maybe) and not doing >>> something that is expected? >> >> >> Probably not. >> >>> I am still missing the link between the actions done by the hub_thread() >>> for the caching the stings >>> and the sierra driver code. >> >> >> They aren't all that closely related. >> >> usb_release_dev() won't be called until all references to the USB >> device have been dropped. Maybe there's an extra reference hanging >> around. >> >> Alan Stern >> > Thanks a lot for the hint Alan. > > I added a dev_dbg print in usb_release_dev() and saw that in the builds > where there is a leak, this was simply never called! > the last line printed in a trace with all dev_dbg on is this > "usb_disable_device nuking all URBs" > When the sierra modem is unplugged, the cleanup sequence never calls > usb_release_dev() (on PL2303 it always calls usb_release_dev() > > This is the current state of versions from linux-stable > > 3.0.y (3.0.51) - Have the issue > 3.2.y (3.2.33) - Have the issue > 3.4.y (3.4.18) - Have the issue > 3.5.y (3.5.7) - Does not have the issue (but leaks because the portdata > patches is not backported yet) > 3.6.y (3.6.6) - Does not have the issue > > So a diff between 3.4.y and 3.5.y ought to narrow it down further. > > I am posting just in case someone recalls a particular patch I should be > trying out first... There was a reference-count fix for the probe error path that went in to v3.5. Haven't read all the details on how you trigger your leak, but at the face of it, it could be related. Have a look at 0658a3366db7e27fa ("usb: use usb_serial_put in usb_serial_probe errors). If related, you should be seeing "Ignoring blacklisted interface #n" messages when you enable debug (e.g. #define DEBUG) in the sierra driver. Greg, it seems to me that the fix referred to above should be backported to the earlier stable trees either way. Thanks, Johan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: gadget: ncm: correct endianess conversion
Hi, On Fri, Nov 9, 2012 at 12:53 PM, Felipe Balbi wrote: > Hi, > > On Fri, Nov 09, 2012 at 10:31:47AM +0100, Dmytro Milinevskyy wrote: >> Hi Felipe, >> >> On Thu, Nov 8, 2012 at 8:30 PM, Felipe Balbi wrote: >> > Hi, >> > >> > On Thu, Nov 08, 2012 at 08:07:57PM +0100, Dmytro Milinevskyy wrote: >> >> > On Wed, Nov 07, 2012 at 02:14:00PM +0100, Dmytro Milinevskyy wrote: >> >> >> Unfortunately I have some issues with git send-email. >> >> >> I've attached the patch itself .. >> >> > >> >> > I'll apply it like that this time, but try to figure out how to send >> >> > patches properly. We have some very helpful hints on >> >> > Documentation/email-clients.txt which are hugely underused ;-) >> >> > >> >> well, I try to follow the rules as much as possible as long as tools >> >> work ... =) >> > >> > git send-email has thousands of users and it works fine for them >> > (including myself). Maybe you just misconfigured it ?!? ;-) >> > >> No, I was using it in the past w/o any issue. >> In fact initial versions of the patch were sent exactly with git-send-email. >> >> However I lost my internet connection at home(some issues with ISP) >> and at work place network environment somehow blocks >> git-send-email(though thunderbird still can connect to the smtp server >> ..). > > I don't think smtp server can make that distinction. Except for the > message-id, there's nothing there which would help smtp server to figure > out you're using git send-email. On top of that, it would be just extra > work to maintain rules to block a tool which is essentially just sending > an email. > > Make sure you're not missing some authentication with the mail server on > your git send-email configuration. > > my 2 cents. Thanks a lot, I very appreciate your help. I even tried to use same laptop with same version of git I used to send the patch for the first time but it didn't help. Likely there's a network configuration that is blocking git-send-email. I will try to figure it out with our system administrators. cheers, -- dmytro > -- > balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] USB: fix endpoint-disabling for failed config changes
Hello, I'm wondering how long it will be before this patch appears in a 3.6.x release. Any idea? Any opinion on whether a 3.4.x or 3.2.x kernel would be better than 3.6.x for a production network backup system (i.e. super critical)? Or is 3.6 best? Running 3.1.8 at present. Seeing the timeout with a Rosewill drive dock (ASMedia AS2105 controller) and several new Western Digital WD30EZRX drives. Timing seems opportune as the drives arrived today, shortly after the patch. Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH usb-linus] USB: keyspan: fix typo causing GPF on open
Bjørn: I patched keyspan.c using your below supplied diff in 3.6.6 (I'm not using git.) The patch WORKS for me. (I tested using minicom and the two programs that usually access the Keyspan serial device.) Thank you for the quick fix. Will this show up in 3.6.7? Richard richj...@pacbell.net On 11/10/2012 01:13 AM, Bjørn Mork wrote: > Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and > memory leaks) had a small typo which made the driver use wrong > offsets when mapping serial port private data. This results in > in a GPF when the port is opened. > > Reported-by: Richard > Cc: > Cc: Johan Hovold > Signed-off-by: Bjørn Mork > --- > Hello Richard, > > I wonder if you are able to test and verify this? I do not guarantee > that there aren't other issues around, but this small typo looked like > an obvious killer... > > Bjørn > > drivers/usb/serial/keyspan.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c > index 7179b0c..cff8dd5 100644 > --- a/drivers/usb/serial/keyspan.c > +++ b/drivers/usb/serial/keyspan.c > @@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial) > static int keyspan_port_probe(struct usb_serial_port *port) > { > struct usb_serial *serial = port->serial; > - struct keyspan_port_private *s_priv; > + struct keyspan_serial_private *s_priv; > struct keyspan_port_private *p_priv; > const struct keyspan_device_details *d_details; > struct callbacks *cback; > @@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port > *port) > if (!p_priv) > return -ENOMEM; > > - s_priv = usb_get_serial_data(port->serial); > p_priv->device_details = d_details; > > /* Setup values for the various callback routines */ > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] USB: fix endpoint-disabling for failed config changes
On Sat, 10 Nov 2012 starlight.201...@binnacle.cx wrote: > Hello, > > I'm wondering how long it will be before this > patch appears in a 3.6.x release. Any idea? Probably a week or two. It's up to Greg KH. > Any opinion on whether a 3.4.x or 3.2.x kernel > would be better than 3.6.x for a production > network backup system (i.e. super critical)? > Or is 3.6 best? Running 3.1.8 at present. In general, the latest kernel is the best. But if an earlier kernel works okay on your system, you don't have to be in a hurry to change it (unless you're concerned about security-related fixes). > Seeing the timeout with a Rosewill > drive dock (ASMedia AS2105 controller) > and several new Western Digital WD30EZRX > drives. Timing seems opportune as the > drives arrived today, shortly after > the patch. Does the patch fix the problem? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] USB: fix endpoint-disabling for failed config changes
At 08:37 PM 11/10/2012 -0500, Alan Stern wrote: >Does the patch fix the problem? Will let you and the list know. Want to wait for a full kernel release. The drives go active if the power to the docks is toggled after they spin up--going with that for now. Will finish configuring the array and offline the mirror copies before upgrading the kernel. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html