All of lore.kernel.org
 help / color / mirror / Atom feed
* cciss_scsi.c: Fix me
@ 2014-07-20  4:51 Nick Krause
       [not found] ` <E97154CC48E26246A93194D00057266054F11A3F@G9W0745.americas.hpqcorp.net>
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Krause @ 2014-07-20  4:51 UTC (permalink / raw)
  To: mike.miller; +Cc: iss_storagedev, linux-kernel

Hey Mike,
I seem to be hitting a fix me message in this file in
function,cciss_scsi_queue_command_lck.
I am wondering what you want to do when C is Null?
Cheers Nick

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

* Re: cciss_scsi.c: Fix me
       [not found] ` <E97154CC48E26246A93194D00057266054F11A3F@G9W0745.americas.hpqcorp.net>
@ 2014-07-23 14:41   ` scameron
  2014-07-23 15:11     ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: scameron @ 2014-07-23 14:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: xerofoify, scameron, scott.benesh, iss_storagedev, michael.miller

On Wed, Jul 23, 2014 at 02:15:29PM +0000, Benesh, Scott wrote:
> From: Nick Krause [mailto:xerofoify@gmail.com] 
> Sent: Saturday, July 19, 2014 11:51 PM
> To: mike.miller@hp.com
> Cc: ISS StorageDev; linux-kernel@vger.kernel.org
> Subject: cciss_scsi.c: Fix me
> 
> Hey Mike,
> I seem to be hitting a fix me message in this file in function,cciss_scsi_queue_command_lck.
> I am wondering what you want to do when C is Null?
> Cheers Nick

Hi Nick,

Mike's moved on from HP to Canonical now.

It looks like you're running out of commands for tape drives,
which shouldn't ever happen, since we set 

	sh->can_queue = cciss_tape_cmds;

and we allocate that many commands + 2....

scsi_cmd_stack_setup(ctlr_info_t *h, struct cciss_scsi_adapter_data_t *sa)
{
        int i;
        struct cciss_scsi_cmd_stack_t *stk;
        size_t size;

        stk = &sa->cmd_stack;
        stk->nelems = cciss_tape_cmds + 2;

You're apparently hitting this:

        spin_lock_irqsave(&h->lock, flags);
        c = scsi_cmd_alloc(h);
        spin_unlock_irqrestore(&h->lock, flags);
        if (c == NULL) {                        /* trouble... */
                dev_warn(&h->pdev->dev, "scsi_cmd_alloc returned NULL!\n");
                /* FIXME: next 3 lines are -> BAD! <- */
                cmd->result = DID_NO_CONNECT << 16;
                done(cmd);
                return 0;
        }

which means that scsi_cmd_alloc returned NULL, which only happens
if the thing has run out of commands.

It's not obvious to me how it can be that it runs out of commands.
Maybe we're losing them somehow, but this has not previously been
a problem that I'm aware of.

Are you able to reproduce the problem?

What's going on on the system when it happens?

putting in a dump_stack(); near that FIXME might give a clue.

Which kernel are you running?

-- steve



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

* Re: cciss_scsi.c: Fix me
  2014-07-23 14:41   ` scameron
@ 2014-07-23 15:11     ` Randy Dunlap
  2014-07-23 15:19       ` scameron
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2014-07-23 15:11 UTC (permalink / raw)
  To: scameron, linux-kernel
  Cc: xerofoify, scott.benesh, iss_storagedev, michael.miller

