public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card.
@ 2001-07-13  7:35 I-Jui Sung
  2001-07-13  8:21 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC Gary Thomas
  2001-07-13 10:45 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card Jonathan Larmour
  0 siblings, 2 replies; 8+ messages in thread
From: I-Jui Sung @ 2001-07-13  7:35 UTC (permalink / raw)
  To: eCos mailing list

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

[Problem description]
The CompactLAN CF ethernet card (an NE2000 clone) have some problem
reporting its
Manufacturer ID, so it will fail on the cf_hwr_change_state(), cause a
"the CF won't ready" error message in the detection of networking interface.
So I've done a workaround by using version string to determine a successful
state change in
the above memtioned function.
In my test, the patch works fine with either the PRETEC CompactLAN card or
the Socketcom LP-E.

[Patch]
See attachment.
Instruction about how to apply it:

cd $(ECOS_REPOSITORY)/devs/pcmcia/arm/assabet/current/src
patch -p0 < $(WHERE_THE_PATCH_IS)/assabet_CompactLAN_patch.patch

Best regards,
IJS

[-- Attachment #2: assabet_CompactLAN_patch.patch --]
[-- Type: text/x-diff, Size: 880 bytes --]

*** assabet_pcmcia.c	Fri Jul 13 22:13:54 2001
--- my_assabet_pcmcia.c	Fri Jul 13 21:46:52 2001
***************
*** 213,217 ****
  {    
      int i, ptr, len;
!     unsigned char buf[64];
  
      if (new_state == CF_SLOT_STATE_Ready) {
--- 213,217 ----
  {    
      int i, ptr, len;
!     unsigned char buf[256];
  
      if (new_state == CF_SLOT_STATE_Ready) {
***************
*** 243,247 ****
              for (i = 0;  i < 10;  i++) {
                  ptr = 0;
!                 if (cf_get_CIS(slot, CF_CISTPL_MANFID, buf, &len, &ptr)) {
                      slot->state = CF_SLOT_STATE_Ready;
                      break;
--- 243,247 ----
              for (i = 0;  i < 10;  i++) {
                  ptr = 0;
!                 if (cf_get_CIS(slot, CF_CISTPL_VERS_1, buf, &len, &ptr)) {
                      slot->state = CF_SLOT_STATE_Ready;
                      break;

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

* RE: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC
  2001-07-13  7:35 [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card I-Jui Sung
@ 2001-07-13  8:21 ` Gary Thomas
  2001-07-13 10:46   ` Jonathan Larmour
  2001-07-13 10:45 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card Jonathan Larmour
  1 sibling, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2001-07-13  8:21 UTC (permalink / raw)
  To: I-Jui Sung; +Cc: eCos mailing list

On 13-Jul-2001 I-Jui Sung wrote:
> [Problem description]
> The CompactLAN CF ethernet card (an NE2000 clone) have some problem
> reporting its
> Manufacturer ID, so it will fail on the cf_hwr_change_state(), cause a
> "the CF won't ready" error message in the detection of networking interface.
> So I've done a workaround by using version string to determine a successful
> state change in
> the above memtioned function.
> In my test, the patch works fine with either the PRETEC CompactLAN card or
> the Socketcom LP-E.

While I can incorporate this change (I might try something else though),
it would seem to me that this implies that the PRETEC card is broken if it
does not even have any Manufacturer ID information [which I believe is mandatory].


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

* Re: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card.
  2001-07-13  7:35 [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card I-Jui Sung
  2001-07-13  8:21 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC Gary Thomas
@ 2001-07-13 10:45 ` Jonathan Larmour
  1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Larmour @ 2001-07-13 10:45 UTC (permalink / raw)
  To: I-Jui Sung; +Cc: eCos mailing list

I-Jui Sung wrote:
> 
> [Problem description]
> The CompactLAN CF ethernet card (an NE2000 clone) have some problem
> reporting its
> Manufacturer ID, so it will fail on the cf_hwr_change_state(), cause a
> "the CF won't ready" error message in the detection of networking interface.
> So I've done a workaround by using version string to determine a successful
> state change in
> the above memtioned function.
> In my test, the patch works fine with either the PRETEC CompactLAN card or
> the Socketcom LP-E.
> 
> [Patch]
> See attachment.
> Instruction about how to apply it:

Thanks! Applied.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

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

* Re: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC
  2001-07-13  8:21 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC Gary Thomas
@ 2001-07-13 10:46   ` Jonathan Larmour
  2001-07-13 10:50     ` Trenton D. Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Larmour @ 2001-07-13 10:46 UTC (permalink / raw)
  To: Gary Thomas; +Cc: I-Jui Sung, eCos mailing list

Gary Thomas wrote:
> 
> While I can incorporate this change (I might try something else though),
> it would seem to me that this implies that the PRETEC card is broken if it
> does not even have any Manufacturer ID information [which I believe is mandatory].

Even so, if it doesn't work without it. It may be a hardware bug, but
that's life. It doesn't really matter how we detect the card, just that we
do.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

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

* RE: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC
  2001-07-13 10:46   ` Jonathan Larmour
@ 2001-07-13 10:50     ` Trenton D. Adams
  2001-07-13 10:56       ` Jonathan Larmour
  0 siblings, 1 reply; 8+ messages in thread
From: Trenton D. Adams @ 2001-07-13 10:50 UTC (permalink / raw)
  To: 'Jonathan Larmour', 'Gary Thomas'
  Cc: 'I-Jui Sung', 'eCos mailing list'

  > 
  > Gary Thomas wrote:
  > > 
  > > While I can incorporate this change (I might try something else 
  > > though), it would seem to me that this implies that the 
  > PRETEC card is 
  > > broken if it does not even have any Manufacturer ID 
  > information [which 
  > > I believe is mandatory].
  > 
  > Even so, if it doesn't work without it. It may be a 
  > hardware bug, but that's life. It doesn't really matter how 
  > we detect the card, just that we do.
  > 
 But what if it's only a problem with his card, and not the PRETEC card
in general?

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

* Re: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC
  2001-07-13 10:50     ` Trenton D. Adams
@ 2001-07-13 10:56       ` Jonathan Larmour
  2001-07-13 11:42         ` I-Jui Sung
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Larmour @ 2001-07-13 10:56 UTC (permalink / raw)
  To: Trenton D. Adams
  Cc: 'Gary Thomas', 'I-Jui Sung', 'eCos mailing list'

"Trenton D. Adams" wrote:
> 
>   >
>   > Gary Thomas wrote:
>   > >
>   > > While I can incorporate this change (I might try something else
>   > > though), it would seem to me that this implies that the
>   > PRETEC card is
>   > > broken if it does not even have any Manufacturer ID
>   > information [which
>   > > I believe is mandatory].
>   >
>   > Even so, if it doesn't work without it. It may be a
>   > hardware bug, but that's life. It doesn't really matter how
>   > we detect the card, just that we do.
>   >
>  But what if it's only a problem with his card, and not the PRETEC card
> in general?

Unless I'm mistaken, the choice of field to query is arbitrary. However it
seems Gary did already apply the change internally (I assumed he hadn't).
In the absence of better information, just trust the contributor!

Although one thing occurred to me that I wondered about that I may as well
ask: whether I-Jui tried increasing the delay before the read to see if
that made a difference.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

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

* Re: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC
  2001-07-13 10:56       ` Jonathan Larmour
@ 2001-07-13 11:42         ` I-Jui Sung
  2001-07-13 11:46           ` Trenton D. Adams
  0 siblings, 1 reply; 8+ messages in thread
From: I-Jui Sung @ 2001-07-13 11:42 UTC (permalink / raw)
  To: Jonathan Larmour, Trenton D. Adams
  Cc: 'Gary Thomas', 'eCos mailing list'

----- Original Message -----
From: "Jonathan Larmour" <jlarmour@redhat.com>
To: "Trenton D. Adams" <tadams@extremeeng.com>
Cc: "'Gary Thomas'" <gthomas@redhat.com>; "'I-Jui Sung'"
<ijsung@csie.nctu.edu.tw>; "'eCos mailing list'"
<ecos-discuss@sources.redhat.com>
Sent: Saturday, July 14, 2001 1:56 AM
Subject: Re: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC


> "Trenton D. Adams" wrote:
<deleted>
> >  But what if it's only a problem with his card, and not the PRETEC card
> > in general?

    Maybe Trenton is right, though I can't get another PRETEC card to verify
it.
    My card might be the last one in the whole 3C mall around my place. :-)

>
> Unless I'm mistaken, the choice of field to query is arbitrary. However it
> seems Gary did already apply the change internally (I assumed he hadn't).
> In the absence of better information, just trust the contributor!

    I think what I changed is just the way to detect the card, so it should
not
    affect the normal operation of other cards. (I've said it's a workaround
:-)
>
> Although one thing occurred to me that I wondered about that I may as well
> ask: whether I-Jui tried increasing the delay before the read to see if
> that made a difference.

Yes, that's exactly what I did before trying to change the querying field .
(But I soon gave up this way when I found that a 1000 ms delay still changes
nothing :-)


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

* RE: [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC
  2001-07-13 11:42         ` I-Jui Sung
@ 2001-07-13 11:46           ` Trenton D. Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Trenton D. Adams @ 2001-07-13 11:46 UTC (permalink / raw)
  To: 'I-Jui Sung', 'Jonathan Larmour'
  Cc: 'Gary Thomas', 'eCos mailing list'

I agree with both of you.  It's an acceptable work around because it
won't change the way the driver works.

I wish mine would read something other than 0xff from the CIS! :(

  > -----Original Message-----
  > From: ecos-discuss-owner@sources.redhat.com 
  > [ mailto:ecos-discuss-owner@sources.redhat.com ] On Behalf Of 
  > I-Jui Sung
  > Sent: Friday, July 13, 2001 12:56 PM
  > To: Jonathan Larmour; Trenton D. Adams
  > Cc: 'Gary Thomas'; 'eCos mailing list'
  > Subject: Re: [ECOS] A patch for Assabet PCMCIA driver to 
  > work with PRETEC
  > 
  > 
  > 
  > ----- Original Message -----
  > From: "Jonathan Larmour" <jlarmour@redhat.com>
  > To: "Trenton D. Adams" <tadams@extremeeng.com>
  > Cc: "'Gary Thomas'" <gthomas@redhat.com>; "'I-Jui Sung'" 
  > <ijsung@csie.nctu.edu.tw>; "'eCos mailing list'" 
  > <ecos-discuss@sources.redhat.com>
  > Sent: Saturday, July 14, 2001 1:56 AM
  > Subject: Re: [ECOS] A patch for Assabet PCMCIA driver to 
  > work with PRETEC
  > 
  > 
  > > "Trenton D. Adams" wrote:
  > <deleted>
  > > >  But what if it's only a problem with his card, and not 
  > the PRETEC 
  > > > card in general?
  > 
  >     Maybe Trenton is right, though I can't get another 
  > PRETEC card to verify it.
  >     My card might be the last one in the whole 3C mall 
  > around my place. :-)
  > 
  > >
  > > Unless I'm mistaken, the choice of field to query is arbitrary. 
  > > However it seems Gary did already apply the change internally (I 
  > > assumed he hadn't). In the absence of better information, 
  > just trust 
  > > the contributor!
  > 
  >     I think what I changed is just the way to detect the 
  > card, so it should not
  >     affect the normal operation of other cards. (I've said 
  > it's a workaround
  > :-)
  > >
  > > Although one thing occurred to me that I wondered about 
  > that I may as 
  > > well
  > > ask: whether I-Jui tried increasing the delay before the 
  > read to see if
  > > that made a difference.
  > 
  > Yes, that's exactly what I did before trying to change the 
  > querying field . (But I soon gave up this way when I found 
  > that a 1000 ms delay still changes nothing :-)
  > 
  > 
  > 

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

end of thread, other threads:[~2001-07-13 11:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-13  7:35 [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card I-Jui Sung
2001-07-13  8:21 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC Gary Thomas
2001-07-13 10:46   ` Jonathan Larmour
2001-07-13 10:50     ` Trenton D. Adams
2001-07-13 10:56       ` Jonathan Larmour
2001-07-13 11:42         ` I-Jui Sung
2001-07-13 11:46           ` Trenton D. Adams
2001-07-13 10:45 ` [ECOS] A patch for Assabet PCMCIA driver to work with PRETEC CompactLAN CF ethernet card Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).