jonghne | 1 Nov 2006 02:46
Favicon

how to rmmod modules safely

Hi, I use 2.6.15.7 kernel(at91rm9200 cpu). I use "cdev_add" registering a char device and "cdev_del"
removing it, with "mknod" "/dev" file. "insmod" looks like right , but after "rmmod" , I cannot "insmod"
this module again.
Then I try "devfs_mk_cdev" and "devfs_remove" , the same result, after "rmmod" I cannot "insmod" this
module again. Why?  after "rmmod" when "cat /proc/devices" , it result in wrong. Help, thanks.
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

jonghne | 1 Nov 2006 04:29
Favicon

insmod probles

hi, in at91-linux-2.6.15.7, my char device insmod rightly, but after rmmod , it cannot insmod again, why?

register code as follows:

cdev_init(&dev,&leds_fops);   
if(cdev_add(&dev,MKDEV(LED_MAJOR,0),1)||register_chrdev_region(MKDEV(LED_MAJOR,0),1,"/dev/led")<0)
         panic("Couldn't register /dev/led driver\n");    
devfs_mk_cdev(MKDEV(LED_MAJOR,0),S_IFCHR | S_IRUSR | S_IWUSR,"led");
led_class = class_create(THIS_MODULE, "led"); 
class_device_create(led_class,MKDEV(LED_MAJOR, 0),NULL,"led"); 
///////////////////////////////////////////////////
remove code as follows:

class_device_destroy(led_class,MKDEV(LED_MAJOR,0)); 
devfs_remove("led"); 
cdev_del(&dev);

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

satpal parmar | 1 Nov 2006 06:26
Picon

porting console driver from linux 2.4 to linux 2.6

Hi all;

I would apprecite if any one can help me to understand changes in
linux 2.6in tty
side.my present problem is receive funtion of our console driver that i have
 ported from linux 2.4 to linux 2.6.17.

I am able to send data correctly but I am not able to send data to line
discipline data .Interrupt is working fine and I do get in receive funtion
but ther is something missing while it handover this data to line
discipline.

can any one help to uderstand use of function:
*uart_insert_char*(&port,rsr,CNXT_STAT_RFO,ch,flag);

This is new addition to linux kernel 2.6. there are two funtion calls to
funtion *tty_insert_flip_char* side this funtion and in my cases both
funtion call condition fails.what this funtion tty_insert_flip_char suppose
to do.why do we use word FLIP here?

Funtion :flush_to_ldisc which give data to line discipline fails due to
failure in condition :
 while((tbuf = head) != NULL)    in the funtion both are zero in  when i
prited ther values.Does this means I am not able to pack data correctly.
which funtion does this job?

Reefrence to any document of porting console driver will be great help.

thanks in advance.

(Continue reading)

Russell King - ARM Linux | 1 Nov 2006 08:00
Picon

Mailing List FAQ

This message is sent to this mailing list once a week.

This can also be found (with html links) at:
   http://www.arm.linux.org.uk/mailinglists/faq.php

    1. Mailing list questions:
         1. [11]How do I unsubscribe from the mailing lists.
    2. General questions:
         1. [12]How do I compile a kernel for ARM?
         2. [13]Can I use Intel IXP425 AccessLibrary with 2.6 kernels?
         3. [14]What  are  the  available  solutions  for  floating point
            support?
         4. [15]Can  I use the both hard & soft float at the same time or
            only choose one of them?
         5. [16]When   I  compile  my  2.6.x  kernel  for  ARM  I  get  a
            compiler/assembler error. Any idea ?
         6. [17]When  I  trace kernel in head.S I found problems that may
            be caused by __turn_mmu_on. Any idea ?
         7. [18]I'm  working  on a bootloader, where can I find ARM Linux
            kernel booting requirements ?
         8. [19]How  can  I  access  /dev/mem ? - How can I map memory in
            user space ?
         9. [20]I    see   '$a',   '$d'   and   '$t'   symbols   in   the
            backtrace/ksymoops  output/System.map/linker  error messages.
            What are they and how can I get rid of them ?
        10. [21]Where  can I find -rmk -pxa -* patches for the 2.6 kernel
            ?
        11. [22]I'm using this 2.4 kernel, and ...
        12. [23]I'm using this 2.6 kernel, and ...
        13. [24]Why does my debugger trap in __arch_clear_user?
(Continue reading)

Russell King - ARM Linux | 1 Nov 2006 08:00
Picon

Mailing List Etiquette

This message is sent to this mailing list once a week.

This can also be found (with html links) at:
   http://www.arm.linux.org.uk/mailinglists/etiquette.php

   In  order  for  the  linux-arm  lists  to  provide  a high quality and
   effective  forum  for  finding  answers  to  problems,  the  following
   etiquette  is  highly recommended. The [11]netiquette section 2.1.1 is
   worth a read for general points of etiquette.

   The  list  below  are  specific  to the lists.arm.linux.org.uk mailing
   lists.  Where  they  differ  with  respect  to  RFC1855,  these points
   override those in RFC1855:
    1. [12]Subscription requirements.
    2. [13]Sending a new message to the list.
    3. [14]Replying to a message from the list.
    4. [15]Sending a message to multiple linux-arm* lists.
    5. [16]HTML encoded messages.
    6. [17]Email attachments.
    7. [18]Commercial email.
    8. [19]Searching the archives.
    9. [20]Support for commercial products.
   10. [21]Cross-posting between linux-arm* lists and other lists.
   11. [22]Automatic replies.
   12. [23]Virus scanners and email sanitisers.

   1. Subscription requirements. [[24]rmk]
          Recently,  we  have  had to impose a restriction on the mailing
          lists.  You  must be subscribed to the mailing list in order to
          post  messages  to that mailing list. This is because of the UK
