usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
PATCH 1/2 usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
This driver is processed as two USB hub despite one. The number of root hub is defined in R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition of R8A66597_MAX_ROOT_HUB.
--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/r8a66597-hcd.c +2 -2
@@ -164,8 +164,8 @@ static int enable_controller(struct r8a66597 *r8a66597)r8a66597_bset (r8a66597,INTL ,SOFCFG );r8a66597_write (r8a66597,0 ,INTENB0 ); -r8a66597_write (r8a66597,0 ,INTENB1 ); -r8a66597_write (r8a66597,0 ,INTENB2 ); +for (port =0 ; port <R8A66597_MAX_ROOT_HUB ; port++) +r8a66597_write (r8a66597,0 ,get_intenb_reg (port));r8a66597_bset (r8a66597,CONFIG_R8A66597_ENDIAN &BIGEND ,CFIFOSEL );r8a66597_bset (r8a66597,CONFIG_R8A66597_ENDIAN &BIGEND ,D0FIFOSEL );
Signature · 1 line
1.7.9.5
PATCH 1/2 usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
Quoted 6 lines · yasuhisa umano
This driver is processed as two USB hub despite one. The number of root hub is defined in
R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition ofR8A66597_MAX_ROOT_HUB.Signed-off-by Yasuhisa Umano <[email protected]>
Is there any reason why those two patches were sent twice please ? They seem the same in both cases.
Otherwise, I'm fine with those patches.
Best regards,
Marek Vasut
PATCH 1/2 usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
Hi
Sorry.
I failed to send patchs to ML by setting of MUA.
Best regards,
Yasuhisa
Quoted 16 lines · Marek Vasut
Quoted 6 lines · yasuhisa umano
This driver is processed as two USB hub despite one. The number of root hub is defined in
R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition ofR8A66597_MAX_ROOT_HUB.Signed-off-by Yasuhisa Umano <[email protected]>Is there any reason why those two patches were sent twice please ? They seem the same in both cases.
Otherwise, I'm fine with those patches.
Best regards,
Marek Vasut
PATCH 1/2 usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
In reply to yasuhisa umanoQuoted 15 lines · yasuhisa umano
This driver is processed as two USB hub despite one. The number of root hub is defined in
R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition ofR8A66597_MAX_ROOT_HUB.Signed-off-by Yasuhisa Umano <[email protected]>--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/r8a66597-hcd.cindex dfe5423..c58d2a9 100644
drivers/usb/host/r8a66597-hcd.c static int enable_controller(struct r8a66597 *r8a66597) · line 168
Quoted 7 lines
drivers/usb/host/r8a66597-hcd.c +2
-2@@ -164,8 +164,8 @@ static int enable_controller(struct r8a66597 *r8a66597)r8a66597_bset (r8a66597,INTL ,SOFCFG );r8a66597_write (r8a66597,0 ,INTENB0 ); -r8a66597_write (r8a66597,0 ,INTENB1 ); -r8a66597_write (r8a66597,0 ,INTENB2 ); +for (port =0 ; port <R8A66597_MAX_ROOT_HUB ; port++) +r8a66597_write (r8a66597,0 ,get_intenb_reg (port));
Hmm, looking at get_intenb_reg(), this is slightly dangerous, but I will trust you you know what you are doing . I am a bit worried someone might set R8A66597_MAX_ROOT_HUB to value >2 and will wonder why doesn't it work.
Anyway, I will apply this and if you feel my rant is valid, submit subsequent patch.
Best regards,
Marek Vasut
PATCH 1/2 usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
Hi,
Thanks for your comment.
Quoted 17 lines · Marek Vasut
Quoted 16 lines · yasuhisa umano
This driver is processed as two USB hub despite one. The number of root hub is defined in
R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition ofR8A66597_MAX_ROOT_HUB.Signed-off-by Yasuhisa Umano <[email protected]>--- drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/r8a66597-hcd.cindex dfe5423..c58d2a9 100644drivers/usb/host/r8a66597-hcd.c +0
-0@@ -164,8 +164,8 @@ static int enable_controller(struct r8a66597 *r8a66597)
Quoted 10 lines
drivers/usb/host/r8a66597-hcd.c static int enable_controller(struct r8a66597 *r8a66597) · line 168
Quoted 6 lines
drivers/usb/host/r8a66597-hcd.c +2
-2r8a66597_bset (r8a66597,INTL ,SOFCFG );r8a66597_write (r8a66597,0 ,INTENB0 ); -r8a66597_write (r8a66597,0 ,INTENB1 ); -r8a66597_write (r8a66597,0 ,INTENB2 ); +for (port =0 ; port <R8A66597_MAX_ROOT_HUB ; port++) +r8a66597_write (r8a66597,0 ,get_intenb_reg (port));Hmm, looking at
get_intenb_reg(), this is slightly dangerous, but I will trust you you know what you are doing . I am a bit worried someone might setR8A66597_MAX_ROOT_HUBto value >2 and will wonder why doesn't it work.
I understood your point.
Certainly, current?device drivers support only the initialization of 1 or 2 interrupt for hub.
If this driver has a hub of more future, I will send the patch.
Quoted 3 lines
Anyway, I will apply this and if you feel my rant is valid, submit subsequent patch.
Thank you.
Quoted 4 lines
Best regards,
Marek Vasut
Best regards,
Yasuhisa
PATCH 1/2 usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
Quoted 36 lines · Yasuhisa Umano
Hi,
Thanks for your comment.Quoted 22 lines · Marek Vasut
Quoted 21 lines · yasuhisa umano
This driver is processed as two USB hub despite one. The number of root hub is defined in
R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition ofR8A66597_MAX_ROOT_HUB.Signed-off-by Yasuhisa Umano <[email protected]>---
drivers/usb/host/r8a66597-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/usb/host/r8a66597-hcd.cindex dfe5423..c58d2a9 100644drivers/usb/host/r8a66597-hcd.c +0
-0@@ -164,8 +164,8 @@ static int enable_controller(struct r8a66597 *r8a66597)r8a66597_bset (r8a66597,INTL ,SOFCFG );r8a66597_write (r8a66597,0 ,INTENB0 );Quoted 9 lines
drivers/usb/host/r8a66597-hcd.c static int enable_controller(struct r8a66597 *r8a66597) · line 168
Quoted 4 lines
drivers/usb/host/r8a66597-hcd.c +2
-2-r8a66597_write (r8a66597,0 ,INTENB1 ); -r8a66597_write (r8a66597,0 ,INTENB2 ); +for (port =0 ; port <R8A66597_MAX_ROOT_HUB ; port++) +r8a66597_write (r8a66597,0 ,get_intenb_reg (port));Hmm, looking at
get_intenb_reg(), this is slightly dangerous, but I will trust you you know what you are doing . I am a bit worried someone might setR8A66597_MAX_ROOT_HUBto value >2 and will wonder why doesn't it work.
Quoted 4 lines
I understood your point.
Certainly, current?device drivers support only the initialization of 1 or 2 interrupt for hub.
If this driver has a hub of more future, I will send the patch.
Thanks
Best regards,
Marek Vasut