All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mii: miiphy register address width change
@ 2011-09-21 11:10 Chandan Nath
  2011-09-21 14:21 ` Mike Frysinger
  2011-12-06 20:18 ` Wolfgang Denk
  0 siblings, 2 replies; 15+ messages in thread
From: Chandan Nath @ 2011-09-21 11:10 UTC (permalink / raw)
  To: u-boot

This patch is added for PHY whose register offset value exceeds 0xFF and
cannot be used with "unsigned char" datatype in miiphy_read, miiphy_write
and miiphy_register functions. Datatype of register offset is changed to
unsigned short instead of unsigned char so that offset value greater then
0xFF can be used.

Signed-off-by: Chandan Nath <chandan.nath@ti.com>
---
 common/miiphyutil.c |    8 ++++----
 include/miiphy.h    |   12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index 35ad357..68a32fc 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -105,9 +105,9 @@ static int legacy_miiphy_write(struct mii_dev *bus, int addr, int devad,
  */
 void miiphy_register(const char *name,
 		      int (*read)(const char *devname, unsigned char addr,
-				   unsigned char reg, unsigned short *value),
+				   unsigned short reg, unsigned short *value),
 		      int (*write)(const char *devname, unsigned char addr,
-				    unsigned char reg, unsigned short value))
+				    unsigned short reg, unsigned short value))
 {
 	struct mii_dev *new_dev;
 	struct legacy_mii_dev *ldev;
@@ -284,7 +284,7 @@ static struct mii_dev *miiphy_get_active_dev(const char *devname)
  * Returns:
  *   0 on success
  */
-int miiphy_read(const char *devname, unsigned char addr, unsigned char reg,
+int miiphy_read(const char *devname, unsigned char addr, unsigned short reg,
 		 unsigned short *value)
 {
 	struct mii_dev *bus;
@@ -310,7 +310,7 @@ int miiphy_read(const char *devname, unsigned char addr, unsigned char reg,
  * Returns:
  *   0 on success
  */
-int miiphy_write(const char *devname, unsigned char addr, unsigned char reg,
+int miiphy_write(const char *devname, unsigned char addr, unsigned short reg,
 		  unsigned short value)
 {
 	struct mii_dev *bus;
diff --git a/include/miiphy.h b/include/miiphy.h
index 7e70cf8..7ce6d14 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -42,14 +42,14 @@
 
 struct legacy_mii_dev {
 	int (*read)(const char *devname, unsigned char addr,
-		     unsigned char reg, unsigned short *value);
+		     unsigned short reg, unsigned short *value);
 	int (*write)(const char *devname, unsigned char addr,
-		      unsigned char reg, unsigned short value);
+		      unsigned short reg, unsigned short value);
 };
 
-int miiphy_read(const char *devname, unsigned char addr, unsigned char reg,
+int miiphy_read(const char *devname, unsigned char addr, unsigned short reg,
 		 unsigned short *value);
-int miiphy_write(const char *devname, unsigned char addr, unsigned char reg,
+int miiphy_write(const char *devname, unsigned char addr, unsigned short reg,
 		  unsigned short value);
 int miiphy_info(const char *devname, unsigned char addr, unsigned int *oui,
 		 unsigned char *model, unsigned char *rev);
@@ -65,9 +65,9 @@ void miiphy_init(void);
 
 void miiphy_register(const char *devname,
 		      int (*read)(const char *devname, unsigned char addr,
-				   unsigned char reg, unsigned short *value),
+				   unsigned short reg, unsigned short *value),
 		      int (*write)(const char *devname, unsigned char addr,
-				    unsigned char reg, unsigned short value));
+				    unsigned short reg, unsigned short value));
 
 int miiphy_set_current_dev(const char *devname);
 const char *miiphy_get_current_dev(void);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-09-21 11:10 [U-Boot] [PATCH] mii: miiphy register address width change Chandan Nath
@ 2011-09-21 14:21 ` Mike Frysinger
  2011-10-20 10:34   ` Kumar
  2011-12-06 20:18 ` Wolfgang Denk
  1 sibling, 1 reply; 15+ messages in thread
From: Mike Frysinger @ 2011-09-21 14:21 UTC (permalink / raw)
  To: u-boot

On Wednesday, September 21, 2011 07:10:32 Chandan Nath wrote:
> This patch is added for PHY whose register offset value exceeds 0xFF and
> cannot be used with "unsigned char" datatype in miiphy_read, miiphy_write
> and miiphy_register functions. Datatype of register offset is changed to
> unsigned short instead of unsigned char so that offset value greater then
> 0xFF can be used.

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110921/448e80c9/attachment.pgp 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-09-21 14:21 ` Mike Frysinger
@ 2011-10-20 10:34   ` Kumar
  2011-10-20 13:26     ` Mike Frysinger
  0 siblings, 1 reply; 15+ messages in thread
From: Kumar @ 2011-10-20 10:34 UTC (permalink / raw)
  To: u-boot

Hi Mike,
This patch was acked on September 21, but in latest code base I could not find this patch.
Is there anything left which I need to take care in my patch. If so, please let me know
so that this can be picked up.

Regards
Chandan

> -----Original Message-----
> From: Mike Frysinger [mailto:vapier at gentoo.org]
> Sent: Wednesday, September 21, 2011 7:52 PM
> To: u-boot at lists.denx.de
> Cc: Kumar Nath, Chandan
> Subject: Re: [U-Boot] [PATCH] mii: miiphy register address width change
> 
> On Wednesday, September 21, 2011 07:10:32 Chandan Nath wrote:
> > This patch is added for PHY whose register offset value exceeds 0xFF
> > and cannot be used with "unsigned char" datatype in miiphy_read,
> > miiphy_write and miiphy_register functions. Datatype of register
> > offset is changed to unsigned short instead of unsigned char so that
> > offset value greater then 0xFF can be used.
> 
> Acked-by: Mike Frysinger <vapier@gentoo.org> -mike

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 10:34   ` Kumar
@ 2011-10-20 13:26     ` Mike Frysinger
  2011-10-20 13:55       ` Kumar Gala
  0 siblings, 1 reply; 15+ messages in thread
From: Mike Frysinger @ 2011-10-20 13:26 UTC (permalink / raw)
  To: u-boot

On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
> This patch was acked on September 21, but in latest code base I could not
> find this patch. Is there anything left which I need to take care in my
> patch. If so, please let me know so that this can be picked up.

i don't merge net patches.  wolfgang does.  i don't think there's anything 
left for you to do.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111020/1e5e6256/attachment.pgp 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 13:26     ` Mike Frysinger
@ 2011-10-20 13:55       ` Kumar Gala
  2011-10-20 13:58         ` Mike Frysinger
  0 siblings, 1 reply; 15+ messages in thread
From: Kumar Gala @ 2011-10-20 13:55 UTC (permalink / raw)
  To: u-boot


On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:

> On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
>> This patch was acked on September 21, but in latest code base I could not
>> find this patch. Is there anything left which I need to take care in my
>> patch. If so, please let me know so that this can be picked up.
> 
> i don't merge net patches.  wolfgang does.  i don't think there's anything 
> left for you to do.
> -mike
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

I think this breaks 10g support.  I'm pretty sure Andy made the data type a short for a reason.

- k

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 13:55       ` Kumar Gala
@ 2011-10-20 13:58         ` Mike Frysinger
  2011-10-20 14:03           ` Kumar
  2011-10-20 21:45           ` Andy Fleming
  0 siblings, 2 replies; 15+ messages in thread
From: Mike Frysinger @ 2011-10-20 13:58 UTC (permalink / raw)
  To: u-boot

On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
> On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
> > On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
> >> This patch was acked on September 21, but in latest code base I could
> >> not find this patch. Is there anything left which I need to take care
> >> in my patch. If so, please let me know so that this can be picked up.
> > 
> > i don't merge net patches.  wolfgang does.  i don't think there's
> > anything left for you to do.
> 
> I think this breaks 10g support.  I'm pretty sure Andy made the data type a
> short for a reason.

the data type in mainline is 8bits (char).  Chandan is fixing it to be 16bits 
(short).  if 10g breaks with a short, that sounds like a bug in the 10g code 
we should figure out + fix.  Linux is using a short just fine afaict.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111020/e8895c85/attachment.pgp 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 13:58         ` Mike Frysinger
@ 2011-10-20 14:03           ` Kumar
  2011-10-20 18:29             ` Kumar Gala
  2011-10-20 21:45           ` Andy Fleming
  1 sibling, 1 reply; 15+ messages in thread
From: Kumar @ 2011-10-20 14:03 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Mike Frysinger [mailto:vapier at gentoo.org]
> Sent: Thursday, October 20, 2011 7:28 PM
> To: Kumar Gala
> Cc: Kumar Nath, Chandan; u-boot at lists.denx.de List; Andy Fleming
> Subject: Re: [U-Boot] [PATCH] mii: miiphy register address width change
> 
> On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
> > On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
> > > On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
> > >> This patch was acked on September 21, but in latest code base I
> could
> > >> not find this patch. Is there anything left which I need to take
> care
> > >> in my patch. If so, please let me know so that this can be picked
> up.
> > >
> > > i don't merge net patches.  wolfgang does.  i don't think there's
> > > anything left for you to do.
> >
> > I think this breaks 10g support.  I'm pretty sure Andy made the data
> type a
> > short for a reason.
> 
> the data type in mainline is 8bits (char).  Chandan is fixing it to be
> 16bits
> (short).  if 10g breaks with a short, that sounds like a bug in the 10g
> code
> we should figure out + fix.  Linux is using a short just fine afaict.
> -mike

Yes, in mainline it is 8 bits (char) not 16 bits (short).

Wolfgang, 
can it be picked up for mainline?
- Chandan

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 14:03           ` Kumar
@ 2011-10-20 18:29             ` Kumar Gala
  0 siblings, 0 replies; 15+ messages in thread
From: Kumar Gala @ 2011-10-20 18:29 UTC (permalink / raw)
  To: u-boot


On Oct 20, 2011, at 9:03 AM, Kumar Nath, Chandan wrote:

>> -----Original Message-----
>> From: Mike Frysinger [mailto:vapier at gentoo.org]
>> Sent: Thursday, October 20, 2011 7:28 PM
>> To: Kumar Gala
>> Cc: Kumar Nath, Chandan; u-boot at lists.denx.de List; Andy Fleming
>> Subject: Re: [U-Boot] [PATCH] mii: miiphy register address width change
>> 
>> On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
>>> On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
>>>> On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
>>>>> This patch was acked on September 21, but in latest code base I
>> could
>>>>> not find this patch. Is there anything left which I need to take
>> care
>>>>> in my patch. If so, please let me know so that this can be picked
>> up.
>>>> 
>>>> i don't merge net patches.  wolfgang does.  i don't think there's
>>>> anything left for you to do.
>>> 
>>> I think this breaks 10g support.  I'm pretty sure Andy made the data
>> type a
>>> short for a reason.
>> 
>> the data type in mainline is 8bits (char).  Chandan is fixing it to be
>> 16bits
>> (short).  if 10g breaks with a short, that sounds like a bug in the 10g
>> code
>> we should figure out + fix.  Linux is using a short just fine afaict.
>> -mike
> 
> Yes, in mainline it is 8 bits (char) not 16 bits (short).
> 
> Wolfgang, 
> can it be picked up for mainline?
> - Chandan

Mainline of what?

- k

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 13:58         ` Mike Frysinger
  2011-10-20 14:03           ` Kumar
@ 2011-10-20 21:45           ` Andy Fleming
  2011-10-20 22:42             ` Mike Frysinger
  1 sibling, 1 reply; 15+ messages in thread
From: Andy Fleming @ 2011-10-20 21:45 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2011 at 8:58 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
>> On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
>> > On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
>> >> This patch was acked on September 21, but in latest code base I could
>> >> not find this patch. Is there anything left which I need to take care
>> >> in my patch. If so, please let me know so that this can be picked up.
>> >
>> > i don't merge net patches. ?wolfgang does. ?i don't think there's
>> > anything left for you to do.
>>
>> I think this breaks 10g support. ?I'm pretty sure Andy made the data type a
>> short for a reason.
>
> the data type in mainline is 8bits (char). ?Chandan is fixing it to be 16bits
> (short). ?if 10g breaks with a short, that sounds like a bug in the 10g code
> we should figure out + fix. ?Linux is using a short just fine afaict.

Actually, there's some confusion, here. The function being updated by
this patch isn't part of phylib. It's part of the legacy miiphy code.
I don't think there's any reason to update it. If you are writing a
new driver with 10G support (which would, admittedly, require a 16-bit
register argument), then don't use miiphy_register. Call
mdio_register, and register proper phylib support. The mii command
isn't capable of dealing with Clause-45 MDIO transactions, anyway (no
devad)

Andy

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 21:45           ` Andy Fleming
@ 2011-10-20 22:42             ` Mike Frysinger
  2011-10-20 22:53               ` Andy Fleming
  0 siblings, 1 reply; 15+ messages in thread
From: Mike Frysinger @ 2011-10-20 22:42 UTC (permalink / raw)
  To: u-boot

On Thursday 20 October 2011 17:45:33 Andy Fleming wrote:
> On Thu, Oct 20, 2011 at 8:58 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
> >> On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
> >> > On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
> >> >> This patch was acked on September 21, but in latest code base I could
> >> >> not find this patch. Is there anything left which I need to take care
> >> >> in my patch. If so, please let me know so that this can be picked up.
> >> > 
> >> > i don't merge net patches.  wolfgang does.  i don't think there's
> >> > anything left for you to do.
> >> 
> >> I think this breaks 10g support.  I'm pretty sure Andy made the data
> >> type a short for a reason.
> > 
> > the data type in mainline is 8bits (char).  Chandan is fixing it to be
> > 16bits (short).  if 10g breaks with a short, that sounds like a bug in
> > the 10g code we should figure out + fix.  Linux is using a short just
> > fine afaict.
> 
> Actually, there's some confusion, here. The function being updated by
> this patch isn't part of phylib. It's part of the legacy miiphy code.
> I don't think there's any reason to update it. If you are writing a
> new driver with 10G support (which would, admittedly, require a 16-bit
> register argument), then don't use miiphy_register. Call
> mdio_register, and register proper phylib support. The mii command
> isn't capable of dealing with Clause-45 MDIO transactions, anyway (no
> devad)

so the patch is correct, but we don't want to merge it because we don't want 
to encourage the old miiphy interface ?  and leaving it broken forces people 
to migrate to the new phy layer ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111020/42c67471/attachment.pgp 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 22:42             ` Mike Frysinger
@ 2011-10-20 22:53               ` Andy Fleming
  2011-10-21  5:39                 ` Kumar
  2011-10-30 15:38                 ` Mike Frysinger
  0 siblings, 2 replies; 15+ messages in thread
From: Andy Fleming @ 2011-10-20 22:53 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2011 at 5:42 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 20 October 2011 17:45:33 Andy Fleming wrote:
>> On Thu, Oct 20, 2011 at 8:58 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>> > On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
>> >> On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
>> >> > On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
>> >> >> This patch was acked on September 21, but in latest code base I could
>> >> >> not find this patch. Is there anything left which I need to take care
>> >> >> in my patch. If so, please let me know so that this can be picked up.
>> >> >
>> >> > i don't merge net patches. ?wolfgang does. ?i don't think there's
>> >> > anything left for you to do.
>> >>
>> >> I think this breaks 10g support. ?I'm pretty sure Andy made the data
>> >> type a short for a reason.
>> >
>> > the data type in mainline is 8bits (char). ?Chandan is fixing it to be
>> > 16bits (short). ?if 10g breaks with a short, that sounds like a bug in
>> > the 10g code we should figure out + fix. ?Linux is using a short just
>> > fine afaict.
>>
>> Actually, there's some confusion, here. The function being updated by
>> this patch isn't part of phylib. It's part of the legacy miiphy code.
>> I don't think there's any reason to update it. If you are writing a
>> new driver with 10G support (which would, admittedly, require a 16-bit
>> register argument), then don't use miiphy_register. Call
>> mdio_register, and register proper phylib support. The mii command
>> isn't capable of dealing with Clause-45 MDIO transactions, anyway (no
>> devad)
>
> so the patch is correct, but we don't want to merge it because we don't want
> to encourage the old miiphy interface ? ?and leaving it broken forces people
> to migrate to the new phy layer ?

I don't think the patch is correct or incorrect. It attempts to update
the miiphy_* API to support larger register offsets. I'm suggesting
that we shouldn't change the legacy API to support new features.
There's no way to specify via miiphy_write that you want to write to a
register with a 16-bit register offset, because there's no way to
specify which device to write.

So I'm not saying we shouldn't apply this patch. I'm questioning why
it was written in a hope that we can discourage new use of the old
API. I'm also not convinced the patch helps anything.

Andy

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 22:53               ` Andy Fleming
@ 2011-10-21  5:39                 ` Kumar
  2011-10-21 10:03                   ` Wolfgang Denk
  2011-10-30 15:38                 ` Mike Frysinger
  1 sibling, 1 reply; 15+ messages in thread
From: Kumar @ 2011-10-21  5:39 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-
> bounces at lists.denx.de] On Behalf Of Andy Fleming
> Sent: Friday, October 21, 2011 4:24 AM
> To: Mike Frysinger
> Cc: u-boot at lists.denx.de List; Andy Fleming; Kumar Gala
> Subject: Re: [U-Boot] [PATCH] mii: miiphy register address width change
> 
> On Thu, Oct 20, 2011 at 5:42 PM, Mike Frysinger <vapier@gentoo.org>
> wrote:
> > On Thursday 20 October 2011 17:45:33 Andy Fleming wrote:
> >> On Thu, Oct 20, 2011 at 8:58 AM, Mike Frysinger <vapier@gentoo.org>
> wrote:
> >> > On Thursday 20 October 2011 09:55:34 Kumar Gala wrote:
> >> >> On Oct 20, 2011, at 8:26 AM, Mike Frysinger wrote:
> >> >> > On Thursday 20 October 2011 06:34:33 Kumar Nath, Chandan wrote:
> >> >> >> This patch was acked on September 21, but in latest code base
> I could
> >> >> >> not find this patch. Is there anything left which I need to
> take care
> >> >> >> in my patch. If so, please let me know so that this can be
> picked up.
> >> >> >
> >> >> > i don't merge net patches. ?wolfgang does. ?i don't think
> there's
> >> >> > anything left for you to do.
> >> >>
> >> >> I think this breaks 10g support. ?I'm pretty sure Andy made the
> data
> >> >> type a short for a reason.
> >> >
> >> > the data type in mainline is 8bits (char). ?Chandan is fixing it
> to be
> >> > 16bits (short). ?if 10g breaks with a short, that sounds like a
> bug in
> >> > the 10g code we should figure out + fix. ?Linux is using a short
> just
> >> > fine afaict.
> >>
> >> Actually, there's some confusion, here. The function being updated
> by
> >> this patch isn't part of phylib. It's part of the legacy miiphy
> code.
> >> I don't think there's any reason to update it. If you are writing a
> >> new driver with 10G support (which would, admittedly, require a 16-
> bit
> >> register argument), then don't use miiphy_register. Call
> >> mdio_register, and register proper phylib support. The mii command
> >> isn't capable of dealing with Clause-45 MDIO transactions, anyway
> (no
> >> devad)
> >
> > so the patch is correct, but we don't want to merge it because we
> don't want
> > to encourage the old miiphy interface ? ?and leaving it broken forces
> people
> > to migrate to the new phy layer ?
> 
> I don't think the patch is correct or incorrect. It attempts to update
> the miiphy_* API to support larger register offsets. I'm suggesting
> that we shouldn't change the legacy API to support new features.
> There's no way to specify via miiphy_write that you want to write to a
> register with a 16-bit register offset, because there's no way to
> specify which device to write.
> 
> So I'm not saying we shouldn't apply this patch. I'm questioning why
> it was written in a hope that we can discourage new use of the old
> API. I'm also not convinced the patch helps anything.
> 
> Andy

This patch was written to support PHY register whose address width is greater
than 8 bit. It was not written for 10 gig support.

- Chandan

> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-21  5:39                 ` Kumar
@ 2011-10-21 10:03                   ` Wolfgang Denk
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfgang Denk @ 2011-10-21 10:03 UTC (permalink / raw)
  To: u-boot

Dear "Kumar Nath, Chandan",

In message <B85A65D85D7EB246BE421B3FB0FBB5930328B2D9DC@dbde02.ent.ti.com> you wrote:
>
> > I don't think the patch is correct or incorrect. It attempts to update
> > the miiphy_* API to support larger register offsets. I'm suggesting
> > that we shouldn't change the legacy API to support new features.
> > There's no way to specify via miiphy_write that you want to write to a
> > register with a 16-bit register offset, because there's no way to
> > specify which device to write.
> > >
> > So I'm not saying we shouldn't apply this patch. I'm questioning why
> > it was written in a hope that we can discourage new use of the old
> > API. I'm also not convinced the patch helps anything.
> > >
> > Andy
>
> This patch was written to support PHY register whose address width is great> er
> than 8 bit. It was not written for 10 gig support.

The question remains:  Why are you still using the old deprecated
legacy API instead of the new one?

You will need really good reasons to convince me.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Save energy:  Drive a smaller shell.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-10-20 22:53               ` Andy Fleming
  2011-10-21  5:39                 ` Kumar
@ 2011-10-30 15:38                 ` Mike Frysinger
  1 sibling, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2011-10-30 15:38 UTC (permalink / raw)
  To: u-boot

On Thursday 20 October 2011 18:53:37 Andy Fleming wrote:
> So I'm not saying we shouldn't apply this patch. I'm questioning why
> it was written in a hope that we can discourage new use of the old
> API. I'm also not convinced the patch helps anything.

can you update the feature removal file and add some comment warnings to the 
relevant files then ?

i think #warning might be too big of a problem atm due to how many people are 
still using the old API ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/d6f1c42a/attachment.pgp 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [U-Boot] [PATCH] mii: miiphy register address width change
  2011-09-21 11:10 [U-Boot] [PATCH] mii: miiphy register address width change Chandan Nath
  2011-09-21 14:21 ` Mike Frysinger
@ 2011-12-06 20:18 ` Wolfgang Denk
  1 sibling, 0 replies; 15+ messages in thread
From: Wolfgang Denk @ 2011-12-06 20:18 UTC (permalink / raw)
  To: u-boot

Dear Chandan Nath,

In message <1316603432-17780-1-git-send-email-chandan.nath@ti.com> you wrote:
> This patch is added for PHY whose register offset value exceeds 0xFF and
> cannot be used with "unsigned char" datatype in miiphy_read, miiphy_write
> and miiphy_register functions. Datatype of register offset is changed to
> unsigned short instead of unsigned char so that offset value greater then
> 0xFF can be used.
> 
> Signed-off-by: Chandan Nath <chandan.nath@ti.com>
> ---
>  common/miiphyutil.c |    8 ++++----
>  include/miiphy.h    |   12 ++++++------
>  2 files changed, 10 insertions(+), 10 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No one can guarantee the actions of another.
	-- Spock, "Day of the Dove", stardate unknown

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-12-06 20:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21 11:10 [U-Boot] [PATCH] mii: miiphy register address width change Chandan Nath
2011-09-21 14:21 ` Mike Frysinger
2011-10-20 10:34   ` Kumar
2011-10-20 13:26     ` Mike Frysinger
2011-10-20 13:55       ` Kumar Gala
2011-10-20 13:58         ` Mike Frysinger
2011-10-20 14:03           ` Kumar
2011-10-20 18:29             ` Kumar Gala
2011-10-20 21:45           ` Andy Fleming
2011-10-20 22:42             ` Mike Frysinger
2011-10-20 22:53               ` Andy Fleming
2011-10-21  5:39                 ` Kumar
2011-10-21 10:03                   ` Wolfgang Denk
2011-10-30 15:38                 ` Mike Frysinger
2011-12-06 20:18 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.