On 07/23/2014 07:41 AM, scameron@beardog.cce.hp.com wrote:
> On Wed, Jul 23, 2014 at 02:15:29PM +0000, Benesh, Scott wrote:
>> From: Nick Krause [mailto:xerofoify@gmail.com] 
>> Sent: Saturday, July 19, 2014 11:51 PM
>> To: mike.miller@hp.com
>> Cc: ISS StorageDev; linux-kernel@vger.kernel.org
>> Subject: cciss_scsi.c: Fix me
>>
>> Hey Mike,
>> I seem to be hitting a fix me message in this file in function,cciss_scsi_queue_command_lck.
>> I am wondering what you want to do when C is Null?
>> Cheers Nick
> 
> Hi Nick,
> 
> Mike's moved on from HP to Canonical now.
> 
> It looks like you're running out of commands for tape drives,
> which shouldn't ever happen, since we set 
> 
> 	sh->can_queue = cciss_tape_cmds;
> 
> and we allocate that many commands + 2....
> 
> scsi_cmd_stack_setup(ctlr_info_t *h, struct cciss_scsi_adapter_data_t *sa)
> {
>         int i;
>         struct cciss_scsi_cmd_stack_t *stk;
>         size_t size;
> 
>         stk = &sa->cmd_stack;
>         stk->nelems = cciss_tape_cmds + 2;
> 
> You're apparently hitting this:
> 
>         spin_lock_irqsave(&h->lock, flags);
>         c = scsi_cmd_alloc(h);
>         spin_unlock_irqrestore(&h->lock, flags);
>         if (c == NULL) {                        /* trouble... */
>                 dev_warn(&h->pdev->dev, "scsi_cmd_alloc returned NULL!\n");
>                 /* FIXME: next 3 lines are -> BAD! <- */
>                 cmd->result = DID_NO_CONNECT << 16;
>                 done(cmd);
>                 return 0;
>         }
> 
> which means that scsi_cmd_alloc returned NULL, which only happens
> if the thing has run out of commands.
> 
> It's not obvious to me how it can be that it runs out of commands.
> Maybe we're losing them somehow, but this has not previously been
> a problem that I'm aware of.
> 
> Are you able to reproduce the problem?
> 
> What's going on on the system when it happens?
> 
> putting in a dump_stack(); near that FIXME might give a clue.
> 
> Which kernel are you running?
> 
> -- steve

Hi Steve,

You apparently have not been following the Nick saga.

Nick is using cscope to search for FIXMEs in the kernel source tree and
then trying to generate patches to remove or 'fix' them.

He is not hitting a kernel oops or panic or bug.

It's OK to not take him too seriously.  He seems to be wasting time
for lots of kernel developers.


-- 
~Randy

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

* Re: cciss_scsi.c: Fix me
  2014-07-23 15:11     ` Randy Dunlap
@ 2014-07-23 15:19       ` scameron
  2014-07-23 15:38         ` Nick Krause
  0 siblings, 1 reply; 5+ messages in thread
From: scameron @ 2014-07-23 15:19 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, xerofoify, scott.benesh, iss_storagedev,
	michael.miller, scameron

On Wed, Jul 23, 2014 at 08:11:33AM -0700, Randy Dunlap wrote:
> On 07/23/2014 07:41 AM, scameron@beardog.cce.hp.com wrote:
> > On Wed, Jul 23, 2014 at 02:15:29PM +0000, Benesh, Scott wrote:
> >> From: Nick Krause [mailto:xerofoify@gmail.com] 
> >> Sent: Saturday, July 19, 2014 11:51 PM
> >> To: mike.miller@hp.com
> >> Cc: ISS StorageDev; linux-kernel@vger.kernel.org
> >> Subject: cciss_scsi.c: Fix me
> >>
> >> Hey Mike,
> >> I seem to be hitting a fix me message in this file in function,cciss_scsi_queue_command_lck.
> >> I am wondering what you want to do when C is Null?
> >> Cheers Nick
> > 
> > Hi Nick,
> > 
> > Mike's moved on from HP to Canonical now.
> > 
> > It looks like you're running out of commands for tape drives,
> > which shouldn't ever happen, since we set 
> > 
> > 	sh->can_queue = cciss_tape_cmds;
> > 
> > and we allocate that many commands + 2....
> > 
> > scsi_cmd_stack_setup(ctlr_info_t *h, struct cciss_scsi_adapter_data_t *sa)
> > {
> >         int i;
> >         struct cciss_scsi_cmd_stack_t *stk;
> >         size_t size;
> > 
> >         stk = &sa->cmd_stack;
> >         stk->nelems = cciss_tape_cmds + 2;
> > 
> > You're apparently hitting this:
> > 
> >         spin_lock_irqsave(&h->lock, flags);
> >         c = scsi_cmd_alloc(h);
> >         spin_unlock_irqrestore(&h->lock, flags);
> >         if (c == NULL) {                        /* trouble... */
> >                 dev_warn(&h->pdev->dev, "scsi_cmd_alloc returned NULL!\n");
> >                 /* FIXME: next 3 lines are -> BAD! <- */
> >                 cmd->result = DID_NO_CONNECT << 16;
> >                 done(cmd);
> >                 return 0;
> >         }
> > 
> > which means that scsi_cmd_alloc returned NULL, which only happens
> > if the thing has run out of commands.
> > 
> > It's not obvious to me how it can be that it runs out of commands.
> > Maybe we're losing them somehow, but this has not previously been
> > a problem that I'm aware of.
> > 
> > Are you able to reproduce the problem?
> > 
> > What's going on on the system when it happens?
> > 
> > putting in a dump_stack(); near that FIXME might give a clue.
> > 
> > Which kernel are you running?
> > 
> > -- steve
> 
> Hi Steve,
> 
> You apparently have not been following the Nick saga.
> 
> Nick is using cscope to search for FIXMEs in the kernel source tree and
> then trying to generate patches to remove or 'fix' them.
> 
> He is not hitting a kernel oops or panic or bug.

Ah, ok, thanks.  That explains it, because I was pretty sure that
code is a "this will never happen" case.

-- steve


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

* Re: cciss_scsi.c: Fix me
  2014-07-23 15:19       ` scameron
@ 2014-07-23 15:38         ` Nick Krause
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Krause @ 2014-07-23 15:38 UTC (permalink / raw)
  To: scameron
  Cc: Randy Dunlap, linux-kernel, scott.benesh, iss_storagedev, michael.miller

On Wed, Jul 23, 2014 at 11:19 AM,  <scameron@beardog.cce.hp.com> wrote:
> On Wed, Jul 23, 2014 at 08:11:33AM -0700, Randy Dunlap wrote:
>> On 07/23/2014 07:41 AM, scameron@beardog.cce.hp.com wrote:
>> > On Wed, Jul 23, 2014 at 02:15:29PM +0000, Benesh, Scott wrote:
>> >> From: Nick Krause [mailto:xerofoify@gmail.com]
>> >> Sent: Saturday, July 19, 2014 11:51 PM
>> >> To: mike.miller@hp.com
>> >> Cc: ISS StorageDev; linux-kernel@vger.kernel.org
>> >> Subject: cciss_scsi.c: Fix me
>> >>
>> >> Hey Mike,
>> >> I seem to be hitting a fix me message in this file in function,cciss_scsi_queue_command_lck.
>> >> I am wondering what you want to do when C is Null?
>> >> Cheers Nick
>> >
>> > Hi Nick,
>> >
>> > Mike's moved on from HP to Canonical now.
>> >
>> > It looks like you're running out of commands for tape drives,
>> > which shouldn't ever happen, since we set
>> >
>> >     sh->can_queue = cciss_tape_cmds;
>> >
>> > and we allocate that many commands + 2....
>> >
>> > scsi_cmd_stack_setup(ctlr_info_t *h, struct cciss_scsi_adapter_data_t *sa)
>> > {
>> >         int i;
>> >         struct cciss_scsi_cmd_stack_t *stk;
>> >         size_t size;
>> >
>> >         stk = &sa->cmd_stack;
>> >         stk->nelems = cciss_tape_cmds + 2;
>> >
>> > You're apparently hitting this:
>> >
>> >         spin_lock_irqsave(&h->lock, flags);
>> >         c = scsi_cmd_alloc(h);
>> >         spin_unlock_irqrestore(&h->lock, flags);
>> >         if (c == NULL) {                        /* trouble... */
>> >                 dev_warn(&h->pdev->dev, "scsi_cmd_alloc returned NULL!\n");
>> >                 /* FIXME: next 3 lines are -> BAD! <- */
>> >                 cmd->result = DID_NO_CONNECT << 16;
>> >                 done(cmd);
>> >                 return 0;
>> >         }
>> >
>> > which means that scsi_cmd_alloc returned NULL, which only happens
>> > if the thing has run out of commands.
>> >
>> > It's not obvious to me how it can be that it runs out of commands.
>> > Maybe we're losing them somehow, but this has not previously been
>> > a problem that I'm aware of.
>> >
>> > Are you able to reproduce the problem?
>> >
>> > What's going on on the system when it happens?
>> >
>> > putting in a dump_stack(); near that FIXME might give a clue.
>> >
>> > Which kernel are you running?
>> >
>> > -- steve
>>
>> Hi Steve,
>>
>> You apparently have not been following the Nick saga.
>>
>> Nick is using cscope to search for FIXMEs in the kernel source tree and
>> then trying to generate patches to remove or 'fix' them.
>>
>> He is not hitting a kernel oops or panic or bug.
>
> Ah, ok, thanks.  That explains it, because I was pretty sure that
> code is a "this will never happen" case.
>
> -- steve
>


Fine I give up you guys don't want me to touch these fix mes and leave
them alone.
Cheers Nick

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

end of thread, other threads:[~2014-07-23 15: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:51 cciss_scsi.c: Fix me Nick Krause
     [not found] ` <E97154CC48E26246A93194D00057266054F11A3F@G9W0745.americas.hpqcorp.net>
2014-07-23 14:41   ` scameron
2014-07-23 15:11     ` Randy Dunlap
2014-07-23 15:19       ` scameron
2014-07-23 15:38         ` Nick Krause

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.