* solos-pci.c: Fix me
@ 2014-07-20 4:59 Nick Krause
2014-07-21 13:14 ` chas williams - CONTRACTOR
0 siblings, 1 reply; 5+ messages in thread
From: Nick Krause @ 2014-07-20 4:59 UTC (permalink / raw)
To: chas; +Cc: linux-atm-general, netdev, linux-kernel
Hey Chas,
There seems to be a fix me in this file in the function, solos_bh.
Is the default statement correct and I remove the fix me or
does it need to be rewritten.
Cheers Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: solos-pci.c: Fix me
2014-07-20 4:59 solos-pci.c: Fix me Nick Krause
@ 2014-07-21 13:14 ` chas williams - CONTRACTOR
2014-07-21 17:42 ` Nick Krause
0 siblings, 1 reply; 5+ messages in thread
From: chas williams - CONTRACTOR @ 2014-07-21 13:14 UTC (permalink / raw)
To: Nick Krause; +Cc: linux-atm-general, netdev, linux-kernel
On Sun, 20 Jul 2014 00:59:42 -0400
Nick Krause <xerofoify@gmail.com> wrote:
> Hey Chas,
> There seems to be a fix me in this file in the function, solos_bh.
> Is the default statement correct and I remove the fix me or
> does it need to be rewritten.
> Cheers Nick
>
I am afraid that I don't know enough about the solos hardware to know
if it needs to be rewritten. I gather the solos returns at least three
kinds of packets, data, status and command. If you wish to eliminate
the FIXME comment, you could just write:
@@ -850,8 +850,7 @@ static void solos_bh(unsigned long card_arg)
dev_kfree_skb_any(skb);
break;
- case PKT_COMMAND:
- default: /* FIXME: Not really, surely? */
+ default: /* PKT_COMMAND */
if (process_command(card, port, skb))
break;
spin_lock(&card->cli_queue_lock);
and be done with it since that will preserve existing behavior.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: solos-pci.c: Fix me
2014-07-21 13:14 ` chas williams - CONTRACTOR
@ 2014-07-21 17:42 ` Nick Krause
2014-07-21 18:18 ` chas williams - CONTRACTOR
0 siblings, 1 reply; 5+ messages in thread
From: Nick Krause @ 2014-07-21 17:42 UTC (permalink / raw)
To: chas williams - CONTRACTOR; +Cc: linux-atm-general, netdev, linux-kernel
On Mon, Jul 21, 2014 at 9:14 AM, chas williams - CONTRACTOR
<chas@cmf.nrl.navy.mil> wrote:
> On Sun, 20 Jul 2014 00:59:42 -0400
> Nick Krause <xerofoify@gmail.com> wrote:
>
>> Hey Chas,
>> There seems to be a fix me in this file in the function, solos_bh.
>> Is the default statement correct and I remove the fix me or
>> does it need to be rewritten.
>> Cheers Nick
>>
>
> I am afraid that I don't know enough about the solos hardware to know
> if it needs to be rewritten. I gather the solos returns at least three
> kinds of packets, data, status and command. If you wish to eliminate
> the FIXME comment, you could just write:
>
> @@ -850,8 +850,7 @@ static void solos_bh(unsigned long card_arg)
> dev_kfree_skb_any(skb);
> break;
>
> - case PKT_COMMAND:
> - default: /* FIXME: Not really, surely? */
> + default: /* PKT_COMMAND */
> if (process_command(card, port, skb))
> break;power
> spin_lock(&card->cli_queue_lock);
>
> and be done with it since that will preserve existing behavior.
My only question then is this function causing bugs as is?
Cheers Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: solos-pci.c: Fix me
2014-07-21 17:42 ` Nick Krause
@ 2014-07-21 18:18 ` chas williams - CONTRACTOR
2014-07-22 3:38 ` Nick Krause
0 siblings, 1 reply; 5+ messages in thread
From: chas williams - CONTRACTOR @ 2014-07-21 18:18 UTC (permalink / raw)
To: Nick Krause; +Cc: linux-atm-general, netdev, linux-kernel
On Mon, 21 Jul 2014 13:42:01 -0400
Nick Krause <xerofoify@gmail.com> wrote:
> On Mon, Jul 21, 2014 at 9:14 AM, chas williams - CONTRACTOR
> <chas@cmf.nrl.navy.mil> wrote:
...
> > @@ -850,8 +850,7 @@ static void solos_bh(unsigned long card_arg)
> > dev_kfree_skb_any(skb);
> > break;
> >
> > - case PKT_COMMAND:
> > - default: /* FIXME: Not really, surely? */
> > + default: /* PKT_COMMAND */
> > if (process_command(card, port, skb))
> > break;power
> > spin_lock(&card->cli_queue_lock);
> >
> > and be done with it since that will preserve existing behavior.
>
>
> My only question then is this function causing bugs as is?
> Cheers Nick
>
It has been there since the first version of this driver was released.
If it were breaking things, I would have to guess it would have been
noticed by now.
Just looking at the PKT_* defines, I would wildly guess that PKT_COMMAND
PKT_POPEN and PKT_PCLOSE are all being handled via the PKT_COMMAND|default
case. If not, popen and pclose would be leaking a skb for each usage
(which would be opening and closing the PVC -- not very often).
popen and pclose just seem like specialized PKT_COMMAND types.
process_command() woud ignore PKT_POPEN and PKT_PCLOSE since they aren't
long enough to contain a command. So maybe the comment should just go
away.
If you had access to hardware you could probably figure this out pretty
quickly. The programmer's manual doesn't seem to be available.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: solos-pci.c: Fix me
2014-07-21 18:18 ` chas williams - CONTRACTOR
@ 2014-07-22 3:38 ` Nick Krause
0 siblings, 0 replies; 5+ messages in thread
From: Nick Krause @ 2014-07-22 3:38 UTC (permalink / raw)
To: chas williams - CONTRACTOR; +Cc: linux-atm-general, netdev, linux-kernel
On Mon, Jul 21, 2014 at 2:18 PM, chas williams - CONTRACTOR
<chas@cmf.nrl.navy.mil> wrote:
> On Mon, 21 Jul 2014 13:42:01 -0400
> Nick Krause <xerofoify@gmail.com> wrote:
>
>> On Mon, Jul 21, 2014 at 9:14 AM, chas williams - CONTRACTOR
>> <chas@cmf.nrl.navy.mil> wrote:
> ...
>> > @@ -850,8 +850,7 @@ static void solos_bh(unsigned long card_arg)
>> > dev_kfree_skb_any(skb);
>> > break;
>> >
>> > - case PKT_COMMAND:
>> > - default: /* FIXME: Not really, surely? */
>> > + default: /* PKT_COMMAND */
>> > if (process_command(card, port, skb))
>> > break;power
>> > spin_lock(&card->cli_queue_lock);
>> >
>> > and be done with it since that will preserve existing behavior.
>>
>>
>> My only question then is this function causing bugs as is?
>> Cheers Nick
>>
>
> It has been there since the first version of this driver was released.
> If it were breaking things, I would have to guess it would have been
> noticed by now.
>
> Just looking at the PKT_* defines, I would wildly guess that PKT_COMMAND
> PKT_POPEN and PKT_PCLOSE are all being handled via the PKT_COMMAND|default
> case. If not, popen and pclose would be leaking a skb for each usage
> (which would be opening and closing the PVC -- not very often).
>
> popen and pclose just seem like specialized PKT_COMMAND types.
> process_command() woud ignore PKT_POPEN and PKT_PCLOSE since they aren't
> long enough to contain a command. So maybe the comment should just go
> away.
>
> If you had access to hardware you could probably figure this out pretty
> quickly. The programmer's manual doesn't seem to be available.
Seems based on your ideas , I can remove this FIX ME. I will send a patch
doing this.
Cheers Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-22 3:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 4:59 solos-pci.c: Fix me Nick Krause
2014-07-21 13:14 ` chas williams - CONTRACTOR
2014-07-21 17:42 ` Nick Krause
2014-07-21 18:18 ` chas williams - CONTRACTOR
2014-07-22 3:38 ` Nick Krause
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 NNTP newsgroup(s).