Openmoko Bug #2277: Wireless does not work with the 2.6.29 kernel

Openmoko Public Trac bugs at docs.openmoko.org
Sun Jun 14 03:54:14 CEST 2009


#2277: Wireless does not work with the 2.6.29 kernel
---------------------+------------------------------------------------------
 Reporter:  arhuaco  |          Owner:  openmoko-devel      
     Type:  defect   |         Status:  new                 
 Priority:  normal   |      Milestone:  stable-kernel-2009.1
Component:  unknown  |        Version:                      
 Severity:  normal   |       Keywords:                      
 Haspatch:  0        |      Blockedby:                      
Estimated:           |    Patchreview:                      
 Blocking:           |   Reproducible:  sometimes           
---------------------+------------------------------------------------------

Comment(by budfive):

 I have a possible fix for the ifconfig down/up bug described above
 (https://docs.openmoko.org/trac/ticket/2277#comment:14).

 The driver does most of its initialization in ar6000_init(), which is
 called
 when the module is loaded. Most of this initialization is undone by
 ar6000_close(), called at "ifconfig down". Noteably, ar6000_open() does
 NOT
 reinitialize the driver. Since this is the function called by "ifconfig
 up",
 the driver is hosed by "ifconfig down; ifconfig up".

 A potential fix is to castrate ar6000_close() so that the driver can still
 work even if ar6000_open() doesn't do much. The cleanup still needs to
 happen when the module is removed. I'm about to attach a patch that does
 this. With this patch, the driver works and the automatic network scripts
 work.

 One obvious potential downside with this is that since we're no longer
 cleaning up at "ifconfig down", an inactive driver can still use power
 needlessly. I did some tests, and while I do see this extra power usage,
 it
 looks like it's inconsequential:

 {{{
 *** ar6000_close castrated
    | phone off doing nothing                      | 101mA |
    | insmod ar6000.ko                             | 103mA |
    | ifconfig eth0 up                             | 103mA |
    | ifconfig eth0 down                           | 103mA |
    | connect (ifconfig up, iwconfig, udhcpc, etc) | 105mA |
    | ifconfig eth0 down                           | 105mA |
    | rmmod                                        | 100mA |

 *** ar6000_close unmodified
    | ifconfig eth0 up                             | 103mA |
    | ifconfig eth0 down                           | 102mA |
    | rmmod                                        | 101mA |
    | unbind                                       | 96mA  |
 }}}

 All readings were made by using the built-in coloumb counter, and each
 number is good to about +- 2mA. It looks like the missing cleanup code in
 the modified version costs us about 3mA or 3% of the total power usage. If
 this is the case, I would argue we have a fix. It also looks like we
 really
 should unbind (echo "s3c2440-sdi" >
 /sys/bus/platform/drivers/s3c2440-sdi/unbind) the driver when not in use,
 since that's where the most of the power-savings lie. Do these numbers
 seem
 reasonable?

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/2277#comment:18>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the buglog mailing list