(Continue reading)

Andrew Victor | 1 Nov 2006 08:24

Re: Any 2.6.17-at91.patch.gz mirror?

hi Daniel,

> It seems that the http://maxim.org.za/AT91RM9200/2.6/ URL has been more down 
> than up recently, and right now I haven't been able to access it for several 
> days.

There were some stability problems with the new network link last week,
but that was sorted out on Thursday.

Anybody else having problems accessing the site this week?

Regards,
  Andrew Victor

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

Martin Michlmayr | 1 Nov 2006 10:47

Re: IXP4XX NPE network driver

* Deepak Saxena <dsaxena <at> plexity.net> [2006-07-14 08:33]:
> > * Stefan Roese <sr <at> denx.de> [2006-07-14 09:03]:
> > > Yes, the NPE microcode is unfortunately the last showstopper for
> > > easy integration. After a last discussion with Intel it seems that
> > > the IPL won't be changed.
> I have been/am woking with some folks at Intel who are trying to come
> up with a plan.

Has there been any progress with this?
--

-- 
Martin Michlmayr
http://www.cyrius.com/

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

Jim | 1 Nov 2006 11:52
Picon

Debug usb driver on ep93xx

Hi,

I have a usb device driver which cannot be opened ("No such device" 
error) on kernel 2.6. The lsmod shown the device driver (made by mknode 
/dev/skele0 c 180 0). The skele_init() was called during insmod. On the 
other end, The ohci_ep93xx init and ohci_ep93xx probe all worked fine, 
and be able to detect plugged device, ohci ep93xx interrupt worked as 
well. Any tips on how to debug this problem please?

Thank you.

Jim

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

Lennert Buytenhek | 1 Nov 2006 12:10

Re: Debug usb driver on ep93xx

On Wed, Nov 01, 2006 at 09:52:58PM +1100, Jim wrote:

> I have a usb device driver which cannot be opened ("No such device" 
> error) on kernel 2.6. The lsmod shown the device driver (made by mknode 
> /dev/skele0 c 180 0). The skele_init() was called during insmod. On the 
> other end, The ohci_ep93xx init and ohci_ep93xx probe all worked fine, 
> and be able to detect plugged device, ohci ep93xx interrupt worked as 
> well. Any tips on how to debug this problem please?

A couple of thoughts:
- You're unlikely to to get support in this forum for the Cirrus
  2.6.8.1 kernel fork you are running.
- The existence of a /dev/blah node in your filesystem says nothing at
  all about whether or not a certain device driver is loaded into your
  kernel.
- Even though your last post implicated ohci-ep93xx, you have provided
  no evidence that this would in fact be a software problem and not a
  hardware problem with your USB device.
- Even if this problem _were_ totally specific to ohci-ep93xx (although
  I don't think it's related to ohci-ep93xx at all), the linux USB devel
  mailing list would still be a better forum to post your question in,
  although you probably won't get a lot of support there either if you
  tell them you're running Cirrus' 2.6.8.1 kernel fork.
- Your last post included kernel error messages (this post didn't),
  one of them indicating that assigning an address to your newly
  plugged USB device timed out.  This suggests that a hardware issue
  with your USB device is one of the possibilities.
- You haven't told us what USB device you are trying this with.  Is it
  something homebrew (this is what I'm guessing), or a commercially
  available device that works just fine in every other PC out there?
(Continue reading)

Erik Mouw | 1 Nov 2006 12:49
Picon
Favicon

Re: insmod probles

On Wed, Nov 01, 2006 at 11:29:57AM +0800, jonghne wrote:
> hi, in at91-linux-2.6.15.7, my char device insmod rightly, but after
> rmmod , it cannot insmod again, why?
> 
> register code as follows:
> 
> cdev_init(&dev,&leds_fops);   

> if(cdev_add(&dev,MKDEV(LED_MAJOR,0),1)||register_chrdev_region(MKDEV(LED_MAJOR,0),1,"/dev/led")<0)
>          panic("Couldn't register /dev/led driver\n");    

That's insane. There is absolutely no need to panic() if your driver
couldn't be inserted. A panic() should only be used if further
execution of the system would do more damage to it than continueing. A
failure to register a driver is not such a case.

> devfs_mk_cdev(MKDEV(LED_MAJOR,0),S_IFCHR | S_IRUSR | S_IWUSR,"led");

devfs is sooooo dead. And it has been deprecated for over 3 years, so
remove any devfs code from your driver.

> led_class = class_create(THIS_MODULE, "led"); 
> class_device_create(led_class,MKDEV(LED_MAJOR, 0),NULL,"led"); 
> ///////////////////////////////////////////////////
> remove code as follows:
> 
> class_device_destroy(led_class,MKDEV(LED_MAJOR,0)); 
> devfs_remove("led"); 
> cdev_del(&dev);

(Continue reading)


Gmane