Re: [PATCH 1/3] USB: musb: add reset hook to platform ops
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/15/2014 07:21 PM, Felipe Balbi wrote: On Wed, Apr 02, 2014 at 03:21:44PM +0200, Daniel Mack wrote: On 04/02/2014 02:12 PM, Sergei Shtylyov wrote: On 02-04-2014 15:58, Daniel Mack wrote: +static inline void musb_platform_reset(struct musb *musb) +{ + if (musb-ops-reset) + musb-ops-reset(musb); +} + I think this patch should be merged with the patch #2. It's not good that you add a function that's not called yet. Well, that's common practice in the kernel I'd say in order to keep the changes small. But it's a matter of maintainer's taste after all, so if Felipe wants me to, I can easily squash the two together. don't worry, when it comes to inlines, I prefer to see them introduced then used. There will be no warnings or errors added because of a new inline function being added. Alright, thanks. What do you think about the rest of this series that recovers from the babble Interrupt condition? Are the patches good to in? Thanks, Daniel -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTVUJWAAoJELphMRr8Y1QknSMP+wQv5cEpKyAKl7dizBQx7YOM 8/RbKYdp3yy6szTLJIbl8Y1fh14ibP7DHpf//ix35IkDzYcJ68Rhb1NFrHIwrgfo bJDjEUJcO59vetzkfGSTdNttt2YNeQ6WaH/dIl7fgRPdyCgxwbpSvGHXWZ4m+AfR O3pLCDgh87kXQRb05tHTOG/ceFf+OtMn7S5Kvd2YsSfbn/v+tyaJ7fg8MESY4NPu axbW54Fi61iRN3nNblFUJi3ZX+1BnvzRu/hvJz/lz9QOtEqKK0IKYUI3Oa6OIbKo 3e+RnFivFutGJ0Q35OcJkXfSoeBxCxThU6l0SQFX7Fxk5CWjb6478syB56JEj/sj Q5CYcHzYwPMfhn16YVBZJZwUNoGagYceUncmoxaAveAohAooU1FbADNlnE/6Oblw H8LMlrdkBoUclNCTM/pPKDCdhFDCc1syUqyXw1JfnrZxa55mCoLZtYo8Fo00Ao3/ Otv5fX7TltnZeHtPe49Bdg2EwdP00ks3D4SYmg1FV4iTAU18fEZrsJVPsEj8RrK5 xxBOwx7N24Ev4ouVNkDiKhBs78B/1+JOIn8QgJD5E1wfc/x1yPpIe2N/csG3Zw2i 0QSwfuqTiSy0bBxw7x1LHU0qiCL47kSSF5pZHr7xJjXqKkvn3/3RL4VnZOK/S5B9 H/hZB5SEAiLC/38og6gq =ILvo -END PGP SIGNATURE- -- 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 1/3] USB: musb: add reset hook to platform ops
On Mon, Apr 21, 2014 at 06:07:50PM +0200, Daniel Mack wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/15/2014 07:21 PM, Felipe Balbi wrote: On Wed, Apr 02, 2014 at 03:21:44PM +0200, Daniel Mack wrote: On 04/02/2014 02:12 PM, Sergei Shtylyov wrote: On 02-04-2014 15:58, Daniel Mack wrote: +static inline void musb_platform_reset(struct musb *musb) +{ + if (musb-ops-reset) + musb-ops-reset(musb); +} + I think this patch should be merged with the patch #2. It's not good that you add a function that's not called yet. Well, that's common practice in the kernel I'd say in order to keep the changes small. But it's a matter of maintainer's taste after all, so if Felipe wants me to, I can easily squash the two together. don't worry, when it comes to inlines, I prefer to see them introduced then used. There will be no warnings or errors added because of a new inline function being added. Alright, thanks. What do you think about the rest of this series that recovers from the babble Interrupt condition? Are the patches good to in? playing with them as we speak :-) -- balbi signature.asc Description: Digital signature
[PATCH 1/3] USB: musb: add reset hook to platform ops
Babble interrupts require us to reset the DSPS glue layer. In order to handle all other recovery tasks independently, add a new hook for platform-specific implementations of the actual reset. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 7083e82..5514e4c 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -192,6 +192,7 @@ struct musb_platform_ops { int (*set_mode)(struct musb *musb, u8 mode); void(*try_idle)(struct musb *musb, unsigned long timeout); + void(*reset)(struct musb *musb); int (*vbus_status)(struct musb *musb); void(*set_vbus)(struct musb *musb, int on); @@ -552,6 +553,12 @@ static inline void musb_platform_try_idle(struct musb *musb, musb-ops-try_idle(musb, timeout); } +static inline void musb_platform_reset(struct musb *musb) +{ + if (musb-ops-reset) + musb-ops-reset(musb); +} + static inline int musb_platform_get_vbus_status(struct musb *musb) { if (!musb-ops-vbus_status) -- 1.8.5.3 -- 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 1/3] USB: musb: add reset hook to platform ops
On 02-04-2014 15:58, Daniel Mack wrote: Babble interrupts require us to reset the DSPS glue layer. In order to handle all other recovery tasks independently, add a new hook for platform-specific implementations of the actual reset. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 7083e82..5514e4c 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -192,6 +192,7 @@ struct musb_platform_ops { int (*set_mode)(struct musb *musb, u8 mode); void(*try_idle)(struct musb *musb, unsigned long timeout); + void(*reset)(struct musb *musb); int (*vbus_status)(struct musb *musb); void(*set_vbus)(struct musb *musb, int on); @@ -552,6 +553,12 @@ static inline void musb_platform_try_idle(struct musb *musb, musb-ops-try_idle(musb, timeout); } +static inline void musb_platform_reset(struct musb *musb) +{ + if (musb-ops-reset) + musb-ops-reset(musb); +} + I think tis patch should be merged with the patch #2. It's not good that you add a function that's not called yet. WBR, Sergei -- 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 1/3] USB: musb: add reset hook to platform ops
On 02-04-2014 15:58, Daniel Mack wrote: Babble interrupts require us to reset the DSPS glue layer. In order to handle all other recovery tasks independently, add a new hook for platform-specific implementations of the actual reset. Signed-off-by: Daniel Mack zon...@gmail.com --- drivers/usb/musb/musb_core.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 7083e82..5514e4c 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -192,6 +192,7 @@ struct musb_platform_ops { int (*set_mode)(struct musb *musb, u8 mode); void(*try_idle)(struct musb *musb, unsigned long timeout); + void(*reset)(struct musb *musb); int (*vbus_status)(struct musb *musb); void(*set_vbus)(struct musb *musb, int on); @@ -552,6 +553,12 @@ static inline void musb_platform_try_idle(struct musb *musb, musb-ops-try_idle(musb, timeout); } +static inline void musb_platform_reset(struct musb *musb) +{ + if (musb-ops-reset) + musb-ops-reset(musb); +} + I think this patch should be merged with the patch #2. It's not good that you add a function that's not called yet. WBR, Sergei -- 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 1/3] USB: musb: add reset hook to platform ops
On 04/02/2014 02:12 PM, Sergei Shtylyov wrote: On 02-04-2014 15:58, Daniel Mack wrote: +static inline void musb_platform_reset(struct musb *musb) +{ +if (musb-ops-reset) +musb-ops-reset(musb); +} + I think this patch should be merged with the patch #2. It's not good that you add a function that's not called yet. Well, that's common practice in the kernel I'd say in order to keep the changes small. But it's a matter of maintainer's taste after all, so if Felipe wants me to, I can easily squash the two together. Daniel -- 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