From: Mark Hounschell <markh@compro.net>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, lidza.louina@gmail.com,
driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org, dan.carpenter@oracle.com
Subject: Re: [PATCH v2] dgnc: Don't save boards in memory that have failed to initialize
Date: Mon, 16 Mar 2015 13:18:36 -0400 [thread overview]
Message-ID: <5507106C.5080501@compro.net> (raw)
In-Reply-To: <550575ED.5020907@compro.net>
On 03/15/2015 08:07 AM, Mark Hounschell wrote:
> On 03/14/2015 04:44 AM, Greg KH wrote:
>> On Fri, Mar 13, 2015 at 04:55:55PM -0400, Mark Hounschell wrote:
>>> On 03/12/2015 12:14 PM, Giedrius Statkevičius wrote:
>>>> On 2015.03.12 12:08, Greg KH wrote:
>>>>> On Mon, Mar 09, 2015 at 06:29:38PM +0200, Giedrius Statkevičius wrote:
>>>>>> Remove BOARD_FAILED and don't save dgnc_boards which failed to
>>>>>> initialize.
>>>>>>
>>>>>> Assign the result of kzalloc() to brd in dgnc_found_board() and
>>>>>> only put
>>>>>> it in the dgnc_Board[] if it successfully initializes. Also, remove
>>>>>> BOARD_FAILED enum and all ifs that check for it. Finally, remove one
>>>>>> final place where state was set to BOARD_FAILED which was even
>>>>>> redundant
>>>>>> before this patch.
>>>>>>
>>>>>> Signed-off-by: Giedrius Statkevičius
>>>>>> <giedrius.statkevicius@gmail.com>
>>>>>> ---
>>>>>> v2: Remove "brd = dgnc_Board[dgnc_NumBoards];" line which I forgot
>>>>>> to do
>>>>>> in the first version
>>>>>>
>>>>>> drivers/staging/dgnc/dgnc_driver.c | 20 ++------------------
>>>>>> drivers/staging/dgnc/dgnc_driver.h | 3 +--
>>>>>> drivers/staging/dgnc/dgnc_mgmt.c | 5 +----
>>>>>> drivers/staging/dgnc/dgnc_tty.c | 8 --------
>>>>>> 4 files changed, 4 insertions(+), 32 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/staging/dgnc/dgnc_driver.c
>>>>>> b/drivers/staging/dgnc/dgnc_driver.c
>>>>>> index fa1ee79..075727d 100644
>>>>>> --- a/drivers/staging/dgnc/dgnc_driver.c
>>>>>> +++ b/drivers/staging/dgnc/dgnc_driver.c
>>>>>> @@ -401,8 +401,7 @@ static int dgnc_found_board(struct pci_dev
>>>>>> *pdev, int id)
>>>>>> unsigned long flags;
>>>>>>
>>>>>> /* get the board structure and prep it */
>>>>>> - dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(*brd), GFP_KERNEL);
>>>>>> - brd = dgnc_Board[dgnc_NumBoards];
>>>>>> + brd = kzalloc(sizeof(*brd), GFP_KERNEL);
>>>>>
>>>>> You've done a great job here, but...
>>>>>
>>>>> Yeah, sorry...
>>>>>
>>>>> I really want to see this whole "static list of boards/cards" go away.
>>>>> There should not be any need for that in any in-kernel driver. Your
>>>>> patch here is a sign that things are really wrong with this whole
>>>>> static
>>>>> array mess.
>>>>>
>>>>> So could you do that instead? I don't want to take patches around
>>>>> this
>>>>> whole "board state" mess anymore, as it should all not be needed at
>>>>> all.
>>>>>
>>>>> If you need pointers on what needs to be done here, just let me know.
>>>>>
>>>>> thanks,
>>>>>
>>>>> greg k-h
>>>>>
>>>>
>>>> I can try :) But my main concern is the lack of dgnc driver maintainers
>>>> activity and that I don't own the hardware this driver is written
>>>> for as
>>>> it's quite expensive (cheapest cards I've found start at 300$~) and I
>>>> can't afford it ATM. But I guess if I keep the patches small and
>>>> logical
>>>> everything will be okay.
>>>>
>>>
>>> I am on the maintainers list and actually have hardware. I have just
>>> been so
>>> swamped the last few months that I haven't been able to do ANYTHING
>>> here.
>>> Even work on the dgap driver that I was working on, I just haven't
>>> had the
>>> time. I can tell you that the dgnc driver does NOT work at all and
>>> hasn't
>>> worked since it was introduced into staging by Greg.
>>
>> Really? It's always been broken? Why don't we just delete the thing?
>>
>
> Well, broken might not be the best word. I should have just said,
> doesn't work for me.
> It did work on a 3.4 kernel when I provided it to you. I have spent no
> time as to why but will take a look on Monday.
>
The driver actually does work. It didn't work for me because the device
entries were not as they used to be. So if you want to make a change you
think needs testing, I can test it.
I only have a single card 8 port though.
Regards
Mark
next prev parent reply other threads:[~2015-03-16 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 16:29 [PATCH v2] dgnc: Don't save boards in memory that have failed to initialize Giedrius Statkevičius
2015-03-10 7:39 ` Dan Carpenter
2015-03-12 10:08 ` Greg KH
2015-03-12 10:20 ` Dan Carpenter
2015-03-12 16:14 ` Giedrius Statkevičius
2015-03-13 20:55 ` Mark Hounschell
2015-03-14 8:44 ` Greg KH
2015-03-15 12:07 ` Mark Hounschell
2015-03-15 16:38 ` Greg KH
2015-03-16 17:18 ` Mark Hounschell [this message]
2015-03-13 20:06 ` Giedrius Statkevičius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5507106C.5080501@compro.net \
--to=markh@compro.net \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.