Jeff Garzik <[EMAIL PROTECTED]> writes:

> Arnaud Patard wrote:
>> Hi,
>> I was testing the sis190 driver and got an oops. Tests show that the
>> error
>> path is the following  : sis190_init_one()
>>  -> register_netdev
>>    * Userspace sees the new interface and run ethtool ethX.
>>    * ethtool calls ethtools_get_settings
>>    * ethtools_get_settings try to access to the mii datas
>>    * oops occurs
>>  -> sis190_mii_probe The fix I made is to replace the sequence by
>> the following one : sis190_init_one()
>>  -> sis190_mii_probe
>>  -> register_netdev
>> Regards,
>> Arnaud Patard
>> Signed-off-by: Arnaud Patard <[EMAIL PROTECTED]>
>> ------------------------------------------------------------------------
>> diff -rpuN a/drivers/net/sis190.c b/drivers/net/sis190.c
>> --- a/drivers/net/sis190.c   2005-08-25 15:36:24.000000000 +0200
>> +++ b/drivers/net/sis190.c   2005-08-25 15:36:34.000000000 +0200
>> @@ -1779,14 +1779,18 @@ static int __devinit sis190_init_one(str
>>      dev->irq = pdev->irq;
>>      dev->base_addr = (unsigned long) 0xdead;
>>  +   pci_set_drvdata(pdev, dev);
>> +
>>      spin_lock_init(&tp->lock);
>> +    rc = sis190_mii_probe(dev);
>> +    if (rc < 0)
>> +            goto err_release_board;
>> +
>>      rc = register_netdev(dev);
>>      if (rc < 0)
>>              goto err_release_board;
>>  -   pci_set_drvdata(pdev, dev);
>>  -   rc = sis190_mii_probe(dev);
>
> yes mii probe should be moved, but pci_set_drvdata() should be the
> very last thing to occur.

Hi,

Francois told me that. I should admitt that it was a quick and dirty
 fix. A proper fix has already been sent to you (commit
 3690b6c124fbc7259634f3b80d92a6d9fe51ec79 on your libata). 


Regards,
Arnaud

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to